Package net.minecraft.world
Record Class MobSpawnerEntry
java.lang.Object
java.lang.Record
net.minecraft.world.MobSpawnerEntry
- Record Components:
entity
-customSpawnRules
-
public record MobSpawnerEntry(NbtCompound entity, Optional<MobSpawnerEntry.CustomSpawnRules> customSpawnRules)
extends Record
- Mappings:
Namespace Name official cam
intermediary net/minecraft/class_1952
named net/minecraft/world/MobSpawnerEntry
official d
intermediary comp_64
named entity
official e
intermediary comp_65
named customSpawnRules
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<MobSpawnerEntry>
private final Optional<MobSpawnerEntry.CustomSpawnRules>
The field for thecustomSpawnRules
record component.static final com.mojang.serialization.Codec<DataPool<MobSpawnerEntry>>
static final String
private final NbtCompound
The field for theentity
record component. -
Constructor Summary
ConstructorDescriptionMobSpawnerEntry
(NbtCompound nbtCompound, Optional<MobSpawnerEntry.CustomSpawnRules> optional) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecustomSpawnRules
record component.entity()
Returns the value of theentity
record component.final boolean
Indicates whether some other object is "equal to" this one.getNbt()
final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
entity
The field for theentity
record component. -
customSpawnRules
The field for thecustomSpawnRules
record component. -
CODEC
- Mappings:
Namespace Name Mixin selector official a
Lcam;a:Lcom/mojang/serialization/Codec;
intermediary field_34460
Lnet/minecraft/class_1952;field_34460:Lcom/mojang/serialization/Codec;
named CODEC
Lnet/minecraft/world/MobSpawnerEntry;CODEC:Lcom/mojang/serialization/Codec;
-
DATA_POOL_CODEC
- Mappings:
Namespace Name Mixin selector official b
Lcam;b:Lcom/mojang/serialization/Codec;
intermediary field_34461
Lnet/minecraft/class_1952;field_34461:Lcom/mojang/serialization/Codec;
named DATA_POOL_CODEC
Lnet/minecraft/world/MobSpawnerEntry;DATA_POOL_CODEC:Lcom/mojang/serialization/Codec;
-
DEFAULT_ENTITY_ID
- See Also:
- Mappings:
Namespace Name Mixin selector official c
Lcam;c:Ljava/lang/String;
intermediary field_30977
Lnet/minecraft/class_1952;field_30977:Ljava/lang/String;
named DEFAULT_ENTITY_ID
Lnet/minecraft/world/MobSpawnerEntry;DEFAULT_ENTITY_ID:Ljava/lang/String;
-
-
Constructor Details
-
MobSpawnerEntry
public MobSpawnerEntry() -
MobSpawnerEntry
public MobSpawnerEntry(NbtCompound nbtCompound, Optional<MobSpawnerEntry.CustomSpawnRules> optional)
-
-
Method Details
-
getNbt
- Mappings:
Namespace Name Mixin selector official a
Lcam;a()Lob;
intermediary method_38093
Lnet/minecraft/class_1952;method_38093()Lnet/minecraft/class_2487;
named getNbt
Lnet/minecraft/world/MobSpawnerEntry;getNbt()Lnet/minecraft/nbt/NbtCompound;
-
getCustomSpawnRules
- Mappings:
Namespace Name Mixin selector official b
Lcam;b()Ljava/util/Optional;
intermediary method_38097
Lnet/minecraft/class_1952;method_38097()Ljava/util/Optional;
named getCustomSpawnRules
Lnet/minecraft/world/MobSpawnerEntry;getCustomSpawnRules()Ljava/util/Optional;
-
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)
. -
entity
Returns the value of theentity
record component.- Returns:
- the value of the
entity
record component
-
customSpawnRules
Returns the value of thecustomSpawnRules
record component.- Returns:
- the value of the
customSpawnRules
record component
-