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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoTweak(AbstractSpawner spawner, SpawnAction<? extends net.minecraft.world.entity.Entity> action) Performs the tweak to the given spawn action or its entity.booleanfits(AbstractSpawner spawner, SpawnInfo spawnInfo, SpawnLocation spawnLocation) Returns whether or not thisSpawnInfoat thisSpawnLocationis acceptable.intgetTweakedLevel(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:SpawningTweakPerforms the tweak to the given spawn action or its entity.- Specified by:
doTweakin 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:SpawnerConditionReturns whether or not thisSpawnInfoat thisSpawnLocationis acceptable. This is performed async.- Specified by:
fitsin interfaceSpawnerCondition
-