Removed RenderWorldEvent, encapsulated all public event fields.

This commit is contained in:
RainWarrior committed 2016-03-24 22:22:21 +03:00
1 parent 08c00662a0
commit 756c58d5cb
110 files changed
+1642 -680

No files matched your search

@@ -14,19 +14,29 @@ import net.minecraft.item.ItemStack;
@Cancelable
public class AnvilUpdateEvent extends Event
{
public final ItemStack left; // The left side of the input
public final ItemStack right; // The right side of the input
public final String name; // The name to set the item, if the user specified one.
public ItemStack output; // Set this to set the output stack
public int cost; // The base cost, set this to change it if output != null
public int materialCost; // The number of items from the right slot to be consumed during the repair. Leave as 0 to consume the entire stack.
private final ItemStack left; // The left side of the input
private final ItemStack right; // The right side of the input
private final String name; // The name to set the item, if the user specified one.
private ItemStack output; // Set this to set the output stack
private int cost; // The base cost, set this to change it if output != null
private int materialCost; // The number of items from the right slot to be consumed during the repair. Leave as 0 to consume the entire stack.
public AnvilUpdateEvent(ItemStack left, ItemStack right, String name, int cost)
{
this.left = left;
this.right = right;
this.name = name;
this.cost = cost;
this.materialCost = 0;
this.setCost(cost);
this.setMaterialCost(0);
}
public ItemStack getLeft() { return left; }
public ItemStack getRight() { return right; }
public String getName() { return name; }
public ItemStack getOutput() { return output; }
public void setOutput(ItemStack output) { this.output = output; }
public int getCost() { return cost; }
public void setCost(int cost) { this.cost = cost; }
public int getMaterialCost() { return materialCost; }
public void setMaterialCost(int materialCost) { this.materialCost = materialCost; }
}