public static class MysteryBoxEvent.Tick.TrySpawn extends MysteryBoxEvent.Tick
MysteryBoxEvent.Tick.AboutToClose, MysteryBoxEvent.Tick.DoSpawn, MysteryBoxEvent.Tick.Start, MysteryBoxEvent.Tick.TrySpawnMysteryBoxEvent.Activate, MysteryBoxEvent.ComparatorPower, MysteryBoxEvent.Feed, MysteryBoxEvent.Open, MysteryBoxEvent.Tick| Constructor and Description |
|---|
TrySpawn(MysteryBoxTileEntity box,
net.minecraft.block.BlockState blockState,
int chance)
Fired before a Mystery Box tries to spawn a Pokémon.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getChance()
The 1/x chance of this spawn attempt occurring.
|
boolean |
rollChance()
Rolls the current spawn attempt chance.
|
void |
setChance(int chance)
Sets the 1/x chance of this spawn attempt occurring.
|
getBlockState, getBoxpublic TrySpawn(MysteryBoxTileEntity box, net.minecraft.block.BlockState blockState, int chance)
box - The Mystery Box tile entity.blockState - The block state of this Mystery Box.chance - The 1/x chance of this spawn attempt occurring.public int getChance()
public void setChance(int chance)
chance - Spawn attempt chance, 1/x.public boolean rollChance()