Record Class VanillaBlockCodecs.Button
java.lang.Object
java.lang.Record
net.rebel459.unified.api.registry.VanillaBlockCodecs.Button
- Enclosing class:
VanillaBlockCodecs
public static record VanillaBlockCodecs.Button(net.minecraft.world.level.block.state.properties.BlockSetType blockSetType, int ticksToStayPressed)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<VanillaBlockCodecs.Button> -
Constructor Summary
ConstructorsConstructorDescriptionButton(net.minecraft.world.level.block.state.properties.BlockSetType blockSetType, int ticksToStayPressed) Creates an instance of aButtonrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.state.properties.BlockSetTypeReturns the value of theblockSetTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theticksToStayPressedrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
Button
public Button(net.minecraft.world.level.block.state.properties.BlockSetType blockSetType, int ticksToStayPressed) Creates an instance of aButtonrecord class.- Parameters:
blockSetType- the value for theblockSetTyperecord componentticksToStayPressed- the value for theticksToStayPressedrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
blockSetType
public net.minecraft.world.level.block.state.properties.BlockSetType blockSetType()Returns the value of theblockSetTyperecord component.- Returns:
- the value of the
blockSetTyperecord component
-
ticksToStayPressed
public int ticksToStayPressed()Returns the value of theticksToStayPressedrecord component.- Returns:
- the value of the
ticksToStayPressedrecord component
-