Class ExpandBlockState

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

@ZenRegister public class ExpandBlockState extends Object
DocParam:
this invalid input: '<'blockstate:minecraft:grass>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    asBlockIngredient(net.minecraft.world.level.block.state.BlockState internal)
    Gets the CTBlockIngredient representation of this BlockState.
    asList(net.minecraft.world.level.block.state.BlockState internal, CTBlockIngredient other)
    Combines this BlockState with another BlockState to create a new CTBlockIngredient.
    static String
    asString(net.minecraft.world.level.block.state.BlockState internal)
    Gets the string representation of this BlockState.
    static boolean
    canOcclude(net.minecraft.world.level.block.state.BlockState internal)
    Checks whether this BlockState is solid.
    static boolean
    equals(net.minecraft.world.level.block.state.BlockState internal, net.minecraft.world.level.block.state.BlockState other)
    Checks if this BlockState equals another BlockState.
    static List<String>
    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.Block
    getBlock(net.minecraft.world.level.block.state.BlockState internal)
    Gets the base Block of this BlockState.
    static String
    getCommandString(net.minecraft.world.level.block.state.BlockState internal)
    Gets the blockstate bracket handler syntax for this BlockState.
    static float
    getDestroySpeed(net.minecraft.world.level.block.state.BlockState internal)
    Gets the hardness of this BlockState.
    static int
    getLightEmission(net.minecraft.world.level.block.state.BlockState internal)
    Gets the light level of this BlockState
    static Map<String,String>
    getProperties(net.minecraft.world.level.block.state.BlockState internal)
    Gets the properties of this BlockState.
    static List<String>
    getPropertyNames(net.minecraft.world.level.block.state.BlockState internal)
    Gets the names of the properties of this BlockState.
    static String
    getPropertyValue(net.minecraft.world.level.block.state.BlockState internal, String name)
    Gets the value of the given property.
    static net.minecraft.world.level.block.SoundType
    getSoundType(net.minecraft.world.level.block.state.BlockState internal)
    Gets the sound type of this BlockState.
    static boolean
    hasBlockEntity(net.minecraft.world.level.block.state.BlockState internal)
    Checks whether this BlockState has a BlockEntity.
    static boolean
    hasProperty(net.minecraft.world.level.block.state.BlockState internal, String name)
    Checks whether this BlockState has the given property.
    static boolean
    isRandomlyTicking(net.minecraft.world.level.block.state.BlockState internal)
    Checks whether this BlockState ticks randomly.
    static boolean
    isSignalSource(net.minecraft.world.level.block.state.BlockState internal)
    Checks whether this BlockState can provide Redstone Power
    static boolean
    matches(net.minecraft.world.level.block.state.BlockState internal, net.minecraft.world.level.block.state.BlockState other)
    Checks if this BlockState matches another BlockState.
    static net.minecraft.world.level.block.state.BlockState
    rotate(net.minecraft.world.level.block.state.BlockState internal, net.minecraft.world.level.block.Rotation rotation)
    Rotates this BlockState by the given Rotation.
    static void
    setDestroySpeed(net.minecraft.world.level.block.state.BlockState internal, float destroySpeed)
    Sets the destroy speed of this BlockState.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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)
      Gets the sound type of this BlockState.
      Returns:
      The sound type of this BlockState.
    • 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)
      Rotates this BlockState by the given Rotation.
      Parameters:
      rotation - The Rotation to rotate this BlockState by.
      Returns:
      The rotated BlockState.
    • getBlock

      public static net.minecraft.world.level.block.Block getBlock(net.minecraft.world.level.block.state.BlockState internal)
      Gets the base Block of this BlockState. The Block will 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 a BlockEntity.
      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

      public static String asString(net.minecraft.world.level.block.state.BlockState internal)
      Gets the string representation of this BlockState.
      Returns:
      The string representation of this BlockState.
    • 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

      public static String getCommandString(net.minecraft.world.level.block.state.BlockState internal)
      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)
      Gets the CTBlockIngredient representation of this BlockState.
      Returns:
      The CTBlockIngredient representation of this BlockState.
    • asList

      public static CTBlockIngredient asList(net.minecraft.world.level.block.state.BlockState internal, CTBlockIngredient other)
      Combines this BlockState with another BlockState to create a new CTBlockIngredient.
      Parameters:
      other - The other BlockState to combine with.
      Returns:
      The combined CTBlockIngredient.
    • matches

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

      public static boolean equals(net.minecraft.world.level.block.state.BlockState internal, net.minecraft.world.level.block.state.BlockState other)
      Checks if this BlockState equals another BlockState.
      Parameters:
      other - The other BlockState to check against.
      Returns:
      True if this BlockState equals the other BlockState. False otherwise.