public class BoxCookTickAction extends java.lang.Object implements ITickAction<TileSpiritFurnace>
ITickAction that is able to cook boxes with spirits.| Modifier and Type | Field and Description |
|---|---|
static java.util.Map<java.lang.Class<? extends net.minecraft.entity.EntityLivingBase>,java.util.List<WeightedItemStack>> |
MOBDROP_OVERRIDES |
static java.util.Map<java.util.UUID,java.util.List<WeightedItemStack>> |
PLAYERDROP_OVERRIDES |
static net.minecraft.item.ItemStack[] |
PLAYERDROP_RANDOM |
| Constructor and Description |
|---|
BoxCookTickAction() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canTick(TileSpiritFurnace tile,
net.minecraft.item.ItemStack itemStack,
int slot,
int tick)
If this action can tick for the given conditions.
|
protected void |
doNextDrop(TileSpiritFurnace tile) |
protected net.minecraft.item.ItemStack |
getCookStack(TileSpiritFurnace tile) |
protected net.minecraft.item.ItemStack |
getPlayerDeterminedDrop(java.lang.String playerId) |
protected net.minecraft.item.ItemStack |
getPlayerSkull(java.lang.String playerName) |
protected int |
getRequiredMb(TileSpiritFurnace tile,
int tick) |
float |
getRequiredTicks(TileSpiritFurnace tile,
int slot,
int tick)
Get the required conditions for the given conditions.
|
void |
onTick(TileSpiritFurnace tile,
net.minecraft.item.ItemStack itemStack,
int slot,
int tick)
Add one tick.
|
static void |
overrideMobDrop(java.lang.Class<? extends net.minecraft.entity.EntityLivingBase> entity,
java.util.Set<WeightedItemStack> drops)
Override an entity's drops inside the spirit furnace.
|
static void |
overridePlayerDrop(java.lang.String playerId,
net.minecraft.item.ItemStack drop)
Override a player's drops inside the spirit furnace.
|
public static final java.util.Map<java.lang.Class<? extends net.minecraft.entity.EntityLivingBase>,java.util.List<WeightedItemStack>> MOBDROP_OVERRIDES
public static final java.util.Map<java.util.UUID,java.util.List<WeightedItemStack>> PLAYERDROP_OVERRIDES
public static final net.minecraft.item.ItemStack[] PLAYERDROP_RANDOM
public static void overrideMobDrop(java.lang.Class<? extends net.minecraft.entity.EntityLivingBase> entity,
java.util.Set<WeightedItemStack> drops)
entity - The entity class.drops - A map of drops to relative frequency, with the second pair of the map key representing the min-max
amount of drops (both inclusive)public static void overridePlayerDrop(java.lang.String playerId,
net.minecraft.item.ItemStack drop)
playerId - The player id.drop - The droppublic boolean canTick(TileSpiritFurnace tile, net.minecraft.item.ItemStack itemStack, int slot, int tick)
ITickActioncanTick in interface ITickAction<TileSpiritFurnace>tile - The tile entity that ticks.itemStack - The ItemStack that is in the slot for which this ticker runs.slot - The slot ID for the ticker.tick - The current tick.protected net.minecraft.item.ItemStack getCookStack(TileSpiritFurnace tile)
protected net.minecraft.item.ItemStack getPlayerSkull(java.lang.String playerName)
protected net.minecraft.item.ItemStack getPlayerDeterminedDrop(java.lang.String playerId)
protected void doNextDrop(TileSpiritFurnace tile)
protected int getRequiredMb(TileSpiritFurnace tile, int tick)
public void onTick(TileSpiritFurnace tile, net.minecraft.item.ItemStack itemStack, int slot, int tick)
ITickActiononTick in interface ITickAction<TileSpiritFurnace>tile - The tile entity that ticks.itemStack - The ItemStack that is in the slot for which this ticker runs.slot - The slot ID for the ticker.tick - The current tick.public float getRequiredTicks(TileSpiritFurnace tile, int slot, int tick)
ITickActiongetRequiredTicks in interface ITickAction<TileSpiritFurnace>tile - The tile entity that ticks.slot - The slot ID for the ticker.tick - The current tick.