Class LocationType
java.lang.Object
com.pixelmonmod.pixelmon.api.spawning.conditions.LocationType
- Direct Known Subclasses:
TriggerLocation
A type of location to spawn. This is used as a preliminary condition. All the default
location types are statically defined inside this class, but adding custom types to
locationTypes directly during pre-initialization will add support for those
types during SpawnSet loading.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic LocationTypePredicate<net.minecraft.world.level.block.state.BlockState>The condition on the base block.static TriggerLocationstatic LocationTypestatic LocationTypestatic LocationTypestatic LocationTypestatic LocationTypestatic LocationTypestatic LocationTypestatic TriggerLocationstatic LocationTypestatic TriggerLocationstatic TriggerLocationstatic TriggerLocationstatic TriggerLocationstatic TriggerLocationstatic LocationTypestatic LocationTypestatic LocationTypestatic LocationTypestatic LocationTypestatic LocationTypestatic LocationTypestatic final ArrayList<LocationType>All the location types the game is aware of.static LocationTypeA mutator which transforms theSpawnLocationin some way prior to spawning, such as raising the y.The name of the location type as would be seen inSpawnInfo.The condition on the blocks that must be nearby.static TriggerLocationstatic TriggerLocationstatic TriggerLocationstatic TriggerLocationstatic TriggerLocationstatic TriggerLocationstatic LocationTypestatic LocationTypestatic TriggerLocationWhether it must see the sky (true), must not see the sky (false), or it doesn't care (null).static TriggerLocationstatic TriggerLocationstatic TriggerLocationstatic TriggerLocationstatic LocationTypestatic LocationTypestatic LocationTypePredicate<net.minecraft.world.level.block.state.BlockState>The condition on the nearby blocks, which are above the base block.static LocationTypestatic LocationTypestatic LocationTypestatic LocationTypestatic LocationTypestatic LocationTypestatic LocationType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddPotentialTypes(ArrayList<LocationType> types, net.minecraft.world.level.block.state.BlockState state) static ArrayList<LocationType>getPotentialTypes(net.minecraft.world.level.block.state.BlockState state) Gets all the location types that the given block satisfies thebaseBlockConditionfor.static LocationTypesetBaseBlockCondition(Predicate<net.minecraft.world.level.block.state.BlockState> baseBlockCondition) setLocationMutator(Consumer<SpawnLocation> mutator) setNeededNearbyBlockCondition(Predicate<Set<net.minecraft.world.level.block.Block>> neededNearbyBlockCondition) setSeesSky(Boolean seesSky) setSurroundingBlockCondition(Predicate<net.minecraft.world.level.block.state.BlockState> surroundingBlockCondition) toString()
-
Field Details
-
locationTypes
All the location types the game is aware of. This list can be modified during pre-initialization. -
name
The name of the location type as would be seen inSpawnInfo. -
baseBlockCondition
The condition on the base block. -
surroundingBlockCondition
The condition on the nearby blocks, which are above the base block. -
neededNearbyBlockCondition
The condition on the blocks that must be nearby. -
mutator
A mutator which transforms theSpawnLocationin some way prior to spawning, such as raising the y. -
seesSky
Whether it must see the sky (true), must not see the sky (false), or it doesn't care (null). -
LAND
-
UNDERGROUND
-
WATER
-
SURFACE_WATER
-
LAVA
-
SURFACE_LAVA
-
UNDERGROUND_LAVA
-
LIQUID
-
UNDERGROUND_LIQUID
-
SURFACE_LIQUID
-
SEAFLOOR
-
LAVA_FLOOR
-
LIQUID_FLOOR
-
UNDERGROUND_WATER
-
AIR
-
TREE_TOP
-
MANMADE
-
INDOORS
-
ROCK_SMASH
-
HEADBUTT
-
SWEET_SCENT
-
FORAGE
-
CURRY
-
CURRY_NONE
-
CURRY_SWEET
-
CURRY_SOUR
-
CURRY_BITTER
-
CURRY_DRY
-
CURRY_SPICY
-
OLD_ROD
-
GOOD_ROD
-
SUPER_ROD
-
OAS_ROD
-
OK_ROD_QUALITY
-
SO_SO_ROD_QUALITY
-
GOOD_ROD_QUALITY
-
GREAT_ROD_QUALITY
-
RARE_ROD_QUALITY
-
PRO_ROD_QUALITY
-
SUPREME_ROD_QUALITY
-
OLD_ROD_LAVA
-
GOOD_ROD_LAVA
-
SUPER_ROD_LAVA
-
GRASS
-
CAVE_ROCK
-
DOUBLE_GRASS
-
SEAWEED
-
-
Constructor Details
-
LocationType
-
-
Method Details
-
setBaseBlockCondition
public LocationType setBaseBlockCondition(Predicate<net.minecraft.world.level.block.state.BlockState> baseBlockCondition) -
setSurroundingBlockCondition
public LocationType setSurroundingBlockCondition(Predicate<net.minecraft.world.level.block.state.BlockState> surroundingBlockCondition) -
setNeededNearbyBlockCondition
public LocationType setNeededNearbyBlockCondition(Predicate<Set<net.minecraft.world.level.block.Block>> neededNearbyBlockCondition) -
setSeesSky
-
setLocationMutator
-
toString
-
of
-
getPotentialTypes
public static ArrayList<LocationType> getPotentialTypes(net.minecraft.world.level.block.state.BlockState state) Gets all the location types that the given block satisfies thebaseBlockConditionfor. -
addPotentialTypes
public static void addPotentialTypes(ArrayList<LocationType> types, net.minecraft.world.level.block.state.BlockState state)
-