Record Class CustomBlockStateMapping
java.lang.Object
java.lang.Record
org.geysermc.geyser.registry.mappings.util.CustomBlockStateMapping
- Record Components:
state- The state of the blockextendedCollisionBox- The extended collision box of the block
public record CustomBlockStateMapping(@NonNull org.geysermc.geyser.api.block.custom.CustomBlockState state, org.geysermc.geyser.api.block.custom.component.BoxComponent extendedCollisionBox)
extends Record
This class is used to store a custom block state mapping, which contains custom
block states and a potenially null extended collision box
-
Constructor Summary
ConstructorsConstructorDescriptionCustomBlockStateMapping(@NonNull org.geysermc.geyser.api.block.custom.CustomBlockState state, org.geysermc.geyser.api.block.custom.component.BoxComponent extendedCollisionBox)Creates an instance of aCustomBlockStateMappingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.org.geysermc.geyser.api.block.custom.component.BoxComponentReturns the value of theextendedCollisionBoxrecord component.inthashCode()Returns a hash code value for this object.@NonNull org.geysermc.geyser.api.block.custom.CustomBlockStatestate()Returns the value of thestaterecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
CustomBlockStateMapping
public CustomBlockStateMapping(@NonNull org.geysermc.geyser.api.block.custom.CustomBlockState state, org.geysermc.geyser.api.block.custom.component.BoxComponent extendedCollisionBox)Creates an instance of aCustomBlockStateMappingrecord class.- Parameters:
state- the value for thestaterecord componentextendedCollisionBox- the value for theextendedCollisionBoxrecord component
-
-
Method Details
-
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). -
state
public @NonNull org.geysermc.geyser.api.block.custom.CustomBlockState state()Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
extendedCollisionBox
public org.geysermc.geyser.api.block.custom.component.BoxComponent extendedCollisionBox()Returns the value of theextendedCollisionBoxrecord component.- Returns:
- the value of the
extendedCollisionBoxrecord component
-