Package net.minecraft.entity
Enum Class SpawnGroup
- All Implemented Interfaces:
Serializable,Comparable<SpawnGroup>,Constable,StringIdentifiable
A spawn group represents the category of an entity's natural spawning.
Entities that don't support natural spawning belong to the
MISC group.
- See Also:
- Mappings:
Namespace Name named net/minecraft/entity/SpawnGroupintermediary net/minecraft/class_1311official btu
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface net.minecraft.util.StringIdentifiable
StringIdentifiable.BasicCodec<S extends StringIdentifiable>, StringIdentifiable.EnumCodec<E extends Enum<E> & StringIdentifiable> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intstatic final com.mojang.serialization.Codec<SpawnGroup> A codec that encodes and decodes a spawn group from and to its name string.private final intprivate final intprivate final Stringprivate final booleanprivate final booleanFields inherited from interface net.minecraft.util.StringIdentifiable
CACHED_MAP_THRESHOLD -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSpawnGroup(String name, int spawnCap, boolean peaceful, boolean rare, int immediateDespawnRange) -
Method Summary
Modifier and TypeMethodDescriptionasString()Returns the unique string representation of the enum, used for serialization.intReturns the maximum number of mobs in this group that can be spawned per chunk.intReturns the distance, of a mob of this group from a player, at which that mob can despawn at chance.intReturns the distance, of a mob of this group from a player, at which that mob will despawn immediately.getName()Returns the name of this spawn group.booleanReturnstrueif this group is spawned as animals, orfalseif this group is spawned as monsters.booleanisRare()Returns if this spawn group is spawned only rarely.static SpawnGroupReturns the enum constant of this class with the specified name.static SpawnGroup[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MONSTER
- Mappings:
Namespace Name Mixin selector named MONSTERLnet/minecraft/entity/SpawnGroup;MONSTER:Lnet/minecraft/entity/SpawnGroup;intermediary field_6302Lnet/minecraft/class_1311;field_6302:Lnet/minecraft/class_1311;official aLbtu;a:Lbtu;
-
CREATURE
- Mappings:
Namespace Name Mixin selector named CREATURELnet/minecraft/entity/SpawnGroup;CREATURE:Lnet/minecraft/entity/SpawnGroup;intermediary field_6294Lnet/minecraft/class_1311;field_6294:Lnet/minecraft/class_1311;official bLbtu;b:Lbtu;
-
AMBIENT
- Mappings:
Namespace Name Mixin selector named AMBIENTLnet/minecraft/entity/SpawnGroup;AMBIENT:Lnet/minecraft/entity/SpawnGroup;intermediary field_6303Lnet/minecraft/class_1311;field_6303:Lnet/minecraft/class_1311;official cLbtu;c:Lbtu;
-
AXOLOTLS
- Mappings:
Namespace Name Mixin selector named AXOLOTLSLnet/minecraft/entity/SpawnGroup;AXOLOTLS:Lnet/minecraft/entity/SpawnGroup;intermediary field_34447Lnet/minecraft/class_1311;field_34447:Lnet/minecraft/class_1311;official dLbtu;d:Lbtu;
-
UNDERGROUND_WATER_CREATURE
- Mappings:
Namespace Name Mixin selector named UNDERGROUND_WATER_CREATURELnet/minecraft/entity/SpawnGroup;UNDERGROUND_WATER_CREATURE:Lnet/minecraft/entity/SpawnGroup;intermediary field_30092Lnet/minecraft/class_1311;field_30092:Lnet/minecraft/class_1311;official eLbtu;e:Lbtu;
-
WATER_CREATURE
- Mappings:
Namespace Name Mixin selector named WATER_CREATURELnet/minecraft/entity/SpawnGroup;WATER_CREATURE:Lnet/minecraft/entity/SpawnGroup;intermediary field_6300Lnet/minecraft/class_1311;field_6300:Lnet/minecraft/class_1311;official fLbtu;f:Lbtu;
-
WATER_AMBIENT
- Mappings:
Namespace Name Mixin selector named WATER_AMBIENTLnet/minecraft/entity/SpawnGroup;WATER_AMBIENT:Lnet/minecraft/entity/SpawnGroup;intermediary field_24460Lnet/minecraft/class_1311;field_24460:Lnet/minecraft/class_1311;official gLbtu;g:Lbtu;
-
MISC
- Mappings:
Namespace Name Mixin selector named MISCLnet/minecraft/entity/SpawnGroup;MISC:Lnet/minecraft/entity/SpawnGroup;intermediary field_17715Lnet/minecraft/class_1311;field_17715:Lnet/minecraft/class_1311;official hLbtu;h:Lbtu;
-
-
Field Details
-
CODEC
A codec that encodes and decodes a spawn group from and to its name string.- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/entity/SpawnGroup;CODEC:Lcom/mojang/serialization/Codec;intermediary field_24655Lnet/minecraft/class_1311;field_24655:Lcom/mojang/serialization/Codec;official iLbtu;i:Lcom/mojang/serialization/Codec;
-
capacity
private final int capacity- Mappings:
Namespace Name Mixin selector named capacityLnet/minecraft/entity/SpawnGroup;capacity:Iintermediary field_6297Lnet/minecraft/class_1311;field_6297:Iofficial jLbtu;j:I
-
peaceful
private final boolean peaceful- Mappings:
Namespace Name Mixin selector named peacefulLnet/minecraft/entity/SpawnGroup;peaceful:Zintermediary field_6298Lnet/minecraft/class_1311;field_6298:Zofficial kLbtu;k:Z
-
rare
private final boolean rare- Mappings:
Namespace Name Mixin selector named rareLnet/minecraft/entity/SpawnGroup;rare:Zintermediary field_6295Lnet/minecraft/class_1311;field_6295:Zofficial lLbtu;l:Z
-
name
- Mappings:
Namespace Name Mixin selector named nameLnet/minecraft/entity/SpawnGroup;name:Ljava/lang/String;intermediary field_6304Lnet/minecraft/class_1311;field_6304:Ljava/lang/String;official mLbtu;m:Ljava/lang/String;
-
despawnStartRange
private final int despawnStartRange- See Also:
- Mappings:
Namespace Name Mixin selector named despawnStartRangeLnet/minecraft/entity/SpawnGroup;despawnStartRange:Iintermediary field_24461Lnet/minecraft/class_1311;field_24461:Iofficial nLbtu;n:I
-
immediateDespawnRange
private final int immediateDespawnRange- Mappings:
Namespace Name Mixin selector named immediateDespawnRangeLnet/minecraft/entity/SpawnGroup;immediateDespawnRange:Iintermediary field_24462Lnet/minecraft/class_1311;field_24462:Iofficial oLbtu;o:I
-
-
Constructor Details
-
SpawnGroup
private SpawnGroup(String name, int spawnCap, boolean peaceful, boolean rare, int immediateDespawnRange) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/entity/SpawnGroup;<init>(Ljava/lang/String;ILjava/lang/String;IZZI)Vintermediary <init>Lnet/minecraft/class_1311;<init>(Ljava/lang/String;ILjava/lang/String;IZZI)Vofficial <init>Lbtu;<init>(Ljava/lang/String;ILjava/lang/String;IZZI)V
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getName
Returns the name of this spawn group.The names are unique and are in
lower_snake_case.- Mappings:
Namespace Name Mixin selector named getNameLnet/minecraft/entity/SpawnGroup;getName()Ljava/lang/String;intermediary method_6133Lnet/minecraft/class_1311;method_6133()Ljava/lang/String;official aLbtu;a()Ljava/lang/String;
-
asString
Returns the unique string representation of the enum, used for serialization.- Specified by:
asStringin interfaceStringIdentifiable- Returns:
- the unique string representation of the enum, used for serialization
- Mappings:
Namespace Name Mixin selector named asStringLnet/minecraft/util/StringIdentifiable;asString()Ljava/lang/String;intermediary method_15434Lnet/minecraft/class_3542;method_15434()Ljava/lang/String;official cLazu;c()Ljava/lang/String;
-
getCapacity
public int getCapacity()Returns the maximum number of mobs in this group that can be spawned per chunk.- Mappings:
Namespace Name Mixin selector named getCapacityLnet/minecraft/entity/SpawnGroup;getCapacity()Iintermediary method_6134Lnet/minecraft/class_1311;method_6134()Iofficial bLbtu;b()I
-
isPeaceful
public boolean isPeaceful()Returnstrueif this group is spawned as animals, orfalseif this group is spawned as monsters.- See Also:
- Mappings:
Namespace Name Mixin selector named isPeacefulLnet/minecraft/entity/SpawnGroup;isPeaceful()Zintermediary method_6136Lnet/minecraft/class_1311;method_6136()Zofficial dLbtu;d()Z
-
isRare
public boolean isRare()Returns if this spawn group is spawned only rarely.A rare spawn only happens when the world time is a multiple of
400inServerChunkManager.tickChunks().- Mappings:
Namespace Name Mixin selector named isRareLnet/minecraft/entity/SpawnGroup;isRare()Zintermediary method_6135Lnet/minecraft/class_1311;method_6135()Zofficial eLbtu;e()Z
-
getImmediateDespawnRange
public int getImmediateDespawnRange()Returns the distance, of a mob of this group from a player, at which that mob will despawn immediately.This is ignored if a mob cannot immediately despawn.
- See Also:
- Mappings:
Namespace Name Mixin selector named getImmediateDespawnRangeLnet/minecraft/entity/SpawnGroup;getImmediateDespawnRange()Iintermediary method_27919Lnet/minecraft/class_1311;method_27919()Iofficial fLbtu;f()I
-
getDespawnStartRange
public int getDespawnStartRange()Returns the distance, of a mob of this group from a player, at which that mob can despawn at chance.This is ignored if a mob cannot immediately despawn.
- See Also:
- Mappings:
Namespace Name Mixin selector named getDespawnStartRangeLnet/minecraft/entity/SpawnGroup;getDespawnStartRange()Iintermediary method_27920Lnet/minecraft/class_1311;method_27920()Iofficial gLbtu;g()I
-