use of com.simibubi.create.content.contraptions.components.structureMovement.sync.ContraptionFluidPacket in project Create by Creators-of-Create.
the class MountedFluidStorage method tick.
public void tick(Entity entity, BlockPos pos, boolean isRemote) {
if (!isRemote) {
if (packetCooldown > 0)
packetCooldown--;
else if (sendPacket) {
sendPacket = false;
AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> entity), new ContraptionFluidPacket(entity.getId(), pos, tank.getFluid()));
packetCooldown = 8;
}
return;
}
if (!(te instanceof FluidTankTileEntity))
return;
FluidTankTileEntity tank = (FluidTankTileEntity) te;
tank.getFluidLevel().tick();
}
Aggregations