Class ReanimateTickAction
java.lang.Object
org.cyclops.evilcraft.blockentity.tickaction.spiritreanimator.ReanimateTickAction
- All Implemented Interfaces:
ITickAction<BlockEntitySpiritReanimator>
ITickAction that is able to reanimate boxes with spirits.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddToProduceSlot(BlockEntitySpiritReanimator tile, net.minecraft.world.item.ItemStack itemStack) Try to add the given item to the production slot.booleancanTick(BlockEntitySpiritReanimator tile, net.minecraft.world.item.ItemStack itemStack, int slot, int tick) If this action can tick for the given conditions.protected intgetRequiredMb(BlockEntitySpiritReanimator tile, int tick) floatgetRequiredTicks(BlockEntitySpiritReanimator tile, int slot, int tick) Get the required conditions for the given conditions.voidonTick(BlockEntitySpiritReanimator tile, net.minecraft.world.item.ItemStack itemStack, int slot, int tick) Add one tick.
-
Constructor Details
-
ReanimateTickAction
public ReanimateTickAction()
-
-
Method Details
-
canTick
public boolean canTick(BlockEntitySpiritReanimator 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<BlockEntitySpiritReanimator>- 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.
-
onTick
public void onTick(BlockEntitySpiritReanimator tile, net.minecraft.world.item.ItemStack itemStack, int slot, int tick) Description copied from interface:ITickActionAdd one tick.- Specified by:
onTickin interfaceITickAction<BlockEntitySpiritReanimator>- 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.
-
getRequiredMb
-
getRequiredTicks
Description copied from interface:ITickActionGet the required conditions for the given conditions.- Specified by:
getRequiredTicksin interfaceITickAction<BlockEntitySpiritReanimator>- 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.
-
addToProduceSlot
public boolean addToProduceSlot(BlockEntitySpiritReanimator tile, net.minecraft.world.item.ItemStack itemStack) Try to add the given item to the production slot.- Parameters:
tile- The tile where reanimation happened.itemStack- The item to try to put in the output slot.- Returns:
- If the item could be added or joined in the output slot.
-