Package net.minecraft.entity
Enum EntitySpawnPlacementRegistry.PlacementType
- java.lang.Object
-
- java.lang.Enum<EntitySpawnPlacementRegistry.PlacementType>
-
- net.minecraft.entity.EntitySpawnPlacementRegistry.PlacementType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<EntitySpawnPlacementRegistry.PlacementType>
,IExtensibleEnum
- Enclosing class:
- EntitySpawnPlacementRegistry
public static enum EntitySpawnPlacementRegistry.PlacementType extends java.lang.Enum<EntitySpawnPlacementRegistry.PlacementType> implements IExtensibleEnum
-
-
Enum Constant Summary
Enum Constants Enum Constant Description IN_LAVA
IN_WATER
NO_RESTRICTIONS
ON_GROUND
-
Field Summary
Fields Modifier and Type Field Description private TriPredicate<IWorldReader,BlockPos,EntityType<?>>
predicate
-
Constructor Summary
Constructors Modifier Constructor Description private
PlacementType()
private
PlacementType(TriPredicate<IWorldReader,BlockPos,EntityType<?>> predicate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canSpawnAt(IWorldReader world, BlockPos pos, EntityType<?> type)
static EntitySpawnPlacementRegistry.PlacementType
create(java.lang.String name, TriPredicate<IWorldReader,BlockPos,EntityType<? extends MobEntity>> predicate)
static EntitySpawnPlacementRegistry.PlacementType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static EntitySpawnPlacementRegistry.PlacementType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface net.minecraftforge.common.IExtensibleEnum
init
-
-
-
-
Enum Constant Detail
-
ON_GROUND
public static final EntitySpawnPlacementRegistry.PlacementType ON_GROUND
-
IN_WATER
public static final EntitySpawnPlacementRegistry.PlacementType IN_WATER
-
NO_RESTRICTIONS
public static final EntitySpawnPlacementRegistry.PlacementType NO_RESTRICTIONS
-
IN_LAVA
public static final EntitySpawnPlacementRegistry.PlacementType IN_LAVA
-
-
Field Detail
-
predicate
private TriPredicate<IWorldReader,BlockPos,EntityType<?>> predicate
-
-
Constructor Detail
-
PlacementType
private PlacementType()
-
PlacementType
private PlacementType(TriPredicate<IWorldReader,BlockPos,EntityType<?>> predicate)
-
-
Method Detail
-
values
public static EntitySpawnPlacementRegistry.PlacementType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EntitySpawnPlacementRegistry.PlacementType c : EntitySpawnPlacementRegistry.PlacementType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EntitySpawnPlacementRegistry.PlacementType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
create
public static EntitySpawnPlacementRegistry.PlacementType create(java.lang.String name, TriPredicate<IWorldReader,BlockPos,EntityType<? extends MobEntity>> predicate)
-
canSpawnAt
public boolean canSpawnAt(IWorldReader world, BlockPos pos, EntityType<?> type)
-
-