From f8fc9223b928ff3f8fb52cf2ffc600855b97cd0f Mon Sep 17 00:00:00 2001 From: StellarWind22 Date: Fri, 1 Dec 2023 09:08:09 -0600 Subject: [PATCH] Fixed adabranium integration --- .../basicshields/module/AdabraniumModule.java | 2 +- .../basicshields/module/GobberModule.java | 2 +- .../basicshields/util/ModRecipe.java | 69 +------------------ 3 files changed, 3 insertions(+), 70 deletions(-) diff --git a/src/main/java/com/github/crimsondawn45/basicshields/module/AdabraniumModule.java b/src/main/java/com/github/crimsondawn45/basicshields/module/AdabraniumModule.java index f0209ee..e4f894d 100644 --- a/src/main/java/com/github/crimsondawn45/basicshields/module/AdabraniumModule.java +++ b/src/main/java/com/github/crimsondawn45/basicshields/module/AdabraniumModule.java @@ -45,7 +45,7 @@ public void registerContent() { "entity/nether_shield_base"); //Recipe - this.addRecipe(nether_shield, ModRecipe.createSmithingRecipeNoTemplate(new Identifier("minecraft", "shield"), false, new Identifier("minecraft", "nether_brick"), false, nether_shield.getIdentifier())); + this.addRecipe(nether_shield, ModRecipe.createSmithingRecipe(new Identifier("minecraft","nether_brick"), false, new Identifier("minecraft", "shield"), false, new Identifier("minecraft", "nether_brick"), false, nether_shield.getIdentifier())); //Vibranium vibranium_shield = new ModShieldItem(this, "vibranium_shield", diff --git a/src/main/java/com/github/crimsondawn45/basicshields/module/GobberModule.java b/src/main/java/com/github/crimsondawn45/basicshields/module/GobberModule.java index 15ebace..8fd7ea0 100644 --- a/src/main/java/com/github/crimsondawn45/basicshields/module/GobberModule.java +++ b/src/main/java/com/github/crimsondawn45/basicshields/module/GobberModule.java @@ -119,6 +119,6 @@ public void registerContent() { "entity/gobber_dragon_shield_base"); //Recipe - this.addRecipe(gobber_dragon_shield, ModRecipe.createSmithingRecipeNoTemplate(gobber_end_shield.getIdentifier(), false, gobber_dragon_tag.id(), true, gobber_dragon_shield.getIdentifier())); + //this.addRecipe(gobber_dragon_shield, ModRecipe.createSmithingRecipeNoTemplate(gobber_end_shield.getIdentifier(), false, gobber_dragon_tag.id(), true, gobber_dragon_shield.getIdentifier())); } } \ No newline at end of file diff --git a/src/main/java/com/github/crimsondawn45/basicshields/util/ModRecipe.java b/src/main/java/com/github/crimsondawn45/basicshields/util/ModRecipe.java index 9444951..d92504e 100644 --- a/src/main/java/com/github/crimsondawn45/basicshields/util/ModRecipe.java +++ b/src/main/java/com/github/crimsondawn45/basicshields/util/ModRecipe.java @@ -278,71 +278,4 @@ public static JsonObject createSmithingRecipe(Identifier templateId, boolean isT return json; } - - /** - * * generates a JsonObject for a new smithing recipe - * - * @param inputId Identifier of the input - * @param isInputTag Is input a tag? - * @param additionId Identifier of the addition - * @param isAdditionTag Is addition a tag? - * @param outputId Output item Identifier - * - * @return Smithing Recipe in JsonObject Form - */ - public static JsonObject createSmithingRecipeNoTemplate(Identifier inputId, boolean isInputTag, Identifier additionId, boolean isAdditionTag, Identifier outputId) { - //Creating a new json object, where we will store our recipe. - JsonObject json = new JsonObject(); - - //The "type" of the recipe we are creating. In this case, a smithing recipe. - json.addProperty("type", "minecraft:smithing_transform"); - //This creates - //"type":"minecraft:smithing" - - /** - * * Create "base" object contains original item - */ - JsonObject base = new JsonObject(); - - if(isInputTag) { - base.addProperty("tag", inputId.toString()); - } else { - base.addProperty("item", inputId.toString()); - } - //Add "base" object - json.add("base", base); - //This creates - //"base":{ - // "item": "minecraft:stick" - //} - - /** - * *Create "addition" object contains additive - */ - JsonObject addition = new JsonObject(); - - if(isAdditionTag) { - addition.addProperty("tag", additionId.toString()); - } else { - addition.addProperty("item", additionId.toString()); - } - //Add "addition" object - json.add("addition", addition); - //This creates - //"base":{ - // "item": "minecraft:stick" - //} - - - /** - * *Create "result" object contains result - */ - JsonObject result = new JsonObject(); - result.addProperty("item", outputId.toString()); - - //Add "result" object - json.add("result", result); - - return json; - } -} +} \ No newline at end of file