Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void detectAndSendChanges()
- {
- super.detectAndSendChanges();
- boolean changed = false;
- if (liquidIO.getInternalTank().getFluid() != null)
- {
- this.cleared = false;
- if (!liquidIO.getInternalTank().getFluid().isFluidStackIdentical(lastFluidStack))
- {
- changed = true;
- lastFluidStack = liquidIO.getInternalTank().getFluid().copy();
- }
- if (!changed && lastInternalCapacity != liquidIO.getInternalTank().getCapacity())
- {
- changed = true;
- lastInternalCapacity = liquidIO.getInternalTank().getCapacity();
- }
- }
- else
- {
- if(!cleared)
- {
- changed = true;
- cleared = true;
- lastFluidStack = null;
- }
- }
- if (changed)
- {
- for (int i = 0; i < this.crafters.size(); ++i)
- {
- if (this.crafters.get(i) instanceof EntityPlayerMP)
- {
- PacketHandler.INSTANCE.sendTo(new PacketLiquidIO(liquidIO), (EntityPlayerMP) this.crafters.get(i));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement