diff options
author | GWYOG <jjn1jjn2@163.com> | 2016-11-10 12:51:44 +0800 |
---|---|---|
committer | GWYOG <jjn1jjn2@163.com> | 2016-11-10 12:51:44 +0800 |
commit | 96a346cbe022086815d014e3616182df05b9bfd8 (patch) | |
tree | 2b413aa832d1f178321186a5baf22e7212018e0e /src/main/java/pers/gwyog/gtneioreplugin/util | |
parent | 4d9e74936b20d24020b0fdebed723caad9cbf9b4 (diff) | |
download | GT5-Unofficial-96a346cbe022086815d014e3616182df05b9bfd8.tar.gz GT5-Unofficial-96a346cbe022086815d014e3616182df05b9bfd8.tar.bz2 GT5-Unofficial-96a346cbe022086815d014e3616182df05b9bfd8.zip |
Add 3 plugins supporting GT6 and refactor some code
Diffstat (limited to 'src/main/java/pers/gwyog/gtneioreplugin/util')
-rw-r--r-- | src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreLayerHelper.java (renamed from src/main/java/pers/gwyog/gtneioreplugin/util/GTOreLayerHelper.java) | 16 | ||||
-rw-r--r-- | src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreSmallHelper.java (renamed from src/main/java/pers/gwyog/gtneioreplugin/util/GTSmallOreHelper.java) | 51 | ||||
-rw-r--r-- | src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreBedrockHelper.java | 56 | ||||
-rw-r--r-- | src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreLayerHelper.java | 76 | ||||
-rw-r--r-- | src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreSmallHelper.java | 100 |
5 files changed, 268 insertions, 31 deletions
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/GTOreLayerHelper.java b/src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreLayerHelper.java index fd674464cb..9026aec71d 100644 --- a/src/main/java/pers/gwyog/gtneioreplugin/util/GTOreLayerHelper.java +++ b/src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreLayerHelper.java @@ -12,9 +12,10 @@ import gregtech.api.GregTech_API; import gregtech.common.GT_Worldgen_GT_Ore_Layer; import net.minecraft.client.resources.I18n; import net.minecraft.item.ItemStack; +import pers.gwyog.gtneioreplugin.GTNEIOrePlugin; import sun.awt.windows.WWindowPeer; -public class GTOreLayerHelper { +public class GT5OreLayerHelper { public static boolean restrictBiomeSupport = false; public static boolean endAsteroidSupport = false; public static boolean gcBasicSupport = false; @@ -22,11 +23,11 @@ public class GTOreLayerHelper { public static boolean immersiveEngineeringSupport = false; public static HashMap<String, OreLayerWrapper> mapOreLayerWrapper = new HashMap<String, OreLayerWrapper>(); - public GTOreLayerHelper() { + public GT5OreLayerHelper() { checkExtraSupport(); for (GT_Worldgen_GT_Ore_Layer tWorldGen: GT_Worldgen_GT_Ore_Layer.sList) mapOreLayerWrapper.put(tWorldGen.mWorldGenName, new OreLayerWrapper(tWorldGen)); - } + } private static void checkExtraSupport() { Class clazzGTOreLayer = null; @@ -54,7 +55,7 @@ public class GTOreLayerHelper { } // immersive engineering support for GT5.09.25+ - if (Loader.isModLoaded("ImmersiveEngineering")) { + if (Loader.instance().isModLoaded("ImmersiveEngineering")) { Class clazzGTMod = null; Class clazzGTProxy = null; Class clazzGTAPI = null; @@ -106,13 +107,13 @@ public class GTOreLayerHelper { this.genEnd = worldGen.mEnd; if (restrictBiomeSupport) this.restrictBiome = worldGen.mRestrictBiome; - if (GTOreLayerHelper.gcBasicSupport) { + if (GT5OreLayerHelper.gcBasicSupport) { this.genMoon = worldGen.mMoon; this.genMars = worldGen.mMars; } - if (GTOreLayerHelper.endAsteroidSupport) + if (GT5OreLayerHelper.endAsteroidSupport) this.genEndAsteroid = worldGen.mEndAsteroid; - if (GTOreLayerHelper.gcAsteroidSupport) + if (GT5OreLayerHelper.gcAsteroidSupport) this.genGCAsteroid = worldGen.mAsteroid; // immersive engineering support for GT5.09.25+ @@ -121,6 +122,7 @@ public class GTOreLayerHelper { this.weightedIEChance = String.format("%.3f%%", (100.0f*worldGen.mWeight)/GT_Worldgen_GT_Ore_Layer.sWeight/8); } } + } } diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/GTSmallOreHelper.java b/src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreSmallHelper.java index 5c8168e503..69311a83ee 100644 --- a/src/main/java/pers/gwyog/gtneioreplugin/util/GTSmallOreHelper.java +++ b/src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreSmallHelper.java @@ -13,16 +13,17 @@ import gregtech.api.world.GT_Worldgen; import gregtech.common.GT_Worldgen_GT_Ore_SmallPieces; import net.minecraft.client.resources.I18n; import net.minecraft.item.ItemStack; +import pers.gwyog.gtneioreplugin.GTNEIOrePlugin; -public class GTSmallOreHelper { +public class GT5OreSmallHelper { public static boolean restrictBiomeSupport = false; public static boolean gcBasicSupport = false; - public static List<ItemStack> smallOreList = new ArrayList<ItemStack>(); - public static HashMap<String, SmallOreWrapper> mapSmallOreWrapper = new HashMap<String, SmallOreWrapper>(); + public static List<ItemStack> oreSmallList = new ArrayList<ItemStack>(); + public static HashMap<String, OreSmallWrapper> mapOreSmallWrapper = new HashMap<String, OreSmallWrapper>(); public static HashMap<String, Short> mapOreDropUnlocalizedNameToOreMeta = new HashMap<String, Short>(); public static HashMap<Short, List<ItemStack>> mapOreMetaToOreDrops = new HashMap<Short, List<ItemStack>>(); - public GTSmallOreHelper() { + public GT5OreSmallHelper() { checkExtraSupport(); ItemStack stack; Materials material; @@ -32,7 +33,7 @@ public class GTSmallOreHelper { GT_Worldgen_GT_Ore_SmallPieces worldGenSmallPieces = (GT_Worldgen_GT_Ore_SmallPieces)worldGen; meta = worldGenSmallPieces.mMeta; material = GregTech_API.sGeneratedMaterials[meta]; - mapSmallOreWrapper.put(worldGen.mWorldGenName, new SmallOreWrapper(worldGenSmallPieces)); + mapOreSmallWrapper.put(worldGen.mWorldGenName, new OreSmallWrapper(worldGenSmallPieces)); if (!mapOreMetaToOreDrops.keySet().contains(meta)) { List<ItemStack> stackList = new ArrayList<ItemStack>(); stack = GT_OreDictUnificator.get(OrePrefixes.gemExquisite, material, GT_OreDictUnificator.get(OrePrefixes.gem, material, 1L), 1L); @@ -49,35 +50,37 @@ public class GTSmallOreHelper { if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);} stack = GT_OreDictUnificator.get(OrePrefixes.dustImpure, material, 1L); if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);} - smallOreList.add(new ItemStack(GregTech_API.sBlockOres1, 1, meta+16000)); + oreSmallList.add(new ItemStack(GregTech_API.sBlockOres1, 1, meta+16000)); mapOreMetaToOreDrops.put(meta, stackList); } } } private static void checkExtraSupport() { - Class clazzGTSmallOre = null; - try { - clazzGTSmallOre = Class.forName("gregtech.common.GT_Worldgen_GT_Ore_SmallPieces"); - } catch (ClassNotFoundException e) {} - if (clazzGTSmallOre != null) { + if (GTNEIOrePlugin.GTVersion.equals("GT5")) { + Class clazzGTOreSmall = null; try { - Field fieldRestrictBiome = clazzGTSmallOre.getField("mRestrictBiome");; - restrictBiomeSupport = true; - } catch (Exception e) {} - try { - Field fieldGCMoon = clazzGTSmallOre.getField("mMoon"); - Field fieldGCMars = clazzGTSmallOre.getField("mMars"); - gcBasicSupport = true; - } catch (Exception e) {} - } + clazzGTOreSmall = Class.forName("gregtech.common.GT_Worldgen_GT_Ore_SmallPieces"); + } catch (ClassNotFoundException e) {} + if (clazzGTOreSmall != null) { + try { + Field fieldRestrictBiome = clazzGTOreSmall.getField("mRestrictBiome");; + restrictBiomeSupport = true; + } catch (Exception e) {} + try { + Field fieldGCMoon = clazzGTOreSmall.getField("mMoon"); + Field fieldGCMars = clazzGTOreSmall.getField("mMars"); + gcBasicSupport = true; + } catch (Exception e) {} + } + } } public static Materials[] getDroppedDusts() { return new Materials[]{Materials.Stone, Materials.Netherrack, Materials.Endstone, Materials.GraniteBlack, Materials.GraniteRed, Materials.Marble, Materials.Basalt, Materials.Stone}; } - public class SmallOreWrapper { + public class OreSmallWrapper { public String oreGenName; public short oreMeta; public String worldGenHeightRange; @@ -89,7 +92,7 @@ public class GTSmallOreHelper { public boolean genMoon = false; public boolean genMars = false; - public SmallOreWrapper(GT_Worldgen_GT_Ore_SmallPieces worldGen) { + public OreSmallWrapper(GT_Worldgen_GT_Ore_SmallPieces worldGen) { this.oreGenName = worldGen.mWorldGenName; this.oreMeta = worldGen.mMeta; this.worldGenHeightRange = worldGen.mMinY + "-" + worldGen.mMaxY; @@ -97,9 +100,9 @@ public class GTSmallOreHelper { this.genOverworld = worldGen.mOverworld; this.genNether = worldGen.mNether; this.genEnd = worldGen.mEnd; - if (GTSmallOreHelper.restrictBiomeSupport) + if (GT5OreSmallHelper.restrictBiomeSupport) this.restrictBiome = worldGen.mRestrictBiome; - if (GTSmallOreHelper.gcBasicSupport) { + if (GT5OreSmallHelper.gcBasicSupport) { this.genMoon = worldGen.mMoon; this.genMars = worldGen.mMars; } diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreBedrockHelper.java b/src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreBedrockHelper.java new file mode 100644 index 0000000000..be95bcc7b3 --- /dev/null +++ b/src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreBedrockHelper.java @@ -0,0 +1,56 @@ +package pers.gwyog.gtneioreplugin.util; + +import java.util.HashMap; + +import gregapi.data.CS; +import gregapi.data.OP; +import gregapi.lang.LanguageHandler; +import gregapi.oredict.OreDictMaterial; +import gregapi.worldgen.WorldgenObject; +import gregapi.worldgen.Worldgen_GT_Ore_Bedrock; +import gregapi.worldgen.Worldgenerator; +import net.minecraft.client.resources.I18n; + +public class GT6OreBedrockHelper { + public static HashMap<String, OreBedrockWrapper> mapOreBedrockWrapper = new HashMap<String, OreBedrockWrapper>(); + public static HashMap<Short, String> mapMetaToLocalizedName = new HashMap<Short, String>(); + + public GT6OreBedrockHelper() { + for (WorldgenObject worldGenOreBedrock : Worldgenerator.sWorldgenList) + if (worldGenOreBedrock.mWorldGenName.startsWith("ore.bedrock.") && worldGenOreBedrock instanceof Worldgen_GT_Ore_Bedrock) + mapOreBedrockWrapper.put(worldGenOreBedrock.mWorldGenName, new OreBedrockWrapper((Worldgen_GT_Ore_Bedrock)worldGenOreBedrock)); + } + + public static String getLocalizedOreBedrockName(short meta) { + // meta==-1 means OreDictMaterial is MT.NULL + if (meta==-1) + return I18n.format("gtnop.ore.null.name"); + else + return LanguageHandler.getLocalName(OP.oreBedrock, CS.BlocksGT.oreBedrock.getMetaMaterial(meta)); + } + + public class OreBedrockWrapper { + public String veinName; + public short meta; + public int probability; + public boolean genOverworld = false; + public boolean genNether = false; + public boolean genEnd = false; + + public OreBedrockWrapper(Worldgen_GT_Ore_Bedrock worldGen) { + this.veinName = worldGen.mWorldGenName; + this.meta = worldGen.mMaterial.mID; + this.probability = worldGen.mProbability; + this.genOverworld = worldGen.mOverworld; + this.genNether = worldGen.mNether; + this.genEnd = worldGen.mEnd; + if (!GT6OreLayerHelper.mapMetaToLocalizedName.keySet().contains(meta)) + GT6OreLayerHelper.mapMetaToLocalizedName.put(meta, GT6OreLayerHelper.getLocalizedOreName(meta)); + if (!GT6OreSmallHelper.mapMetaToLocalizedName.keySet().contains(meta)) + GT6OreSmallHelper.mapMetaToLocalizedName.put(meta, GT6OreSmallHelper.getLocalizedSmallOreName(meta)); + if (!mapMetaToLocalizedName.keySet().contains(meta)) + mapMetaToLocalizedName.put(meta, getLocalizedOreBedrockName(meta)); + } + } + +} diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreLayerHelper.java b/src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreLayerHelper.java new file mode 100644 index 0000000000..ce5da9feb8 --- /dev/null +++ b/src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreLayerHelper.java @@ -0,0 +1,76 @@ +package pers.gwyog.gtneioreplugin.util; + +import java.lang.reflect.Field; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Set; + +import cpw.mods.fml.common.Loader; +import gregapi.block.IBlockPlacable; +import gregapi.block.prefixblock.PrefixBlock; +import gregapi.data.CS; +import gregapi.data.OP; +import gregapi.lang.LanguageHandler; +import gregapi.worldgen.Worldgen_GT_Ore_Layer; +import gregtech.GT_Mod; +import net.minecraft.client.resources.I18n; +import net.minecraft.item.ItemStack; +import pers.gwyog.gtneioreplugin.GTNEIOrePlugin; + +public class GT6OreLayerHelper { + public static HashMap<String, OreLayerWrapper> mapOreLayerWrapper = new HashMap<String, OreLayerWrapper>(); + public static HashMap<Short, String> mapMetaToLocalizedName = new HashMap<Short, String>(); + public static Set<PrefixBlock> setOreNormalBasicTypes = new HashSet<PrefixBlock>(); + + public GT6OreLayerHelper() { + for (Worldgen_GT_Ore_Layer tWorldGen: Worldgen_GT_Ore_Layer.sList) + mapOreLayerWrapper.put(tWorldGen.mWorldGenName, new OreLayerWrapper(tWorldGen)); + Set<IBlockPlacable> setNormalOreBasicTypesTemp = new HashSet<IBlockPlacable>(CS.BlocksGT.stoneToNormalOres.values()); + for (IBlockPlacable block: setNormalOreBasicTypesTemp) + if (block instanceof PrefixBlock) + setOreNormalBasicTypes.add((PrefixBlock)block); + } + + public static String getLocalizedOreName(short meta) { + // meta==-1 means OreDictMaterial is MT.NULL + if (meta==-1) + return I18n.format("gtnop.ore.null.name"); + else + return LanguageHandler.getLocalName(OP.ore, CS.BlocksGT.ore.getMetaMaterial(meta)); + } + + public class OreLayerWrapper { + public String veinName; + public short primaryMeta; + public short secondaryMeta; + public short betweenMeta; + public short sporadicMeta; + public String worldGenHeightRange; + public String weightedChance; + public boolean genOverworld = false; + public boolean genNether = false; + public boolean genEnd = false; + + public OreLayerWrapper(Worldgen_GT_Ore_Layer worldGen) { + this.veinName = worldGen.mWorldGenName; + this.primaryMeta = worldGen.mPrimaryMeta; + this.secondaryMeta = worldGen.mSecondaryMeta; + this.betweenMeta = worldGen.mBetweenMeta; + this.sporadicMeta = worldGen.mSporadicMeta; + this.worldGenHeightRange = worldGen.mMinY + "-" + worldGen.mMaxY; + this.weightedChance = String.format("%.2f%%", (100.0f*worldGen.mWeight)/Worldgen_GT_Ore_Layer.sWeight); + this.genOverworld = worldGen.mOverworld; + this.genNether = worldGen.mNether; + this.genEnd = worldGen.mEnd; + if (!mapMetaToLocalizedName.keySet().contains(primaryMeta)) + mapMetaToLocalizedName.put(primaryMeta, getLocalizedOreName(primaryMeta)); + if (!mapMetaToLocalizedName.keySet().contains(secondaryMeta)) + mapMetaToLocalizedName.put(secondaryMeta, getLocalizedOreName(secondaryMeta)); + if (!mapMetaToLocalizedName.keySet().contains(betweenMeta)) + mapMetaToLocalizedName.put(betweenMeta, getLocalizedOreName(betweenMeta)); + if (!mapMetaToLocalizedName.keySet().contains(sporadicMeta)) + mapMetaToLocalizedName.put(sporadicMeta, getLocalizedOreName(sporadicMeta)); + } + } + +} diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreSmallHelper.java b/src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreSmallHelper.java new file mode 100644 index 0000000000..33598b0d98 --- /dev/null +++ b/src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreSmallHelper.java @@ -0,0 +1,100 @@ +package pers.gwyog.gtneioreplugin.util; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import gregapi.block.IBlockPlacable; +import gregapi.block.prefixblock.PrefixBlock; +import gregapi.data.CS; +import gregapi.data.MT; +import gregapi.data.OP; +import gregapi.lang.LanguageHandler; +import gregapi.oredict.OreDictMaterial; +import gregapi.worldgen.WorldgenObject; +import gregapi.worldgen.Worldgen_GT_Ore_SmallPieces; +import gregapi.worldgen.Worldgenerator; +import net.minecraft.client.resources.I18n; +import net.minecraft.item.ItemStack; +import pers.gwyog.gtneioreplugin.GTNEIOrePlugin; + +public class GT6OreSmallHelper { + public static List<ItemStack> oreSmallList = new ArrayList<ItemStack>(); + public static HashMap<String, OreSmallWrapper> mapOreSmallWrapper = new HashMap<String, OreSmallWrapper>(); + public static HashMap<String, Short> mapOreDropUnlocalizedNameToOreMeta = new HashMap<String, Short>(); + public static HashMap<Short, List<ItemStack>> mapOreMetaToOreDrops = new HashMap<Short, List<ItemStack>>(); + public static HashMap<Short, String> mapMetaToLocalizedName = new HashMap<Short, String>(); + public static Set<PrefixBlock> setOreSmallBasicTypes = new HashSet<PrefixBlock>(); + + public GT6OreSmallHelper() { + ItemStack stack; + OreDictMaterial material; + PrefixBlock oreSmall = CS.BlocksGT.oreSmall; + short meta; + for (WorldgenObject worldGen : Worldgenerator.sWorldgenList) + if (worldGen.mWorldGenName.startsWith("ore.small.") && worldGen instanceof Worldgen_GT_Ore_SmallPieces) { + Worldgen_GT_Ore_SmallPieces worldGenSmallPieces = (Worldgen_GT_Ore_SmallPieces)worldGen; + meta = worldGenSmallPieces.mMeta; + material = oreSmall.getMetaMaterial(meta); + mapOreSmallWrapper.put(worldGen.mWorldGenName, new OreSmallWrapper(worldGenSmallPieces)); + if (!mapOreMetaToOreDrops.keySet().contains(meta)) { + List<ItemStack> stackList = new ArrayList<ItemStack>(); + stack = OP.gemExquisite.mat(material, OP.gem.mat(material, 1L), 1L); + if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);} + stack = OP.gemFlawless.mat(material, OP.gem.mat(material, 1L), 1L); + if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);} + stack = OP.gem.mat(material, 1L); + if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);} + stack = OP.gemFlawed.mat(material, OP.crushed.mat(material, 1L), 1L); + if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);} + stack = OP.crushed.mat(material, 1L); + if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);} + stack = OP.gemChipped.mat(material, OP.dustImpure.mat(material, 1L), 1L); + if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);} + stack = OP.dustImpure.mat(material, OP.dust.mat(material, 1L), 1L); + if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);} + stack = OP.gemLegendary.mat(material, 1L); + if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);} + oreSmallList.add(new ItemStack(oreSmall, 1, meta)); + mapOreMetaToOreDrops.put(meta, stackList); + } + mapMetaToLocalizedName.put(meta, getLocalizedSmallOreName(meta)); + Set<IBlockPlacable> setSmallOreBasicTypesTemp = new HashSet<IBlockPlacable>(CS.BlocksGT.stoneToSmallOres.values()); + for (IBlockPlacable block: setSmallOreBasicTypesTemp) + if (block instanceof PrefixBlock) + setOreSmallBasicTypes.add((PrefixBlock)block); + } + } + + public static String getLocalizedSmallOreName(short meta) { + // meta==-1 means OreDictMaterial is MT.NULL + if (meta==-1) + return I18n.format("gtnop.ore.null.name"); + else + return LanguageHandler.getLocalName(OP.oreSmall, CS.BlocksGT.oreSmall.getMetaMaterial(meta)); + } + + public class OreSmallWrapper { + public String oreGenName; + public short oreMeta; + public String worldGenHeightRange; + public String amountPerChunk; + public boolean genOverworld = false; + public boolean genNether = false; + public boolean genEnd = false; + + public OreSmallWrapper(Worldgen_GT_Ore_SmallPieces worldGen) { + this.oreGenName = worldGen.mWorldGenName; + this.oreMeta = worldGen.mMeta; + this.worldGenHeightRange = worldGen.mMinY + "-" + worldGen.mMaxY; + this.amountPerChunk = worldGen.mAmount/2 + "-" + (worldGen.mAmount/2 + (worldGen.mAmount+1)/2); + this.genOverworld = worldGen.mOverworld; + this.genNether = worldGen.mNether; + this.genEnd = worldGen.mEnd; + } + } + +} |