diff --git a/build.gradle b/build.gradle index 7130ca8..bf0731e 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ apply plugin: 'net.minecraftforge.gradle.forge' //Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. -version = "1.12.2-1.3" +version = "1.12.2-1.3b" group = "wanion.unidict" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "UniDict" diff --git a/src/main/java/wanion/unidict/common/Reference.java b/src/main/java/wanion/unidict/common/Reference.java index aa27619..2c2cc16 100644 --- a/src/main/java/wanion/unidict/common/Reference.java +++ b/src/main/java/wanion/unidict/common/Reference.java @@ -14,7 +14,7 @@ public final class Reference { public static final String MOD_ID = "unidict"; public static final String MOD_NAME = "UniDict"; - public static final String MOD_VERSION = "1.12.2-1.3"; + public static final String MOD_VERSION = "1.12.2-1.3b"; public static final String DEPENDENCIES = "required-after:wanionlib@[1.12.2-1.2,);after:*"; public static final char SLASH = separatorChar; public static final String MC_VERSION = "[1.12,]"; diff --git a/src/main/java/wanion/unidict/integration/ForestryIntegration.java b/src/main/java/wanion/unidict/integration/ForestryIntegration.java index 54220f0..5610bc4 100644 --- a/src/main/java/wanion/unidict/integration/ForestryIntegration.java +++ b/src/main/java/wanion/unidict/integration/ForestryIntegration.java @@ -22,7 +22,6 @@ final class ForestryIntegration extends AbstractIntegrationThread { private Set carpenterRecipes = Util.getField(CarpenterRecipeManager.class, "recipes", null, Set.class); - private static final RegistryNamespaced itemRegistry = Item.REGISTRY; ForestryIntegration() { @@ -49,8 +48,8 @@ private void removeBadCarpenterOutputs(@Nonnull final Set carp private void bronzeThings() { UniResourceContainer ingotBronze = resourceHandler.getContainer("ingotBronze"); - final Item brokenBronzePickaxe = itemRegistry.getObject(new ResourceLocation("forestry", "brokenBronzePickaxe")); - final Item brokenBronzeShovel = itemRegistry.getObject(new ResourceLocation("forestry", "brokenBronzeShovel")); + final Item brokenBronzePickaxe = Item.REGISTRY.getObject(new ResourceLocation("forestry", "brokenBronzePickaxe")); + final Item brokenBronzeShovel = Item.REGISTRY.getObject(new ResourceLocation("forestry", "brokenBronzeShovel")); if (brokenBronzePickaxe != null) carpenterRecipes.add(new CarpenterRecipe(5, null, ItemStack.EMPTY, new ShapedRecipeCustom(ingotBronze.getMainEntry(2), "X ", " ", " ", 'X', new ItemStack(brokenBronzePickaxe)))); if (brokenBronzeShovel != null) diff --git a/src/main/java/wanion/unidict/recipe/IC2RecipeResearcher.java b/src/main/java/wanion/unidict/recipe/IC2RecipeResearcher.java index 794b95e..37ba593 100644 --- a/src/main/java/wanion/unidict/recipe/IC2RecipeResearcher.java +++ b/src/main/java/wanion/unidict/recipe/IC2RecipeResearcher.java @@ -15,6 +15,7 @@ import ic2.core.recipe.AdvRecipe; import ic2.core.recipe.AdvShapelessRecipe; import ic2.core.recipe.RecipeInputOreDict; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.oredict.ShapedOreRecipe; @@ -31,6 +32,8 @@ public class IC2RecipeResearcher extends AbstractRecipeResearcher { + private final Item ic2ForgeHammer = Item.REGISTRY.getObject(new ResourceLocation("ic2", "forge_hammer")); + @Override public int getShapedRecipeKey(@Nonnull AdvRecipe recipe) { @@ -155,7 +158,7 @@ else if (notEmpty) public ShapelessOreRecipe getNewShapelessRecipe(@Nonnull final AdvShapelessRecipe recipe) { final List newInputs = new ArrayList<>(); - if (itemStacksOnly){ + if (itemStacksOnly) { for (final IRecipeInput recipeInput : recipe.input) { final List inputs = recipeInput.getInputs(); if (!inputs.isEmpty()) @@ -171,8 +174,12 @@ public ShapelessOreRecipe getNewShapelessRecipe(@Nonnull final AdvShapelessRecip newInputs.add(oreName); else if (notEmpty) newInputs.add(recipeInput.getInputs().get(0)); - } else - newInputs.add(oreName); + } else { + if (oreName.equals("craftingToolForgeHammer") && ic2ForgeHammer != null) + newInputs.add(new ItemStack(ic2ForgeHammer, 1, 32767)); + else + newInputs.add(oreName); + } } } final UniResourceContainer outputContainer = resourceHandler.getContainer(recipe.getRecipeOutput()); @@ -187,7 +194,7 @@ else if (notEmpty) public ShapelessOreRecipe getNewShapelessFromShapedRecipe(@Nonnull final AdvRecipe recipe) { final List newInputs = new ArrayList<>(); - if (itemStacksOnly){ + if (itemStacksOnly) { for (final IRecipeInput recipeInput : recipe.input) { final List inputs = recipeInput.getInputs(); if (!inputs.isEmpty()) diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 4cfcbb4..6daddd1 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -1,9 +1,9 @@ [ { - "modId": "unidict", + "modid": "unidict", "name": "UniDict", "description": "a mod about unifying all the things.", - "version": "1.12.2-1.3", + "version": "1.12.2-1.3b", "mcversion": "${mcversion}", "url": "http://minecraft.curseforge.com/projects/unidict", "updateUrl": "", @@ -13,4 +13,4 @@ "screenshots": [], "dependencies": [] } -] \ No newline at end of file +] diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta new file mode 100644 index 0000000..1a620be --- /dev/null +++ b/src/main/resources/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 3, + "description": "UniDict Resources" + } +}