Package net.minecraft.entity.spawn
Record Class SpawnContext
java.lang.Object
java.lang.Record
net.minecraft.entity.spawn.SpawnContext
- Record Components:
pos-world-environmentAttributes-biome-
public record SpawnContext(BlockPos pos, ServerWorldAccess world, EnvironmentAttributeAccess environmentAttributes, RegistryEntry<Biome> biome)
extends Record
- Mappings:
Namespace Name named net/minecraft/entity/spawn/SpawnContextintermediary net/minecraft/class_10701official deqnamed posintermediary comp_3580official anamed worldintermediary comp_3581official bnamed environmentAttributesintermediary comp_5217official cnamed biomeintermediary comp_3582official d
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RegistryEntry<Biome> The field for thebiomerecord component.private final EnvironmentAttributeAccessThe field for theenvironmentAttributesrecord component.private final BlockPosThe field for theposrecord component.private final ServerWorldAccessThe field for theworldrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSpawnContext(BlockPos pos, ServerWorldAccess world, EnvironmentAttributeAccess environmentAttributes, RegistryEntry<Biome> biome) Creates an instance of aSpawnContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbiome()Returns the value of thebiomerecord component.Returns the value of theenvironmentAttributesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static SpawnContextof(ServerWorldAccess world, BlockPos pos) pos()Returns the value of theposrecord component.final StringtoString()Returns a string representation of this record class.world()Returns the value of theworldrecord component.
-
Field Details
-
pos
The field for theposrecord component. -
world
The field for theworldrecord component. -
environmentAttributes
The field for theenvironmentAttributesrecord component. -
biome
The field for thebiomerecord component.
-
-
Constructor Details
-
SpawnContext
public SpawnContext(BlockPos pos, ServerWorldAccess world, EnvironmentAttributeAccess environmentAttributes, RegistryEntry<Biome> biome) Creates an instance of aSpawnContextrecord class.- Parameters:
pos- the value for theposrecord componentworld- the value for theworldrecord componentenvironmentAttributes- the value for theenvironmentAttributesrecord componentbiome- the value for thebiomerecord component
-
-
Method Details
-
of
- Mappings:
Namespace Name Mixin selector named ofLnet/minecraft/entity/spawn/SpawnContext;of(Lnet/minecraft/world/ServerWorldAccess;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/entity/spawn/SpawnContext;intermediary method_67169Lnet/minecraft/class_10701;method_67169(Lnet/minecraft/class_5425;Lnet/minecraft/class_2338;)Lnet/minecraft/class_10701;official aLdeq;a(Ldvx;Lis;)Ldeq;
-
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). -
pos
Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
world
Returns the value of theworldrecord component.- Returns:
- the value of the
worldrecord component
-
environmentAttributes
Returns the value of theenvironmentAttributesrecord component.- Returns:
- the value of the
environmentAttributesrecord component
-
biome
Returns the value of thebiomerecord component.- Returns:
- the value of the
biomerecord component
-