Updated to rename revision 02

This commit is contained in:
Erik Broes
2012-02-29 22:31:04 +01:00
committed by Nathan Adams
parent 8524ff8ef7
commit 33ba9f0a2f
100 changed files with 772 additions and 761 deletions

View File

@@ -12,20 +12,20 @@ import org.bukkit.inventory.ShapelessRecipe;
public class ShapelessRecipes implements CraftingRecipe {
private final ItemStack a;
private final List b;
private final ItemStack result;
private final List ingredients;
public ShapelessRecipes(ItemStack itemstack, List list) {
this.a = itemstack;
this.b = list;
this.result = itemstack;
this.ingredients = list;
}
// CraftBukkit start
@SuppressWarnings("unchecked")
public ShapelessRecipe toBukkitRecipe() {
CraftItemStack result = new CraftItemStack(this.a);
CraftItemStack result = new CraftItemStack(this.result);
CraftShapelessRecipe recipe = new CraftShapelessRecipe(result, this);
for (ItemStack stack : (List<ItemStack>) this.b) {
for (ItemStack stack : (List<ItemStack>) this.ingredients) {
if (stack != null) {
recipe.addIngredient(org.bukkit.Material.getMaterial(stack.id), stack.getData());
}
@@ -35,11 +35,11 @@ public class ShapelessRecipes implements CraftingRecipe {
// CraftBukkit end
public ItemStack b() {
return this.a;
return this.result;
}
public boolean a(InventoryCrafting inventorycrafting) {
ArrayList arraylist = new ArrayList(this.b);
ArrayList arraylist = new ArrayList(this.ingredients);
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 3; ++j) {
@@ -70,10 +70,10 @@ public class ShapelessRecipes implements CraftingRecipe {
}
public ItemStack b(InventoryCrafting inventorycrafting) {
return this.a.cloneItemStack();
return this.result.cloneItemStack();
}
public int a() {
return this.b.size();
return this.ingredients.size();
}
}