Class AccumulateItemTickAction
java.lang.Object
org.cyclops.evilcraft.blockentity.tickaction.sanguinaryenvironmentalaccumulator.AccumulateItemTickAction
- All Implemented Interfaces:
ITickAction<BlockEntitySanguinaryEnvironmentalAccumulator>
public class AccumulateItemTickAction
extends Object
implements ITickAction<BlockEntitySanguinaryEnvironmentalAccumulator>
ITickAction that can accumulate the environment to an item using blood..-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddToProduceSlot(BlockEntitySanguinaryEnvironmentalAccumulator tile, net.minecraft.world.item.ItemStack itemStack) Try to add the given item to the production slot.booleancanTick(BlockEntitySanguinaryEnvironmentalAccumulator tile, net.minecraft.world.item.ItemStack itemStack, int slot, int tick) If this action can tick for the given conditions.protected intgetRequiredFluidAmount(BlockEntitySanguinaryEnvironmentalAccumulator tile, RecipeEnvironmentalAccumulator recipe) final floatgetRequiredTicks(BlockEntitySanguinaryEnvironmentalAccumulator tile, int slot, int tick) Get the required conditions for the given conditions.static intgetUsage(int baseCooldownTime) voidonTick(BlockEntitySanguinaryEnvironmentalAccumulator tile, net.minecraft.world.item.ItemStack itemStack, int slot, int tick) Add one tick.protected net.minecraft.world.item.ItemStackwillProduceItem(BlockEntitySanguinaryEnvironmentalAccumulator tile, RecipeEnvironmentalAccumulator recipe)
-
Constructor Details
-
AccumulateItemTickAction
public AccumulateItemTickAction()
-
-
Method Details
-
canTick
public boolean canTick(BlockEntitySanguinaryEnvironmentalAccumulator 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<BlockEntitySanguinaryEnvironmentalAccumulator>- 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(BlockEntitySanguinaryEnvironmentalAccumulator tile, net.minecraft.world.item.ItemStack itemStack, int slot, int tick) Description copied from interface:ITickActionAdd one tick.- Specified by:
onTickin interfaceITickAction<BlockEntitySanguinaryEnvironmentalAccumulator>- 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
public final float getRequiredTicks(BlockEntitySanguinaryEnvironmentalAccumulator tile, int slot, int tick) Description copied from interface:ITickActionGet the required conditions for the given conditions.- Specified by:
getRequiredTicksin interfaceITickAction<BlockEntitySanguinaryEnvironmentalAccumulator>- 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.
-
getUsage
public static int getUsage(int baseCooldownTime) -
getRequiredFluidAmount
protected int getRequiredFluidAmount(BlockEntitySanguinaryEnvironmentalAccumulator tile, RecipeEnvironmentalAccumulator recipe) -
willProduceItem
protected net.minecraft.world.item.ItemStack willProduceItem(BlockEntitySanguinaryEnvironmentalAccumulator tile, RecipeEnvironmentalAccumulator recipe) -
addToProduceSlot
public boolean addToProduceSlot(BlockEntitySanguinaryEnvironmentalAccumulator 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.
-