Interface ITickAction<T extends net.minecraft.world.level.block.entity.BlockEntity>
- Type Parameters:
T- Subclass of TileEntity
- All Known Implementing Classes:
AccumulateItemTickAction,BloodInfuserTickAction,BoxCookTickAction,BulkRepairItemTickAction,EmptyFluidContainerInTankTickAction,EmptyInTankTickAction,FluidContainerItemTickAction,InfuseItemTickAction,ReanimateTickAction,RepairItemTickAction
public interface ITickAction<T extends net.minecraft.world.level.block.entity.BlockEntity>
An action that can be given to TickComponents which are used inside
BlockEntityTickingTankInventory- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanIf this action can tick for the given conditions.floatgetRequiredTicks(T tile, int slot, int tick) Get the required conditions for the given conditions.voidAdd one tick.
-
Method Details
-
canTick
If this action can tick for the given conditions.- 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
Add one tick.- 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
Get the required conditions for the given conditions.- 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.
-