From 8823dc53f882d695d8ff84eeb0dcadace06b3f64 Mon Sep 17 00:00:00 2001 From: Johannes Gäßler Date: Mon, 15 May 2017 21:08:27 +0200 Subject: Added a GUI for the Large Chemical Reactor --- .../textures/gui/multimachines/LargeChemicalReactor.png | Bin 0 -> 2129 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/main/resources/assets/gregtech/textures/gui/multimachines/LargeChemicalReactor.png (limited to 'src/main/resources/assets') diff --git a/src/main/resources/assets/gregtech/textures/gui/multimachines/LargeChemicalReactor.png b/src/main/resources/assets/gregtech/textures/gui/multimachines/LargeChemicalReactor.png new file mode 100644 index 0000000000..2d7771a4ef Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/multimachines/LargeChemicalReactor.png differ -- cgit From b187410005771f1762f3bb5c94c0c5cd26dd06db Mon Sep 17 00:00:00 2001 From: Techlone Date: Thu, 1 Jun 2017 00:01:32 +0500 Subject: AdvMiner rewriting; now it's Ore Drilling Plant Four tiers of Ore Drilling Plant I - radius is 3 chunks MV+ (default) II - radius is 4 chunks HV+ III - radius is 6 chunks EV+ IV - radius is 9 chunks IV+ New behavior: - pick pipes after mining finish - extract ore block before moving down --- src/main/java/gregtech/api/enums/ItemList.java | 4 +- src/main/java/gregtech/api/enums/Textures.java | 2 +- .../GT_MetaTileEntity_MultiBlockBase.java | 7 +- src/main/java/gregtech/api/util/GT_Utility.java | 5 + .../gregtech/common/blocks/GT_Block_Casings4.java | 4 +- .../multi/GT_MetaTileEntity_AdvMiner2.java | 342 ------------------ .../multi/GT_MetaTileEntity_OreDrillingPlant1.java | 51 +++ .../multi/GT_MetaTileEntity_OreDrillingPlant2.java | 51 +++ .../multi/GT_MetaTileEntity_OreDrillingPlant3.java | 51 +++ .../multi/GT_MetaTileEntity_OreDrillingPlant4.java | 51 +++ .../GT_MetaTileEntity_OreDrillingPlantBase.java | 386 +++++++++++++++++++++ .../loaders/postload/GT_MachineRecipeLoader.java | 1 + .../preload/GT_Loader_MetaTileEntities.java | 14 +- .../iconsets/MACHINE_CASING_MINING_OSMIRIDIUM.png | Bin 0 -> 455 bytes .../textures/gui/multimachines/AdvMiner2.png | Bin 4364 -> 0 bytes .../gui/multimachines/OreDrillingPlant.png | Bin 0 -> 4364 bytes 16 files changed, 620 insertions(+), 349 deletions(-) delete mode 100644 src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java create mode 100644 src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant1.java create mode 100644 src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant2.java create mode 100644 src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant3.java create mode 100644 src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant4.java create mode 100644 src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_MINING_OSMIRIDIUM.png delete mode 100644 src/main/resources/assets/gregtech/textures/gui/multimachines/AdvMiner2.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/multimachines/OreDrillingPlant.png (limited to 'src/main/resources/assets') diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index 12cad31cc5..155ebf459d 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -536,7 +536,7 @@ public enum ItemList implements IItemContainer { Casing_ULV, Casing_LV, Casing_MV, Casing_HV, Casing_EV, Casing_IV, Casing_LuV, Casing_ZPM, Casing_UV, Casing_MAX, Casing_BronzePlatedBricks, Casing_HeatProof, Casing_Coil_Cupronickel_Deprecated, Casing_Coil_Kanthal_Deprecated, Casing_Coil_Nichrome_Deprecated, Casing_Coil_Superconductor, Casing_SolidSteel, Casing_FrostProof, Casing_Gearbox_Bronze, Casing_Gearbox_Steel, Casing_Gearbox_Titanium, Casing_Gearbox_TungstenSteel, Casing_Processor, Casing_DataDrive, Casing_ContainmentField, Casing_Assembler, Casing_Pump, Casing_Motor, Casing_Pipe_Bronze, Casing_Pipe_Steel, Casing_Pipe_Titanium, Casing_Pipe_TungstenSteel, Casing_Stripes_A, Casing_Stripes_B, Casing_RadioactiveHazard, Casing_BioHazard, Casing_ExplosionHazard, Casing_FireHazard, Casing_AcidHazard, Casing_MagicHazard, Casing_FrostHazard, Casing_NoiseHazard, Casing_Grate, Casing_Vent, Casing_RadiationProof, Casing_Firebox_Bronze, Casing_Firebox_Steel, Casing_Firebox_TungstenSteel, - Casing_RobustTungstenSteel, Casing_CleanStainlessSteel, Casing_StableTitanium, Casing_Firebox_Titanium, + Casing_MiningOsmiridium, Casing_RobustTungstenSteel, Casing_CleanStainlessSteel, Casing_StableTitanium, Casing_Firebox_Titanium, Hull_ULV, Hull_LV, Hull_MV, Hull_HV, Hull_EV, Hull_IV, Hull_LuV, Hull_ZPM, Hull_UV, Hull_MAX, Automation_Filter_ULV, Automation_Filter_LV, Automation_Filter_MV, Automation_Filter_HV, Automation_Filter_EV, Automation_Filter_IV, Automation_Filter_LuV, Automation_Filter_ZPM, Automation_Filter_UV, Automation_Filter_MAX, @@ -632,7 +632,7 @@ public enum ItemList implements IItemContainer { Casing_Coil_Cupronickel, Casing_Coil_Kanthal, Casing_Coil_Nichrome, Casing_Coil_TungstenSteel, Casing_Coil_HSSG, Casing_Coil_Naquadah, Casing_Coil_NaquadahAlloy, MobRep_LV, MobRep_MV, MobRep_HV, MobRep_EV, MobRep_IV, MobRep_LuV, MobRep_ZPM, MobRep_UV, Cover_PlayerDetector, Machine_Multi_HeatExchanger, Block_BronzePlate, Block_IridiumTungstensteel, Block_Plascrete, Block_TungstenSteelReinforced, - Honeycomb, Charcoal_Pile, Block_BrittleCharcoal, Seismic_Prospector, Seismic_Prospector_Adv, OilDrill, AdvancedMiner2, PyrolyseOven, OilCracker, Crop_Drop_UUMBerry, Crop_Drop_UUABerry, Empty_Board_Basic, Empty_Board_Elite, + Honeycomb, Charcoal_Pile, Block_BrittleCharcoal, Seismic_Prospector, Seismic_Prospector_Adv, OilDrill, OreDrill1, OreDrill2, OreDrill3, OreDrill4, PyrolyseOven, OilCracker, Crop_Drop_UUMBerry, Crop_Drop_UUABerry, Empty_Board_Basic, Empty_Board_Elite, Battery_Charger_4by4_ULV, Battery_Charger_4by4_LV, Battery_Charger_4by4_MV, Battery_Charger_4by4_HV, Battery_Charger_4by4_EV, Battery_Charger_4by4_IV, Battery_Charger_4by4_LuV, Battery_Charger_4by4_ZPM, Battery_Charger_4by4_UV, Battery_Charger_4by4_MAX, MicroTransmitter_HV, MicroTransmitter_EV, MicroTransmitter_IV, MicroTransmitter_LUV, MicroTransmitter_ZPM, Crop_Drop_Bauxite, Crop_Drop_Ilmenite, Crop_Drop_Pitchblende, Crop_Drop_Uraninite, Crop_Drop_Thorium, Crop_Drop_Nickel, Crop_Drop_Zinc, Crop_Drop_Manganese, Crop_Drop_Scheelite, Crop_Drop_Platinum, Crop_Drop_Iridium, Crop_Drop_Osmium, Crop_Drop_Naquadah, Uraniumcell_1, Uraniumcell_2, Uraniumcell_4, Moxcell_1, Moxcell_2, Moxcell_4, diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index d2894ad7bd..565398010f 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -29,7 +29,7 @@ public class Textures { MACHINE_MV_SIDE, MACHINE_MV_BOTTOM, MACHINE_HV_TOP, MACHINE_HV_SIDE, MACHINE_HV_BOTTOM, MACHINE_EV_TOP, MACHINE_EV_SIDE, MACHINE_EV_BOTTOM, MACHINE_IV_TOP, MACHINE_IV_SIDE, MACHINE_IV_BOTTOM, MACHINE_LuV_TOP, MACHINE_LuV_SIDE, MACHINE_LuV_BOTTOM, MACHINE_ZPM_TOP, MACHINE_ZPM_SIDE, MACHINE_ZPM_BOTTOM, MACHINE_UV_TOP, MACHINE_UV_SIDE, MACHINE_UV_BOTTOM, MACHINE_MAX_TOP, MACHINE_MAX_SIDE, MACHINE_MAX_BOTTOM, MACHINE_BRONZEPLATEDBRICKS, MACHINE_HEATPROOFCASING, MACHINE_COIL_SUPERCONDUCTOR, - MACHINE_BRONZEBLASTFURNACE, MACHINE_BRONZEBLASTFURNACE_ACTIVE, MACHINE_CASING_ROBUST_TUNGSTENSTEEL, MACHINE_CASING_CLEAN_STAINLESSSTEEL, MACHINE_CASING_STABLE_TITANIUM, + MACHINE_BRONZEBLASTFURNACE, MACHINE_BRONZEBLASTFURNACE_ACTIVE, MACHINE_CASING_ROBUST_TUNGSTENSTEEL, MACHINE_CASING_CLEAN_STAINLESSSTEEL, MACHINE_CASING_STABLE_TITANIUM, MACHINE_CASING_MINING_OSMIRIDIUM, MACHINE_CASING_FIREBOX_TITANIUM, MACHINE_CASING_FUSION_COIL, MACHINE_CASING_FUSION, MACHINE_CASING_FUSION_GLASS, MACHINE_CASING_FUSION_GLASS_YELLOW, MACHINE_CASING_FUSION_2, MACHINE_CASING_MAGIC, MACHINE_CASING_MAGIC_ACTIVE, MACHINE_CASING_MAGIC_FRONT, MACHINE_CASING_MAGIC_FRONT_ACTIVE, MACHINE_CASING_DRAGONEGG, MACHINE_CASING_SOLID_STEEL, MACHINE_CASING_FROST_PROOF, MACHINE_CASING_PUMP, MACHINE_CASING_MOTOR, MACHINE_CASING_PIPE_BRONZE, MACHINE_CASING_PIPE_STEEL, MACHINE_CASING_PIPE_TITANIUM, MACHINE_CASING_PIPE_TUNGSTENSTEEL, diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index 3dd59126b8..bd10ca635c 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -35,7 +35,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public ItemStack[] mOutputItems = null; public FluidStack[] mOutputFluids = null; public String mNEI; - public int damageFactorLow = 5; + public int damageFactorLow = 5; public float damageFactorHigh = 0.6f; public ArrayList mInputHatches = new ArrayList(); @@ -393,6 +393,11 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { return 6; } + public int getCurrentEfficiency(ItemStack itemStack) { + int maxEff = getMaxEfficiency(itemStack); + return maxEff - (getIdealStatus() - getRepairStatus()) * maxEff / 10; + } + public boolean doRandomMaintenanceDamage() { if (!isCorrectMachinePart(mInventory[1]) || getRepairStatus() == 0) { stopMachine(); diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 6c3289af30..59bc2a59ed 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1950,6 +1950,11 @@ public class GT_Utility { return result; } + @SuppressWarnings("unchecked") + public static T[] listToArray(List list) { + return (T[]) list.toArray(); + } + public static class ItemNBT { public static void setNBT(ItemStack aStack, NBTTagCompound aNBT) { if (aNBT == null) { diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java index 3c3535e4da..4d835869b6 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java @@ -37,6 +37,7 @@ public class GT_Block_Casings4 GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Titanium Turbine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Tungstensteel Turbine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Engine Intake Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Mining Osmiridium Casing"); ItemList.Casing_RobustTungstenSteel.set(new ItemStack(this, 1, 0)); ItemList.Casing_CleanStainlessSteel.set(new ItemStack(this, 1, 1)); @@ -50,6 +51,7 @@ public class GT_Block_Casings4 ItemList.Casing_Turbine2.set(new ItemStack(this, 1, 11)); ItemList.Casing_Turbine3.set(new ItemStack(this, 1, 12)); ItemList.Casing_EngineIntake.set(new ItemStack(this, 1, 13)); + ItemList.Casing_MiningOsmiridium.set(new ItemStack(this, 1, 14)); } public IIcon getIcon(int aSide, int aMeta) { @@ -83,7 +85,7 @@ public class GT_Block_Casings4 case 13: return Textures.BlockIcons.MACHINE_CASING_ENGINE_INTAKE.getIcon(); case 14: - return Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); + return Textures.BlockIcons.MACHINE_CASING_MINING_OSMIRIDIUM.getIcon(); case 15: return Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java deleted file mode 100644 index 08d889b7e4..0000000000 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java +++ /dev/null @@ -1,342 +0,0 @@ -package gregtech.common.tileentities.machines.multi; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.Textures; -import gregtech.api.gui.GT_GUIContainer_MultiMachine; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.objects.ItemData; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -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.InventoryPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.ChunkPosition; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; - -import java.util.ArrayList; - -public class GT_MetaTileEntity_AdvMiner2 extends GT_MetaTileEntity_MultiBlockBase { - - private final ArrayList mMineList = new ArrayList(); - - public GT_MetaTileEntity_AdvMiner2(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GT_MetaTileEntity_AdvMiner2(String aName) { - super(aName); - } - - public String[] getDescription() { - return new String[]{ - "Controller Block for the Advanced Miner II", - "Size(WxHxD): 3x7x3, Controller (Front middle bottom)", - "3x1x3 Base of Solid Steel Casings", - "1x3x1 Solid Steel Casing pillar (Center of base)", - "1x3x1 Steel Frame Boxes (Each Steel pillar side and on top)", - "1x Input Hatch (Any bottom layer casing)", - "1x Output Bus (Any bottom layer casing)", - "1x Maintenance Hatch (Any bottom layer casing)", - "1x MV+ Energy Hatch (Any bottom layer casing)"}; - } - - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ADVMINER2_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ADVMINER2)}; - } - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16]}; - } - - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "AdvMiner2.png"); - } - - @Override - public boolean checkRecipe(ItemStack aStack) { - if (mInventory[1] == null || (mInventory[1].isItemEqual(GT_ModHandler.getIC2Item("miningPipe", 1L)) && mInventory[1].stackSize < mInventory[1].getMaxStackSize())) { - ArrayList tItems = getStoredInputs(); - for (ItemStack tStack : tItems) { - if (tStack.isItemEqual(GT_ModHandler.getIC2Item("miningPipe", 1L))) { - tStack.stackSize--; - if (tStack.stackSize < 1) { - tStack = null; - } - if (mInventory[1] == null) { - mInventory[1] = GT_ModHandler.getIC2Item("miningPipe", 1L); - } else { - mInventory[1].stackSize++; - } - } - - } - } - if (mInputHatches == null || mInputHatches.get(0).mFluid == null || mInputHatches.get(0).mFluid.getFluid().getID() != ItemList.sDrillingFluid.getID()) { - return false; - } - FluidStack tFluid = mInputHatches.get(0).mFluid.copy(); - if (tFluid == null) { - return false; - } - if (tFluid.amount < 100) { - return false; - } - tFluid.amount = 100; - depleteInput(tFluid); - long tVoltage = getMaxInputVoltage(); - if (getBaseMetaTileEntity().getRandomNumber(20) == 0) { - if (mMineList.isEmpty()) { - int yLevel = getYOfPumpHead(); - for (int i = -48; i < 49; i++) { - for (int f = -48; f < 49; f++) { - Block tBlock = getBaseMetaTileEntity().getBlockOffset(i, yLevel - getBaseMetaTileEntity().getYCoord(), f); - int tMetaID = getBaseMetaTileEntity().getMetaIDOffset(i, yLevel - getBaseMetaTileEntity().getYCoord(), f); - if (tBlock instanceof GT_Block_Ores_Abstract) { - TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityOffset(i, yLevel - getBaseMetaTileEntity().getYCoord(), f); - if ((tTileEntity!=null) && (tTileEntity instanceof GT_TileEntity_Ores) && ((GT_TileEntity_Ores) tTileEntity).mNatural == true && !mMineList.contains(new ChunkPosition(i, yLevel - getBaseMetaTileEntity().getYCoord(), f))) { - mMineList.add(new ChunkPosition(i, yLevel - getBaseMetaTileEntity().getYCoord(), f)); - } - } - else { - ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID)); - if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) { - ChunkPosition cp = new ChunkPosition(i, yLevel - getBaseMetaTileEntity().getYCoord(), f); - if (!mMineList.contains(cp)) { - mMineList.add(cp); - } - } - } - } - } - } - if (mMineList.isEmpty()) { - if(getBaseMetaTileEntity().getBlockOffset(ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX, getYOfPumpHead() - 1 - getBaseMetaTileEntity().getYCoord(), ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ) != Blocks.bedrock){ - if (mEnergyHatches.size() > 0 && mEnergyHatches.get(0).getEUVar() > (512 + getMaxInputVoltage() * 4)) { - if (!moveOneDown()) - return false; - } - }else{ - stopMachine(); - return false; - } - } - ArrayList tDrops = new ArrayList(); - Block tMineBlock = null; - ChunkPosition mle = null; - int posX, posY, posZ, offX, offY, offZ; - while ((tMineBlock==null || tMineBlock == Blocks.air) && !mMineList.isEmpty()) { - mle = mMineList.get(0); - mMineList.remove(0); - tMineBlock = getBaseMetaTileEntity().getBlockOffset(mle.chunkPosX, mle.chunkPosY, mle.chunkPosZ); - } - - if (tMineBlock!=null && tMineBlock!=Blocks.air) { - posX = mle.chunkPosX + getBaseMetaTileEntity().getXCoord(); - posY = mle.chunkPosY + getBaseMetaTileEntity().getYCoord(); - posZ = mle.chunkPosZ + getBaseMetaTileEntity().getZCoord(); - offX = mle.chunkPosX; - offY = mle.chunkPosY; - offZ = mle.chunkPosZ; - - int metadata = getBaseMetaTileEntity().getMetaIDOffset(offX, offY, offZ); - boolean silkTouch = tMineBlock.canSilkHarvest(getBaseMetaTileEntity().getWorld(), null, posX, posY, posZ, metadata); - if (silkTouch){ - ItemStack IS = new ItemStack(tMineBlock); - IS.setItemDamage(metadata); - IS.stackSize=1; - tDrops.add(IS); - } - else{ - tDrops = tMineBlock.getDrops(getBaseMetaTileEntity().getWorld(), posX, posY, posZ, metadata, 1); - } - - getBaseMetaTileEntity().getWorld().setBlockToAir(posX, posY, posZ); - if (!tDrops.isEmpty()) { - ItemData tData = GT_OreDictUnificator.getItemData(tDrops.get(0).copy()); - if (tData.mPrefix != OrePrefixes.crushed && tData.mMaterial.mMaterial != Materials.Oilsands) { - - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.findRecipe(getBaseMetaTileEntity(), false, tVoltage, null, tDrops.get(0).copy()); - if (tRecipe != null) { - this.mOutputItems = new ItemStack[tRecipe.mOutputs.length]; - for (int g = 0; g < mOutputItems.length; g++) { - mOutputItems[g] = tRecipe.mOutputs[g].copy(); - if (getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(g)) { - mOutputItems[g].stackSize *= getBaseMetaTileEntity().getRandomNumber(4) + 1; - } - } - } else { - this.mOutputItems = new ItemStack[tDrops.size()]; - for (int g = 0; g < mOutputItems.length; g++) { - mOutputItems[g] = tDrops.get(g).copy(); - } - } - } else { - this.mOutputItems = null; - ItemStack[] tStack = new ItemStack[tDrops.size()]; - for (int j = 0; j < tDrops.size(); j++) { - tStack[j] = tDrops.get(j).copy(); - tStack[j].stackSize = tStack[j].stackSize * (getBaseMetaTileEntity().getRandomNumber(4) + 1); - } - mOutputItems = tStack; - } - } - - } - } - - byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); - this.mEfficiencyIncrease = 10000; - int tEU = 48; - int tDuration = 24; - if (tEU <= 16) { - this.mEUt = (tEU * (1 << tTier - 1) * (1 << tTier - 1)); - this.mMaxProgresstime = (tDuration / (1 << tTier - 1)); - } else { - this.mEUt = tEU; - this.mMaxProgresstime = tDuration; - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; - this.mMaxProgresstime /= 2; - } - } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); - } - this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - return true; - } - - private boolean moveOneDown() { - if ((this.mInventory[1] == null) || (this.mInventory[1].stackSize < 1) - || (!GT_Utility.areStacksEqual(this.mInventory[1], GT_ModHandler.getIC2Item("miningPipe", 1L)))) { - stopMachine(); - return false; - } - int xDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX; - int zDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ; - int yHead = getYOfPumpHead(); - if (yHead <= 0) { - stopMachine(); - return false; - } - if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead - 1, getBaseMetaTileEntity().getZCoord() + zDir) == Blocks.bedrock) { - stopMachine(); - return false; - } - if (!(getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead - 1, getBaseMetaTileEntity().getZCoord() + zDir, GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))))) { - stopMachine(); - return false; - } - if (yHead != getBaseMetaTileEntity().getYCoord()) { - getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead, getBaseMetaTileEntity().getZCoord() + zDir, GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L))); - } - getBaseMetaTileEntity().decrStackSize(1, 1); - return true; - } - - private int getYOfPumpHead() { - int xDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX; - int zDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ; - int y = getBaseMetaTileEntity().getYCoord() - 1; - while (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir) == GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L))) { - y--; - } - if (y == getBaseMetaTileEntity().getYCoord() - 1) { - if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir) != GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))) { - return y + 1; - } - } else if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir) != GT_Utility - .getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L)) && this.mInventory[1] != null && this.mInventory[1].stackSize > 0 && GT_Utility.areStacksEqual(this.mInventory[1], GT_ModHandler.getIC2Item("miningPipe", 1L))) { - getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir, - GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))); - getBaseMetaTileEntity().decrStackSize(0, 1); - } - return y; - } - - @Override - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; - int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - if ((xDir + i != 0) || (zDir + j != 0)) { - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0, zDir + j); - if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16)) && (!addOutputToMachineList(tTileEntity, 16)) && (!addEnergyInputToMachineList(tTileEntity, 16))) { - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j) != GregTech_API.sBlockCasings2) { - return false; - } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j) != 0) { - return false; - } - } - } - } - } - for (int y = 1; y < 4; y++) { - if (aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir) != GregTech_API.sBlockCasings2) { - return false; - } - if (aBaseMetaTileEntity.getBlockOffset(xDir + 1, y, zDir) != GregTech_API.sBlockMachines) { - return false; - } - if (aBaseMetaTileEntity.getBlockOffset(xDir - 1, y, zDir) != GregTech_API.sBlockMachines) { - return false; - } - if (aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir + 1) != GregTech_API.sBlockMachines) { - return false; - } - if (aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir - 1) != GregTech_API.sBlockMachines) { - return false; - } - if (aBaseMetaTileEntity.getBlockOffset(xDir, y + 3, zDir) != GregTech_API.sBlockMachines) { - return false; - } - } - return true; - } - - @Override - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } - - @Override - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } - - @Override - public int getPollutionPerTick(ItemStack aStack) { - return 0; - } - - @Override - public int getDamageToComponent(ItemStack aStack) { - return 0; - } - - @Override - public boolean explodesOnComponentBreak(ItemStack aStack) { - return false; - } - - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_AdvMiner2(this.mName); - } - -} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant1.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant1.java new file mode 100644 index 0000000000..25e4e3eb5d --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant1.java @@ -0,0 +1,51 @@ +package gregtech.common.tileentities.machines.multi; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +public class GT_MetaTileEntity_OreDrillingPlant1 extends GT_MetaTileEntity_OreDrillingPlantBase { + public GT_MetaTileEntity_OreDrillingPlant1(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT_MetaTileEntity_OreDrillingPlant1(String aName) { + super(aName); + } + + @Override + public String[] getDescription() { + return getDescriptionInternal("I"); + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_OreDrillingPlant1(mName); + } + + @Override + protected ItemList getCasingBlockItem() { + return ItemList.Casing_SolidSteel; + } + + @Override + protected Materials getFrameMaterial() { + return Materials.Steel; + } + + @Override + protected int getCasingTextureIndex() { + return 16; + } + + @Override + protected int getRadiusInChunks() { + return 3; + } + + @Override + protected int getMinTier() { + return 2; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant2.java new file mode 100644 index 0000000000..2b161fe471 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant2.java @@ -0,0 +1,51 @@ +package gregtech.common.tileentities.machines.multi; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +public class GT_MetaTileEntity_OreDrillingPlant2 extends GT_MetaTileEntity_OreDrillingPlantBase { + public GT_MetaTileEntity_OreDrillingPlant2(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT_MetaTileEntity_OreDrillingPlant2(String aName) { + super(aName); + } + + @Override + public String[] getDescription() { + return getDescriptionInternal("II"); + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_OreDrillingPlant2(mName); + } + + @Override + protected ItemList getCasingBlockItem() { + return ItemList.Casing_StableTitanium; + } + + @Override + protected Materials getFrameMaterial() { + return Materials.Titanium; + } + + @Override + protected int getCasingTextureIndex() { + return 50; + } + + @Override + protected int getRadiusInChunks() { + return 4; + } + + @Override + protected int getMinTier() { + return 3; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant3.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant3.java new file mode 100644 index 0000000000..1be6391f7a --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant3.java @@ -0,0 +1,51 @@ +package gregtech.common.tileentities.machines.multi; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +public class GT_MetaTileEntity_OreDrillingPlant3 extends GT_MetaTileEntity_OreDrillingPlantBase { + public GT_MetaTileEntity_OreDrillingPlant3(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT_MetaTileEntity_OreDrillingPlant3(String aName) { + super(aName); + } + + @Override + public String[] getDescription() { + return getDescriptionInternal("III"); + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_OreDrillingPlant3(mName); + } + + @Override + protected ItemList getCasingBlockItem() { + return ItemList.Casing_RobustTungstenSteel; + } + + @Override + protected Materials getFrameMaterial() { + return Materials.TungstenSteel; + } + + @Override + protected int getCasingTextureIndex() { + return 48; + } + + @Override + protected int getRadiusInChunks() { + return 6; + } + + @Override + protected int getMinTier() { + return 4; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant4.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant4.java new file mode 100644 index 0000000000..d69ed7c79d --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant4.java @@ -0,0 +1,51 @@ +package gregtech.common.tileentities.machines.multi; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +public class GT_MetaTileEntity_OreDrillingPlant4 extends GT_MetaTileEntity_OreDrillingPlantBase { + public GT_MetaTileEntity_OreDrillingPlant4(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT_MetaTileEntity_OreDrillingPlant4(String aName) { + super(aName); + } + + @Override + public String[] getDescription() { + return getDescriptionInternal("IV"); + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_OreDrillingPlant4(mName); + } + + @Override + protected ItemList getCasingBlockItem() { + return ItemList.Casing_MiningOsmiridium; + } + + @Override + protected Materials getFrameMaterial() { + return Materials.Osmiridium; + } + + @Override + protected int getCasingTextureIndex() { + return 50; + } + + @Override + protected int getRadiusInChunks() { + return 9; + } + + @Override + protected int getMinTier() { + return 5; + } +} 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 new file mode 100644 index 0000000000..cf2456a0ae --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java @@ -0,0 +1,386 @@ +package gregtech.common.tileentities.machines.multi; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.*; +import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.objects.ItemData; +import gregtech.api.util.*; +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.InventoryPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.ChunkPosition; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; + +import java.util.ArrayList; + +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.GT_Values.VN; +import static gregtech.api.enums.GT_Values.W; + +public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTileEntity_MultiBlockBase { + private static final ItemStack miningPipe = GT_ModHandler.getIC2Item("miningPipe", 0); + private static final ItemStack miningPipeTip = GT_ModHandler.getIC2Item("miningPipeTip", 0); + private static final Block miningPipeBlock = GT_Utility.getBlockFromStack(miningPipe); + private static final Block miningPipeTipBlock = GT_Utility.getBlockFromStack(miningPipeTip); + + private final ArrayList oreBlockPositions = new ArrayList<>(); + private Block casingBlock; + + private int casingMeta; + private int frameMeta; + private int casingTextureIndex; + + private ForgeDirection back; + private int xDrill, yDrill, zDrill, xCenter, zCenter, yHead; + private boolean isPickingPipes; + + public GT_MetaTileEntity_OreDrillingPlantBase(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + //initFields(); + } + + public GT_MetaTileEntity_OreDrillingPlantBase(String aName) { + super(aName); + initFields(); + } + + private void initFields() { + xDrill = getBaseMetaTileEntity().getXCoord(); + yDrill = getBaseMetaTileEntity().getYCoord(); + zDrill = getBaseMetaTileEntity().getZCoord(); + back = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()); + xCenter = xDrill + back.offsetX; + zCenter = zDrill + back.offsetZ; + isPickingPipes = false; + casingBlock = getCasingBlockItem().getBlock(); + casingMeta = getCasingBlockItem().get(0).getItemDamage(); + frameMeta = 4096 + getFrameMaterial().mMetaItemSubID; + casingTextureIndex = getCasingTextureIndex(); + } + + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ADVMINER2_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ADVMINER2)}; + } + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16]}; + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "OreDrillingPlant.png"); + } + + @Override + public boolean checkRecipe(ItemStack aStack) { + if (isPickingPipes) { + if (tryPickPipe()) { + mOutputItems = new ItemStack[] {GT_Utility.copyAmount(1, miningPipe)}; + setElectricityStats(); + return true; + } else { + stopMachine(); + return false; + } + } + putMiningPipesFromInputsInController(); + if (!tryConsumeDrillingFluid()) return false; + + fillMineListIfEmpty(); + if (oreBlockPositions.isEmpty()) { + boolean isMoved = moveOneDown(); + if (!isMoved) { + isPickingPipes = true; + setElectricityStats(); + return true; + } + } + + ChunkPosition oreBlockPos = null; + Block oreBlock = null; + + while ((oreBlock == null || oreBlock == Blocks.air) && !oreBlockPositions.isEmpty()) { + oreBlockPos = oreBlockPositions.remove(0); + oreBlock = getBaseMetaTileEntity().getBlock(oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ); + } + + if (oreBlock != null && oreBlock != Blocks.air) { + ArrayList oreBlockDrops = getBlockDrops(oreBlock, oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ); + getBaseMetaTileEntity().getWorld().setBlockToAir(oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ); + mOutputItems = getOutputByDrops(oreBlockDrops); + } + + setElectricityStats(); + return true; + } + + private boolean tryPickPipe() { + if (yHead == yDrill) return false; + if (checkBlockAndMeta(xCenter, yHead + 1, zCenter, miningPipeBlock, W)) + getBaseMetaTileEntity().getWorld().setBlock(xCenter, yHead + 1, zCenter, miningPipeTipBlock); + getBaseMetaTileEntity().getWorld().setBlockToAir(xCenter, yHead, zCenter); + return true; + } + + private void setElectricityStats() { + this.mEfficiency = getCurrentEfficiency(null); + this.mEfficiencyIncrease = 10000; + //T1 = 12; T2 = 48; T3 = 192; T4 = 768 + this.mEUt = 3 * (1 << (getMinTier() << 1)); + //T1 = 960; T2 = 480; T3 = 240; T4 = 120 + this.mMaxProgresstime = 1920 / (1 << getMinTier()); + + long voltage = getMaxInputVoltage(); + long overclockEu = V[Math.max(1, GT_Utility.getTier(voltage)) - 1]; + while (this.mEUt <= overclockEu) { + this.mEUt *= 4; + this.mMaxProgresstime /= 2; + } + + this.mEUt = -this.mEUt; + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + } + + private ItemStack[] getOutputByDrops(ArrayList oreBlockDrops) { + long voltage = getMaxInputVoltage(); + ArrayList outputItems = new ArrayList<>(); + while (!oreBlockDrops.isEmpty()) { + ItemStack currentItem = oreBlockDrops.remove(0).copy(); + if (!doUseMaceratorRecipe(currentItem)) { + multiplyStackSize(currentItem); + outputItems.add(currentItem); + continue; + } + + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.findRecipe(getBaseMetaTileEntity(), false, voltage, null, currentItem); + if (tRecipe == null) { + outputItems.add(currentItem); + continue; + } + + for (int i = 0; i < tRecipe.mOutputs.length; i++) { + ItemStack recipeOutput = tRecipe.mOutputs[i].copy(); + if (getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(i)) + multiplyStackSize(recipeOutput); + outputItems.add(recipeOutput); + } + } + return GT_Utility.listToArray(outputItems); + } + + private boolean doUseMaceratorRecipe(ItemStack currentItem) { + ItemData itemData = GT_OreDictUnificator.getItemData(currentItem); + return itemData == null + || itemData.mPrefix != OrePrefixes.crushed + && itemData.mPrefix != OrePrefixes.dustImpure + && itemData.mPrefix != OrePrefixes.dust + && itemData.mMaterial.mMaterial != Materials.Oilsands; + } + + private void multiplyStackSize(ItemStack itemStack) { + itemStack.stackSize *= getBaseMetaTileEntity().getRandomNumber(4) + 1; + } + + private ArrayList getBlockDrops(final Block oreBlock, int posX, int posY, int posZ) { + final int blockMeta = getBaseMetaTileEntity().getMetaID(posX, posY, posZ); + if (oreBlock.canSilkHarvest(getBaseMetaTileEntity().getWorld(), null, posX, posY, posZ, blockMeta)) { + return new ArrayList() {{ + add(new ItemStack(oreBlock, 1, blockMeta)); + }}; + } else { + return oreBlock.getDrops(getBaseMetaTileEntity().getWorld(), posX, posY, posZ, blockMeta, 1); + } + } + + private boolean tryConsumeDrillingFluid() { + return depleteInput(new FluidStack(ItemList.sDrillingFluid, 2000)); + } + + private void putMiningPipesFromInputsInController() { + int maxPipes = miningPipe.getMaxStackSize(); + if (isHasMiningPipes(maxPipes)) return; + + ItemStack pipes = getStackInSlot(1); + for (ItemStack storedItem : getStoredInputs()) { + if (!storedItem.isItemEqual(miningPipe)) continue; + + if (pipes == null) { + setInventorySlotContents(1, GT_Utility.copy(miningPipe)); + pipes = getStackInSlot(1); + } + + if (pipes.stackSize == maxPipes) break; + + int needPipes = maxPipes - pipes.stackSize; + int transferPipes = storedItem.stackSize < needPipes ? storedItem.stackSize : needPipes; + + pipes.stackSize += transferPipes; + storedItem.stackSize -= transferPipes; + } + updateSlots(); + } + + private void fillMineListIfEmpty() { + if (!oreBlockPositions.isEmpty()) return; + + tryAddOreBlockToMineList(xCenter, yHead - 1, zCenter); + if (yHead == yDrill) return; //skip controller block layer + + int radius = getRadiusInChunks() << 4; + for (int xOff = -radius; xOff <= radius; xOff++) { + for (int zOff = -radius; zOff <= radius; zOff++) { + tryAddOreBlockToMineList(xDrill + xOff, yHead, zDrill + zOff); + } + } + } + + private void tryAddOreBlockToMineList(int x, int y, int z) { + Block block = getBaseMetaTileEntity().getBlock(x, y, z); + int blockMeta = getBaseMetaTileEntity().getMetaID(x, y, z); + ChunkPosition blockPos = new ChunkPosition(x, y, z); + if (block instanceof GT_Block_Ores_Abstract) { + TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntity(x, y, z); + if (tTileEntity != null && tTileEntity instanceof GT_TileEntity_Ores && ((GT_TileEntity_Ores) tTileEntity).mNatural && !oreBlockPositions.contains(blockPos)) { + oreBlockPositions.add(blockPos); + } + } else { + ItemData association = GT_OreDictUnificator.getAssociation(new ItemStack(block, 1, blockMeta)); + if (association != null && association.mPrefix.toString().startsWith("ore") && !oreBlockPositions.contains(blockPos)) { + oreBlockPositions.add(blockPos); + } + } + } + + private boolean moveOneDown() { + if (!isHasMiningPipes()) return false; + + if (yHead <= 0) return false; + if (checkBlockAndMeta(xCenter, yHead - 1, zCenter, Blocks.bedrock, 0)) return false; + + if (!getBaseMetaTileEntity().getWorld().setBlock(xCenter, yHead - 1, zCenter, miningPipeTipBlock)) return false; + if (yHead != yDrill) getBaseMetaTileEntity().getWorld().setBlock(xCenter, yHead, zCenter, miningPipeBlock); + + getBaseMetaTileEntity().decrStackSize(1, 1); + return true; + } + + private boolean isHasMiningPipes() { + return isHasMiningPipes(1); + } + + private boolean isHasMiningPipes(int minCount) { + ItemStack pipe = getStackInSlot(1); + return pipe != null && pipe.stackSize > minCount - 1 && pipe.isItemEqual(miningPipe); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + //check base layer + for (int xOff = -1 + back.offsetX; xOff <= 1 + back.offsetX; xOff++) { + for (int zOff = -1 + back.offsetZ; zOff <= 1 + back.offsetZ; zOff++) { + if (xOff == 0 && zOff == 0) continue; + + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xOff, 0, zOff); + if (addMaintenanceToMachineList(tTileEntity, casingTextureIndex) + || addInputToMachineList(tTileEntity, casingTextureIndex) + || addOutputToMachineList(tTileEntity, casingTextureIndex) + || addEnergyInputToMachineList(tTileEntity, casingTextureIndex)) + continue; + + if (!checkCasingBlock(xOff, 0, zOff)) return false; + } + } + //check tower + for (int yOff = 1; yOff < 4; yOff++) { + if (!checkCasingBlock(back.offsetX, yOff, back.offsetZ) + || !checkFrameBlock(back.offsetX + 1, yOff, back.offsetZ) + || !checkFrameBlock(back.offsetX - 1, yOff, back.offsetZ) + || !checkFrameBlock(back.offsetX, yOff, back.offsetZ + 1) + || !checkFrameBlock(back.offsetX, yOff, back.offsetZ - 1) + || !checkFrameBlock(back.offsetX, yOff + 3, back.offsetZ)) + return false; + } + return checkPipesAndSetYHead(); + } + + private boolean checkPipesAndSetYHead() { + yHead = yDrill - 1; + while (checkBlockAndMeta(xCenter, yHead, zCenter, miningPipeBlock, W)) yHead--; + if (checkBlockAndMeta(xCenter, yHead, zCenter, miningPipeTipBlock, W)) return true; + yHead++; + return yHead == yDrill || getBaseMetaTileEntity().getWorld().setBlock(xCenter, yHead, zCenter, miningPipeTipBlock); + } + + private boolean checkCasingBlock(int xOff, int yOff, int zOff) { + return checkBlockAndMetaOffset(xOff, yOff, zOff, casingBlock, casingMeta); + } + + private boolean checkFrameBlock(int xOff, int yOff, int zOff) { + return checkBlockAndMetaOffset(xOff, yOff, zOff, GregTech_API.sBlockMachines, frameMeta); + } + + private boolean checkBlockAndMetaOffset(int xOff, int yOff, int zOff, Block block, int meta) { + return checkBlockAndMeta(xDrill + xOff, yDrill + yOff, zDrill + zOff, block, meta); + } + + private boolean checkBlockAndMeta(int x, int y, int z, Block block, int meta) { + return (meta == W || getBaseMetaTileEntity().getMetaID(x, y, z) == meta) + && getBaseMetaTileEntity().getBlock(x, y, z) == block; + } + + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + @Override + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerTick(ItemStack aStack) { + return 0; + } + + @Override + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } + + protected abstract ItemList getCasingBlockItem(); + + protected abstract Materials getFrameMaterial(); + + protected abstract int getCasingTextureIndex(); + + protected abstract int getRadiusInChunks(); + + protected abstract int getMinTier(); + + protected String[] getDescriptionInternal(String tierSuffix) { + String casings = getCasingBlockItem().get(0).getDisplayName(); + return new String[]{ + "Controller Block for the Ore Drilling Plant " + (tierSuffix != null ? tierSuffix : ""), + "Size(WxHxD): 3x7x3, Controller (Front middle bottom)", + "3x1x3 Base of " + casings, + "1x3x1 " + casings + " pillar (Center of base)", + "1x3x1 " + getFrameMaterial().mName + " Frame Boxes (Each pillar side and on top)", + "1x Input Hatch (Any bottom layer casing)", + "1x Output Bus (Any bottom layer casing)", + "1x Maintenance Hatch (Any bottom layer casing)", + "1x " + VN[getMinTier()] + "+ Energy Hatch (Any bottom layer casing)"}; + } +} diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 1daeb77eba..37ee710107 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -1345,6 +1345,7 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.TungstenSteel, 1L), ItemList.Casing_RobustTungstenSteel.get(2L, new Object[0]), 50, 16); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.StainlessSteel, 1L), ItemList.Casing_CleanStainlessSteel.get(2L, new Object[0]), 50, 16); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Titanium, 1L), ItemList.Casing_StableTitanium.get(2L, new Object[0]), 50, 16); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmiridium, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Osmiridium, 1L), ItemList.Casing_StableTitanium.get(2L, new Object[0]), 50, 16); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 6L), ItemList.Casing_LuV.get(1L, new Object[0]), ItemList.Casing_Fusion.get(1L, new Object[0]), 50, 16); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Magnalium, 6L), GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.BlueSteel, 1L), ItemList.Casing_Turbine.get(2L, new Object[0]), 50, 16); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 6L), ItemList.Casing_Turbine.get(1L, new Object[0]), ItemList.Casing_Turbine1.get(2L, new Object[0]), 50, 16); diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java index c381a29c43..9f2d79223e 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -58,6 +58,7 @@ public class GT_Loader_MetaTileEntities implements Runnable { GT_ModHandler.addCraftingRecipe(ItemList.Casing_FrostProof.get(2L, new Object[0]), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Aluminium), 'F', OrePrefixes.frameGt.get(Materials.Aluminium)}); GT_ModHandler.addCraftingRecipe(ItemList.Casing_CleanStainlessSteel.get(2L, new Object[0]), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'F', OrePrefixes.frameGt.get(Materials.StainlessSteel)}); GT_ModHandler.addCraftingRecipe(ItemList.Casing_RobustTungstenSteel.get(2L, new Object[0]), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'F', OrePrefixes.frameGt.get(Materials.TungstenSteel)}); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_MiningOsmiridium.get(2L, new Object[0]), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Osmiridium), 'F', OrePrefixes.frameGt.get(Materials.Osmiridium)}); GT_ModHandler.addCraftingRecipe(ItemList.Casing_Turbine.get(2L, new Object[0]), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Magnalium), 'F', OrePrefixes.frameGt.get(Materials.BlueSteel)}); GT_ModHandler.addCraftingRecipe(ItemList.Casing_Turbine1.get(2L, new Object[0]), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.StainlessSteel), 'F', ItemList.Casing_Turbine}); GT_ModHandler.addCraftingRecipe(ItemList.Casing_Turbine2.get(2L, new Object[0]), bits, new Object[]{"PhP", "PFP", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Titanium), 'F', ItemList.Casing_Turbine}); @@ -1209,8 +1210,17 @@ public class GT_Loader_MetaTileEntities implements Runnable { ItemList.OilDrill.set(new GT_MetaTileEntity_OilDrill(1157, "multimachine.oildrill", "Oil Drilling Rig").getStackForm(1)); GT_ModHandler.addCraftingRecipe(ItemList.OilDrill.get(1L, new Object[0]), bitsd, new Object[]{"WWW", "EME", "CCC", 'M', ItemList.Hull_MV, 'W', OrePrefixes.frameGt.get(Materials.Steel), 'E', OrePrefixes.circuit.get(Materials.Good), 'C', ItemList.Electric_Motor_MV}); - ItemList.AdvancedMiner2.set(new GT_MetaTileEntity_AdvMiner2(1158, "multimachine.advminer2", "Advanced Miner II").getStackForm(1)); - GT_ModHandler.addCraftingRecipe(ItemList.AdvancedMiner2.get(1L, new Object[0]), bitsd, new Object[]{"WWW", "EME", "CCC", 'M', ItemList.Hull_EV, 'W', OrePrefixes.frameGt.get(Materials.Titanium), 'E', OrePrefixes.circuit.get(Materials.Data), 'C', ItemList.Electric_Motor_EV}); + ItemList.OreDrill1.set(new GT_MetaTileEntity_OreDrillingPlant1(1158, "multimachine.oredrill1", "Ore Drilling Plant").getStackForm(1)); + GT_ModHandler.addCraftingRecipe(ItemList.OreDrill1.get(1L), bitsd, new Object[]{"WWW", "EME", "CCC", 'M', ItemList.Hull_EV, 'W', OrePrefixes.frameGt.get(Materials.Titanium), 'E', OrePrefixes.circuit.get(Materials.Data), 'C', ItemList.Electric_Motor_EV}); + + ItemList.OreDrill2.set(new GT_MetaTileEntity_OreDrillingPlant2(1177, "multimachine.oredrill2", "Ore Drilling Plant II").getStackForm(1)); + GT_ModHandler.addCraftingRecipe(ItemList.OreDrill2.get(1L), bitsd, new Object[]{"WWW", "EME", "CCC", 'M', ItemList.OreDrill1, 'W', OrePrefixes.frameGt.get(Materials.TungstenSteel), 'E', OrePrefixes.circuit.get(Materials.Elite), 'C', ItemList.Electric_Motor_IV}); + + ItemList.OreDrill3.set(new GT_MetaTileEntity_OreDrillingPlant3(1178, "multimachine.oredrill3", "Ore Drilling Plant III").getStackForm(1)); + GT_ModHandler.addCraftingRecipe(ItemList.OreDrill3.get(1L), bitsd, new Object[]{"WWW", "EME", "CCC", 'M', ItemList.OreDrill2, 'W', OrePrefixes.frameGt.get(Materials.Osmiridium), 'E', OrePrefixes.circuit.get(Materials.Master), 'C', ItemList.Electric_Motor_LuV}); + + ItemList.OreDrill4.set(new GT_MetaTileEntity_OreDrillingPlant4(1179, "multimachine.oredrill4", "Ore Drilling Plant IV").getStackForm(1)); + GT_ModHandler.addCraftingRecipe(ItemList.OreDrill4.get(1L), bitsd, new Object[]{"WWW", "EME", "CCC", 'M', ItemList.OreDrill3, 'W', OrePrefixes.frameGt.get(Materials.Tritanium), 'E', OrePrefixes.circuit.get(Materials.Ultimate), 'C', ItemList.Electric_Motor_ZPM}); ItemList.PyrolyseOven.set(new GT_MetaTileEntity_PyrolyseOven(1159, "multimachine.pyro", "Pyrolyse Oven").getStackForm(1)); GT_ModHandler.addCraftingRecipe(ItemList.PyrolyseOven.get(1L, new Object[0]), bitsd, new Object[]{"WEP", "EME", "WCP", 'M', ItemList.Hull_MV, 'W', ItemList.Electric_Piston_MV, 'P', OrePrefixes.wireGt04.get(Materials.Cupronickel), 'E', OrePrefixes.circuit.get(Materials.Good), 'C', ItemList.Electric_Pump_MV}); diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_MINING_OSMIRIDIUM.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_MINING_OSMIRIDIUM.png new file mode 100644 index 0000000000..d0fcc4da96 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_MINING_OSMIRIDIUM.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/multimachines/AdvMiner2.png b/src/main/resources/assets/gregtech/textures/gui/multimachines/AdvMiner2.png deleted file mode 100644 index 7b60ec4de7..0000000000 Binary files a/src/main/resources/assets/gregtech/textures/gui/multimachines/AdvMiner2.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/gui/multimachines/OreDrillingPlant.png b/src/main/resources/assets/gregtech/textures/gui/multimachines/OreDrillingPlant.png new file mode 100644 index 0000000000..7b60ec4de7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/multimachines/OreDrillingPlant.png differ -- cgit From 75a33be210cda273ef9e6cc9cbbf739dd913907e Mon Sep 17 00:00:00 2001 From: Techlone Date: Thu, 1 Jun 2017 20:23:13 +0500 Subject: Fix OreDrill; fix getting block in ItemList; some changes in addInformation - need check this --- src/main/java/gregtech/api/enums/ItemList.java | 2 +- src/main/java/gregtech/api/enums/Textures.java | 2 +- .../api/metatileentity/MetaTileEntity.java | 8 +-- src/main/java/gregtech/api/util/GT_Utility.java | 10 +++- .../gregtech/common/blocks/GT_Item_Machines.java | 11 +--- .../multi/GT_MetaTileEntity_OreDrillingPlant4.java | 2 +- .../GT_MetaTileEntity_OreDrillingPlantBase.java | 66 ++++++++++----------- .../blocks/iconsets/OVERLAY_FRONT_ADVMINER2.png | Bin 439 -> 0 bytes .../iconsets/OVERLAY_FRONT_ADVMINER2_ACTIVE.png | Bin 457 -> 0 bytes .../blocks/iconsets/OVERLAY_FRONT_ORE_DRILL.png | Bin 0 -> 439 bytes .../iconsets/OVERLAY_FRONT_ORE_DRILL_ACTIVE.png | Bin 0 -> 457 bytes 11 files changed, 50 insertions(+), 51 deletions(-) delete mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_ADVMINER2.png delete mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_ADVMINER2_ACTIVE.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_ORE_DRILL.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_ORE_DRILL_ACTIVE.png (limited to 'src/main/resources/assets') diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index 155ebf459d..22364d991d 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -684,7 +684,7 @@ public enum ItemList implements IItemContainer { public Block getBlock() { if (mHasNotBeenSet) throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - return GT_Utility.getBlockFromStack(getItem()); + return GT_Utility.getBlockFromItem(getItem()); } @Override diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index 565398010f..3d4560cfac 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -101,7 +101,7 @@ public class Textures { BASALT_BRICKS_CRACKED, BASALT_BRICKS_MOSSY, BASALT_BRICKS_CHISELED, BASALT_SMOOTH, OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE, OVERLAY_FRONT_HEAT_EXCHANGER, OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE, OVERLAY_FRONT_PROCESSING_ARRAY, OVERLAY_FRONT_OIL_DRILL_ACTIVE, OVERLAY_FRONT_OIL_DRILL, OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE, OVERLAY_FRONT_DIESEL_ENGINE, OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE, OVERLAY_FRONT_PYROLYSE_OVEN, OVERLAY_FRONT_OIL_CRACKER_ACTIVE, OVERLAY_FRONT_OIL_CRACKER, OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE, OVERLAY_FRONT_DISTILLATION_TOWER, - OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE, OVERLAY_FRONT_ASSEMBLY_LINE, OVERLAY_FRONT_ADVMINER2_ACTIVE, OVERLAY_FRONT_ADVMINER2, OVERLAY_TOP_CLEANROOM_ACTIVE, OVERLAY_TOP_CLEANROOM; + OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE, OVERLAY_FRONT_ASSEMBLY_LINE, OVERLAY_FRONT_ORE_DRILL_ACTIVE, OVERLAY_FRONT_ORE_DRILL, OVERLAY_TOP_CLEANROOM_ACTIVE, OVERLAY_TOP_CLEANROOM; /** * Icon for Fresh CFoam diff --git a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java index 662dc59d80..0fd4061275 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java @@ -86,10 +86,10 @@ public abstract class MetaTileEntity implements IMetaTileEntity { GT_LanguageManager.addStringLocalization("gt.blockmachines." + mName + ".name", aRegionalName); mInventory = new ItemStack[aInvSlotCount]; - if (GT.isClientSide()) { - ItemStack tStack = new ItemStack(GregTech_API.sBlockMachines, 1, aID); - tStack.getItem().addInformation(tStack, null, new ArrayList(), true); - } +// if (GT.isClientSide()) { +// ItemStack tStack = new ItemStack(GregTech_API.sBlockMachines, 1, aID); +// tStack.getItem().addInformation(tStack, null, new ArrayList(), true); +// } } /** diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 59bc2a59ed..f3013a767e 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1018,9 +1018,13 @@ public class GT_Utility { return (Block) aBlock; } - public static Block getBlockFromStack(Object aStack) { - if (isStackInvalid(aStack)) return Blocks.air; - return Block.getBlockFromItem(((ItemStack) aStack).getItem()); + public static Block getBlockFromStack(ItemStack itemStack) { + if (isStackInvalid(itemStack)) return Blocks.air; + return getBlockFromItem(itemStack.getItem()); + } + + public static Block getBlockFromItem(Item item) { + return Block.getBlockFromItem(item); } public static boolean isBlockValid(Object aBlock) { diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java index 4014b01f39..8189a8a52b 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java @@ -33,14 +33,9 @@ public class GT_Item_Machines if ((tDamage <= 0) || (tDamage >= GregTech_API.METATILEENTITIES.length)) { return; } - TileEntity temp = GregTech_API.sBlockMachines.createTileEntity(aPlayer == null ? GT_Values.DW : aPlayer.worldObj, GregTech_API.METATILEENTITIES[tDamage] == null ? 0 : GregTech_API.METATILEENTITIES[tDamage].getTileEntityBaseType()); - temp.setWorldObj(aPlayer == null ? GT_Values.DW : aPlayer.worldObj); - temp.xCoord = 0; - temp.yCoord = 0; - temp.zCoord = 0; - if ((temp instanceof IGregTechTileEntity)) { - IGregTechTileEntity tTileEntity = (IGregTechTileEntity) temp; - tTileEntity.setInitialValuesAsNBT(new NBTTagCompound(), (short) tDamage); + + if (GregTech_API.METATILEENTITIES[tDamage] != null) { + IGregTechTileEntity tTileEntity = GregTech_API.METATILEENTITIES[tDamage].getBaseMetaTileEntity(); if (tTileEntity.getDescription() != null) { int i = 0; for (String tDescription : tTileEntity.getDescription()) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant4.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant4.java index d69ed7c79d..55fc1ef7e0 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant4.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant4.java @@ -36,7 +36,7 @@ public class GT_MetaTileEntity_OreDrillingPlant4 extends GT_MetaTileEntity_OreDr @Override protected int getCasingTextureIndex() { - return 50; + return 62; } @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 cf2456a0ae..9eb31eaf72 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 @@ -45,7 +45,7 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile public GT_MetaTileEntity_OreDrillingPlantBase(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); - //initFields(); + initFields(); } public GT_MetaTileEntity_OreDrillingPlantBase(String aName) { @@ -54,24 +54,18 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile } private void initFields() { - xDrill = getBaseMetaTileEntity().getXCoord(); - yDrill = getBaseMetaTileEntity().getYCoord(); - zDrill = getBaseMetaTileEntity().getZCoord(); - back = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()); - xCenter = xDrill + back.offsetX; - zCenter = zDrill + back.offsetZ; - isPickingPipes = false; casingBlock = getCasingBlockItem().getBlock(); casingMeta = getCasingBlockItem().get(0).getItemDamage(); - frameMeta = 4096 + getFrameMaterial().mMetaItemSubID; + int frameId = 4096 + getFrameMaterial().mMetaItemSubID; + frameMeta = GregTech_API.METATILEENTITIES[frameId] != null ? GregTech_API.METATILEENTITIES[frameId].getTileEntityBaseType() : W; casingTextureIndex = getCasingTextureIndex(); + isPickingPipes = false; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ADVMINER2_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ADVMINER2)}; - } - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16]}; + if (aSide == aFacing) + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[casingTextureIndex],new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL)}; + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[casingTextureIndex]}; } public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { @@ -194,9 +188,7 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile return new ArrayList() {{ add(new ItemStack(oreBlock, 1, blockMeta)); }}; - } else { - return oreBlock.getDrops(getBaseMetaTileEntity().getWorld(), posX, posY, posZ, blockMeta, 1); - } + } else return oreBlock.getDrops(getBaseMetaTileEntity().getWorld(), posX, posY, posZ, blockMeta, 1); } private boolean tryConsumeDrillingFluid() { @@ -234,11 +226,9 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile if (yHead == yDrill) return; //skip controller block layer int radius = getRadiusInChunks() << 4; - for (int xOff = -radius; xOff <= radius; xOff++) { - for (int zOff = -radius; zOff <= radius; zOff++) { + for (int xOff = -radius; xOff <= radius; xOff++) + for (int zOff = -radius; zOff <= radius; zOff++) tryAddOreBlockToMineList(xDrill + xOff, yHead, zDrill + zOff); - } - } } private void tryAddOreBlockToMineList(int x, int y, int z) { @@ -247,14 +237,12 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile ChunkPosition blockPos = new ChunkPosition(x, y, z); if (block instanceof GT_Block_Ores_Abstract) { TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntity(x, y, z); - if (tTileEntity != null && tTileEntity instanceof GT_TileEntity_Ores && ((GT_TileEntity_Ores) tTileEntity).mNatural && !oreBlockPositions.contains(blockPos)) { + if (tTileEntity != null && tTileEntity instanceof GT_TileEntity_Ores && ((GT_TileEntity_Ores) tTileEntity).mNatural && !oreBlockPositions.contains(blockPos)) oreBlockPositions.add(blockPos); - } } else { ItemData association = GT_OreDictUnificator.getAssociation(new ItemStack(block, 1, blockMeta)); - if (association != null && association.mPrefix.toString().startsWith("ore") && !oreBlockPositions.contains(blockPos)) { + if (association != null && association.mPrefix.toString().startsWith("ore") && !oreBlockPositions.contains(blockPos)) oreBlockPositions.add(blockPos); - } } } @@ -282,21 +270,23 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + updateCoordinates(); //check base layer for (int xOff = -1 + back.offsetX; xOff <= 1 + back.offsetX; xOff++) { for (int zOff = -1 + back.offsetZ; zOff <= 1 + back.offsetZ; zOff++) { if (xOff == 0 && zOff == 0) continue; IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xOff, 0, zOff); - if (addMaintenanceToMachineList(tTileEntity, casingTextureIndex) - || addInputToMachineList(tTileEntity, casingTextureIndex) - || addOutputToMachineList(tTileEntity, casingTextureIndex) - || addEnergyInputToMachineList(tTileEntity, casingTextureIndex)) - continue; - - if (!checkCasingBlock(xOff, 0, zOff)) return false; + if (!checkCasingBlock(xOff, 0, zOff) + && !addMaintenanceToMachineList(tTileEntity, casingTextureIndex) + && !addInputToMachineList(tTileEntity, casingTextureIndex) + && !addOutputToMachineList(tTileEntity, casingTextureIndex) + && !addEnergyInputToMachineList(tTileEntity, casingTextureIndex)) + return false; } } + if (mMaintenanceHatches.isEmpty() || mInputHatches.isEmpty() || mOutputBusses.isEmpty() || mEnergyHatches.isEmpty()) return false; + if (GT_Utility.getTier(getMaxInputVoltage()) < getMinTier()) return false; //check tower for (int yOff = 1; yOff < 4; yOff++) { if (!checkCasingBlock(back.offsetX, yOff, back.offsetZ) @@ -310,6 +300,15 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile return checkPipesAndSetYHead(); } + private void updateCoordinates() { + xDrill = getBaseMetaTileEntity().getXCoord(); + yDrill = getBaseMetaTileEntity().getYCoord(); + zDrill = getBaseMetaTileEntity().getZCoord(); + back = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()); + xCenter = xDrill + back.offsetX; + zCenter = zDrill + back.offsetZ; + } + private boolean checkPipesAndSetYHead() { yHead = yDrill - 1; while (checkBlockAndMeta(xCenter, yHead, zCenter, miningPipeBlock, W)) yHead--; @@ -321,7 +320,7 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile private boolean checkCasingBlock(int xOff, int yOff, int zOff) { return checkBlockAndMetaOffset(xOff, yOff, zOff, casingBlock, casingMeta); } - + //meta of frame is getTileEntityBaseType; frame should be checked using its drops (possible a high weight operation) private boolean checkFrameBlock(int xOff, int yOff, int zOff) { return checkBlockAndMetaOffset(xOff, yOff, zOff, GregTech_API.sBlockMachines, frameMeta); } @@ -378,7 +377,8 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile "3x1x3 Base of " + casings, "1x3x1 " + casings + " pillar (Center of base)", "1x3x1 " + getFrameMaterial().mName + " Frame Boxes (Each pillar side and on top)", - "1x Input Hatch (Any bottom layer casing)", + "1x Input Hatch for drilling fluid (Any bottom layer casing)", + "1x Input Bus for mining pipes (Any bottom layer casing; not necessary)", "1x Output Bus (Any bottom layer casing)", "1x Maintenance Hatch (Any bottom layer casing)", "1x " + VN[getMinTier()] + "+ Energy Hatch (Any bottom layer casing)"}; diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_ADVMINER2.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_ADVMINER2.png deleted file mode 100644 index bc1dd3f5f0..0000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_ADVMINER2.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_ADVMINER2_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_ADVMINER2_ACTIVE.png deleted file mode 100644 index b57178136f..0000000000 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_ADVMINER2_ACTIVE.png and /dev/null differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_ORE_DRILL.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_ORE_DRILL.png new file mode 100644 index 0000000000..bc1dd3f5f0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_ORE_DRILL.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_ORE_DRILL_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_ORE_DRILL_ACTIVE.png new file mode 100644 index 0000000000..b57178136f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_ORE_DRILL_ACTIVE.png differ -- cgit From c9908ffa98153a925c98024f5c540445399bc95d Mon Sep 17 00:00:00 2001 From: Technus Date: Sun, 4 Jun 2017 09:28:43 +0200 Subject: wire/pipe hiding/reduced size --- src/main/java/gregtech/api/enums/Textures.java | 2 +- .../implementations/GT_MetaPipeEntity_Cable.java | 20 +++++++++----- .../implementations/GT_MetaPipeEntity_Fluid.java | 16 ++++++----- .../implementations/GT_MetaPipeEntity_Item.java | 24 ++++++++++------- src/main/java/gregtech/common/GT_Client.java | 30 +++++++++++++++++++++ .../textures/blocks/iconsets/INSULATION_LARGE.png | Bin 938 -> 1147 bytes .../blocks/iconsets/INSULATION_MEDIUM_PLUS.png | Bin 0 -> 1147 bytes 7 files changed, 69 insertions(+), 23 deletions(-) create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/INSULATION_MEDIUM_PLUS.png (limited to 'src/main/resources/assets') diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index d2894ad7bd..87089a33b8 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -15,7 +15,7 @@ import static gregtech.api.enums.GT_Values.RES_PATH_ITEM; public class Textures { public enum BlockIcons implements IIconContainer, Runnable { VOID // The Empty Texture - , RENDERING_ERROR, PIPE_RESTRICTOR, INSULATION_FULL, INSULATION_TINY, INSULATION_SMALL, INSULATION_MEDIUM, INSULATION_LARGE, INSULATION_HUGE, CFOAM_FRESH, + , RENDERING_ERROR, PIPE_RESTRICTOR, INSULATION_FULL, INSULATION_TINY, INSULATION_SMALL, INSULATION_MEDIUM, INSULATION_MEDIUM_PLUS, INSULATION_LARGE, INSULATION_HUGE, CFOAM_FRESH, CFOAM_HARDENED, SOLARPANEL, SOLARPANEL_8V, SOLARPANEL_LV, SOLARPANEL_MV, SOLARPANEL_HV, SOLARPANEL_EV, SOLARPANEL_IV, SOLARPANEL_LuV, SOLARPANEL_ZPM, SOLARPANEL_UV, VENT_NORMAL, VENT_ADVANCED, COVER_WOOD_PLATE, ARROW_UP, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, AUTOMATION_FILTER, AUTOMATION_TYPEFILTER, AUTOMATION_CHESTBUFFER, AUTOMATION_SUPERBUFFER, AUTOMATION_REGULATOR, CONCRETE_LIGHT_STONE, CONCRETE_LIGHT_COBBLE, CONCRETE_LIGHT_COBBLE_MOSSY, diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java index fdb3c0da8b..d6d1985e13 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java @@ -17,6 +17,7 @@ import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.MetaPipeEntity; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; +import gregtech.common.GT_Client; import ic2.api.energy.tile.IEnergySink; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -80,13 +81,17 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], Dyes.getModulation(aColorIndex, mMaterial.mRGBa) )}; if (aConnected) { float tThickNess = getThickNess(); - if (tThickNess < 0.37F) + if (tThickNess < 0.124F) + return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.INSULATION_FULL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; + if (tThickNess < 0.374F)//0.375 x1 return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_TINY, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; - if (tThickNess < 0.49F) + if (tThickNess < 0.499F)//0.500 x2 return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_SMALL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; - if (tThickNess < 0.74F) + if (tThickNess < 0.624F)//0.625 x4 return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_MEDIUM, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; - if (tThickNess < 0.99F) + if (tThickNess < 0.749F)//0.750 x8 + return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_MEDIUM_PLUS, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; + if (tThickNess < 0.874F)//0.825 x12 return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_LARGE, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], mMaterial.mRGBa), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_HUGE, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; } @@ -101,8 +106,8 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile @Override public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { - if (!mCanShock) return super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); - return AxisAlignedBB.getBoundingBox(aX + 0.125D, aY + 0.125D, aZ + 0.125D, aX + 0.875D, aY + 0.875D, aZ + 0.875D); + //if (!mCanShock) return super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + return AxisAlignedBB.getBoundingBox(aX + 0.0625D, aY + 0.0625D, aZ + 0.0625D, aX + 0.9375D, aY + 0.9375D, aZ + 0.9375D); } @Override @@ -251,7 +256,7 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile } } } - } + }else if(aBaseMetaTileEntity.isClientSide() && GT_Client.changeDetected==4) aBaseMetaTileEntity.issueTextureUpdate(); } @Override @@ -275,6 +280,7 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile @Override public float getThickNess() { + if(GT_Client.hideValue==1) return 0.0625F; return mThickNess; } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java index effff677d7..ddba7b39bf 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java @@ -16,6 +16,7 @@ import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.objects.XSTR; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Utility; +import gregtech.common.GT_Client; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; @@ -74,13 +75,15 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) { if (aConnected) { float tThickNess = getThickNess(); - if (tThickNess < 0.37F) + if (tThickNess < 0.124F) + return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; + if (tThickNess < 0.374F)//0.375 return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - if (tThickNess < 0.49F) + if (tThickNess < 0.499F)//0.500 return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - if (tThickNess < 0.74F) + if (tThickNess < 0.749F)//0.750 return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - if (tThickNess < 0.99F) + if (tThickNess < 0.874F)//0.825 return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; } @@ -143,7 +146,7 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { @Override public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { - return AxisAlignedBB.getBoundingBox(aX + 0.125D, aY + 0.125D, aZ + 0.125D, aX + 0.875D, aY + 0.875D, aZ + 0.875D); + return AxisAlignedBB.getBoundingBox(aX + 0.0625D, aY + 0.0625D, aZ + 0.0625D, aX + 0.9375D, aY + 0.9375D, aZ + 0.9375D); } @Override @@ -269,7 +272,7 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { } oLastReceivedFrom = mLastReceivedFrom; - } + }else if(aBaseMetaTileEntity.isClientSide() && GT_Client.changeDetected==4) aBaseMetaTileEntity.issueTextureUpdate(); } @Override @@ -386,6 +389,7 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { @Override public float getThickNess() { + if(GT_Client.hideValue==1) return 0.0625F; return mThickNess; } } \ No newline at end of file diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java index e08ae2fb1a..5be230504a 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java @@ -10,6 +10,7 @@ import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.MetaPipeEntity; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; +import gregtech.common.GT_Client; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; @@ -72,13 +73,15 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE if (mIsRestrictive) { if (aConnected) { float tThickNess = getThickNess(); - if (tThickNess < 0.37F) + if (tThickNess < 0.124F) + return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)}; + if (tThickNess < 0.374F)//0.375 return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)}; - if (tThickNess < 0.49F) + if (tThickNess < 0.499F)//0.500 return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)}; - if (tThickNess < 0.74F) + if (tThickNess < 0.749F)//0.750 return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)}; - if (tThickNess < 0.99F) + if (tThickNess < 0.874F)//0.825 return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)}; return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR)}; } @@ -86,13 +89,15 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE } if (aConnected) { float tThickNess = getThickNess(); - if (tThickNess < 0.37F) + if (tThickNess < 0.124F) + return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; + if (tThickNess < 0.374F)//0.375 return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - if (tThickNess < 0.49F) + if (tThickNess < 0.499F)//0.500 return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - if (tThickNess < 0.74F) + if (tThickNess < 0.749F)//0.750 return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; - if (tThickNess < 0.99F) + if (tThickNess < 0.874F)//0.825 return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))}; } @@ -217,7 +222,7 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE if (isInventoryEmpty()) mLastReceivedFrom = 6; oLastReceivedFrom = mLastReceivedFrom; - } + }else if(aBaseMetaTileEntity.isClientSide() && GT_Client.changeDetected==4) aBaseMetaTileEntity.issueTextureUpdate(); } @Override @@ -306,6 +311,7 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE @Override public float getThickNess() { + if(GT_Client.hideValue==1) return 0.0625F; return mThickNess; } } \ No newline at end of file diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index ff4968cd16..494e399762 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -30,6 +30,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.client.event.DrawBlockHighlightEvent; +import net.minecraftforge.oredict.OreDictionary; import org.lwjgl.opengl.GL11; import java.net.URL; @@ -327,6 +328,12 @@ public class GT_Client extends GT_Proxy @SubscribeEvent public void onClientTickEvent(cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent aEvent) { if (aEvent.phase == cpw.mods.fml.common.gameevent.TickEvent.Phase.END) { + if(changeDetected>0)changeDetected--; + int newHideValue=shouldHeldItemHideThings(); + if(newHideValue!=hideValue){ + hideValue=newHideValue; + changeDetected=5; + } mAnimationTick++; if (mAnimationTick % 50L == 0L) {mAnimationDirection = !mAnimationDirection;} @@ -493,4 +500,27 @@ public class GT_Client extends GT_Proxy else aWorld.playSound(aX, aY, aZ, tString, 3F, tString.startsWith("note.") ? (float) Math.pow(2D, (double) (aStack.stackSize - 13) / 12D) : 1.0F, false); } + + public static int hideValue=0; + public static int changeDetected=0; + + private static int shouldHeldItemHideThings() { + try { + EntityPlayer player = Minecraft.getMinecraft().thePlayer; + if (player == null) return 0; + ItemStack held = player.getCurrentEquippedItem(); + if (held == null) return 0; + int[] ids = OreDictionary.getOreIDs(held); + int hide = 0; + for (int i : ids) { + if (OreDictionary.getOreName(i).equals("craftingToolSolderingIron")) { + hide |= 0x1; + break; + } + } + return hide; + }catch(Exception e){ + return 0; + } + } } \ No newline at end of file diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/INSULATION_LARGE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/INSULATION_LARGE.png index 72c4f05658..7f896a09f0 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/INSULATION_LARGE.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/INSULATION_LARGE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/INSULATION_MEDIUM_PLUS.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/INSULATION_MEDIUM_PLUS.png new file mode 100644 index 0000000000..666d51b82f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/INSULATION_MEDIUM_PLUS.png differ -- cgit From 1b753d3528c7a149c23838eb3c4ce0d8f55036a6 Mon Sep 17 00:00:00 2001 From: Techlone Date: Tue, 13 Jun 2017 20:52:53 +0500 Subject: Reworking DataOrb and DataStick --- .gitignore | 1 + src/main/java/gregtech/api/enums/ItemList.java | 2 +- .../gregtech/common/items/GT_MetaGenerated_Item_01.java | 4 ++-- .../gregtech/common/items/GT_MetaGenerated_Item_03.java | 8 ++++---- .../loaders/postload/GT_MachineRecipeLoader.java | 9 +++++---- .../gregtech/textures/items/gt.metaitem.03/90.png | Bin 364 -> 588 bytes .../gregtech/textures/items/gt.metaitem.03/96.png | Bin 0 -> 364 bytes 7 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/96.png (limited to 'src/main/resources/assets') diff --git a/.gitignore b/.gitignore index 27501edac3..f427f51f8c 100644 --- a/.gitignore +++ b/.gitignore @@ -70,6 +70,7 @@ local.properties .idea/ .idea_modules/ +classes/ /out/ gradle/wrapper/gradle-wrapper.properties diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index 12cad31cc5..d2252a4bd2 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -647,7 +647,7 @@ public enum ItemList implements IItemContainer { Circuit_Wafer_HPIC, Circuit_Chip_HPIC, Circuit_Wafer_NanoCPU, Circuit_Chip_NanoCPU, Circuit_Wafer_QuantumCPU, Circuit_Chip_QuantumCPU, Circuit_Chip_CrystalCPU, Circuit_Chip_CrystalSoC, Circuit_Chip_NeuroCPU, Circuit_Chip_Stemcell, Circuit_Processor, Circuit_Computer, Circuit_Nanoprocessor, Circuit_Nanocomputer, Circuit_Elitenanocomputer, Circuit_Quantumprocessor, Circuit_Quantumcomputer, Circuit_Masterquantumcomputer, - Circuit_Quantummainframe, Circuit_Crystalprocessor, Circuit_Crystalcomputer, Circuit_Crystalmainframe, Circuit_Neuroprocessor, Circuit_Wetwarecomputer, Circuit_Wetwaresupercomputer, Circuit_Wetwaremainframe, Circuit_Parts_RawCrystalChip, + Circuit_Quantummainframe, Circuit_Crystalprocessor, Circuit_Crystalcomputer, Circuit_Ultimatecrystalcomputer, Circuit_Crystalmainframe, Circuit_Neuroprocessor, Circuit_Wetwarecomputer, Circuit_Wetwaresupercomputer, Circuit_Wetwaremainframe, Circuit_Parts_RawCrystalChip, Machine_LV_CircuitAssembler, Machine_MV_CircuitAssembler, Machine_HV_CircuitAssembler, Machine_EV_CircuitAssembler, Machine_IV_CircuitAssembler, Machine_LuV_CircuitAssembler, Machine_ZPM_CircuitAssembler, Machine_UV_CircuitAssembler, Circuit_Integrated_Good, Machine_IV_LightningRod, Machine_HV_LightningRod, Machine_EV_LightningRod; public static final ItemList[] diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java index 27e2356f0e..6d7fa3fe11 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java @@ -626,9 +626,9 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { ItemList.Circuit_Data.set(addItem(tLastID = 704, "Workstation", "A extreme Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION})); ItemList.Circuit_Elite.set(addItem(tLastID = 705, "Mainframe", "A elite Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION})); ItemList.Circuit_Master.set(addItem(tLastID = 706, "Nanoprocessor Mainframe", "A master Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION})); - ItemList.Tool_DataOrb.set(addItem(tLastID = 707, "Data Orb", "A High Capacity Data Storage and Master Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION, new Behaviour_DataOrb()})); + ItemList.Tool_DataOrb.set(addItem(tLastID = 707, "Data Orb", "A High Capacity Data Storage and Master Circuit", new Object[]{SubTag.NO_UNIFICATION, new Behaviour_DataOrb()})); GT_ModHandler.addShapelessCraftingRecipe(ItemList.Tool_DataOrb.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Tool_DataOrb.get(1L, new Object[0])}); - ItemList.Tool_DataStick.set(addItem(tLastID = 708, "Data Stick", "A Low Capacity Data Storage and Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION, new Behaviour_DataStick()})); + ItemList.Tool_DataStick.set(addItem(tLastID = 708, "Data Stick", "A Low Capacity Data Storage and Circuit", new Object[]{SubTag.NO_UNIFICATION, new Behaviour_DataStick()})); GT_ModHandler.addShapelessCraftingRecipe(ItemList.Tool_DataStick.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Tool_DataStick.get(1L, new Object[0])}); ItemList.Circuit_Board_Basic.set(addItem(tLastID = 710, "Coated Circuit Board", "A basic Board", new Object[0])); ItemList.Circuit_Board_Coated.set(ItemList.Circuit_Board_Basic.get(1,new Object[0])); diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java index 97052a85ae..b773b4d78d 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java @@ -146,7 +146,7 @@ public class GT_MetaGenerated_Item_03 ItemList.Circuit_Processor.set(addItem(tLastID = 80, "Integrated Processor", "Good Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Good), SubTag.NO_UNIFICATION})); // ItemList.Circuit_Computer.set(addItem(tLastID = 81, "Processor Assembly", "Advanced Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION})); - //Workstation/DataStick Item01 Datacircuit + //Workstation Item01 Datacircuit //Mainframe Item01 DataProcessor ItemList.Circuit_Nanoprocessor.set(addItem(tLastID = 82, "Nanoprocessor", "Advanced Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION})); @@ -160,15 +160,15 @@ public class GT_MetaGenerated_Item_03 ItemList.Circuit_Quantummainframe.set(addItem(tLastID = 88, "Quantumprocessor Mainframe", "Ultimate Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION})); ItemList.Circuit_Crystalprocessor.set(addItem(tLastID = 89, "Crystalprocessor", "Elite Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION})); - //Dataorb Dataorb - ItemList.Circuit_Crystalcomputer.set(addItem(tLastID = 90, "Crystalprocessor Assembly", "Ultimate Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Crystalcomputer.set(addItem(tLastID = 96, "Crystalprocessor Assembly", "Master Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Ultimatecrystalcomputer.set(addItem(tLastID = 90, "Ultimate Crystalcomputer", "Ultimate Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION})); ItemList.Circuit_Crystalmainframe.set(addItem(tLastID = 91, "Crystalprocessor Mainframe", "Super Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), SubTag.NO_UNIFICATION})); ItemList.Circuit_Neuroprocessor.set(addItem(tLastID = 92, "Wetwareprocessor", "Master Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION})); ItemList.Circuit_Wetwarecomputer.set(addItem(tLastID = 93, "Wetwareprocessor Assembly", "Ultimate Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION})); ItemList.Circuit_Wetwaresupercomputer.set(addItem(tLastID = 94, "Wetware Supercomputer", "Super Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), SubTag.NO_UNIFICATION})); ItemList.Circuit_Wetwaremainframe.set(addItem(tLastID = 95, "Wetware Mainframe", "Infinite Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Infinite), SubTag.NO_UNIFICATION})); - ItemList.Circuit_Ultimate.set(ItemList.Circuit_Crystalcomputer.get(1L, new Object[0])); + ItemList.Circuit_Ultimate.set(ItemList.Circuit_Ultimatecrystalcomputer.get(1L, new Object[0]));//maybe should be removed } public boolean doesShowInCreative(OrePrefixes aPrefix, Materials aMaterial, boolean aDoShowAllItems) { diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index e5376e4a22..8dbb8b0a84 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -516,7 +516,7 @@ if(Loader.isModLoaded("Railcraft")){ //Highly Integrated Circuits GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1,o),ItemList.Circuit_Chip_CPU.get(1,o),ItemList.Circuit_Parts_Resistor.get(4,o),ItemList.Circuit_Parts_Capacitor.get(4,o),ItemList.Circuit_Parts_Transistor.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.RedAlloy, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Processor.get(1,o), 200, 60); GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1,o),ItemList.Circuit_Processor.get(3,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_Capacitor.get(4,o),ItemList.Circuit_Chip_Ram.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.RedAlloy, 12)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Computer.get(1,o), 400, 90); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1,o),ItemList.Circuit_Chip_CPU.get(1,o),ItemList.Circuit_Chip_NAND.get(32,o),ItemList.Circuit_Chip_Ram.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.RedAlloy, 8),GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Plastic, 4)},tMat.getMolten(144L * tMultiplier), ItemList.Tool_DataStick.get(1,o), 400, 90); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1,o),ItemList.Circuit_Processor.get(1,o),ItemList.Circuit_Chip_NAND.get(32,o),ItemList.Circuit_Chip_Ram.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.RedAlloy, 8),GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Plastic, 4)},tMat.getMolten(144L * tMultiplier), ItemList.Tool_DataStick.get(1,o), 400, 90); GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(2,o),ItemList.Circuit_Advanced.get(2,o),ItemList.Circuit_Parts_Diode.get(4,o),ItemList.Circuit_Chip_Ram.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Data.get(1,o), 400, 90); GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1),ItemList.Circuit_Data.get(4,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_Capacitor.get(24,o),ItemList.Circuit_Chip_Ram.get(16,o),GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.AnnealedCopper, 12)},tMat.getMolten(144L * tMultiplier*2), ItemList.Circuit_Elite.get(1,o), 1600, 480); GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1,o),ItemList.Circuit_Chip_CPU.get(1,o),ItemList.Circuit_Parts_ResistorSMD.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(4,o),ItemList.Circuit_Parts_TransistorSMD.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.RedAlloy, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Processor.get(1,o), 200, 60); @@ -526,6 +526,7 @@ if(Loader.isModLoaded("Railcraft")){ //Nanotech Circuits GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Fiberglass.get(1,o),ItemList.Circuit_Chip_NanoCPU.get(1,o),ItemList.Circuit_Parts_ResistorSMD.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(4,o),ItemList.Circuit_Parts_TransistorSMD.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 2)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Nanoprocessor.get(1,o), 200, 600); GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Fiberglass.get(1,o),ItemList.Circuit_Nanoprocessor.get(3,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(4,o),ItemList.Circuit_Chip_Ram.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Nanocomputer.get(1,o), 400, 600); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Fiberglass.get(1,o),ItemList.Circuit_Nanoprocessor.get(1,o),ItemList.Circuit_Chip_Ram.get(4,o),ItemList.Circuit_Chip_NOR.get(32,o),ItemList.Circuit_Chip_NAND.get(64,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 32)},tMat.getMolten(144L * tMultiplier), ItemList.Tool_DataOrb.get(1,o), 400, 1200); GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Fiberglass.get(2,o),ItemList.Circuit_Nanocomputer.get(2,o),ItemList.Circuit_Parts_DiodeSMD.get(4,o),ItemList.Circuit_Chip_NOR.get(4,o),ItemList.Circuit_Chip_Ram.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Elitenanocomputer.get(1,o), 400, 600); GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1),ItemList.Circuit_Elitenanocomputer.get(4,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(24,o),ItemList.Circuit_Chip_Ram.get(16,o),GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.AnnealedCopper, 12)},tMat.getMolten(144L * tMultiplier*2), ItemList.Circuit_Master.get(1,o), 1600, 1920); //Quantum Circuits @@ -535,9 +536,9 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1),ItemList.Circuit_Masterquantumcomputer.get(4,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(24,o),ItemList.Circuit_Chip_Ram.get(16,o),GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.AnnealedCopper, 12)},tMat.getMolten(144L * tMultiplier*2), ItemList.Circuit_Quantummainframe.get(1,o), 1600, 7680); //Crystallized Circuits GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1,o),ItemList.Circuit_Chip_CrystalCPU.get(1,o),ItemList.Circuit_Chip_NanoCPU.get(1,o),ItemList.Circuit_Parts_CapacitorSMD.get(4,o),ItemList.Circuit_Parts_TransistorSMD.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.NiobiumTitanium, 2)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Crystalprocessor.get(1,o), 200, 9600); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1,o),ItemList.Circuit_Crystalprocessor.get(3,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(4,o),ItemList.Circuit_Chip_Ram.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.NiobiumTitanium, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Crystalcomputer.get(1,o), 400, 9600); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1,o),ItemList.Circuit_Crystalprocessor.get(1,o),ItemList.Circuit_Chip_Ram.get(4,o),ItemList.Circuit_Chip_NOR.get(32,o),ItemList.Circuit_Chip_NAND.get(64,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.NiobiumTitanium, 32)},tMat.getMolten(144L * tMultiplier), ItemList.Tool_DataOrb.get(1,o), 400, 9600); - GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1),ItemList.Circuit_Crystalcomputer.get(8,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(24,o),ItemList.Circuit_Chip_Ram.get(16,o),GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 12)},tMat.getMolten(144L * tMultiplier*2), ItemList.Circuit_Crystalmainframe.get(1,o), 1600, 30720); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1,o),ItemList.Circuit_Crystalprocessor.get(3,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(4,o),ItemList.Circuit_Chip_Ram.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.NiobiumTitanium, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Crystalcomputer.get(1,o), 400, 9600); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(2,o),ItemList.Circuit_Crystalcomputer.get(2,o),ItemList.Circuit_Parts_DiodeSMD.get(4,o),ItemList.Circuit_Chip_NOR.get(4,o),ItemList.Circuit_Chip_Ram.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.NiobiumTitanium, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Ultimatecrystalcomputer.get(1,o), 400, 9600); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1),ItemList.Circuit_Ultimatecrystalcomputer.get(4,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(24,o),ItemList.Circuit_Chip_Ram.get(16,o),GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 12)},tMat.getMolten(144L * tMultiplier*2), ItemList.Circuit_Crystalmainframe.get(1,o), 1600, 30720); //Wetware Circuits GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Wetware.get(1,o),ItemList.Circuit_Chip_NeuroCPU.get(1,o),ItemList.Circuit_Chip_CrystalCPU.get(1,o),ItemList.Circuit_Parts_CapacitorSMD.get(4,o),ItemList.Circuit_Parts_TransistorSMD.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.YttriumBariumCuprate, 2)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Neuroprocessor.get(1,o), 200, 38400); GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Wetware.get(1,o),ItemList.Circuit_Neuroprocessor.get(3,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(4,o),ItemList.Circuit_Chip_Ram.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.YttriumBariumCuprate, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Wetwarecomputer.get(1,o), 400, 38400); diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/90.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/90.png index d6ff394c66..ad7b99d233 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/90.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/90.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/96.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/96.png new file mode 100644 index 0000000000..d6ff394c66 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/96.png differ -- cgit