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 cnbintermediary net/minecraft/class_1952named net/minecraft/world/MobSpawnerEntryofficial dintermediary comp_64named entityofficial eintermediary comp_65named customSpawnRules
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<MobSpawnerEntry>private final Optional<MobSpawnerEntry.CustomSpawnRules>The field for thecustomSpawnRulesrecord component.static final com.mojang.serialization.Codec<DataPool<MobSpawnerEntry>>private final NbtCompoundThe field for theentityrecord component.static final String -
Constructor Summary
ConstructorsConstructorDescriptionMobSpawnerEntry(NbtCompound nbtCompound, Optional<MobSpawnerEntry.CustomSpawnRules> optional) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecustomSpawnRulesrecord component.entity()Returns the value of theentityrecord component.final booleanIndicates whether some other object is "equal to" this one.getNbt()final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
entity
The field for theentityrecord component. -
customSpawnRules
The field for thecustomSpawnRulesrecord component. -
ENTITY_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official aLcnb;a:Ljava/lang/String;intermediary field_40893Lnet/minecraft/class_1952;field_40893:Ljava/lang/String;named ENTITY_KEYLnet/minecraft/world/MobSpawnerEntry;ENTITY_KEY:Ljava/lang/String;
-
CODEC
- Mappings:
Namespace Name Mixin selector official bLcnb;b:Lcom/mojang/serialization/Codec;intermediary field_34460Lnet/minecraft/class_1952;field_34460:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/world/MobSpawnerEntry;CODEC:Lcom/mojang/serialization/Codec;
-
DATA_POOL_CODEC
- Mappings:
Namespace Name Mixin selector official cLcnb;c:Lcom/mojang/serialization/Codec;intermediary field_34461Lnet/minecraft/class_1952;field_34461:Lcom/mojang/serialization/Codec;named DATA_POOL_CODECLnet/minecraft/world/MobSpawnerEntry;DATA_POOL_CODEC:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
MobSpawnerEntry
public MobSpawnerEntry() -
MobSpawnerEntry
public MobSpawnerEntry(NbtCompound nbtCompound, Optional<MobSpawnerEntry.CustomSpawnRules> optional)
-
-
Method Details
-
getNbt
- Mappings:
Namespace Name Mixin selector official aLcnb;a()Lqr;intermediary method_38093Lnet/minecraft/class_1952;method_38093()Lnet/minecraft/class_2487;named getNbtLnet/minecraft/world/MobSpawnerEntry;getNbt()Lnet/minecraft/nbt/NbtCompound;
-
getCustomSpawnRules
- Mappings:
Namespace Name Mixin selector official bLcnb;b()Ljava/util/Optional;intermediary method_38097Lnet/minecraft/class_1952;method_38097()Ljava/util/Optional;named getCustomSpawnRulesLnet/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 theentityrecord component.- Returns:
- the value of the
entityrecord component
-
customSpawnRules
Returns the value of thecustomSpawnRulesrecord component.- Returns:
- the value of the
customSpawnRulesrecord component
-