Package org.spout.api.event.cause

Examples of org.spout.api.event.cause.MaterialCause


    if (!inventory.hasIngredient()) {
      return;
    }
    ItemStack ingredient = inventory.getIngredient();
    ItemStack result = ((TimedCraftable) ingredient.getMaterial()).getResult();
    FurnaceSmeltEvent event = VanillaPlugin.getInstance().getEngine().getEventManager().callEvent(new FurnaceSmeltEvent(this, new MaterialCause(ingredient.getMaterial(), this.getBlock()), ingredient, result));
    if (!event.isCancelled()) {
      if (inventory.getOutput() == null) {
        inventory.setOutput(event.getResult());
      } else {
        result = event.getResult();
View Full Code Here


            if (output == null) {
              continue;
            }
            ItemStack result = new ItemStack(((PotionReagent) input.getMaterial()).getResult((PotionItem) output.getMaterial()), 1);

            PotionBrewEvent event = new PotionBrewEvent(this, new MaterialCause(output.getMaterial(), this.getBlock()), input, output, result);

            VanillaPlugin.getInstance().getEngine().getEventManager().callEvent(event);

            if (!event.isCancelled()) {
              inventory.set(i, event.getResult());
View Full Code Here

  private final Furnace furnace;
  private final ItemStack fuel;
  private float burnTime;

  public FurnaceBurnEvent(Furnace furnace, ItemStack fuel, float burnTime) {
    super(furnace.getBlock(), new MaterialCause(fuel.getMaterial(), furnace.getBlock()));
    this.furnace = furnace;
    this.fuel = fuel;
    this.burnTime = burnTime;
  }
View Full Code Here

TOP

Related Classes of org.spout.api.event.cause.MaterialCause

Copyright © 2018 www.massapicom. 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.