Updated to rename revision 02
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user