Class ExpandBlock

java.lang.Object
com.blamejared.crafttweaker.natives.block.ExpandBlock

@ZenRegister public class ExpandBlock extends Object
DocParam:
this <block:minecraft:grass_block>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    asBlockIngredient(net.minecraft.world.level.block.Block internal)
     
    static net.minecraft.world.item.Item
    asItem(net.minecraft.world.level.block.Block internal)
    Gets the Item representation of this Block.
    asList(net.minecraft.world.level.block.Block internal, CTBlockIngredient other)
     
    static String
    getCommandString(net.minecraft.world.level.block.Block internal)
    Gets the block bracket handler syntax for this Block.
    static net.minecraft.world.level.block.state.BlockState
    getDefaultState(net.minecraft.world.level.block.Block internal)
    Gets the default BlockState of this Block.
    static String
    getDescriptionId(net.minecraft.world.level.block.Block internal)
    Gets the translation key that is used to localize this Block.
    static float
    getExplosionResistance(net.minecraft.world.level.block.Block internal)
    Gets the blast resistance of this Block.
    static float
    getFriction(net.minecraft.world.level.block.Block internal)
    Gets the friction of this Block.
    static float
    getJumpFactor(net.minecraft.world.level.block.Block internal)
    Gets the jump factor of this Block.
    static String
    getLootTable(net.minecraft.world.level.block.Block internal)
    Gets the loot table id for this Block.
    static net.minecraft.world.level.material.Material
    getMaterial(net.minecraft.world.level.block.Block internal)
    Gets the material of this Block.
    static net.minecraft.network.chat.MutableComponent
    getName(net.minecraft.world.level.block.Block internal)
    Gets the name of this Block
    static List<net.minecraft.world.level.block.state.BlockState>
    getPossibleStates(net.minecraft.world.level.block.Block internal)
    Gets a list of valid BlockStates for this Block.
    static net.minecraft.resources.ResourceLocation
    getRegistryName(net.minecraft.world.level.block.Block internal)
    Gets the registry name of this block.
    static float
    getSpeedFactor(net.minecraft.world.level.block.Block internal)
    Gets the speed factor of this Block.
    static boolean
    hasCollision(net.minecraft.world.level.block.Block internal)
    Checks if entities can collide with this Block.
    static boolean
    hasDynamicShape(net.minecraft.world.level.block.Block internal)
    Checks if the opacity of this block is different in different areas of the Block.
    static boolean
    isPossibleToRespawnInThis(net.minecraft.world.level.block.Block internal)
    Checks if an entity can be spawned inside this Block.
    static boolean
    matches(net.minecraft.world.level.block.Block internal, net.minecraft.world.level.block.Block other)
    Checks whether this Block matches another Block.
    static void
    setExplosionResistance(net.minecraft.world.level.block.Block internal, float resistance)
    Sets the blast resistance of this Block.
    static void
    setFriction(net.minecraft.world.level.block.Block internal, float friction)
    Sets the friction of this Block.
    static void
    setHasCollision(net.minecraft.world.level.block.Block internal, boolean canCollide)
    Sets whether entities can collide with this Block.
    static void
    setJumpFactor(net.minecraft.world.level.block.Block internal, float jumpFactor)
    Sets the jump factor of this Block.
    static void
    setMaterial(net.minecraft.world.level.block.Block internal, net.minecraft.world.level.material.Material material)
    Sets the material of this Block.
    static void
    setSpeedFactor(net.minecraft.world.level.block.Block internal, float speedFactor)
    Sets the speed factor of this Block.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExpandBlock

      public ExpandBlock()
  • Method Details

    • getRegistryName

      public static net.minecraft.resources.ResourceLocation getRegistryName(net.minecraft.world.level.block.Block internal)
      Gets the registry name of this block.
      Returns:
      A ResourceLocation of the registry name of this block.
    • getDefaultState

      public static net.minecraft.world.level.block.state.BlockState getDefaultState(net.minecraft.world.level.block.Block internal)
      Gets the default BlockState of this Block.
      Returns:
      The default BlockState of this Block.
    • getLootTable

      public static String getLootTable(net.minecraft.world.level.block.Block internal)
      Gets the loot table id for this Block.
      Returns:
      The loot table id for this Block.
    • isPossibleToRespawnInThis

      public static boolean isPossibleToRespawnInThis(net.minecraft.world.level.block.Block internal)
      Checks if an entity can be spawned inside this Block. This is used to find valid spawn locations for players.
      Returns:
      True if an entity can be spawned in this Block. False Otherwise.
    • getDescriptionId

      public static String getDescriptionId(net.minecraft.world.level.block.Block internal)
      Gets the translation key that is used to localize this Block.
      Returns:
      The unlocalized name of this block.
    • getName

      public static net.minecraft.network.chat.MutableComponent getName(net.minecraft.world.level.block.Block internal)
      Gets the name of this Block
      Returns:
      The name of this block.
    • getCommandString

      public static String getCommandString(net.minecraft.world.level.block.Block internal)
      Gets the block bracket handler syntax for this Block. E.G. <block:minecraft:dirt>
      Returns:
      The block bracket handler syntax for this Block.
    • getPossibleStates

      public static List<net.minecraft.world.level.block.state.BlockState> getPossibleStates(net.minecraft.world.level.block.Block internal)
      Gets a list of valid BlockStates for this Block.
      Returns:
      A list of valid BlockStates for this Block.
    • matches

      public static boolean matches(net.minecraft.world.level.block.Block internal, net.minecraft.world.level.block.Block other)
      Checks whether this Block matches another Block.
      Parameters:
      other - The other Block to check if this Block matches.
      Returns:
      True if this Block matches the other Block. False otherwise.
    • getFriction

      public static float getFriction(net.minecraft.world.level.block.Block internal)
      Gets the friction of this Block.
      Returns:
      The friction of this Block.
    • setFriction

      public static void setFriction(net.minecraft.world.level.block.Block internal, float friction)
      Sets the friction of this Block.
      Parameters:
      friction - The new friction of this Block.
      DocParam:
      friction 2
    • getSpeedFactor

      public static float getSpeedFactor(net.minecraft.world.level.block.Block internal)
      Gets the speed factor of this Block.
      Returns:
      The speed factor of this Block.
    • setSpeedFactor

      public static void setSpeedFactor(net.minecraft.world.level.block.Block internal, float speedFactor)
      Sets the speed factor of this Block.
      Parameters:
      speedFactor - The new speed factor of this Block.
      DocParam:
      speedFactor 2
    • getJumpFactor

      public static float getJumpFactor(net.minecraft.world.level.block.Block internal)
      Gets the jump factor of this Block.
      Returns:
      The jump factor of this Block.
    • setJumpFactor

      public static void setJumpFactor(net.minecraft.world.level.block.Block internal, float jumpFactor)
      Sets the jump factor of this Block.
      Parameters:
      jumpFactor - The new jump factor of this Block.
      DocParam:
      jumpFactor 2
    • asItem

      public static net.minecraft.world.item.Item asItem(net.minecraft.world.level.block.Block internal)
      Gets the Item representation of this Block. ***NOTE:*** Not all Blocks have Items, for instance, a Lit Redstone Lamp does not have an Item.
      Returns:
      The Item representation of this Block.
    • hasDynamicShape

      public static boolean hasDynamicShape(net.minecraft.world.level.block.Block internal)
      Checks if the opacity of this block is different in different areas of the Block.
      Returns:
      True if this Block has variable opacity. False otherwise.
    • hasCollision

      public static boolean hasCollision(net.minecraft.world.level.block.Block internal)
      Checks if entities can collide with this Block.
      Returns:
      True if entities will collide with this Block. False otherwise.
    • setHasCollision

      public static void setHasCollision(net.minecraft.world.level.block.Block internal, boolean canCollide)
      Sets whether entities can collide with this Block.
      Parameters:
      canCollide - Can entities collide with this Block.
      DocParam:
      canCollide true
    • getExplosionResistance

      public static float getExplosionResistance(net.minecraft.world.level.block.Block internal)
      Gets the blast resistance of this Block.
      Returns:
      The blast resistance of this Block.
    • setExplosionResistance

      public static void setExplosionResistance(net.minecraft.world.level.block.Block internal, float resistance)
      Sets the blast resistance of this Block.
      Parameters:
      resistance - The new blast resistance of this Block.
      DocParam:
      resistance 2
    • getMaterial

      public static net.minecraft.world.level.material.Material getMaterial(net.minecraft.world.level.block.Block internal)
      Gets the material of this Block.
      Returns:
      The material of this Block.
    • setMaterial

      public static void setMaterial(net.minecraft.world.level.block.Block internal, net.minecraft.world.level.material.Material material)
      Sets the material of this Block.
      Parameters:
      material - The new material of this Block.
      DocParam:
      material <material:earth>
    • asBlockIngredient

      public static CTBlockIngredient asBlockIngredient(net.minecraft.world.level.block.Block internal)
    • asList

      public static CTBlockIngredient asList(net.minecraft.world.level.block.Block internal, CTBlockIngredient other)