public interface ISelectionAlgorithm
Created by Hiroku
Modifier and Type | Method and Description |
---|---|
java.util.List<SpawnAction<? extends net.minecraft.entity.Entity>> |
calculateSpawnActions(AbstractSpawner spawner,
java.util.List<SpawnSet> spawnSets,
java.util.List<SpawnLocation> spawnLocations)
|
default SpawnInfo |
choose(AbstractSpawner spawner,
SpawnLocation spawnLocation,
java.util.ArrayList<SpawnInfo> spawnInfos)
Default method which chooses a
SpawnInfo from the given list by percentage if possible, then using normal rarity sum method. |
default SpawnInfo |
chooseViaPercentage(AbstractSpawner spawner,
java.util.ArrayList<SpawnInfo> spawnInfos)
Default method that chooses a
SpawnInfo from the given list based on
the SpawnInfo.percentage if possible. |
java.util.Map<SpawnInfo,java.lang.Float> |
getAdjustedRarities(AbstractSpawner spawner,
java.util.Map<SpawnLocation,java.util.List<SpawnInfo>> possibleSpawns)
Gets the adjusted rarities of the given mapping from
SpawnLocation to list of SpawnInfo s. |
default java.util.Map<java.lang.String,java.lang.Double> |
getPercentages(AbstractSpawner spawner,
java.util.Map<SpawnLocation,java.util.List<SpawnInfo>> possibleSpawns)
Default method that converts a mapping of
SpawnLocation to list of SpawnInfo into
a mapping from label to percentage This calls getAdjustedRarities(AbstractSpawner, Map) ,
which is how this ends up getting implementation-specific results. |
java.util.List<SpawnAction<? extends net.minecraft.entity.Entity>> calculateSpawnActions(AbstractSpawner spawner, java.util.List<SpawnSet> spawnSets, java.util.List<SpawnLocation> spawnLocations)
java.util.Map<SpawnInfo,java.lang.Float> getAdjustedRarities(AbstractSpawner spawner, java.util.Map<SpawnLocation,java.util.List<SpawnInfo>> possibleSpawns)
SpawnLocation
to list of SpawnInfo
s.default java.util.Map<java.lang.String,java.lang.Double> getPercentages(AbstractSpawner spawner, java.util.Map<SpawnLocation,java.util.List<SpawnInfo>> possibleSpawns)
SpawnLocation
to list of SpawnInfo
into
a mapping from label to percentage This calls getAdjustedRarities(AbstractSpawner, Map)
,
which is how this ends up getting implementation-specific results.@Nullable default SpawnInfo chooseViaPercentage(AbstractSpawner spawner, java.util.ArrayList<SpawnInfo> spawnInfos)
SpawnInfo
from the given list based on
the SpawnInfo.percentage
if possible.default SpawnInfo choose(AbstractSpawner spawner, SpawnLocation spawnLocation, java.util.ArrayList<SpawnInfo> spawnInfos)
SpawnInfo
from the given list by percentage if possible, then using normal rarity sum method.