Record Class CustomBlockMapping
java.lang.Object
java.lang.Record
org.geysermc.geyser.registry.mappings.util.CustomBlockMapping
- Record Components:
data- The custom block datastates- The custom block state mappingsjavaIdentifier- The java identifier of the blockoverrideItem- Whether the custom block should override the java item
public record CustomBlockMapping(@NonNull org.geysermc.geyser.api.block.custom.CustomBlockData data, @NonNull Map<String,org.geysermc.geyser.api.block.custom.CustomBlockState> states, @NonNull String javaIdentifier, boolean overrideItem)
extends Record
This class is used to store a custom block mappings, which contain all of the
data required to register a custom block that overrides a group of java block
states.
-
Constructor Summary
ConstructorsConstructorDescriptionCustomBlockMapping(@NonNull org.geysermc.geyser.api.block.custom.CustomBlockData data, @NonNull Map<String, org.geysermc.geyser.api.block.custom.CustomBlockState> states, @NonNull String javaIdentifier, boolean overrideItem) Creates an instance of aCustomBlockMappingrecord class. -
Method Summary
Modifier and TypeMethodDescription@NonNull org.geysermc.geyser.api.block.custom.CustomBlockDatadata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NonNull StringReturns the value of thejavaIdentifierrecord component.booleanReturns the value of theoverrideItemrecord component.states()Returns the value of thestatesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CustomBlockMapping
public CustomBlockMapping(@NonNull org.geysermc.geyser.api.block.custom.CustomBlockData data, @NonNull Map<String, org.geysermc.geyser.api.block.custom.CustomBlockState> states, @NonNull String javaIdentifier, boolean overrideItem) Creates an instance of aCustomBlockMappingrecord class.- Parameters:
data- the value for thedatarecord componentstates- the value for thestatesrecord componentjavaIdentifier- the value for thejavaIdentifierrecord componentoverrideItem- the value for theoverrideItemrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
data
public @NonNull org.geysermc.geyser.api.block.custom.CustomBlockData data()Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-
states
Returns the value of thestatesrecord component.- Returns:
- the value of the
statesrecord component
-
javaIdentifier
Returns the value of thejavaIdentifierrecord component.- Returns:
- the value of the
javaIdentifierrecord component
-
overrideItem
public boolean overrideItem()Returns the value of theoverrideItemrecord component.- Returns:
- the value of the
overrideItemrecord component
-