From 54d3a79809f27371d893c8ecb082048453d8e72c Mon Sep 17 00:00:00 2001 From: Muramasa Date: Wed, 27 Jul 2016 04:21:53 +0100 Subject: [PATCH] a1a25d42dd2228649699c421d2320e57f47a83f7 --- src/main/java/gregtech/GT_Mod.java | 8 +++++++- .../common/blocks/GT_Block_Ores_UB1.java | 5 +++-- .../common/blocks/GT_Block_Ores_UB2.java | 5 +++-- .../common/blocks/GT_Block_Ores_UB3.java | 5 +++-- .../common/blocks/GT_TileEntity_Ores.java | 18 ++++++++++++------ 5 files changed, 28 insertions(+), 13 deletions(-) diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 195adfab..cf83eae2 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -56,12 +56,18 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.PrintStream; +import java.util.*; +import java.util.Map.Entry; + //import forestry.factory.recipes.ISqueezerRecipe; //import forestry.factory.tiles.TileCentrifuge; //import forestry.factory.tiles.TileSqueezer; -@Mod(modid = "gregtech", name = "GregTech", version = "MC1710", useMetadata = false, dependencies = "required-after:IC2; after:Forestry; after:PFAAGeologica; after:Thaumcraft; after:Railcraft; after:appliedenergistics2; after:ThermalExpansion; after:TwilightForest; after:harvestcraft; after:magicalcrops; after:BuildCraft|Transport; after:BuildCraft|Silicon; after:BuildCraft|Factory; after:BuildCraft|Energy; after:BuildCraft|Core; after:BuildCraft|Builders; after:GalacticraftCore; after:GalacticraftMars; after:GalacticraftPlanets; after:ThermalExpansion|Transport; after:ThermalExpansion|Energy; after:ThermalExpansion|Factory; after:RedPowerCore; after:RedPowerBase; after:RedPowerMachine; after:RedPowerCompat; after:RedPowerWiring; after:RedPowerLogic; after:RedPowerLighting; after:RedPowerWorld; after:RedPowerControl;") +@Mod(modid = "gregtech", name = "GregTech", version = "MC1710", useMetadata = false, dependencies = "required-after:IC2; after:Forestry; after:PFAAGeologica; after:Thaumcraft; after:Railcraft; after:appliedenergistics2; after:ThermalExpansion; after:TwilightForest; after:harvestcraft; after:magicalcrops; after:BuildCraft|Transport; after:BuildCraft|Silicon; after:BuildCraft|Factory; after:BuildCraft|Energy; after:BuildCraft|Core; after:BuildCraft|Builders; after:GalacticraftCore; after:GalacticraftMars; after:GalacticraftPlanets; after:ThermalExpansion|Transport; after:ThermalExpansion|Energy; after:ThermalExpansion|Factory; after:RedPowerCore; after:RedPowerBase; after:RedPowerMachine; after:RedPowerCompat; after:RedPowerWiring; after:RedPowerLogic; after:RedPowerLighting; after:RedPowerWorld; after:RedPowerControl; after:UndergroundBiomes;") public class GT_Mod implements IGT_Mod { public static final int VERSION = 509; diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java index 6a9c51f4..46fe4065 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java @@ -1,6 +1,5 @@ package gregtech.common.blocks; -import exterminatorJeff.undergroundBiomes.common.UndergroundBiomes; import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; @@ -10,6 +9,8 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; public class GT_Block_Ores_UB1 extends GT_Block_Ores_Abstract { + Block aUBBlock = (Block) Block.blockRegistry.getObject("UndergroundBiomes:igneousStone"); + public GT_Block_Ores_UB1() { super("gt.blockores.ub1", true, Material.rock); } @@ -36,6 +37,6 @@ public class GT_Block_Ores_UB1 extends GT_Block_Ores_Abstract { @Override public ITexture[] getTextureSet() { //Must have 16 entries. - return new ITexture[]{new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 0), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 1), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 2), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 3), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 4), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 5), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 6), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 7), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 0), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 1), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 2), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 3), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 4), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 5), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 6), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 7)}; + return new ITexture[]{new GT_CopiedBlockTexture(aUBBlock, 0, 0), new GT_CopiedBlockTexture(aUBBlock, 0, 1), new GT_CopiedBlockTexture(aUBBlock, 0, 2), new GT_CopiedBlockTexture(aUBBlock, 0, 3), new GT_CopiedBlockTexture(aUBBlock, 0, 4), new GT_CopiedBlockTexture(aUBBlock, 0, 5), new GT_CopiedBlockTexture(aUBBlock, 0, 6), new GT_CopiedBlockTexture(aUBBlock, 0, 7), new GT_CopiedBlockTexture(aUBBlock, 0, 0), new GT_CopiedBlockTexture(aUBBlock, 0, 1), new GT_CopiedBlockTexture(aUBBlock, 0, 2), new GT_CopiedBlockTexture(aUBBlock, 0, 3), new GT_CopiedBlockTexture(aUBBlock, 0, 4), new GT_CopiedBlockTexture(aUBBlock, 0, 5), new GT_CopiedBlockTexture(aUBBlock, 0, 6), new GT_CopiedBlockTexture(aUBBlock, 0, 7)}; } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java index 66e59d45..ffce796c 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java @@ -1,6 +1,5 @@ package gregtech.common.blocks; -import exterminatorJeff.undergroundBiomes.common.UndergroundBiomes; import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; @@ -10,6 +9,8 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; public class GT_Block_Ores_UB2 extends GT_Block_Ores_Abstract { + Block aUBBlock = (Block) Block.blockRegistry.getObject("UndergroundBiomes:metamorphicStone"); + public GT_Block_Ores_UB2() { super("gt.blockores.ub2", true, Material.rock); } @@ -36,6 +37,6 @@ public class GT_Block_Ores_UB2 extends GT_Block_Ores_Abstract { @Override public ITexture[] getTextureSet() { //Must have 16 entries. - return new ITexture[]{new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 0), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 1), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 2), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 3), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 4), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 5), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 6), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 7), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 0), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 1), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 2), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 3), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 4), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 5), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 6), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 7)}; + return new ITexture[]{new GT_CopiedBlockTexture(aUBBlock, 0, 0), new GT_CopiedBlockTexture(aUBBlock, 0, 1), new GT_CopiedBlockTexture(aUBBlock, 0, 2), new GT_CopiedBlockTexture(aUBBlock, 0, 3), new GT_CopiedBlockTexture(aUBBlock, 0, 4), new GT_CopiedBlockTexture(aUBBlock, 0, 5), new GT_CopiedBlockTexture(aUBBlock, 0, 6), new GT_CopiedBlockTexture(aUBBlock, 0, 7), new GT_CopiedBlockTexture(aUBBlock, 0, 0), new GT_CopiedBlockTexture(aUBBlock, 0, 1), new GT_CopiedBlockTexture(aUBBlock, 0, 2), new GT_CopiedBlockTexture(aUBBlock, 0, 3), new GT_CopiedBlockTexture(aUBBlock, 0, 4), new GT_CopiedBlockTexture(aUBBlock, 0, 5), new GT_CopiedBlockTexture(aUBBlock, 0, 6), new GT_CopiedBlockTexture(aUBBlock, 0, 7)}; } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java index 80e3f548..52c8aa60 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java @@ -1,6 +1,5 @@ package gregtech.common.blocks; -import exterminatorJeff.undergroundBiomes.common.UndergroundBiomes; import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; @@ -10,6 +9,8 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; public class GT_Block_Ores_UB3 extends GT_Block_Ores_Abstract { + Block aUBBlock = (Block) Block.blockRegistry.getObject("UndergroundBiomes:sedimentaryStone"); + public GT_Block_Ores_UB3() { super("gt.blockores.ub3", true, Material.rock); } @@ -36,6 +37,6 @@ public class GT_Block_Ores_UB3 extends GT_Block_Ores_Abstract { @Override public ITexture[] getTextureSet() { //Must have 16 entries. - return new ITexture[]{new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 0), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 1), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 2), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 3), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 4), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 5), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 6), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 7), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 0), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 1), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 2), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 3), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 4), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 5), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 6), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 7)}; + return new ITexture[]{new GT_CopiedBlockTexture(aUBBlock, 0, 0), new GT_CopiedBlockTexture(aUBBlock, 0, 1), new GT_CopiedBlockTexture(aUBBlock, 0, 2), new GT_CopiedBlockTexture(aUBBlock, 0, 3), new GT_CopiedBlockTexture(aUBBlock, 0, 4), new GT_CopiedBlockTexture(aUBBlock, 0, 5), new GT_CopiedBlockTexture(aUBBlock, 0, 6), new GT_CopiedBlockTexture(aUBBlock, 0, 7), new GT_CopiedBlockTexture(aUBBlock, 0, 0), new GT_CopiedBlockTexture(aUBBlock, 0, 1), new GT_CopiedBlockTexture(aUBBlock, 0, 2), new GT_CopiedBlockTexture(aUBBlock, 0, 3), new GT_CopiedBlockTexture(aUBBlock, 0, 4), new GT_CopiedBlockTexture(aUBBlock, 0, 5), new GT_CopiedBlockTexture(aUBBlock, 0, 6), new GT_CopiedBlockTexture(aUBBlock, 0, 7)}; } } \ No newline at end of file diff --git a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java index 6bf6a713..1d87ba87 100644 --- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java @@ -51,14 +51,20 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit aMetaData += isSmallOre ? 16000 : 0; if ((aMetaData > 0) && ((tBlock != Blocks.air) || air)) { if (BlockName.equals("tile.igneousStone")) { - tOreBlock = GregTech_API.sBlockOresUb1; - aMetaData += (BlockMeta * 1000); + if (GregTech_API.sBlockOresUb1 != null) { + tOreBlock = GregTech_API.sBlockOresUb1; + aMetaData += (BlockMeta * 1000); + } } else if (BlockName.equals("tile.metamorphicStone")) { - tOreBlock = GregTech_API.sBlockOresUb2; - aMetaData += (BlockMeta * 1000); + if (GregTech_API.sBlockOresUb2 != null) { + tOreBlock = GregTech_API.sBlockOresUb2; + aMetaData += (BlockMeta * 1000); + } } else if (BlockName.equals("tile.sedimentaryStone")) { - tOreBlock = GregTech_API.sBlockOresUb3; - aMetaData += (BlockMeta * 1000); + if (GregTech_API.sBlockOresUb3 != null) { + tOreBlock = GregTech_API.sBlockOresUb3; + aMetaData += (BlockMeta * 1000); + } } else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) { aMetaData += 1000; } else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone)) {