Record Class WoodType

java.lang.Object
java.lang.Record
net.minecraft.world.level.block.state.properties.WoodType

public record WoodType(String name, BlockSetType setType, SoundType soundType, SoundType hangingSignSoundType, SoundEvent fenceGateClose, SoundEvent fenceGateOpen) extends Record
  • Field Details

    • name

      private final String name
      The field for the name record component.
    • setType

      private final BlockSetType setType
      The field for the setType record component.
    • soundType

      private final SoundType soundType
      The field for the soundType record component.
    • hangingSignSoundType

      private final SoundType hangingSignSoundType
      The field for the hangingSignSoundType record component.
    • fenceGateClose

      private final SoundEvent fenceGateClose
      The field for the fenceGateClose record component.
    • fenceGateOpen

      private final SoundEvent fenceGateOpen
      The field for the fenceGateOpen record component.
    • TYPES

      private static final Map<String,WoodType> TYPES
    • CODEC

      public static final com.mojang.serialization.Codec<WoodType> CODEC
    • OAK

      public static final WoodType OAK
    • SPRUCE

      public static final WoodType SPRUCE
    • BIRCH

      public static final WoodType BIRCH
    • ACACIA

      public static final WoodType ACACIA
    • CHERRY

      public static final WoodType CHERRY
    • JUNGLE

      public static final WoodType JUNGLE
    • DARK_OAK

      public static final WoodType DARK_OAK
    • CRIMSON

      public static final WoodType CRIMSON
    • WARPED

      public static final WoodType WARPED
    • MANGROVE

      public static final WoodType MANGROVE
    • BAMBOO

      public static final WoodType BAMBOO
  • Constructor Details

    • WoodType

      public WoodType(String p_273766_, BlockSetType p_273104_)
    • WoodType

      public WoodType(String name, BlockSetType setType, SoundType soundType, SoundType hangingSignSoundType, SoundEvent fenceGateClose, SoundEvent fenceGateOpen)
      Creates an instance of a WoodType record class.
      Parameters:
      name - the value for the name record component
      setType - the value for the setType record component
      soundType - the value for the soundType record component
      hangingSignSoundType - the value for the hangingSignSoundType record component
      fenceGateClose - the value for the fenceGateClose record component
      fenceGateOpen - the value for the fenceGateOpen record component
  • Method Details

    • register

      public static WoodType register(WoodType p_61845_)
    • values

      public static Stream<WoodType> values()
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • setType

      public BlockSetType setType()
      Returns the value of the setType record component.
      Returns:
      the value of the setType record component
    • soundType

      public SoundType soundType()
      Returns the value of the soundType record component.
      Returns:
      the value of the soundType record component
    • hangingSignSoundType

      public SoundType hangingSignSoundType()
      Returns the value of the hangingSignSoundType record component.
      Returns:
      the value of the hangingSignSoundType record component
    • fenceGateClose

      public SoundEvent fenceGateClose()
      Returns the value of the fenceGateClose record component.
      Returns:
      the value of the fenceGateClose record component
    • fenceGateOpen

      public SoundEvent fenceGateOpen()
      Returns the value of the fenceGateOpen record component.
      Returns:
      the value of the fenceGateOpen record component