Record Class EntityRegistry.SpawnPlacement
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.data.registry.EntityRegistry.SpawnPlacement
- Enclosing class:
EntityRegistry
public static record EntityRegistry.SpawnPlacement(ExtensibleCodecBase.Entry<net.minecraft.world.entity.SpawnPlacementType> placementType, net.minecraft.world.level.levelgen.Heightmap.Types heightmap, ExtensibleCodecBase.Entry<ExtensibleSpawnPredicate.Type> spawnPredicate)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionSpawnPlacement(ExtensibleCodecBase.Entry<net.minecraft.world.entity.SpawnPlacementType> placementType, net.minecraft.world.level.levelgen.Heightmap.Types heightmap, ExtensibleCodecBase.Entry<ExtensibleSpawnPredicate.Type> spawnPredicate) Creates an instance of aSpawnPlacementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.level.levelgen.Heightmap.TypesReturns the value of theheightmaprecord component.ExtensibleCodecBase.Entry<net.minecraft.world.entity.SpawnPlacementType> Returns the value of theplacementTyperecord component.Returns the value of thespawnPredicaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SpawnPlacement
public SpawnPlacement(ExtensibleCodecBase.Entry<net.minecraft.world.entity.SpawnPlacementType> placementType, net.minecraft.world.level.levelgen.Heightmap.Types heightmap, ExtensibleCodecBase.Entry<ExtensibleSpawnPredicate.Type> spawnPredicate) Creates an instance of aSpawnPlacementrecord class.- Parameters:
placementType- the value for theplacementTyperecord componentheightmap- the value for theheightmaprecord componentspawnPredicate- the value for thespawnPredicaterecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
placementType
Returns the value of theplacementTyperecord component.- Returns:
- the value of the
placementTyperecord component
-
heightmap
public net.minecraft.world.level.levelgen.Heightmap.Types heightmap()Returns the value of theheightmaprecord component.- Returns:
- the value of the
heightmaprecord component
-
spawnPredicate
Returns the value of thespawnPredicaterecord component.- Returns:
- the value of the
spawnPredicaterecord component
-