Record Class BlockSetType
java.lang.Object
java.lang.Record
net.minecraft.world.level.block.state.properties.BlockSetType
public record BlockSetType(String name, boolean canOpenByHand, boolean canOpenByWindCharge, boolean canButtonBeActivatedByArrows, BlockSetType.PressurePlateSensitivity pressurePlateSensitivity, SoundType soundType, SoundEvent doorClose, SoundEvent doorOpen, SoundEvent trapdoorClose, SoundEvent trapdoorOpen, SoundEvent pressurePlateClickOff, SoundEvent pressurePlateClickOn, SoundEvent buttonClickOff, SoundEvent buttonClickOn)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BlockSetTypestatic final BlockSetTypestatic final BlockSetTypeprivate final SoundEventThe field for thebuttonClickOffrecord component.private final SoundEventThe field for thebuttonClickOnrecord component.private final booleanThe field for thecanButtonBeActivatedByArrowsrecord component.private final booleanThe field for thecanOpenByHandrecord component.private final booleanThe field for thecanOpenByWindChargerecord component.static final BlockSetTypestatic final com.mojang.serialization.Codec<BlockSetType> static final BlockSetTypestatic final BlockSetTypestatic final BlockSetTypeprivate final SoundEventThe field for thedoorCloserecord component.private final SoundEventThe field for thedoorOpenrecord component.static final BlockSetTypestatic final BlockSetTypestatic final BlockSetTypestatic final BlockSetTypeprivate final StringThe field for thenamerecord component.static final BlockSetTypestatic final BlockSetTypestatic final BlockSetTypeprivate final SoundEventThe field for thepressurePlateClickOffrecord component.private final SoundEventThe field for thepressurePlateClickOnrecord component.private final BlockSetType.PressurePlateSensitivityThe field for thepressurePlateSensitivityrecord component.private final SoundTypeThe field for thesoundTyperecord component.static final BlockSetTypestatic final BlockSetTypeprivate final SoundEventThe field for thetrapdoorCloserecord component.private final SoundEventThe field for thetrapdoorOpenrecord component.private static final Map<String, BlockSetType> static final BlockSetType -
Constructor Summary
ConstructorsConstructorDescriptionBlockSetType(String p_272860_) BlockSetType(String name, boolean canOpenByHand, boolean canOpenByWindCharge, boolean canButtonBeActivatedByArrows, BlockSetType.PressurePlateSensitivity pressurePlateSensitivity, SoundType soundType, SoundEvent doorClose, SoundEvent doorOpen, SoundEvent trapdoorClose, SoundEvent trapdoorOpen, SoundEvent pressurePlateClickOff, SoundEvent pressurePlateClickOn, SoundEvent buttonClickOff, SoundEvent buttonClickOn) Creates an instance of aBlockSetTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebuttonClickOffrecord component.Returns the value of thebuttonClickOnrecord component.booleanReturns the value of thecanButtonBeActivatedByArrowsrecord component.booleanReturns the value of thecanOpenByHandrecord component.booleanReturns the value of thecanOpenByWindChargerecord component.Returns the value of thedoorCloserecord component.doorOpen()Returns the value of thedoorOpenrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of thepressurePlateClickOffrecord component.Returns the value of thepressurePlateClickOnrecord component.Returns the value of thepressurePlateSensitivityrecord component.static BlockSetTyperegister(BlockSetType value) Returns the value of thesoundTyperecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetrapdoorCloserecord component.Returns the value of thetrapdoorOpenrecord component.static Stream<BlockSetType> values()
-
Field Details
-
name
The field for thenamerecord component. -
canOpenByHand
private final boolean canOpenByHandThe field for thecanOpenByHandrecord component. -
canOpenByWindCharge
private final boolean canOpenByWindChargeThe field for thecanOpenByWindChargerecord component. -
canButtonBeActivatedByArrows
private final boolean canButtonBeActivatedByArrowsThe field for thecanButtonBeActivatedByArrowsrecord component. -
pressurePlateSensitivity
The field for thepressurePlateSensitivityrecord component. -
soundType
The field for thesoundTyperecord component. -
doorClose
The field for thedoorCloserecord component. -
doorOpen
The field for thedoorOpenrecord component. -
trapdoorClose
The field for thetrapdoorCloserecord component. -
trapdoorOpen
The field for thetrapdoorOpenrecord component. -
pressurePlateClickOff
The field for thepressurePlateClickOffrecord component. -
pressurePlateClickOn
The field for thepressurePlateClickOnrecord component. -
buttonClickOff
The field for thebuttonClickOffrecord component. -
buttonClickOn
The field for thebuttonClickOnrecord component. -
TYPES
-
CODEC
-
IRON
-
COPPER
-
GOLD
-
STONE
-
POLISHED_BLACKSTONE
-
OAK
-
SPRUCE
-
BIRCH
-
ACACIA
-
CHERRY
-
JUNGLE
-
DARK_OAK
-
PALE_OAK
-
CRIMSON
-
WARPED
-
MANGROVE
-
BAMBOO
-
-
Constructor Details
-
BlockSetType
-
BlockSetType
public BlockSetType(String name, boolean canOpenByHand, boolean canOpenByWindCharge, boolean canButtonBeActivatedByArrows, BlockSetType.PressurePlateSensitivity pressurePlateSensitivity, SoundType soundType, SoundEvent doorClose, SoundEvent doorOpen, SoundEvent trapdoorClose, SoundEvent trapdoorOpen, SoundEvent pressurePlateClickOff, SoundEvent pressurePlateClickOn, SoundEvent buttonClickOff, SoundEvent buttonClickOn) Creates an instance of aBlockSetTyperecord class.- Parameters:
name- the value for thenamerecord componentcanOpenByHand- the value for thecanOpenByHandrecord componentcanOpenByWindCharge- the value for thecanOpenByWindChargerecord componentcanButtonBeActivatedByArrows- the value for thecanButtonBeActivatedByArrowsrecord componentpressurePlateSensitivity- the value for thepressurePlateSensitivityrecord componentsoundType- the value for thesoundTyperecord componentdoorClose- the value for thedoorCloserecord componentdoorOpen- the value for thedoorOpenrecord componenttrapdoorClose- the value for thetrapdoorCloserecord componenttrapdoorOpen- the value for thetrapdoorOpenrecord componentpressurePlateClickOff- the value for thepressurePlateClickOffrecord componentpressurePlateClickOn- the value for thepressurePlateClickOnrecord componentbuttonClickOff- the value for thebuttonClickOffrecord componentbuttonClickOn- the value for thebuttonClickOnrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
canOpenByHand
public boolean canOpenByHand()Returns the value of thecanOpenByHandrecord component.- Returns:
- the value of the
canOpenByHandrecord component
-
canOpenByWindCharge
public boolean canOpenByWindCharge()Returns the value of thecanOpenByWindChargerecord component.- Returns:
- the value of the
canOpenByWindChargerecord component
-
canButtonBeActivatedByArrows
public boolean canButtonBeActivatedByArrows()Returns the value of thecanButtonBeActivatedByArrowsrecord component.- Returns:
- the value of the
canButtonBeActivatedByArrowsrecord component
-
pressurePlateSensitivity
Returns the value of thepressurePlateSensitivityrecord component.- Returns:
- the value of the
pressurePlateSensitivityrecord component
-
soundType
Returns the value of thesoundTyperecord component.- Returns:
- the value of the
soundTyperecord component
-
doorClose
Returns the value of thedoorCloserecord component.- Returns:
- the value of the
doorCloserecord component
-
doorOpen
Returns the value of thedoorOpenrecord component.- Returns:
- the value of the
doorOpenrecord component
-
trapdoorClose
Returns the value of thetrapdoorCloserecord component.- Returns:
- the value of the
trapdoorCloserecord component
-
trapdoorOpen
Returns the value of thetrapdoorOpenrecord component.- Returns:
- the value of the
trapdoorOpenrecord component
-
pressurePlateClickOff
Returns the value of thepressurePlateClickOffrecord component.- Returns:
- the value of the
pressurePlateClickOffrecord component
-
pressurePlateClickOn
Returns the value of thepressurePlateClickOnrecord component.- Returns:
- the value of the
pressurePlateClickOnrecord component
-
buttonClickOff
Returns the value of thebuttonClickOffrecord component.- Returns:
- the value of the
buttonClickOffrecord component
-
buttonClickOn
Returns the value of thebuttonClickOnrecord component.- Returns:
- the value of the
buttonClickOnrecord component
-