Package org.spout.vanilla.inventory.block

Examples of org.spout.vanilla.inventory.block.FurnaceInventory.addAmount()


      } else {
        result = event.getResult();
        if (inventory.getOutput().getMaterial().getId() != result.getMaterial().getId()) {
          throw new UnsupportedOperationException("Smelt result must be the same material as the output slot.");
        }
        inventory.addAmount(FurnaceInventory.OUTPUT_SLOT, result.getAmount());
      }
      inventory.addAmount(FurnaceInventory.INGREDIENT_SLOT, -1);
    }

    setMaxSmeltTime(-1);
View Full Code Here


        if (inventory.getOutput().getMaterial().getId() != result.getMaterial().getId()) {
          throw new UnsupportedOperationException("Smelt result must be the same material as the output slot.");
        }
        inventory.addAmount(FurnaceInventory.OUTPUT_SLOT, result.getAmount());
      }
      inventory.addAmount(FurnaceInventory.INGREDIENT_SLOT, -1);
    }

    setMaxSmeltTime(-1);
    setSmeltTime(-1);
  }
View Full Code Here

          return;
        }
        newFuel = event.getBurnTime();
        setMaxFuel(newFuel);
        setFuel(newFuel);
        inventory.addAmount(FurnaceInventory.FUEL_SLOT, -1);
        setBurning(true);
        return;
      }

      setBurning(false);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.