Class ExpandBlock
java.lang.Object
com.blamejared.crafttweaker.natives.block.ExpandBlock
- DocParam:
- this <block:minecraft:grass_block>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CTBlockIngredientasBlockIngredient(net.minecraft.world.level.block.Block internal) static net.minecraft.world.item.ItemasItem(net.minecraft.world.level.block.Block internal) Gets the Item representation of this Block.static CTBlockIngredientasList(net.minecraft.world.level.block.Block internal, CTBlockIngredient other) static StringgetCommandString(net.minecraft.world.level.block.Block internal) Gets the block bracket handler syntax for this Block.static net.minecraft.world.level.block.state.BlockStategetDefaultState(net.minecraft.world.level.block.Block internal) Gets the defaultBlockStateof this Block.static StringgetDescriptionId(net.minecraft.world.level.block.Block internal) Gets the translation key that is used to localize this Block.static floatgetExplosionResistance(net.minecraft.world.level.block.Block internal) Gets the blast resistance of this Block.static floatgetFriction(net.minecraft.world.level.block.Block internal) Gets the friction of this Block.static floatgetJumpFactor(net.minecraft.world.level.block.Block internal) Gets the jump factor of this Block.static StringgetLootTable(net.minecraft.world.level.block.Block internal) Gets the loot table id for this Block.static net.minecraft.world.level.material.MaterialgetMaterial(net.minecraft.world.level.block.Block internal) Gets the material of this Block.static net.minecraft.network.chat.MutableComponentgetName(net.minecraft.world.level.block.Block internal) Gets the name of this Blockstatic List<net.minecraft.world.level.block.state.BlockState>getPossibleStates(net.minecraft.world.level.block.Block internal) Gets a list of validBlockStates for this Block.static net.minecraft.resources.ResourceLocationgetRegistryName(net.minecraft.world.level.block.Block internal) Gets the registry name of this block.static floatgetSpeedFactor(net.minecraft.world.level.block.Block internal) Gets the speed factor of this Block.static booleanhasCollision(net.minecraft.world.level.block.Block internal) Checks if entities can collide with this Block.static booleanhasDynamicShape(net.minecraft.world.level.block.Block internal) Checks if the opacity of this block is different in different areas of the Block.static booleanisPossibleToRespawnInThis(net.minecraft.world.level.block.Block internal) Checks if an entity can be spawned inside this Block.static booleanmatches(net.minecraft.world.level.block.Block internal, net.minecraft.world.level.block.Block other) Checks whether this Block matches another Block.static voidsetExplosionResistance(net.minecraft.world.level.block.Block internal, float resistance) Sets the blast resistance of this Block.static voidsetFriction(net.minecraft.world.level.block.Block internal, float friction) Sets the friction of this Block.static voidsetHasCollision(net.minecraft.world.level.block.Block internal, boolean canCollide) Sets whether entities can collide with this Block.static voidsetJumpFactor(net.minecraft.world.level.block.Block internal, float jumpFactor) Sets the jump factor of this Block.static voidsetMaterial(net.minecraft.world.level.block.Block internal, net.minecraft.world.level.material.Material material) Sets the material of this Block.static voidsetSpeedFactor(net.minecraft.world.level.block.Block internal, float speedFactor) Sets the speed factor of this Block.
-
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 defaultBlockStateof this Block.- Returns:
- The default
BlockStateof this Block.
-
getLootTable
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
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
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 validBlockStates 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
-
asList
public static CTBlockIngredient asList(net.minecraft.world.level.block.Block internal, CTBlockIngredient other)
-