public interface ISpawnerCoreStats
IItemRegistry.getSpawnerCoreStats(ItemStack).| Modifier and Type | Method and Description |
|---|---|
boolean |
addAmount(net.minecraft.entity.EntityType<?> type,
int toAdd)
Update the percentage level for the given entity type.
|
java.util.Set<net.minecraft.entity.EntityType<?>> |
getEntities()
Get the entity types stored in this spawner core
|
int |
getPercentage(net.minecraft.entity.EntityType<?> entityType)
Get the percentage of the core that the given entity type occupies
|
int |
getUnusedPercentage()
Get the unoccupied percentage of the core
|
net.minecraft.entity.EntityType<?> |
pickEntity(boolean includeUnused)
Pick a weighted random entity from the core.
|
void |
serialize(net.minecraft.item.ItemStack stack)
Serialize the current stats onto the given ItemStack, which must be a Spawner Core
|
java.util.Set<net.minecraft.entity.EntityType<?>> getEntities()
int getPercentage(net.minecraft.entity.EntityType<?> entityType)
entityType - an entity typeint getUnusedPercentage()
boolean addAmount(net.minecraft.entity.EntityType<?> type,
int toAdd)
The updated level is not automatically serialized to an ItemStack; see serialize(ItemStack) for that.
type - an entity typetoAdd - the amount to adjust by, may be negativenet.minecraft.entity.EntityType<?> pickEntity(boolean includeUnused)
includeUnused - if true, the unused percentage will be taken into account, leading to a possible null
return valuevoid serialize(net.minecraft.item.ItemStack stack)
stack - an ItemStackjava.lang.IllegalArgumentException - if the ItemStack is not a Spawner Core