majgenrelativity

Untitled

Jun 7th, 2015
250
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. else
  13. force_lasers_ions+=1;
  14. coal_left-=1;
  15.  
  16. }
  17. }
  18. if (do_detect_tanks== true) {
  19. if(worldObj.getTileEntity(getPos().down()) != null) {
  20. if(worldObj.getTileEntity(this.getPos().down()) instanceof ion_Tank_Tile_Entity) {
  21. tank1=((ion_Tank_Tile_Entity)worldObj.getTileEntity(this.getPos().down()));
  22. // MainFile.logger.info(worldObj.getTileEntity(this.getPos().down()).getBlockType().getUnlocalizedName());
  23. }
  24. else {
  25. // MainFile.logger.info(worldObj.getTileEntity(this.getPos().down()).getBlockType().getUnlocalizedName());
  26. }
  27. }
  28. do_detect_tanks=false;
  29. }
  30. if (tank1 != null) {
  31. tank1.pushIons(1);
  32. }
  33. }
  34. public int getIons() {
  35. return force_lasers_ions;
  36. }
  37. public void setIons(int ions) {
  38. force_lasers_ions=ions;
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment