From c5d6904a7ef42444a09a27346acfbb21ca9d1440 Mon Sep 17 00:00:00 2001 From: KnightMiner Date: Sat, 24 Mar 2018 17:40:45 -0500 Subject: [PATCH] Update required Forge version, remove old textures for bucket for pre 1.12.2 --- .../tcomplement/TinkersComplement.java | 4 +-- .../tcomplement/common/Config.java | 7 ---- .../tcomplement/shared/ModuleCommons.java | 6 ++-- .../tcomplement/shared/item/ItemCast.java | 30 ------------------ .../shared/item/ItemMaterials.java | 30 ------------------ .../assets/tcomplement/blockstates/cast.json | 3 +- .../tcomplement/blockstates/materials.json | 3 +- .../items/materials/cast_bucket_old.png | Bin 478 -> 0 bytes .../items/materials/stone_bucket_old.png | Bin 411 -> 0 bytes 9 files changed, 6 insertions(+), 77 deletions(-) delete mode 100644 src/main/java/knightminer/tcomplement/shared/item/ItemCast.java delete mode 100644 src/main/java/knightminer/tcomplement/shared/item/ItemMaterials.java delete mode 100644 src/main/resources/assets/tcomplement/textures/items/materials/cast_bucket_old.png delete mode 100644 src/main/resources/assets/tcomplement/textures/items/materials/stone_bucket_old.png diff --git a/src/main/java/knightminer/tcomplement/TinkersComplement.java b/src/main/java/knightminer/tcomplement/TinkersComplement.java index 4802a75..b12c293 100644 --- a/src/main/java/knightminer/tcomplement/TinkersComplement.java +++ b/src/main/java/knightminer/tcomplement/TinkersComplement.java @@ -20,12 +20,12 @@ modid = TinkersComplement.modID, name = TinkersComplement.modName, version = TinkersComplement.modVersion, - dependencies = "required-after:forge;" + dependencies = "required-after:forge@[14.23.1.2574,);" + "required-after:mantle;" + "required-after:tconstruct@[1.12-2.7.4.38,);" + "after:chisel@[MC1.12-0.1.0.22,);" + "after:exnihilocreatio", - acceptedMinecraftVersions = "[1.12, 1.13)") + acceptedMinecraftVersions = "[1.12.2, 1.13)") public class TinkersComplement { public static final String modID = "tcomplement"; public static final String modVersion = "${version}"; diff --git a/src/main/java/knightminer/tcomplement/common/Config.java b/src/main/java/knightminer/tcomplement/common/Config.java index 9a31f8c..cfd6284 100644 --- a/src/main/java/knightminer/tcomplement/common/Config.java +++ b/src/main/java/knightminer/tcomplement/common/Config.java @@ -6,7 +6,6 @@ import knightminer.tcomplement.TinkersComplement; import net.minecraft.util.JsonUtils; -import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.crafting.IConditionFactory; import net.minecraftforge.common.crafting.JsonContext; @@ -20,9 +19,6 @@ public class Config { public static float oreToIngotRatio = 1.0f; public static boolean blacklistMelterStone = true; - //client - public static boolean oldBucketTexture = false; - static Configuration configFile; @@ -35,9 +31,6 @@ public static void load(FMLPreInitializationEvent event) { oreToIngotRatio = configFile.getFloat("oreToIngotRatio", "melter", 1.0f, 0f, 16.0f, "Ratio of ore to material produced in the melter."); - // client - oldBucketTexture = MinecraftForge.MC_VERSION.equals("1.12") || MinecraftForge.MC_VERSION.equals("1.12.1"); - if(configFile.hasChanged()) { configFile.save(); } diff --git a/src/main/java/knightminer/tcomplement/shared/ModuleCommons.java b/src/main/java/knightminer/tcomplement/shared/ModuleCommons.java index 6c5bd3b..dd6e2e1 100644 --- a/src/main/java/knightminer/tcomplement/shared/ModuleCommons.java +++ b/src/main/java/knightminer/tcomplement/shared/ModuleCommons.java @@ -5,8 +5,6 @@ import knightminer.tcomplement.common.CommonProxy; import knightminer.tcomplement.common.PulseBase; import knightminer.tcomplement.library.TCompRegistry; -import knightminer.tcomplement.shared.item.ItemCast; -import knightminer.tcomplement.shared.item.ItemMaterials; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.event.RegistryEvent.Register; @@ -43,11 +41,11 @@ public void registerItems(Register event) { IForgeRegistry r = event.getRegistry(); // materials - materials = registerItem(r, new ItemMaterials(), "materials"); + materials = registerItem(r, new ItemMetaDynamic(), "materials"); materials.setCreativeTab(TCompRegistry.tabGeneral); // custom casts - castCustom = registerItem(r, new ItemCast(), "cast"); + castCustom = registerItem(r, new CastCustom(), "cast"); castCustom.setCreativeTab(TCompRegistry.tabGeneral); if(isFeaturesLoaded()) { diff --git a/src/main/java/knightminer/tcomplement/shared/item/ItemCast.java b/src/main/java/knightminer/tcomplement/shared/item/ItemCast.java deleted file mode 100644 index ff360a9..0000000 --- a/src/main/java/knightminer/tcomplement/shared/item/ItemCast.java +++ /dev/null @@ -1,30 +0,0 @@ -package knightminer.tcomplement.shared.item; - -import gnu.trove.procedure.TIntObjectProcedure; -import knightminer.tcomplement.common.Config; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.Item; -import net.minecraftforge.client.model.ModelLoader; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import slimeknights.tconstruct.smeltery.item.CastCustom; - -public class ItemCast extends CastCustom { - @Override - @SideOnly(Side.CLIENT) - protected void registerItemModels(final Item item) { - names.forEachEntry(new TIntObjectProcedure() { - @Override - public boolean execute(int meta, String name) { - // old bucket texture - if(Config.oldBucketTexture && name.equals("bucket")) { - name = "bucket_old"; - } - - // tell the game which model to use for this item-meta combination - ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(item.getRegistryName(), name)); - return true; - } - }); - } -} diff --git a/src/main/java/knightminer/tcomplement/shared/item/ItemMaterials.java b/src/main/java/knightminer/tcomplement/shared/item/ItemMaterials.java deleted file mode 100644 index 690a5ef..0000000 --- a/src/main/java/knightminer/tcomplement/shared/item/ItemMaterials.java +++ /dev/null @@ -1,30 +0,0 @@ -package knightminer.tcomplement.shared.item; - -import gnu.trove.procedure.TIntObjectProcedure; -import knightminer.tcomplement.common.Config; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.Item; -import net.minecraftforge.client.model.ModelLoader; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; -import slimeknights.mantle.item.ItemMetaDynamic; - -public class ItemMaterials extends ItemMetaDynamic { - @Override - @SideOnly(Side.CLIENT) - protected void registerItemModels(final Item item) { - names.forEachEntry(new TIntObjectProcedure() { - @Override - public boolean execute(int meta, String name) { - // old bucket texture - if(Config.oldBucketTexture && name.equals("stone_bucket")) { - name = "stone_bucket_old"; - } - - // tell the game which model to use for this item-meta combination - ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(item.getRegistryName(), name)); - return true; - } - }); - } -} diff --git a/src/main/resources/assets/tcomplement/blockstates/cast.json b/src/main/resources/assets/tcomplement/blockstates/cast.json index 5240fba..2591c45 100644 --- a/src/main/resources/assets/tcomplement/blockstates/cast.json +++ b/src/main/resources/assets/tcomplement/blockstates/cast.json @@ -5,7 +5,6 @@ "model": "forge:item-layer" }, "variants": { - "bucket": [{ "textures": { "layer0": "tcomplement:items/materials/cast_bucket" }}], - "bucket_old": [{ "textures": { "layer0": "tcomplement:items/materials/cast_bucket_old" }}] + "bucket": [{ "textures": { "layer0": "tcomplement:items/materials/cast_bucket" }}] } } diff --git a/src/main/resources/assets/tcomplement/blockstates/materials.json b/src/main/resources/assets/tcomplement/blockstates/materials.json index 343d6b5..c6eecfd 100644 --- a/src/main/resources/assets/tcomplement/blockstates/materials.json +++ b/src/main/resources/assets/tcomplement/blockstates/materials.json @@ -5,7 +5,6 @@ "model": "forge:item-layer" }, "variants": { - "stone_bucket": [{ "textures": { "layer0": "tcomplement:items/materials/stone_bucket" }}], - "stone_bucket_old": [{ "textures": { "layer0": "tcomplement:items/materials/stone_bucket_old" }}] + "stone_bucket": [{ "textures": { "layer0": "tcomplement:items/materials/stone_bucket" }}] } } diff --git a/src/main/resources/assets/tcomplement/textures/items/materials/cast_bucket_old.png b/src/main/resources/assets/tcomplement/textures/items/materials/cast_bucket_old.png deleted file mode 100644 index aab370616cef49f81971b19e089ee45d437ad766..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 478 zcmV<40U`d0P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5&!@T5&_cPe*6Fc00(qQO+^Rb0SO8- z28w5r%K!iX8FWQhbW?9;ba!ELWdLwtX>N2bZe?^JG%heMF*ZbLuk`=`0Xs=VK~y+T zt&_`6!ax{>=Y>SY>%vEH;R>{bs_&q&1gHGl?f7f%cX3!6wJ8ZlHa+#pB(EjJKO@&g->|j+sK^ zbP0rQ?sO4OIga~^$T?FMeX&$wfUU)lSEfN;>S?s}7%XjhAf$`<(T_XyLASDwi<1Qq zmZDu)8G7+6O#4t?gMK{UGx*Ep0mf?20Jm~r1C{l_Go`==#iKb|0v%WI48k-6BX|$a zGa)+0T5^OY&VqF7snJU4mt1}XRR91007*qoM6N<$f}G{OGynhq diff --git a/src/main/resources/assets/tcomplement/textures/items/materials/stone_bucket_old.png b/src/main/resources/assets/tcomplement/textures/items/materials/stone_bucket_old.png deleted file mode 100644 index 90b512acae8cb2834547a87c574f7272a1190a3f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 411 zcmV;M0c8G(P)+*Fc60K>AY6# zSg~RQ70ct#@((1$HSS?K7auWYzDy?ZWf;c4&<_5BcF=WQ5;%?{(XG97#KJ7gs3;1m zs*38mW}2pvQZ+_?c%Da56j72SEXebm1!Y+>khE<}eczL9+fpJ0VHolRg3~mW6463} zEU?D1th)fa@B7Y^LZr$thU3L?{4ChEjU@m9DmVgUz%hJn); z?*VV*s{r6A2ogLMPjKl7APItieBYP