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/SpawnGroup
intermediary net/minecraft/class_1311
official btf
-
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 ConstantDescription -
Field Summary
Modifier and TypeFieldDescriptionprivate final int
static final com.mojang.serialization.Codec
<SpawnGroup> A codec that encodes and decodes a spawn group from and to its name string.private final int
private final int
private final String
private final boolean
private final boolean
Fields inherited from interface net.minecraft.util.StringIdentifiable
CACHED_MAP_THRESHOLD
-
Constructor Summary
ModifierConstructorDescriptionprivate
SpawnGroup
(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.int
Returns the maximum number of mobs in this group that can be spawned per chunk.int
Returns the distance, of a mob of this group from a player, at which that mob can despawn at chance.int
Returns 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.boolean
Returnstrue
if this group is spawned as animals, orfalse
if this group is spawned as monsters.boolean
isRare()
Returns if this spawn group is spawned only rarely.static SpawnGroup
Returns 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 MONSTER
Lnet/minecraft/entity/SpawnGroup;MONSTER:Lnet/minecraft/entity/SpawnGroup;
intermediary field_6302
Lnet/minecraft/class_1311;field_6302:Lnet/minecraft/class_1311;
official a
Lbtf;a:Lbtf;
-
CREATURE
- Mappings:
Namespace Name Mixin selector named CREATURE
Lnet/minecraft/entity/SpawnGroup;CREATURE:Lnet/minecraft/entity/SpawnGroup;
intermediary field_6294
Lnet/minecraft/class_1311;field_6294:Lnet/minecraft/class_1311;
official b
Lbtf;b:Lbtf;
-
AMBIENT
- Mappings:
Namespace Name Mixin selector named AMBIENT
Lnet/minecraft/entity/SpawnGroup;AMBIENT:Lnet/minecraft/entity/SpawnGroup;
intermediary field_6303
Lnet/minecraft/class_1311;field_6303:Lnet/minecraft/class_1311;
official c
Lbtf;c:Lbtf;
-
AXOLOTLS
- Mappings:
Namespace Name Mixin selector named AXOLOTLS
Lnet/minecraft/entity/SpawnGroup;AXOLOTLS:Lnet/minecraft/entity/SpawnGroup;
intermediary field_34447
Lnet/minecraft/class_1311;field_34447:Lnet/minecraft/class_1311;
official d
Lbtf;d:Lbtf;
-
UNDERGROUND_WATER_CREATURE
- Mappings:
Namespace Name Mixin selector named UNDERGROUND_WATER_CREATURE
Lnet/minecraft/entity/SpawnGroup;UNDERGROUND_WATER_CREATURE:Lnet/minecraft/entity/SpawnGroup;
intermediary field_30092
Lnet/minecraft/class_1311;field_30092:Lnet/minecraft/class_1311;
official e
Lbtf;e:Lbtf;
-
WATER_CREATURE
- Mappings:
Namespace Name Mixin selector named WATER_CREATURE
Lnet/minecraft/entity/SpawnGroup;WATER_CREATURE:Lnet/minecraft/entity/SpawnGroup;
intermediary field_6300
Lnet/minecraft/class_1311;field_6300:Lnet/minecraft/class_1311;
official f
Lbtf;f:Lbtf;
-
WATER_AMBIENT
- Mappings:
Namespace Name Mixin selector named WATER_AMBIENT
Lnet/minecraft/entity/SpawnGroup;WATER_AMBIENT:Lnet/minecraft/entity/SpawnGroup;
intermediary field_24460
Lnet/minecraft/class_1311;field_24460:Lnet/minecraft/class_1311;
official g
Lbtf;g:Lbtf;
-
MISC
- Mappings:
Namespace Name Mixin selector named MISC
Lnet/minecraft/entity/SpawnGroup;MISC:Lnet/minecraft/entity/SpawnGroup;
intermediary field_17715
Lnet/minecraft/class_1311;field_17715:Lnet/minecraft/class_1311;
official h
Lbtf;h:Lbtf;
-
-
Field Details
-
CODEC
A codec that encodes and decodes a spawn group from and to its name string.- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/entity/SpawnGroup;CODEC:Lcom/mojang/serialization/Codec;
intermediary field_24655
Lnet/minecraft/class_1311;field_24655:Lcom/mojang/serialization/Codec;
official i
Lbtf;i:Lcom/mojang/serialization/Codec;
-
capacity
private final int capacity- Mappings:
Namespace Name Mixin selector named capacity
Lnet/minecraft/entity/SpawnGroup;capacity:I
intermediary field_6297
Lnet/minecraft/class_1311;field_6297:I
official j
Lbtf;j:I
-
peaceful
private final boolean peaceful- Mappings:
Namespace Name Mixin selector named peaceful
Lnet/minecraft/entity/SpawnGroup;peaceful:Z
intermediary field_6298
Lnet/minecraft/class_1311;field_6298:Z
official k
Lbtf;k:Z
-
rare
private final boolean rare- Mappings:
Namespace Name Mixin selector named rare
Lnet/minecraft/entity/SpawnGroup;rare:Z
intermediary field_6295
Lnet/minecraft/class_1311;field_6295:Z
official l
Lbtf;l:Z
-
name
- Mappings:
Namespace Name Mixin selector named name
Lnet/minecraft/entity/SpawnGroup;name:Ljava/lang/String;
intermediary field_6304
Lnet/minecraft/class_1311;field_6304:Ljava/lang/String;
official m
Lbtf;m:Ljava/lang/String;
-
despawnStartRange
private final int despawnStartRange- See Also:
- Mappings:
Namespace Name Mixin selector named despawnStartRange
Lnet/minecraft/entity/SpawnGroup;despawnStartRange:I
intermediary field_24461
Lnet/minecraft/class_1311;field_24461:I
official n
Lbtf;n:I
-
immediateDespawnRange
private final int immediateDespawnRange- Mappings:
Namespace Name Mixin selector named immediateDespawnRange
Lnet/minecraft/entity/SpawnGroup;immediateDespawnRange:I
intermediary field_24462
Lnet/minecraft/class_1311;field_24462:I
official o
Lbtf;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)V
intermediary <init>
Lnet/minecraft/class_1311;<init>(Ljava/lang/String;ILjava/lang/String;IZZI)V
official <init>
Lbtf;<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 getName
Lnet/minecraft/entity/SpawnGroup;getName()Ljava/lang/String;
intermediary method_6133
Lnet/minecraft/class_1311;method_6133()Ljava/lang/String;
official a
Lbtf;a()Ljava/lang/String;
-
asString
Returns the unique string representation of the enum, used for serialization.- Specified by:
asString
in interfaceStringIdentifiable
- Returns:
- the unique string representation of the enum, used for serialization
- Mappings:
Namespace Name Mixin selector named asString
Lnet/minecraft/util/StringIdentifiable;asString()Ljava/lang/String;
intermediary method_15434
Lnet/minecraft/class_3542;method_15434()Ljava/lang/String;
official c
Lazc;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 getCapacity
Lnet/minecraft/entity/SpawnGroup;getCapacity()I
intermediary method_6134
Lnet/minecraft/class_1311;method_6134()I
official b
Lbtf;b()I
-
isPeaceful
public boolean isPeaceful()Returnstrue
if this group is spawned as animals, orfalse
if this group is spawned as monsters.- See Also:
- Mappings:
Namespace Name Mixin selector named isPeaceful
Lnet/minecraft/entity/SpawnGroup;isPeaceful()Z
intermediary method_6136
Lnet/minecraft/class_1311;method_6136()Z
official d
Lbtf;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
400
inServerChunkManager.tickChunks()
.- Mappings:
Namespace Name Mixin selector named isRare
Lnet/minecraft/entity/SpawnGroup;isRare()Z
intermediary method_6135
Lnet/minecraft/class_1311;method_6135()Z
official e
Lbtf;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 getImmediateDespawnRange
Lnet/minecraft/entity/SpawnGroup;getImmediateDespawnRange()I
intermediary method_27919
Lnet/minecraft/class_1311;method_27919()I
official f
Lbtf;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 getDespawnStartRange
Lnet/minecraft/entity/SpawnGroup;getDespawnStartRange()I
intermediary method_27920
Lnet/minecraft/class_1311;method_27920()I
official g
Lbtf;g()I
-