mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-16 18:45:09 +00:00
Removed RenderWorldEvent, encapsulated all public event fields.
This commit is contained in:
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; }
|
||||
}
|
||||
Reference in new issue
Block a user