Class PlayerBasedLevels
java.lang.Object
com.pixelmonmod.pixelmon.spawning.PlayerBasedLevels
- All Implemented Interfaces:
SpawnerCondition
,SpawningTweak
Tweaks the levels of Pokémon to be closer to the player's pokemonLevel if the cause of the spawn is a player.
Prevents Pokémon from spawning if they cannot be tweaked to be within range of the player.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
doTweak
(AbstractSpawner spawner, SpawnAction<? extends net.minecraft.world.entity.Entity> action) Performs the tweak to the given spawn action or its entity.boolean
fits
(AbstractSpawner spawner, SpawnInfo spawnInfo, SpawnLocation spawnLocation) Returns whether or not thisSpawnInfo
at thisSpawnLocation
is acceptable.int
getTweakedLevel
(AbstractSpawner spawner, SpawnAction<? extends net.minecraft.world.entity.Entity> action, int level, int min, int max)
-
Constructor Details
-
PlayerBasedLevels
public PlayerBasedLevels()
-
-
Method Details
-
doTweak
public void doTweak(AbstractSpawner spawner, SpawnAction<? extends net.minecraft.world.entity.Entity> action) Description copied from interface:SpawningTweak
Performs the tweak to the given spawn action or its entity.- Specified by:
doTweak
in interfaceSpawningTweak
-
getTweakedLevel
public int getTweakedLevel(AbstractSpawner spawner, SpawnAction<? extends net.minecraft.world.entity.Entity> action, int level, int min, int max) -
fits
Description copied from interface:SpawnerCondition
Returns whether or not thisSpawnInfo
at thisSpawnLocation
is acceptable. This is performed async.- Specified by:
fits
in interfaceSpawnerCondition
-