Package net.minecraft.entity.spawn
Record Class SpawnContext
java.lang.Object
java.lang.Record
net.minecraft.entity.spawn.SpawnContext
- Record Components:
- pos-
- world-
- biome-
public record SpawnContext(BlockPos pos, ServerWorldAccess world, RegistryEntry<Biome> biome)
extends Record
- Mappings:
- Namespace - Name - named - net/minecraft/entity/spawn/SpawnContext- intermediary - net/minecraft/class_10701- official - cuo- named - pos- intermediary - comp_3580- official - a- named - world- intermediary - comp_3581- official - b- named - biome- intermediary - comp_3582- official - c
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final RegistryEntry<Biome> The field for thebiomerecord component.private final BlockPosThe field for theposrecord component.private final ServerWorldAccessThe field for theworldrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionSpawnContext(BlockPos blockPos, ServerWorldAccess serverWorldAccess, RegistryEntry<Biome> registryEntry) 
- 
Method SummaryModifier and TypeMethodDescriptionbiome()Returns the value of thebiomerecord 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
- 
Constructor Details- 
SpawnContextpublic SpawnContext(BlockPos blockPos, ServerWorldAccess serverWorldAccess, RegistryEntry<Biome> registryEntry) 
 
- 
- 
Method Details- 
of- Mappings:
- Namespace - Name - Mixin selector - named - of- Lnet/minecraft/entity/spawn/SpawnContext;of(Lnet/minecraft/world/ServerWorldAccess;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/entity/spawn/SpawnContext;- intermediary - method_67169- Lnet/minecraft/class_10701;method_67169(Lnet/minecraft/class_5425;Lnet/minecraft/class_2338;)Lnet/minecraft/class_10701;- official - a- Lcuo;a(Ldla;Liw;)Lcuo;
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
posReturns the value of theposrecord component.- Returns:
- the value of the posrecord component
 
- 
worldReturns the value of theworldrecord component.- Returns:
- the value of the worldrecord component
 
- 
biomeReturns the value of thebiomerecord component.- Returns:
- the value of the biomerecord component
 
 
-