Class BoxCookTickAction
java.lang.Object
org.cyclops.evilcraft.blockentity.tickaction.spiritfurnace.BoxCookTickAction
- All Implemented Interfaces:
ITickAction<BlockEntitySpiritFurnace>
ITickAction that is able to cook boxes with spirits.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanTick(BlockEntitySpiritFurnace tile, net.minecraft.world.item.ItemStack itemStack, int slot, int tick) If this action can tick for the given conditions.protected voidprotected net.minecraft.world.item.ItemStackprotected net.minecraft.world.item.ItemStackgetPlayerDeterminedDrop(String playerId) protected net.minecraft.world.item.ItemStackgetPlayerSkull(String playerName) protected intgetRequiredMb(BlockEntitySpiritFurnace tile, int tick) floatgetRequiredTicks(BlockEntitySpiritFurnace tile, int slot, int tick) Get the required conditions for the given conditions.voidonTick(BlockEntitySpiritFurnace tile, net.minecraft.world.item.ItemStack itemStack, int slot, int tick) Add one tick.static voidoverrideMobDrop(Class<? extends net.minecraft.world.entity.LivingEntity> entity, Set<org.cyclops.cyclopscore.item.WeightedItemStack> drops) Override an entity's drops inside the spirit furnace.static voidoverridePlayerDropInner(String playerId, net.minecraft.world.item.ItemStack drop) Override a player's drops inside the spirit furnace.
-
Field Details
-
MOBDROP_OVERRIDES
-
PLAYERDROP_OVERRIDES_INNER
-
PLAYERDROP_RANDOM
public static final net.minecraft.world.item.ItemStack[] PLAYERDROP_RANDOM
-
-
Constructor Details
-
BoxCookTickAction
public BoxCookTickAction()
-
-
Method Details
-
overrideMobDrop
public static void overrideMobDrop(Class<? extends net.minecraft.world.entity.LivingEntity> entity, Set<org.cyclops.cyclopscore.item.WeightedItemStack> drops) Override an entity's drops inside the spirit furnace.- Parameters:
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)
-
overridePlayerDropInner
public static void overridePlayerDropInner(String playerId, net.minecraft.world.item.ItemStack drop) Override a player's drops inside the spirit furnace.- Parameters:
playerId- The player id.drop- The drop
-
canTick
public boolean canTick(BlockEntitySpiritFurnace tile, net.minecraft.world.item.ItemStack itemStack, int slot, int tick) Description copied from interface:ITickActionIf this action can tick for the given conditions.- Specified by:
canTickin interfaceITickAction<BlockEntitySpiritFurnace>- Parameters:
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.- Returns:
- If the action can tick for the given parameters.
-
getCookStack
-
getPlayerSkull
-
getPlayerDeterminedDrop
-
doNextDrop
-
getRequiredMb
-
onTick
public void onTick(BlockEntitySpiritFurnace tile, net.minecraft.world.item.ItemStack itemStack, int slot, int tick) Description copied from interface:ITickActionAdd one tick.- Specified by:
onTickin interfaceITickAction<BlockEntitySpiritFurnace>- Parameters:
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.
-
getRequiredTicks
Description copied from interface:ITickActionGet the required conditions for the given conditions.- Specified by:
getRequiredTicksin interfaceITickAction<BlockEntitySpiritFurnace>- Parameters:
tile- The tile entity that ticks.slot- The slot ID for the ticker.tick- The current tick.- Returns:
- Get the required ticks for the given slot for the given tile.
-