FluidStack prev = prevFluidStacks.get(tankIndex);
int color = tank.getColor();
int pColor = prevColor.get(tankIndex);
for (Object crafter1 : crafters) {
ICrafting crafter = (ICrafting) crafter1;
EntityPlayerMP player = (EntityPlayerMP) crafter1;
if (fluidStack == null ^ prev == null) {
int fluidId = -1;
int fluidAmount = 0;
if (fluidStack != null) {
fluidId = fluidStack.fluidID;
fluidAmount = fluidStack.amount;
}
crafter.sendProgressBarUpdate(container, tankIndex * NETWORK_DATA + 0, fluidId);
PacketBuilder.instance().sendGuiIntegerPacket(player, container.windowId, tankIndex * NETWORK_DATA + 1, fluidAmount);
} else if (fluidStack != null && prev != null) {
if (fluidStack.getFluid() != prev.getFluid())
crafter.sendProgressBarUpdate(container, tankIndex * NETWORK_DATA + 0, fluidStack.fluidID);
if (fluidStack.amount != prev.amount)
PacketBuilder.instance().sendGuiIntegerPacket(player, container.windowId, tankIndex * NETWORK_DATA + 1, fluidStack.amount);
if (color != pColor)
PacketBuilder.instance().sendGuiIntegerPacket(player, container.windowId, tankIndex * NETWORK_DATA + 2, color);
}