Record Class UtilMappings
java.lang.Object
java.lang.Record
org.geysermc.geyser.registry.type.UtilMappings
public record UtilMappings(List<net.kyori.adventure.key.Key> gameMasterBlocks, List<net.kyori.adventure.key.Key> dangerousBlockEntities, List<net.kyori.adventure.key.Key> dangerousEntities)
extends Record
Used to load and store the
mappings/util.json file. When adding new fields to util mappings, be sure to create a proper registry for them
in Registries. Use RegistryLoaders.UTIL_MAPPINGS_KEYS (or create a new loader if loading something
other than keys).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSimply gets a field of the loadedUtilMappingsobject. -
Constructor Summary
ConstructorsConstructorDescriptionUtilMappings(List<net.kyori.adventure.key.Key> gameMasterBlocks, List<net.kyori.adventure.key.Key> dangerousBlockEntities, List<net.kyori.adventure.key.Key> dangerousEntities) Creates an instance of aUtilMappingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionList<net.kyori.adventure.key.Key>Returns the value of thedangerousBlockEntitiesrecord component.List<net.kyori.adventure.key.Key>Returns the value of thedangerousEntitiesrecord component.final booleanIndicates whether some other object is "equal to" this one.List<net.kyori.adventure.key.Key>Returns the value of thegameMasterBlocksrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UtilMappings
public UtilMappings(List<net.kyori.adventure.key.Key> gameMasterBlocks, List<net.kyori.adventure.key.Key> dangerousBlockEntities, List<net.kyori.adventure.key.Key> dangerousEntities) Creates an instance of aUtilMappingsrecord class.- Parameters:
gameMasterBlocks- the value for thegameMasterBlocksrecord componentdangerousBlockEntities- the value for thedangerousBlockEntitiesrecord componentdangerousEntities- the value for thedangerousEntitiesrecord 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). -
gameMasterBlocks
Returns the value of thegameMasterBlocksrecord component.- Returns:
- the value of the
gameMasterBlocksrecord component
-
dangerousBlockEntities
Returns the value of thedangerousBlockEntitiesrecord component.- Returns:
- the value of the
dangerousBlockEntitiesrecord component
-
dangerousEntities
Returns the value of thedangerousEntitiesrecord component.- Returns:
- the value of the
dangerousEntitiesrecord component
-