Class ExpandBlockState
java.lang.Object
com.blamejared.crafttweaker.natives.block.ExpandBlockState
- DocParam:
- this <blockstate:minecraft:grass>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CTBlockIngredientasBlockIngredient(net.minecraft.world.level.block.state.BlockState internal) static CTBlockIngredientasList(net.minecraft.world.level.block.state.BlockState internal, CTBlockIngredient other) static StringasString(net.minecraft.world.level.block.state.BlockState internal) static booleancanOcclude(net.minecraft.world.level.block.state.BlockState internal) Checks whether this BlockState is solid.getAllowedValuesForProperty(net.minecraft.world.level.block.state.BlockState internal, String name) Gets a list of allowed values for a given property.static net.minecraft.world.level.block.BlockgetBlock(net.minecraft.world.level.block.state.BlockState internal) Gets the baseBlockof this BlockState.static StringgetCommandString(net.minecraft.world.level.block.state.BlockState internal) Gets the blockstate bracket handler syntax for this BlockState.static floatgetDestroySpeed(net.minecraft.world.level.block.state.BlockState internal) Gets the hardness of this BlockState.static intgetLightEmission(net.minecraft.world.level.block.state.BlockState internal) Gets the light level of this BlockStategetProperties(net.minecraft.world.level.block.state.BlockState internal) Gets the properties of this BlockState.getPropertyNames(net.minecraft.world.level.block.state.BlockState internal) Gets the names of the properties of this BlockState.static StringgetPropertyValue(net.minecraft.world.level.block.state.BlockState internal, String name) Gets the value of the given property.static net.minecraft.world.level.block.SoundTypegetSoundType(net.minecraft.world.level.block.state.BlockState internal) static booleanhasBlockEntity(net.minecraft.world.level.block.state.BlockState internal) Checks whether this BlockState has aBlockEntity.static booleanhasProperty(net.minecraft.world.level.block.state.BlockState internal, String name) Checks whether this BlockState has the given property.static booleanisRandomlyTicking(net.minecraft.world.level.block.state.BlockState internal) Checks whether this BlockState ticks randomly.static booleanisSignalSource(net.minecraft.world.level.block.state.BlockState internal) Checks whether this BlockState can provide Redstone Powerstatic net.minecraft.world.level.block.state.BlockStaterotate(net.minecraft.world.level.block.state.BlockState internal, net.minecraft.world.level.block.Rotation rotation) static voidsetDestroySpeed(net.minecraft.world.level.block.state.BlockState internal, float destroySpeed) Sets the destroy speed of this BlockState.static net.minecraft.world.level.block.state.BlockStatewithProperty(net.minecraft.world.level.block.state.BlockState internal, String name, String value) Sets a block property based on it's name.
-
Constructor Details
-
ExpandBlockState
public ExpandBlockState()
-
-
Method Details
-
getSoundType
public static net.minecraft.world.level.block.SoundType getSoundType(net.minecraft.world.level.block.state.BlockState internal) -
rotate
public static net.minecraft.world.level.block.state.BlockState rotate(net.minecraft.world.level.block.state.BlockState internal, net.minecraft.world.level.block.Rotation rotation) -
getBlock
public static net.minecraft.world.level.block.Block getBlock(net.minecraft.world.level.block.state.BlockState internal) Gets the baseBlockof this BlockState. TheBlockwill not contain any of the properties of this BlockState.- Returns:
- The base
Block
-
getLightEmission
public static int getLightEmission(net.minecraft.world.level.block.state.BlockState internal) Gets the light level of this BlockState- Returns:
- The light level of this BlockState.
-
isSignalSource
public static boolean isSignalSource(net.minecraft.world.level.block.state.BlockState internal) Checks whether this BlockState can provide Redstone Power- Returns:
- True if this BlockState can provide Redstone Power. False otherwise.
-
canOcclude
public static boolean canOcclude(net.minecraft.world.level.block.state.BlockState internal) Checks whether this BlockState is solid.- Returns:
- True if this BlockState is solid. False otherwise.
-
isRandomlyTicking
public static boolean isRandomlyTicking(net.minecraft.world.level.block.state.BlockState internal) Checks whether this BlockState ticks randomly.- Returns:
- True if this BlockState ticks randomly. False otherwise.
-
hasBlockEntity
public static boolean hasBlockEntity(net.minecraft.world.level.block.state.BlockState internal) Checks whether this BlockState has aBlockEntity.- Returns:
- True if this BlockState has a
BlockEntity. False otherwise.
-
withProperty
public static net.minecraft.world.level.block.state.BlockState withProperty(net.minecraft.world.level.block.state.BlockState internal, String name, String value) Sets a block property based on it's name.- Parameters:
name- The name of the property to set.value- The new value of the property.- Returns:
- This BlockState with the new property value.
- DocParam:
- name "snowy", value "true"
-
getPropertyNames
public static List<String> getPropertyNames(net.minecraft.world.level.block.state.BlockState internal) Gets the names of the properties of this BlockState.- Returns:
- the List of the names of the BlockStates's properties.
-
getPropertyValue
public static String getPropertyValue(net.minecraft.world.level.block.state.BlockState internal, String name) Gets the value of the given property.- Parameters:
name- "snowy"- Returns:
- The value of the property on this BlockState.
-
getAllowedValuesForProperty
public static List<String> getAllowedValuesForProperty(net.minecraft.world.level.block.state.BlockState internal, String name) Gets a list of allowed values for a given property.- Parameters:
name- The name of the property to find the allowed values for.- Returns:
- a List of allowed values.
- DocParam:
- name "snowy"
-
getProperties
public static Map<String,String> getProperties(net.minecraft.world.level.block.state.BlockState internal) Gets the properties of this BlockState.- Returns:
- a Map of the properties on this BlockState.
-
hasProperty
public static boolean hasProperty(net.minecraft.world.level.block.state.BlockState internal, String name) Checks whether this BlockState has the given property.- Parameters:
name- the name of the property to check.- Returns:
- True if this BlockState has the property. False otherwise.
- DocParam:
- name "snowy"
-
asString
-
getDestroySpeed
public static float getDestroySpeed(net.minecraft.world.level.block.state.BlockState internal) Gets the hardness of this BlockState.- Returns:
- The hardness of this BlockState.
-
setDestroySpeed
public static void setDestroySpeed(net.minecraft.world.level.block.state.BlockState internal, float destroySpeed) Sets the destroy speed of this BlockState.- Parameters:
destroySpeed- the new destroy speed of this BlockState- DocParam:
- destroySpeed 2.4f
-
getCommandString
Gets the blockstate bracket handler syntax for this BlockState. E.G.<blockstate:minecraft:grass:snowy=true>- Returns:
- The blockstate bracket handler syntax for this BlockState.
-
asBlockIngredient
public static CTBlockIngredient asBlockIngredient(net.minecraft.world.level.block.state.BlockState internal) -
asList
public static CTBlockIngredient asList(net.minecraft.world.level.block.state.BlockState internal, CTBlockIngredient other)
-