Advertisement
Guest User

Untitled

a guest
Jul 28th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. @Override
  2. public void updateEntity()
  3. {
  4. if(CrusherRecipe.findRecipe(this) != null)
  5. {
  6. CrusherRecipe rec = CrusherRecipe.findRecipe(this);
  7. processTime = rec.time;
  8. processTime++;
  9. if(processTime == rec.time){
  10. if(this.energy >= rec.energy)
  11. {
  12. if(getStackInSlot(1) == null || (getStackInSlot(1) != null && getStackInSlot(1).getItem() == rec.output.getItem() && getStackInSlot(1).getItemDamage() == rec.output.getItemDamage() && getStackInSlot(1).stackSize <= getInventoryStackLimit()-rec.output.stackSize)){
  13. this.decrStackSize(0, rec.input.stackSize);
  14. this.takeEnergy(rec.energy);
  15. if(getStackInSlot(1) == null)
  16. setInventorySlotContents(1, rec.output);
  17. if(getStackInSlot(1) != null && getStackInSlot(1).getItem() == rec.output.getItem() && getStackInSlot(1).getItemDamage() == rec.output.getItemDamage() && getStackInSlot(1).stackSize <= getInventoryStackLimit()-rec.output.stackSize)
  18. decrStackSize(1, -rec.output.stackSize);
  19. }
  20. }
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement