From 64e495e32c42083e0d929ba0426289bae90ee3af Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Sat, 8 Oct 2016 20:35:41 +0200 Subject: [PATCH] Auto enable subitems when parser enables items. --- src/main/java/gregtech/GT_Mod.java | 31 ++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 6ab68dbd..01ef1f9a 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -361,7 +361,9 @@ public class GT_Mod implements IGT_Mod { for(String test : oreTags){ if(StringUtils.startsWithAny(test, preS)){ mMTTags.add(test); - System.out.println("oretag: "+test);}} + if(GT_Values.D1) + System.out.println("oretag: "+test); + }} System.out.println("reenableMetaItems"); for(String reEnable : mMTTags){ @@ -370,7 +372,32 @@ public class GT_Mod implements IGT_Mod { Materials tName = Materials.get(reEnable.replaceFirst(tPrefix.toString(), "")); if(tName!=null){ tPrefix.mDisabledItems.remove(tName); - tPrefix.mGeneratedItems.add(tName);}else{System.out.println("noMaterial "+reEnable);} + tPrefix.mGeneratedItems.add(tName); + if(tPrefix == OrePrefixes.screw){ + OrePrefixes.bolt.mDisabledItems.remove(tName); + OrePrefixes.bolt.mGeneratedItems.add(tName); + OrePrefixes.stick.mDisabledItems.remove(tName); + OrePrefixes.stick.mGeneratedItems.add(tName); + } + if(tPrefix == OrePrefixes.round){ + OrePrefixes.nugget.mDisabledItems.remove(tName); + OrePrefixes.nugget.mGeneratedItems.add(tName); + } + if(tPrefix == OrePrefixes.spring){ + OrePrefixes.stickLong.mDisabledItems.remove(tName); + OrePrefixes.stickLong.mGeneratedItems.add(tName); + OrePrefixes.stick.mDisabledItems.remove(tName); + OrePrefixes.stick.mGeneratedItems.add(tName); + } + if(tPrefix == OrePrefixes.springSmall){ + OrePrefixes.stick.mDisabledItems.remove(tName); + OrePrefixes.stick.mGeneratedItems.add(tName); + } + if(tPrefix == OrePrefixes.stickLong){ + OrePrefixes.stick.mDisabledItems.remove(tName); + OrePrefixes.stick.mGeneratedItems.add(tName); + } + }else{System.out.println("noMaterial "+reEnable);} }else{System.out.println("noPrefix "+reEnable);}} new Enchantment_EnderDamage();