Class BloodInfuserTickAction
java.lang.Object
org.cyclops.evilcraft.blockentity.tickaction.bloodinfuser.BloodInfuserTickAction
- All Implemented Interfaces:
ITickAction<BlockEntityBloodInfuser>
- Direct Known Subclasses:
FluidContainerItemTickAction,InfuseItemTickAction
public abstract class BloodInfuserTickAction
extends Object
implements ITickAction<BlockEntityBloodInfuser>
Abstract
ITickAction that can infuse items with blood.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddToProduceSlot(BlockEntityBloodInfuser tile, net.minecraft.world.item.ItemStack itemStack) Try to add the given item to the production slot.booleancanTick(BlockEntityBloodInfuser tile, net.minecraft.world.item.ItemStack itemStack, int slot, int tick) If this action can tick for the given conditions.net.minecraft.world.item.ItemStackGet the stack in the infusion slot.final floatgetRequiredTicks(BlockEntityBloodInfuser tile, int slot, int tick) Get the required conditions for the given conditions.abstract intgetUnmodifiedRequiredTicks(BlockEntityBloodInfuser tile, int slot) Get the unmodified required conditions for the given conditions.abstract net.minecraft.world.item.ItemStackGet the item of the item that will be produced after infusion.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cyclops.evilcraft.core.blockentity.tickaction.ITickAction
onTick
-
Field Details
-
MB_PER_TICK
protected static final int MB_PER_TICK- See Also:
-
-
Constructor Details
-
BloodInfuserTickAction
public BloodInfuserTickAction()
-
-
Method Details
-
canTick
public boolean canTick(BlockEntityBloodInfuser 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<BlockEntityBloodInfuser>- 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.
-
getInfuseStack
Get the stack in the infusion slot.- Parameters:
tile- The tile to check the slot for.- Returns:
- The item in that slot.
-
willProduceItem
Get the item of the item that will be produced after infusion.- Parameters:
tile- The tile that performs the infusion.- Returns:
- The item.
-
addToProduceSlot
public boolean addToProduceSlot(BlockEntityBloodInfuser tile, net.minecraft.world.item.ItemStack itemStack) Try to add the given item to the production slot.- Parameters:
tile- The tile where infusion happened.itemStack- The item to try to put in the production slot.- Returns:
- If the item could be added or joined in the production slot.
-
getUnmodifiedRequiredTicks
Get the unmodified required conditions for the given conditions.- Parameters:
tile- The tile entity that ticks.slot- The slot ID for the ticker.- Returns:
- Get the required ticks for the given slot for the given tile.
-
getRequiredTicks
Description copied from interface:ITickActionGet the required conditions for the given conditions.- Specified by:
getRequiredTicksin interfaceITickAction<BlockEntityBloodInfuser>- 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.
-