From 1185424fa7c692f9932623b965a99392d969e3c5 Mon Sep 17 00:00:00 2001 From: Shawn Buckley Date: Wed, 21 Oct 2015 20:46:52 -0400 Subject: Move source files --- .../gregtech/common/blocks/GT_TileEntity_Ores.java | 257 +++++++++++++++++++++ 1 file changed, 257 insertions(+) create mode 100644 src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java (limited to 'src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java') diff --git a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java new file mode 100644 index 0000000000..6edce96441 --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java @@ -0,0 +1,257 @@ +package gregtech.common.blocks; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.ITexturedTileEntity; +import gregtech.api.net.IGT_NetworkHandler; +import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; + +import java.util.ArrayList; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.Packet; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class GT_TileEntity_Ores + extends TileEntity + implements ITexturedTileEntity +{ + private static final ITexture[] mStoneTextures = { new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.netherrack, 0, 0), new GT_CopiedBlockTexture(Blocks.end_stone, 0, 0), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_BLACK_STONE), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_RED_STONE), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0) }; + public short mMetaData = 0; + public boolean mNatural = false; + public boolean mBlocked = true; + + public void readFromNBT(NBTTagCompound aNBT) + { + super.readFromNBT(aNBT); + this.mMetaData = aNBT.getShort("m"); + this.mNatural = aNBT.getBoolean("n"); + } + + public void writeToNBT(NBTTagCompound aNBT) + { + super.writeToNBT(aNBT); + aNBT.setShort("m", this.mMetaData); + aNBT.setBoolean("n", this.mNatural); + } + + public void onUpdated() + { + if ((!this.worldObj.isRemote) && (this.mBlocked)) + { + this.mBlocked = false; + GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, new GT_Packet_Ores(this.xCoord, (short)this.yCoord, this.zCoord, this.mMetaData), this.xCoord, this.zCoord); + } + } + + 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) { + GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, new GT_Packet_Ores(this.xCoord, (short)this.yCoord, this.zCoord, this.mMetaData), this.xCoord, this.zCoord); + } + } + return null; + } + + public static byte getHarvestData(short aMetaData) + { + Materials aMaterial = GregTech_API.sGeneratedMaterials[(aMetaData % 1000)]; + return aMaterial == null ? 0 : (byte)Math.max((aMetaData % 16000 / 1000 == 3) || (aMetaData % 16000 / 1000 == 4) ? 3 : 0, Math.min(7, aMaterial.mToolQuality - (aMetaData < 16000 ? 0 : 1))); + } + + public void overrideOreBlockMaterial(Block aOverridingStoneBlock, byte aOverridingStoneMeta) + { + this.mMetaData = ((short)(int)(this.mMetaData % 1000L + this.mMetaData / 16000L * 16000L)); + if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.netherrack)) { + this.mMetaData = ((short)(this.mMetaData + 1000)); + } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.end_stone)) { + this.mMetaData = ((short)(this.mMetaData + 2000)); + } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, GregTech_API.sBlockGranites)) { + if (aOverridingStoneBlock == GregTech_API.sBlockGranites) + { + if (aOverridingStoneMeta < 8) { + this.mMetaData = ((short)(this.mMetaData + 3000)); + } else { + this.mMetaData = ((short)(this.mMetaData + 4000)); + } + } + else { + this.mMetaData = ((short)(this.mMetaData + 3000)); + } + } + this.worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, getHarvestData(this.mMetaData), 0); + } + + public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData) + { + aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1)); + Block tBlock = aWorld.getBlock(aX, aY, aZ); + if ((aMetaData > 0) && (tBlock != Blocks.air)) + { + 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, Blocks.stone)) { + return false; + } + aWorld.setBlock(aX, aY, aZ, GregTech_API.sBlockOres1, getHarvestData((short)aMetaData), 0); + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if ((tTileEntity instanceof GT_TileEntity_Ores)) + { + ((GT_TileEntity_Ores)tTileEntity).mMetaData = ((short)aMetaData); + ((GT_TileEntity_Ores)tTileEntity).mNatural = true; + } + return true; + } + return false; + } + + public short getMetaData() + { + return this.mMetaData; + } + + public boolean canUpdate() + { + return false; + } + + public ArrayList getDrops(int aFortune) + { + ArrayList rList = new ArrayList(); + if (this.mMetaData <= 0) + { + rList.add(new ItemStack(Blocks.cobblestone, 1, 0)); + return rList; + } + if (this.mMetaData < 16000) + { + rList.add(new ItemStack(GregTech_API.sBlockOres1, 1, this.mMetaData)); + return rList; + } + Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)]; + if (!this.mNatural) { + aFortune = 0; + } + if (aMaterial != null) + { + Random tRandom = new Random(this.xCoord ^ this.yCoord ^ this.zCoord); + ArrayList tSelector = new ArrayList(); + + + ItemStack tStack = GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L); + if (tStack != null) { + for (int i = 0; i < 1; i++) { + tSelector.add(tStack); + } + } + tStack = GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L); + if (tStack != null) { + for (int i = 0; i < 2; i++) { + tSelector.add(tStack); + } + } + tStack = GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L); + if (tStack != null) { + for (int i = 0; i < 12; i++) { + tSelector.add(tStack); + } + } + tStack = GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L), 1L); + if (tStack != null) { + for (int i = 0; i < 5; i++) { + tSelector.add(tStack); + } + } + tStack = GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L); + if (tStack != null) { + for (int i = 0; i < 10; i++) { + tSelector.add(tStack); + } + } + tStack = GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), 1L); + if (tStack != null) { + for (int i = 0; i < 5; i++) { + tSelector.add(tStack); + } + } + tStack = GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L); + if (tStack != null) { + for (int i = 0; i < 10; i++) { + tSelector.add(tStack); + } + } + if (tSelector.size() > 0) + { + int i = 0; + for (int j = Math.max(1, aMaterial.mOreMultiplier + (aFortune > 0 ? tRandom.nextInt(1 + aFortune * aMaterial.mOreMultiplier) : 0) / 2); i < j; i++) { + rList.add(GT_Utility.copyAmount(1L, new Object[] { tSelector.get(tRandom.nextInt(tSelector.size())) })); + } + } + if (tRandom.nextInt(3 + aFortune) > 1) { + switch (this.mMetaData / 1000 % 16) + { + case 0: + rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Stone, 1L)); break; + case 1: + rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Netherrack, 1L)); break; + case 2: + rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Endstone, 1L)); break; + case 3: + rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.GraniteBlack, 1L)); break; + case 4: + rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.GraniteRed, 1L)); + } + } + } + return rList; + } + + public ITexture[] getTexture(byte aSide) + { + Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)]; + if ((aMaterial != null) && (this.mMetaData < 32000)) { + return new ITexture[] { mStoneTextures[(this.mMetaData / 1000 % 16)], new GT_RenderedTexture(aMaterial.mIconSet.mTextures[this.mMetaData/16000 ==0 ? OrePrefixes.ore.mTextureIndex:OrePrefixes.oreSmall.mTextureIndex], aMaterial.mRGBa) }; + } + return new ITexture[] { mStoneTextures[0], new GT_RenderedTexture(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex]) }; + } +} + + + +/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar + + * Qualified Name: gregtech.common.blocks.GT_TileEntity_Ores + + * JD-Core Version: 0.7.0.1 + + */ -- cgit From bea4cfc54566b4f3b9971d1da93782b03410f669 Mon Sep 17 00:00:00 2001 From: Shawn Buckley Date: Wed, 21 Oct 2015 20:47:13 -0400 Subject: Bring in experimental branch --- .../gregtech/common/blocks/GT_TileEntity_Ores.java | 520 +++++++++++---------- 1 file changed, 263 insertions(+), 257 deletions(-) (limited to 'src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java') 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 6edce96441..5f559b2a0e 100644 --- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java @@ -1,257 +1,263 @@ -package gregtech.common.blocks; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.Textures; -import gregtech.api.enums.Textures.BlockIcons; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.tileentity.ITexturedTileEntity; -import gregtech.api.net.IGT_NetworkHandler; -import gregtech.api.objects.GT_CopiedBlockTexture; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; - -import java.util.ArrayList; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.Packet; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -public class GT_TileEntity_Ores - extends TileEntity - implements ITexturedTileEntity -{ - private static final ITexture[] mStoneTextures = { new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.netherrack, 0, 0), new GT_CopiedBlockTexture(Blocks.end_stone, 0, 0), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_BLACK_STONE), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_RED_STONE), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0) }; - public short mMetaData = 0; - public boolean mNatural = false; - public boolean mBlocked = true; - - public void readFromNBT(NBTTagCompound aNBT) - { - super.readFromNBT(aNBT); - this.mMetaData = aNBT.getShort("m"); - this.mNatural = aNBT.getBoolean("n"); - } - - public void writeToNBT(NBTTagCompound aNBT) - { - super.writeToNBT(aNBT); - aNBT.setShort("m", this.mMetaData); - aNBT.setBoolean("n", this.mNatural); - } - - public void onUpdated() - { - if ((!this.worldObj.isRemote) && (this.mBlocked)) - { - this.mBlocked = false; - GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, new GT_Packet_Ores(this.xCoord, (short)this.yCoord, this.zCoord, this.mMetaData), this.xCoord, this.zCoord); - } - } - - 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) { - GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, new GT_Packet_Ores(this.xCoord, (short)this.yCoord, this.zCoord, this.mMetaData), this.xCoord, this.zCoord); - } - } - return null; - } - - public static byte getHarvestData(short aMetaData) - { - Materials aMaterial = GregTech_API.sGeneratedMaterials[(aMetaData % 1000)]; - return aMaterial == null ? 0 : (byte)Math.max((aMetaData % 16000 / 1000 == 3) || (aMetaData % 16000 / 1000 == 4) ? 3 : 0, Math.min(7, aMaterial.mToolQuality - (aMetaData < 16000 ? 0 : 1))); - } - - public void overrideOreBlockMaterial(Block aOverridingStoneBlock, byte aOverridingStoneMeta) - { - this.mMetaData = ((short)(int)(this.mMetaData % 1000L + this.mMetaData / 16000L * 16000L)); - if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.netherrack)) { - this.mMetaData = ((short)(this.mMetaData + 1000)); - } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.end_stone)) { - this.mMetaData = ((short)(this.mMetaData + 2000)); - } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, GregTech_API.sBlockGranites)) { - if (aOverridingStoneBlock == GregTech_API.sBlockGranites) - { - if (aOverridingStoneMeta < 8) { - this.mMetaData = ((short)(this.mMetaData + 3000)); - } else { - this.mMetaData = ((short)(this.mMetaData + 4000)); - } - } - else { - this.mMetaData = ((short)(this.mMetaData + 3000)); - } - } - this.worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, getHarvestData(this.mMetaData), 0); - } - - public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData) - { - aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1)); - Block tBlock = aWorld.getBlock(aX, aY, aZ); - if ((aMetaData > 0) && (tBlock != Blocks.air)) - { - 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, Blocks.stone)) { - return false; - } - aWorld.setBlock(aX, aY, aZ, GregTech_API.sBlockOres1, getHarvestData((short)aMetaData), 0); - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if ((tTileEntity instanceof GT_TileEntity_Ores)) - { - ((GT_TileEntity_Ores)tTileEntity).mMetaData = ((short)aMetaData); - ((GT_TileEntity_Ores)tTileEntity).mNatural = true; - } - return true; - } - return false; - } - - public short getMetaData() - { - return this.mMetaData; - } - - public boolean canUpdate() - { - return false; - } - - public ArrayList getDrops(int aFortune) - { - ArrayList rList = new ArrayList(); - if (this.mMetaData <= 0) - { - rList.add(new ItemStack(Blocks.cobblestone, 1, 0)); - return rList; - } - if (this.mMetaData < 16000) - { - rList.add(new ItemStack(GregTech_API.sBlockOres1, 1, this.mMetaData)); - return rList; - } - Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)]; - if (!this.mNatural) { - aFortune = 0; - } - if (aMaterial != null) - { - Random tRandom = new Random(this.xCoord ^ this.yCoord ^ this.zCoord); - ArrayList tSelector = new ArrayList(); - - - ItemStack tStack = GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L); - if (tStack != null) { - for (int i = 0; i < 1; i++) { - tSelector.add(tStack); - } - } - tStack = GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L); - if (tStack != null) { - for (int i = 0; i < 2; i++) { - tSelector.add(tStack); - } - } - tStack = GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L); - if (tStack != null) { - for (int i = 0; i < 12; i++) { - tSelector.add(tStack); - } - } - tStack = GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L), 1L); - if (tStack != null) { - for (int i = 0; i < 5; i++) { - tSelector.add(tStack); - } - } - tStack = GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L); - if (tStack != null) { - for (int i = 0; i < 10; i++) { - tSelector.add(tStack); - } - } - tStack = GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), 1L); - if (tStack != null) { - for (int i = 0; i < 5; i++) { - tSelector.add(tStack); - } - } - tStack = GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L); - if (tStack != null) { - for (int i = 0; i < 10; i++) { - tSelector.add(tStack); - } - } - if (tSelector.size() > 0) - { - int i = 0; - for (int j = Math.max(1, aMaterial.mOreMultiplier + (aFortune > 0 ? tRandom.nextInt(1 + aFortune * aMaterial.mOreMultiplier) : 0) / 2); i < j; i++) { - rList.add(GT_Utility.copyAmount(1L, new Object[] { tSelector.get(tRandom.nextInt(tSelector.size())) })); - } - } - if (tRandom.nextInt(3 + aFortune) > 1) { - switch (this.mMetaData / 1000 % 16) - { - case 0: - rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Stone, 1L)); break; - case 1: - rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Netherrack, 1L)); break; - case 2: - rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Endstone, 1L)); break; - case 3: - rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.GraniteBlack, 1L)); break; - case 4: - rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.GraniteRed, 1L)); - } - } - } - return rList; - } - - public ITexture[] getTexture(byte aSide) - { - Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)]; - if ((aMaterial != null) && (this.mMetaData < 32000)) { - return new ITexture[] { mStoneTextures[(this.mMetaData / 1000 % 16)], new GT_RenderedTexture(aMaterial.mIconSet.mTextures[this.mMetaData/16000 ==0 ? OrePrefixes.ore.mTextureIndex:OrePrefixes.oreSmall.mTextureIndex], aMaterial.mRGBa) }; - } - return new ITexture[] { mStoneTextures[0], new GT_RenderedTexture(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex]) }; - } -} - - - -/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar - - * Qualified Name: gregtech.common.blocks.GT_TileEntity_Ores - - * JD-Core Version: 0.7.0.1 - - */ +package gregtech.common.blocks; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.ITexturedTileEntity; +import gregtech.api.net.IGT_NetworkHandler; +import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; + +import java.util.ArrayList; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.Packet; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class GT_TileEntity_Ores + extends TileEntity + implements ITexturedTileEntity +{ + private static final ITexture[] mStoneTextures = { new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.netherrack, 0, 0), new GT_CopiedBlockTexture(Blocks.end_stone, 0, 0), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_BLACK_STONE), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_RED_STONE), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0) }; + public short mMetaData = 0; + public boolean mNatural = false; + public boolean mBlocked = true; + + public void readFromNBT(NBTTagCompound aNBT) + { + super.readFromNBT(aNBT); + this.mMetaData = aNBT.getShort("m"); + this.mNatural = aNBT.getBoolean("n"); + } + + public void writeToNBT(NBTTagCompound aNBT) + { + super.writeToNBT(aNBT); + aNBT.setShort("m", this.mMetaData); + aNBT.setBoolean("n", this.mNatural); + } + + public void onUpdated() + { + if ((!this.worldObj.isRemote) && (this.mBlocked)) + { + this.mBlocked = false; + GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, new GT_Packet_Ores(this.xCoord, (short)this.yCoord, this.zCoord, this.mMetaData), this.xCoord, this.zCoord); + } + } + + 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) { + GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, new GT_Packet_Ores(this.xCoord, (short)this.yCoord, this.zCoord, this.mMetaData), this.xCoord, this.zCoord); + } + } + return null; + } + + public static byte getHarvestData(short aMetaData) + { + Materials aMaterial = GregTech_API.sGeneratedMaterials[(aMetaData % 1000)]; + return aMaterial == null ? 0 : (byte)Math.max((aMetaData % 16000 / 1000 == 3) || (aMetaData % 16000 / 1000 == 4) ? 3 : 0, Math.min(7, aMaterial.mToolQuality - (aMetaData < 16000 ? 0 : 1))); + } + + public void overrideOreBlockMaterial(Block aOverridingStoneBlock, byte aOverridingStoneMeta) + { + this.mMetaData = ((short)(int)(this.mMetaData % 1000L + this.mMetaData / 16000L * 16000L)); + if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.netherrack)) { + this.mMetaData = ((short)(this.mMetaData + 1000)); + } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.end_stone)) { + this.mMetaData = ((short)(this.mMetaData + 2000)); + } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, GregTech_API.sBlockGranites)) { + if (aOverridingStoneBlock == GregTech_API.sBlockGranites) + { + if (aOverridingStoneMeta < 8) { + this.mMetaData = ((short)(this.mMetaData + 3000)); + } else { + this.mMetaData = ((short)(this.mMetaData + 4000)); + } + } + else { + this.mMetaData = ((short)(this.mMetaData + 3000)); + } + } + this.worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, getHarvestData(this.mMetaData), 0); + } + + public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData) + {return setOreBlock(aWorld, aX, aY, aZ, aMetaData, false); + } + + public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData, boolean air) + { + if (!air) { + aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1)); + } + Block tBlock = aWorld.getBlock(aX, aY, aZ); + if ((aMetaData > 0) && ((tBlock != Blocks.air)|| air)) + { + 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, Blocks.stone)) { + return false; + } + aWorld.setBlock(aX, aY, aZ, GregTech_API.sBlockOres1, getHarvestData((short)aMetaData), 0); + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if ((tTileEntity instanceof GT_TileEntity_Ores)) + { + ((GT_TileEntity_Ores)tTileEntity).mMetaData = ((short)aMetaData); + ((GT_TileEntity_Ores)tTileEntity).mNatural = true; + } + return true; + } + return false; + } + + public short getMetaData() + { + return this.mMetaData; + } + + public boolean canUpdate() + { + return false; + } + + public ArrayList getDrops(int aFortune) + { + ArrayList rList = new ArrayList(); + if (this.mMetaData <= 0) + { + rList.add(new ItemStack(Blocks.cobblestone, 1, 0)); + return rList; + } + if (this.mMetaData < 16000) + { + rList.add(new ItemStack(GregTech_API.sBlockOres1, 1, this.mMetaData)); + return rList; + } + Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)]; + if (!this.mNatural) { + aFortune = 0; + } + if (aMaterial != null) + { + Random tRandom = new Random(this.xCoord ^ this.yCoord ^ this.zCoord); + ArrayList tSelector = new ArrayList(); + + + ItemStack tStack = GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L); + if (tStack != null) { + for (int i = 0; i < 1; i++) { + tSelector.add(tStack); + } + } + tStack = GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L); + if (tStack != null) { + for (int i = 0; i < 2; i++) { + tSelector.add(tStack); + } + } + tStack = GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L); + if (tStack != null) { + for (int i = 0; i < 12; i++) { + tSelector.add(tStack); + } + } + tStack = GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L), 1L); + if (tStack != null) { + for (int i = 0; i < 5; i++) { + tSelector.add(tStack); + } + } + tStack = GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L); + if (tStack != null) { + for (int i = 0; i < 10; i++) { + tSelector.add(tStack); + } + } + tStack = GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), 1L); + if (tStack != null) { + for (int i = 0; i < 5; i++) { + tSelector.add(tStack); + } + } + tStack = GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L); + if (tStack != null) { + for (int i = 0; i < 10; i++) { + tSelector.add(tStack); + } + } + if (tSelector.size() > 0) + { + int i = 0; + for (int j = Math.max(1, aMaterial.mOreMultiplier + (aFortune > 0 ? tRandom.nextInt(1 + aFortune * aMaterial.mOreMultiplier) : 0) / 2); i < j; i++) { + rList.add(GT_Utility.copyAmount(1L, new Object[] { tSelector.get(tRandom.nextInt(tSelector.size())) })); + } + } + if (tRandom.nextInt(3 + aFortune) > 1) { + switch (this.mMetaData / 1000 % 16) + { + case 0: + rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Stone, 1L)); break; + case 1: + rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Netherrack, 1L)); break; + case 2: + rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Endstone, 1L)); break; + case 3: + rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.GraniteBlack, 1L)); break; + case 4: + rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.GraniteRed, 1L)); + } + } + } + return rList; + } + + public ITexture[] getTexture(byte aSide) + { + Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)]; + if ((aMaterial != null) && (this.mMetaData < 32000)) { + return new ITexture[] { mStoneTextures[(this.mMetaData / 1000 % 16)], new GT_RenderedTexture(aMaterial.mIconSet.mTextures[this.mMetaData/16000 ==0 ? OrePrefixes.ore.mTextureIndex:OrePrefixes.oreSmall.mTextureIndex], aMaterial.mRGBa) }; + } + return new ITexture[] { mStoneTextures[0], new GT_RenderedTexture(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex]) }; + } +} + + + +/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar + + * Qualified Name: gregtech.common.blocks.GT_TileEntity_Ores + + * JD-Core Version: 0.7.0.1 + + */ -- cgit From c68e84f1e23cdf3c2a69d1f04915a4e76e077e8a Mon Sep 17 00:00:00 2001 From: Shawn Buckley Date: Wed, 21 Oct 2015 21:00:04 -0400 Subject: Remove jdgui-comments --- src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java') 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 5f559b2a0e..f8f96f579b 100644 --- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java @@ -251,13 +251,3 @@ public class GT_TileEntity_Ores return new ITexture[] { mStoneTextures[0], new GT_RenderedTexture(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex]) }; } } - - - -/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar - - * Qualified Name: gregtech.common.blocks.GT_TileEntity_Ores - - * JD-Core Version: 0.7.0.1 - - */ -- cgit From 9353aa711b1d750ff945acdfed2d3b956291b615 Mon Sep 17 00:00:00 2001 From: Shawn Buckley Date: Wed, 21 Oct 2015 22:06:25 -0400 Subject: Reformat code --- .../gregtech/common/blocks/GT_TileEntity_Ores.java | 401 ++++++++++----------- 1 file changed, 188 insertions(+), 213 deletions(-) (limited to 'src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java') 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 f8f96f579b..6d70067eaf 100644 --- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java @@ -5,18 +5,12 @@ import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.Textures; -import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.ITexturedTileEntity; -import gregtech.api.net.IGT_NetworkHandler; import gregtech.api.objects.GT_CopiedBlockTexture; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; - -import java.util.ArrayList; -import java.util.Random; - import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; @@ -25,229 +19,210 @@ import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import java.util.ArrayList; +import java.util.Random; + public class GT_TileEntity_Ores - extends TileEntity - implements ITexturedTileEntity -{ - private static final ITexture[] mStoneTextures = { new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.netherrack, 0, 0), new GT_CopiedBlockTexture(Blocks.end_stone, 0, 0), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_BLACK_STONE), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_RED_STONE), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0) }; - public short mMetaData = 0; - public boolean mNatural = false; - public boolean mBlocked = true; - - public void readFromNBT(NBTTagCompound aNBT) - { - super.readFromNBT(aNBT); - this.mMetaData = aNBT.getShort("m"); - this.mNatural = aNBT.getBoolean("n"); - } - - public void writeToNBT(NBTTagCompound aNBT) - { - super.writeToNBT(aNBT); - aNBT.setShort("m", this.mMetaData); - aNBT.setBoolean("n", this.mNatural); - } - - public void onUpdated() - { - if ((!this.worldObj.isRemote) && (this.mBlocked)) - { - this.mBlocked = false; - GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, new GT_Packet_Ores(this.xCoord, (short)this.yCoord, this.zCoord, this.mMetaData), this.xCoord, this.zCoord); - } - } - - 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) { - GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, new GT_Packet_Ores(this.xCoord, (short)this.yCoord, this.zCoord, this.mMetaData), this.xCoord, this.zCoord); - } + extends TileEntity + implements ITexturedTileEntity { + private static final ITexture[] mStoneTextures = {new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.netherrack, 0, 0), new GT_CopiedBlockTexture(Blocks.end_stone, 0, 0), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_BLACK_STONE), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_RED_STONE), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0)}; + public short mMetaData = 0; + public boolean mNatural = false; + public boolean mBlocked = true; + + public static byte getHarvestData(short aMetaData) { + Materials aMaterial = GregTech_API.sGeneratedMaterials[(aMetaData % 1000)]; + return aMaterial == null ? 0 : (byte) Math.max((aMetaData % 16000 / 1000 == 3) || (aMetaData % 16000 / 1000 == 4) ? 3 : 0, Math.min(7, aMaterial.mToolQuality - (aMetaData < 16000 ? 0 : 1))); } - return null; - } - - public static byte getHarvestData(short aMetaData) - { - Materials aMaterial = GregTech_API.sGeneratedMaterials[(aMetaData % 1000)]; - return aMaterial == null ? 0 : (byte)Math.max((aMetaData % 16000 / 1000 == 3) || (aMetaData % 16000 / 1000 == 4) ? 3 : 0, Math.min(7, aMaterial.mToolQuality - (aMetaData < 16000 ? 0 : 1))); - } - - public void overrideOreBlockMaterial(Block aOverridingStoneBlock, byte aOverridingStoneMeta) - { - this.mMetaData = ((short)(int)(this.mMetaData % 1000L + this.mMetaData / 16000L * 16000L)); - if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.netherrack)) { - this.mMetaData = ((short)(this.mMetaData + 1000)); - } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.end_stone)) { - this.mMetaData = ((short)(this.mMetaData + 2000)); - } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, GregTech_API.sBlockGranites)) { - if (aOverridingStoneBlock == GregTech_API.sBlockGranites) - { - if (aOverridingStoneMeta < 8) { - this.mMetaData = ((short)(this.mMetaData + 3000)); - } else { - this.mMetaData = ((short)(this.mMetaData + 4000)); - } - } - else { - this.mMetaData = ((short)(this.mMetaData + 3000)); - } + + public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData) { + return setOreBlock(aWorld, aX, aY, aZ, aMetaData, false); } - this.worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, getHarvestData(this.mMetaData), 0); - } - - public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData) - {return setOreBlock(aWorld, aX, aY, aZ, aMetaData, false); - } - - public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData, boolean air) - { - if (!air) { - aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1)); - } - Block tBlock = aWorld.getBlock(aX, aY, aZ); - if ((aMetaData > 0) && ((tBlock != Blocks.air)|| air)) - { - 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; - } + + public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData, boolean air) { + if (!air) { + aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1)); } - else { - aMetaData += 3000; + Block tBlock = aWorld.getBlock(aX, aY, aZ); + if ((aMetaData > 0) && ((tBlock != Blocks.air) || air)) { + 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, Blocks.stone)) { + return false; + } + aWorld.setBlock(aX, aY, aZ, GregTech_API.sBlockOres1, getHarvestData((short) aMetaData), 0); + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if ((tTileEntity instanceof GT_TileEntity_Ores)) { + ((GT_TileEntity_Ores) tTileEntity).mMetaData = ((short) aMetaData); + ((GT_TileEntity_Ores) tTileEntity).mNatural = true; + } + return true; } - } - else if (!tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) { return false; - } - aWorld.setBlock(aX, aY, aZ, GregTech_API.sBlockOres1, getHarvestData((short)aMetaData), 0); - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if ((tTileEntity instanceof GT_TileEntity_Ores)) - { - ((GT_TileEntity_Ores)tTileEntity).mMetaData = ((short)aMetaData); - ((GT_TileEntity_Ores)tTileEntity).mNatural = true; - } - return true; - } - return false; - } - - public short getMetaData() - { - return this.mMetaData; - } - - public boolean canUpdate() - { - return false; - } - - public ArrayList getDrops(int aFortune) - { - ArrayList rList = new ArrayList(); - if (this.mMetaData <= 0) - { - rList.add(new ItemStack(Blocks.cobblestone, 1, 0)); - return rList; } - if (this.mMetaData < 16000) - { - rList.add(new ItemStack(GregTech_API.sBlockOres1, 1, this.mMetaData)); - return rList; + + public void readFromNBT(NBTTagCompound aNBT) { + super.readFromNBT(aNBT); + this.mMetaData = aNBT.getShort("m"); + this.mNatural = aNBT.getBoolean("n"); } - Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)]; - if (!this.mNatural) { - aFortune = 0; + + public void writeToNBT(NBTTagCompound aNBT) { + super.writeToNBT(aNBT); + aNBT.setShort("m", this.mMetaData); + aNBT.setBoolean("n", this.mNatural); } - if (aMaterial != null) - { - Random tRandom = new Random(this.xCoord ^ this.yCoord ^ this.zCoord); - ArrayList tSelector = new ArrayList(); - - - ItemStack tStack = GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L); - if (tStack != null) { - for (int i = 0; i < 1; i++) { - tSelector.add(tStack); - } - } - tStack = GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L); - if (tStack != null) { - for (int i = 0; i < 2; i++) { - tSelector.add(tStack); - } - } - tStack = GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L); - if (tStack != null) { - for (int i = 0; i < 12; i++) { - tSelector.add(tStack); + + public void onUpdated() { + if ((!this.worldObj.isRemote) && (this.mBlocked)) { + this.mBlocked = false; + GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, new GT_Packet_Ores(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData), this.xCoord, this.zCoord); } - } - tStack = GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L), 1L); - if (tStack != null) { - for (int i = 0; i < 5; i++) { - tSelector.add(tStack); + } + + 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) { + GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, new GT_Packet_Ores(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData), this.xCoord, this.zCoord); + } } - } - tStack = GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L); - if (tStack != null) { - for (int i = 0; i < 10; i++) { - tSelector.add(tStack); + return null; + } + + public void overrideOreBlockMaterial(Block aOverridingStoneBlock, byte aOverridingStoneMeta) { + this.mMetaData = ((short) (int) (this.mMetaData % 1000L + this.mMetaData / 16000L * 16000L)); + if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.netherrack)) { + this.mMetaData = ((short) (this.mMetaData + 1000)); + } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.end_stone)) { + this.mMetaData = ((short) (this.mMetaData + 2000)); + } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, GregTech_API.sBlockGranites)) { + if (aOverridingStoneBlock == GregTech_API.sBlockGranites) { + if (aOverridingStoneMeta < 8) { + this.mMetaData = ((short) (this.mMetaData + 3000)); + } else { + this.mMetaData = ((short) (this.mMetaData + 4000)); + } + } else { + this.mMetaData = ((short) (this.mMetaData + 3000)); + } } - } - tStack = GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), 1L); - if (tStack != null) { - for (int i = 0; i < 5; i++) { - tSelector.add(tStack); + this.worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, getHarvestData(this.mMetaData), 0); + } + + public short getMetaData() { + return this.mMetaData; + } + + public boolean canUpdate() { + return false; + } + + public ArrayList getDrops(int aFortune) { + ArrayList rList = new ArrayList(); + if (this.mMetaData <= 0) { + rList.add(new ItemStack(Blocks.cobblestone, 1, 0)); + return rList; } - } - tStack = GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L); - if (tStack != null) { - for (int i = 0; i < 10; i++) { - tSelector.add(tStack); + if (this.mMetaData < 16000) { + rList.add(new ItemStack(GregTech_API.sBlockOres1, 1, this.mMetaData)); + return rList; } - } - if (tSelector.size() > 0) - { - int i = 0; - for (int j = Math.max(1, aMaterial.mOreMultiplier + (aFortune > 0 ? tRandom.nextInt(1 + aFortune * aMaterial.mOreMultiplier) : 0) / 2); i < j; i++) { - rList.add(GT_Utility.copyAmount(1L, new Object[] { tSelector.get(tRandom.nextInt(tSelector.size())) })); + Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)]; + if (!this.mNatural) { + aFortune = 0; } - } - if (tRandom.nextInt(3 + aFortune) > 1) { - switch (this.mMetaData / 1000 % 16) - { - case 0: - rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Stone, 1L)); break; - case 1: - rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Netherrack, 1L)); break; - case 2: - rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Endstone, 1L)); break; - case 3: - rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.GraniteBlack, 1L)); break; - case 4: - rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.GraniteRed, 1L)); + if (aMaterial != null) { + Random tRandom = new Random(this.xCoord ^ this.yCoord ^ this.zCoord); + ArrayList tSelector = new ArrayList(); + + + ItemStack tStack = GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L); + if (tStack != null) { + for (int i = 0; i < 1; i++) { + tSelector.add(tStack); + } + } + tStack = GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L); + if (tStack != null) { + for (int i = 0; i < 2; i++) { + tSelector.add(tStack); + } + } + tStack = GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L); + if (tStack != null) { + for (int i = 0; i < 12; i++) { + tSelector.add(tStack); + } + } + tStack = GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L), 1L); + if (tStack != null) { + for (int i = 0; i < 5; i++) { + tSelector.add(tStack); + } + } + tStack = GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L); + if (tStack != null) { + for (int i = 0; i < 10; i++) { + tSelector.add(tStack); + } + } + tStack = GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), 1L); + if (tStack != null) { + for (int i = 0; i < 5; i++) { + tSelector.add(tStack); + } + } + tStack = GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L); + if (tStack != null) { + for (int i = 0; i < 10; i++) { + tSelector.add(tStack); + } + } + if (tSelector.size() > 0) { + int i = 0; + for (int j = Math.max(1, aMaterial.mOreMultiplier + (aFortune > 0 ? tRandom.nextInt(1 + aFortune * aMaterial.mOreMultiplier) : 0) / 2); i < j; i++) { + rList.add(GT_Utility.copyAmount(1L, new Object[]{tSelector.get(tRandom.nextInt(tSelector.size()))})); + } + } + if (tRandom.nextInt(3 + aFortune) > 1) { + switch (this.mMetaData / 1000 % 16) { + case 0: + rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Stone, 1L)); + break; + case 1: + rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Netherrack, 1L)); + break; + case 2: + rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Endstone, 1L)); + break; + case 3: + rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.GraniteBlack, 1L)); + break; + case 4: + rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.GraniteRed, 1L)); + } + } } - } + return rList; } - return rList; - } - - public ITexture[] getTexture(byte aSide) - { - Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)]; - if ((aMaterial != null) && (this.mMetaData < 32000)) { - return new ITexture[] { mStoneTextures[(this.mMetaData / 1000 % 16)], new GT_RenderedTexture(aMaterial.mIconSet.mTextures[this.mMetaData/16000 ==0 ? OrePrefixes.ore.mTextureIndex:OrePrefixes.oreSmall.mTextureIndex], aMaterial.mRGBa) }; + + public ITexture[] getTexture(byte aSide) { + Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)]; + if ((aMaterial != null) && (this.mMetaData < 32000)) { + return new ITexture[]{mStoneTextures[(this.mMetaData / 1000 % 16)], new GT_RenderedTexture(aMaterial.mIconSet.mTextures[this.mMetaData / 16000 == 0 ? OrePrefixes.ore.mTextureIndex : OrePrefixes.oreSmall.mTextureIndex], aMaterial.mRGBa)}; + } + return new ITexture[]{mStoneTextures[0], new GT_RenderedTexture(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex])}; } - return new ITexture[] { mStoneTextures[0], new GT_RenderedTexture(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex]) }; - } } -- cgit From 0f288afe8b7ccb8dd164200330677b131408c1b4 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Sun, 25 Oct 2015 22:52:57 +0100 Subject: Added config for block harvest levels. --- src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java') 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 6d70067eaf..787c1bc9f9 100644 --- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java @@ -1,5 +1,6 @@ package gregtech.common.blocks; +import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; @@ -32,7 +33,11 @@ public class GT_TileEntity_Ores public static byte getHarvestData(short aMetaData) { Materials aMaterial = GregTech_API.sGeneratedMaterials[(aMetaData % 1000)]; - return aMaterial == null ? 0 : (byte) Math.max((aMetaData % 16000 / 1000 == 3) || (aMetaData % 16000 / 1000 == 4) ? 3 : 0, Math.min(7, aMaterial.mToolQuality - (aMetaData < 16000 ? 0 : 1))); + byte tByte = aMaterial == null ? 0 : (byte) Math.max((aMetaData % 16000 / 1000 == 3) || (aMetaData % 16000 / 1000 == 4) ? 3 : 0, Math.min(7, aMaterial.mToolQuality - (aMetaData < 16000 ? 0 : 1))); + if(GT_Mod.gregtechproxy.mChangeHarvestLevels ){ + tByte = aMaterial == null ? 0 : (byte) Math.max((aMetaData % 16000 / 1000 == 3) || (aMetaData % 16000 / 1000 == 4) ? GT_Mod.gregtechproxy.mGraniteHavestLevel : 0, Math.min(GT_Mod.gregtechproxy.mMaxHarvestLevel, GT_Mod.gregtechproxy.mHarvestLevel[aMaterial.mMetaItemSubID] - (aMetaData < 16000 ? 0 : 1))); + } + return tByte; } public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData) { -- cgit From 51e269e3f59d6daefb03d121367900d28d38f504 Mon Sep 17 00:00:00 2001 From: Muramasa Date: Sat, 16 Jul 2016 23:48:25 +0100 Subject: Initial This is more of a test and resource for when I eventually rewrite the GT5U ore texture/metadata system. --- .../gregtech/common/blocks/GT_TileEntity_Ores.java | 25 +++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java') 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 787c1bc9f9..d4ba68e338 100644 --- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java @@ -1,5 +1,7 @@ package gregtech.common.blocks; +import exterminatorJeff.undergroundBiomes.common.UndergroundBiomes; +import exterminatorJeff.undergroundBiomes.common.block.BlockMetadataBase; import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; @@ -26,7 +28,8 @@ import java.util.Random; public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntity { - private static final ITexture[] mStoneTextures = {new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.netherrack, 0, 0), new GT_CopiedBlockTexture(Blocks.end_stone, 0, 0), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_BLACK_STONE), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_RED_STONE), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0)}; + //private static final ITexture[] mStoneTextures = {new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.netherrack, 0, 0), new GT_CopiedBlockTexture(Blocks.end_stone, 0, 0), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_BLACK_STONE), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_RED_STONE), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 0), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 1), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 2)