diff options
author | LOKKO12 <33183715+LOKKO12@users.noreply.github.com> | 2018-01-22 18:56:12 +0100 |
---|---|---|
committer | LOKKO12 <33183715+LOKKO12@users.noreply.github.com> | 2018-01-22 18:56:12 +0100 |
commit | 9066c13deea8a77c3e4828b4fcddf7cf0a096a74 (patch) | |
tree | a0f4ac442e59b1056b260d03e0c17b771470fae7 /src/main/java/pers/gwyog/gtneioreplugin/util | |
parent | 2bfa55842458c092acb599fd4876a74386680b0f (diff) | |
download | GT5-Unofficial-9066c13deea8a77c3e4828b4fcddf7cf0a096a74.tar.gz GT5-Unofficial-9066c13deea8a77c3e4828b4fcddf7cf0a096a74.tar.bz2 GT5-Unofficial-9066c13deea8a77c3e4828b4fcddf7cf0a096a74.zip |
- removed GT6 support
- removed IE support
- removed biome specific vein support
- removed ShowAll button due to Memory Issures
- fixed %material
- try to read out config without modifying it
- added Coustom Vein renamer
Diffstat (limited to 'src/main/java/pers/gwyog/gtneioreplugin/util')
7 files changed, 209 insertions, 283 deletions
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/DimensionHelper.java b/src/main/java/pers/gwyog/gtneioreplugin/util/DimensionHelper.java new file mode 100644 index 0000000000..d68dd65d69 --- /dev/null +++ b/src/main/java/pers/gwyog/gtneioreplugin/util/DimensionHelper.java @@ -0,0 +1,81 @@ +package pers.gwyog.gtneioreplugin.util; + +import net.minecraft.world.World; +import net.minecraft.world.WorldProvider; +import net.minecraft.world.WorldServer; +import net.minecraftforge.common.DimensionManager; + +public class DimensionHelper { + + public static String[] DimName = + { + "EndAsteroid", + "GalacticraftCore_Moon", + "GalacticraftMars_Asteroids", + "GalacticraftMars_Mars", + "GalaxySpace_BarnardC", + "GalaxySpace_BarnardE", + "GalaxySpace_BarnardF", + "GalaxySpace_Callisto", + "GalaxySpace_CentauriA", + "GalaxySpace_Ceres", + "GalaxySpace_Deimos", + "GalaxySpace_Enceladus", + "GalaxySpace_Europa", + "GalaxySpace_Ganymede", + "GalaxySpace_Haumea", + "GalaxySpace_Io", + "GalaxySpace_Kuiperbelt", + "GalaxySpace_MakeMake", + "GalaxySpace_Mercury", + "GalaxySpace_Miranda", + "GalaxySpace_Oberon", + "GalaxySpace_Phobos", + "GalaxySpace_Pluto", + "GalaxySpace_Proteus", + "GalaxySpace_TcetiE", + "GalaxySpace_Titan", + "GalaxySpace_Triton", + "GalaxySpace_VegaB", + "GalaxySpace_Venus", + "Nether", + "Overworld", + "TheEnd", + "Vanilla_EndAsteroids"}; + + public static String[] DimNameDisplayed = + { + "End Asteroids", + "Moon", + "Asteroids", + "Mars", + "BarnardC", + "BarnardE", + "BarnardF", + "Callisto", + "CentauriA", + "Ceres", + "Deimos", + "Enceladus", + "Europa", + "Ganymede", + "Haumea", + "Io", + "Kuiperbelt", + "MakeMake", + "Mercury", + "Miranda", + "Oberon", + "Phobos", + "Pluto", + "Proteus", + "TcetiE", + "Titan", + "Triton", + "VegaB", + "Venus", + "The Nether", + "Overworld", + "The End", + "Far End Asteroids"}; +}
\ No newline at end of file diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/GT5CFGHelper.java b/src/main/java/pers/gwyog/gtneioreplugin/util/GT5CFGHelper.java new file mode 100644 index 0000000000..b5fd6ad6e5 --- /dev/null +++ b/src/main/java/pers/gwyog/gtneioreplugin/util/GT5CFGHelper.java @@ -0,0 +1,109 @@ +package pers.gwyog.gtneioreplugin.util; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; + +import cpw.mods.fml.common.FMLLog; + + +public class GT5CFGHelper { + + public static String GT5CFG(File F, String Veinname) { + //FMLLog.info(Veinname); + if (F == null) { + FMLLog.bigWarning("GT_CFG_NOT_FOUND"); + return "Error while Loading CFG"; + } + else + try { + int buffer = (int) (0.1*Runtime.getRuntime().freeMemory()); + if (buffer > F.length()) + buffer = (int) F.length(); + //allocate 10% of free memory for read-in-buffer, if there is less than filesize memory aviable + //FMLLog.info("GT_CFG_FOUND"); + FileReader in = new FileReader(F); + //FMLLog.info("FileReader created"); + BufferedReader reader = new BufferedReader(in, buffer); + //FMLLog.info("BufferedReader" +Integer.toString(buffer)+"created"); + String st=""; + List<String> raw= new ArrayList<String>(); + List<String> rawbools = new ArrayList<String>(); + boolean found = false; + + do{ + //read until reached eof or mix { + st = reader.readLine(); + //FMLLog.info("st: "+st); + if ((reader.readLine() != null)) + if (st.contains("mix {")) { + do{ + //read until reached eof or Veinname { + st = reader.readLine(); + //FMLLog.info("MIXst: "+st); + if ((reader.readLine() != null)) + if (st.contains(Veinname)) { + //FMLLog.info("VEINNAMEst: "+st); + //for (int i=0; i < 44;i++) + do{ + //add everything below Veinname { undtil } to raw + raw.add(reader.readLine()); + }while (!reader.readLine().contains("}")&&(reader.readLine() != null)); + found = true; + } + }while((!found) || (reader.readLine() != null)); + } + }while((!found) || (reader.readLine() != null)); + + reader.close();//not needed anymore + + if (!raw.isEmpty()) + for (int i=0; i < raw.size();i++) { + //filter needed booleans from raw + ///FMLLog.info("raw contains"+raw.get(i)); + for (int j=0; j < DimensionHelper.DimName.length;j++) + if(raw.get(i).contains(DimensionHelper.DimName[j])) + rawbools.add(raw.get(i)); + //FMLLog.info("rawbools: "+rawbools.get(i)); + } + else FMLLog.info("raw is empty"); + + String ret=" "; + + //HashSet<String> rawboolsset = new HashSet<String>(); + if (!rawbools.isEmpty()) { + //remove dublicats + /* + for (int i=0; i < rawbools.size();i++){ + st = rawbools.get(i).replace("B:", "").replace("_true", "").replace("_false", "").replaceAll(" ", ""); + rawboolsset.add(st); + } + rawbools = new ArrayList<String>(rawboolsset); + */ + //filter for dims set to true + for (int i=0; i < rawbools.size();i++) { + st = rawbools.get(i); + //FMLLog.info("RawBools:"+st); + for (int j=0; j < DimensionHelper.DimName.length;j++) { + if(st.contains(DimensionHelper.DimName[j])) + if(st.contains("=true")) + ret=(ret+DimensionHelper.DimNameDisplayed[j]+" "); + } + } + } + ret = ret.trim(); + //FMLLog.info("ret:"+ret); + if(ret.equals("")||ret.equals(" ")) + ret ="Not aviable in any Galactic Dim, maybe Deep Dark or Bedrock Dim"; + return ret; + } catch (IOException e) { + e.printStackTrace(); + return "Error while Loading CFG"; + } + } +} diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreLayerHelper.java b/src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreLayerHelper.java index 80ea571719..9c94bf0029 100644 --- a/src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreLayerHelper.java +++ b/src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreLayerHelper.java @@ -15,119 +15,38 @@ import net.minecraft.item.ItemStack; import pers.gwyog.gtneioreplugin.GTNEIOrePlugin; public class GT5OreLayerHelper { - public static boolean restrictBiomeSupport = false; - public static boolean endAsteroidSupport = false; - public static boolean gcBasicSupport = false; - public static boolean gcAsteroidSupport = false; - public static boolean immersiveEngineeringSupport = false; - public static int[] weightPerWorld = {0, 0, 0, 0, 0}; + + public static Integer weightPerWorld[] = new Integer[33]; + public static Integer DimIDs[] = new Integer[33]; public static HashMap<String, OreLayerWrapper> mapOreLayerWrapper = new HashMap<String, OreLayerWrapper>(); public GT5OreLayerHelper() { - checkExtraSupport(); + for (int i=0; i < DimIDs.length;i++) + weightPerWorld[i]=0; + for (int i=0; i < DimIDs.length;i++) + DimIDs[i]=0; 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; - try { - clazzGTOreLayer = Class.forName("gregtech.common.GT_Worldgen_GT_Ore_Layer"); - } catch (ClassNotFoundException e) {} - if (clazzGTOreLayer != null) { - try { - Field fieldRestrictBiome = clazzGTOreLayer.getField("mRestrictBiome"); - restrictBiomeSupport = true; - } catch (Exception e) {} - try { - Field fieldEndAsteroid = clazzGTOreLayer.getField("mEndAsteroid"); - endAsteroidSupport = true; - } catch (Exception e) {} - try { - Field fieldGCMoon = clazzGTOreLayer.getField("mMoon"); - Field fieldGCMars = clazzGTOreLayer.getField("mMars"); - gcBasicSupport = true; - } catch (Exception e) {} - try { - Field fieldGCAsteroid = clazzGTOreLayer.getField("mAsteroid"); - gcAsteroidSupport = true; - } catch (Exception e) {} - } - - // immersive engineering support for GT5.09.25+ - if (Loader.instance().isModLoaded("ImmersiveEngineering")) { - Class clazzGTMod = null; - Class clazzGTProxy = null; - Class clazzGTAPI = null; - try { - clazzGTMod = Class.forName("gregtech.GT_Mod"); - clazzGTProxy = Class.forName("gregtech.common.GT_Proxy"); - clazzGTAPI = Class.forName("gregtech.api.GregTech_API"); - } catch (ClassNotFoundException e) {} - if (clazzGTMod!=null && clazzGTProxy!=null && clazzGTAPI!=null) { - try { - Field fieldImmersiveEngineeringRecipes = clazzGTAPI.getField("mImmersiveEngineering"); - Field fieldGTProxy = clazzGTMod.getField("gregtechproxy"); - Field fieldImmersiveEngineering = clazzGTProxy.getField("mImmersiveEngineeringRecipes"); - immersiveEngineeringSupport = GregTech_API.mImmersiveEngineering && GT_Mod.gregtechproxy.mImmersiveEngineeringRecipes; - } catch (Exception e) {} - } - } - } - public class OreLayerWrapper { public String veinName; - public short primaryMeta; - public short secondaryMeta; - public short betweenMeta; - public short sporadicMeta; + public short[] Meta = new short[4]; public String worldGenHeightRange; public String weightedIEChance; - public String restrictBiome; public int randomWeight; - public boolean genOverworld = false; - public boolean genNether = false; - public boolean genEnd = false; - public boolean genMoon = false; - public boolean genMars = false; - public boolean genEndAsteroid = false; - public boolean genGCAsteroid = false; - public boolean genIEVein = false; + public List<Integer> Weight = new ArrayList<Integer>(); public OreLayerWrapper(GT_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.Meta[0] = worldGen.mPrimaryMeta; + this.Meta[1] = worldGen.mSecondaryMeta; + this.Meta[2] = worldGen.mBetweenMeta; + this.Meta[3] = worldGen.mSporadicMeta; this.worldGenHeightRange = worldGen.mMinY + "-" + worldGen.mMaxY; this.randomWeight = worldGen.mWeight; - this.genOverworld = worldGen.mOverworld; - this.genNether = worldGen.mNether; - this.genEnd = worldGen.mEnd; - weightPerWorld[0] += this.genOverworld ? this.randomWeight : 0; - weightPerWorld[1] += this.genNether ? this.randomWeight : 0; - weightPerWorld[2] += this.genEnd ? this.randomWeight : 0; - if (restrictBiomeSupport) - this.restrictBiome = worldGen.mRestrictBiome; - if (GT5OreLayerHelper.gcBasicSupport) { - this.genMoon = worldGen.mMoon; - this.genMars = worldGen.mMars; - weightPerWorld[3] += this.genMoon ? this.randomWeight : 0; - weightPerWorld[4] += this.genMars ? this.randomWeight : 0; - } - if (GT5OreLayerHelper.endAsteroidSupport) - this.genEndAsteroid = worldGen.mEndAsteroid; - if (GT5OreLayerHelper.gcAsteroidSupport) - this.genGCAsteroid = worldGen.mAsteroid; - - // immersive engineering support for GT5.09.25+ - if (immersiveEngineeringSupport) { - this.genIEVein = true; - this.weightedIEChance = String.format("%.3f%%", (100.0f*worldGen.mWeight)/GT_Worldgen_GT_Ore_Layer.sWeight/8); } } } - -} +
\ No newline at end of file diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreSmallHelper.java b/src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreSmallHelper.java index 69311a83ee..4326475606 100644 --- a/src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreSmallHelper.java +++ b/src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreSmallHelper.java @@ -100,12 +100,11 @@ public class GT5OreSmallHelper { this.genOverworld = worldGen.mOverworld; this.genNether = worldGen.mNether; this.genEnd = worldGen.mEnd; - if (GT5OreSmallHelper.restrictBiomeSupport) - this.restrictBiome = worldGen.mRestrictBiome; - if (GT5OreSmallHelper.gcBasicSupport) { - this.genMoon = worldGen.mMoon; - this.genMars = worldGen.mMars; + //if (GT5OreSmallHelper.restrictBiomeSupport) + // this.restrictBiome = worldGen.mRestrictBiome; + // 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 deleted file mode 100644 index acae062f7c..0000000000 --- a/src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreBedrockHelper.java +++ /dev/null @@ -1,36 +0,0 @@ -package pers.gwyog.gtneioreplugin.util; - -import java.util.HashMap; - -import gregapi.worldgen.WorldgenObject; -import gregapi.worldgen.Worldgen_GT_Ore_Bedrock; -import gregapi.worldgen.Worldgenerator; - -public class GT6OreBedrockHelper { - public static HashMap<String, OreBedrockWrapper> mapOreBedrockWrapper = new HashMap<String, OreBedrockWrapper>(); - - 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 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; - } - } - -} diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreLayerHelper.java b/src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreLayerHelper.java deleted file mode 100644 index bc0b40f5a1..0000000000 --- a/src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreLayerHelper.java +++ /dev/null @@ -1,59 +0,0 @@ -package pers.gwyog.gtneioreplugin.util; - -import java.lang.reflect.Field; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Set; - -import gregapi.block.IBlockPlacable; -import gregapi.block.prefixblock.PrefixBlock; -import gregapi.data.CS; -import gregapi.worldgen.Worldgen_GT_Ore_Layer; -import gregtech.GT_Mod; -import net.minecraft.item.ItemStack; -import pers.gwyog.gtneioreplugin.GTNEIOrePlugin; - -public class GT6OreLayerHelper { - public static int[] weightPerWorld = {0, 0, 0}; - public static HashMap<String, OreLayerWrapper> mapOreLayerWrapper = new HashMap<String, OreLayerWrapper>(); - 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 class OreLayerWrapper { - public String veinName; - public short primaryMeta; - public short secondaryMeta; - public short betweenMeta; - public short sporadicMeta; - public String worldGenHeightRange; - public int randomWeight; - 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.randomWeight = worldGen.mWeight; - this.genOverworld = worldGen.mOverworld; - this.genNether = worldGen.mNether; - this.genEnd = worldGen.mEnd; - weightPerWorld[0] += this.genOverworld ? this.randomWeight : 0; - weightPerWorld[1] += this.genNether ? this.randomWeight : 0; - weightPerWorld[2] += this.genEnd ? this.randomWeight : 0; - } - } - -} diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreSmallHelper.java b/src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreSmallHelper.java deleted file mode 100644 index 873f049856..0000000000 --- a/src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreSmallHelper.java +++ /dev/null @@ -1,87 +0,0 @@ -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.OP; -import gregapi.oredict.OreDictMaterial; -import gregapi.worldgen.WorldgenObject; -import gregapi.worldgen.Worldgen_GT_Ore_SmallPieces; -import gregapi.worldgen.Worldgenerator; -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 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); - } - Set<IBlockPlacable> setSmallOreBasicTypesTemp = new HashSet<IBlockPlacable>(CS.BlocksGT.stoneToSmallOres.values()); - for (IBlockPlacable block: setSmallOreBasicTypesTemp) - if (block instanceof PrefixBlock) - setOreSmallBasicTypes.add((PrefixBlock)block); - } - } - - 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; - } - } - -} |