Advertisement
TitanChase

Untitled

Sep 24th, 2014
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. public void detectAndSendChanges()
  2. {
  3. super.detectAndSendChanges();
  4.  
  5. boolean changed = false;
  6. if (liquidIO.getInternalTank().getFluid() != null)
  7. {
  8. this.cleared = false;
  9. if (!liquidIO.getInternalTank().getFluid().isFluidStackIdentical(lastFluidStack))
  10. {
  11. changed = true;
  12. lastFluidStack = liquidIO.getInternalTank().getFluid().copy();
  13. }
  14. if (!changed && lastInternalCapacity != liquidIO.getInternalTank().getCapacity())
  15. {
  16. changed = true;
  17. lastInternalCapacity = liquidIO.getInternalTank().getCapacity();
  18. }
  19. }
  20. else
  21. {
  22. if(!cleared)
  23. {
  24. changed = true;
  25. cleared = true;
  26. lastFluidStack = null;
  27. }
  28. }
  29.  
  30. if (changed)
  31. {
  32. for (int i = 0; i < this.crafters.size(); ++i)
  33. {
  34. if (this.crafters.get(i) instanceof EntityPlayerMP)
  35. {
  36. PacketHandler.INSTANCE.sendTo(new PacketLiquidIO(liquidIO), (EntityPlayerMP) this.crafters.get(i));
  37. }
  38. }
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement