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 Summary
FieldsModifier and TypeFieldDescriptionstatic final WoodTypestatic final WoodTypestatic final WoodTypestatic final WoodTypestatic final com.mojang.serialization.Codec<WoodType> static final WoodTypestatic final WoodTypeprivate final SoundEventThe field for thefenceGateCloserecord component.private final SoundEventThe field for thefenceGateOpenrecord component.private final SoundTypeThe field for thehangingSignSoundTyperecord component.static final WoodTypestatic final WoodTypeprivate final StringThe field for thenamerecord component.static final WoodTypestatic final WoodTypeprivate final BlockSetTypeThe field for thesetTyperecord component.private final SoundTypeThe field for thesoundTyperecord component.static final WoodTypestatic final WoodType -
Constructor Summary
ConstructorsConstructorDescriptionWoodType(String p_273766_, BlockSetType p_273104_) WoodType(String name, BlockSetType setType, SoundType soundType, SoundType hangingSignSoundType, SoundEvent fenceGateClose, SoundEvent fenceGateOpen) Creates an instance of aWoodTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefenceGateCloserecord component.Returns the value of thefenceGateOpenrecord component.Returns the value of thehangingSignSoundTyperecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.static WoodTypesetType()Returns the value of thesetTyperecord component.Returns the value of thesoundTyperecord component.final StringtoString()Returns a string representation of this record class.values()
-
Field Details
-
name
The field for thenamerecord component. -
setType
The field for thesetTyperecord component. -
soundType
The field for thesoundTyperecord component. -
hangingSignSoundType
The field for thehangingSignSoundTyperecord component. -
fenceGateClose
The field for thefenceGateCloserecord component. -
fenceGateOpen
The field for thefenceGateOpenrecord component. -
TYPES
-
CODEC
-
OAK
-
SPRUCE
-
BIRCH
-
ACACIA
-
CHERRY
-
JUNGLE
-
DARK_OAK
-
PALE_OAK
-
CRIMSON
-
WARPED
-
MANGROVE
-
BAMBOO
-
-
Constructor Details
-
WoodType
-
WoodType
public WoodType(String name, BlockSetType setType, SoundType soundType, SoundType hangingSignSoundType, SoundEvent fenceGateClose, SoundEvent fenceGateOpen) Creates an instance of aWoodTyperecord class.- Parameters:
name- the value for thenamerecord componentsetType- the value for thesetTyperecord componentsoundType- the value for thesoundTyperecord componenthangingSignSoundType- the value for thehangingSignSoundTyperecord componentfenceGateClose- the value for thefenceGateCloserecord componentfenceGateOpen- the value for thefenceGateOpenrecord component
-
-
Method Details
-
register
-
values
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
setType
Returns the value of thesetTyperecord component.- Returns:
- the value of the
setTyperecord component
-
soundType
Returns the value of thesoundTyperecord component.- Returns:
- the value of the
soundTyperecord component
-
hangingSignSoundType
Returns the value of thehangingSignSoundTyperecord component.- Returns:
- the value of the
hangingSignSoundTyperecord component
-
fenceGateClose
Returns the value of thefenceGateCloserecord component.- Returns:
- the value of the
fenceGateCloserecord component
-
fenceGateOpen
Returns the value of thefenceGateOpenrecord component.- Returns:
- the value of the
fenceGateOpenrecord component
-