Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void updateEntity()
- {
- if(CrusherRecipe.findRecipe(this) != null)
- {
- CrusherRecipe rec = CrusherRecipe.findRecipe(this);
- processTime = rec.time;
- processTime++;
- if(processTime == rec.time){
- if(this.energy >= rec.energy)
- {
- 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)){
- this.decrStackSize(0, rec.input.stackSize);
- this.takeEnergy(rec.energy);
- if(getStackInSlot(1) == null)
- setInventorySlotContents(1, rec.output);
- if(getStackInSlot(1) != null && getStackInSlot(1).getItem() == rec.output.getItem() && getStackInSlot(1).getItemDamage() == rec.output.getItemDamage() && getStackInSlot(1).stackSize <= getInventoryStackLimit()-rec.output.stackSize)
- decrStackSize(1, -rec.output.stackSize);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement