Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. @Override
  2. public void updateEntity() {
  3. //System.out.println(shouldRun());
  4. Block testBlock = this.worldObj.getBlock(xCoord, yCoord + 1, zCoord);
  5. if (shouldRun() == true && !worldObj.isRemote) {
  6. ticks ++;
  7. //System.out.println(ticks);
  8. fuelTicks ++;
  9.  
  10. Block change;
  11. int x1 = this.xCoord;
  12. int y1 = this.yCoord + 1;
  13. int z1 = this.zCoord;
  14. for(int i = 0; i < TestForgeCrafting.blockToCheck.size(); i++) {
  15. if (TestForgeCrafting.blockToCheck.get(i) == testBlock){
  16. cookTime = TestForgeCrafting.cookTable.get(i);
  17. change = TestForgeCrafting.blockToCook.get(i);
  18. //System.out.println(change);
  19. if (ticks == cookTime) {
  20. worldObj.setBlock(x1, y1, z1, change);
  21. ticks = 0;
  22. }
  23. System.out.println(ticks + " " + fuelTicks + " " + getItemBurnTime(this.getStackInSlot(0)));
  24.  
  25. if (fuelTicks == getItemBurnTime(this.getStackInSlot(0))){
  26. if(this.getStackInSlot(0).stackSize > 0){
  27. decrStackSize(0, 1);
  28. }
  29. fuelTicks = 0;
  30. }
  31. }
  32. }
  33. }
  34. for(int i = 0; i < TestForgeCrafting.blockToCheck.size(); i++) {
  35. if (TestForgeCrafting.blockToCheck.get(i) != testBlock){
  36. ticks = 0;
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement