majgenrelativity

Untitled

Jun 7th, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. @Override
  2. public void update() {
  3. // Generate ions whenever loaded
  4. if (force_lasers_ions<100)
  5.  
  6. if (coal_left==0)
  7.  
  8. if (getStackInSlot(0)!=null) {
  9. decrStackSize(0, 1);
  10. coal_left=20;
  11. }
  12.  
  13. else
  14. force_lasers_ions+=1;
  15. coal_left-=1;
  16.  
  17. if (do_detect_tanks== true) {
  18. if(worldObj.getTileEntity(getPos().down()) != null) {
  19. if(worldObj.getTileEntity(this.getPos().down()) instanceof ion_Tank_Tile_Entity) {
  20. tank1=((ion_Tank_Tile_Entity)worldObj.getTileEntity(this.getPos().down()));
  21. // MainFile.logger.info(worldObj.getTileEntity(this.getPos().down()).getBlockType().getUnlocalizedName());
  22. }
  23. else {
  24. // MainFile.logger.info(worldObj.getTileEntity(this.getPos().down()).getBlockType().getUnlocalizedName());
  25. }
  26. }
  27. do_detect_tanks=false;
  28. }
  29. if (tank1 != null) {
  30. tank1.pushIons(1);
  31. }
  32. }
  33. public int getIons() {
  34. return force_lasers_ions;
  35. }
  36. public void setIons(int ions) {
  37. force_lasers_ions=ions;
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment