Record Class BlockTransformer.BlockTransformData

java.lang.Object
java.lang.Record
net.minecraft.core.component.BlockTransformer.BlockTransformData
Enclosing class:
BlockTransformer

public static record BlockTransformer.BlockTransformData(Holder<BlockStateProvider> blockStateProvider, Holder<SoundEvent> sound, BlockTransformer.TransformParticle particle, List<Direction> disallowedFaces, Optional<ResourceKey<LootTable>> loot, BlockTransformer.DropStrategy dropStrategy, boolean updateFromNeighbors, BlockTransformer.TransformType transformType, boolean consumeOnUse, int itemDamagePerUse) extends Record
  • Field Details

  • Constructor Details

    • BlockTransformData

      public BlockTransformData(Holder<BlockStateProvider> blockStateProvider, Holder<SoundEvent> sound, BlockTransformer.TransformParticle particle, List<Direction> disallowedFaces, Optional<ResourceKey<LootTable>> loot, BlockTransformer.DropStrategy dropStrategy, boolean updateFromNeighbors, BlockTransformer.TransformType transformType, boolean consumeOnUse, int itemDamagePerUse)
      Creates an instance of a BlockTransformData record class.
      Parameters:
      blockStateProvider - the value for the blockStateProvider record component
      sound - the value for the sound record component
      particle - the value for the particle record component
      disallowedFaces - the value for the disallowedFaces record component
      loot - the value for the loot record component
      dropStrategy - the value for the dropStrategy record component
      updateFromNeighbors - the value for the updateFromNeighbors record component
      transformType - the value for the transformType record component
      consumeOnUse - the value for the consumeOnUse record component
      itemDamagePerUse - the value for the itemDamagePerUse record component
  • Method Details

    • builder

      public static BlockTransformer.BlockTransformData.Builder builder(Holder<BlockStateProvider> targetStateProvider)
    • builder

      public static BlockTransformer.BlockTransformData.Builder builder(BlockStateProvider targetStateProvider)
    • builder

      public static BlockTransformer.BlockTransformData.Builder builder(BlockPredicate predicate, Block block)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • blockStateProvider

      public Holder<BlockStateProvider> blockStateProvider()
      Returns the value of the blockStateProvider record component.
      Returns:
      the value of the blockStateProvider record component
    • sound

      public Holder<SoundEvent> sound()
      Returns the value of the sound record component.
      Returns:
      the value of the sound record component
    • particle

      Returns the value of the particle record component.
      Returns:
      the value of the particle record component
    • disallowedFaces

      public List<Direction> disallowedFaces()
      Returns the value of the disallowedFaces record component.
      Returns:
      the value of the disallowedFaces record component
    • loot

      public Optional<ResourceKey<LootTable>> loot()
      Returns the value of the loot record component.
      Returns:
      the value of the loot record component
    • dropStrategy

      public BlockTransformer.DropStrategy dropStrategy()
      Returns the value of the dropStrategy record component.
      Returns:
      the value of the dropStrategy record component
    • updateFromNeighbors

      public boolean updateFromNeighbors()
      Returns the value of the updateFromNeighbors record component.
      Returns:
      the value of the updateFromNeighbors record component
    • transformType

      public BlockTransformer.TransformType transformType()
      Returns the value of the transformType record component.
      Returns:
      the value of the transformType record component
    • consumeOnUse

      public boolean consumeOnUse()
      Returns the value of the consumeOnUse record component.
      Returns:
      the value of the consumeOnUse record component
    • itemDamagePerUse

      public int itemDamagePerUse()
      Returns the value of the itemDamagePerUse record component.
      Returns:
      the value of the itemDamagePerUse record component