From a03fc7fc1dcc57168e567fbdd09afdd895ce2570 Mon Sep 17 00:00:00 2001 From: Muramasa Date: Sat, 17 Sep 2016 13:27:03 +0100 Subject: [PATCH] That didn't work --- .../common/blocks/GT_TileEntity_Ores.java | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) 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 5e46b9df..c7dd416e 100644 --- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java @@ -46,38 +46,12 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1)); } Block tBlock = aWorld.getBlock(aX, aY, aZ); - Block tOreBlock = null; + Block tOreBlock = GregTech_API.sBlockOres1; int BlockMeta = aWorld.getBlockMetadata(aX, aY, aZ); String BlockName = tBlock.getUnlocalizedName(); aMetaData += isSmallOre ? 16000 : 0; if ((aMetaData > 0) && ((tBlock != Blocks.air) || air)) { - if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) { - tOreBlock = GregTech_API.sBlockOres1; - } else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) { - aMetaData += 1000; - } else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone)) { - aMetaData += 2000; - } else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites)) { - if (tBlock == GregTech_API.sBlockGranites) { - if (aWorld.getBlockMetadata(aX, aY, aZ) < 8) { - aMetaData += 3000; - } else { - aMetaData += 4000; - } - } else { - aMetaData += 3000; - } - } else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockStones)) { - if (tBlock == GregTech_API.sBlockStones) { - if (aWorld.getBlockMetadata(aX, aY, aZ) < 8) { - aMetaData += 5000; - } else { - aMetaData += 6000; - } - } else { - aMetaData += 5000; - } - } else if (BlockName.equals("tile.igneousStone")) { + if (BlockName.equals("tile.igneousStone")) { if (GregTech_API.sBlockOresUb1 != null) { tOreBlock = GregTech_API.sBlockOresUb1; aMetaData += (BlockMeta * 1000); @@ -106,7 +80,33 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit case 9: aMetaData += 3000; tOreBlock = GregTech_API.sBlockOresGC; break; } } - } else tOreBlock = GregTech_API.sBlockOres1; + } else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) { + aMetaData += 1000; + } else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone)) { + aMetaData += 2000; + } else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites)) { + if (tBlock == GregTech_API.sBlockGranites) { + if (aWorld.getBlockMetadata(aX, aY, aZ) < 8) { + aMetaData += 3000; + } else { + aMetaData += 4000; + } + } else { + aMetaData += 3000; + } + } else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockStones)) { + if (tBlock == GregTech_API.sBlockStones) { + if (aWorld.getBlockMetadata(aX, aY, aZ) < 8) { + aMetaData += 5000; + } else { + aMetaData += 6000; + } + } else { + aMetaData += 5000; + } + } else if (!tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) { + return false; + } aWorld.setBlock(aX, aY, aZ, tOreBlock, getHarvestData((short) aMetaData), 0); TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if ((tTileEntity instanceof GT_TileEntity_Ores)) {