diff options
Diffstat (limited to 'src/main/java/gregtech/common')
9 files changed, 110 insertions, 100 deletions
diff --git a/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java b/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java index 83dc82e6f9..41726b4fc5 100644 --- a/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java +++ b/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java @@ -8,9 +8,19 @@ import forestry.apiculture.genetics.alleles.AlleleBeeSpecies; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; +import java.awt.*; + public class GT_AlleleBeeSpecies extends AlleleBeeSpecies { - public GT_AlleleBeeSpecies(String uid, boolean dominant, String unlocalizedName, String authority, String unlocalizedDescription, IClassification branch, String binomial, int primaryColor, int secondaryColor) { - super(uid, unlocalizedName, authority, unlocalizedDescription, dominant, branch, binomial, primaryColor, secondaryColor); + public GT_AlleleBeeSpecies(String uid, + boolean dominant, + String unlocalizedName, + String authority, + String unlocalizedDescription, + IClassification branch, + String binomial, + Color primaryColor, + Color secondaryColor) { + super(uid, unlocalizedName, authority, unlocalizedDescription, dominant, branch, binomial, primaryColor.getRGB(), secondaryColor.getRGB()); AlleleManager.alleleRegistry.registerAllele(this, EnumBeeChromosome.SPECIES); } diff --git a/src/main/java/gregtech/common/bees/GT_AlleleHelper.java b/src/main/java/gregtech/common/bees/GT_AlleleHelper.java index cb54f5d4a1..e1db4c2ac0 100644 --- a/src/main/java/gregtech/common/bees/GT_AlleleHelper.java +++ b/src/main/java/gregtech/common/bees/GT_AlleleHelper.java @@ -21,7 +21,7 @@ public class GT_AlleleHelper extends AlleleHelper { private static final String modId = Constants.ID; - private Map<Class, Map<?, ? extends IAllele>> alleleMaps = new HashMap<>(); + private Map<Class<?>, Map<?, ? extends IAllele>> alleleMaps = new HashMap<>(); public void init() { if (PluginManager.Module.APICULTURE.isEnabled()) { @@ -114,12 +114,17 @@ public class GT_AlleleHelper extends AlleleHelper { } alleleMaps.put(Boolean.class, booleans); } - + @SuppressWarnings("unchecked") public static void initialisation(){ GT_AlleleHelper helper = new GT_AlleleHelper(); try { - helper.alleleMaps = (Map<Class, Map<?, ? extends IAllele>>) FieldUtils.readField(FieldUtils.getField(AlleleHelper.class,"alleleMaps",true),AlleleHelper.instance,true); + helper.alleleMaps = (Map<Class<?>, Map<?, ? extends IAllele>>) + FieldUtils.readField( + FieldUtils.getField(AlleleHelper.class,"alleleMaps",true), + AlleleHelper.instance, + true + ); } catch (IllegalAccessException e) { e.printStackTrace(); } diff --git a/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java b/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java index 7b61505fc7..ca919e7cf2 100644 --- a/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java +++ b/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java @@ -16,7 +16,7 @@ import java.util.List; public class GT_Bee_Mutation extends BeeMutation { - private float split = 1; + private final float split; public GT_Bee_Mutation(IAlleleBeeSpecies bee0, IAlleleBeeSpecies bee1, IAllele[] result, int chance, float split) { super(bee0, bee1, result, chance); @@ -52,6 +52,7 @@ public class GT_Bee_Mutation extends BeeMutation { return processedChance; } + @SuppressWarnings("unchecked") private float getBasicChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1) { float mutationChance = this.getBaseChance(); List<IMutationCondition> mutationConditions = null; @@ -61,7 +62,7 @@ public class GT_Bee_Mutation extends BeeMutation { if (f == null) return mutationChance; try { - mutationConditions = f.get(this) instanceof List ? (List) f.get(this) : null; + mutationConditions = f.get(this) instanceof List ? (List<IMutationCondition>) f.get(this) : null; } catch (IllegalAccessException e) { e.printStackTrace(); } 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 6c4a03420d..2eb100599b 100644 --- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java @@ -132,7 +132,14 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit public Packet getDescriptionPacket() { if (!this.worldObj.isRemote) { - if ((this.mBlocked == (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord + 1, this.yCoord, this.zCoord)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord - 1, this.yCoord, this.zCoord)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord + 1, this.zCoord)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord - 1, this.zCoord)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord, this.zCoord + 1)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord, this.zCoord - 1)) ? 1 : 0) == 0) { + if (!(this.mBlocked = ( + GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord + 1, this.yCoord, this.zCoord) && + GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord - 1, this.yCoord, this.zCoord) && + GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord + 1, this.zCoord) && + GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord - 1, this.zCoord) && + GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord, this.zCoord + 1) && + GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord, this.zCoord - 1) + ))) { GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, new GT_Packet_Ores(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData), this.xCoord, this.zCoord); } } diff --git a/src/main/java/gregtech/common/items/GT_VolumetricFlask.java b/src/main/java/gregtech/common/items/GT_VolumetricFlask.java index d0132b1fdd..5ab6b3395e 100644 --- a/src/main/java/gregtech/common/items/GT_VolumetricFlask.java +++ b/src/main/java/gregtech/common/items/GT_VolumetricFlask.java @@ -1,7 +1,6 @@ package gregtech.common.items; -import cpw.mods.fml.common.Loader; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.GT_Values; @@ -42,16 +41,6 @@ public class GT_VolumetricFlask extends GT_Generic_Item implements IFluidContain unlocalFlaskName = unlocalized; setMaxStackSize(16); setNoRepair(); - if (Loader.isModLoaded("NotEnoughItems")) { - for (Fluid fluid : FluidRegistry.getRegisteredFluids().values()) { - if (fluid != null) { - ItemStack stack = new ItemStack(this); - setCapacity(stack, getMaxCapacity()); - fill(stack, new FluidStack(fluid, Integer.MAX_VALUE), true); - codechicken.nei.api.API.hideItem(stack); - } - } - } } public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java index 44db32e6b9..69543a7196 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java @@ -6,13 +6,12 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.objects.ItemData; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.blocks.GT_Block_Ores_Abstract; import gregtech.common.blocks.GT_TileEntity_Ores; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -21,6 +20,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; +import net.minecraft.world.ChunkPosition; import net.minecraftforge.common.util.FakePlayer; import java.util.ArrayList; @@ -33,7 +33,7 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine { private static final Block MINING_PIPE_BLOCK = GT_Utility.getBlockFromStack(MINING_PIPE); private static final Block MINING_PIPE_TIP_BLOCK = GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 0)); - int drillX, drillY, drillZ; + int drillY = 0; boolean isPickingPipes; boolean waitMiningPipe; final static int[] RADIUS = new int[]{8, 8, 16, 24, 32}; //Miner radius per tier @@ -41,6 +41,7 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine { final static int[] ENERGY = new int[]{8, 8, 32, 128, 512}; //Miner energy consumption per tier private int radiusConfig; //Miner configured radius + private final ArrayList<ChunkPosition> oreBlockPositions = new ArrayList<>(); public GT_MetaTileEntity_Miner(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, 1, @@ -90,7 +91,7 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine { } return true; } - + @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); @@ -109,8 +110,14 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine { radiusConfig = 0; } GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("GT5U.machines.workareaset") + " " + (radiusConfig * 2 + 1) + "x" + (radiusConfig * 2 + 1));//TODO Add translation support + oreBlockPositions.clear(); + fillOreList(getBaseMetaTileEntity()); } } + @Override + public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { + fillOreList(aBaseMetaTileEntity); + } @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { @@ -165,50 +172,34 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine { } return; } - if (drillY == 0) { + if (drillY == 0 || oreBlockPositions.isEmpty()) { moveOneDown(aBaseMetaTileEntity); - return; - } - if (drillZ > radiusConfig) { - moveOneDown(aBaseMetaTileEntity); - return; - } - while (drillZ <= radiusConfig) { - while (drillX <= radiusConfig) { - Block block = aBaseMetaTileEntity.getBlockOffset(drillX, drillY, drillZ); - int blockMeta = aBaseMetaTileEntity.getMetaIDOffset(drillX, drillY, drillZ); - if (block instanceof GT_Block_Ores_Abstract) { - TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityOffset(drillX, drillY, drillZ); - if (tTileEntity instanceof GT_TileEntity_Ores && ((GT_TileEntity_Ores) tTileEntity).mNatural) { - mineBlock(aBaseMetaTileEntity, drillX, drillY, drillZ); - if (debugBlockMiner) { - GT_Log.out.println("MINER: Mining GT ore block at " + drillX + " " + drillY + " " + drillZ); - } - return; - } else { - if (debugBlockMiner) { - GT_Log.out.println("MINER: Not natural ore, will not mine"); - } - } - } else { - ItemData association = GT_OreDictUnificator.getAssociation(new ItemStack(block, 1, blockMeta)); - if (association != null && association.mPrefix.toString().startsWith("ore")) { - mineBlock(aBaseMetaTileEntity, drillX, drillY, drillZ); - if (debugBlockMiner) { - GT_Log.out.println("MINER: Mining oredict ore block at " + drillX + " " + drillY + " " + drillZ); - } - return; - } - } - drillX++; + } else { + ChunkPosition oreBlockPos = oreBlockPositions.remove(0); + mineBlock(aBaseMetaTileEntity, oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ); + if (debugBlockMiner) { + GT_Log.out.println("MINER: Mining GT ore block at " + oreBlockPos.chunkPosX + " " + drillY + " " + oreBlockPos.chunkPosZ); } - drillX = -radiusConfig; - drillZ++; } } } } - + private void fillOreList(IGregTechTileEntity aBaseMetaTileEntity) { + if (drillY == 0) + return; + for (int z = -radiusConfig; z <= radiusConfig; ++z) { + for (int x = -radiusConfig; x <= radiusConfig; ++x) { + Block block = aBaseMetaTileEntity.getBlockOffset(x, drillY, z); + int blockMeta = aBaseMetaTileEntity.getMetaIDOffset(x, drillY, z); + if (block instanceof GT_Block_Ores_Abstract) { + TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityOffset(x, drillY, z); + if (tTileEntity instanceof GT_TileEntity_Ores && ((GT_TileEntity_Ores) tTileEntity).mNatural) + oreBlockPositions.add(new ChunkPosition(x, drillY, z)); + } else if (GT_Utility.isOre(new ItemStack(block, 1, blockMeta))) + oreBlockPositions.add(new ChunkPosition(x, drillY, z)); + } + } + } @Override public long maxEUStore() { return mTier == 1 ? 4096 : V[mTier] * 64; @@ -253,13 +244,16 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine { } aBaseMetaTileEntity.getWorld().setBlock(xCoord, yCoord + drillY - 1, zCoord, MINING_PIPE_TIP_BLOCK); drillY--; - drillZ = -RADIUS[mTier]; - drillX = -RADIUS[mTier]; + fillOreList(aBaseMetaTileEntity); return true; } public void mineBlock(IGregTechTileEntity aBaseMetaTileEntity, int x, int y, int z) { - if (!GT_Utility.eraseBlockByFakePlayer(getFakePlayer(aBaseMetaTileEntity), aBaseMetaTileEntity.getXCoord() + x, aBaseMetaTileEntity.getYCoord() + y, aBaseMetaTileEntity.getZCoord() + z, true)); + if (!GT_Utility.eraseBlockByFakePlayer(getFakePlayer(aBaseMetaTileEntity), aBaseMetaTileEntity.getXCoord() + x, aBaseMetaTileEntity.getYCoord() + y, aBaseMetaTileEntity.getZCoord() + z, true)) { + if (debugBlockMiner) + GT_Log.out.println("MINER: FakePlayer cannot mine block at " + (aBaseMetaTileEntity.getXCoord() + x) + ", " + (aBaseMetaTileEntity.getYCoord() + y) + ", " + (aBaseMetaTileEntity.getZCoord() + z)); + return; + } ArrayList<ItemStack> drops = getBlockDrops(aBaseMetaTileEntity.getBlockOffset(x, y, z), aBaseMetaTileEntity.getXCoord() + x, aBaseMetaTileEntity.getYCoord() + y, aBaseMetaTileEntity.getZCoord() + z); if (drops.size() > 0) mOutputItems[0] = drops.get(0); @@ -284,9 +278,7 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine { public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); aNBT.setBoolean("isPickingPipe", isPickingPipes); - aNBT.setInteger("drillX", drillX); aNBT.setInteger("drillY", drillY); - aNBT.setInteger("drillZ", drillZ); aNBT.setInteger("radiusConfig", radiusConfig); } @@ -294,9 +286,7 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine { public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); isPickingPipes = aNBT.getBoolean("isPickingPipe"); - drillX = aNBT.getInteger("drillX"); drillY = aNBT.getInteger("drillY"); - drillZ = aNBT.getInteger("drillZ"); if (aNBT.hasKey("radiusConfig")) radiusConfig = aNBT.getInteger("radiusConfig"); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java index 6ceebc3877..21a407f6e2 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java @@ -5,10 +5,10 @@ import gregtech.api.enums.GT_Values; import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMachineCallback; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Log; @@ -16,9 +16,9 @@ import gregtech.api.util.GT_Recipe; import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; import static gregtech.api.enums.GT_Values.debugCleanroom; -import static gregtech.api.enums.GT_Values.V; public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBase { private int mHeight = -1; @@ -207,24 +207,8 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas if (this.mMaintenanceHatches.size() != 1 || this.mEnergyHatches.size() != 1 || mDoorCount != 2 || mHullCount > 10) { return false; } - for (int dX = -x + 1; dX <= x - 1; dX++) { - for (int dZ = -z + 1; dZ <= z - 1; dZ++) { - for (int dY = -1; dY >= y + 1; dY--) { - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); - if (tTileEntity != null) { - IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicMachine) { - if (debugCleanroom) { - GT_Log.out.println( - "Cleanroom: Machine detected, adding pointer back to cleanroom" - ); - } - ((GT_MetaTileEntity_BasicMachine) aMetaTileEntity).mCleanroom = this; - } - } - } - } - } + + setCallbacks(x, y, z, aBaseMetaTileEntity); if (doorState) { this.mEfficiency = Math.max(0, this.mEfficiency - 200); @@ -240,7 +224,34 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas return mPlascreteCount>=20 && mGlassCount < (int) Math.floor(ratio); } - + + private void setCallbacks(int x, int y, int z, IGregTechTileEntity aBaseMetaTileEntity){ + for (int dX = -x + 1; dX <= x - 1; dX++) + for (int dZ = -z + 1; dZ <= z - 1; dZ++) + for (int dY = -1; dY >= y + 1; dY--) { + TileEntity tTileEntity = aBaseMetaTileEntity.getTileEntityOffset(dX, dY, dZ); + + if (tTileEntity instanceof IGregTechTileEntity) { + IMetaTileEntity iMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity(); + + if (iMetaTileEntity instanceof IMachineCallback<?>) + checkAndSetCallback((IMachineCallback<?>) iMetaTileEntity); + + } else if (tTileEntity instanceof IMachineCallback<?>) + checkAndSetCallback((IMachineCallback<?>) tTileEntity); + } + } + + @SuppressWarnings("unchecked") + private void checkAndSetCallback(IMachineCallback<?> iMachineCallback) { + if (debugCleanroom) + GT_Log.out.println( + "Cleanroom: IMachineCallback detected, checking for cleanroom: " + (iMachineCallback.getType() == this.getClass()) + ); + if (iMachineCallback.getType() == this.getClass()) + ((IMachineCallback<GT_MetaTileEntity_Cleanroom>) iMachineCallback).setCallbackBase(this); + } + @Override public boolean allowGeneralRedstoneOutput(){ return true; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java index 13764b928e..fad880e5e4 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java @@ -190,7 +190,7 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu } } - return casingAmount >= 8 && hasHeatingCoil; + return casingAmount >= 8 && hasHeatingCoil && !mEnergyHatches.isEmpty() && !mMaintenanceHatches.isEmpty(); } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java index 3c59bee520..5ead0bf896 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java @@ -13,6 +13,7 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.common.blocks.GT_Block_Ores_Abstract; import gregtech.common.blocks.GT_TileEntity_Ores; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; @@ -318,15 +319,12 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile Block block = getBaseMetaTileEntity().getBlock(x, y, z); int blockMeta = getBaseMetaTileEntity().getMetaID(x, y, z); ChunkPosition blockPos = new ChunkPosition(x, y, z); - if (oreBlockPositions.contains(blockPos)) - return; - if (block instanceof GT_Block_Ores_Abstract) { - TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntity(x, y, z); - if (tTileEntity instanceof GT_TileEntity_Ores && ((GT_TileEntity_Ores) tTileEntity).mNatural) - oreBlockPositions.add(blockPos); - } else { - ItemData association = GT_OreDictUnificator.getAssociation(new ItemStack(block, 1, blockMeta)); - if (association != null && association.mPrefix.toString().startsWith("ore")) + if (!oreBlockPositions.contains(blockPos)) { + if (block instanceof GT_Block_Ores_Abstract) { + TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityOffset(x, y, z); + if (tTileEntity instanceof GT_TileEntity_Ores && ((GT_TileEntity_Ores) tTileEntity).mNatural) + oreBlockPositions.add(blockPos); + } else if (GT_Utility.isOre(new ItemStack(block, 1, blockMeta))) oreBlockPositions.add(blockPos); } } @@ -337,7 +335,6 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile protected String[] getDescriptionInternal(String tierSuffix) { String casings = getCasingBlockItem().get(0).getDisplayName(); - int d = getRadiusInChunks() * 2; return new String[]{ "Controller Block for the Ore Drilling Plant " + (tierSuffix != null ? tierSuffix : ""), "Size(WxHxD): 3x7x3, Controller (Front middle bottom)", |