From a006b76304b9d1a7ce34c2d7700aee6753f250f5 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Thu, 13 Oct 2016 22:26:10 +0200 Subject: Drop Items from Exploding GT Machines + Config --- .../api/metatileentity/BaseMetaTileEntity.java | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index 1b3bafca90..1272eb8fd8 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -31,9 +31,11 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; +import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.Random; import static gregtech.api.enums.GT_Values.NW; import static gregtech.api.enums.GT_Values.V; @@ -1089,6 +1091,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE @Override public void doExplosion(long aAmount) { + System.out.println("doExplosion"); if (canAccessData()) { // This is only for Electric Machines if (GregTech_API.sMachineWireFire && mMetaTileEntity.isElectric()) { @@ -1100,6 +1103,33 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE mReleaseEnergy = false; // Normal Explosion Code mMetaTileEntity.onExplosion(); + if(GT_Mod.gregtechproxy.mExplosionItemDrop){ + Random tRandom = new Random(); + for (int i = 0; i < this.getSizeInventory(); i++) { + ItemStack tItem = this.getStackInSlot(i); + System.out.println("getInventory: "+i); + if ((tItem != null) && (tItem.stackSize > 0) && (this.isValidSlot(i))) { + EntityItem tItemEntity = new EntityItem(this.worldObj, this.xCoord + tRandom.nextFloat() * 0.8F + 0.1F, this.yCoord + tRandom.nextFloat() * 0.8F + 0.1F, this.zCoord + tRandom.nextFloat() * 0.8F + 0.1F, new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); + if (tItem.hasTagCompound()) { + tItemEntity.getEntityItem().setTagCompound((NBTTagCompound) tItem.getTagCompound().copy()); + } + tItemEntity.motionX = (tRandom.nextGaussian() * 0.0500000007450581D); + tItemEntity.motionY = (tRandom.nextGaussian() * 0.0500000007450581D + 0.2000000029802322D); + tItemEntity.motionZ = (tRandom.nextGaussian() * 0.0500000007450581D); + tItemEntity.hurtResistantTime = 999999; + tItemEntity.lifespan = 60000; + try { + Field tField = tItemEntity.getClass().getDeclaredField("health"); + tField.setAccessible(true); + tField.setInt(tItemEntity, 99999999); + } catch (Exception e) {e.printStackTrace();} + this.worldObj.spawnEntityInWorld(tItemEntity); + System.out.println("spawnItem: "+tItemEntity.getEntityItem().getDisplayName()); + tItem.stackSize = 0; + this.setInventorySlotContents(i, null); + } + } + } mMetaTileEntity.doExplosion(aAmount); } } -- cgit From a6301759b11c9b8b59f470f97ac5921490358bdd Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Mon, 17 Oct 2016 12:37:13 +0200 Subject: Exploding GT machines now drop randomly some of their crafting components. --- .../api/metatileentity/BaseMetaTileEntity.java | 52 +++++++++++++--------- .../gregtech/loaders/misc/GT_Achievements.java | 2 +- 2 files changed, 31 insertions(+), 23 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index 1272eb8fd8..e94abc0050 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -1091,7 +1091,6 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE @Override public void doExplosion(long aAmount) { - System.out.println("doExplosion"); if (canAccessData()) { // This is only for Electric Machines if (GregTech_API.sMachineWireFire && mMetaTileEntity.isElectric()) { @@ -1104,35 +1103,44 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE // Normal Explosion Code mMetaTileEntity.onExplosion(); if(GT_Mod.gregtechproxy.mExplosionItemDrop){ - Random tRandom = new Random(); for (int i = 0; i < this.getSizeInventory(); i++) { ItemStack tItem = this.getStackInSlot(i); - System.out.println("getInventory: "+i); if ((tItem != null) && (tItem.stackSize > 0) && (this.isValidSlot(i))) { - EntityItem tItemEntity = new EntityItem(this.worldObj, this.xCoord + tRandom.nextFloat() * 0.8F + 0.1F, this.yCoord + tRandom.nextFloat() * 0.8F + 0.1F, this.zCoord + tRandom.nextFloat() * 0.8F + 0.1F, new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); - if (tItem.hasTagCompound()) { - tItemEntity.getEntityItem().setTagCompound((NBTTagCompound) tItem.getTagCompound().copy()); - } - tItemEntity.motionX = (tRandom.nextGaussian() * 0.0500000007450581D); - tItemEntity.motionY = (tRandom.nextGaussian() * 0.0500000007450581D + 0.2000000029802322D); - tItemEntity.motionZ = (tRandom.nextGaussian() * 0.0500000007450581D); - tItemEntity.hurtResistantTime = 999999; - tItemEntity.lifespan = 60000; - try { - Field tField = tItemEntity.getClass().getDeclaredField("health"); - tField.setAccessible(true); - tField.setInt(tItemEntity, 99999999); - } catch (Exception e) {e.printStackTrace();} - this.worldObj.spawnEntityInWorld(tItemEntity); - System.out.println("spawnItem: "+tItemEntity.getEntityItem().getDisplayName()); - tItem.stackSize = 0; - this.setInventorySlotContents(i, null); + dropItems(tItem); + this.setInventorySlotContents(i, null); } + } + } + if (mRecipeStuff != null) { + for (int i = 0; i < 9; i++) { + if (this.getRandomNumber(100) < 50) { + dropItems(GT_Utility.loadItem(mRecipeStuff, "Ingredient." + i)); } - } + } } mMetaTileEntity.doExplosion(aAmount); } } + + public void dropItems(ItemStack tItem){ + if(tItem==null)return; + Random tRandom = new Random(); + EntityItem tItemEntity = new EntityItem(this.worldObj, this.xCoord + tRandom.nextFloat() * 0.8F + 0.1F, this.yCoord + tRandom.nextFloat() * 0.8F + 0.1F, this.zCoord + tRandom.nextFloat() * 0.8F + 0.1F, new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); + if (tItem.hasTagCompound()) { + tItemEntity.getEntityItem().setTagCompound((NBTTagCompound) tItem.getTagCompound().copy()); + } + tItemEntity.motionX = (tRandom.nextGaussian() * 0.0500000007450581D); + tItemEntity.motionY = (tRandom.nextGaussian() * 0.0500000007450581D + 0.2000000029802322D); + tItemEntity.motionZ = (tRandom.nextGaussian() * 0.0500000007450581D); + tItemEntity.hurtResistantTime = 999999; + tItemEntity.lifespan = 60000; + try { + Field tField = tItemEntity.getClass().getDeclaredField("health"); + tField.setAccessible(true); + tField.setInt(tItemEntity, 99999999); + } catch (Exception e) {e.printStackTrace();} + this.worldObj.spawnEntityInWorld(tItemEntity); + tItem.stackSize = 0; + } @Override public ArrayList getDrops() { diff --git a/src/main/java/gregtech/loaders/misc/GT_Achievements.java b/src/main/java/gregtech/loaders/misc/GT_Achievements.java index 56cb0736a3..627b01d9a9 100644 --- a/src/main/java/gregtech/loaders/misc/GT_Achievements.java +++ b/src/main/java/gregtech/loaders/misc/GT_Achievements.java @@ -488,7 +488,7 @@ public class GT_Achievements { return; } ItemData data = GT_OreDictUnificator.getItemData(stack); - if (data != null) { + if (data != null && data.mPrefix!=null) { if (data.mPrefix == OrePrefixes.dust) { if (data.mMaterial.mMaterial == Materials.Lutetium) { issueAchievement(player, "newmetal"); -- cgit From 49ff6ffa31ce3f63fe878c683ef29f02b031b815 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Fri, 21 Oct 2016 20:12:23 +0200 Subject: Wrench shift click can move machine front direction --- .../java/gregtech/api/metatileentity/BaseMetaTileEntity.java | 6 +++++- .../implementations/GT_MetaTileEntity_BasicMachine.java | 10 ++++++++++ src/main/java/gregtech/common/blocks/GT_Block_Machines.java | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index e94abc0050..2d2f515528 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -8,6 +8,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IEnergyConnected; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; import gregtech.api.net.GT_Packet_TileEntity; import gregtech.api.objects.GT_ItemStack; import gregtech.api.util.*; @@ -1186,7 +1187,10 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE return true; } if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList)) { - if (mMetaTileEntity.onWrenchRightClick(aSide, GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ), aPlayer, aX, aY, aZ)) { + if(aPlayer.isSneaking() && mMetaTileEntity instanceof GT_MetaTileEntity_BasicMachine && ((GT_MetaTileEntity_BasicMachine)mMetaTileEntity).setMainFacing(GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ))){ + GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer); + GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(100), 1.0F, -1, xCoord, yCoord, zCoord); + }else if (mMetaTileEntity.onWrenchRightClick(aSide, GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ), aPlayer, aX, aY, aZ)) { GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer); GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(100), 1.0F, -1, xCoord, yCoord, zCoord); } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java index 4ab9ad5376..6da78e1871 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java @@ -87,6 +87,16 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B mGUIName = aGUIName; mNEIName = aNEIName; } + + public boolean setMainFacing(byte aDirection){ + mMainFacing = aDirection; + if(getBaseMetaTileEntity().getFrontFacing() == mMainFacing){ + getBaseMetaTileEntity().setFrontFacing(GT_Utility.getOppositeSide(aDirection)); + } + onFacingChange(); + onMachineBlockUpdate(); + return true; + } @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java index d9c05fd17a..3d8a814260 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java @@ -259,7 +259,7 @@ public class GT_Block_Machines if(aPlayer.isSneaking()){ ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); if(tCurrentItem!=null){ - if(!GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList)){ + if(!GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList) && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList)){ return false; } }else {return false;} -- cgit From 13c8f127cda68d68009cbb1d80f6b01da07df09f Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Sun, 23 Oct 2016 12:15:42 +0200 Subject: Add Automatic Maintainance Hatch --- src/main/java/gregtech/api/enums/ItemList.java | 2 +- .../GT_MetaTileEntity_Hatch_Maintenance.java | 88 +++++++++++++++++++++- .../GT_MetaTileEntity_MultiBlockBase.java | 2 + .../preload/GT_Loader_MetaTileEntities.java | 4 + 4 files changed, 91 insertions(+), 5 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index a453349eeb..55e262dfc6 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -639,7 +639,7 @@ public enum ItemList implements IItemContainer { ModularBasicHelmet, ModularBasicChestplate, ModularBasicLeggings, ModularBasicBoots, ModularElectric1Helmet, ModularElectric1Chestplate, ModularElectric1Leggings, ModularElectric1Boots, ModularElectric2Helmet, ModularElectric2Chestplate, ModularElectric2Leggings, ModularElectric2Boots, Block_Powderbarrel, GelledToluene, - FluidRegulator_LV, FluidRegulator_MV, FluidRegulator_HV, FluidRegulator_EV, FluidRegulator_IV, FluidRegulator_LuV, FluidRegulator_ZPM, FluidRegulator_UV, FluidFilter, CuringOven, Machine_Multi_Assemblyline, Machine_Multi_DieselEngine, QuantumEye, QuantumStar, Gravistar, Block_SSFUEL, Block_MSSFUEL, SFMixture, MSFMixture, Depleted_Naquadah_1, Depleted_Naquadah_2, Depleted_Naquadah_4, NaquadahCell_1, NaquadahCell_2, NaquadahCell_4; + FluidRegulator_LV, FluidRegulator_MV, FluidRegulator_HV, FluidRegulator_EV, FluidRegulator_IV, FluidRegulator_LuV, FluidRegulator_ZPM, FluidRegulator_UV, FluidFilter, CuringOven, Machine_Multi_Assemblyline, Machine_Multi_DieselEngine, QuantumEye, QuantumStar, Gravistar, Block_SSFUEL, Block_MSSFUEL, SFMixture, MSFMixture, Depleted_Naquadah_1, Depleted_Naquadah_2, Depleted_Naquadah_4, NaquadahCell_1, NaquadahCell_2, NaquadahCell_4, Hatch_AutoMaintenance; public static final ItemList[] DYE_ONLY_ITEMS = {Color_00, Color_01, Color_02, Color_03, Color_04, Color_05, Color_06, Color_07, Color_08, Color_09, Color_10, Color_11, Color_12, Color_13, Color_14, Color_15}, SPRAY_CAN_DYES = {Spray_Color_00, Spray_Color_01, Spray_Color_02, Spray_Color_03, Spray_Color_04, Spray_Color_05, Spray_Color_06, Spray_Color_07, Spray_Color_08, Spray_Color_09, Spray_Color_10, Spray_Color_11, Spray_Color_12, Spray_Color_13, Spray_Color_14, Spray_Color_15}, SPRAY_CAN_DYES_USED = {Spray_Color_Used_00, Spray_Color_Used_01, Spray_Color_Used_02, Spray_Color_Used_03, Spray_Color_Used_04, Spray_Color_Used_05, Spray_Color_Used_06, Spray_Color_Used_07, Spray_Color_Used_08, Spray_Color_Used_09, Spray_Color_Used_10, Spray_Color_Used_11, Spray_Color_Used_12, Spray_Color_Used_13, Spray_Color_Used_14, Spray_Color_Used_15}, TRANSFORMERS = {Transformer_LV_ULV, Transformer_MV_LV, Transformer_HV_MV, Transformer_EV_HV, Transformer_IV_EV, Transformer_LuV_IV, Transformer_ZPM_LuV, Transformer_UV_ZPM, Transformer_MAX_UV}, MACHINE_HULLS = {Hull_ULV, Hull_LV, Hull_MV, Hull_HV, Hull_EV, Hull_IV, Hull_LuV, Hull_ZPM, Hull_UV, Hull_MAX}, HATCHES_DYNAMO = {Hatch_Dynamo_ULV, Hatch_Dynamo_LV, Hatch_Dynamo_MV, Hatch_Dynamo_HV, Hatch_Dynamo_EV, Hatch_Dynamo_IV, Hatch_Dynamo_LuV, Hatch_Dynamo_ZPM, Hatch_Dynamo_UV, Hatch_Dynamo_MAX}, HATCHES_ENERGY = {Hatch_Energy_ULV, Hatch_Energy_LV, Hatch_Energy_MV, Hatch_Energy_HV, Hatch_Energy_EV, Hatch_Energy_IV, Hatch_Energy_LuV, Hatch_Energy_ZPM, Hatch_Energy_UV, Hatch_Energy_MAX}, HATCHES_INPUT = {Hatch_Input_ULV, Hatch_Input_LV, Hatch_Input_MV, Hatch_Input_HV, Hatch_Input_EV, Hatch_Input_IV, Hatch_Input_LuV, Hatch_Input_ZPM, Hatch_Input_UV, Hatch_Input_MAX}, HATCHES_INPUT_BUS = {Hatch_Input_Bus_ULV, Hatch_Input_Bus_LV, Hatch_Input_Bus_MV, Hatch_Input_Bus_HV, Hatch_Input_Bus_EV, Hatch_Input_Bus_IV, Hatch_Input_Bus_LuV, Hatch_Input_Bus_ZPM, Hatch_Input_Bus_UV, Hatch_Input_Bus_MAX}, HATCHES_OUTPUT = {Hatch_Output_ULV, Hatch_Output_LV, Hatch_Output_MV, Hatch_Output_HV, Hatch_Output_EV, Hatch_Output_IV, Hatch_Output_LuV, Hatch_Output_ZPM, Hatch_Output_UV, Hatch_Output_MAX}, HATCHES_OUTPUT_BUS = {Hatch_Output_Bus_ULV, Hatch_Output_Bus_LV, Hatch_Output_Bus_MV, Hatch_Output_Bus_HV, Hatch_Output_Bus_EV, Hatch_Output_Bus_IV, Hatch_Output_Bus_LuV, Hatch_Output_Bus_ZPM, Hatch_Output_Bus_UV, Hatch_Output_Bus_MAX}, HATCHES_MUFFLER = {Hatch_Muffler_LV, Hatch_Muffler_LV, Hatch_Muffler_MV, Hatch_Muffler_HV, Hatch_Muffler_EV, Hatch_Muffler_IV, Hatch_Muffler_LuV, Hatch_Muffler_ZPM, Hatch_Muffler_UV, Hatch_Muffler_MAX}; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java index 049f34dfba..6340939ee7 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java @@ -1,9 +1,17 @@ package gregtech.api.metatileentity.implementations; +import java.util.ArrayList; +import java.util.List; + import gregtech.GT_Mod; 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_Container_2by2; import gregtech.api.gui.GT_Container_MaintenanceHatch; +import gregtech.api.gui.GT_GUIContainer_2by2; import gregtech.api.gui.GT_GUIContainer_MaintenanceHatch; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -18,20 +26,30 @@ import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import scala.actors.threadpool.Arrays; public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch { - public boolean mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false; + public boolean mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false, mAuto; + public GT_MetaTileEntity_MultiBlockBase mController = null; public GT_MetaTileEntity_Hatch_Maintenance(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, 1, "For maintaining Multiblocks"); + mAuto = false; + } + + public GT_MetaTileEntity_Hatch_Maintenance(int aID, String aName, String aNameRegional, int aTier, boolean aAuto) { + super(aID, aName, aNameRegional, aTier, 4, "For automaticly maintaining Multiblocks"); + mAuto = aAuto; } - public GT_MetaTileEntity_Hatch_Maintenance(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, 1, aDescription, aTextures); + public GT_MetaTileEntity_Hatch_Maintenance(String aName, int aTier, String aDescription, ITexture[][][] aTextures, boolean aAuto) { + super(aName, aTier, aAuto ? 4 : 1, aDescription, aTextures); + mAuto = aAuto; } @Override public String[] getDescription() { + if(mAuto)return new String[]{mDescription, "Cannot be shared between Multiblocks!","4 Ducttape, 2 Lubricant Cells","4 Steel Screws, 2 Adv Circuits","For each autorepair"}; return new String[]{mDescription, "Cannot be shared between Multiblocks!"}; } @@ -72,7 +90,8 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescription, mTextures); + if(aTileEntity.getMetaTileID()==111) return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescription, mTextures, true); + return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescription, mTextures, false); } @Override @@ -84,13 +103,70 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch @Override public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + if(mAuto) return new GT_Container_2by2(aPlayerInventory, aBaseMetaTileEntity); return new GT_Container_MaintenanceHatch(aPlayerInventory, aBaseMetaTileEntity); } @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + if(mAuto) return new GT_GUIContainer_2by2(aPlayerInventory, aBaseMetaTileEntity, getLocalName()); return new GT_GUIContainer_MaintenanceHatch(aPlayerInventory, aBaseMetaTileEntity); } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { + if (aBaseMetaTileEntity.isServerSide() && aTimer % 100 == 0 && mController != null) { + if(!mController.mCrowbar || !mController.mHardHammer || !mController.mScrewdriver || !mController.mSoftHammer || !mController.mSolderingTool || !mController.mWrench){ + boolean tSuccess = true; + ItemStack[] mInputs = new ItemStack[]{ItemList.Duct_Tape.get(4, new Object[]{}),GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 2),GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 4),GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2)}; + List aInputs = Arrays.asList(mInventory); + if (mInputs.length > 0 && aInputs == null) tSuccess = false; + int amt = 0; + for (ItemStack tStack : mInputs) { + if (tStack != null) { + amt = tStack.stackSize; + boolean temp = true; + for (ItemStack aStack : aInputs) { + if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true))) { + amt -= aStack.stackSize; + if (amt < 1) { + temp = false; + break; + } + } + } + if (temp) tSuccess = false; + } + } + if(tSuccess){ + for (ItemStack tStack : mInputs) { + if (tStack != null) { + amt = tStack.stackSize; + for (ItemStack aStack : aInputs) { + if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true))) { + if (aStack.stackSize < amt){ + amt -= aStack.stackSize; + aStack.stackSize = 0; + }else{ + aStack.stackSize -= amt; + amt = 0; + break; + } + } + } + } + } + this.mCrowbar = true; + this.mHardHammer = true; + this.mScrewdriver = true; + this.mSoftHammer = true; + this.mSolderingTool = true; + this.mWrench = true; + } + } + } + super.onPostTick(aBaseMetaTileEntity, aTimer); + } public void onToolClick(ItemStack aStack, EntityLivingBase aPlayer) { if (aStack == null || aPlayer == null) return; @@ -125,4 +201,8 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return false; } + + public void setController(GT_MetaTileEntity_MultiBlockBase aController){ + mController = aController; + } } 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 14c324a8ee..b7e740cb6f 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 @@ -206,6 +206,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { for (GT_MetaTileEntity_Hatch_Maintenance tHatch : mMaintenanceHatches) { if (isValidMetaTileEntity(tHatch)) { if (!this.disableMaintenance) { + tHatch.setController(this); if (tHatch.mWrench) mWrench = true; if (tHatch.mScrewdriver) mScrewdriver = true; if (tHatch.mSoftHammer) mSoftHammer = true; @@ -714,6 +715,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { if (aMetaTileEntity == null) return false; if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) { ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; + ((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity).setController(this); return mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity); } return false; 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 05415410ef..d2216073e1 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -344,6 +344,10 @@ public class GT_Loader_MetaTileEntities implements Runnable { ItemList.Hatch_Maintenance.set(new GT_MetaTileEntity_Hatch_Maintenance(90, "hatch.maintenance", "Maintenance Hatch", 1).getStackForm(1L)); GT_ModHandler.addCraftingRecipe(ItemList.Hatch_Maintenance.get(1L, new Object[0]), bitsd, new Object[]{"dwx", "hMc", "fsr", 'M', ItemList.Hull_LV}); + + ItemList.Hatch_AutoMaintenance.set(new GT_MetaTileEntity_Hatch_Maintenance(111, "hatch.maintenance.auto", "Auto Maintenance Hatch", 5, true).getStackForm(1L)); + + GT_ModHandler.addCraftingRecipe(ItemList.Hatch_AutoMaintenance.get(1L, new Object[0]), bitsd, new Object[]{"CHC", "AMA", "CHC", 'M', ItemList.Hull_IV,'H',ItemList.Hatch_Maintenance,'A',ItemList.Robot_Arm_IV,'C',OrePrefixes.circuit.get(Materials.Ultimate)}); ItemList.Hatch_Muffler_LV.set(new GT_MetaTileEntity_Hatch_Muffler(91, "hatch.muffler.tier.01", "Muffler Hatch (LV)", 1).getStackForm(1L)); ItemList.Hatch_Muffler_MV.set(new GT_MetaTileEntity_Hatch_Muffler(92, "hatch.muffler.tier.02", "Muffler Hatch (MV)", 2).getStackForm(1L)); -- cgit From 7926877ed18689ebca2fc170627bcb61d5ac13c0 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Tue, 25 Oct 2016 20:22:56 +0200 Subject: Pollution Update/Rebalance --- .../api/metatileentity/BaseMetaTileEntity.java | 3 + .../GT_MetaTileEntity_BasicGenerator.java | 2 +- .../GT_MetaTileEntity_Hatch_Muffler.java | 10 +++- src/main/java/gregtech/common/GT_Pollution.java | 70 +++++++++++++++++----- .../boilers/GT_MetaTileEntity_Boiler_Bronze.java | 2 +- .../boilers/GT_MetaTileEntity_Boiler_Lava.java | 2 +- .../boilers/GT_MetaTileEntity_Boiler_Steel.java | 2 +- .../GT_MetaTileEntity_BronzeBlastFurnace.java | 2 +- .../multi/GT_MetaTileEntity_Charcoal_Pit.java | 2 + .../multi/GT_MetaTileEntity_DieselEngine.java | 2 +- .../GT_MetaTileEntity_ElectricBlastFurnace.java | 2 +- .../GT_MetaTileEntity_ImplosionCompressor.java | 2 +- .../multi/GT_MetaTileEntity_LargeBoiler.java | 2 +- .../multi/GT_MetaTileEntity_LargeTurbine_Gas.java | 2 +- .../multi/GT_MetaTileEntity_MultiFurnace.java | 2 +- 15 files changed, 78 insertions(+), 29 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index 2d2f515528..c45dca4aa8 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -12,6 +12,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachin import gregtech.api.net.GT_Packet_TileEntity; import gregtech.api.objects.GT_ItemStack; import gregtech.api.util.*; +import gregtech.common.GT_Pollution; import ic2.api.Direction; import net.minecraft.block.Block; import net.minecraft.block.BlockFire; @@ -25,6 +26,7 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.ChunkPosition; import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -1118,6 +1120,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE } } } + GT_Pollution.addPollution(new ChunkPosition(getXCoord(), getYCoord(), getZCoord()), 100000); mMetaTileEntity.doExplosion(aAmount); } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java index e9c695740c..8acd6fd575 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java @@ -210,7 +210,7 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity } if(tProducedEU>0&&getPollution()>0){ GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), - (int) ((tProducedEU * getPollution()/500)+1)); + (int) ((tProducedEU * getPollution()/(500*mTier))+1)); } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java index b092df1e0c..6d0fdc4601 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java @@ -12,7 +12,7 @@ import net.minecraft.world.ChunkPosition; public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { public GT_MetaTileEntity_Hatch_Muffler(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 0, "Outputs the Pollution (Pollution might come later)"); + super(aID, aName, aNameRegional, aTier, 0, "Outputs the Pollution (Might cause acidic rains and poisoning)"); } public GT_MetaTileEntity_Hatch_Muffler(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -21,7 +21,7 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { @Override public String[] getDescription() { - return new String[]{mDescription, "DO NOT OBSTRUCT THE OUTPUT!"}; + return new String[]{mDescription, "DO NOT OBSTRUCT THE OUTPUT!","Reduces Pollution to "+calculatePollutionReduction(100)+"%"}; } @Override @@ -60,9 +60,13 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { } public boolean polluteEnvironment() { - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 1000 - (95*mTier)); + GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), calculatePollutionReduction(1000)); return (mTier > 1 && getBaseMetaTileEntity().getRandomNumber(mTier) != 0) || getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing()); } + + public int calculatePollutionReduction(int aPollution){ + return (int) (aPollution *(Math.pow(0.7, mTier-1))); + } @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index 43935effdd..ae1d63686e 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -1,11 +1,11 @@ - package gregtech.common; +package gregtech.common; import gregtech.GT_Mod; import gregtech.api.objects.XSTR; import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Blocks; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; @@ -18,7 +18,37 @@ import java.util.ArrayList; import java.util.List; public class GT_Pollution { - + /** + * Pollution dispersion until effects start: + * Calculation: ((Limit * 0.01) + 2000) * (4 <- spreading rate) + * + * SMOG(500k) 466.7 pollution/sec + * Poison(750k) 633,3 pollution/sec + * Dying Plants(1mio) 800 pollution/sec + * Sour Rain(1.5mio) 1133.3 pollution/sec + * + * Pollution producers (pollution/sec) + * Bronze Boiler(20) + * Lava Boiler(20) + * High Pressure Boiler(20) + * Bronze Blast Furnace(50) + * Diesel Generator(14/28/75) + * Gas Turbine(7/14/37) + * Charcoal Pile(100) + * + * Large Diesel Generator(300) + * Electric Blast Furnace(100) + * Implosion Compressor(2000) + * Large Boiler(240) + * Large Gas Turbine(160) + * Multi Smelter(100) + * Pyrolyse Oven(400) + * + * Machine Explosion(100,000) + * + * Muffler Hatch Pollution reduction: + * LV (0%), MV (30%), HV (52%), EV (66%), IV (76%), LuV (84%), ZPM (89%), UV (92%), MAX (95%) + */ static List tList = null; static int loops = 1; @@ -54,7 +84,7 @@ public class GT_Pollution { for(ChunkPosition tNPos : tNeighbor){ if(GT_Proxy.chunkData.containsKey(tNPos)){ int tNPol = GT_Proxy.chunkData.get(tNPos)[1]; - if(tNPol GT_Mod.gregtechproxy.mPollutionSmogLimit){ - + AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(tPos.chunkPosX<<4, 0, tPos.chunkPosZ<<4, tPos.chunkPosX<<4+16, 256, tPos.chunkPosZ<<4+16); + List tEntitys = aWorld.getEntitiesWithinAABB(EntityLivingBase.class, chunk); + for(EntityLivingBase tEnt : tEntitys){ + if(!GT_Utility.isWearingFullGasHazmat(tEnt) && tRan.nextInt(tPollution/2000) > 40){ + int ran = tRan.nextInt(3); + if(ran==0)tEnt.addPotionEffect(new PotionEffect(Potion.weakness.id, Math.min(tPollution/2500,1000), tPollution/400000)); + if(ran==1)tEnt.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, Math.min(tPollution/2500,1000), tPollution/400000)); + if(ran==2)tEnt.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, Math.min(tPollution/2500,1000), tPollution/400000)); + } +} // Poison effects if(tPollution > GT_Mod.gregtechproxy.mPollutionPoisonLimit){ - AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(tPos.chunkPosX*16, 0, tPos.chunkPosZ*16, tPos.chunkPosX*16+16, 256, tPos.chunkPosZ*16+16); - List tEntitys = aWorld.getEntitiesWithinAABB(EntityLiving.class, chunk); - for(EntityLiving tEnt : tEntitys){ - if(tRan.nextInt(tPollution/25000) > 20){ - tEnt.addPotionEffect(new PotionEffect(Potion.poison.id, tPollution/25000, 1)); - } + for(EntityLivingBase tEnt : tEntitys){ + if(!GT_Utility.isWearingFullGasHazmat(tEnt) && tRan.nextInt(tPollution/2000) > 20){ + int ran = tRan.nextInt(3); + if(ran==0)tEnt.addPotionEffect(new PotionEffect(Potion.poison.id, Math.min(tPollution/2500,1000), tPollution/500000)); + if(ran==1)tEnt.addPotionEffect(new PotionEffect(Potion.confusion.id, Math.min(tPollution/2500,1000), 1)); + if(ran==2)tEnt.addPotionEffect(new PotionEffect(Potion.blindness.id, Math.min(tPollution/2500,1000), 1)); +} } // killing plants if(tPollution > GT_Mod.gregtechproxy.mPollutionVegetationLimit){ int f = 20; for(;f<(tPollution/25000);f++){ - int x =tPos.chunkPosX*16+(tRan.nextInt(16));; + int x =tPos.chunkPosX<<4+(tRan.nextInt(16));; int y =60 +(-f+tRan.nextInt(f*2+1)); - int z =tPos.chunkPosZ*16+(tRan.nextInt(16)); + int z =tPos.chunkPosZ<<4+(tRan.nextInt(16)); damageBlock(x, y, z, tPollution > GT_Mod.gregtechproxy.mPollutionSourRainLimit); }}}} } @@ -151,7 +191,7 @@ public class GT_Pollution { public static void addPollution(ChunkPosition aPos, int aPollution){ if(!GT_Mod.gregtechproxy.mPollution)return; try{ - ChunkPosition tPos = new ChunkPosition(aPos.chunkPosX/16, 1, aPos.chunkPosZ/16); + ChunkPosition tPos = new ChunkPosition(aPos.chunkPosX>>4, 1, aPos.chunkPosZ>>4); // System.out.println("add pollution x: "+ tPos.chunkPosX +" z: " + tPos.chunkPosZ +" poll: "+aPollution); int[] tData = new int[2]; if(GT_Proxy.chunkData.containsKey(tPos)){ diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java index e82acfa561..776f71761e 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java @@ -141,7 +141,7 @@ public class GT_MetaTileEntity_Boiler_Bronze this.mTemperature += 1; } if(this.mProcessingEnergy>0 && (aTick % 20L == 0L)){ - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 30); + GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); } aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); } diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java index 57ab2dd11d..8480b03733 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java @@ -120,7 +120,7 @@ public class GT_MetaTileEntity_Boiler_Lava } if(this.mProcessingEnergy>0 && (aTick % 20L == 0L)){ - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 30); + GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); } aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); } diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java index abf9755cd8..4016e7be35 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java @@ -146,7 +146,7 @@ public class GT_MetaTileEntity_Boiler_Steel this.mTemperature += 1; } if(this.mProcessingEnergy>0 && (aTick % 20L == 0L)){ - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 30); + GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); } aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java index beb4be7373..89b9adaa7e 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java @@ -209,7 +209,7 @@ public class GT_MetaTileEntity_BronzeBlastFurnace } } if(this.mMaxProgresstime>0 && (aTimer % 20L == 0L)){ - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 200); + GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 50); } aBaseMetaTileEntity.setActive((this.mMaxProgresstime > 0) && (this.mMachine)); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java index c0ffd9aa7c..fbb1b98601 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java @@ -9,6 +9,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Recipe; +import gregtech.common.GT_Pollution; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; @@ -85,6 +86,7 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock this.mEfficiency = 10000; this.mEfficiencyIncrease = 10000; this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), mMaxProgresstime*5); return true; } else { this.mEfficiency = 0; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java index 5f221cf093..27687323e3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java @@ -215,7 +215,7 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock @Override public int getPollutionPerTick(ItemStack aStack) { - return 0; + return 15; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java index 66f3c67022..2f058e6e76 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java @@ -218,7 +218,7 @@ public class GT_MetaTileEntity_ElectricBlastFurnace } public int getPollutionPerTick(ItemStack aStack) { - return 10; + return 5; } public int getDamageToComponent(ItemStack aStack) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java index c5f6f11122..37d93815e6 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java @@ -139,7 +139,7 @@ public class GT_MetaTileEntity_ImplosionCompressor } public int getPollutionPerTick(ItemStack aStack) { - return 1000; + return 100; } public int getDamageToComponent(ItemStack aStack) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java index b9411d383e..bb7c659512 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java @@ -222,7 +222,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler } public int getPollutionPerTick(ItemStack aStack) { - return 10; + return 12; } public int getDamageToComponent(ItemStack aStack) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java index 501fac314b..3e3b7acf6a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java @@ -77,7 +77,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT @Override public int getPollutionPerTick(ItemStack aStack) { - return 10; + return 8; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java index 8a608bf834..5677c3a7e3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java @@ -181,7 +181,7 @@ public class GT_MetaTileEntity_MultiFurnace } public int getPollutionPerTick(ItemStack aStack) { - return 20; + return 5; } public int getDamageToComponent(ItemStack aStack) { -- cgit From 2d5c40ef8f77287547f437fdcf493f5040494414 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Wed, 26 Oct 2016 00:57:33 +0200 Subject: some bugfixes --- src/main/java/gregtech/api/enums/OrePrefixes.java | 1 + .../implementations/GT_MetaTileEntity_Hatch_Muffler.java | 7 +++++-- src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/enums/OrePrefixes.java b/src/main/java/gregtech/api/enums/OrePrefixes.java index f6eef136e3..cd51e3068c 100644 --- a/src/main/java/gregtech/api/enums/OrePrefixes.java +++ b/src/main/java/gregtech/api/enums/OrePrefixes.java @@ -460,6 +460,7 @@ public enum OrePrefixes { toolHeadChainsaw.mCondition = new ICondition.And(new ICondition.Not(SubTag.NO_SMASHING), new ICondition.Not(SubTag.BOUNCY)); toolHeadWrench.mCondition = new ICondition.And(new ICondition.Not(SubTag.NO_SMASHING), new ICondition.Not(SubTag.BOUNCY)); toolHeadBuzzSaw.mCondition = new ICondition.And(new ICondition.Not(SubTag.NO_SMASHING), new ICondition.Not(SubTag.BOUNCY)); + turbineBlade.mCondition = new ICondition.And(new ICondition.Not(SubTag.NO_SMASHING), new ICondition.Not(SubTag.BOUNCY)); rotor.mCondition = new ICondition.Nor(SubTag.CRYSTAL, SubTag.STONE, SubTag.BOUNCY); diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java index 6d0fdc4601..319b549d38 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java @@ -60,8 +60,11 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { } public boolean polluteEnvironment() { - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), calculatePollutionReduction(1000)); - return (mTier > 1 && getBaseMetaTileEntity().getRandomNumber(mTier) != 0) || getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing()); + if(getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing())){ + GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), calculatePollutionReduction(10000)); + return true; + } + return false; } public int calculatePollutionReduction(int aPollution){ diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java index fa5e8162eb..f73fba773e 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java @@ -238,7 +238,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { public void onBlockDestroyedByExplosion(World world, int x, int y, int z, Explosion explosion) { - if(world.getBlockMetadata(x, y, z)==5){ + if(!world.isRemote && world.getBlockMetadata(x, y, z)==5){ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, x, y, z, explosion.getExplosivePlacedBy()); entitytntprimed.fuse = (world.rand.nextInt(entitytntprimed.fuse / 4) + entitytntprimed.fuse / 8); world.spawnEntityInWorld(entitytntprimed);} -- cgit From 4a8a0ab576d20eb059a07d2f5c25512ecccf0091 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Wed, 26 Oct 2016 17:08:28 +0200 Subject: Fluid Regulator code optimization --- .../implementations/GT_MetaPipeEntity_Fluid.java | 16 +- .../common/covers/GT_Cover_FluidRegulator.java | 245 ++++++++++----------- 2 files changed, 134 insertions(+), 127 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') 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 560ddb0947..c22ca2e93b 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 @@ -2,6 +2,7 @@ package gregtech.api.metatileentity.implementations; import gregtech.api.GregTech_API; import gregtech.api.enums.Dyes; +import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.SubTag; @@ -203,7 +204,7 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { continue; } } - } + } FluidTankInfo[] tInfo = tTileEntity.getTankInfo(ForgeDirection.getOrientation(tSide).getOpposite()); if (tInfo != null && tInfo.length > 0) { if (tTileEntity instanceof ICoverable && ((ICoverable) tTileEntity).getCoverBehaviorAtSide(GT_Utility.getOppositeSide(tSide)).alwaysLookConnected(GT_Utility.getOppositeSide(tSide), ((ICoverable) tTileEntity).getCoverIDAtSide(GT_Utility.getOppositeSide(tSide)), ((ICoverable) tTileEntity).getCoverDataAtSide(GT_Utility.getOppositeSide(tSide)), ((ICoverable) tTileEntity))) { @@ -217,9 +218,22 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { if (((1 << tSide) & mLastReceivedFrom) == 0) tTanks.put(tTileEntity, ForgeDirection.getOrientation(tSide).getOpposite()); } + if (aBaseMetaTileEntity.getCoverBehaviorAtSide(tSide).alwaysLookConnected(tSide, aBaseMetaTileEntity.getCoverIDAtSide(tSide), aBaseMetaTileEntity.getCoverDataAtSide(tSide), aBaseMetaTileEntity)) { mConnections |= (1 << tSide); } + }else if(tInfo != null && tInfo.length == 0){ + IGregTechTileEntity tSideTile = aBaseMetaTileEntity.getIGregTechTileEntityAtSide(tSide); + if(tSideTile!=null){ + ItemStack tCover = tSideTile.getCoverItemAtSide(GT_Utility.getOppositeSide(tSide)); + if (tCover!=null &&(GT_Utility.areStacksEqual(tCover, ItemList.FluidRegulator_LV.get(1, new Object[]{},true)) || + GT_Utility.areStacksEqual(tCover, ItemList.FluidRegulator_MV.get(1, new Object[]{},true)) || + GT_Utility.areStacksEqual(tCover, ItemList.FluidRegulator_HV.get(1, new Object[]{},true)) || + GT_Utility.areStacksEqual(tCover, ItemList.FluidRegulator_EV.get(1, new Object[]{},true)) || + GT_Utility.areStacksEqual(tCover, ItemList.FluidRegulator_IV.get(1, new Object[]{},true)))) { + mConnections |= (1 << tSide); + } + } } } } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java b/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java index c3d101ba4c..ff47dfdc97 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java @@ -9,130 +9,123 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; -public class GT_Cover_FluidRegulator - extends GT_CoverBehavior { - public final int mTransferRate; - - public GT_Cover_FluidRegulator(int aTransferRate) { - this.mTransferRate = aTransferRate; - } - - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { - if (aCoverVariable == 0) { - return aCoverVariable; - } - if ((aTileEntity instanceof IFluidHandler)) { - IFluidHandler tTank2 = aTileEntity.getITankContainerAtSide(aSide); - if (tTank2 != null) { - IFluidHandler tTank1 = (IFluidHandler) aTileEntity; - if (aCoverVariable > 0) { - FluidStack tLiquid = tTank1.drain(ForgeDirection.UNKNOWN, aCoverVariable, false); - if (tLiquid != null) { - tLiquid = tLiquid.copy(); - tLiquid.amount = tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid, false); - if (tLiquid.amount > 0) { - if (aTileEntity.getUniversalEnergyCapacity() >= Math.min(1, tLiquid.amount / 10)) { - if (aTileEntity.isUniversalEnergyStored(Math.min(1, tLiquid.amount / 10))) { - aTileEntity.decreaseStoredEnergyUnits(Math.min(1, tLiquid.amount / 10), true); - tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tTank1.drain(ForgeDirection.UNKNOWN, tLiquid.amount, true), true); - } - } else { - tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tTank1.drain(ForgeDirection.UNKNOWN, tLiquid.amount, true), true); - } - } - } - } else { - FluidStack tLiquid = tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), Math.abs(aCoverVariable), false); - if (tLiquid != null) { - tLiquid = tLiquid.copy(); - tLiquid.amount = tTank1.fill(ForgeDirection.UNKNOWN, tLiquid, false); - if (tLiquid.amount > 0) { - if (aTileEntity.getUniversalEnergyCapacity() >= Math.min(1, tLiquid.amount / 10)) { - if (aTileEntity.isUniversalEnergyStored(Math.min(1, tLiquid.amount / 10))) { - aTileEntity.decreaseStoredEnergyUnits(Math.min(1, tLiquid.amount / 10), true); - tTank1.fill(ForgeDirection.UNKNOWN, tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid.amount, true), true); - } - } else { - tTank1.fill(ForgeDirection.UNKNOWN, tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid.amount, true), true); - } - } - } - } - } - } - return aCoverVariable; - } - - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { - aCoverVariable += 16; - } else { - aCoverVariable -= 16; - } - if (aCoverVariable > mTransferRate) { - aCoverVariable = mTransferRate; - } - if (aCoverVariable < (0 - mTransferRate)) { - aCoverVariable = (0 - mTransferRate); - } - GT_Utility.sendChatToPlayer(aPlayer, "Pump speed: " + aCoverVariable + "L/tick " + aCoverVariable * 20 + "L/sec"); - return aCoverVariable; - } - - public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { - aCoverVariable++; - } else { - aCoverVariable--; - } - if (aCoverVariable > mTransferRate) { - aCoverVariable = mTransferRate; - } - if (aCoverVariable < (0 - mTransferRate)) { - aCoverVariable = (0 - mTransferRate); - } - GT_Utility.sendChatToPlayer(aPlayer, "Pump speed: " + aCoverVariable + "L/tick " + aCoverVariable * 20 + "L/sec"); - aTileEntity.setCoverDataAtSide(aSide, aCoverVariable); - return true; - } - - public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } - - public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } - - public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } - - public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } - - public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return true; - } - - public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return true; - } - - public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return false; - } - - public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return aFluid == null; - } - - public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } - - public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return 1; - } +public class GT_Cover_FluidRegulator extends GT_CoverBehavior { + public final int mTransferRate; + + public GT_Cover_FluidRegulator(int aTransferRate) { + this.mTransferRate = aTransferRate; + } + + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + long aTimer) { + if (aCoverVariable == 0) { + return aCoverVariable; + } + if ((aTileEntity instanceof IFluidHandler)) { + IFluidHandler tTank1; + IFluidHandler tTank2; + if (aCoverVariable > 0) { + tTank2 = aTileEntity.getITankContainerAtSide(aSide); + tTank1 = (IFluidHandler) aTileEntity; + } else { + tTank1 = aTileEntity.getITankContainerAtSide(aSide); + tTank2 = (IFluidHandler) aTileEntity; + } + if (tTank1 != null && tTank2 != null) { + FluidStack tLiquid = tTank1.drain(ForgeDirection.UNKNOWN, Math.abs(aCoverVariable), false); + if (tLiquid != null) { + tLiquid = tLiquid.copy(); + tLiquid.amount = tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid, false); + if (tLiquid.amount > 0) { + if (aTileEntity.getUniversalEnergyCapacity() >= Math.min(1, tLiquid.amount / 10)) { + if (aTileEntity.isUniversalEnergyStored(Math.min(1, tLiquid.amount / 10))) { + aTileEntity.decreaseStoredEnergyUnits(Math.min(1, tLiquid.amount / 10), true); + tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tTank1.drain(ForgeDirection.UNKNOWN, tLiquid.amount, true), true); + } + } else { + tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tTank1.drain(ForgeDirection.UNKNOWN, tLiquid.amount, true), true); + } + } + } + } + } + return aCoverVariable; + } + + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { + aCoverVariable += 16; + } else { + aCoverVariable -= 16; + } + if (aCoverVariable > mTransferRate) { + aCoverVariable = mTransferRate; + } + if (aCoverVariable < (0 - mTransferRate)) { + aCoverVariable = (0 - mTransferRate); + } + GT_Utility.sendChatToPlayer(aPlayer, + "Pump speed: " + aCoverVariable + "L/tick " + aCoverVariable * 20 + "L/sec"); + return aCoverVariable; + } + + public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { + aCoverVariable++; + } else { + aCoverVariable--; + } + if (aCoverVariable > mTransferRate) { + aCoverVariable = mTransferRate; + } + if (aCoverVariable < (0 - mTransferRate)) { + aCoverVariable = (0 - mTransferRate); + } + GT_Utility.sendChatToPlayer(aPlayer, + "Pump speed: " + aCoverVariable + "L/tick " + aCoverVariable * 20 + "L/sec"); + aTileEntity.setCoverDataAtSide(aSide, aCoverVariable); + return true; + } + + public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return false; + } + + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return false; + } + + public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 1; + } } -- cgit From 11130dd43526139c26673f3f13a7d699d9dfdf70 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Wed, 26 Oct 2016 21:57:20 +0200 Subject: More Translation stuff. Hope it does not lag. --- .../implementations/GT_MetaPipeEntity_Cable.java | 6 +++--- .../implementations/GT_MetaPipeEntity_Fluid.java | 4 ++-- src/main/java/gregtech/common/blocks/GT_Item_Machines.java | 10 ++++++++-- 3 files changed, 13 insertions(+), 7 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') 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 c79bca8df2..fdb3c0da8b 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 @@ -267,9 +267,9 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile @Override public String[] getDescription() { return new String[]{ - "Max Voltage: " + EnumChatFormatting.GREEN + mVoltage + " (" + VN[GT_Utility.getTier(mVoltage)] + ")" + EnumChatFormatting.GRAY, - "Max Amperage: " + EnumChatFormatting.YELLOW + mAmperage + EnumChatFormatting.GRAY, - "Loss/Meter/Ampere: " + EnumChatFormatting.RED + mCableLossPerMeter + EnumChatFormatting.GRAY + " EU-Volt" + "Max Voltage: %%%" + EnumChatFormatting.GREEN + mVoltage + " (" + VN[GT_Utility.getTier(mVoltage)] + ")" + EnumChatFormatting.GRAY, + "Max Amperage: %%%" + EnumChatFormatting.YELLOW + mAmperage + EnumChatFormatting.GRAY, + "Loss/Meter/Ampere: %%%" + EnumChatFormatting.RED + mCableLossPerMeter + EnumChatFormatting.GRAY + " EU-Volt" }; } 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 c22ca2e93b..effff677d7 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 @@ -379,8 +379,8 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity { @Override public String[] getDescription() { return new String[]{ - EnumChatFormatting.BLUE + "Fluid Capacity: " + (mCapacity * 20) + "L/sec" + EnumChatFormatting.GRAY, - EnumChatFormatting.RED + "Heat Limit: " + mHeatResistance + " K" + EnumChatFormatting.GRAY + EnumChatFormatting.BLUE + "Fluid Capacity: %%%" + (mCapacity * 20) + "L/sec" + EnumChatFormatting.GRAY, + EnumChatFormatting.RED + "Heat Limit: %%%" + mHeatResistance + " K" + EnumChatFormatting.GRAY }; } 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 281176542f..4014b01f39 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java @@ -45,8 +45,14 @@ public class GT_Item_Machines int i = 0; for (String tDescription : tTileEntity.getDescription()) { if (GT_Utility.isStringValid(tDescription)) { - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++, tDescription, !GregTech_API.sPostloadFinished )); - } + if(tDescription.contains("%%%")){ + String[] tString = tDescription.split("%%%"); + if(tString.length>=2){ + aList.add(GT_LanguageManager.addStringLocalization("TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++, tString[0], !GregTech_API.sPostloadFinished )+" "+tString[1]); + } + }else{String tTranslated = GT_LanguageManager.addStringLocalization("TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++, tDescription, !GregTech_API.sPostloadFinished ); + aList.add(tTranslated.equals("") ? tDescription : tTranslated);} + }else i++; } } if (tTileEntity.getEUCapacity() > 0L) { -- cgit From 1f6400559272f7ff0e3d4a02258c222d8a589452 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Thu, 27 Oct 2016 00:30:26 +0200 Subject: Auto Maintainance fix (maybe) --- .../implementations/GT_MetaTileEntity_MultiBlockBase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') 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 b7e740cb6f..6ec97312e1 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 @@ -206,7 +206,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { for (GT_MetaTileEntity_Hatch_Maintenance tHatch : mMaintenanceHatches) { if (isValidMetaTileEntity(tHatch)) { if (!this.disableMaintenance) { - tHatch.setController(this); + tHatch.setController((GT_MetaTileEntity_MultiBlockBase) aBaseMetaTileEntity); if (tHatch.mWrench) mWrench = true; if (tHatch.mScrewdriver) mScrewdriver = true; if (tHatch.mSoftHammer) mSoftHammer = true; @@ -715,7 +715,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { if (aMetaTileEntity == null) return false; if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) { ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; - ((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity).setController(this); + ((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity).setController((GT_MetaTileEntity_MultiBlockBase) aTileEntity); return mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity); } return false; -- cgit From ed724da44d7783705cb8fd503b3f4623b1cf1b86 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Thu, 27 Oct 2016 22:24:41 +0200 Subject: Auto Maintainance fix --- .../GT_MetaTileEntity_Hatch_Maintenance.java | 17 ++++------------- .../GT_MetaTileEntity_MultiBlockBase.java | 4 +--- 2 files changed, 5 insertions(+), 16 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java index 6340939ee7..ee30d8f4b9 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java @@ -30,7 +30,6 @@ import scala.actors.threadpool.Arrays; public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch { public boolean mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false, mAuto; - public GT_MetaTileEntity_MultiBlockBase mController = null; public GT_MetaTileEntity_Hatch_Maintenance(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, 1, "For maintaining Multiblocks"); @@ -113,10 +112,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch return new GT_GUIContainer_MaintenanceHatch(aPlayerInventory, aBaseMetaTileEntity); } - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - if (aBaseMetaTileEntity.isServerSide() && aTimer % 100 == 0 && mController != null) { - if(!mController.mCrowbar || !mController.mHardHammer || !mController.mScrewdriver || !mController.mSoftHammer || !mController.mSolderingTool || !mController.mWrench){ + public boolean autoMaintainance() { boolean tSuccess = true; ItemStack[] mInputs = new ItemStack[]{ItemList.Duct_Tape.get(4, new Object[]{}),GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 2),GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 4),GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2)}; List aInputs = Arrays.asList(mInventory); @@ -161,11 +157,10 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch this.mScrewdriver = true; this.mSoftHammer = true; this.mSolderingTool = true; - this.mWrench = true; + this.mWrench = true; + return true; } - } - } - super.onPostTick(aBaseMetaTileEntity, aTimer); + return false; } public void onToolClick(ItemStack aStack, EntityLivingBase aPlayer) { @@ -201,8 +196,4 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return false; } - - public void setController(GT_MetaTileEntity_MultiBlockBase aController){ - mController = aController; - } } 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 6ec97312e1..a8301af450 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 @@ -206,7 +206,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { for (GT_MetaTileEntity_Hatch_Maintenance tHatch : mMaintenanceHatches) { if (isValidMetaTileEntity(tHatch)) { if (!this.disableMaintenance) { - tHatch.setController((GT_MetaTileEntity_MultiBlockBase) aBaseMetaTileEntity); + if(tHatch.mAuto && (!mWrench||!mScrewdriver||!mSoftHammer||!mHardHammer||!mSolderingTool||!mCrowbar))tHatch.autoMaintainance(); if (tHatch.mWrench) mWrench = true; if (tHatch.mScrewdriver) mScrewdriver = true; if (tHatch.mSoftHammer) mSoftHammer = true; @@ -714,8 +714,6 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); if (aMetaTileEntity == null) return false; if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) { - ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; - ((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity).setController((GT_MetaTileEntity_MultiBlockBase) aTileEntity); return mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity); } return false; -- cgit From 814dc25690a60faaaeab710d0dad40fb4386b849 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Sun, 30 Oct 2016 22:39:40 +0100 Subject: Modular Armor changes 1 --- src/main/java/gregtech/GT_Mod.java | 2 + .../GT_MetaTileEntity_Hatch_Maintenance.java | 4 +- src/main/java/gregtech/common/GT_Proxy.java | 33 ++ .../common/items/armor/ArmorCalculation.java | 353 +-------------------- .../gregtech/common/items/armor/ArmorData.java | 298 ++++++++--------- .../common/items/armor/ContainerBasicArmor.java | 48 --- .../items/armor/ContainerElectricArmor1.java | 53 ---- .../common/items/armor/ContainerModularArmor.java | 171 ---------- .../gregtech/common/items/armor/FluidSync.java | 67 ---- .../gregtech/common/items/armor/FluidSync2.java | 67 ---- .../common/items/armor/GuiElectricArmor1.java | 310 ------------------ .../common/items/armor/GuiModularArmor.java | 196 ------------ .../common/items/armor/InventoryArmor.java | 235 -------------- .../common/items/armor/ModularArmor_Item.java | 71 +++-- .../gregtech/common/items/armor/SlotFluid.java | 33 -- .../gregtech/common/items/armor/SlotLocked.java | 33 -- .../java/gregtech/common/items/armor/Values.java | 125 -------- .../items/armor/components/ArmorComponent.java | 57 ++++ .../armor/components/ArmorComponentBattery.java | 19 ++ .../armor/components/ArmorComponentFunction.java | 22 ++ .../armor/components/ArmorElectricComponent.java | 30 ++ .../items/armor/components/ArmorPlating.java | 67 ++++ .../items/armor/components/IArmorComponent.java | 11 + .../armor/components/LoadArmorComponents.java | 230 ++++++++++++++ .../common/items/armor/components/StatType.java | 56 ++++ .../items/armor/gui/ContainerBasicArmor.java | 48 +++ .../items/armor/gui/ContainerElectricArmor1.java | 53 ++++ .../items/armor/gui/ContainerModularArmor.java | 169 ++++++++++ .../gregtech/common/items/armor/gui/FluidSync.java | 67 ++++ .../common/items/armor/gui/FluidSync2.java | 67 ++++ .../common/items/armor/gui/GuiElectricArmor1.java | 311 ++++++++++++++++++ .../common/items/armor/gui/GuiModularArmor.java | 203 ++++++++++++ .../common/items/armor/gui/InventoryArmor.java | 237 ++++++++++++++ .../gregtech/common/items/armor/gui/SlotArmor.java | 18 ++ .../gregtech/common/items/armor/gui/SlotFluid.java | 33 ++ .../common/items/armor/gui/SlotLocked.java | 33 ++ .../loaders/postload/GT_CraftingRecipeLoader.java | 17 +- .../preload/GT_Loader_Item_Block_And_Fluid.java | 17 - 38 files changed, 1973 insertions(+), 1891 deletions(-) delete mode 100644 src/main/java/gregtech/common/items/armor/ContainerBasicArmor.java delete mode 100644 src/main/java/gregtech/common/items/armor/ContainerElectricArmor1.java delete mode 100644 src/main/java/gregtech/common/items/armor/ContainerModularArmor.java delete mode 100644 src/main/java/gregtech/common/items/armor/FluidSync.java delete mode 100644 src/main/java/gregtech/common/items/armor/FluidSync2.java delete mode 100644 src/main/java/gregtech/common/items/armor/GuiElectricArmor1.java delete mode 100644 src/main/java/gregtech/common/items/armor/GuiModularArmor.java delete mode 100644 src/main/java/gregtech/common/items/armor/InventoryArmor.java delete mode 100644 src/main/java/gregtech/common/items/armor/SlotFluid.java delete mode 100644 src/main/java/gregtech/common/items/armor/SlotLocked.java delete mode 100644 src/main/java/gregtech/common/items/armor/Values.java create mode 100644 src/main/java/gregtech/common/items/armor/components/ArmorComponent.java create mode 100644 src/main/java/gregtech/common/items/armor/components/ArmorComponentBattery.java create mode 100644 src/main/java/gregtech/common/items/armor/components/ArmorComponentFunction.java create mode 100644 src/main/java/gregtech/common/items/armor/components/ArmorElectricComponent.java create mode 100644 src/main/java/gregtech/common/items/armor/components/ArmorPlating.java create mode 100644 src/main/java/gregtech/common/items/armor/components/IArmorComponent.java create mode 100644 src/main/java/gregtech/common/items/armor/components/LoadArmorComponents.java create mode 100644 src/main/java/gregtech/common/items/armor/components/StatType.java create mode 100644 src/main/java/gregtech/common/items/armor/gui/ContainerBasicArmor.java create mode 100644 src/main/java/gregtech/common/items/armor/gui/ContainerElectricArmor1.java create mode 100644 src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java create mode 100644 src/main/java/gregtech/common/items/armor/gui/FluidSync.java create mode 100644 src/main/java/gregtech/common/items/armor/gui/FluidSync2.java create mode 100644 src/main/java/gregtech/common/items/armor/gui/GuiElectricArmor1.java create mode 100644 src/main/java/gregtech/common/items/armor/gui/GuiModularArmor.java create mode 100644 src/main/java/gregtech/common/items/armor/gui/InventoryArmor.java create mode 100644 src/main/java/gregtech/common/items/armor/gui/SlotArmor.java create mode 100644 src/main/java/gregtech/common/items/armor/gui/SlotFluid.java create mode 100644 src/main/java/gregtech/common/items/armor/gui/SlotLocked.java (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 2e727f7250..e36d897820 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -21,6 +21,7 @@ import gregtech.common.GT_Proxy; import gregtech.common.GT_RecipeAdder; import gregtech.common.entities.GT_Entity_Arrow; import gregtech.common.entities.GT_Entity_Arrow_Potion; +import gregtech.common.items.armor.components.LoadArmorComponents; import gregtech.common.items.behaviors.Behaviour_DataOrb; import gregtech.loaders.load.GT_CoverBehaviorLoader; import gregtech.loaders.load.GT_FuelLoader; @@ -537,6 +538,7 @@ public class GT_Mod implements IGT_Mod { new GT_CropLoader().run(); new GT_Worldgenloader().run(); new GT_CoverLoader().run(); + LoadArmorComponents.init(); GT_RecipeRegistrator.registerUsagesForMaterials(new ItemStack(Blocks.planks, 1), null, false); GT_RecipeRegistrator.registerUsagesForMaterials(new ItemStack(Blocks.cobblestone, 1), null, false); diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java index ee30d8f4b9..d4d8f9cec7 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java @@ -37,7 +37,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch } public GT_MetaTileEntity_Hatch_Maintenance(int aID, String aName, String aNameRegional, int aTier, boolean aAuto) { - super(aID, aName, aNameRegional, aTier, 4, "For automaticly maintaining Multiblocks"); + super(aID, aName, aNameRegional, aTier, 4, "For automatically maintaining Multiblocks"); mAuto = aAuto; } @@ -48,7 +48,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch @Override public String[] getDescription() { - if(mAuto)return new String[]{mDescription, "Cannot be shared between Multiblocks!","4 Ducttape, 2 Lubricant Cells","4 Steel Screws, 2 Adv Circuits","For each autorepair"}; + if(mAuto)return new String[]{mDescription,"4 Ducttape, 2 Lubricant Cells","4 Steel Screws, 2 Adv Circuits","For each autorepair"}; return new String[]{mDescription, "Cannot be shared between Multiblocks!"}; } diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 00ee739ef1..01b8b3c3b2 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -29,6 +29,11 @@ import gregtech.api.util.*; import gregtech.common.entities.GT_Entity_Arrow; import gregtech.common.items.GT_MetaGenerated_Tool_01; import gregtech.common.items.armor.*; +import gregtech.common.items.armor.gui.ContainerBasicArmor; +import gregtech.common.items.armor.gui.ContainerElectricArmor1; +import gregtech.common.items.armor.gui.GuiElectricArmor1; +import gregtech.common.items.armor.gui.GuiModularArmor; +import gregtech.common.items.armor.gui.InventoryArmor; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; @@ -1315,6 +1320,20 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { return getRightItem(aPlayer, ID); } } + if(aID>=100){ + int tSlot = aID / 100; + int ID = aID%100; + switch(ID){ + case 0: + return new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))); + case 1: + return new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))); + case 2: + return new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))); + default: + return getRightItem(aPlayer, ID); + } + } TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if ((tTileEntity instanceof IGregTechTileEntity)) { IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity(); @@ -1355,6 +1374,20 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { return getRightItemGui(aPlayer, ID); } } + if(aID>=100){ + int tSlot = aID / 100; + int ID = aID%100; + switch(ID){ + case 0: + return new GuiModularArmor(new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))), aPlayer); + case 1: + return new GuiElectricArmor1(new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))), aPlayer); + case 2: + return new GuiElectricArmor1(new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))), aPlayer); + default: + return getRightItem(aPlayer, ID); + } + } TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); if ((tTileEntity instanceof IGregTechTileEntity)) { IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity(); diff --git a/src/main/java/gregtech/common/items/armor/ArmorCalculation.java b/src/main/java/gregtech/common/items/armor/ArmorCalculation.java index 440d6aaef9..7c8100db62 100644 --- a/src/main/java/gregtech/common/items/armor/ArmorCalculation.java +++ b/src/main/java/gregtech/common/items/armor/ArmorCalculation.java @@ -14,361 +14,10 @@ import thaumcraft.api.nodes.IRevealer; public class ArmorCalculation { public static float[] calculateArmor(ItemStack[] parts) { - float[] def = new float[32]; - def[0] = 0; // Weight - def[1] = 1; // physical Def - def[2] = 1; // projectileDef - def[3] = 1; // fireDef - def[4] = 1; // magicDef - def[5] = 1; // explosionDef - def[6] = 0; // radiationDef - def[7] = 0; // electricDef - def[8] = 0; // witherDef - def[9] = 0; // fallDef - def[10] = 0; // Thorns - def[11] = 0; // ItemMagnet - def[12] = 0; // ItemCharge - def[13] = 0; // Thaumcraft goggles - def[14] = 0; // Nightvision - def[15] = 0; // tankCap - def[16] = 0; // motorPower - def[17] = 0; // motorEU - def[18] = 0; // pistonPower - def[19] = 0; // pistonEU - def[20] = 0; // ElectrolyzerPower - def[21] = 0; // ElectrolyzerEU - def[22] = 0; // FieldEmmiterPower - def[23] = 0; // FieldEmmiterEU - def[24] = 0; // JetpackFuelPower - def[25] = 0; // FuelUsage - def[26] = 0; // JetpackEUPower - def[27] = 0; // JetpackEU - def[28] = 0; // AntiGravPower - def[29] = 0; // AntiGravEU - def[30] = 0; // ProcessingPower - def[31] = 0; // ProcessingPowerUsed - - if (parts != null) { - def[12] = 0.0f; - for (int i = 0; i < parts.length; i++) { - if (parts[i] != null) { - ItemData data = GT_OreDictUnificator.getItemData(parts[i]); - if (data != null && (data.mPrefix == OrePrefixes.plate || data.mPrefix == OrePrefixes.plateAlloy)) { - // Weight - def[0] = def[0] + Values.INSTANCE.getValues(data.mMaterial.mMaterial).weight; - if (data.mPrefix == OrePrefixes.plateAlloy && data.mMaterial.mMaterial == Materials.Iridium) { - def[0] = def[0] - 20; - } - // physicalDef - float tmp = Values.INSTANCE.getValues(data.mMaterial.mMaterial).physicalDef; - if (data.mPrefix == OrePrefixes.plateAlloy && data.mMaterial.mMaterial == Materials.Iridium) { - tmp = 0.27f; - } - if (tmp > 0.0f) { - def[1] = def[1] - (tmp * def[1]); - } - // projectileDef - tmp = Values.INSTANCE.getValues(data.mMaterial.mMaterial).projectileDef; - if (data.mPrefix == OrePrefixes.plateAlloy && data.mMaterial.mMaterial == Materials.Iridium) { - tmp = 0.27f; - } - if (tmp > 0.0f) { - def[2] = def[2] - (tmp * def[2]); - } - // fireDef - tmp = Values.INSTANCE.getValues(data.mMaterial.mMaterial).fireDef; - if (data.mPrefix == OrePrefixes.plateAlloy && data.mMaterial.mMaterial == Materials.Iridium) { - tmp = 0.25f; - } - if (tmp > 0.0f) { - def[3] = def[3] - (tmp * def[3]); - } - // magicDef - tmp = Values.INSTANCE.getValues(data.mMaterial.mMaterial).magicDef; - if (data.mPrefix == OrePrefixes.plateAlloy && data.mMaterial.mMaterial == Materials.Iridium) { - tmp = 0.25f; - } - if (tmp > 0.0f) { - def[4] = def[4] - (tmp * def[4]); - } - // explosionDef - tmp = Values.INSTANCE.getValues(data.mMaterial.mMaterial).explosionDef; - if (data.mPrefix == OrePrefixes.plateAlloy && data.mMaterial.mMaterial == Materials.Iridium) { - tmp = 0.27f; - } - if (tmp > 0.0f) { - def[5] = def[5] - (tmp * def[5]); - } - if (data.mPrefix == OrePrefixes.plate && data.mMaterial.mMaterial == Materials.Rubber) { - def[7] = def[7] + 0.25f; - def[9] = def[9] + 2.0f; - } - if (data.mPrefix == OrePrefixes.plate && data.mMaterial.mMaterial == Materials.Lead) { - def[6] = def[6] + 0.30f; - } - if (data.mPrefix == OrePrefixes.plate && data.mMaterial.mMaterial == Materials.Plastic) { - def[7] = def[7] + 0.25f; - } - if (data.mPrefix == OrePrefixes.plate && data.mMaterial.mMaterial == Materials.NeodymiumMagnetic) { - def[11] = def[11] + 2.0f; - } - if (data.mPrefix == OrePrefixes.plate && data.mMaterial.mMaterial == Materials.NetherStar) { - def[8] = def[8] + 0.20f; - } - if (data.mPrefix == OrePrefixes.plate && data.mMaterial.mMaterial == Materials.InfusedFire) { - def[10] = def[10] + 3.0f; - } - if (data.mPrefix == OrePrefixes.plate && data.mMaterial.mMaterial == Materials.InfusedEntropy) { - def[10] = def[10] + 4.0f; - } - } else if (GT_ModHandler.isChargerItem(parts[i])) { - def[12] = def[12] + (float) ic2.api.item.ElectricItem.manager.getCharge(parts[i]); - def[0] = (float) (def[0] + Math.pow(ic2.api.item.ElectricItem.manager.getCharge(parts[i]), 0.33f)); - } - else if (Loader.isModLoaded("Thaumcraft") && parts[i].getItem() instanceof IRevealer) { - def[13] = 1; - def[31] += 100; - } - else if (parts[i].getItem().getUnlocalizedName().equals("ic2.itemNightvisionGoggles")) { - def[14] = 1; - def[31] += 100; - } else if (parts[i].getItem().getUnlocalizedName().equals("gt.meta.spring")) {// Once readded: GT Motors - switch (parts[i].getItem().getDamage(parts[i])) { - case 8630: - def[16] += 200; // motorPower - def[17] += 50; - def[31] += 10; - break; - case 8631: - def[16] += 300; // motorPower - def[17] += 100; - def[31] += 20; - break; - case 8632: - def[16] += 400; // motorPower - def[17] += 200; - def[31] += 50; - break; - case 8633: - def[16] += 500; // motorPower - def[17] += 400; - def[31] += 100; - break; - case 8634: - def[16] += 600; // motorPower - def[17] += 800; - def[31] += 200; - break; - } - } else if (parts[i].getItem().getUnlocalizedName().equals("gt.meta.springSmall")) {// Once Readded: GT Electric Pistons - switch (parts[i].getItem().getDamage(parts[i])) { - case 8630: - def[18] += 3; - def[19] += 200; - def[31] += 10; - break; - case 8631: - def[18] += 4; - def[19] += 300; - def[31] += 20; - break; - case 8632: - def[18] += 5; - def[19] += 450; - def[31] += 50; - break; - case 8633: - def[18] += 6; - def[19] += 800; - def[31] += 100; - break; - case 8634: - def[18] += 7; - def[19] += 1600; - def[31] += 200; - break; - } - } else if (parts[i].getItem().getUnlocalizedName().equals("gt.meta.Electrolyzer")) {// Once Readded: GT Electrolyzer - switch (parts[i].getItem().getDamage(parts[i])) { - case 8630: - def[20] += 10; // ElectrolyzerPower - def[21] += 1; // ElectrolyzerEU - def[31] += 50; - break; - case 8631: - def[20] += 20; // ElectrolyzerPower - def[21] += 4; // ElectrolyzerEU - def[31] += 100; - break; - case 8632: - def[20] += 40; // ElectrolyzerPower - def[21] += 16; // ElectrolyzerEU - def[31] += 150; - break; - case 8633: - def[20] += 80; // ElectrolyzerPower - def[21] += 64; // ElectrolyzerEU - def[31] += 200; - break; - case 8634: - def[20] += 160; // ElectrolyzerPower - def[21] += 256; // ElectrolyzerEU - def[31] += 250; - break; - } - } else if (parts[i].getItem().equals(ItemList.Cell_Empty.getItem())) { - def[15] += 8000; - } else if (parts[i].getItem().getUnlocalizedName().equals("gt.meta.cell")) {// Once Readded: GT Fluid Cells (tank) - switch (parts[i].getItem().getDamage(parts[i])) { - case 8630: // steel fluid cell - def[15] += 16000; - break; - case 8631: // tungsten fluid cell - def[15] += 64000; - break; - } - } else if (parts[i].getItem().getUnlocalizedName().equals("gt.meta.emmiter")) {// Once Readded: GT Field Emmiter - switch (parts[i].getItem().getDamage(parts[i])) { - case 8630: - def[22] += 1; // FieldEmmiterPower - def[23] += 1; // FieldEmmiterEU - def[31] += 100; - break; - case 8631: - def[22] += 2; // FieldEmmiterPower - def[23] += 4; // FieldEmmiterEU - def[31] += 200; - break; - case 8632: - def[22] += 3; // FieldEmmiterPower - def[23] += 16; // FieldEmmiterEU - def[31] += 300; - break; - case 8633: - def[22] += 4; // FieldEmmiterPower - def[23] += 64; // FieldEmmiterEU - def[31] += 400; - break; - case 8634: - def[22] += 5; // FieldEmmiterPower - def[23] += 512; // FieldEmmiterEU - def[31] += 500; - break; - } - } else if (data !=null && data.mPrefix == OrePrefixes.circuit) {// processing power stuff - if (data.mMaterial.mMaterial == Materials.Basic) { - def[30] += 100; - } else if (data.mMaterial.mMaterial == Materials.Good) { - def[30] += 200; - } else if (data.mMaterial.mMaterial == Materials.Advanced) { - def[30] += 300; - } else if (data.mMaterial.mMaterial == Materials.Data) { - def[30] += 400; - } else if (data.mMaterial.mMaterial == Materials.Elite) { - def[30] += 500; - } else if (data.mMaterial.mMaterial == Materials.Master) { - def[30] += 600; - } - } else if (parts[i].getItem().getUnlocalizedName().equals("gte.meta.jetpack")) {// jeptack parts - switch (parts[i].getItem().getDamage(parts[i])) { - case 0: - def[24] += 50; // JetpackFuelPower - def[25] += 1; // FuelUsage - def[31] += 10; - break; - case 1: - def[24] += 75; // JetpackFuelPower - def[25] += 2; // FuelUsage - def[31] += 20; - break; - case 2: - def[24] += 100; // JetpackFuelPower - def[25] += 4; // FuelUsage - def[31] += 30; - break; - case 3: - def[24] += 125; // JetpackFuelPower - def[25] += 8; // FuelUsage - def[31] += 40; - break; - case 4: - def[24] += 150; // JetpackFuelPower - def[25] += 16; // FuelUsage - def[31] += 50; - break; - case 5: - def[26] += 20; // JetpackEUPower - def[27] += 8; // JetpackEU - def[31] += 30; - break; - case 6: - def[26] += 30; // JetpackEUPower - def[27] += 16; // JetpackEU - def[31] += 60; - break; - case 7: - def[26] += 40; // JetpackEUPower - def[27] += 32; // JetpackEU - def[31] += 90; - break; - case 8: - def[26] += 50; // JetpackEUPower - def[27] += 64; // JetpackEU - def[31] += 120; - break; - case 9: - def[26] += 60; // JetpackEUPower - def[27] += 128; // JetpackEU - def[31] += 150; - break; - case 10: - def[28] += 100; // AntiGravPower - def[29] += 32; // AntiGravEU - def[31] += 100; - break; - case 11: - def[28] += 133; // AntiGravPower - def[29] += 64; // AntiGravEU - def[31] += 200; - break; - case 12: - def[28] += 166; // AntiGravPower - def[29] += 128; // AntiGravEU - def[31] += 300; - break; - case 13: - def[28] += 200; // AntiGravPower - def[29] += 256; // AntiGravEU - def[31] += 400; - break; - case 14: - def[28] += 233; // AntiGravPower - def[29] += 512; // AntiGravEU - def[31] += 500; - break; - } - } else if (true) { - //System.out.println("Unknown Item: " + parts[i].getItem().getUnlocalizedName()); - } - } - } - } - def[1] = 1 - def[1]; - def[2] = 1 - def[2]; - def[3] = 1 - def[3]; - def[4] = 1 - def[4]; - def[5] = 1 - def[5]; - if (def[7] > 0.95) { - def[7] = 1.0f; - } - if (def[8] > 0.98) { - def[8] = 1.0f; - } - return def; + return new float[32]; } public static int deChargeBatterys(ItemStack[] parts, int amount) { - // System.out.println("deCharge " + amount); int decharged = 0; for (int i = 0; decharged < amount && i < parts.length; i++) { if (GT_ModHandler.isChargerItem(parts[i])) { diff --git a/src/main/java/gregtech/common/items/armor/ArmorData.java b/src/main/java/gregtech/common/items/armor/ArmorData.java index 79c6a20ffa..c6ef4d5bc0 100644 --- a/src/main/java/gregtech/common/items/armor/ArmorData.java +++ b/src/main/java/gregtech/common/items/armor/ArmorData.java @@ -4,13 +4,20 @@ import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.text.NumberFormat; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Locale; +import java.util.Map; import java.util.Random; import gregtech.api.damagesources.GT_DamageSources; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; +import gregtech.common.items.armor.components.ArmorComponent; +import gregtech.common.items.armor.components.StatType; +import gregtech.common.items.armor.gui.ContainerBasicArmor; +import gregtech.common.items.armor.gui.ContainerModularArmor; +import gregtech.common.items.armor.gui.InventoryArmor; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -32,56 +39,59 @@ public class ArmorData { public ArmorData helmet; public ArmorData chestplate; public ArmorData leggings; - public ArmorData boots; + public ArmorData boots; - public boolean fullArmor; - public boolean fullRadiationDef; - public boolean fullElectricDef; + public Map mStat = new HashMap(); + public Map mBStat = new HashMap(); - public float fallDef; - public float physicalDef; - public float projectileDef; - public float fireDef; - public float magicDef; - public float explosionDef; - public float radiationDef; - public float electricDef; - public float witherDef; - - public float thorns; - public float thornsSingle; - public int magnet; - public int magnetSingle; - - public int partsCharge; +// public boolean fullArmor; +// public boolean fullRadiationDef; +// public boolean fullElectricDef; +// +// public float fallDef; +// public float physicalDef; +// public float projectileDef; +// public float fireDef; +// public float magicDef; +// public float explosionDef; +// public float radiationDef; +// public float electricDef; +// public float witherDef; +// +// public float thorns; +// public float thornsSingle; +// public int magnet; +// public int magnetSingle; +// +// public int partsCharge; public int maxCharge; public int charge; - public boolean thaumicGoggles; - public boolean nightVision; - public boolean potionInjector; - public boolean autoFeeder; +// public boolean thaumicGoggles; +// public boolean nightVision; +// public boolean potionInjector; +// public boolean autoFeeder; public FluidStack fluid; - public int tankCap; - - public int weight; - public int maxWeight; - public int processingPower; - public int processingPowerUsed; - public int partProcessing; - public int partProcessingUsed; - - public int motorPower; - public int motorEUusage; - public int pistonJumpboost; - public int pistonEUusage; - public int electrolyzerProd; - public int electrolyzerEUusage; - public int fieldGenCap; - public int fieldGenEUusage; - - public int jetpackMaxWeight; - public int antiGravMaxWeight; +// public int tankCap; +// +// public int weight; + public float maxWeight; +// public int processingPower; +// public int processingPowerUsed; +// public int partProcessing; +// public int partProcessingUsed; +// +// public int motorPower; +// public int motorEUusage; +// public int pistonJumpboost; +// public int pistonEUusage; +// public int electrolyzerProd; +// public int electrolyzerEUusage; +// public int fieldGenCap; +// public int fieldGenEUusage; +// +// public int jetpackMaxWeight; +// public int antiGravMaxWeight; public ArmorData(EntityPlayer player, ItemStack stack, int type, int tier) { this.type = type; @@ -118,45 +128,14 @@ public class ArmorData { } public ArmorData calculateArmor(ItemStack[] parts) { - float[] def = ArmorCalculation.calculateArmor(parts); - weight = (int) def[0]; - physicalDef = def[1]; - projectileDef = def[2]; - fireDef = def[3]; - magicDef = def[4]; - explosionDef = def[5]; - radiationDef = def[6]; - electricDef = def[7]; - witherDef = def[8]; - fallDef = def[9]; - thornsSingle = def[10]; - magnetSingle = (int) def[11]; - if (armorTier > 0) { - partsCharge = (int) def[12]; - thaumicGoggles = def[13] > 0.5f; - nightVision = def[14] > 0.5f; - tankCap = (int) def[15]; // tankCap - motorPower = (int) def[16]; // motorPower - motorEUusage = (int) def[17]; // motorEU - pistonJumpboost = (int) def[18]; // pistonPower - fallDef += pistonJumpboost; - pistonEUusage = (int) def[19]; // pistonEU - electrolyzerProd = (int) def[20]; // ElectrolyzerPower - electrolyzerEUusage = (int) def[21]; // ElectrolyzerEU - fieldGenCap = (int) def[22]; // FieldEmmiterPower - fieldGenEUusage = (int) def[23]; // FieldEmmiterEU - jetpackMaxWeight = (int) def[24] + (int) def[26]; // JetpackFuelPower// JetpackEUPower - def[25] = 0; // FuelUsage - def[27] = 0; // JetpackEU - antiGravMaxWeight = (int) def[28]; // AntiGravPower - def[29] = 0; // AntiGravEU - if (armorTier == 2) { - partProcessing = (int) def[30] + 500; // ProcessingPower - } else { - partProcessing = (int) def[30] + 300; // ProcessingPower - } - partProcessingUsed = (int) def[31]; // ProcessingPowerUsed + mStat.clear(); + mBStat.clear(); + for(ItemStack tPart : parts){ + if(tPart!=null && ArmorComponent.mStacks.containsKey(tPart.getUnlocalizedName())) + ArmorComponent.mStacks.get(tPart.getUnlocalizedName()).calculateArmor(this); } + for(StatType tType : StatType.values())if(!mStat.containsKey(tType))mStat.put(tType, .0f); + for(StatType tType : StatType.values())if(!mBStat.containsKey(tType))mBStat.put(tType, false); updateTooltip(); return this; } @@ -165,67 +144,67 @@ public class ArmorData { List tagList = new ArrayList(); String tmp2 = ""; if (maxWeight > 4000) { - tmp2 = " " + GT_LanguageManager.getTranslation("hav"); + tmp2 = " " + GT_LanguageManager.getTranslation("Too Heavy"); } if (maxCharge != 0) { DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US); DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols(); symbols.setGroupingSeparator(' '); if (type == 0) { - if (thaumicGoggles) { - tagList.add(GT_LanguageManager.getTranslation("thaum")); + if (mBStat.get(StatType.THAUMICGOGGLES)) { + tagList.add(GT_LanguageManager.getTranslation("Thaumic Goggles installed")); } - if (nightVision) { - tagList.add(GT_LanguageManager.getTranslation("night")); + if (mBStat.get(StatType.NIGHTVISION)) { + tagList.add(GT_LanguageManager.getTranslation("Nightvision installed")); } } - tagList.add("EU: " + formatter.format(charge + partsCharge)); + tagList.add("EU: " + formatter.format(charge + mStat.get(StatType.PARTSCHARGE))); if (type == 2) { - tagList.add(GT_LanguageManager.getTranslation("jum") + ": " + pistonJumpboost / 3 + "m"); + tagList.add(GT_LanguageManager.getTranslation("Jumpboost") + ": " + mStat.get(StatType.PISTONJUMPBOOST) / 3 + "m"); } - if (type == 2 && pistonJumpboost > 0) { - tagList.add(GT_LanguageManager.getTranslation("uph")); + if (type == 2 && mStat.get(StatType.PISTONJUMPBOOST) > 0) { + tagList.add(GT_LanguageManager.getTranslation("Uphill step assist active")); } - if (type == 2 && motorPower > 0) { - tagList.add(GT_LanguageManager.getTranslation("speass") + ": " + motorPower); - tagList.add(GT_LanguageManager.getTranslation("motuse") + ": " + motorEUusage + " EU"); + if (type == 2 && mStat.get(StatType.MOTPRPOWER) > 0) { + tagList.add(GT_LanguageManager.getTranslation("Speedup") + ": " + mStat.get(StatType.MOTPRPOWER)); + tagList.add(GT_LanguageManager.getTranslation("Motor energy usage") + ": " + mStat.get(StatType.MOTOREUUSAGE) + " EU"); if (maxWeight > 4000) { - tagList.add(GT_LanguageManager.getTranslation("over")); + tagList.add(GT_LanguageManager.getTranslation("Too Heavy!!!")); } } - tagList.add(GT_LanguageManager.getTranslation("pro1") + " " + partProcessing + " " + GT_LanguageManager.getTranslation("pro3")); - tagList.add(GT_LanguageManager.getTranslation("pro2") + ": " + partProcessingUsed + " " + GT_LanguageManager.getTranslation("pro3")); - if (type == 0 && electrolyzerProd > 0) { - tagList.add(GT_LanguageManager.getTranslation("elec1") + " " + electrolyzerProd / 2 + GT_LanguageManager.getTranslation("elec2")); + tagList.add(GT_LanguageManager.getTranslation("Processing power ") + " " + mStat.get(StatType.PARTPROCESSING) + " " + GT_LanguageManager.getTranslation("")); + tagList.add(GT_LanguageManager.getTranslation("Processing power used") + ": " + mStat.get(StatType.PARTPROCESSINGUSED) + " " + GT_LanguageManager.getTranslation("")); + if (type == 0 && mStat.get(StatType.ELECTROLYZERPROD) > 0) { + tagList.add(GT_LanguageManager.getTranslation("Electrolyzer produces ") + " " + mStat.get(StatType.ELECTROLYZERPROD) / 2 + GT_LanguageManager.getTranslation("per second")); } - if (tankCap > 0) { + if (mStat.get(StatType.TANKCAP) > 0) { if (fluid != null) { - tagList.add(GT_LanguageManager.getTranslation("tank") + ": " + fluid.getLocalizedName() + " " + fluid.amount + "L (" + tankCap + ")"); + tagList.add(GT_LanguageManager.getTranslation("Tank Capacity") + ": " + fluid.getLocalizedName() + " " + fluid.amount + "L (" + mStat.get(StatType.TANKCAP) + ")"); } else { - tagList.add(GT_LanguageManager.getTranslation("tankcap") + ": " + tankCap); + tagList.add(GT_LanguageManager.getTranslation("tankcap") + ": " + mStat.get(StatType.TANKCAP)); } } } - tagList.add(GT_LanguageManager.getTranslation("weight") + ": " + weight + tmp2); - tagList.add(GT_LanguageManager.getTranslation("phydef") + ": " + (Math.round(physicalDef * 1000) / 10.0) + "%"); - tagList.add(GT_LanguageManager.getTranslation("prodef") + ": " + (Math.round(projectileDef * 1000) / 10.0) + "%"); - tagList.add(GT_LanguageManager.getTranslation("firedef") + ": " + (Math.round(fireDef * 1000) / 10.0) + "%"); - tagList.add(GT_LanguageManager.getTranslation("magdef") + ": " + (Math.round(magicDef * 1000) / 10.0) + "%"); - tagList.add(GT_LanguageManager.getTranslation("expdef") + ": " + (Math.round(explosionDef * 1000) / 10.0) + "%"); - if (fallDef > 0 && type == 3) { - tagList.add(GT_LanguageManager.getTranslation("abs1") + " " + fallDef + GT_LanguageManager.getTranslation("abs2")); + tagList.add(GT_LanguageManager.getTranslation("Weight") + ": " + mStat.get(StatType.WEIGHT) + tmp2); + tagList.add(GT_LanguageManager.getTranslation("Physical Defence") + ": " + (Math.round(mStat.get(StatType.PHYSICALDEFENCE) * 1000) / 10.0) + "%"); + tagList.add(GT_LanguageManager.getTranslation("Projectile Defence") + ": " + (Math.round(mStat.get(StatType.PROJECTILEDEFENCE) * 1000) / 10.0) + "%"); + tagList.add(GT_LanguageManager.getTranslation("Fire Defence") + ": " + (Math.round(mStat.get(StatType.FIREDEFENCE) * 1000) / 10.0) + "%"); + tagList.add(GT_LanguageManager.getTranslation("Magic Defence") + ": " + (Math.round(mStat.get(StatType.MAGICDEFENCE) * 1000) / 10.0) + "%"); + tagList.add(GT_LanguageManager.getTranslation("Explosive Defence") + ": " + (Math.round(mStat.get(StatType.EXPLOSIONDEFENCE) * 1000) / 10.0) + "%"); + if (mStat.get(StatType.FALLDEFENCE) > 0 && type == 3) { + tagList.add(GT_LanguageManager.getTranslation("Absorbs") + " " + mStat.get(StatType.FALLDEFENCE) + GT_LanguageManager.getTranslation(" m of Fall Defence")); } - if (thorns > 0) { - tagList.add(GT_LanguageManager.getTranslation("thorns") + ": " + (int) thorns); + if (mStat.get(StatType.THORNS) > 0) { + tagList.add(GT_LanguageManager.getTranslation("Thorns") + ": " + mStat.get(StatType.THORNS)); } - if (magnet > 0) { - tagList.add(GT_LanguageManager.getTranslation("magnet") + ": " + magnet + "m"); + if (mStat.get(StatType.MAGNET) > 0) { + tagList.add(GT_LanguageManager.getTranslation("Magnet") + ": " + mStat.get(StatType.MAGNET) + "m"); } - if (fullRadiationDef) { - tagList.add(GT_LanguageManager.getTranslation("radim")); + if (mBStat.get(StatType.FULLRADIATIONARMOR)) { + tagList.add(GT_LanguageManager.getTranslation("Is Full Radiation Defence")); } else { - if (radiationDef > 0.01d) { - tagList.add(GT_LanguageManager.getTranslation("raddef") + ": " + (Math.round(radiationDef * 1000) / 10.0) + "%"); + if (mStat.get(StatType.RADIATIONDEFENCE) > 0.01d) { + tagList.add(GT_LanguageManager.getTranslation("Radiation Defence") + ": " + (Math.round(mStat.get(StatType.RADIATIONDEFENCE) * 1000) / 10.0) + "%"); } } info = tagList; @@ -242,12 +221,12 @@ public class ArmorData { ModularArmor_Item tmp = (ModularArmor_Item) stack.getItem(); ContainerModularArmor tmp2 = new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, stack)); if ((this.type + i) == 4) { - fluid = ArmorCalculation.getFluid(tmp2.mInvArmor.parts, tankCap); + fluid = ArmorCalculation.getFluid(tmp2.mInvArmor.parts, Math.round(mStat.get(StatType.TANKCAP))); } if (maxCharge > 0 && charge < maxCharge) { int loaded = ArmorCalculation.deChargeBatterys(tmp2.mInvArmor.parts, maxCharge - charge); charge = charge + loaded; - tmp.data.partsCharge -= loaded; + change(mStat, StatType.PARTSCHARGE, -loaded); } switch (tmp.armorType) { @@ -270,39 +249,39 @@ public class ArmorData { } } if (helmet != null && chestplate != null && leggings != null && boots != null) { - fullArmor = true; + set(mBStat, StatType.FULLARMOR, true); } else { - fullArmor = false; + set(mBStat, StatType.FULLARMOR, false); } - fullRadiationDef = fullArmor && helmet.radiationDef > 0.9f && chestplate.radiationDef > 0.9f && leggings.radiationDef > 0.9f && boots.radiationDef > 0.9f; - fullElectricDef = fullArmor && helmet.electricDef > 0.9f && chestplate.electricDef > 0.9f && leggings.electricDef > 0.9f && boots.electricDef > 0.9f; - magnet = 0; - thorns = 0; - processingPower = 0; - processingPowerUsed = 0; + set(mBStat, StatType.FULLRADIATIONARMOR, mBStat.get(StatType.FULLARMOR) && helmet.mStat.get(StatType.RADIATIONDEFENCE) > 0.9f && chestplate.mStat.get(StatType.RADIATIONDEFENCE) > 0.9f && leggings.mStat.get(StatType.RADIATIONDEFENCE) > 0.9f && boots.mStat.get(StatType.RADIATIONDEFENCE) > 0.9f); + set(mBStat, StatType.FULLELECTRICARMOR, mBStat.get(StatType.FULLARMOR) && chestplate.mStat.get(StatType.ELECTRICALDEFENCE) > 0.9f && chestplate.mStat.get(StatType.ELECTRICALDEFENCE) > 0.9f && leggings.mStat.get(StatType.ELECTRICALDEFENCE) > 0.9f && boots.mStat.get(StatType.ELECTRICALDEFENCE) > 0.9f); + set(mBStat, StatType.MAGNET, 0); + set(mBStat, StatType.THORNS, 0); + set(mBStat, StatType.PROCESSINGPOWER, 0); + set(mBStat, StatType.PROCESSINGPOWERUSED, 0); if (helmet != null) { - magnet += helmet.magnetSingle; - thorns += helmet.thornsSingle; - processingPower += helmet.partProcessing; - processingPowerUsed += helmet.partProcessingUsed; + change(mStat, StatType.MAGNET, helmet.mStat.get(StatType.MAGNET)); + change(mStat, StatType.THORNS, helmet.mStat.get(StatType.THORNS)); + change(mStat, StatType.PROCESSINGPOWER, helmet.mStat.get(StatType.PROCESSINGPOWER)); + change(mStat, StatType.PROCESSINGPOWERUSED, helmet.mStat.get(StatType.PROCESSINGPOWERUSED)); } if (chestplate != null) { - magnet += chestplate.magnetSingle; - thorns += chestplate.thornsSingle; - processingPower += chestplate.partProcessing; - processingPowerUsed += chestplate.partProcessingUsed; + change(mStat, StatType.MAGNET, chestplate.mStat.get(StatType.MAGNET)); + change(mStat, StatType.THORNS, chestplate.mStat.get(StatType.THORNS)); + change(mStat, StatType.PROCESSINGPOWER, chestplate.mStat.get(StatType.PROCESSINGPOWER)); + change(mStat, StatType.PROCESSINGPOWERUSED, chestplate.mStat.get(StatType.PROCESSINGPOWERUSED)); } if (leggings != null) { - magnet += leggings.magnetSingle; - thorns += leggings.thornsSingle; - processingPower += leggings.partProcessing; - processingPowerUsed += leggings.partProcessingUsed; + change(mStat, StatType.MAGNET, leggings.mStat.get(StatType.MAGNET)); + change(mStat, StatType.THORNS, leggings.mStat.get(StatType.THORNS)); + change(mStat, StatType.PROCESSINGPOWER, leggings.mStat.get(StatType.PROCESSINGPOWER)); + change(mStat, StatType.PROCESSINGPOWERUSED, leggings.mStat.get(StatType.PROCESSINGPOWERUSED)); } if (boots != null) { - magnet += boots.magnetSingle; - thorns += boots.thornsSingle; - processingPower += boots.partProcessing; - processingPowerUsed += boots.partProcessingUsed; + change(mStat, StatType.MAGNET, boots.mStat.get(StatType.MAGNET)); + change(mStat, StatType.THORNS, boots.mStat.get(StatType.THORNS)); + change(mStat, StatType.PROCESSINGPOWER, boots.mStat.get(StatType.PROCESSINGPOWER)); + change(mStat, StatType.PROCESSINGPOWERUSED, boots.mStat.get(StatType.PROCESSINGPOWERUSED)); } isTopItem = false; if (type == 0) { @@ -315,18 +294,41 @@ public class ArmorData { isTopItem = true; } if (helmet != null) { - maxWeight = helmet.weight; + maxWeight = helmet.mStat.get(StatType.WEIGHT); } if (chestplate != null) { - maxWeight += chestplate.weight; + maxWeight += chestplate.mStat.get(StatType.WEIGHT); } if (leggings != null) { - maxWeight += leggings.weight; + maxWeight += leggings.mStat.get(StatType.WEIGHT); } if (boots != null) { - maxWeight += boots.weight; + maxWeight += boots.mStat.get(StatType.WEIGHT); } } + + public void set(Map aMap, StatType aType, boolean aSet){ + if(aMap.containsKey(aType))aMap.remove(aType); + aMap.put(aType, aSet); + } + + public void set(Map aMap, StatType aType, float aSet){ + if(aMap.containsKey(aType))aMap.remove(aType); + aMap.put(aType, aSet); + } + + public void change(Map aMap, StatType aType, float aChange){ + float tChange = 0; + if(aMap==null)System.out.println("changeMapnull"); + if(aMap.containsKey(aType)){tChange = (float) aMap.get(aType); + aMap.remove(aType); + } + aMap.put(aType, (tChange + aChange)); + } + + public void dechargeComponents(int aCharge){ + + } public double getBaseAbsorptionRatio() { switch (this.type) { diff --git a/src/main/java/gregtech/common/items/armor/ContainerBasicArmor.java b/src/main/java/gregtech/common/items/armor/ContainerBasicArmor.java deleted file mode 100644 index 108d813707..0000000000 --- a/src/main/java/gregtech/common/items/armor/ContainerBasicArmor.java +++ /dev/null @@ -1,48 +0,0 @@ -package gregtech.common.items.armor; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class ContainerBasicArmor extends ContainerModularArmor { - - public ContainerBasicArmor(EntityPlayer player, InventoryArmor aInvArmor) { - super(player, aInvArmor); - } - - public void addSlots(InventoryPlayer aInventoryPlayer) { - addSlotToContainer(new Slot(mInvArmor, 0, 118, 6)); - addSlotToContainer(new Slot(mInvArmor, 1, 136, 6)); - addSlotToContainer(new Slot(mInvArmor, 2, 154, 6)); - addSlotToContainer(new Slot(mInvArmor, 3, 118, 24)); - addSlotToContainer(new Slot(mInvArmor, 4, 136, 24)); - addSlotToContainer(new Slot(mInvArmor, 5, 154, 24)); - addSlotToContainer(new Slot(mInvArmor, 6, 118, 42)); - addSlotToContainer(new Slot(mInvArmor, 7, 136, 42)); - addSlotToContainer(new Slot(mInvArmor, 8, 154, 42)); - - for (int i = 0; i < 3; i++) { - for (int j = 0; j < 9; j++) { - addSlotToContainer(new Slot(aInventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); - } - } - - for (int i = 0; i < 9; i++) { - ItemStack stackInSlot = aInventoryPlayer.getStackInSlot(i); - if(isIdenticalItem(mInvArmor.parent,stackInSlot)){ - addSlotToContainer(new SlotLocked(aInventoryPlayer,i,8+i*18,142)); - }else{ - addSlotToContainer(new Slot(aInventoryPlayer, i, 8 + i * 18, 142));} - } - } - - public int getSlotCount() { - return 9; - } - - public int getShiftClickSlotCount() { - return 9; - } - -} diff --git a/src/main/java/gregtech/common/items/armor/ContainerElectricArmor1.java b/src/main/java/gregtech/common/items/armor/ContainerElectricArmor1.java deleted file mode 100644 index 063807275c..0000000000 --- a/src/main/java/gregtech/common/items/armor/ContainerElectricArmor1.java +++ /dev/null @@ -1,53 +0,0 @@ -package gregtech.common.items.armor; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class ContainerElectricArmor1 extends ContainerBasicArmor { - - public ContainerElectricArmor1(EntityPlayer player, InventoryArmor aInvArmor) { - super(player, aInvArmor); - } - - public void addSlots(InventoryPlayer aInventoryPlayer) { - addSlotToContainer(new Slot(mInvArmor, 0, 118, 6)); - addSlotToContainer(new Slot(mInvArmor, 1, 136, 6)); - addSlotToContainer(new Slot(mInvArmor, 2, 154, 6)); - addSlotToContainer(new Slot(mInvArmor, 3, 118, 24)); - addSlotToContainer(new Slot(mInvArmor, 4, 136, 24)); - addSlotToContainer(new Slot(mInvArmor, 5, 154, 24)); - addSlotToContainer(new Slot(mInvArmor, 6, 118, 42)); - addSlotToContainer(new Slot(mInvArmor, 7, 136, 42)); - addSlotToContainer(new Slot(mInvArmor, 8, 154, 42)); - addSlotToContainer(new Slot(mInvArmor, 9, 118, 60)); - addSlotToContainer(new Slot(mInvArmor, 10, 136, 60)); - addSlotToContainer(new Slot(mInvArmor, 11, 154, 60)); - - addSlotToContainer(new SlotFluid(mInvArmor,12,94,32)); - - for (int i = 0; i < 3; i++) { - for (int j = 0; j < 9; j++) { - addSlotToContainer(new Slot(aInventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); - } - } - - for (int i = 0; i < 9; i++) { - ItemStack stackInSlot = aInventoryPlayer.getStackInSlot(i); - if(isIdenticalItem(mInvArmor.parent,stackInSlot)){ - addSlotToContainer(new SlotLocked(aInventoryPlayer,i,8+i*18,142)); - }else{ - addSlotToContainer(new Slot(aInventoryPlayer, i, 8 + i * 18, 142));} - } - } - - public int getSlotCount() { - return 12; - } - - public int getShiftClickSlotCount() { - return 12; - } - -} diff --git a/src/main/java/gregtech/common/items/armor/ContainerModularArmor.java b/src/main/java/gregtech/common/items/armor/ContainerModularArmor.java deleted file mode 100644 index 88f1a71599..0000000000 --- a/src/main/java/gregtech/common/items/armor/ContainerModularArmor.java +++ /dev/null @@ -1,171 +0,0 @@ -package gregtech.common.items.armor; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.oredict.OreDictionary; - -public abstract class ContainerModularArmor extends Container { - - public InventoryArmor mInvArmor; - - public ContainerModularArmor(EntityPlayer player, InventoryArmor aInvArmor) { - this.mInvArmor = aInvArmor; - addSlots(player.inventory); - } - - public ArmorData getData(EntityPlayer aPlayer){ - - - - return null; - } - - @Override - public boolean canInteractWith(EntityPlayer aPlayer) { - return true; - } - - public abstract void addSlots(InventoryPlayer aInventoryPlayer); - - public abstract int getSlotCount(); - - public abstract int getShiftClickSlotCount(); - - public void saveInventory(EntityPlayer entityplayer) { - mInvArmor.onGuiSaved(entityplayer); - } - - @Override - public void onContainerClosed(EntityPlayer player) { - super.onContainerClosed(player); - if (!player.worldObj.isRemote) { - saveInventory(player); - } - } - - @Override - public ItemStack transferStackInSlot(EntityPlayer player, int slotIndex) { - if (player == null) { - return null; - } - - ItemStack originalStack = null; - Slot slot = (Slot) inventorySlots.get(slotIndex); - int numSlots = inventorySlots.size(); - if (slot != null && slot.getHasStack()) { - ItemStack stackInSlot = slot.getStack(); - originalStack = stackInSlot.copy(); - if (slotIndex >= numSlots - 9 * 4 && tryShiftItem(stackInSlot, numSlots)) { - } else if (slotIndex >= numSlots - 9 * 4 && slotIndex < numSlots - 9) { - if (!shiftItemStack(stackInSlot, numSlots - 9, numSlots)) { - return null; - } - } else if (slotIndex >= numSlots - 9 && slotIndex < numSlots) { - if (!shiftItemStack(stackInSlot, numSlots - 9 * 4, numSlots - 9)) { - return null; - } - } else if (!shiftItemStack(stackInSlot, numSlots - 9 * 4, numSlots)) { - return null; - } - slot.onSlotChange(stackInSlot, originalStack); - if (stackInSlot.stackSize <= 0) { - slot.putStack(null); - } else { - slot.onSlotChanged(); - } - if (stackInSlot.stackSize == originalStack.stackSize) { - return null; - } - slot.onPickupFromSlot(player, stackInSlot); - } - return originalStack; - } - - private boolean tryShiftItem(ItemStack stackToShift, int numSlots) { - for (int machineIndex = 0; machineIndex < numSlots - 9 * 4; machineIndex++) { - Slot slot = (Slot) inventorySlots.get(machineIndex); - if (slot.getHasStack()) { - continue; - } - if(slot instanceof SlotLocked){ - continue; - } - if(slot instanceof SlotFluid){ - continue; - } - - if (!slot.isItemValid(stackToShift)) { - continue; - } - if (shiftItemStack(stackToShift, machineIndex, machineIndex + 1)) { - return true; - } - } - return false; - } - - protected boolean shiftItemStack(ItemStack stackToShift, int start, int end) { - boolean changed = false; - if (stackToShift.isStackable()) { - for (int slotIndex = start; stackToShift.stackSize > 0 && slotIndex < end; slotIndex++) { - Slot slot = (Slot) inventorySlots.get(slotIndex); - ItemStack stackInSlot = slot.getStack(); - if (stackInSlot != null && isIdenticalItem(stackInSlot, stackToShift)) { - int resultingStackSize = stackInSlot.stackSize + stackToShift.stackSize; - int max = Math.min(stackToShift.getMaxStackSize(), slot.getSlotStackLimit()); - if (resultingStackSize <= max) { - stackToShift.stackSize = 0; - stackInSlot.stackSize = resultingStackSize; - slot.onSlotChanged(); - changed = true; - } else if (stackInSlot.stackSize < max) { - stackToShift.stackSize -= max - stackInSlot.stackSize; - stackInSlot.stackSize = max; - slot.onSlotChanged(); - changed = true; - } - } - } - } - if (stackToShift.stackSize > 0) { - for (int slotIndex = start; stackToShift.stackSize > 0 && slotIndex < end; slotIndex++) { - Slot slot = (Slot) inventorySlots.get(slotIndex); - ItemStack stackInSlot = slot.getStack(); - if (stackInSlot == null) { - int max = Math.min(stackToShift.getMaxStackSize(), slot.getSlotStackLimit()); - stackInSlot = stackToShift.copy(); - stackInSlot.stackSize = Math.min(stackToShift.stackSize, max); - stackToShift.stackSize -= stackInSlot.stackSize; - slot.putStack(stackInSlot); - slot.onSlotChanged(); - changed = true; - } - } - } - return changed; - } - - public static boolean isIdenticalItem(ItemStack lhs, ItemStack rhs) { - if (lhs == null || rhs == null) { - return false; - } - - if (lhs.getItem() != rhs.getItem()) { - return false; - } - - if (lhs.getItemDamage() != OreDictionary.WILDCARD_VALUE) { - if (lhs.getItemDamage() != rhs.getItemDamage()) { - return false; - } - } - - return ItemStack.areItemStackTagsEqual(lhs, rhs); - } - -} diff --git a/src/main/java/gregtech/common/items/armor/FluidSync.java b/src/main/java/gregtech/common/items/armor/FluidSync.java deleted file mode 100644 index 70ee268188..0000000000 --- a/src/main/java/gregtech/common/items/armor/FluidSync.java +++ /dev/null @@ -1,67 +0,0 @@ -package gregtech.common.items.armor; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.WorldServer; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; - -import com.google.common.base.Charsets; -import com.google.common.io.ByteArrayDataInput; -import com.google.common.io.ByteArrayDataOutput; -import com.google.common.io.ByteStreams; - -public class FluidSync /**implements IPacket**/ { - String playerName; - int amount; - String fluid; - -// @Override - public byte getPacketID() { - return 0; - } - - public FluidSync(String player, int amount, String fluid) { - this.playerName = player; - this.amount = amount; - this.fluid = fluid.toLowerCase(); - } - -// @Override - public ByteArrayDataOutput encode() { - ByteArrayDataOutput rOut = ByteStreams.newDataOutput(4); - rOut.writeUTF(playerName + ";" + amount + ";" + fluid); - return rOut; - } - -// @Override -// public IPacket decode(ByteArrayDataInput aData) { -// String tmp = aData.readUTF(); -// String[] tmp2 = tmp.split(";"); -// return new FluidSync(tmp2[0], Integer.parseInt(tmp2[1]), tmp2[2].toLowerCase()); -// } -// -// @Override -// public void process(IBlockAccess aWorld, INetworkHandler aNetworkHandler) { -// WorldServer[] worlds = DimensionManager.getWorlds(); -// EntityPlayer tmp; -// for (int i = 0; i < worlds.length; i++) { -// tmp = worlds[i].getPlayerEntityByName(playerName); -// if (tmp != null) { -// try { -// if (fluid.equals("null")) { -// tmp.openContainer.getSlot(12).putStack(null); -// } else { -// tmp.openContainer.getSlot(12).putStack(UT.Fluids.display(new FluidStack(FluidRegistry.getFluid(fluid), amount), true)); -// } -// tmp.openContainer.detectAndSendChanges(); -// } catch (Exception e) { -// e.printStackTrace(); -// } -// -// } -// } -// } - -} diff --git a/src/main/java/gregtech/common/items/armor/FluidSync2.java b/src/main/java/gregtech/common/items/armor/FluidSync2.java deleted file mode 100644 index de801aad8a..0000000000 --- a/src/main/java/gregtech/common/items/armor/FluidSync2.java +++ /dev/null @@ -1,67 +0,0 @@ -package gregtech.common.items.armor; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.WorldServer; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; - -import com.google.common.base.Charsets; -import com.google.common.io.ByteArrayDataInput; -import com.google.common.io.ByteArrayDataOutput; -import com.google.common.io.ByteStreams; - -public class FluidSync2 /**implements IPacket**/ { - String playerName; - -// @Override - public byte getPacketID() { - return 1; - } - - public FluidSync2(String player) { - this.playerName = player; - } - -// @Override - public ByteArrayDataOutput encode() { - ByteArrayDataOutput rOut = ByteStreams.newDataOutput(4); - rOut.writeUTF(playerName); - return rOut; - } - -// @Override -// public IPacket decode(ByteArrayDataInput aData) { -// return new FluidSync2(aData.readUTF()); -// } -// -// @Override -// public void process(IBlockAccess aWorld, INetworkHandler aNetworkHandler) { -// WorldServer[] worlds = DimensionManager.getWorlds(); -// EntityPlayer tmp; -// for (int i = 0; i < worlds.length; i++) { -// tmp = worlds[i].getPlayerEntityByName(playerName); -// if (tmp != null) { -// try { -// ItemStack tmp2 = tmp.inventory.getItemStack(); -// ItemStack tmp3 = UT.Fluids.getContainerForFilledItem(tmp2, true); -// if (tmp2.stackSize <= 1) { -// tmp2 = null; -// } else { -// tmp2.stackSize--; -// } -// tmp.inventory.setItemStack(tmp2); -// if(tmp3!=null){ -// tmp3.stackSize=1; -// tmp.inventory.addItemStackToInventory(tmp3);} -// } catch (Exception e) { -// e.printStackTrace(); -// } -// -// } -// } -// } - -} diff --git a/src/main/java/gregtech/common/items/armor/GuiElectricArmor1.java b/src/main/java/gregtech/common/items/armor/GuiElectricArmor1.java deleted file mode 100644 index 136630124f..0000000000 --- a/src/main/java/gregtech/common/items/armor/GuiElectricArmor1.java +++ /dev/null @@ -1,310 +0,0 @@ -package gregtech.common.items.armor; - -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Utility; - -import java.text.DecimalFormat; -import java.text.DecimalFormatSymbols; -import java.text.NumberFormat; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidContainerItem; - -@SideOnly(Side.CLIENT) -public class GuiElectricArmor1 extends GuiContainer { - ContainerModularArmor cont; - EntityPlayer player; - private int tab; - - public GuiElectricArmor1(ContainerModularArmor containerModularArmor, EntityPlayer aPlayer) { - super(containerModularArmor); - player = aPlayer; - cont = containerModularArmor; - tab = 0; - } - - public String seperateNumber(long number){ - DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US); - DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols(); - symbols.setGroupingSeparator(' '); - return formatter.format(number); - } - - @Override - protected void drawGuiContainerForegroundLayer(int x, int y) { - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - int x2 = x - xStart; - int y2 = y - yStart; - drawTooltip(x2, y2 + 5); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { - GL11.glColor4f(1F, 1F, 1F, 1F); - this.mc.getTextureManager().bindTexture(new ResourceLocation("gregtech", "textures/gui/armorgui3x4.png")); - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - //Draw background - drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize); - //Draw active arrows - drawTexturedModalRect(xStart + 10, yStart + 70, 219, 11, 14, 5); - //Draw active armor symbol - switch (cont.mInvArmor.data.type) { - case 0: - drawTexturedModalRect(xStart + 73, yStart + 68, 177, 10, 10, 9); - break; - case 1: - drawTexturedModalRect(xStart + 83, yStart + 68, 187, 10, 10, 9); - break; - case 2: - drawTexturedModalRect(xStart + 93, yStart + 68, 197, 10, 10, 9); - break; - case 3: - drawTexturedModalRect(xStart + 103, yStart + 68, 207, 10, 10, 9); - break; - default: - break; - } - //Draw active tab - switch(tab){ - case 0: - break; - case 1: - drawTexturedModalRect(xStart + 7, yStart + 14, 2, 167, 104, 54); - break; - case 2: - drawTexturedModalRect(xStart + 7, yStart + 14, 107, 167, 104, 54); - break; - default: - break; - } - - if(cont.mInvArmor.data.tankCap>0){ - drawTexturedModalRect(xStart + 94, yStart + 32, 231, 69, 16, 34); - } - - int bar = (int) Math.floor(18 * (cont.mInvArmor.data.weight/(float)1000)); - drawTexturedModalRect(xStart + 15, yStart + 7, 217, 26, bar, 5); - drawTexturedModalRect(xStart + bar + 15, yStart + 7, 197+bar, 26, 18-bar, 5); - - if(tab==0){ - //processing power bar - bar = Math.min((int) Math.floor(52 * ((float)cont.mInvArmor.data.processingPowerUsed/(float)cont.mInvArmor.data.processingPower)),52); - drawTexturedModalRect(xStart + 17, yStart + 17, 177, 146, bar, 5); - drawTexturedModalRect(xStart + bar + 17, yStart + 17, 177+bar, 139, 52-bar, 5); - }else if(tab==1){ - - }else{ - //Def tab values - if(cont.mInvArmor.data.physicalDef>0)drawTexturedModalRect(xStart + 30, yStart + 20, 186, 33, 7, 7); - drawBars(31, 20, cont.mInvArmor.data.physicalDef); - if(cont.mInvArmor.data.projectileDef>0)drawTexturedModalRect(xStart + 30, yStart + 29, 186, 42, 7, 7); - drawBars(31, 29, cont.mInvArmor.data.projectileDef); - if(cont.mInvArmor.data.fireDef>0)drawTexturedModalRect(xStart + 30, yStart + 38, 186, 51, 7, 7); - drawBars(31, 38, cont.mInvArmor.data.fireDef); - if(cont.mInvArmor.data.magicDef>0)drawTexturedModalRect(xStart + 30, yStart + 47, 186, 60, 7, 7); - drawBars(31, 47, cont.mInvArmor.data.magicDef); - if(cont.mInvArmor.data.explosionDef>0)drawTexturedModalRect(xStart + 30, yStart + 56, 186, 69, 7, 7); - drawBars(31, 56, cont.mInvArmor.data.explosionDef); - if(cont.mInvArmor.data.radiationDef>0)drawTexturedModalRect(xStart + 61, yStart + 20, 186, 87, 7, 7); - drawBars(62, 20, cont.mInvArmor.data.radiationDef); - if(cont.mInvArmor.data.electricDef>0)drawTexturedModalRect(xStart + 61, yStart + 29, 186, 96, 7, 7); - drawBars(62, 29, cont.mInvArmor.data.electricDef); - if(cont.mInvArmor.data.witherDef>0)drawTexturedModalRect(xStart + 61, yStart + 38, 186, 105, 7, 7); - drawBars(62, 38, cont.mInvArmor.data.witherDef); - if(cont.mInvArmor.data.fallDef>0)drawTexturedModalRect(xStart + 61, yStart + 47, 186, 114, 7, 7); - if(cont.mInvArmor.data.thorns>0)drawTexturedModalRect(xStart + 61, yStart + 56, 186, 123, 7, 7); - if(cont.mInvArmor.data.magnet>0)drawTexturedModalRect(xStart + 70, yStart + 56, 186, 78, 7, 7); - } - - - } - - protected void mouseClicked(int mouseX, int mouseY, int mouseBtn) { - int xStart = mouseX-((width - xSize) / 2); - int yStart = mouseY-((height - ySize) / 2); - if(yStart>68&&yStart<77){ - if(xStart>18&&xStart<26){ - tab++; - }else if(xStart>8&&xStart<17){ - tab--; - } - if(tab>2){tab=0;} - if(tab<0){tab=2;} - if(xStart>72&&xStart<112){ - if(xStart>72&&xStart<81&&cont.mInvArmor.data.helmet!=null){cont.mInvArmor.data.helmet.openGui=true;player.closeScreen();} - if(xStart>82&&xStart<91&&cont.mInvArmor.data.chestplate!=null){cont.mInvArmor.data.chestplate.openGui=true;player.closeScreen();} - if(xStart>92&&xStart<101&&cont.mInvArmor.data.leggings!=null){cont.mInvArmor.data.leggings.openGui=true;player.closeScreen();} - if(xStart>102&&xStart<112&&cont.mInvArmor.data.boots!=null){cont.mInvArmor.data.boots.openGui=true;player.closeScreen();} - } - } -// Slot slot = getSlotAtPosition(mouseX, mouseY); -// if (slot != null && slot instanceof SlotFluid && player != null) { -// ItemStack tmp = player.inventory.getItemStack(); -// if (tmp == null) { -// GTExtras.NET.sendToServer(new FluidSync(player.getCommandSenderName(), 0, "null")); -// } -// if (tmp != null && tmp.getItem() instanceof IFluidContainerItem) { -// FluidStack tmp2 = ((IFluidContainerItem) tmp.getItem()).getFluid(tmp); -// if (!slot.getHasStack() && tmp2 != null) { -// slot.putStack(UT.Fluids.display(tmp2, true)); -// GTExtras.NET.sendToServer(new FluidSync(player.getCommandSenderName(), tmp2.amount, UT.Fluids.name(tmp2, false))); -// ItemStack tmp4 = UT.Fluids.getContainerForFilledItem(tmp, true); -// tmp4.stackSize = 1; -// if (tmp.stackSize > 1) { -// player.inventory.addItemStackToInventory(tmp4); -// tmp.stackSize--; -// player.inventory.setItemStack(tmp); -// GTExtras.NET.sendToServer(new FluidSync2(player.getCommandSenderName())); -// } else { -// player.inventory.setItemStack(null); -// player.inventory.addItemStackToInventory(tmp4); -// GTExtras.NET.sendToServer(new FluidSync2(player.getCommandSenderName())); -// } -// -// } else if (slot.getHasStack() && tmp2 != null) { -// Item fluidSlot = slot.getStack().getItem(); -// if (fluidSlot.getDamage(slot.getStack()) == tmp2.getFluidID()) { -// NBTTagCompound nbt = slot.getStack().getTagCompound(); -// if (nbt != null) { -// tmp2.amount += nbt.getLong("mFluidDisplayAmount"); -// ItemStack tmp3 = player.inventory.getItemStack(); -// if (tmp3.stackSize <= 1) { -// tmp3 = null; -// } else { -// tmp3.stackSize--; -// } -// player.inventory.setItemStack(tmp3); -// GTExtras.NET.sendToServer(new FluidSync2(player.getCommandSenderName())); -// slot.putStack(UT.Fluids.display(tmp2, true)); -// GTExtras.NET.sendToServer(new FluidSync(player.getCommandSenderName(), tmp2.amount, UT.Fluids.name(tmp2, false))); -// } -// } -// } -// } -// } - super.mouseClicked(mouseX, mouseY, mouseBtn); - } - - protected void drawTooltip(int x, int y) { - List list = new ArrayList(); - //General tooltips - if(x>=7&&y>=11&&x<=33&&y<=17){ - list.add(GT_LanguageManager.getTranslation("weight") + ": " + cont.mInvArmor.data.weight); - list.add("Total Weight: "+cont.mInvArmor.data.maxWeight); - if (cont.mInvArmor.data.weight > 1000) - list.add("Too Heavy!"); - } - if(x>=56&&y>=11&&x<=112&&y<=17){ - list.add("Stored Energy: "+seperateNumber(cont.mInvArmor.data.charge)+" EU"); - } - if(y>74&&y<83){ - if(x>8&&x<17){ - list.add("Previous Page"); - }else if(x>18&&x<27){ - list.add("Next Page"); - }else if(x>72&&x<80){ - list.add("Helmet"); - }else if(x>81&&x<90){ - list.add("Chestplate"); - }else if(x>91&&x<100){ - list.add("Leggings"); - }else if(x>101&&x<110){ - list.add("Boots"); - } - } - if(tab==0){ - if(x>=93&&y>=36&&x<=110&&y<=71){list.add("Tank Capacity: "+cont.mInvArmor.data.tankCap+"L"); - } - if(x>=7&&y>=22&&x<=70&&y<=28){list.add("Processing Power Provided: "+cont.mInvArmor.data.processingPower); - list.add("Processing Power Used: "+cont.mInvArmor.data.processingPowerUsed); - } - }else if(tab==1){ - - }else{ - if (x >= 28 && x <= 58) { - if (y >= 25 && y <= 32) { - list.add(GT_LanguageManager.getTranslation("phydef") + ": " + (Math.round(cont.mInvArmor.data.physicalDef * 1000) / 10.0) + "%"); - } else if (y >= 33 && y <= 41) { - list.add(GT_LanguageManager.getTranslation("prodef") + ": " + (Math.round(cont.mInvArmor.data.projectileDef * 1000) / 10.0) + "%"); - } else if (y >= 42 && y <= 50) { - list.add(GT_LanguageManager.getTranslation("firedef") + ": " + (Math.round(cont.mInvArmor.data.fireDef * 1000) / 10.0) + "%"); - } else if (y >= 51 && y <= 59) { - list.add(GT_LanguageManager.getTranslation("magdef") + ": " + (Math.round(cont.mInvArmor.data.magicDef * 1000) / 10.0) + "%"); - } else if (y >= 60 && y <= 68) { - list.add(GT_LanguageManager.getTranslation("expdef") + ": " + (Math.round(cont.mInvArmor.data.explosionDef * 1000) / 10.0) + "%"); - } - } else if (x >= 59 && x <= 90) { - if (y >= 25 && y <= 32) { - list.add(GT_LanguageManager.getTranslation("raddef") + ": " + (Math.round(cont.mInvArmor.data.radiationDef * 1000) / 10.0) + "%"); - if(cont.mInvArmor.data.fullRadiationDef){ - list.add("Radiation Immunity");} - } else if (y >= 33 && y <= 41) { - list.add(GT_LanguageManager.getTranslation("eledef") + ": " + (Math.round(cont.mInvArmor.data.electricDef * 1000) / 10.0) + "%"); - if(cont.mInvArmor.data.fullElectricDef){ - list.add("Electric Immunity");} - } else if (y >= 42 && y <= 50) { - list.add(GT_LanguageManager.getTranslation("whidef") + ": " + (Math.round(cont.mInvArmor.data.witherDef * 1000) / 10.0) + "%"); - } else if (y >= 51 && y <= 59) { - if(cont.mInvArmor.data.type!=3){ - list.add("Fall Damage absorbtion"); - list.add("Only for Boots"); - }else{ - list.add(GT_LanguageManager.getTranslation("abs1") + " " + (int) Math.round(cont.mInvArmor.data.fallDef) + GT_LanguageManager.getTranslation("abs2"));} - } else if (y >= 60 && y <= 68) { - if(x<69){ - list.add(GT_LanguageManager.getTranslation("thorns") + ": " + (int) Math.round(cont.mInvArmor.data.thornsSingle) + " Dmg"); - list.add("Total "+GT_LanguageManager.getTranslation("thorns") + ": " + (int) Math.round(cont.mInvArmor.data.thorns) + " Dmg"); - }else{ - list.add(GT_LanguageManager.getTranslation("magnet") + ": " + cont.mInvArmor.data.magnetSingle + " m"); - list.add("Total "+GT_LanguageManager.getTranslation("magnet") + ": " + cont.mInvArmor.data.magnet + " m");} - } - } - } - if (!list.isEmpty()) - drawHoveringText(list, x, y, fontRendererObj); - } - - public void drawBars(int x, int y, float value) { - - int bar = (int) Math.floor(18 * value); - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - xStart += 8; - yStart += 1; - drawTexturedModalRect(xStart + x, yStart + y, 217, 26, bar, 5); - drawTexturedModalRect(xStart+ bar + x, yStart + y, 197+bar, 26, 18-bar, 5); - } - - protected Slot getSlotAtPosition(int p_146975_1_, int p_146975_2_) { - for (int k = 0; k < cont.inventorySlots.size(); ++k) { - Slot slot = (Slot) cont.inventorySlots.get(k); - if (this.isMouseOverSlot(slot, p_146975_1_, p_146975_2_)) { - return slot; - } - } - return null; - } - - private boolean isMouseOverSlot(Slot p_146981_1_, int p_146981_2_, int p_146981_3_) { - return this.func_146978_c(p_146981_1_.xDisplayPosition, p_146981_1_.yDisplayPosition, 16, 16, p_146981_2_, p_146981_3_); - } -} diff --git a/src/main/java/gregtech/common/items/armor/GuiModularArmor.java b/src/main/java/gregtech/common/items/armor/GuiModularArmor.java deleted file mode 100644 index 17fd84b2fb..0000000000 --- a/src/main/java/gregtech/common/items/armor/GuiModularArmor.java +++ /dev/null @@ -1,196 +0,0 @@ -package gregtech.common.items.armor; - -import gregtech.api.util.GT_LanguageManager; - -import java.util.ArrayList; -import java.util.List; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.util.ResourceLocation; - -@SideOnly(Side.CLIENT) -public class GuiModularArmor extends GuiContainer { - ContainerModularArmor cont; - EntityPlayer player; - - public GuiModularArmor(ContainerModularArmor containerModularArmor,EntityPlayer aPlayer) { - super(containerModularArmor); - cont = containerModularArmor; - this.player = aPlayer; - } - - @Override - protected void drawGuiContainerForegroundLayer(int x, int y) { - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - int x2 = x - xStart; - int y2 = y - yStart; - drawTooltip(x2, y2 + 5); - } - - protected void drawTooltip(int x, int y) { - List list = new ArrayList(); - if (x >= 10 && x <= 17) { - if (y >= 20 && y <= 27) { - list.add(GT_LanguageManager.getTranslation("weight") + ": " + cont.mInvArmor.data.weight); - list.add("Total Weight: "+cont.mInvArmor.data.maxWeight); - if (cont.mInvArmor.data.weight > 1000) - list.add("Too Heavy!"); - } else if (y >= 29 && y <= 36) { - list.add(GT_LanguageManager.getTranslation("phydef") + ": " + (Math.round(cont.mInvArmor.data.physicalDef * 1000) / 10.0) + "%"); - } else if (y >= 38 && y <= 45) { - list.add(GT_LanguageManager.getTranslation("prodef") + ": " + (Math.round(cont.mInvArmor.data.projectileDef * 1000) / 10.0) + "%"); - } else if (y >= 47 && y <= 54) { - list.add(GT_LanguageManager.getTranslation("firedef") + ": " + (Math.round(cont.mInvArmor.data.fireDef * 1000) / 10.0) + "%"); - } else if (y >= 56 && y <= 63) { - list.add(GT_LanguageManager.getTranslation("magdef") + ": " + (Math.round(cont.mInvArmor.data.magicDef * 1000) / 10.0) + "%"); - } else if (y >= 65 && y <= 72) { - list.add(GT_LanguageManager.getTranslation("expdef") + ": " + (Math.round(cont.mInvArmor.data.explosionDef * 1000) / 10.0) + "%"); - } - } else if (x >= 59 && x <= 66) { - if (y >= 20 && y <= 27) { - list.add(GT_LanguageManager.getTranslation("thorns") + ": " + (int) Math.round(cont.mInvArmor.data.thornsSingle) + " Dmg"); - list.add("Total "+GT_LanguageManager.getTranslation("thorns") + ": " + (int) Math.round(cont.mInvArmor.data.thorns) + " Dmg"); - } else if (y >= 29 && y <= 36) { - list.add(GT_LanguageManager.getTranslation("magnet") + ": " + cont.mInvArmor.data.magnetSingle + " m"); - list.add("Total "+GT_LanguageManager.getTranslation("magnet") + ": " + cont.mInvArmor.data.magnet + " m"); - } else if (y >= 38 && y <= 45) { - list.add(GT_LanguageManager.getTranslation("raddef") + ": " + (Math.round(cont.mInvArmor.data.radiationDef * 1000) / 10.0) + "%"); - if(cont.mInvArmor.data.fullRadiationDef){ - list.add("Radiation Immunity");} - } else if (y >= 47 && y <= 54) { - list.add(GT_LanguageManager.getTranslation("eledef") + ": " + (Math.round(cont.mInvArmor.data.electricDef * 1000) / 10.0) + "%"); - if(cont.mInvArmor.data.fullElectricDef){ - list.add("Electric Immunity");} - } else if (y >= 56 && y <= 63) { - list.add(GT_LanguageManager.getTranslation("whidef") + ": " + (Math.round(cont.mInvArmor.data.witherDef * 1000) / 10.0) + "%"); - } else if (y >= 65 && y <= 72) { - if(cont.mInvArmor.data.type!=3){ - list.add("Fall Damage absorbtion"); - list.add("Only for Boots"); - }else{ - list.add(GT_LanguageManager.getTranslation("abs1") + " " + (int) Math.round(cont.mInvArmor.data.fallDef) + GT_LanguageManager.getTranslation("abs2"));} - } - } - if (!list.isEmpty()) - drawHoveringText(list, x, y, fontRendererObj); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { - GL11.glColor4f(1F, 1F, 1F, 1F); - this.mc.getTextureManager().bindTexture(new ResourceLocation("gregtech", "textures/gui/armorgui3x3.png")); - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize); - - switch (cont.mInvArmor.data.type) { - case 0: - drawTexturedModalRect(xStart + 124, yStart + 67, 177, 10, 10, 9); - break; - case 1: - drawTexturedModalRect(xStart + 134, yStart + 67, 187, 10, 10, 9); - break; - case 2: - drawTexturedModalRect(xStart + 144, yStart + 67, 197, 10, 10, 9); - break; - case 3: - drawTexturedModalRect(xStart + 154, yStart + 67, 207, 10, 10, 9); - break; - default: - break; - } - - // Weight: 10, 15 =191, 20 - if(cont.mInvArmor.data.weight>0){ - drawTexturedModalRect(xStart + 10, yStart + 15, 191, 20, 7, 7); - } - // Physical Def: 10, 24 =191, 29 - if(cont.mInvArmor.data.physicalDef>0){ - drawTexturedModalRect(xStart + 10, yStart + 24, 191, 29, 7, 7); - } - // Projectile Def: 10, 33 =191, 38 - if(cont.mInvArmor.data.projectileDef>0){ - drawTexturedModalRect(xStart + 10, yStart + 33, 191, 38, 7, 7); - } - // Fire Def: 10, 42 =191, 47 - if(cont.mInvArmor.data.fireDef>0){ - drawTexturedModalRect(xStart + 10, yStart + 42, 191, 47, 7, 7); - } - // Magic Def: 10, 51 =191, 56 - if(cont.mInvArmor.data.magicDef>0){ - drawTexturedModalRect(xStart + 10, yStart + 51, 191, 56, 7, 7); - } - // Explosive Def: 10, 60 =191, 65 - if(cont.mInvArmor.data.explosionDef>0){ - drawTexturedModalRect(xStart + 10, yStart + 60, 191, 65, 7, 7); - } - // Thorns: 59, 15 =198, 20 - if(cont.mInvArmor.data.thorns>0){ - drawTexturedModalRect(xStart + 59, yStart + 15, 198, 20, 7, 7); - } - // Magnet: 59, 24 =198, 29 - if(cont.mInvArmor.data.magnetSingle>0){ - drawTexturedModalRect(xStart + 59, yStart + 24, 198, 29, 7, 7); - } - // Radiation Def: 59, 33 =198, 38 - if(cont.mInvArmor.data.radiationDef>0){ - drawTexturedModalRect(xStart + 59, yStart + 33, 198, 38, 7, 7); - } - // Electric Def: 59, 42 =198, 47 - if(cont.mInvArmor.data.electricDef>0){ - drawTexturedModalRect(xStart + 59, yStart + 42, 198, 47, 7, 7); - } - // Wither Def: 59, 51 =198, 56 - if(cont.mInvArmor.data.witherDef>0){ - drawTexturedModalRect(xStart + 59, yStart + 51, 198, 56, 7, 7); - } - // Fall Reduction: 59, 60 =198, 65 - if(cont.mInvArmor.data.fallDef>0){ - drawTexturedModalRect(xStart + 59, yStart + 60, 198, 65, 7, 7); - } - - drawBars(10, 24, cont.mInvArmor.data.physicalDef); - drawBars(10, 33, cont.mInvArmor.data.projectileDef); - drawBars(10, 42, cont.mInvArmor.data.fireDef); - drawBars(10, 51, cont.mInvArmor.data.magicDef); - drawBars(10, 60, cont.mInvArmor.data.explosionDef); - drawBars(59, 33, cont.mInvArmor.data.radiationDef); - drawBars(59, 42, cont.mInvArmor.data.electricDef); - drawBars(59, 51, cont.mInvArmor.data.witherDef); - } - - public void drawBars(int x, int y, float value) { - - int bar = (int) Math.floor(35 * value); - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - xStart += 8; - yStart += 1; - //drawRect(x + xStart, y + yStart, x + bar + xStart, y + 5 + yStart, 0x8000FF00); - //drawRect(x + bar + xStart, y + yStart, x + 36 + xStart, y + 5 + yStart, 0x80FF0000); - drawTexturedModalRect(xStart + x, yStart + y, 177, 78, bar, 5); - drawTexturedModalRect(xStart+ bar + x, yStart + y, 177, 73, 35-bar, 5); - } - - protected void mouseClicked(int mouseX, int mouseY, int mouseBtn) { - int xStart = mouseX-((width - xSize) / 2); - int yStart = mouseY-((height - ySize) / 2); - if(yStart>67&&yStart<77){ - if(xStart>124&&xStart<163){ - if(xStart>124&&xStart<133&&cont.mInvArmor.data.helmet!=null){cont.mInvArmor.data.helmet.openGui=true;player.closeScreen();} - if(xStart>134&&xStart<143&&cont.mInvArmor.data.chestplate!=null){cont.mInvArmor.data.chestplate.openGui=true;player.closeScreen();} - if(xStart>144&&xStart<153&&cont.mInvArmor.data.leggings!=null){cont.mInvArmor.data.leggings.openGui=true;player.closeScreen();} - if(xStart>154&&xStart<163&&cont.mInvArmor.data.boots!=null){cont.mInvArmor.data.boots.openGui=true;player.closeScreen();} - } - } - super.mouseClicked(mouseX, mouseY, mouseBtn); - } - -} diff --git a/src/main/java/gregtech/common/items/armor/InventoryArmor.java b/src/main/java/gregtech/common/items/armor/InventoryArmor.java deleted file mode 100644 index 0d615ed732..0000000000 --- a/src/main/java/gregtech/common/items/armor/InventoryArmor.java +++ /dev/null @@ -1,235 +0,0 @@ -package gregtech.common.items.armor; - -import gregtech.api.util.GT_Utility; - -import java.util.Random; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.oredict.OreDictionary; - -public class InventoryArmor implements IInventory { - - public ItemStack[] parts; - public ItemStack parent; -// float[] def = new float[32]; - public int maxCharge; - public int charge; - public ArmorData data; - - public InventoryArmor(Class class1, ItemStack currentEquippedItem) { - this.parts = new ItemStack[16]; - this.parent = currentEquippedItem; - setUID(false); - readFromNBT(currentEquippedItem.getTagCompound()); -// for (int i = 0; i < def.length; i++) { -// def[i] = 0.0f; -// } - if(currentEquippedItem.getItem() instanceof ModularArmor_Item){ - data = ((ModularArmor_Item)currentEquippedItem.getItem()).data; - } - - } - - @Override - public int getSizeInventory() { - return this.parts.length; - } - - @Override - public ItemStack getStackInSlot(int i) { - return parts[i]; - } - - @Override - public ItemStack decrStackSize(int i, int j) { - if (parts[i] == null) { - return null; - } - - ItemStack product; - if (parts[i].stackSize <= j) { - product = parts[i]; - parts[i] = null; -// def = ArmorCalculation.calculateArmor(parts); - data.calculateArmor(parts); - return product; - } else { - product = parts[i].splitStack(j); - if (parts[i].stackSize == 0) { - parts[i] = null; - } -// def = ArmorCalculation.calculateArmor(parts); - data.calculateArmor(parts); - return product; - } - } - - @Override - public ItemStack getStackInSlotOnClosing(int slot) { - if (parts[slot] == null) { - return null; - } - ItemStack toReturn = parts[slot]; - parts[slot] = null; - return toReturn; - } - - @Override - public void setInventorySlotContents(int i, ItemStack itemstack) { - parts[i] = itemstack; -// def = ArmorCalculation.calculateArmor(parts); - data.calculateArmor(parts); - } - - @Override - public String getInventoryName() { - return "container.armor"; - } - - @Override - public boolean hasCustomInventoryName() { - return true; - } - - @Override - public int getInventoryStackLimit() { - return 1; - } - - @Override - public void markDirty() { - } - - @Override - public boolean isUseableByPlayer(EntityPlayer p_70300_1_) { - return true; - } - - @Override - public void openInventory() { - } - - @Override - public void closeInventory() { - } - - @Override - public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { - return true; - } - - public void onGuiSaved(EntityPlayer entityplayer) { - parent = findParentInInventory(entityplayer); - if (parent != null) { - save(); - } - } - - public void save() { - NBTTagCompound nbt = parent.getTagCompound(); - if (nbt == null) { - nbt = new NBTTagCompound(); - } - writeToNBT(nbt); - ModularArmor_Item tmp = (ModularArmor_Item) parent.getItem(); - tmp.data.calculateArmor(parts); - parent.setTagCompound(nbt); - } - - public void writeToNBT(NBTTagCompound nbt) { - NBTTagList nbttaglist = new NBTTagList(); - for (int i = 0; i < parts.length; i++) { - if (parts[i] != null) { - NBTTagCompound nbttagcompound1 = new NBTTagCompound(); - nbttagcompound1.setByte("Slot", (byte) i); - parts[i].writeToNBT(nbttagcompound1); - nbttaglist.appendTag(nbttagcompound1); - } - } - nbt.setTag("Items", nbttaglist); - } - - public ItemStack findParentInInventory(EntityPlayer player) { - for (int i = 0; i < player.inventory.getSizeInventory(); i++) { - ItemStack stack = player.inventory.getStackInSlot(i); - if (isIdenticalItem(stack, parent)) { - return stack; - } - } - return parent; - } - - public static boolean isIdenticalItem(ItemStack lhs, ItemStack rhs) { - if (lhs == null || rhs == null) { - return false; - } - - if (lhs.getItem() != rhs.getItem()) { - return false; - } - - if (lhs.getItemDamage() != OreDictionary.WILDCARD_VALUE) { - if (lhs.getItemDamage() != rhs.getItemDamage()) { - return false; - } - } - - return ItemStack.areItemStackTagsEqual(lhs, rhs); - } - - public void readFromNBT(NBTTagCompound nbt) { - if (nbt == null) { - return; - } - if (nbt.hasKey("Items")) { - NBTTagList nbttaglist = nbt.getTagList("Items", 10); - parts = new ItemStack[getSizeInventory()]; - for (int i = 0; i < nbttaglist.tagCount(); i++) { - NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); - byte byte0 = nbttagcompound1.getByte("Slot"); - if (byte0 >= 0 && byte0 < parts.length) { - parts[byte0] = ItemStack.loadItemStackFromNBT(nbttagcompound1); - //parts[12]= UT.Fluids.display(UT.Fluids.water(1234), true); - } - } - } - - } - - protected void setUID(boolean override) { - if (parent.getTagCompound() == null) { - parent.setTagCompound(new NBTTagCompound()); - } - NBTTagCompound nbt = parent.getTagCompound(); - if (override || !nbt.hasKey("UID")) { - nbt.setInteger("UID", new Random().nextInt()); - } - } - - public static int getOccupiedSlotCount(ItemStack itemStack) { - NBTTagCompound nbt = itemStack.getTagCompound(); - if (nbt == null) { - return 0; - } - - int count = 0; - if (nbt.hasKey("Items")) { - NBTTagList nbttaglist = nbt.getTagList("Items", 10); - for (int i = 0; i < nbttaglist.tagCount(); i++) { - NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); - ItemStack itemStack1 = ItemStack.loadItemStackFromNBT(nbttagcompound1); - if (itemStack1 != null && itemStack1.stackSize > 0) { - count++; - } - } - } - return count; - } - -} diff --git a/src/main/java/gregtech/common/items/armor/ModularArmor_Item.java b/src/main/java/gregtech/common/items/armor/ModularArmor_Item.java index c305278543..6327a8c8ba 100644 --- a/src/main/java/gregtech/common/items/armor/ModularArmor_Item.java +++ b/src/main/java/gregtech/common/items/armor/ModularArmor_Item.java @@ -2,6 +2,10 @@ package gregtech.common.items.armor; import gregtech.api.damagesources.GT_DamageSources; import gregtech.api.enums.GT_Values; +import gregtech.common.items.armor.components.StatType; +import gregtech.common.items.armor.gui.ContainerBasicArmor; +import gregtech.common.items.armor.gui.ContainerModularArmor; +import gregtech.common.items.armor.gui.InventoryArmor; import ic2.core.IC2; import java.util.ArrayList; @@ -86,24 +90,24 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg if (player != null && armor != null && source != null) { double tmp = 0.0d; if (source.isMagicDamage()) { - tmp = data.magicDef; + tmp = data.mStat.get(StatType.MAGICDEFENCE); } else if (source == GT_DamageSources.getRadioactiveDamage()) { - tmp = data.radiationDef; + tmp = data.mStat.get(StatType.RADIATIONDEFENCE); } else if (source == GT_DamageSources.getElectricDamage()) { - tmp = data.electricDef; + tmp = data.mStat.get(StatType.ELECTRICALDEFENCE); } else if (source == DamageSource.wither) { - tmp = data.witherDef; + tmp = data.mStat.get(StatType.WITHERDEFENCE); } else if (source.isFireDamage() || source == GT_DamageSources.getHeatDamage()) { - tmp = data.fireDef; + tmp = data.mStat.get(StatType.FIREDEFENCE); } else if (source.isExplosion()) { - tmp = data.explosionDef; + tmp = data.mStat.get(StatType.EXPLOSIONDEFENCE); } else if (source.isProjectile()) { - tmp = data.projectileDef; + tmp = data.mStat.get(StatType.PROJECTILEDEFENCE); } else { - tmp = data.physicalDef; + tmp = data.mStat.get(StatType.PHYSICALDEFENCE); } - if (data.thorns > 0.1d && source != DamageSource.fall && source.getSourceOfDamage() != null) { - source.getSourceOfDamage().attackEntityFrom(new DamageSource("Thorns"), data.thorns); + if (data.mStat.get(StatType.THORNS) > 0.1d && source != DamageSource.fall && source.getSourceOfDamage() != null) { + source.getSourceOfDamage().attackEntityFrom(new DamageSource("Thorns"), data.mStat.get(StatType.THORNS)); } // fallDamage @@ -111,12 +115,12 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg int fallDef = 0; ItemStack stack = player.getEquipmentInSlot(1); if (stack != null && stack.getItem() instanceof ModularArmor_Item) { - fallDef = (int) data.boots.fallDef; + fallDef = Math.round(data.boots.mStat.get(StatType.FALLDEFENCE)); } tmp = 1.0d - (fallDef > damage ? 0.0d : (1.0d - tmp) * 0.5d); } if (tmp == 0.0d) { - tmp = data.physicalDef; + tmp = data.mStat.get(StatType.PHYSICALDEFENCE); } if (openGuiNr == 2) { tmp = 1.0f - ((1.0f - tmp) / 2.0f); @@ -133,7 +137,7 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg if (data == null) { data = fillArmorData(player, armor); } - int tmp = (int) -Math.floor(-(data.getBaseAbsorptionRatio() * 20 * data.physicalDef)); + int tmp = (int) -Math.floor(-(data.getBaseAbsorptionRatio() * 20 * data.mStat.get(StatType.PHYSICALDEFENCE))); return tmp; } @@ -179,10 +183,10 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg if (FMLCommonHandler.instance().getEffectiveSide().isServer() && event.entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.entity; ItemStack armor = player.inventory.armorInventory[0]; - if (data != null && event != null && data.type == 3 && data.charge >= data.pistonEUusage && event.distance - 3 <= data.fallDef) { + if (data != null && event != null && data.type == 3 && data.charge >= data.mStat.get(StatType.PISTONEUUSAGE) && event.distance - 3 <= data.mStat.get(StatType.FALLDEFENCE)) { event.setCanceled(true); - } else if (data != null && event != null && data.type == 3 && data.charge >= data.pistonEUusage) { - event.distance -= data.fallDef; + } else if (data != null && event != null && data.type == 3 && data.charge >= data.mStat.get(StatType.PISTONEUUSAGE)) { + event.distance -= data.mStat.get(StatType.FALLDEFENCE); } } } @@ -226,14 +230,14 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg } } // Fill Air Tank - if (data.tooltipUpdate == 40 && data.processingPower > data.processingPowerUsed && data.type == 0 && data.fluid != null - && data.fluid.getUnlocalizedName().equals("oxygen") && data.fluid.amount < data.tankCap && data.charge > data.electrolyzerEUusage) { - data.charge -= data.electrolyzerEUusage; + if (data.tooltipUpdate == 40 && data.mStat.get(StatType.PROCESSINGPOWER) > data.mStat.get(StatType.PROCESSINGPOWERUSED) && data.type == 0 && data.fluid != null + && data.fluid.getUnlocalizedName().equals("oxygen") && data.fluid.amount < data.mStat.get(StatType.TANKCAP) && data.charge > data.mStat.get(StatType.ELECTROLYZEREUUSAGE)) { + data.charge -= data.mStat.get(StatType.ELECTROLYZEREUUSAGE); ItemStack stack = aPlayer.getEquipmentInSlot(4); if (stack != null && stack.getItem() instanceof ModularArmor_Item) { ModularArmor_Item tmp = (ModularArmor_Item) stack.getItem(); ContainerModularArmor tmp2 = new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, stack)); - ArmorCalculation.useFluid(tmp2.mInvArmor.parts, -data.electrolyzerProd); + ArmorCalculation.useFluid(tmp2.mInvArmor.parts, -Math.round(data.mStat.get(StatType.ELECTROLYZERPROD))); } } @@ -263,7 +267,7 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg // Night Vision if (timer >= 200) { timer = 0; - if (data.processingPower > data.processingPowerUsed && data.helmet != null && data.helmet.nightVision && data.charge > 3) { + if (data.mStat.get(StatType.PROCESSINGPOWER) > data.mStat.get(StatType.PROCESSINGPOWERUSED) && data.helmet != null && data.helmet.mBStat.get(StatType.NIGHTVISION) && data.charge > 3) { aPlayer.addPotionEffect(new PotionEffect(Potion.nightVision.getId(), 500, -3)); data.charge -= 4; } else { @@ -281,12 +285,13 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg } // Item Magnet - if (data.magnet > 1) { + if (data.mStat.get(StatType.MAGNET) > 1) { double x = aPlayer.posX; double y = aPlayer.posY - (aPlayer.worldObj.isRemote ? 1.62 : 0) + 0.75; double z = aPlayer.posZ; + int tMagnet = Math.round(data.mStat.get(StatType.MAGNET)); List items = aPlayer.worldObj.getEntitiesWithinAABB(EntityItem.class, - AxisAlignedBB.getBoundingBox(x - data.magnet, y - data.magnet, z - data.magnet, x + data.magnet, y + data.magnet, z + data.magnet)); + AxisAlignedBB.getBoundingBox(x - tMagnet, y - tMagnet, z - tMagnet, x + tMagnet, y + tMagnet, z + tMagnet)); for (EntityItem item : items) { ItemStack stack = item.getEntityItem(); if (!item.isDead && stack != null) { @@ -297,21 +302,21 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg // Weight limit calcuation double motorSpeed = 0; if (data.leggings != null) { - motorSpeed = data.leggings.motorPower; + motorSpeed = data.leggings.mStat.get(StatType.MOTPRPOWER); } if (data.maxWeight > 4000) { - if (data.leggings != null && data.leggings.charge > data.leggings.motorEUusage) { + if (data.leggings != null && data.leggings.charge > data.leggings.mStat.get(StatType.MOTOREUUSAGE)) { motorSpeed -= data.maxWeight - 4000; - data.leggings.charge -= (data.leggings.motorEUusage / 100); + data.leggings.charge -= (data.leggings.mStat.get(StatType.MOTOREUUSAGE) / 100); } else { aPlayer.motionX *= (4000.0d / data.maxWeight); aPlayer.motionZ *= (4000.0d / data.maxWeight); } } - if (data.leggings != null && data.leggings.charge > data.leggings.motorEUusage && data.processingPower > data.processingPowerUsed && motorSpeed > 0 + if (data.leggings != null && data.leggings.charge > data.leggings.mStat.get(StatType.MOTOREUUSAGE) && data.mStat.get(StatType.PROCESSINGPOWER) > data.mStat.get(StatType.PROCESSINGPOWERUSED) && motorSpeed > 0 && aPlayer.isSprinting() && jumpticks > 0 && (aPlayer.onGround && Math.abs(aPlayer.motionX) + Math.abs(aPlayer.motionZ) > 0.10000000149011612D)) { - data.leggings.charge -= data.leggings.motorEUusage; + data.leggings.charge -= data.leggings.mStat.get(StatType.MOTOREUUSAGE); motorSpeed = Math.sqrt(motorSpeed) / 3; float var7 = (float) (0.02f * motorSpeed); @@ -328,8 +333,8 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg } // jump+step up assist - if (data.processingPower > data.processingPowerUsed && data.leggings != null) { - double stepup = data.leggings.pistonJumpboost; + if (data.mStat.get(StatType.PROCESSINGPOWER) > data.mStat.get(StatType.PROCESSINGPOWERUSED) && data.leggings != null) { + double stepup = data.leggings.mStat.get(StatType.PISTONJUMPBOOST); if (stepup > 1) { aPlayer.stepHeight = 1.0f; } @@ -349,7 +354,7 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg List effects = new LinkedList(aPlayer.getActivePotionEffects()); for (PotionEffect effect : effects) { int id = effect.getPotionID(); - if (id == 24 && data.fullRadiationDef) { + if (id == 24 && data.mBStat.get(StatType.FULLRADIATIONARMOR)) { aPlayer.removePotionEffect(id); } } @@ -415,7 +420,7 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg if (data == null) { data = fillArmorData((EntityPlayer) aPlayer, aStack); } - return data.thaumicGoggles && data.armorTier > 0 && data.charge > 0; + return data.mBStat.get(StatType.THAUMICGOGGLES) && data.armorTier > 0 && data.charge > 0; } @Override @@ -423,7 +428,7 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg if (data == null) { data = fillArmorData((EntityPlayer) aPlayer, aStack); } - return data.thaumicGoggles && data.armorTier > 0 && data.charge > 0; + return data.mBStat.get(StatType.THAUMICGOGGLES) && data.armorTier > 0 && data.charge > 0; } public ArmorData fillArmorData(EntityPlayer player, ItemStack stack) { diff --git a/src/main/java/gregtech/common/items/armor/SlotFluid.java b/src/main/java/gregtech/common/items/armor/SlotFluid.java deleted file mode 100644 index 9636cb4549..0000000000 --- a/src/main/java/gregtech/common/items/armor/SlotFluid.java +++ /dev/null @@ -1,33 +0,0 @@ -package gregtech.common.items.armor; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import scala.reflect.internal.Trees.This; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fluids.FluidRegistry; - -public class SlotFluid extends Slot{ - - public SlotFluid(IInventory inventory, int slot_index, int x, int y) { - super(inventory, slot_index, x, y); - } - - @Override - public boolean canTakeStack(EntityPlayer p_82869_1_) - { - return false; - } - - @Override - public boolean isItemValid(ItemStack p_75214_1_) - { - return false; - } - -} diff --git a/src/main/java/gregtech/common/items/armor/SlotLocked.java b/src/main/java/gregtech/common/items/armor/SlotLocked.java deleted file mode 100644 index b54d8d1027..0000000000 --- a/src/main/java/gregtech/common/items/armor/SlotLocked.java +++ /dev/null @@ -1,33 +0,0 @@ -package gregtech.common.items.armor; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - - -public class SlotLocked extends Slot{ - - public SlotLocked(IInventory par1iInventory, int par2, int par3, int par4) { - super(par1iInventory, par2, par3, par4); - } - @Override - public void onPickupFromSlot(EntityPlayer player, ItemStack itemStack) { - } - @Override - public boolean isItemValid(ItemStack par1ItemStack) { - return false; - } - @Override - public boolean getHasStack() { - return false; - } - @Override - public ItemStack decrStackSize(int i) { - return null; - } - - @Override - public boolean canTakeStack(EntityPlayer stack) { - return false;} - -} diff --git a/src/main/java/gregtech/common/items/armor/Values.java b/src/main/java/gregtech/common/items/armor/Values.java deleted file mode 100644 index cad53d645f..0000000000 --- a/src/main/java/gregtech/common/items/armor/Values.java +++ /dev/null @@ -1,125 +0,0 @@ -package gregtech.common.items.armor; - -import java.util.HashMap; -import java.util.Map; - -import gregtech.api.enums.Materials; - -public class Values { - public static Values INSTANCE; - public static final Map MATERIAL_MAP = new HashMap(); - - public int weight; - public float physicalDef; - public float projectileDef; - public float fireDef; - public float magicDef; - public float explosionDef; - - public Values(Materials material, int weight, float physicalDef, float projectileDef, float fireDef, float magicDef, float explosionDef) { - this.weight = weight; - this.physicalDef = physicalDef; - this.projectileDef = projectileDef; - this.fireDef = fireDef; - this.magicDef = magicDef; - this.explosionDef = explosionDef; - } - - public Values() { - INSTANCE = this; - MATERIAL_MAP.put(Materials._NULL, new Values(Materials._NULL, 0, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f)); - MATERIAL_MAP.put(Materials.Rubber, new Values(Materials.Rubber, 60, 0.06f, 0.06f, 0.02f, 0.1f, 0.1f)); - MATERIAL_MAP.put(Materials.Wood, new Values(Materials.Wood, 80, 0.08f, 0.09f, 0.02f, 0.08f, 0.08f)); - MATERIAL_MAP.put(Materials.Brass, new Values(Materials.Brass, 140, 0.12f, 0.12f, 0.10f, 0.10f, 0.12f)); - MATERIAL_MAP.put(Materials.Copper, new Values(Materials.Copper, 140, 0.11f, 0.11f, 0.10f, 0.10f, 0.11f)); - MATERIAL_MAP.put(Materials.Lead, new Values(Materials.Lead, 280, 0.05f, 0.05f, 0.05f, 0.05f, 0.05f)); - MATERIAL_MAP.put(Materials.Plastic, new Values(Materials.Plastic, 60, 0.10f, 0.10f, 0.02f, 0.02f, 0.10f)); - MATERIAL_MAP.put(Materials.Aluminium, new Values(Materials.Aluminium, 120, 0.14f, 0.14f, 0.12f, 0.12f, 0.14f)); - MATERIAL_MAP.put(Materials.AstralSilver, new Values(Materials.AstralSilver, 180, 0.10f, 0.10f, 0.10f, 0.18f, 0.10f)); - MATERIAL_MAP.put(Materials.BismuthBronze, new Values(Materials.BismuthBronze, 160, 0.12f, 0.12f, 0.10f, 0.10f, 0.12f)); - MATERIAL_MAP.put(Materials.BlackBronze, new Values(Materials.BlackBronze, 160, 0.13f, 0.13f, 0.10f, 0.10f, 0.13f)); - MATERIAL_MAP.put(Materials.BlackSteel, new Values(Materials.BlackSteel, 200, 0.19f, 0.19f, 0.17f, 0.17f, 0.19f)); - MATERIAL_MAP.put(Materials.BlueSteel, new Values(Materials.BlueSteel, 200, 0.21f, 0.21f, 0.19f, 0.19f, 0.21f)); - MATERIAL_MAP.put(Materials.Bronze, new Values(Materials.Bronze, 160, 0.13f, 0.13f, 0.12f, 0.12f, 0.13f)); - MATERIAL_MAP.put(Materials.CobaltBrass, new Values(Materials.CobaltBrass, 180, 0.15f, 0.15f, 0.14f, 0.14f, 0.15f)); - MATERIAL_MAP.put(Materials.DamascusSteel, new Values(Materials.DamascusSteel, 200, 0.22f, 0.22f, 0.20f, 0.20f, 0.22f)); - MATERIAL_MAP.put(Materials.Electrum, new Values(Materials.Electrum, 250, 0.11f, 0.11f, 0.10f, 0.10f, 0.11f)); - MATERIAL_MAP.put(Materials.Emerald, new Values(Materials.Emerald, 160, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f)); - MATERIAL_MAP.put(Materials.Gold, new Values(Materials.Gold, 300, 0.09f, 0.09f, 0.05f, 0.25f, 0.09f)); - MATERIAL_MAP.put(Materials.GreenSapphire, new Values(Materials.GreenSapphire, 160, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f)); - MATERIAL_MAP.put(Materials.Invar, new Values(Materials.Invar, 190, 0.10f, 0.10f, 0.22f, 0.22f, 0.10f)); - MATERIAL_MAP.put(Materials.Iron, new Values(Materials.Iron, 200, 0.12f, 0.12f, 0.10f, 0.10f, 0.12f)); - MATERIAL_MAP.put(Materials.IronWood, new Values(Materials.IronWood, 150, 0.17f, 0.17f, 0.02f, 0.02f, 0.17f)); - MATERIAL_MAP.put(Materials.Magnalium, new Values(Materials.Magnalium, 120, 0.15f, 0.15f, 0.17f, 0.17f, 0.15f)); - MATERIAL_MAP.put(Materials.NeodymiumMagnetic, new Values(Materials.NeodymiumMagnetic, 220, 0.14f, 0.14f, 0.14f, 0.14f, 0.14f)); - MATERIAL_MAP.put(Materials.Manganese, new Values(Materials.Manganese, 180, 0.15f, 0.15f, 0.14f, 0.14f, 0.15f)); - MATERIAL_MAP.put(Materials.MeteoricIron, new Values(Materials.MeteoricIron, 200, 0.18f, 0.18f, 0.16f, 0.16f, 0.18f)); - MATERIAL_MAP.put(Materials.MeteoricSteel, new Values(Materials.MeteoricSteel, 200, 0.21f, 0.21f, 0.19f, 0.19f, 0.21f)); - MATERIAL_MAP.put(Materials.Molybdenum, new Values(Materials.Molybdenum, 140, 0.14f, 0.14f, 0.14f, 0.14f, 0.14f)); - MATERIAL_MAP.put(Materials.Nickel, new Values(Materials.Nickel, 180, 0.12f, 0.12f, 0.15f, 0.15f, 0.12f)); - MATERIAL_MAP.put(Materials.Olivine, new Values(Materials.Olivine, 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f)); - MATERIAL_MAP.put(Materials.Opal, new Values(Materials.Opal, 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f)); - MATERIAL_MAP.put(Materials.Palladium, new Values(Materials.Palladium, 280, 0.14f, 0.14f, 0.12f, 0.12f, 0.14f)); - MATERIAL_MAP.put(Materials.Platinum, new Values(Materials.Platinum, 290, 0.15f, 0.15f, 0.13f, 0.13f, 0.15f)); - MATERIAL_MAP.put(Materials.GarnetRed, new Values(Materials.GarnetRed, 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f)); - MATERIAL_MAP.put(Materials.RedSteel, new Values(Materials.RedSteel, 200, 0.20f, 0.20f, 0.18f, 0.18f, 0.20f)); - MATERIAL_MAP.put(Materials.RoseGold, new Values(Materials.RoseGold, 240, 0.10f, 0.10f, 0.08f, 0.18f, 0.10f)); - MATERIAL_MAP.put(Materials.Ruby, new Values(Materials.Ruby, 180, 0.10f, 0.10f, 0.20f, 0.20f, 0.10f)); - MATERIAL_MAP.put(Materials.Sapphire, new Values(Materials.Sapphire, 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f)); - MATERIAL_MAP.put(Materials.Silver, new Values(Materials.Silver, 220, 0.11f, 0.11f, 0.07f, 0.24f, 0.11f)); - MATERIAL_MAP.put(Materials.StainlessSteel, new Values(Materials.StainlessSteel, 200, 0.16f, 0.16f, 0.21f, 0.21f, 0.16f)); - MATERIAL_MAP.put(Materials.Steel, new Values(Materials.Steel, 200, 0.18f, 0.18f, 0.16f, 0.16f, 0.18f)); - MATERIAL_MAP.put(Materials.SterlingSilver, new Values(Materials.SterlingSilver, 210, 0.15f, 0.15f, 0.13f, 0.13f, 0.15f)); - MATERIAL_MAP.put(Materials.Tanzanite, new Values(Materials.Tanzanite, 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f)); - MATERIAL_MAP.put(Materials.Thorium, new Values(Materials.Thorium, 280, 0.13f, 0.13f, 0.16f, 0.16f, 0.13f)); - MATERIAL_MAP.put(Materials.WroughtIron, new Values(Materials.WroughtIron, 200, 0.14f, 0.14f, 0.12f, 0.12f, 0.14f)); - MATERIAL_MAP.put(Materials.GarnetYellow, new Values(Materials.GarnetYellow, 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f)); - MATERIAL_MAP.put(Materials.Carbon, new Values(Materials.Carbon, 60, 0.06f, 0.23f, 0.05f, 0.05f, 0.06f)); - MATERIAL_MAP.put(Materials.InfusedAir,new Values(Materials.InfusedAir, 10, 0.10f, 0.10f, 0.10f,0.10f, 0.10f)); - MATERIAL_MAP.put(Materials.Amethyst, new Values(Materials.Amethyst, 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f)); - MATERIAL_MAP.put(Materials.InfusedWater,new Values(Materials.InfusedWater, 150, 0.10f, 0.10f,0.20f, 0.20f, 0.10f)); - MATERIAL_MAP.put(Materials.BlueTopaz, new Values(Materials.BlueTopaz, 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f)); - MATERIAL_MAP.put(Materials.Chrome, new Values(Materials.Chrome, 200, 0.12f, 0.12f, 0.21f, 0.21f, 0.12f)); - MATERIAL_MAP.put(Materials.Cobalt, new Values(Materials.Cobalt, 220, 0.16f, 0.16f, 0.14f, 0.14f, 0.16f)); - MATERIAL_MAP.put(Materials.DarkIron, new Values(Materials.DarkIron, 200, 0.21f, 0.21f, 0.19f, 0.19f, 0.21f)); - MATERIAL_MAP.put(Materials.Diamond, new Values(Materials.Diamond, 200, 0.20f, 0.20f, 0.22f, 0.22f, 0.20f)); - MATERIAL_MAP.put(Materials.Enderium, new Values(Materials.Enderium, 250, 0.22f, 0.22f, 0.21f, 0.21f, 0.22f)); - MATERIAL_MAP.put(Materials.ElectrumFlux,new Values(Materials.ElectrumFlux, 180, 0.19f, 0.19f, 0.16f, 0.16f, 0.19f)); - MATERIAL_MAP.put(Materials.Force, new Values(Materials.Force, 180, 0.10f, 0.10f, 0.20f, 0.20f, 0.10f)); - MATERIAL_MAP.put(Materials.HSLA, new Values(Materials.HSLA, 200, 0.21f, 0.21f, 0.17f, 0.17f, 0.21f)); - MATERIAL_MAP.put(Materials.InfusedFire,new Values(Materials.InfusedFire, 150, 0.12f, 0.10f, 0.30f, 0.30f, 0.12f)); - MATERIAL_MAP.put(Materials.InfusedGold, new Values(Materials.InfusedGold, 300, 0.15f, 0.15f, 0.05f, 0.05f, 0.15f)); - MATERIAL_MAP.put(Materials.Mithril, new Values(Materials.Mithril, 200, 0.25f, 0.25f, 0.10f, 0.30f, 0.25f)); - MATERIAL_MAP.put(Materials.InfusedOrder,new Values(Materials.InfusedOrder, 150, 0.18f, 0.22f,0.22f, 0.25f, 0.22f)); - MATERIAL_MAP.put(Materials.Steeleaf, new Values(Materials.Steeleaf, 120, 0.16f, 0.16f, 0.06f, 0.06f, 0.16f)); - MATERIAL_MAP.put(Materials.InfusedEarth,new Values(Materials.InfusedEarth, 350, 0.30f, 0.30f,0.30f, 0.30f, 0.30f)); - MATERIAL_MAP.put(Materials.Thaumium, new Values(Materials.Thaumium, 200, 0.18f, 0.19f, 0.20f, 0.30f, 0.18f)); - MATERIAL_MAP.put(Materials.Titanium, new Values(Materials.Titanium, 140, 0.20f, 0.20f, 0.18f, 0.18f, 0.20f)); - MATERIAL_MAP.put(Materials.Tungsten, new Values(Materials.Tungsten, 270, 0.27f, 0.26f, 0.23f, 0.26f, 0.26f)); - MATERIAL_MAP.put(Materials.Topaz, new Values(Materials.Topaz, 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f)); - MATERIAL_MAP.put(Materials.Ultimet, new Values(Materials.Ultimet, 180, 0.21f, 0.21f, 0.19f, 0.19f, 0.21f)); - MATERIAL_MAP.put(Materials.Uranium, new Values(Materials.Uranium, 290, 0.27f, 0.23f, 0.20f, 0.15f, 0.21f)); - MATERIAL_MAP.put(Materials.Vinteum, new Values(Materials.Vinteum, 180, 0.10f, 0.12f, 0.14f, 0.28f, 0.12f)); - MATERIAL_MAP.put(Materials.Duranium, new Values(Materials.Duranium, 140, 0.24f, 0.24f, 0.24f, 0.24f, 0.24f)); - MATERIAL_MAP.put(Materials.Iridium, new Values(Materials.Iridium, 220, 0.24f, 0.24f, 0.22f, 0.22f, 0.24f)); - MATERIAL_MAP.put(Materials.Osmiridium, new Values(Materials.Osmiridium, 240, 0.18f, 0.18f, 0.16f, 0.16f, 0.18f)); - MATERIAL_MAP.put(Materials.Osmium, new Values(Materials.Osmium, 250, 0.12f, 0.12f, 0.10f, 0.10f, 0.12f)); - MATERIAL_MAP.put(Materials.Naquadah, new Values(Materials.Naquadah, 250, 0.27f, 0.27f, 0.25f, 0.25f, 0.27f)); - MATERIAL_MAP.put(Materials.NetherStar, new Values(Materials.NetherStar, 140, 0.22f, 0.22f, 0.24f, 0.24f, 0.22f)); - MATERIAL_MAP.put(Materials.InfusedEntropy,new Values(Materials.InfusedEntropy, 150, 0.10f, 0.10f,0.10f, 0.10f, 0.10f)); - MATERIAL_MAP.put(Materials.Tritanium, new Values(Materials.Tritanium, 140, 0.26f, 0.26f, 0.26f, 0.26f, 0.26f)); - MATERIAL_MAP.put(Materials.TungstenSteel, new Values(Materials.TungstenSteel, 270, 0.30f, 0.28f, 0.25f, 0.28f, 0.30f)); - MATERIAL_MAP.put(Materials.Adamantium, new Values(Materials.Adamantium, 200, 0.28f, 0.28f, 0.26f, 0.30f, 0.30f)); - MATERIAL_MAP.put(Materials.NaquadahAlloy, new Values(Materials.NaquadahAlloy, 300, 0.33f, 0.33f, 0.33f, 0.33f, 0.33f)); - MATERIAL_MAP.put(Materials.Neutronium, new Values(Materials.Neutronium, 600, 0.50f, 0.50f, 0.50f, 0.50f, 0.50f)); - } - - public Values getValues(Materials mat) { - Values tmp = MATERIAL_MAP.get(mat); - - if (tmp == null) { - return MATERIAL_MAP.get(Materials._NULL); - } - return tmp; - } -} diff --git a/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java b/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java new file mode 100644 index 0000000000..caf33a3783 --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java @@ -0,0 +1,57 @@ +package gregtech.common.items.armor.components; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import gregtech.api.objects.ItemData; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import gregtech.common.items.armor.ArmorData; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public abstract class ArmorComponent implements IArmorComponent { + public ItemStack mStack; + public String mOreDict; + public static Map mOreDicts = new HashMap(); + public static Map mStacks = new HashMap(); + public Map mStat = new HashMap(); + public Map mBStat = new HashMap(); + + public ArmorComponent(String aOreDict, boolean aElectric, float aWeight){ + mOreDict = aOreDict; + mBStat.put(StatType.ELECTRIC, aElectric); + mOreDicts.put(aOreDict, this); + for(ItemStack tStack : OreDictionary.getOres(aOreDict))if(tStack!=null)mStacks.put(tStack.getUnlocalizedName(), this); + mStat.put(StatType.WEIGHT, aWeight); + } + + public ArmorComponent(ItemStack aStack, boolean aElectric, float aWeight){ + mStack = aStack; + mBStat.put(StatType.ELECTRIC, aElectric); + mStacks.put(aStack.getUnlocalizedName(), this); + mStat.put(StatType.WEIGHT, aWeight); + } + + @Override + public boolean isArmorComponent(ItemStack aStack) { + if(mStack!=null && GT_Utility.areStacksEqual(mStack, aStack, true)){return true;} + if(mOreDict!=null){ + for(ItemStack tStack : OreDictionary.getOres(mOreDict)) + if(GT_Utility.areStacksEqual(tStack, aStack, true))return true;} + return false; + } + + public void addVal(StatType aType, ArmorData aArmorData){ + float tArmorDef = 0.0f; + if(aArmorData.mStat.containsKey(aType)){ + tArmorDef = aArmorData.mStat.get(aType); + aArmorData.mStat.remove(aType);} + aArmorData.mStat.put(aType, tArmorDef + mStat.get(aType)); + } + + public abstract void calculateArmor(ArmorData aArmorData); + +} diff --git a/src/main/java/gregtech/common/items/armor/components/ArmorComponentBattery.java b/src/main/java/gregtech/common/items/armor/components/ArmorComponentBattery.java new file mode 100644 index 0000000000..52ec405e98 --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/components/ArmorComponentBattery.java @@ -0,0 +1,19 @@ +package gregtech.common.items.armor.components; + +import gregtech.common.items.armor.ArmorData; +import net.minecraft.item.ItemStack; + +public class ArmorComponentBattery extends ArmorComponent{ + public ArmorComponentBattery(ItemStack aStack, boolean aElectric, float aWeight, float aBatteryCapacity) { + super(aStack, aElectric, aWeight); + mStat.put(StatType.WEIGHT, aWeight); + mStat.put(StatType.BATTERYCAPACITY, aBatteryCapacity); + } + + @Override + public void calculateArmor(ArmorData aArmorData) { + addVal(StatType.WEIGHT, aArmorData); + addVal(StatType.BATTERYCAPACITY, aArmorData); + } + +} diff --git a/src/main/java/gregtech/common/items/armor/components/ArmorComponentFunction.java b/src/main/java/gregtech/common/items/armor/components/ArmorComponentFunction.java new file mode 100644 index 0000000000..99960d78f4 --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/components/ArmorComponentFunction.java @@ -0,0 +1,22 @@ +package gregtech.common.items.armor.components; + +import gregtech.common.items.armor.ArmorData; +import net.minecraft.item.ItemStack; + +public class ArmorComponentFunction extends ArmorComponent{ + StatType mType; + public ArmorComponentFunction(ItemStack aStack, boolean aElectric, float aWeight, StatType aType, float aProcessingUsed) { + super(aStack, aElectric, aWeight); + mType = aType; + mStat.put(StatType.WEIGHT, aWeight); + mStat.put(StatType.PROCESSINGPOWERUSED, aProcessingUsed); + } + + @Override + public void calculateArmor(ArmorData aArmorData) { + addVal(StatType.WEIGHT, aArmorData); + addVal(StatType.PROCESSINGPOWERUSED, aArmorData); + if(!aArmorData.mBStat.containsKey(mType))aArmorData.mBStat.put(mType, true); + } + +} diff --git a/src/main/java/gregtech/common/items/armor/components/ArmorElectricComponent.java b/src/main/java/gregtech/common/items/armor/components/ArmorElectricComponent.java new file mode 100644 index 0000000000..a6cfb68f5b --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/components/ArmorElectricComponent.java @@ -0,0 +1,30 @@ +package gregtech.common.items.armor.components; + +import gregtech.common.items.armor.ArmorData; +import net.minecraft.item.ItemStack; + +public class ArmorElectricComponent extends ArmorComponent{ + StatType mType1; + StatType mType2; + StatType mType3; + + public ArmorElectricComponent(ItemStack aStack, float aWeight, StatType aType1, float aValue1, StatType aType2, float aValue2, StatType aType3, float aValue3) { + super(aStack, true, aWeight); + mType1 = aType1; + mType2 = aType2; + mType3 = aType3; + mStat.put(StatType.WEIGHT, aWeight); + mStat.put(aType1, aValue1); + if(mType2!=null)mStat.put(mType2, aValue2); + if(mType3!=null)mStat.put(mType3, aValue3); + } + + @Override + public void calculateArmor(ArmorData aArmorData) { + addVal(mType1, aArmorData); + if(mType2!=null)addVal(mType2, aArmorData); + if(mType3!=null)addVal(mType3, aArmorData); + addVal(StatType.WEIGHT, aArmorData); + } + +} diff --git a/src/main/java/gregtech/common/items/armor/components/ArmorPlating.java b/src/main/java/gregtech/common/items/armor/components/ArmorPlating.java new file mode 100644 index 0000000000..6ee8095ce5 --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/components/ArmorPlating.java @@ -0,0 +1,67 @@ +package gregtech.common.items.armor.components; + +import gregtech.common.items.armor.ArmorData; +import net.minecraft.item.ItemStack; + +public class ArmorPlating extends ArmorComponent{ + StatType mType; + public ArmorPlating(ItemStack aStack, float aWeight, float aPhysicalDef, float aProjectileDef, float aFireDef, float aMagicDef, float aExplosionDef, float aFallDef, float aRadiationDef, float aElectricDef, float aWitherDef) { + super(aStack, false, aWeight); + addStats(aPhysicalDef, aProjectileDef, aFireDef, aMagicDef, aExplosionDef, aFallDef, aRadiationDef, aElectricDef, aWitherDef); + } + + public ArmorPlating(String aOreDict, float aWeight, float aPhysicalDef, float aProjectileDef, float aFireDef, float aMagicDef, float aExplosionDef, float aFallDef, float aRadiationDef, float aElectricDef, float aWitherDef) { + super(aOreDict, false, aWeight); + addStats(aPhysicalDef, aProjectileDef, aFireDef, aMagicDef, aExplosionDef, aFallDef, aRadiationDef, aElectricDef, aWitherDef); + } + + public ArmorPlating(String aOreDict, float aWeight, float aPhysicalDef, float aProjectileDef, float aFireDef, float aMagicDef, float aExplosionDef, float aFallDef, float aRadiationDef, float aElectricDef, float aWitherDef, StatType aType, float aSpecial) { + super(aOreDict, false, aWeight); + addStats(aPhysicalDef, aProjectileDef, aFireDef, aMagicDef, aExplosionDef, aFallDef, aRadiationDef, aElectricDef, aWitherDef); + mType = aType; + mStat.put(mType, aSpecial); + } + + public ArmorPlating(String aOreDict,float aWeight, float aPhysicalDef, float aProjectileDef, float aFireDef, float aMagicDef, float aExplosionDef) { + super(aOreDict, false, aWeight); + addStats(aPhysicalDef, aProjectileDef, aFireDef, aMagicDef, aExplosionDef, 0, 0, 0, 0); + } + + public void addStats(float aPhysicalDef, float aProjectileDef, float aFireDef, float aMagicDef, float aExplosionDef, float aFallDef, float aRadiationDef, float aElectricDef, float aWitherDef){ + mStat.put(StatType.FALLDEFENCE, aFallDef); + mStat.put(StatType.PHYSICALDEFENCE, aPhysicalDef); + mStat.put(StatType.PROJECTILEDEFENCE, aProjectileDef); + mStat.put(StatType.FIREDEFENCE, aFireDef); + mStat.put(StatType.MAGICDEFENCE, aMagicDef); + mStat.put(StatType.EXPLOSIONDEFENCE, aExplosionDef); + mStat.put(StatType.RADIATIONDEFENCE, aRadiationDef); + mStat.put(StatType.ELECTRICALDEFENCE, aElectricDef); + mStat.put(StatType.WITHERDEFENCE, aWitherDef); + } + + @Override + public void calculateArmor(ArmorData aArmorData) { + calDef(StatType.FALLDEFENCE, aArmorData); + calDef(StatType.PHYSICALDEFENCE, aArmorData); + calDef(StatType.PROJECTILEDEFENCE, aArmorData); + calDef(StatType.FIREDEFENCE, aArmorData); + calDef(StatType.MAGICDEFENCE, aArmorData); + calDef(StatType.EXPLOSIONDEFENCE, aArmorData); + calDef(StatType.RADIATIONDEFENCE, aArmorData); + calDef(StatType.ELECTRICALDEFENCE, aArmorData); + calDef(StatType.WITHERDEFENCE, aArmorData); + addVal(StatType.WEIGHT, aArmorData); + if(mType!=null)addVal(mType, aArmorData); + } + + public void calDef(StatType aType, ArmorData aArmorData){ + float tArmorDef = 0.0f; + if(aArmorData.mStat.containsKey(aType)){ + tArmorDef = aArmorData.mStat.get(aType); + aArmorData.mStat.remove(aType);} + float tComponentDef = mStat.get(aType); + aArmorData.mStat.put(aType, tArmorDef + ((1.0f -tArmorDef) * tComponentDef)); +// System.out.println("calDef: "+aType.name()+" "+tArmorDef+" "+(tArmorDef + ((1.0f -tArmorDef) * tComponentDef))); + } + +} diff --git a/src/main/java/gregtech/common/items/armor/components/IArmorComponent.java b/src/main/java/gregtech/common/items/armor/components/IArmorComponent.java new file mode 100644 index 0000000000..340601b354 --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/components/IArmorComponent.java @@ -0,0 +1,11 @@ +package gregtech.common.items.armor.components; + +import gregtech.common.items.armor.ArmorData; +import net.minecraft.item.ItemStack; + +public interface IArmorComponent { + + boolean isArmorComponent(ItemStack aStack); + + void calculateArmor(ArmorData aArmorData); +} diff --git a/src/main/java/gregtech/common/items/armor/components/LoadArmorComponents.java b/src/main/java/gregtech/common/items/armor/components/LoadArmorComponents.java new file mode 100644 index 0000000000..f394caa23b --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/components/LoadArmorComponents.java @@ -0,0 +1,230 @@ +package gregtech.common.items.armor.components; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import ic2.core.Ic2Items; + +public class LoadArmorComponents { + public static void init(){ + new ArmorPlating("plateRubber", 60, 0.06f, 0.06f, 0.02f, 0.10f, 0.10f, 2f, 0f, .25f, 0f); + new ArmorPlating("plateWood", 80, 0.08f, 0.09f, 0.02f, 0.08f, 0.08f); + new ArmorPlating("plateBrass", 140, 0.12f, 0.12f, 0.10f, 0.10f, 0.12f); + new ArmorPlating("plateCopper", 140, 0.11f, 0.11f, 0.10f, 0.10f, 0.11f); + new ArmorPlating("plateLead", 280, 0.05f, 0.05f, 0.05f, 0.05f, 0.05f, 0, .3f, 0, 0); + new ArmorPlating("platePlastic", 60, 0.10f, 0.10f, 0.02f, 0.02f, 0.10f, 0, 0, .25f, 0); + new ArmorPlating("plateAluminium", 120, 0.14f, 0.14f, 0.12f, 0.12f, 0.14f); + new ArmorPlating("plateAstralSilver", 180, 0.10f, 0.10f, 0.10f, 0.18f, 0.10f); + new ArmorPlating("plateBismuthBronze", 160, 0.12f, 0.12f, 0.10f, 0.10f, 0.12f); + new ArmorPlating("plateBlackBronze", 160, 0.13f, 0.13f, 0.10f, 0.10f, 0.13f); + new ArmorPlating("plateBlackSteel", 200, 0.19f, 0.19f, 0.17f, 0.17f, 0.19f); + new ArmorPlating("plateBlueSteel", 200, 0.21f, 0.21f, 0.19f, 0.19f, 0.21f); + new ArmorPlating("plateBronze", 160, 0.13f, 0.13f, 0.12f, 0.12f, 0.13f); + new ArmorPlating("plateCobaltBrass", 180, 0.15f, 0.15f, 0.14f, 0.14f, 0.15f); + new ArmorPlating("plateDamascusSteel", 200, 0.22f, 0.22f, 0.20f, 0.20f, 0.22f); + new ArmorPlating("plateElectrum", 250, 0.11f, 0.11f, 0.10f, 0.10f, 0.11f); + new ArmorPlating("plateEmerald", 160, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("plateGold", 300, 0.09f, 0.09f, 0.05f, 0.25f, 0.09f); + new ArmorPlating("plateGreenSapphire", 160, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("plateInvar", 190, 0.10f, 0.10f, 0.22f, 0.22f, 0.10f); + new ArmorPlating("plateIron", 200, 0.12f, 0.12f, 0.10f, 0.10f, 0.12f); + new ArmorPlating("plateIronWood", 150, 0.17f, 0.17f, 0.02f, 0.02f, 0.17f); + new ArmorPlating("plateMagnalium", 120, 0.15f, 0.15f, 0.17f, 0.17f, 0.15f); + new ArmorPlating("plateNeodymiumMagnetic", 220, 0.14f, 0.14f, 0.14f, 0.14f, 0.14f, 0, 0, 0, 0, StatType.MAGNETSINGLE, 2.0f); + new ArmorPlating("plateManganese", 180, 0.15f, 0.15f, 0.14f, 0.14f, 0.15f); + new ArmorPlating("plateMeteoricIron", 200, 0.18f, 0.18f, 0.16f, 0.16f, 0.18f); + new ArmorPlating("plateMeteoricSteel", 200, 0.21f, 0.21f, 0.19f, 0.19f, 0.21f); + new ArmorPlating("plateMolybdenum", 140, 0.14f, 0.14f, 0.14f, 0.14f, 0.14f); + new ArmorPlating("plateNickel", 180, 0.12f, 0.12f, 0.15f, 0.15f, 0.12f); + new ArmorPlating("plateOlivine", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("plateOpal", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("platePalladium", 280, 0.14f, 0.14f, 0.12f, 0.12f, 0.14f); + new ArmorPlating("platePlatinum", 290, 0.15f, 0.15f, 0.13f, 0.13f, 0.15f); + new ArmorPlating("plateGarnetRed", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("plateRedSteel", 200, 0.20f, 0.20f, 0.18f, 0.18f, 0.20f); + new ArmorPlating("plateRoseGold", 240, 0.10f, 0.10f, 0.08f, 0.18f, 0.10f); + new ArmorPlating("plateRuby", 180, 0.10f, 0.10f, 0.20f, 0.20f, 0.10f); + new ArmorPlating("plateSapphire", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("plateSilver", 220, 0.11f, 0.11f, 0.07f, 0.24f, 0.11f); + new ArmorPlating("plateStainlessSteel", 200, 0.16f, 0.16f, 0.21f, 0.21f, 0.16f); + new ArmorPlating("plateSteel", 200, 0.18f, 0.18f, 0.16f, 0.16f, 0.18f); + new ArmorPlating("plateSterlingSilver", 210, 0.15f, 0.15f, 0.13f, 0.13f, 0.15f); + new ArmorPlating("plateTanzanite", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("plateThorium", 280, 0.13f, 0.13f, 0.16f, 0.16f, 0.13f); + new ArmorPlating("plateWroughtIron", 200, 0.14f, 0.14f, 0.12f, 0.12f, 0.14f); + new ArmorPlating("plateGarnetYellow", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("plateAlloyCarbon", 60, 0.06f, 0.23f, 0.05f, 0.05f, 0.06f); + new ArmorPlating("plateInfusedAir", 10, 0.10f, 0.10f, 0.10f, 0.10f, 0.10f); + new ArmorPlating("plateAmethyst", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("plateInfusedWater", 150, 0.10f, 0.10f, 0.20f, 0.20f, 0.10f); + new ArmorPlating("plateBlueTopaz", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("plateChrome", 200, 0.12f, 0.12f, 0.21f, 0.21f, 0.12f); + new ArmorPlating("plateCobalt", 220, 0.16f, 0.16f, 0.14f, 0.14f, 0.16f); + new ArmorPlating("plateDarkIron", 200, 0.21f, 0.21f, 0.19f, 0.19f, 0.21f); + new ArmorPlating("plateDiamond", 200, 0.20f, 0.20f, 0.22f, 0.22f, 0.20f); + new ArmorPlating("plateEnderium", 250, 0.22f, 0.22f, 0.21f, 0.21f, 0.22f); + new ArmorPlating("plateElectrumFlux", 180, 0.19f, 0.19f, 0.16f, 0.16f, 0.19f); + new ArmorPlating("plateForce", 180, 0.10f, 0.10f, 0.20f, 0.20f, 0.10f); + new ArmorPlating("plateHSLA", 200, 0.21f, 0.21f, 0.17f, 0.17f, 0.21f); + new ArmorPlating("plateInfusedFire", 150, 0.12f, 0.10f, 0.30f, 0.30f, 0.12f, 0, 0, 0, 0, StatType.THORNSSINGLE, 3.0f); + new ArmorPlating("plateInfusedGold", 300, 0.15f, 0.15f, 0.05f, 0.05f, 0.15f); + new ArmorPlating("plateMithril", 200, 0.25f, 0.25f, 0.10f, 0.30f, 0.25f); + new ArmorPlating("plateInfusedOrder", 150, 0.18f, 0.22f, 0.22f, 0.25f, 0.22f); + new ArmorPlating("plateSteeleaf", 120, 0.16f, 0.16f, 0.06f, 0.06f, 0.16f); + new ArmorPlating("plateInfusedEarth", 350, 0.30f, 0.30f, 0.30f, 0.30f, 0.30f); + new ArmorPlating("plateThaumium", 200, 0.18f, 0.19f, 0.20f, 0.30f, 0.18f); + new ArmorPlating("plateTitanium", 140, 0.20f, 0.20f, 0.18f, 0.18f, 0.20f); + new ArmorPlating("plateTungsten", 270, 0.27f, 0.26f, 0.23f, 0.26f, 0.26f); + new ArmorPlating("plateTopaz", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("plateUltimet", 180, 0.21f, 0.21f, 0.19f, 0.19f, 0.21f); + new ArmorPlating("plateUranium", 290, 0.27f, 0.23f, 0.20f, 0.15f, 0.21f); + new ArmorPlating("plateVinteum", 180, 0.10f, 0.12f, 0.14f, 0.28f, 0.12f); + new ArmorPlating("plateDuranium", 140, 0.24f, 0.24f, 0.24f, 0.24f, 0.24f); + new ArmorPlating("plateAlloyIridium", 220, 0.24f, 0.24f, 0.22f, 0.22f, 0.24f); + new ArmorPlating("plateOsmiridium", 240, 0.18f, 0.18f, 0.16f, 0.16f, 0.18f); + new ArmorPlating("plateOsmium", 250, 0.12f, 0.12f, 0.10f, 0.10f, 0.12f); + new ArmorPlating("plateNaquadah", 250, 0.27f, 0.27f, 0.25f, 0.25f, 0.27f); + new ArmorPlating("plateNetherStar", 140, 0.22f, 0.22f, 0.24f, 0.24f, 0.22f, 0, 0, 0, .2f); + new ArmorPlating("plateInfusedEntropy", 150, 0.10f, 0.10f, 0.10f, 0.10f, 0.10f, 0, 0, 0, 0, StatType.THORNSSINGLE, 4.0f); + new ArmorPlating("plateTritanium", 140, 0.26f, 0.26f, 0.26f, 0.26f, 0.26f); + new ArmorPlating("plateTungstenSteel", 270, 0.30f, 0.28f, 0.25f, 0.28f, 0.30f); + new ArmorPlating("plateAdamantium", 200, 0.28f, 0.28f, 0.26f, 0.30f, 0.30f); + new ArmorPlating("plateNaquadahAlloy", 300, 0.33f, 0.33f, 0.33f, 0.33f, 0.33f); + new ArmorPlating("plateNeutronium", 600, 0.50f, 0.50f, 0.50f, 0.50f, 0.50f); + + new ArmorComponentFunction(GT_ModHandler.getIC2Item("nightvisionGoggles", 1), true, 100, StatType.NIGHTVISION, 100); + if(GT_ModHandler.getModItem("Thaumcraft", "ItemGoggles", 1)!=null)new ArmorComponentFunction(GT_ModHandler.getModItem("Thaumcraft", "ItemGoggles", 1), true, 100, StatType.THAUMICGOGGLES, 100); + new ArmorComponentBattery(ItemList.Battery_RE_LV_Lithium.get(1, new Object[]{}), true, 100, 100000); + new ArmorComponentBattery(ItemList.Battery_RE_MV_Lithium.get(1, new Object[]{}), true, 100, 400000); + new ArmorComponentBattery(ItemList.Battery_RE_HV_Lithium.get(1, new Object[]{}), true, 100, 1600000); + + new ArmorComponentBattery(ItemList.Battery_RE_LV_Cadmium.get(1, new Object[]{}), true, 100, 75000); + new ArmorComponentBattery(ItemList.Battery_RE_MV_Cadmium.get(1, new Object[]{}), true, 100, 300000); + new ArmorComponentBattery(ItemList.Battery_RE_HV_Cadmium.get(1, new Object[]{}), true, 100, 1200000); + + new ArmorComponentBattery(ItemList.Battery_RE_LV_Sodium.get(1, new Object[]{}), true, 100, 50000); + new ArmorComponentBattery(ItemList.Battery_RE_MV_Sodium.get(1, new Object[]{}), true, 100, 200000); + new ArmorComponentBattery(ItemList.Battery_RE_HV_Sodium.get(1, new Object[]{}), true, 100, 800000); + + new ArmorComponentBattery(ItemList.IC2_EnergyCrystal.get(1, new Object[]{}), true, 100, 1000000); + new ArmorComponentBattery(ItemList.IC2_LapotronCrystal.get(1, new Object[]{}), true, 100, 10000000); + new ArmorComponentBattery(ItemList.Energy_LapotronicOrb.get(1, new Object[]{}), true, 100, 100000000); + new ArmorComponentBattery(ItemList.Energy_LapotronicOrb2.get(1, new Object[]{}), true, 100, 1000000000); + + new ArmorElectricComponent(ItemList.Electric_Motor_LV.get(1, new Object[]{}), 20, StatType.MOTPRPOWER, 200f, StatType.MOTOREUUSAGE, 50f, StatType.PROCESSINGPOWERUSED, 10f); + new ArmorElectricComponent(ItemList.Electric_Motor_MV.get(1, new Object[]{}), 40, StatType.MOTPRPOWER, 300f, StatType.MOTOREUUSAGE, 100f, StatType.PROCESSINGPOWERUSED, 20f); + new ArmorElectricComponent(ItemList.Electric_Motor_HV.get(1, new Object[]{}), 60, StatType.MOTPRPOWER, 400f, StatType.MOTOREUUSAGE, 200f, StatType.PROCESSINGPOWERUSED, 50f); + new ArmorElectricComponent(ItemList.Electric_Motor_EV.get(1, new Object[]{}), 80, StatType.MOTPRPOWER, 500f, StatType.MOTOREUUSAGE, 400f, StatType.PROCESSINGPOWERUSED, 100f); + new ArmorElectricComponent(ItemList.Electric_Motor_IV.get(1, new Object[]{}),100, StatType.MOTPRPOWER, 600f, StatType.MOTOREUUSAGE, 800f, StatType.PROCESSINGPOWERUSED, 200f); + + new ArmorElectricComponent(ItemList.Electric_Piston_LV.get(1, new Object[]{}), 20, StatType.PISTONJUMPBOOST, 3, StatType.PISTONEUUSAGE, 200f, StatType.PROCESSINGPOWERUSED, 10f); + new ArmorElectricComponent(ItemList.Electric_Piston_MV.get(1, new Object[]{}), 40, StatType.PISTONJUMPBOOST, 4, StatType.PISTONEUUSAGE, 300f, StatType.PROCESSINGPOWERUSED, 20f); + new ArmorElectricComponent(ItemList.Electric_Piston_HV.get(1, new Object[]{}), 60, StatType.PISTONJUMPBOOST, 5, StatType.PISTONEUUSAGE, 450f, StatType.PROCESSINGPOWERUSED, 50f); + new ArmorElectricComponent(ItemList.Electric_Piston_EV.get(1, new Object[]{}), 80, StatType.PISTONJUMPBOOST, 6, StatType.PISTONEUUSAGE, 800f, StatType.PROCESSINGPOWERUSED, 100f); + new ArmorElectricComponent(ItemList.Electric_Piston_IV.get(1, new Object[]{}),100, StatType.PISTONJUMPBOOST, 7, StatType.PISTONEUUSAGE,1600f, StatType.PROCESSINGPOWERUSED, 200f); + + new ArmorElectricComponent(ItemList.Machine_LV_Electrolyzer.get(1, new Object[]{}), 20, StatType.ELECTROLYZERPROD, 10, StatType.ELECTROLYZEREUUSAGE, 1, StatType.PROCESSINGPOWERUSED, 50f); + new ArmorElectricComponent(ItemList.Machine_MV_Electrolyzer.get(1, new Object[]{}), 40, StatType.ELECTROLYZERPROD, 20, StatType.ELECTROLYZEREUUSAGE, 4, StatType.PROCESSINGPOWERUSED, 100f); + new ArmorElectricComponent(ItemList.Machine_HV_Electrolyzer.get(1, new Object[]{}), 60, StatType.ELECTROLYZERPROD, 40, StatType.ELECTROLYZEREUUSAGE, 16, StatType.PROCESSINGPOWERUSED, 150f); + new ArmorElectricComponent(ItemList.Machine_EV_Electrolyzer.get(1, new Object[]{}), 80, StatType.ELECTROLYZERPROD, 80, StatType.ELECTROLYZEREUUSAGE, 64, StatType.PROCESSINGPOWERUSED, 200f); + new ArmorElectricComponent(ItemList.Machine_IV_Electrolyzer.get(1, new Object[]{}),100, StatType.ELECTROLYZERPROD,160, StatType.ELECTROLYZEREUUSAGE, 128, StatType.PROCESSINGPOWERUSED, 250f); + + new ArmorElectricComponent(ItemList.Field_Generator_LV.get(1, new Object[]{}), 20, StatType.FIELDGENCAP, 1, StatType.FIELDGENEUUSAGE, 1, StatType.PROCESSINGPOWERUSED, 100f); + new ArmorElectricComponent(ItemList.Field_Generator_MV.get(1, new Object[]{}), 40, StatType.FIELDGENCAP, 2, StatType.FIELDGENEUUSAGE, 4, StatType.PROCESSINGPOWERUSED, 200f); + new ArmorElectricComponent(ItemList.Field_Generator_HV.get(1, new Object[]{}), 60, StatType.FIELDGENCAP, 3, StatType.FIELDGENEUUSAGE, 16, StatType.PROCESSINGPOWERUSED, 300f); + new ArmorElectricComponent(ItemList.Field_Generator_EV.get(1, new Object[]{}), 80, StatType.FIELDGENCAP, 4, StatType.FIELDGENEUUSAGE, 64, StatType.PROCESSINGPOWERUSED, 400f); + new ArmorElectricComponent(ItemList.Field_Generator_IV.get(1, new Object[]{}),100, StatType.FIELDGENCAP, 5, StatType.FIELDGENEUUSAGE, 512, StatType.PROCESSINGPOWERUSED, 500f); + + new ArmorElectricComponent(ItemList.Cell_Empty.get(1, new Object[]{}), 20, StatType.TANKCAP, 8000, null, 1, null, 0); + new ArmorElectricComponent(ItemList.Large_Fluid_Cell_Steel.get(1, new Object[]{}), 40, StatType.TANKCAP, 16000, null, 1, null, 0); + new ArmorElectricComponent(ItemList.Large_Fluid_Cell_TungstenSteel.get(1, new Object[]{}), 80, StatType.TANKCAP, 64000, null, 1, null, 0); + + new ArmorElectricComponent(GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1), 10, StatType.PROCESSINGPOWER, 100, null, 1, null, 1); + new ArmorElectricComponent(GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1), 20, StatType.PROCESSINGPOWER, 200, null, 1, null, 1); + new ArmorElectricComponent(GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1),30, StatType.PROCESSINGPOWER, 300, null, 1, null, 1); + new ArmorElectricComponent(GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1), 40, StatType.PROCESSINGPOWER, 400, null, 1, null, 1); + new ArmorElectricComponent(GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Elite, 1), 50, StatType.PROCESSINGPOWER, 500, null, 1, null, 1); + new ArmorElectricComponent(GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Master, 1), 60, StatType.PROCESSINGPOWER, 600, null, 1, null, 1); + +// if (parts[i].getItem().getUnlocalizedName().equals("gte.meta.jetpack")) {// jeptack parts +// switch (parts[i].getItem().getDamage(parts[i])) { +// case 0: +// def[24] += 50; // JetpackFuelPower +// def[25] += 1; // FuelUsage +// def[31] += 10; +// break; +// case 1: +// def[24] += 75; // JetpackFuelPower +// def[25] += 2; // FuelUsage +// def[31] += 20; +// break; +// case 2: +// def[24] += 100; // JetpackFuelPower +// def[25] += 4; // FuelUsage +// def[31] += 30; +// break; +// case 3: +// def[24] += 125; // JetpackFuelPower +// def[25] += 8; // FuelUsage +// def[31] += 40; +// break; +// case 4: +// def[24] += 150; // JetpackFuelPower +// def[25] += 16; // FuelUsage +// def[31] += 50; +// break; +// case 5: +// def[26] += 20; // JetpackEUPower +// def[27] += 8; // JetpackEU +// def[31] += 30; +// break; +// case 6: +// def[26] += 30; // JetpackEUPower +// def[27] += 16; // JetpackEU +// def[31] += 60; +// break; +// case 7: +// def[26] += 40; // JetpackEUPower +// def[27] += 32; // JetpackEU +// def[31] += 90; +// break; +// case 8: +// def[26] += 50; // JetpackEUPower +// def[27] += 64; // JetpackEU +// def[31] += 120; +// break; +// case 9: +// def[26] += 60; // JetpackEUPower +// def[27] += 128; // JetpackEU +// def[31] += 150; +// break; +// case 10: +// def[28] += 100; // AntiGravPower +// def[29] += 32; // AntiGravEU +// def[31] += 100; +// break; +// case 11: +// def[28] += 133; // AntiGravPower +// def[29] += 64; // AntiGravEU +// def[31] += 200; +// break; +// case 12: +// def[28] += 166; // AntiGravPower +// def[29] += 128; // AntiGravEU +// def[31] += 300; +// break; +// case 13: +// def[28] += 200; // AntiGravPower +// def[29] += 256; // AntiGravEU +// def[31] += 400; +// break; +// case 14: +// def[28] += 233; // AntiGravPower +// def[29] += 512; // AntiGravEU +// def[31] += 500; +// break; +// } + } +} diff --git a/src/main/java/gregtech/common/items/armor/components/StatType.java b/src/main/java/gregtech/common/items/armor/components/StatType.java new file mode 100644 index 0000000000..80fe5cc6d4 --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/components/StatType.java @@ -0,0 +1,56 @@ +package gregtech.common.items.armor.components; + +import java.util.List; + +import net.minecraftforge.fluids.FluidStack; + +public enum StatType { + ELECTRIC, + ELECTRIC2, + + FULLARMOR, + FULLRADIATIONARMOR, + FULLELECTRICARMOR, + + FALLDEFENCE, + PHYSICALDEFENCE, + PROJECTILEDEFENCE, + FIREDEFENCE, + MAGICDEFENCE, + EXPLOSIONDEFENCE, + RADIATIONDEFENCE, + ELECTRICALDEFENCE, + WITHERDEFENCE, + + THORNS, + THORNSSINGLE, + MAGNET, + MAGNETSINGLE, + + THAUMICGOGGLES, + NIGHTVISION, + POTIONINJECTOR, + AUTOFEEDER, + + TANKCAP, + WEIGHT, + PROCESSINGPOWER, + PROCESSINGPOWERUSED, + PARTPROCESSING, + PARTPROCESSINGUSED, + + MOTPRPOWER, + MOTOREUUSAGE, + PISTONJUMPBOOST, + PISTONEUUSAGE, + ELECTROLYZERPROD, + ELECTROLYZEREUUSAGE, + FIELDGENCAP, + FIELDGENEUUSAGE, + JETPACKMAXWEIGHT, + ANTIGRAVMAXWEIGHT, + + PARTSCHARGE, + BATTERYCAPACITY; + +} diff --git a/src/main/java/gregtech/common/items/armor/gui/ContainerBasicArmor.java b/src/main/java/gregtech/common/items/armor/gui/ContainerBasicArmor.java new file mode 100644 index 0000000000..a2ee329099 --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/gui/ContainerBasicArmor.java @@ -0,0 +1,48 @@ +package gregtech.common.items.armor.gui; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerBasicArmor extends ContainerModularArmor { + + public ContainerBasicArmor(EntityPlayer player, InventoryArmor aInvArmor) { + super(player, aInvArmor); + } + + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new SlotArmor(mInvArmor, 0, 118, 6)); + addSlotToContainer(new SlotArmor(mInvArmor, 1, 136, 6)); + addSlotToContainer(new SlotArmor(mInvArmor, 2, 154, 6)); + addSlotToContainer(new SlotArmor(mInvArmor, 3, 118, 24)); + addSlotToContainer(new SlotArmor(mInvArmor, 4, 136, 24)); + addSlotToContainer(new SlotArmor(mInvArmor, 5, 154, 24)); + addSlotToContainer(new SlotArmor(mInvArmor, 6, 118, 42)); + addSlotToContainer(new SlotArmor(mInvArmor, 7, 136, 42)); + addSlotToContainer(new SlotArmor(mInvArmor, 8, 154, 42)); + + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 9; j++) { + addSlotToContainer(new Slot(aInventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for (int i = 0; i < 9; i++) { + ItemStack stackInSlot = aInventoryPlayer.getStackInSlot(i); + if(isIdenticalItem(mInvArmor.parent,stackInSlot)){ + addSlotToContainer(new SlotLocked(aInventoryPlayer,i,8+i*18,142)); + }else{ + addSlotToContainer(new Slot(aInventoryPlayer, i, 8 + i * 18, 142));} + } + } + + public int getSlotCount() { + return 9; + } + + public int getShiftClickSlotCount() { + return 9; + } + +} diff --git a/src/main/java/gregtech/common/items/armor/gui/ContainerElectricArmor1.java b/src/main/java/gregtech/common/items/armor/gui/ContainerElectricArmor1.java new file mode 100644 index 0000000000..02c8f016bb --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/gui/ContainerElectricArmor1.java @@ -0,0 +1,53 @@ +package gregtech.common.items.armor.gui; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerElectricArmor1 extends ContainerBasicArmor { + + public ContainerElectricArmor1(EntityPlayer player, InventoryArmor aInvArmor) { + super(player, aInvArmor); + } + + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new SlotArmor(mInvArmor, 0, 118, 6)); + addSlotToContainer(new SlotArmor(mInvArmor, 1, 136, 6)); + addSlotToContainer(new SlotArmor(mInvArmor, 2, 154, 6)); + addSlotToContainer(new SlotArmor(mInvArmor, 3, 118, 24)); + addSlotToContainer(new SlotArmor(mInvArmor, 4, 136, 24)); + addSlotToContainer(new SlotArmor(mInvArmor, 5, 154, 24)); + addSlotToContainer(new SlotArmor(mInvArmor, 6, 118, 42)); + addSlotToContainer(new SlotArmor(mInvArmor, 7, 136, 42)); + addSlotToContainer(new SlotArmor(mInvArmor, 8, 154, 42)); + addSlotToContainer(new SlotArmor(mInvArmor, 9, 118, 60)); + addSlotToContainer(new SlotArmor(mInvArmor, 10, 136, 60)); + addSlotToContainer(new SlotArmor(mInvArmor, 11, 154, 60)); + + addSlotToContainer(new SlotFluid(mInvArmor,12,94,32)); + + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 9; j++) { + addSlotToContainer(new Slot(aInventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for (int i = 0; i < 9; i++) { + ItemStack stackInSlot = aInventoryPlayer.getStackInSlot(i); + if(isIdenticalItem(mInvArmor.parent,stackInSlot)){ + addSlotToContainer(new SlotLocked(aInventoryPlayer,i,8+i*18,142)); + }else{ + addSlotToContainer(new Slot(aInventoryPlayer, i, 8 + i * 18, 142));} + } + } + + public int getSlotCount() { + return 12; + } + + public int getShiftClickSlotCount() { + return 12; + } + +} diff --git a/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java b/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java new file mode 100644 index 0000000000..0258a3eb3c --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java @@ -0,0 +1,169 @@ +package gregtech.common.items.armor.gui; + +import gregtech.common.items.armor.ArmorData; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public abstract class ContainerModularArmor extends Container { + + public InventoryArmor mInvArmor; + + public ContainerModularArmor(EntityPlayer player, InventoryArmor aInvArmor) { + this.mInvArmor = aInvArmor; + addSlots(player.inventory); + } + + public ArmorData getData(EntityPlayer aPlayer){ + return null; + } + + @Override + public boolean canInteractWith(EntityPlayer aPlayer) { + return true; + } + + public abstract void addSlots(InventoryPlayer aInventoryPlayer); + + public abstract int getSlotCount(); + + public abstract int getShiftClickSlotCount(); + + public void saveInventory(EntityPlayer entityplayer) { + mInvArmor.onGuiSaved(entityplayer); + } + + @Override + public void onContainerClosed(EntityPlayer player) { + super.onContainerClosed(player); + if (!player.worldObj.isRemote) { + saveInventory(player); + } + } + + @Override + public ItemStack transferStackInSlot(EntityPlayer player, int slotIndex) { + if (player == null) { + return null; + } + + ItemStack originalStack = null; + Slot slot = (Slot) inventorySlots.get(slotIndex); + int numSlots = inventorySlots.size(); + if (slot != null && slot.getHasStack()) { + ItemStack stackInSlot = slot.getStack(); + originalStack = stackInSlot.copy(); + if (slotIndex >= numSlots - 9 * 4 && tryShiftItem(stackInSlot, numSlots)) { + } else if (slotIndex >= numSlots - 9 * 4 && slotIndex < numSlots - 9) { + if (!shiftItemStack(stackInSlot, numSlots - 9, numSlots)) { + return null; + } + } else if (slotIndex >= numSlots - 9 && slotIndex < numSlots) { + if (!shiftItemStack(stackInSlot, numSlots - 9 * 4, numSlots - 9)) { + return null; + } + } else if (!shiftItemStack(stackInSlot, numSlots - 9 * 4, numSlots)) { + return null; + } + slot.onSlotChange(stackInSlot, originalStack); + if (stackInSlot.stackSize <= 0) { + slot.putStack(null); + } else { + slot.onSlotChanged(); + } + if (stackInSlot.stackSize == originalStack.stackSize) { + return null; + } + slot.onPickupFromSlot(player, stackInSlot); + } + return originalStack; + } + + private boolean tryShiftItem(ItemStack stackToShift, int numSlots) { + for (int machineIndex = 0; machineIndex < numSlots - 9 * 4; machineIndex++) { + Slot slot = (Slot) inventorySlots.get(machineIndex); + if (slot.getHasStack()) { + continue; + } + if(slot instanceof SlotLocked){ + continue; + } + if(slot instanceof SlotFluid){ + continue; + } + + if (!slot.isItemValid(stackToShift)) { + continue; + } + if (shiftItemStack(stackToShift, machineIndex, machineIndex + 1)) { + return true; + } + } + return false; + } + + protected boolean shiftItemStack(ItemStack stackToShift, int start, int end) { + boolean changed = false; + if (stackToShift.isStackable()) { + for (int slotIndex = start; stackToShift.stackSize > 0 && slotIndex < end; slotIndex++) { + Slot slot = (Slot) inventorySlots.get(slotIndex); + ItemStack stackInSlot = slot.getStack(); + if (stackInSlot != null && isIdenticalItem(stackInSlot, stackToShift)) { + int resultingStackSize = stackInSlot.stackSize + stackToShift.stackSize; + int max = Math.min(stackToShift.getMaxStackSize(), slot.getSlotStackLimit()); + if (resultingStackSize <= max) { + stackToShift.stackSize = 0; + stackInSlot.stackSize = resultingStackSize; + slot.onSlotChanged(); + changed = true; + } else if (stackInSlot.stackSize < max) { + stackToShift.stackSize -= max - stackInSlot.stackSize; + stackInSlot.stackSize = max; + slot.onSlotChanged(); + changed = true; + } + } + } + } + if (stackToShift.stackSize > 0) { + for (int slotIndex = start; stackToShift.stackSize > 0 && slotIndex < end; slotIndex++) { + Slot slot = (Slot) inventorySlots.get(slotIndex); + ItemStack stackInSlot = slot.getStack(); + if (stackInSlot == null) { + int max = Math.min(stackToShift.getMaxStackSize(), slot.getSlotStackLimit()); + stackInSlot = stackToShift.copy(); + stackInSlot.stackSize = Math.min(stackToShift.stackSize, max); + stackToShift.stackSize -= stackInSlot.stackSize; + slot.putStack(stackInSlot); + slot.onSlotChanged(); + changed = true; + } + } + } + return changed; + } + + public static boolean isIdenticalItem(ItemStack lhs, ItemStack rhs) { + if (lhs == null || rhs == null) { + return false; + } + + if (lhs.getItem() != rhs.getItem()) { + return false; + } + + if (lhs.getItemDamage() != OreDictionary.WILDCARD_VALUE) { + if (lhs.getItemDamage() != rhs.getItemDamage()) { + return false; + } + } + + return ItemStack.areItemStackTagsEqual(lhs, rhs); + } + +} diff --git a/src/main/java/gregtech/common/items/armor/gui/FluidSync.java b/src/main/java/gregtech/common/items/armor/gui/FluidSync.java new file mode 100644 index 0000000000..8f1aef56d1 --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/gui/FluidSync.java @@ -0,0 +1,67 @@ +package gregtech.common.items.armor.gui; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.WorldServer; +import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + +import com.google.common.base.Charsets; +import com.google.common.io.ByteArrayDataInput; +import com.google.common.io.ByteArrayDataOutput; +import com.google.common.io.ByteStreams; + +public class FluidSync /**implements IPacket**/ { + String playerName; + int amount; + String fluid; + +// @Override + public byte getPacketID() { + return 0; + } + + public FluidSync(String player, int amount, String fluid) { + this.playerName = player; + this.amount = amount; + this.fluid = fluid.toLowerCase(); + } + +// @Override + public ByteArrayDataOutput encode() { + ByteArrayDataOutput rOut = ByteStreams.newDataOutput(4); + rOut.writeUTF(playerName + ";" + amount + ";" + fluid); + return rOut; + } + +// @Override +// public IPacket decode(ByteArrayDataInput aData) { +// String tmp = aData.readUTF(); +// String[] tmp2 = tmp.split(";"); +// return new FluidSync(tmp2[0], Integer.parseInt(tmp2[1]), tmp2[2].toLowerCase()); +// } +// +// @Override +// public void process(IBlockAccess aWorld, INetworkHandler aNetworkHandler) { +// WorldServer[] worlds = DimensionManager.getWorlds(); +// EntityPlayer tmp; +// for (int i = 0; i < worlds.length; i++) { +// tmp = worlds[i].getPlayerEntityByName(playerName); +// if (tmp != null) { +// try { +// if (fluid.equals("null")) { +// tmp.openContainer.getSlot(12).putStack(null); +// } else { +// tmp.openContainer.getSlot(12).putStack(UT.Fluids.display(new FluidStack(FluidRegistry.getFluid(fluid), amount), true)); +// } +// tmp.openContainer.detectAndSendChanges(); +// } catch (Exception e) { +// e.printStackTrace(); +// } +// +// } +// } +// } + +} diff --git a/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java b/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java new file mode 100644 index 0000000000..75c3c6d363 --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java @@ -0,0 +1,67 @@ +package gregtech.common.items.armor.gui; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.WorldServer; +import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + +import com.google.common.base.Charsets; +import com.google.common.io.ByteArrayDataInput; +import com.google.common.io.ByteArrayDataOutput; +import com.google.common.io.ByteStreams; + +public class FluidSync2 /**implements IPacket**/ { + String playerName; + +// @Override + public byte getPacketID() { + return 1; + } + + public FluidSync2(String player) { + this.playerName = player; + } + +// @Override + public ByteArrayDataOutput encode() { + ByteArrayDataOutput rOut = ByteStreams.newDataOutput(4); + rOut.writeUTF(playerName); + return rOut; + } + +// @Override +// public IPacket decode(ByteArrayDataInput aData) { +// return new FluidSync2(aData.readUTF()); +// } +// +// @Override +// public void process(IBlockAccess aWorld, INetworkHandler aNetworkHandler) { +// WorldServer[] worlds = DimensionManager.getWorlds(); +// EntityPlayer tmp; +// for (int i = 0; i < worlds.length; i++) { +// tmp = worlds[i].getPlayerEntityByName(playerName); +// if (tmp != null) { +// try { +// ItemStack tmp2 = tmp.inventory.getItemStack(); +// ItemStack tmp3 = UT.Fluids.getContainerForFilledItem(tmp2, true); +// if (tmp2.stackSize <= 1) { +// tmp2 = null; +// } else { +// tmp2.stackSize--; +// } +// tmp.inventory.setItemStack(tmp2); +// if(tmp3!=null){ +// tmp3.stackSize=1; +// tmp.inventory.addItemStackToInventory(tmp3);} +// } catch (Exception e) { +// e.printStackTrace(); +// } +// +// } +// } +// } + +} diff --git a/src/main/java/gregtech/common/items/armor/gui/GuiElectricArmor1.java b/src/main/java/gregtech/common/items/armor/gui/GuiElectricArmor1.java new file mode 100644 index 0000000000..3ea092a2ab --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/gui/GuiElectricArmor1.java @@ -0,0 +1,311 @@ +package gregtech.common.items.armor.gui; + +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; +import gregtech.common.items.armor.components.StatType; + +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.text.NumberFormat; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidContainerItem; + +@SideOnly(Side.CLIENT) +public class GuiElectricArmor1 extends GuiContainer { + ContainerModularArmor cont; + EntityPlayer player; + private int tab; + + public GuiElectricArmor1(ContainerModularArmor containerModularArmor, EntityPlayer aPlayer) { + super(containerModularArmor); + player = aPlayer; + cont = containerModularArmor; + tab = 0; + } + + public String seperateNumber(long number){ + DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US); + DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols(); + symbols.setGroupingSeparator(' '); + return formatter.format(number); + } + + @Override + protected void drawGuiContainerForegroundLayer(int x, int y) { + int xStart = (width - xSize) / 2; + int yStart = (height - ySize) / 2; + int x2 = x - xStart; + int y2 = y - yStart; + drawTooltip(x2, y2 + 5); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { + GL11.glColor4f(1F, 1F, 1F, 1F); + this.mc.getTextureManager().bindTexture(new ResourceLocation("gregtech", "textures/gui/armorgui3x4.png")); + int xStart = (width - xSize) / 2; + int yStart = (height - ySize) / 2; + //Draw background + drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize); + //Draw active arrows + drawTexturedModalRect(xStart + 10, yStart + 70, 219, 11, 14, 5); + //Draw active armor symbol + switch (cont.mInvArmor.data.type) { + case 0: + drawTexturedModalRect(xStart + 73, yStart + 68, 177, 10, 10, 9); + break; + case 1: + drawTexturedModalRect(xStart + 83, yStart + 68, 187, 10, 10, 9); + break; + case 2: + drawTexturedModalRect(xStart + 93, yStart + 68, 197, 10, 10, 9); + break; + case 3: + drawTexturedModalRect(xStart + 103, yStart + 68, 207, 10, 10, 9); + break; + default: + break; + } + //Draw active tab + switch(tab){ + case 0: + break; + case 1: + drawTexturedModalRect(xStart + 7, yStart + 14, 2, 167, 104, 54); + break; + case 2: + drawTexturedModalRect(xStart + 7, yStart + 14, 107, 167, 104, 54); + break; + default: + break; + } + + if(cont.mInvArmor.data.mStat.get(StatType.TANKCAP)>0){ + drawTexturedModalRect(xStart + 94, yStart + 32, 231, 69, 16, 34); + } + + int bar = (int) Math.floor(18 * (cont.mInvArmor.data.mStat.get(StatType.WEIGHT)/(float)1000)); + drawTexturedModalRect(xStart + 15, yStart + 7, 217, 26, bar, 5); + drawTexturedModalRect(xStart + bar + 15, yStart + 7, 197+bar, 26, 18-bar, 5); + + if(tab==0){ + //processing power bar + bar = Math.min((int) Math.floor(52 * ((float)cont.mInvArmor.data.mStat.get(StatType.PROCESSINGPOWERUSED)/(float)cont.mInvArmor.data.mStat.get(StatType.PROCESSINGPOWER))),52); + drawTexturedModalRect(xStart + 17, yStart + 17, 177, 146, bar, 5); + drawTexturedModalRect(xStart + bar + 17, yStart + 17, 177+bar, 139, 52-bar, 5); + }else if(tab==1){ + + }else{ + //Def tab values + if(cont.mInvArmor.data.mStat.get(StatType.PHYSICALDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 20, 186, 33, 7, 7); + drawBars(31, 20, cont.mInvArmor.data.mStat.get(StatType.PHYSICALDEFENCE)); + if(cont.mInvArmor.data.mStat.get(StatType.PROJECTILEDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 29, 186, 42, 7, 7); + drawBars(31, 29, cont.mInvArmor.data.mStat.get(StatType.PROJECTILEDEFENCE)); + if(cont.mInvArmor.data.mStat.get(StatType.FIREDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 38, 186, 51, 7, 7); + drawBars(31, 38, cont.mInvArmor.data.mStat.get(StatType.FIREDEFENCE)); + if(cont.mInvArmor.data.mStat.get(StatType.MAGICDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 47, 186, 60, 7, 7); + drawBars(31, 47, cont.mInvArmor.data.mStat.get(StatType.MAGICDEFENCE)); + if(cont.mInvArmor.data.mStat.get(StatType.EXPLOSIONDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 56, 186, 69, 7, 7); + drawBars(31, 56, cont.mInvArmor.data.mStat.get(StatType.EXPLOSIONDEFENCE)); + if(cont.mInvArmor.data.mStat.get(StatType.RADIATIONDEFENCE)>0)drawTexturedModalRect(xStart + 61, yStart + 20, 186, 87, 7, 7); + drawBars(62, 20, cont.mInvArmor.data.mStat.get(StatType.RADIATIONDEFENCE)); + if(cont.mInvArmor.data.mStat.get(StatType.ELECTRICALDEFENCE)>0)drawTexturedModalRect(xStart + 61, yStart + 29, 186, 96, 7, 7); + drawBars(62, 29, cont.mInvArmor.data.mStat.get(StatType.ELECTRICALDEFENCE)); + if(cont.mInvArmor.data.mStat.get(StatType.WITHERDEFENCE)>0)drawTexturedModalRect(xStart + 61, yStart + 38, 186, 105, 7, 7); + drawBars(62, 38, cont.mInvArmor.data.mStat.get(StatType.WITHERDEFENCE)); + if(cont.mInvArmor.data.mStat.get(StatType.FALLDEFENCE)>0)drawTexturedModalRect(xStart + 61, yStart + 47, 186, 114, 7, 7); + if(cont.mInvArmor.data.mStat.get(StatType.THORNS)>0)drawTexturedModalRect(xStart + 61, yStart + 56, 186, 123, 7, 7); + if(cont.mInvArmor.data.mStat.get(StatType.MAGNET)>0)drawTexturedModalRect(xStart + 70, yStart + 56, 186, 78, 7, 7); + } + + + } + + protected void mouseClicked(int mouseX, int mouseY, int mouseBtn) { + int xStart = mouseX-((width - xSize) / 2); + int yStart = mouseY-((height - ySize) / 2); + if(yStart>68&&yStart<77){ + if(xStart>18&&xStart<26){ + tab++; + }else if(xStart>8&&xStart<17){ + tab--; + } + if(tab>2){tab=0;} + if(tab<0){tab=2;} + if(xStart>72&&xStart<112){ + if(xStart>72&&xStart<81&&cont.mInvArmor.data.helmet!=null){cont.mInvArmor.data.helmet.openGui=true;player.closeScreen();} + if(xStart>82&&xStart<91&&cont.mInvArmor.data.chestplate!=null){cont.mInvArmor.data.chestplate.openGui=true;player.closeScreen();} + if(xStart>92&&xStart<101&&cont.mInvArmor.data.leggings!=null){cont.mInvArmor.data.leggings.openGui=true;player.closeScreen();} + if(xStart>102&&xStart<112&&cont.mInvArmor.data.boots!=null){cont.mInvArmor.data.boots.openGui=true;player.closeScreen();} + } + } +// Slot slot = getSlotAtPosition(mouseX, mouseY); +// if (slot != null && slot instanceof SlotFluid && player != null) { +// ItemStack tmp = player.inventory.getItemStack(); +// if (tmp == null) { +// GTExtras.NET.sendToServer(new FluidSync(player.getCommandSenderName(), 0, "null")); +// } +// if (tmp != null && tmp.getItem() instanceof IFluidContainerItem) { +// FluidStack tmp2 = ((IFluidContainerItem) tmp.getItem()).getFluid(tmp); +// if (!slot.getHasStack() && tmp2 != null) { +// slot.putStack(UT.Fluids.display(tmp2, true)); +// GTExtras.NET.sendToServer(new FluidSync(player.getCommandSenderName(), tmp2.amount, UT.Fluids.name(tmp2, false))); +// ItemStack tmp4 = UT.Fluids.getContainerForFilledItem(tmp, true); +// tmp4.stackSize = 1; +// if (tmp.stackSize > 1) { +// player.inventory.addItemStackToInventory(tmp4); +// tmp.stackSize--; +// player.inventory.setItemStack(tmp); +// GTExtras.NET.sendToServer(new FluidSync2(player.getCommandSenderName())); +// } else { +// player.inventory.setItemStack(null); +// player.inventory.addItemStackToInventory(tmp4); +// GTExtras.NET.sendToServer(new FluidSync2(player.getCommandSenderName())); +// } +// +// } else if (slot.getHasStack() && tmp2 != null) { +// Item fluidSlot = slot.getStack().getItem(); +// if (fluidSlot.getDamage(slot.getStack()) == tmp2.getFluidID()) { +// NBTTagCompound nbt = slot.getStack().getTagCompound(); +// if (nbt != null) { +// tmp2.amount += nbt.getLong("mFluidDisplayAmount"); +// ItemStack tmp3 = player.inventory.getItemStack(); +// if (tmp3.stackSize <= 1) { +// tmp3 = null; +// } else { +// tmp3.stackSize--; +// } +// player.inventory.setItemStack(tmp3); +// GTExtras.NET.sendToServer(new FluidSync2(player.getCommandSenderName())); +// slot.putStack(UT.Fluids.display(tmp2, true)); +// GTExtras.NET.sendToServer(new FluidSync(player.getCommandSenderName(), tmp2.amount, UT.Fluids.name(tmp2, false))); +// } +// } +// } +// } +// } + super.mouseClicked(mouseX, mouseY, mouseBtn); + } + + protected void drawTooltip(int x, int y) { + List list = new ArrayList(); + //General tooltips + if(x>=7&&y>=11&&x<=33&&y<=17){ + list.add(GT_LanguageManager.getTranslation("Weight") + ": " + cont.mInvArmor.data.mStat.get(StatType.WEIGHT)); + list.add("Total Weight: "+cont.mInvArmor.data.maxWeight); + if (cont.mInvArmor.data.mStat.get(StatType.WEIGHT) > 1000) + list.add("Too Heavy!"); + } + if(x>=56&&y>=11&&x<=112&&y<=17){ + list.add("Stored Energy: "+seperateNumber(cont.mInvArmor.data.charge)+" EU"); + } + if(y>74&&y<83){ + if(x>8&&x<17){ + list.add("Previous Page"); + }else if(x>18&&x<27){ + list.add("Next Page"); + }else if(x>72&&x<80){ + list.add("Helmet"); + }else if(x>81&&x<90){ + list.add("Chestplate"); + }else if(x>91&&x<100){ + list.add("Leggings"); + }else if(x>101&&x<110){ + list.add("Boots"); + } + } + if(tab==0){ + if(x>=93&&y>=36&&x<=110&&y<=71){list.add("Tank Capacity: "+cont.mInvArmor.data.mStat.get(StatType.TANKCAP)+"L"); + } + if(x>=7&&y>=22&&x<=70&&y<=28){list.add("Processing Power Provided: "+cont.mInvArmor.data.mStat.get(StatType.PROCESSINGPOWER)); + list.add("Processing Power Used: "+cont.mInvArmor.data.mStat.get(StatType.PROCESSINGPOWERUSED)); + } + }else if(tab==1){ + + }else{ + if (x >= 28 && x <= 58) { + if (y >= 25 && y <= 32) { + list.add(GT_LanguageManager.getTranslation("Physical Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.PHYSICALDEFENCE) * 1000) / 10.0) + "%"); + } else if (y >= 33 && y <= 41) { + list.add(GT_LanguageManager.getTranslation("Projectile Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.PROJECTILEDEFENCE) * 1000) / 10.0) + "%"); + } else if (y >= 42 && y <= 50) { + list.add(GT_LanguageManager.getTranslation("Fire Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.FIREDEFENCE) * 1000) / 10.0) + "%"); + } else if (y >= 51 && y <= 59) { + list.add(GT_LanguageManager.getTranslation("Magical Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.MAGICDEFENCE) * 1000) / 10.0) + "%"); + } else if (y >= 60 && y <= 68) { + list.add(GT_LanguageManager.getTranslation("Explosion Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.EXPLOSIONDEFENCE) * 1000) / 10.0) + "%"); + } + } else if (x >= 59 && x <= 90) { + if (y >= 25 && y <= 32) { + list.add(GT_LanguageManager.getTranslation("Radiation Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.RADIATIONDEFENCE) * 1000) / 10.0) + "%"); + if(cont.mInvArmor.data.mBStat.get(StatType.FULLRADIATIONARMOR)){ + list.add(GT_LanguageManager.getTranslation("Radiation Immunity"));} + } else if (y >= 33 && y <= 41) { + list.add(GT_LanguageManager.getTranslation("Electrical Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.ELECTRICALDEFENCE) * 1000) / 10.0) + "%"); + if(cont.mInvArmor.data.mBStat.get(StatType.FULLELECTRICARMOR)){ + list.add(GT_LanguageManager.getTranslation("Electric Immunity"));} + } else if (y >= 42 && y <= 50) { + list.add(GT_LanguageManager.getTranslation("Wither Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.WITHERDEFENCE) * 1000) / 10.0) + "%"); + } else if (y >= 51 && y <= 59) { + if(cont.mInvArmor.data.type!=3){ + list.add(GT_LanguageManager.getTranslation("Fall Damage absorbtion")); + list.add(GT_LanguageManager.getTranslation("Only for Boots")); + }else{ + list.add(GT_LanguageManager.getTranslation("Absorbs") + " " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.FALLDEFENCE)) + GT_LanguageManager.getTranslation("m of Fall Damage"));} + } else if (y >= 60 && y <= 68) { + if(x<69){ + list.add(GT_LanguageManager.getTranslation("Thorns") + ": " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.THORNSSINGLE)) + " Dmg"); + list.add(GT_LanguageManager.getTranslation("Total Thorns") + ": " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.THORNS)) + " Dmg"); + }else{ + list.add(GT_LanguageManager.getTranslation("Magnet") + ": " + cont.mInvArmor.data.mStat.get(StatType.MAGNETSINGLE) + " m"); + list.add(GT_LanguageManager.getTranslation("Total Magnet") + ": " + cont.mInvArmor.data.mStat.get(StatType.MAGNET) + " m");} + } + } + } + if (!list.isEmpty()) + drawHoveringText(list, x, y, fontRendererObj); + } + + public void drawBars(int x, int y, float value) { + + int bar = (int) Math.floor(18 * value); + int xStart = (width - xSize) / 2; + int yStart = (height - ySize) / 2; + xStart += 8; + yStart += 1; + drawTexturedModalRect(xStart + x, yStart + y, 217, 26, bar, 5); + drawTexturedModalRect(xStart+ bar + x, yStart + y, 197+bar, 26, 18-bar, 5); + } + + protected Slot getSlotAtPosition(int p_146975_1_, int p_146975_2_) { + for (int k = 0; k < cont.inventorySlots.size(); ++k) { + Slot slot = (Slot) cont.inventorySlots.get(k); + if (this.isMouseOverSlot(slot, p_146975_1_, p_146975_2_)) { + return slot; + } + } + return null; + } + + private boolean isMouseOverSlot(Slot p_146981_1_, int p_146981_2_, int p_146981_3_) { + return this.func_146978_c(p_146981_1_.xDisplayPosition, p_146981_1_.yDisplayPosition, 16, 16, p_146981_2_, p_146981_3_); + } +} diff --git a/src/main/java/gregtech/common/items/armor/gui/GuiModularArmor.java b/src/main/java/gregtech/common/items/armor/gui/GuiModularArmor.java new file mode 100644 index 0000000000..a24ca3ca1e --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/gui/GuiModularArmor.java @@ -0,0 +1,203 @@ +package gregtech.common.items.armor.gui; + +import gregtech.api.util.GT_LanguageManager; +import gregtech.common.items.armor.components.StatType; + +import java.util.ArrayList; +import java.util.List; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.util.ResourceLocation; + +@SideOnly(Side.CLIENT) +public class GuiModularArmor extends GuiContainer { + ContainerModularArmor cont; + EntityPlayer player; + + public GuiModularArmor(ContainerModularArmor containerModularArmor,EntityPlayer aPlayer) { + super(containerModularArmor); + cont = containerModularArmor; + this.player = aPlayer; + } + + @Override + protected void drawGuiContainerForegroundLayer(int x, int y) { + int xStart = (width - xSize) / 2; + int yStart = (height - ySize) / 2; + int x2 = x - xStart; + int y2 = y - yStart; + drawTooltip(x2, y2 + 5); + } + + protected void drawTooltip(int x, int y) { + List list = new ArrayList(); + if (x >= 10 && x <= 17) { + if (y >= 20 && y <= 27) { + list.add(GT_LanguageManager.getTranslation("Weight") + ": " + cont.mInvArmor.data.mStat.get(StatType.WEIGHT)); + list.add("Total Weight: "+cont.mInvArmor.data.maxWeight); + if (cont.mInvArmor.data.mStat.get(StatType.WEIGHT) > 1000) + list.add("Too Heavy!"); + } else if (y >= 29 && y <= 36) { + list.add(GT_LanguageManager.getTranslation("Physical Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.PHYSICALDEFENCE) * 1000) / 10.0) + "%"); + } else if (y >= 38 && y <= 45) { + list.add(GT_LanguageManager.getTranslation("Projectile Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.PROJECTILEDEFENCE) * 1000) / 10.0) + "%"); + } else if (y >= 47 && y <= 54) { + list.add(GT_LanguageManager.getTranslation("Fire Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.FIREDEFENCE) * 1000) / 10.0) + "%"); + } else if (y >= 56 && y <= 63) { + list.add(GT_LanguageManager.getTranslation("Magic Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.MAGICDEFENCE) * 1000) / 10.0) + "%"); + } else if (y >= 65 && y <= 72) { + list.add(GT_LanguageManager.getTranslation("Explosion Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.EXPLOSIONDEFENCE) * 1000) / 10.0) + "%"); + } + } else if (x >= 59 && x <= 66) { + if (y >= 20 && y <= 27) { + list.add(GT_LanguageManager.getTranslation("Thorns") + ": " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.THORNSSINGLE)) + " Dmg"); + list.add(GT_LanguageManager.getTranslation("Total Thorns") + ": " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.THORNS)) + " Dmg"); + } else if (y >= 29 && y <= 36) { + list.add(GT_LanguageManager.getTranslation("Magnet") + ": " + cont.mInvArmor.data.mStat.get(StatType.MAGNETSINGLE) + " m"); + list.add(GT_LanguageManager.getTranslation("Total Magnet") + ": " + cont.mInvArmor.data.mStat.get(StatType.MAGNET) + " m"); + } else if (y >= 38 && y <= 45) { + list.add(GT_LanguageManager.getTranslation("Radiation Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.RADIATIONDEFENCE) * 1000) / 10.0) + "%"); + if(cont.mInvArmor.data.mBStat.get(StatType.FULLRADIATIONARMOR)){ + list.add(GT_LanguageManager.getTranslation("Radiation Immunity"));} + } else if (y >= 47 && y <= 54) { + list.add(GT_LanguageManager.getTranslation("Electrical Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.ELECTRICALDEFENCE) * 1000) / 10.0) + "%"); + if(cont.mInvArmor.data.mBStat.get(StatType.FULLELECTRICARMOR)){ + list.add("Electric Immunity");} + } else if (y >= 56 && y <= 63) { + list.add(GT_LanguageManager.getTranslation("Wither Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.WITHERDEFENCE) * 1000) / 10.0) + "%"); + } else if (y >= 65 && y <= 72) { + if(cont.mInvArmor.data.type!=3){ + list.add(GT_LanguageManager.getTranslation("Fall Damage absorbtion")); + list.add(GT_LanguageManager.getTranslation("Only for Boots")); + }else{ + list.add(GT_LanguageManager.getTranslation("Absorbs") + " " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.FALLDEFENCE)) + GT_LanguageManager.getTranslation("m of Fall Damage"));} + } + } + if (!list.isEmpty()) + drawHoveringText(list, x, y, fontRendererObj); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { + GL11.glColor4f(1F, 1F, 1F, 1F); + this.mc.getTextureManager().bindTexture(new ResourceLocation("gregtech", "textures/gui/armorgui3x3.png")); + int xStart = (width - xSize) / 2; + int yStart = (height - ySize) / 2; + drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize); + + switch (cont.mInvArmor.data.type) { + case 0: + drawTexturedModalRect(xStart + 124, yStart + 67, 177, 10, 10, 9); + break; + case 1: + drawTexturedModalRect(xStart + 134, yStart + 67, 187, 10, 10, 9); + break; + case 2: + drawTexturedModalRect(xStart + 144, yStart + 67, 197, 10, 10, 9); + break; + case 3: + drawTexturedModalRect(xStart + 154, yStart + 67, 207, 10, 10, 9); + break; + default: + break; + } + + // Weight: 10, 15 =191, 20 + if(getF(StatType.WEIGHT)>0){ + drawTexturedModalRect(xStart + 10, yStart + 15, 191, 20, 7, 7); + } + // Physical Def: 10, 24 =191, 29 + if(getF(StatType.PHYSICALDEFENCE)>0){ + drawTexturedModalRect(xStart + 10, yStart + 24, 191, 29, 7, 7); + } + // Projectile Def: 10, 33 =191, 38 + if(getF(StatType.PROJECTILEDEFENCE)>0){ + drawTexturedModalRect(xStart + 10, yStart + 33, 191, 38, 7, 7); + } + // Fire Def: 10, 42 =191, 47 + if(getF(StatType.FIREDEFENCE)>0){ + drawTexturedModalRect(xStart + 10, yStart + 42, 191, 47, 7, 7); + } + // Magic Def: 10, 51 =191, 56 + if(getF(StatType.MAGICDEFENCE)>0){ + drawTexturedModalRect(xStart + 10, yStart + 51, 191, 56, 7, 7); + } + // Explosive Def: 10, 60 =191, 65 + if(getF(StatType.EXPLOSIONDEFENCE)>0){ + drawTexturedModalRect(xStart + 10, yStart + 60, 191, 65, 7, 7); + } + // Thorns: 59, 15 =198, 20 + if(getF(StatType.THORNS)>0){ + drawTexturedModalRect(xStart + 59, yStart + 15, 198, 20, 7, 7); + } + // Magnet: 59, 24 =198, 29 + if(getF(StatType.MAGNETSINGLE)>0){ + drawTexturedModalRect(xStart + 59, yStart + 24, 198, 29, 7, 7); + } + // Radiation Def: 59, 33 =198, 38 + if(getF(StatType.RADIATIONDEFENCE)>0){ + drawTexturedModalRect(xStart + 59, yStart + 33, 198, 38, 7, 7); + } + // Electric Def: 59, 42 =198, 47 + if(getF(StatType.ELECTRICALDEFENCE)>0){ + drawTexturedModalRect(xStart + 59, yStart + 42, 198, 47, 7, 7); + } + // Wither Def: 59, 51 =198, 56 + if(getF(StatType.WITHERDEFENCE)>0){ + drawTexturedModalRect(xStart + 59, yStart + 51, 198, 56, 7, 7); + } + // Fall Reduction: 59, 60 =198, 65 + if(getF(StatType.FALLDEFENCE)>0){ + drawTexturedModalRect(xStart + 59, yStart + 60, 198, 65, 7, 7); + } + + drawBars(10, 24, getF(StatType.PHYSICALDEFENCE)); + drawBars(10, 33, getF(StatType.PROJECTILEDEFENCE)); + drawBars(10, 42, getF(StatType.FIREDEFENCE)); + drawBars(10, 51, getF(StatType.MAGICDEFENCE)); + drawBars(10, 60, getF(StatType.EXPLOSIONDEFENCE)); + drawBars(59, 33, getF(StatType.RADIATIONDEFENCE)); + drawBars(59, 42, getF(StatType.ELECTRICALDEFENCE)); + drawBars(59, 51, getF(StatType.WITHERDEFENCE)); + } + + public float getF(StatType aType){ + if(cont.mInvArmor.data.mStat.containsKey(aType)) + return cont.mInvArmor.data.mStat.get(aType); + return .0f; + } + + public void drawBars(int x, int y, float value) { + + int bar = (int) Math.floor(35 * value); + int xStart = (width - xSize) / 2; + int yStart = (height - ySize) / 2; + xStart += 8; + yStart += 1; + //drawRect(x + xStart, y + yStart, x + bar + xStart, y + 5 + yStart, 0x8000FF00); + //drawRect(x + bar + xStart, y + yStart, x + 36 + xStart, y + 5 + yStart, 0x80FF0000); + drawTexturedModalRect(xStart + x, yStart + y, 177, 78, bar, 5); + drawTexturedModalRect(xStart+ bar + x, yStart + y, 177, 73, 35-bar, 5); + } + + protected void mouseClicked(int mouseX, int mouseY, int mouseBtn) { + int xStart = mouseX-((width - xSize) / 2); + int yStart = mouseY-((height - ySize) / 2); + if(yStart>67&&yStart<77){ + if(xStart>124&&xStart<163){ + if(xStart>124&&xStart<133&&cont.mInvArmor.data.helmet!=null){cont.mInvArmor.data.helmet.openGui=true;player.closeScreen();} + if(xStart>134&&xStart<143&&cont.mInvArmor.data.chestplate!=null){cont.mInvArmor.data.chestplate.openGui=true;player.closeScreen();} + if(xStart>144&&xStart<153&&cont.mInvArmor.data.leggings!=null){cont.mInvArmor.data.leggings.openGui=true;player.closeScreen();} + if(xStart>154&&xStart<163&&cont.mInvArmor.data.boots!=null){cont.mInvArmor.data.boots.openGui=true;player.closeScreen();} + } + } + super.mouseClicked(mouseX, mouseY, mouseBtn); + } + +} diff --git a/src/main/java/gregtech/common/items/armor/gui/InventoryArmor.java b/src/main/java/gregtech/common/items/armor/gui/InventoryArmor.java new file mode 100644 index 0000000000..ff77584314 --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/gui/InventoryArmor.java @@ -0,0 +1,237 @@ +package gregtech.common.items.armor.gui; + +import gregtech.api.util.GT_Utility; +import gregtech.common.items.armor.ArmorData; +import gregtech.common.items.armor.ModularArmor_Item; + +import java.util.Random; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.oredict.OreDictionary; + +public class InventoryArmor implements IInventory { + + public ItemStack[] parts; + public ItemStack parent; +// float[] def = new float[32]; + public int maxCharge; + public int charge; + public ArmorData data; + + public InventoryArmor(Class class1, ItemStack currentEquippedItem) { + this.parts = new ItemStack[16]; + this.parent = currentEquippedItem; + setUID(false); + readFromNBT(currentEquippedItem.getTagCompound()); +// for (int i = 0; i < def.length; i++) { +// def[i] = 0.0f; +// } + if(currentEquippedItem.getItem() instanceof ModularArmor_Item){ + data = ((ModularArmor_Item)currentEquippedItem.getItem()).data; + } + + } + + @Override + public int getSizeInventory() { + return this.parts.length; + } + + @Override + public ItemStack getStackInSlot(int i) { + return parts[i]; + } + + @Override + public ItemStack decrStackSize(int i, int j) { + if (parts[i] == null) { + return null; + } + + ItemStack product; + if (parts[i].stackSize <= j) { + product = parts[i]; + parts[i] = null; +// def = ArmorCalculation.calculateArmor(parts); + data.calculateArmor(parts); + return product; + } else { + product = parts[i].splitStack(j); + if (parts[i].stackSize == 0) { + parts[i] = null; + } +// def = ArmorCalculation.calculateArmor(parts); + data.calculateArmor(parts); + return product; + } + } + + @Override + public ItemStack getStackInSlotOnClosing(int slot) { + if (parts[slot] == null) { + return null; + } + ItemStack toReturn = parts[slot]; + parts[slot] = null; + return toReturn; + } + + @Override + public void setInventorySlotContents(int i, ItemStack itemstack) { + parts[i] = itemstack; +// def = ArmorCalculation.calculateArmor(parts); + data.calculateArmor(parts); + } + + @Override + public String getInventoryName() { + return "container.armor"; + } + + @Override + public boolean hasCustomInventoryName() { + return true; + } + + @Override + public int getInventoryStackLimit() { + return 1; + } + + @Override + public void markDirty() { + } + + @Override + public boolean isUseableByPlayer(EntityPlayer p_70300_1_) { + return true; + } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } + + @Override + public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { + return true; + } + + public void onGuiSaved(EntityPlayer entityplayer) { + parent = findParentInInventory(entityplayer); + if (parent != null) { + save(); + } + } + + public void save() { + NBTTagCompound nbt = parent.getTagCompound(); + if (nbt == null) { + nbt = new NBTTagCompound(); + } + writeToNBT(nbt); + ModularArmor_Item tmp = (ModularArmor_Item) parent.getItem(); + tmp.data.calculateArmor(parts); + parent.setTagCompound(nbt); + } + + public void writeToNBT(NBTTagCompound nbt) { + NBTTagList nbttaglist = new NBTTagList(); + for (int i = 0; i < parts.length; i++) { + if (parts[i] != null) { + NBTTagCompound nbttagcompound1 = new NBTTagCompound(); + nbttagcompound1.setByte("Slot", (byte) i); + parts[i].writeToNBT(nbttagcompound1); + nbttaglist.appendTag(nbttagcompound1); + } + } + nbt.setTag("Items", nbttaglist); + } + + public ItemStack findParentInInventory(EntityPlayer player) { + for (int i = 0; i < player.inventory.getSizeInventory(); i++) { + ItemStack stack = player.inventory.getStackInSlot(i); + if (isIdenticalItem(stack, parent)) { + return stack; + } + } + return parent; + } + + public static boolean isIdenticalItem(ItemStack lhs, ItemStack rhs) { + if (lhs == null || rhs == null) { + return false; + } + + if (lhs.getItem() != rhs.getItem()) { + return false; + } + + if (lhs.getItemDamage() != OreDictionary.WILDCARD_VALUE) { + if (lhs.getItemDamage() != rhs.getItemDamage()) { + return false; + } + } + + return ItemStack.areItemStackTagsEqual(lhs, rhs); + } + + public void readFromNBT(NBTTagCompound nbt) { + if (nbt == null) { + return; + } + if (nbt.hasKey("Items")) { + NBTTagList nbttaglist = nbt.getTagList("Items", 10); + parts = new ItemStack[getSizeInventory()]; + for (int i = 0; i < nbttaglist.tagCount(); i++) { + NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); + byte byte0 = nbttagcompound1.getByte("Slot"); + if (byte0 >= 0 && byte0 < parts.length) { + parts[byte0] = ItemStack.loadItemStackFromNBT(nbttagcompound1); + //parts[12]= UT.Fluids.display(UT.Fluids.water(1234), true); + } + } + } + + } + + protected void setUID(boolean override) { + if (parent.getTagCompound() == null) { + parent.setTagCompound(new NBTTagCompound()); + } + NBTTagCompound nbt = parent.getTagCompound(); + if (override || !nbt.hasKey("UID")) { + nbt.setInteger("UID", new Random().nextInt()); + } + } + + public static int getOccupiedSlotCount(ItemStack itemStack) { + NBTTagCompound nbt = itemStack.getTagCompound(); + if (nbt == null) { + return 0; + } + + int count = 0; + if (nbt.hasKey("Items")) { + NBTTagList nbttaglist = nbt.getTagList("Items", 10); + for (int i = 0; i < nbttaglist.tagCount(); i++) { + NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); + ItemStack itemStack1 = ItemStack.loadItemStackFromNBT(nbttagcompound1); + if (itemStack1 != null && itemStack1.stackSize > 0) { + count++; + } + } + } + return count; + } + +} diff --git a/src/main/java/gregtech/common/items/armor/gui/SlotArmor.java b/src/main/java/gregtech/common/items/armor/gui/SlotArmor.java new file mode 100644 index 0000000000..8e6d2d41e8 --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/gui/SlotArmor.java @@ -0,0 +1,18 @@ +package gregtech.common.items.armor.gui; + +import gregtech.common.items.armor.components.ArmorComponent; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class SlotArmor extends Slot{ + + public SlotArmor(IInventory par1iInventory, int par2, int par3, int par4) { + super(par1iInventory, par2, par3, par4); + } + + @Override + public boolean isItemValid(ItemStack par1ItemStack) { + return ArmorComponent.mStacks.containsKey(par1ItemStack.getUnlocalizedName()); + } +} diff --git a/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java b/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java new file mode 100644 index 0000000000..a3d2bdaf09 --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java @@ -0,0 +1,33 @@ +package gregtech.common.items.armor.gui; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import scala.reflect.internal.Trees.This; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.FluidRegistry; + +public class SlotFluid extends Slot{ + + public SlotFluid(IInventory inventory, int slot_index, int x, int y) { + super(inventory, slot_index, x, y); + } + + @Override + public boolean canTakeStack(EntityPlayer p_82869_1_) + { + return false; + } + + @Override + public boolean isItemValid(ItemStack p_75214_1_) + { + return false; + } + +} diff --git a/src/main/java/gregtech/common/items/armor/gui/SlotLocked.java b/src/main/java/gregtech/common/items/armor/gui/SlotLocked.java new file mode 100644 index 0000000000..14012d7674 --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/gui/SlotLocked.java @@ -0,0 +1,33 @@ +package gregtech.common.items.armor.gui; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + + +public class SlotLocked extends Slot{ + + public SlotLocked(IInventory par1iInventory, int par2, int par3, int par4) { + super(par1iInventory, par2, par3, par4); + } + @Override + public void onPickupFromSlot(EntityPlayer player, ItemStack itemStack) { + } + @Override + public boolean isItemValid(ItemStack par1ItemStack) { + return false; + } + @Override + public boolean getHasStack() { + return false; + } + @Override + public ItemStack decrStackSize(int i) { + return null; + } + + @Override + public boolean canTakeStack(EntityPlayer stack) { + return false;} + +} diff --git a/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java index e1fb3ef1db..d22490ddd4 100644 --- a/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java @@ -740,6 +740,21 @@ public class GT_CraftingRecipeLoader implements Runnable { if(Loader.isModLoaded("GraviSuite")){ GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getModItem("GraviSuite", "advNanoChestPlate", 1, GT_Values.W)); GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem("GraviSuite", "advNanoChestPlate", 1, GT_Values.W), new Object[]{"CJC","CNC","WPW",'C',OrePrefixes.plateAlloy.get(Materials.Carbon),'J',GT_ModHandler.getModItem("GraviSuite", "advJetpack", 1, GT_Values.W),'N',GT_ModHandler.getIC2Item("nanoBodyarmor", 1L),'W',OrePrefixes.wireGt04.get(Materials.Platinum),'P',OrePrefixes.circuit.get(Materials.Elite)}); - } + } + + long bits = GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE; + GT_ModHandler.addCraftingRecipe(ItemList.ModularBasicHelmet. getWildcard(1, new Object[0]),bits, new Object[] { "AAA", "B B", 'A', new ItemStack(Items.leather, 1, 32767), 'B', OrePrefixes.ring.get(Materials.AnyIron)} ); + GT_ModHandler.addCraftingRecipe(ItemList.ModularBasicChestplate. getWildcard(1, new Object[0]),bits, new Object[] { "A A", "BAB", "AAA", 'A', new ItemStack(Items.leather, 1, 32767), 'B', OrePrefixes.ring.get(Materials.AnyIron)} ); + GT_ModHandler.addCraftingRecipe(ItemList.ModularBasicLeggings. getWildcard(1, new Object[0]),bits, new Object[] { "BAB", "A A", "A A", 'A', new ItemStack(Items.leather, 1, 32767), 'B', OrePrefixes.ring.get(Materials.AnyIron)} ); + GT_ModHandler.addCraftingRecipe(ItemList.ModularBasicBoots. getWildcard(1, new Object[0]),bits, new Object[] { "A A", "B B", "A A", 'A', new ItemStack(Items.leather, 1, 32767), 'B', OrePrefixes.ring.get(Materials.AnyIron)} ); + GT_ModHandler.addCraftingRecipe(ItemList.ModularElectric1Helmet. getWildcard(1, new Object[0]),bits, new Object[] { "ACA", "B B", 'A', OrePrefixes.stick.get(Materials.Aluminium), 'B', OrePrefixes.plate.get(Materials.Steel), 'C', OrePrefixes.battery.get(Materials.Advanced)}); + GT_ModHandler.addCraftingRecipe(ItemList.ModularElectric1Chestplate.getWildcard(1, new Object[0]),bits, new Object[] { "A A", "BCB", "AAA", 'A', OrePrefixes.stick.get(Materials.Aluminium), 'B', OrePrefixes.plate.get(Materials.Steel), 'C', OrePrefixes.battery.get(Materials.Advanced)}); + GT_ModHandler.addCraftingRecipe(ItemList.ModularElectric1Leggings. getWildcard(1, new Object[0]),bits, new Object[] { "BCB", "A A", "A A", 'A', OrePrefixes.stick.get(Materials.Aluminium), 'B', OrePrefixes.plate.get(Materials.Steel), 'C', OrePrefixes.battery.get(Materials.Advanced)}); + GT_ModHandler.addCraftingRecipe(ItemList.ModularElectric1Boots. getWildcard(1, new Object[0]),bits, new Object[] { "A A", "BCB", "A A", 'A', OrePrefixes.stick.get(Materials.Aluminium), 'B', OrePrefixes.plate.get(Materials.Steel), 'C', OrePrefixes.battery.get(Materials.Advanced)}); + GT_ModHandler.addCraftingRecipe(ItemList.ModularElectric2Helmet. getWildcard(1, new Object[0]),bits, new Object[] { "ACA", "B B", 'A', OrePrefixes.stick.get(Materials.TungstenSteel), 'B', OrePrefixes.plateAlloy.get(Materials.Carbon),'C',OrePrefixes.battery.get(Materials.Master)}); + GT_ModHandler.addCraftingRecipe(ItemList.ModularElectric2Chestplate.getWildcard(1, new Object[0]),bits, new Object[] { "A A", "BCB", "AAA", 'A', OrePrefixes.stick.get(Materials.TungstenSteel), 'B', OrePrefixes.plateAlloy.get(Materials.Carbon),'C',OrePrefixes.battery.get(Materials.Master)}); + GT_ModHandler.addCraftingRecipe(ItemList.ModularElectric2Leggings. getWildcard(1, new Object[0]),bits, new Object[] { "BCB", "A A", "A A", 'A', OrePrefixes.stick.get(Materials.TungstenSteel), 'B', OrePrefixes.plateAlloy.get(Materials.Carbon),'C',OrePrefixes.battery.get(Materials.Master)}); + GT_ModHandler.addCraftingRecipe(ItemList.ModularElectric2Boots. getWildcard(1, new Object[0]),bits, new Object[] { "A A", "BCB", "A A", 'A', OrePrefixes.stick.get(Materials.TungstenSteel), 'B', OrePrefixes.plateAlloy.get(Materials.Carbon),'C',OrePrefixes.battery.get(Materials.Master)}); + } } diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java index 0a76375f4a..83d616e392 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java @@ -19,7 +19,6 @@ import gregtech.common.blocks.*; import gregtech.common.items.*; import gregtech.common.items.armor.ElectricModularArmor1; import gregtech.common.items.armor.ModularArmor_Item; -import gregtech.common.items.armor.Values; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; @@ -662,7 +661,6 @@ public class GT_Loader_Item_Block_And_Fluid GT_OreDictUnificator.set(OrePrefixes.gem, Materials.Amber, GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1L, 6)); GT_OreDictUnificator.set(OrePrefixes.gem, Materials.Firestone, GT_ModHandler.getModItem("Railcraft", "firestone.raw", 1L)); - new Values(); ItemList.ModularBasicHelmet.set(new ModularArmor_Item(0, 0, "modulararmor_helmet",0)); ItemList.ModularBasicChestplate.set(new ModularArmor_Item(0, 1, "modulararmor_chestplate",0)); ItemList.ModularBasicLeggings.set(new ModularArmor_Item(0, 2, "modulararmor_leggings",0)); @@ -676,21 +674,6 @@ public class GT_Loader_Item_Block_And_Fluid ItemList.ModularElectric2Leggings.set(new ElectricModularArmor1(0, 2, "modularelectric2_leggings",2)); ItemList.ModularElectric2Boots.set(new ElectricModularArmor1(0, 3, "modularelectric2_boots",2)); -// long bits = GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE; -// GT_ModHandler.addCraftingRecipe(ItemList.ModularBasicHelmet. getWildcard(1, new Object[0]),bits, new Object[] { "AAA", "B B", 'A', new ItemStack(Items.leather, 1, 32767), 'B', OrePrefixes.ring.get(Materials.AnyIron)} ); -// GT_ModHandler.addCraftingRecipe(ItemList.ModularBasicChestplate. getWildcard(1, new Object[0]),bits, new Object[] { "A A", "BAB", "AAA", 'A', new ItemStack(Items.leather, 1, 32767), 'B', OrePrefixes.ring.get(Materials.AnyIron)} ); -// GT_ModHandler.addCraftingRecipe(ItemList.ModularBasicLeggings. getWildcard(1, new Object[0]),bits, new Object[] { "BAB", "A A", "A A", 'A', new ItemStack(Items.leather, 1, 32767), 'B', OrePrefixes.ring.get(Materials.AnyIron)} ); -// GT_ModHandler.addCraftingRecipe(ItemList.ModularBasicBoots. getWildcard(1, new Object[0]),bits, new Object[] { "A A", "B B", "A A", 'A', new ItemStack(Items.leather, 1, 32767), 'B', OrePrefixes.ring.get(Materials.AnyIron)} ); -// GT_ModHandler.addCraftingRecipe(ItemList.ModularElectric1Helmet. getWildcard(1, new Object[0]),bits, new Object[] { "ACA", "B B", 'A', OrePrefixes.stick.get(Materials.Aluminium), 'B', OrePrefixes.plate.get(Materials.Steel), 'C', OrePrefixes.battery.get(Materials.Advanced)}); -// GT_ModHandler.addCraftingRecipe(ItemList.ModularElectric1Chestplate.getWildcard(1, new Object[0]),bits, new Object[] { "A A", "BCB", "AAA", 'A', OrePrefixes.stick.get(Materials.Aluminium), 'B', OrePrefixes.plate.get(Materials.Steel), 'C', OrePrefixes.battery.get(Materials.Advanced)}); -// GT_ModHandler.addCraftingRecipe(ItemList.ModularElectric1Leggings. getWildcard(1, new Object[0]),bits, new Object[] { "BCB", "A A", "A A", 'A', OrePrefixes.stick.get(Materials.Aluminium), 'B', OrePrefixes.plate.get(Materials.Steel), 'C', OrePrefixes.battery.get(Materials.Advanced)}); -// GT_ModHandler.addCraftingRecipe(ItemList.ModularElectric1Boots. getWildcard(1, new Object[0]),bits, new Object[] { "A A", "BCB", "A A", 'A', OrePrefixes.stick.get(Materials.Aluminium), 'B', OrePrefixes.plate.get(Materials.Steel), 'C', OrePrefixes.battery.get(Materials.Advanced)}); -// GT_ModHandler.addCraftingRecipe(ItemList.ModularElectric2Helmet. getWildcard(1, new Object[0]),bits, new Object[] { "ACA", "B B", 'A', OrePrefixes.stick.get(Materials.TungstenSteel), 'B', OrePrefixes.plateAlloy.get(Materials.Carbon),'C',OrePrefixes.battery.get(Materials.Master)}); -// GT_ModHandler.addCraftingRecipe(ItemList.ModularElectric2Chestplate.getWildcard(1, new Object[0]),bits, new Object[] { "A A", "BCB", "AAA", 'A', OrePrefixes.stick.get(Materials.TungstenSteel), 'B', OrePrefixes.plateAlloy.get(Materials.Carbon),'C',OrePrefixes.battery.get(Materials.Master)}); -// GT_ModHandler.addCraftingRecipe(ItemList.ModularElectric2Leggings. getWildcard(1, new Object[0]),bits, new Object[] { "BCB", "A A", "A A", 'A', OrePrefixes.stick.get(Materials.TungstenSteel), 'B', OrePrefixes.plateAlloy.get(Materials.Carbon),'C',OrePrefixes.battery.get(Materials.Master)}); -// GT_ModHandler.addCraftingRecipe(ItemList.ModularElectric2Boots. getWildcard(1, new Object[0]),bits, new Object[] { "A A", "BCB", "A A", 'A', OrePrefixes.stick.get(Materials.TungstenSteel), 'B', OrePrefixes.plateAlloy.get(Materials.Carbon),'C',OrePrefixes.battery.get(Materials.Master)}); - - if (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + "railcraft", "plateIron", true)) { GT_OreDictUnificator.set(OrePrefixes.plate, Materials.Iron, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 0)); } else { -- cgit From 7c1d44d835da800d8f170d992676cbe09ddd32b9 Mon Sep 17 00:00:00 2001 From: Danila Bolshakov Date: Tue, 1 Nov 2016 02:10:56 +0300 Subject: Maintenance does not change the machine color --- .../metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main/java/gregtech/api/metatileentity') 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 a8301af450..4edb0ae5a4 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 @@ -714,6 +714,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); if (aMetaTileEntity == null) return false; if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; return mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity); } return false; -- cgit From 7df5add5a90ca8f8b5f974306774927e7554bdee Mon Sep 17 00:00:00 2001 From: Timeslice42 Date: Fri, 4 Nov 2016 05:32:56 -0700 Subject: Re-add single-use batteries How did this get removed? >< --- src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index c45dca4aa8..60e918de4c 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -445,6 +445,12 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE for (int i = mMetaTileEntity.dechargerSlotStartIndex(), k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) { if (mMetaTileEntity.mInventory[i] != null && getStoredEU() < getEUCapacity()) { dischargeItem(mMetaTileEntity.mInventory[i]); + if(ic2.api.info.Info.itemEnergy.getEnergyValue(mMetaTileEntity.mInventory[i])>0){ + if((getStoredEU() + ic2.api.info.Info.itemEnergy.getEnergyValue(mMetaTileEntity.mInventory[i])) Date: Mon, 28 Nov 2016 15:03:39 +0200 Subject: Fixed #767. --- .../implementations/GT_MetaTileEntity_BasicGenerator.java | 5 +++-- src/main/java/gregtech/loaders/load/GT_FuelLoader.java | 11 ----------- 2 files changed, 3 insertions(+), 13 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java index 8acd6fd575..0017cbeace 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java @@ -192,9 +192,10 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity int tFuelValue = getFuelValue(mFluid), tConsumed = consumedFluidPerOperation(mFluid); if (tFuelValue > 0 && tConsumed > 0 && mFluid.amount > tConsumed) { long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUOutput() * 20 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue); - if (tFluidAmountToUse > 0 && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) - tProducedEU = tFluidAmountToUse * tFuelValue; + if (tFluidAmountToUse > 0 && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) { + tProducedEU = tFluidAmountToUse * tFuelValue; mFluid.amount -= tFluidAmountToUse * tConsumed; + } } } if (mInventory[getInputSlot()] != null && aBaseMetaTileEntity.getUniversalEnergyStored() < (maxEUOutput() * 20 + getMinimumStoredEU()) && GT_Utility.getFluidForFilledItem(mInventory[getInputSlot()], true) == null) { diff --git a/src/main/java/gregtech/loaders/load/GT_FuelLoader.java b/src/main/java/gregtech/loaders/load/GT_FuelLoader.java index ad6853baf0..a2504c7bfd 100644 --- a/src/main/java/gregtech/loaders/load/GT_FuelLoader.java +++ b/src/main/java/gregtech/loaders/load/GT_FuelLoader.java @@ -11,14 +11,9 @@ import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; -import ic2.core.Ic2Items; -import ic2.core.item.ItemFluidCell; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; public class GT_FuelLoader implements Runnable { @@ -39,13 +34,7 @@ public class GT_FuelLoader GT_Values.RA.addFuel(new ItemStack(Items.ghast_tear, 1), null, 50, 5); GT_Values.RA.addFuel(new ItemStack(Blocks.beacon, 1), null, Materials.NetherStar.mFuelPower * 2, Materials.NetherStar.mFuelType); GT_Values.RA.addFuel(GT_ModHandler.getModItem("EnderIO", "bucketRocket_fuel", 1), null, 250, 1); - if(!GregTech_API.mIC2Classic){ - GT_Values.RA.addFuel(ItemFluidCell.getUniversalFluidCell(new FluidStack(ItemList.sRocketFuel,1000)), Ic2Items.FluidCell.copy(), 250, 1); - } if(GregTech_API.mMagneticraft){ - Fluid tFluid = FluidRegistry.getFluid("naturalgas"); - if(tFluid!=null) - GT_Values.RA.addFuel(ItemFluidCell.getUniversalFluidCell(new FluidStack(tFluid,1000)), Ic2Items.FluidCell.copy(), 250, 1); GT_Values.RA.addFuel(GT_ModHandler.getModItem("Magneticraft", "item.bucket_light_oil", 1), null, 256, 0); GT_Values.RA.addFuel(GT_ModHandler.getModItem("Magneticraft", "item.bucket_heavy_oil", 1), null, 192, 3); } -- cgit From 3b5dfb6f7bd1865c68dcdfa7e0dc98a1625e596f Mon Sep 17 00:00:00 2001 From: David Vierra Date: Wed, 7 Dec 2016 14:21:31 -1000 Subject: Fix #785 - Unlimited EU in Dynamo Hatch I went with @Techlone's simple solution after all. Counting out the individual EU might make more sense if any of the multiblocks could have more than one dynamo hatch, but they don't, so this is just fine. --- .../implementations/GT_MetaTileEntity_MultiBlockBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/gregtech/api/metatileentity') 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 4edb0ae5a4..367ae25bac 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 @@ -492,7 +492,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { if (aEU <= 0) return true; for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { if (isValidMetaTileEntity(tHatch)) { - if (tHatch.getBaseMetaTileEntity().increaseStoredEnergyUnits(aEU, true)) { + if (tHatch.getBaseMetaTileEntity().increaseStoredEnergyUnits(aEU, false)) { return true; } } -- cgit From 1efd486dbbcf755f9c366e19222a89c7848a4264 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Tue, 13 Dec 2016 20:10:30 +0100 Subject: Disable markDirty function of TileEntitys http://forum.industrial-craft.net/index.php?page=Thread&postID=205162#post205162 --- src/main/java/gregtech/api/metatileentity/BaseTileEntity.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java index f60c24b23a..02f18ecaec 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java @@ -434,4 +434,7 @@ public abstract class BaseTileEntity extends TileEntity implements IHasWorldObje public final void setToFire() { worldObj.setBlock(xCoord, yCoord, zCoord, Blocks.fire); } + + @Override + public void markDirty() {/* Do not do the super Function */} } \ No newline at end of file -- cgit From 94cdcfe33cbeff485c659bdc4ecc1958b80a5bd9 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Tue, 27 Dec 2016 12:14:40 +0100 Subject: Fix fluid naquadah generator not consuming fuel --- .../implementations/GT_MetaTileEntity_BasicGenerator.java | 2 +- .../generators/GT_MetaTileEntity_FluidNaquadahReactor.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java index 0017cbeace..751a33e255 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java @@ -191,7 +191,7 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity } else { int tFuelValue = getFuelValue(mFluid), tConsumed = consumedFluidPerOperation(mFluid); if (tFuelValue > 0 && tConsumed > 0 && mFluid.amount > tConsumed) { - long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUOutput() * 20 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue); + long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue); if (tFluidAmountToUse > 0 && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) { tProducedEU = tFluidAmountToUse * tFuelValue; mFluid.amount -= tFluidAmountToUse * tConsumed; diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java index c2b8676c4d..46ebb56e9a 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java @@ -2,6 +2,7 @@ package gregtech.common.tileentities.generators; import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.GT_Values; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -43,6 +44,11 @@ public class GT_MetaTileEntity_FluidNaquadahReactor public int getEfficiency() { return mEfficiency; } + + @Override + public long maxEUStore() { + return Math.max(getEUVar(), GT_Values.V[mTier] * 120 + getMinimumStoredEU()); + } public void onConfigLoad() { this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "FluidNaquadah.efficiency.tier." + this.mTier, 100); -- cgit From 674a2aec839d1f9e93f02b75d5002fd4364f470a Mon Sep 17 00:00:00 2001 From: Andrew Ozmitel Date: Wed, 28 Dec 2016 20:03:05 +0300 Subject: Fix Blood-Asp/GT5-Unofficial#825 --- .../GT_MetaTileEntity_MultiBlockBase.java | 56 +++++++++++++--------- .../multi/GT_MetaTileEntity_AdvMiner2.java | 5 -- .../multi/GT_MetaTileEntity_AssemblyLine.java | 5 -- .../multi/GT_MetaTileEntity_Charcoal_Pit.java | 4 -- .../multi/GT_MetaTileEntity_DieselEngine.java | 6 --- .../multi/GT_MetaTileEntity_DistillationTower.java | 3 -- .../GT_MetaTileEntity_ElectricBlastFurnace.java | 4 -- .../multi/GT_MetaTileEntity_FusionComputer.java | 6 --- .../multi/GT_MetaTileEntity_HeatExchanger.java | 5 -- .../GT_MetaTileEntity_ImplosionCompressor.java | 4 -- .../multi/GT_MetaTileEntity_LargeBoiler.java | 4 -- .../multi/GT_MetaTileEntity_LargeTurbine.java | 6 --- .../multi/GT_MetaTileEntity_MultiFurnace.java | 4 -- .../multi/GT_MetaTileEntity_OilCracker.java | 5 -- .../machines/multi/GT_MetaTileEntity_OilDrill.java | 5 -- .../multi/GT_MetaTileEntity_ProcessingArray.java | 4 -- .../multi/GT_MetaTileEntity_PyrolyseOven.java | 5 -- .../multi/GT_MetaTileEntity_VacuumFreezer.java | 4 -- 18 files changed, 33 insertions(+), 102 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') 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 367ae25bac..b0aac0bc7e 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 @@ -116,18 +116,24 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { aNBT.setInteger("mPollution", mPollution); aNBT.setInteger("mRuntime", mRuntime); - if (mOutputItems != null) for (int i = 0; i < mOutputItems.length; i++) - if (mOutputItems[i] != null) { - NBTTagCompound tNBT = new NBTTagCompound(); - mOutputItems[i].writeToNBT(tNBT); - aNBT.setTag("mOutputItem" + i, tNBT); - } - if (mOutputFluids != null) for (int i = 0; i < mOutputFluids.length; i++) - if (mOutputFluids[i] != null) { - NBTTagCompound tNBT = new NBTTagCompound(); - mOutputFluids[i].writeToNBT(tNBT); - aNBT.setTag("mOutputFluids" + i, tNBT); - } + if (mOutputItems != null) { + aNBT.setInteger("mOutputItemsLength", mOutputItems.length); + for (int i = 0; i < mOutputItems.length; i++) + if (mOutputItems[i] != null) { + NBTTagCompound tNBT = new NBTTagCompound(); + mOutputItems[i].writeToNBT(tNBT); + aNBT.setTag("mOutputItem" + i, tNBT); + } + } + if (mOutputFluids != null) { + aNBT.setInteger("mOutputFluidsLength", mOutputFluids.length); + for (int i = 0; i < mOutputFluids.length; i++) + if (mOutputFluids[i] != null) { + NBTTagCompound tNBT = new NBTTagCompound(); + mOutputFluids[i].writeToNBT(tNBT); + aNBT.setTag("mOutputFluids" + i, tNBT); + } + } aNBT.setBoolean("mWrench", mWrench); aNBT.setBoolean("mScrewdriver", mScrewdriver); aNBT.setBoolean("mSoftHammer", mSoftHammer); @@ -146,11 +152,21 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { mEfficiency = aNBT.getInteger("mEfficiency"); mPollution = aNBT.getInteger("mPollution"); mRuntime = aNBT.getInteger("mRuntime"); - mOutputItems = new ItemStack[getAmountOfOutputs()]; - for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i); - mOutputFluids = new FluidStack[getAmountOfOutputs()]; - for (int i = 0; i < mOutputFluids.length; i++) - mOutputFluids[i] = GT_Utility.loadFluid(aNBT, "mOutputFluids" + i); + + int aOutputItemsLength = aNBT.getInteger("mOutputItemsLength"); + if (aOutputItemsLength > 0) { + mOutputItems = new ItemStack[aOutputItemsLength]; + for (int i = 0; i < mOutputItems.length; i++) + mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i); + } + + int aOutputFluidsLength = aNBT.getInteger("mOutputFluidsLength"); + if (aOutputFluidsLength > 0) { + mOutputFluids = new FluidStack[aOutputFluidsLength]; + for (int i = 0; i < mOutputFluids.length; i++) + mOutputFluids[i] = GT_Utility.loadFluid(aNBT, "mOutputFluids" + i); + } + mWrench = aNBT.getBoolean("mWrench"); mScrewdriver = aNBT.getBoolean("mScrewdriver"); mSoftHammer = aNBT.getBoolean("mSoftHammer"); @@ -350,12 +366,6 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { */ public abstract int getDamageToComponent(ItemStack aStack); - /** - * Gets the Amount of possibly outputted Items for loading the Output Stack Array from NBT. - * This should be the largest Amount that can ever happen legitimately. - */ - public abstract int getAmountOfOutputs(); - /** * If it explodes when the Component has to be replaced. */ 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 index 8d3f5cb1fa..2fe1a3e273 100644 --- 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 @@ -329,11 +329,6 @@ public class GT_MetaTileEntity_AdvMiner2 extends GT_MetaTileEntity_MultiBlockBas return 0; } - @Override - public int getAmountOfOutputs() { - return 0; - } - @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return false; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java index 97f3f89ecc..e305af1eb9 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java @@ -228,11 +228,6 @@ public class GT_MetaTileEntity_AssemblyLine public int getDamageToComponent(ItemStack aStack) { return 0; } - - public int getAmountOfOutputs() { - return 2; - } - public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java index fbb1b98601..6196d44f98 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java @@ -218,10 +218,6 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock return 0; } - public int getAmountOfOutputs() { - return 1; - } - public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java index a7ea6a68e5..adcede79ba 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java @@ -218,12 +218,6 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock public int getPollutionPerTick(ItemStack aStack) { return 15; } - - @Override - public int getAmountOfOutputs() { - return 0; - } - @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return true; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java index 246df6707c..22dd01c755 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java @@ -197,9 +197,6 @@ public class GT_MetaTileEntity_DistillationTower return 0; } - public int getAmountOfOutputs() { - return 1; - } public boolean explodesOnComponentBreak(ItemStack aStack) { return false; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java index b316383d94..a1c2543723 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java @@ -229,10 +229,6 @@ public class GT_MetaTileEntity_ElectricBlastFurnace return 0; } - public int getAmountOfOutputs() { - return 2; - } - public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java index 1803ab0b15..d5f53fee12 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java @@ -417,12 +417,6 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity public int getDamageToComponent(ItemStack aStack) { return 0; } - - @Override - public int getAmountOfOutputs() { - return 0; - } - @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return false; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java index f086d33aa4..30a98f096b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java @@ -275,11 +275,6 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_MultiBloc public int getDamageToComponent(ItemStack aStack) { return 0; } - - public int getAmountOfOutputs() { - return 1; - } - public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java index 37d93815e6..5c0a028e72 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java @@ -146,10 +146,6 @@ public class GT_MetaTileEntity_ImplosionCompressor return 0; } - public int getAmountOfOutputs() { - return 2; - } - public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java index db1134632e..8573de7c73 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java @@ -233,10 +233,6 @@ public abstract class GT_MetaTileEntity_LargeBoiler return 0; } - public int getAmountOfOutputs() { - return 1; - } - public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java index f240ec5bb7..13595cbcd3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java @@ -188,12 +188,6 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M } return 0; } - - @Override - public int getAmountOfOutputs() { - return 0; - } - @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return true; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java index 5677c3a7e3..1570142f44 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java @@ -188,10 +188,6 @@ public class GT_MetaTileEntity_MultiFurnace return 0; } - public int getAmountOfOutputs() { - return 128; - } - public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java index e917ab7a7f..c9ccea1bba 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java @@ -231,11 +231,6 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBa return 0; } - @Override - public int getAmountOfOutputs() { - return 0; - } - @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return false; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java index b0f506f7ff..d90093fcd6 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java @@ -221,11 +221,6 @@ public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase return 0; } - @Override - public int getAmountOfOutputs() { - return 0; - } - @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return false; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java index 79f98c3230..774635feab 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java @@ -313,10 +313,6 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl return 0; } - public int getAmountOfOutputs() { - return 1; - } - public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java index e8b838256f..c19307c43b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java @@ -173,11 +173,6 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock return 0; } - @Override - public int getAmountOfOutputs() { - return 0; - } - @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return false; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java index 9c1d539969..e6b3992a9c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java @@ -140,10 +140,6 @@ public class GT_MetaTileEntity_VacuumFreezer return 0; } - public int getAmountOfOutputs() { - return 1; - } - public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } -- cgit From 5af9a6718cec09a5955b88aefd7142e16bc040c8 Mon Sep 17 00:00:00 2001 From: vlad20012 Date: Tue, 10 Jan 2017 11:34:46 +0300 Subject: Fix #816 obfuscated field name --- .../api/metatileentity/BaseMetaTileEntity.java | 27 ++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index 60e918de4c..3b2f37085a 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -66,6 +66,26 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE private String mOwnerName = ""; private NBTTagCompound mRecipeStuff = new NBTTagCompound(); + private static final Field ENTITY_ITEM_HEALTH_FIELD; + static + { + Field f = null; + + try { + f = EntityItem.class.getDeclaredField("field_70291_e"); + f.setAccessible(true); + } catch (Exception e1) { + try { + f = EntityItem.class.getDeclaredField("health"); + f.setAccessible(true); + } catch (Exception e2) { + e1.printStackTrace(); + e2.printStackTrace(); + } + } + ENTITY_ITEM_HEALTH_FIELD = f; + } + public BaseMetaTileEntity() { } @@ -1144,10 +1164,9 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE tItemEntity.hurtResistantTime = 999999; tItemEntity.lifespan = 60000; try { - Field tField = tItemEntity.getClass().getDeclaredField("health"); - tField.setAccessible(true); - tField.setInt(tItemEntity, 99999999); - } catch (Exception e) {e.printStackTrace();} + if(ENTITY_ITEM_HEALTH_FIELD != null) + ENTITY_ITEM_HEALTH_FIELD.setInt(tItemEntity, 99999999); + } catch (Exception ignored) {} this.worldObj.spawnEntityInWorld(tItemEntity); tItem.stackSize = 0; } -- cgit From 6567820a9b2dde53ccf92697857135caef1aff7e Mon Sep 17 00:00:00 2001 From: Maxime Legkiy Date: Tue, 7 Feb 2017 13:34:31 +0300 Subject: Fix generating Pollution in to other worlds --- .../gregtech/api/metatileentity/BaseMetaTileEntity.java | 2 +- .../implementations/GT_MetaTileEntity_BasicGenerator.java | 2 +- .../implementations/GT_MetaTileEntity_Hatch_Muffler.java | 2 +- src/main/java/gregtech/api/util/GT_Utility.java | 2 +- src/main/java/gregtech/common/GT_Pollution.java | 13 ++++++++++--- .../boilers/GT_MetaTileEntity_Boiler_Bronze.java | 2 +- .../tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java | 2 +- .../boilers/GT_MetaTileEntity_Boiler_Steel.java | 2 +- .../multi/GT_MetaTileEntity_BronzeBlastFurnace.java | 2 +- .../machines/multi/GT_MetaTileEntity_Charcoal_Pit.java | 2 +- 10 files changed, 19 insertions(+), 12 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index 3b2f37085a..4aa49a954c 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -1146,7 +1146,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE } } } - GT_Pollution.addPollution(new ChunkPosition(getXCoord(), getYCoord(), getZCoord()), 100000); + GT_Pollution.addPollution(getWorld(), new ChunkPosition(getXCoord(), getYCoord(), getZCoord()), 100000); mMetaTileEntity.doExplosion(aAmount); } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java index 751a33e255..bd5b8d9ea6 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java @@ -210,7 +210,7 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity } } if(tProducedEU>0&&getPollution()>0){ - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), (int) ((tProducedEU * getPollution()/(500*mTier))+1)); } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java index 319b549d38..7246a58c26 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java @@ -61,7 +61,7 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { public boolean polluteEnvironment() { if(getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing())){ - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), calculatePollutionReduction(10000)); + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), calculatePollutionReduction(10000)); return true; } return false; diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index ba43153217..0bc98d457f 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1781,7 +1781,7 @@ public class GT_Utility { tList.add("Oil in Chunk: " + tFluid.amount + " " + tFluid.getLocalizedName()); } // if(aPlayer.capabilities.isCreativeMode){ - ChunkPosition tPos = new ChunkPosition(aX>>4, 1, aZ>>4); + ChunkPosition tPos = new ChunkPosition(getScaleСoordinates(aX,16), aWorld.provider.dimensionId+1, getScaleСoordinates(aZ,16)); if(GT_Proxy.chunkData.containsKey(tPos)){ int[] tPollution = GT_Proxy.chunkData.get(tPos); if(tPollution.length>1){ diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index 25b7521721..0c21e1ec6a 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -9,6 +9,7 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Blocks; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; +import net.minecraft.server.MinecraftServer; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; @@ -187,12 +188,18 @@ public class GT_Pollution { else if(tBlock == Blocks.gravel){world.setBlock(x, y, z, Blocks.sand); } } } - + + //Backward compatibility (NOT USE) public static void addPollution(ChunkPosition aPos, int aPollution){ + addPollution(MinecraftServer.getServer().worldServerForDimension(0), aPos, aPollution); + } + + //Add aWorld to Save Pollution + public static void addPollution(World aWorld, ChunkPosition aPos, int aPollution){ if(!GT_Mod.gregtechproxy.mPollution)return; try{ - ChunkPosition tPos = new ChunkPosition(aPos.chunkPosX>>4, 1, aPos.chunkPosZ>>4); -// System.out.println("add pollution x: "+ tPos.chunkPosX +" z: " + tPos.chunkPosZ +" poll: "+aPollution); + ChunkPosition tPos = new ChunkPosition(GT_Utility.getScaleСoordinates(aPos.chunkPosX,16), aWorld.provider.dimensionId + 1, GT_Utility.getScaleСoordinates(aPos.chunkPosZ,16)); // OLD in coordinate -1 -1 chunk 0 0 +// System.out.println("add pollution dim: "+aWorld.provider.dimensionId+" x: "+ tPos.chunkPosX +" z: " + tPos.chunkPosZ +" poll: "+aPollution); int[] tData = new int[2]; if(GT_Proxy.chunkData.containsKey(tPos)){ tData = GT_Proxy.chunkData.get(tPos); diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java index 776f71761e..5c6fdeeb33 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java @@ -141,7 +141,7 @@ public class GT_MetaTileEntity_Boiler_Bronze this.mTemperature += 1; } if(this.mProcessingEnergy>0 && (aTick % 20L == 0L)){ - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); } aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); } diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java index 8480b03733..2806cbc943 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java @@ -120,7 +120,7 @@ public class GT_MetaTileEntity_Boiler_Lava } if(this.mProcessingEnergy>0 && (aTick % 20L == 0L)){ - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); } aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); } diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java index 4016e7be35..c5ad432ad7 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java @@ -146,7 +146,7 @@ public class GT_MetaTileEntity_Boiler_Steel this.mTemperature += 1; } if(this.mProcessingEnergy>0 && (aTick % 20L == 0L)){ - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); } aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java index 89b9adaa7e..7efc667ade 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java @@ -209,7 +209,7 @@ public class GT_MetaTileEntity_BronzeBlastFurnace } } if(this.mMaxProgresstime>0 && (aTimer % 20L == 0L)){ - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 50); + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 50); } aBaseMetaTileEntity.setActive((this.mMaxProgresstime > 0) && (this.mMachine)); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java index 22d901f13a..9c4881d18c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java @@ -86,7 +86,7 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock this.mEfficiency = 10000; this.mEfficiencyIncrease = 10000; this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), mMaxProgresstime*5); + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), mMaxProgresstime*5); return true; } else { this.mEfficiency = 0; -- cgit From 81abe867b0dd21e42e60ec8fb7d9a7acebe25d65 Mon Sep 17 00:00:00 2001 From: Techlone Date: Sat, 11 Feb 2017 03:41:36 +0500 Subject: Add support of reactor chambers in GT transformers --- .../metatileentity/implementations/GT_MetaTileEntity_Transformer.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java index d91aafaacc..31cf58ad06 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java @@ -12,6 +12,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; import ic2.api.energy.tile.IEnergySource; +import ic2.api.reactor.IReactorChamber; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -142,6 +143,9 @@ public class GT_MetaTileEntity_Transformer extends GT_MetaTileEntity_TieredMachi for (byte i = 0; i < 6 && aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity(); i++) if (aBaseMetaTileEntity.inputEnergyFrom(i)) { TileEntity tTileEntity = aBaseMetaTileEntity.getTileEntityAtSide(i); + if (tTileEntity instanceof IReactorChamber) { + tTileEntity = (TileEntity) ((IReactorChamber) tTileEntity).getReactor(); + } if (tTileEntity instanceof IEnergySource && ((IEnergySource) tTileEntity).emitsEnergyTo((TileEntity) aBaseMetaTileEntity, ForgeDirection.getOrientation(GT_Utility.getOppositeSide(i)))) { long tEU = Math.min(maxEUInput(), (long) ((IEnergySource) tTileEntity).getOfferedEnergy()); ((IEnergySource) tTileEntity).drawEnergy(tEU); -- cgit From 4e043f617b729fec6e011b0840657da434cafd27 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Tue, 28 Feb 2017 02:04:47 +0100 Subject: Circuit changes --- build.properties | 2 +- src/main/java/gregtech/GT_Mod.java | 3 +- src/main/java/gregtech/api/enums/ItemList.java | 10 +- src/main/java/gregtech/api/enums/Materials.java | 10 +- src/main/java/gregtech/api/enums/OrePrefixes.java | 6 +- src/main/java/gregtech/api/enums/Tier.java | 14 +- .../api/interfaces/internal/IGT_RecipeAdder.java | 25 ++- .../GT_MetaTileEntity_BasicMachine.java | 8 + src/main/java/gregtech/api/util/GT_Recipe.java | 3 +- src/main/java/gregtech/api/util/GT_Utility.java | 8 +- src/main/java/gregtech/common/GT_Pollution.java | 2 +- src/main/java/gregtech/common/GT_Proxy.java | 3 +- src/main/java/gregtech/common/GT_RecipeAdder.java | 26 ++- .../common/items/GT_IntegratedCircuit_Item.java | 2 +- .../common/items/GT_MetaGenerated_Item_01.java | 37 +++-- .../common/items/GT_MetaGenerated_Item_03.java | 174 ++++++++++++++++++++ .../GT_MetaTileEntity_AdvSeismicProspector.java | 10 +- .../basic/GT_MetaTileEntity_Disassembler.java | 14 +- .../multi/GT_MetaTileEntity_Cleanroom.java | 18 +- .../loaders/oreprocessing/ProcessingCircuit.java | 23 ++- .../loaders/oreprocessing/ProcessingCrafting.java | 29 +++- .../loaders/oreprocessing/ProcessingGem.java | 2 +- .../loaders/oreprocessing/ProcessingLens.java | 3 +- .../loaders/oreprocessing/ProcessingPlate.java | 2 + .../loaders/postload/GT_CraftingRecipeLoader.java | 2 +- .../loaders/postload/GT_MachineRecipeLoader.java | 182 ++++++++++++++++++--- .../preload/GT_Loader_MetaTileEntities.java | 11 ++ .../java/gregtech/nei/GT_NEI_DefaultHandler.java | 10 +- .../circuitassembler/OVERLAY_BOTTOM.png | Bin 0 -> 143 bytes .../circuitassembler/OVERLAY_BOTTOM_ACTIVE.png | Bin 0 -> 143 bytes .../circuitassembler/OVERLAY_FRONT.png | Bin 0 -> 319 bytes .../circuitassembler/OVERLAY_FRONT_ACTIVE.png | Bin 0 -> 329 bytes .../circuitassembler/OVERLAY_SIDE.png | Bin 0 -> 143 bytes .../circuitassembler/OVERLAY_SIDE_ACTIVE.png | Bin 0 -> 143 bytes .../basicmachines/circuitassembler/OVERLAY_TOP.png | Bin 0 -> 311 bytes .../circuitassembler/OVERLAY_TOP_ACTIVE.png | Bin 0 -> 311 bytes .../gui/basicmachines/CircuitAssembler.png | Bin 0 -> 2437 bytes .../gregtech/textures/items/gt.metaitem.01/700.png | Bin 231 -> 1378 bytes .../gregtech/textures/items/gt.metaitem.01/703.png | Bin 319 -> 356 bytes .../gregtech/textures/items/gt.metaitem.01/705.png | Bin 348 -> 4051 bytes .../gregtech/textures/items/gt.metaitem.01/706.png | Bin 364 -> 4039 bytes .../gregtech/textures/items/gt.metaitem.01/710.png | Bin 223 -> 773 bytes .../gregtech/textures/items/gt.metaitem.01/711.png | Bin 223 -> 736 bytes .../gregtech/textures/items/gt.metaitem.01/712.png | Bin 252 -> 750 bytes .../gregtech/textures/items/gt.metaitem.01/715.png | Bin 273 -> 555 bytes .../gregtech/textures/items/gt.metaitem.01/716.png | Bin 441 -> 663 bytes .../gregtech/textures/items/gt.metaitem.01/717.png | Bin 450 -> 997 bytes .../gregtech/textures/items/gt.metaitem.01/718.png | Bin 520 -> 1064 bytes .../gregtech/textures/items/gt.metaitem.01/719.png | Bin 277 -> 738 bytes .../gregtech/textures/items/gt.metaitem.01/720.png | Bin 331 -> 708 bytes .../gregtech/textures/items/gt.metaitem.03/1.png | Bin 0 -> 773 bytes .../gregtech/textures/items/gt.metaitem.03/10.png | Bin 0 -> 663 bytes .../gregtech/textures/items/gt.metaitem.03/11.png | Bin 0 -> 1155 bytes .../gregtech/textures/items/gt.metaitem.03/12.png | Bin 0 -> 1403 bytes .../gregtech/textures/items/gt.metaitem.03/13.png | Bin 0 -> 1378 bytes .../gregtech/textures/items/gt.metaitem.03/14.png | Bin 0 -> 1067 bytes .../gregtech/textures/items/gt.metaitem.03/15.png | Bin 0 -> 555 bytes .../gregtech/textures/items/gt.metaitem.03/16.png | Bin 0 -> 1127 bytes .../gregtech/textures/items/gt.metaitem.03/17.png | Bin 0 -> 997 bytes .../gregtech/textures/items/gt.metaitem.03/18.png | Bin 0 -> 1150 bytes .../gregtech/textures/items/gt.metaitem.03/19.png | Bin 0 -> 1064 bytes .../gregtech/textures/items/gt.metaitem.03/2.png | Bin 0 -> 736 bytes .../gregtech/textures/items/gt.metaitem.03/20.png | Bin 0 -> 1175 bytes .../gregtech/textures/items/gt.metaitem.03/3.png | Bin 0 -> 750 bytes .../gregtech/textures/items/gt.metaitem.03/30.png | Bin 0 -> 985 bytes .../gregtech/textures/items/gt.metaitem.03/31.png | Bin 0 -> 1098 bytes .../gregtech/textures/items/gt.metaitem.03/32.png | Bin 0 -> 1070 bytes .../gregtech/textures/items/gt.metaitem.03/33.png | Bin 0 -> 1182 bytes .../gregtech/textures/items/gt.metaitem.03/34.png | Bin 0 -> 1275 bytes .../gregtech/textures/items/gt.metaitem.03/35.png | Bin 0 -> 1269 bytes .../gregtech/textures/items/gt.metaitem.03/36.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/37.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/38.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/39.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/4.png | Bin 0 -> 738 bytes .../gregtech/textures/items/gt.metaitem.03/40.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/41.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/42.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/43.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/44.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/45.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/46.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/47.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/48.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/49.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/5.png | Bin 0 -> 708 bytes .../gregtech/textures/items/gt.metaitem.03/50.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/51.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/52.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/53.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/54.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/55.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/56.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/57.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/6.png | Bin 0 -> 764 bytes .../gregtech/textures/items/gt.metaitem.03/69.png | Bin 0 -> 435 bytes .../gregtech/textures/items/gt.metaitem.03/70.png | Bin 0 -> 435 bytes .../gregtech/textures/items/gt.metaitem.03/700.png | Bin 0 -> 231 bytes .../gregtech/textures/items/gt.metaitem.03/701.png | Bin 0 -> 292 bytes .../gregtech/textures/items/gt.metaitem.03/703.png | Bin 0 -> 319 bytes .../gregtech/textures/items/gt.metaitem.03/704.png | Bin 0 -> 315 bytes .../gregtech/textures/items/gt.metaitem.03/705.png | Bin 0 -> 348 bytes .../gregtech/textures/items/gt.metaitem.03/707.png | Bin 0 -> 375 bytes .../gregtech/textures/items/gt.metaitem.03/708.png | Bin 0 -> 338 bytes .../gregtech/textures/items/gt.metaitem.03/71.png | Bin 0 -> 461 bytes .../gregtech/textures/items/gt.metaitem.03/710.png | Bin 0 -> 223 bytes .../gregtech/textures/items/gt.metaitem.03/711.png | Bin 0 -> 223 bytes .../gregtech/textures/items/gt.metaitem.03/712.png | Bin 0 -> 252 bytes .../gregtech/textures/items/gt.metaitem.03/713.png | Bin 0 -> 435 bytes .../gregtech/textures/items/gt.metaitem.03/714.png | Bin 0 -> 461 bytes .../gregtech/textures/items/gt.metaitem.03/715.png | Bin 0 -> 273 bytes .../gregtech/textures/items/gt.metaitem.03/716.png | Bin 0 -> 441 bytes .../gregtech/textures/items/gt.metaitem.03/717.png | Bin 0 -> 450 bytes .../gregtech/textures/items/gt.metaitem.03/718.png | Bin 0 -> 520 bytes .../gregtech/textures/items/gt.metaitem.03/719.png | Bin 0 -> 277 bytes .../gregtech/textures/items/gt.metaitem.03/72.png | Bin 0 -> 252 bytes .../gregtech/textures/items/gt.metaitem.03/720.png | Bin 0 -> 331 bytes .../gregtech/textures/items/gt.metaitem.03/73.png | Bin 0 -> 9505 bytes .../gregtech/textures/items/gt.metaitem.03/79.png | Bin 0 -> 321 bytes .../gregtech/textures/items/gt.metaitem.03/80.png | Bin 0 -> 319 bytes .../gregtech/textures/items/gt.metaitem.03/82.png | Bin 0 -> 323 bytes .../gregtech/textures/items/gt.metaitem.03/83.png | Bin 0 -> 358 bytes .../gregtech/textures/items/gt.metaitem.03/85.png | Bin 0 -> 319 bytes .../gregtech/textures/items/gt.metaitem.03/86.png | Bin 0 -> 348 bytes .../gregtech/textures/items/gt.metaitem.03/88.png | Bin 0 -> 4043 bytes .../gregtech/textures/items/gt.metaitem.03/89.png | Bin 0 -> 325 bytes .../gregtech/textures/items/gt.metaitem.03/90.png | Bin 0 -> 364 bytes .../gregtech/textures/items/gt.metaitem.03/91.png | Bin 0 -> 4059 bytes .../gregtech/textures/items/gt.metaitem.03/92.png | Bin 0 -> 320 bytes .../gregtech/textures/items/gt.metaitem.03/93.png | Bin 0 -> 350 bytes .../gregtech/textures/items/gt.metaitem.03/95.png | Bin 0 -> 4062 bytes 131 files changed, 537 insertions(+), 102 deletions(-) create mode 100644 src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_BOTTOM.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_BOTTOM_ACTIVE.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_FRONT.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_FRONT_ACTIVE.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_SIDE.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_SIDE_ACTIVE.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_TOP.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_TOP_ACTIVE.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/basicmachines/CircuitAssembler.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/1.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/10.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/11.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/12.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/13.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/14.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/15.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/16.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/17.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/18.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/19.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/2.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/20.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/3.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/30.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/31.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/32.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/33.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/34.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/35.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/36.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/37.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/38.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/39.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/4.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/40.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/41.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/42.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/43.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/44.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/45.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/46.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/47.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/48.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/49.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/5.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/50.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/51.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/52.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/53.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/54.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/55.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/56.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/57.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/6.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/69.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/70.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/700.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/701.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/703.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/704.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/705.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/707.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/708.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/71.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/710.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/711.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/712.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/713.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/714.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/715.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/716.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/717.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/718.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/719.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/72.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/720.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/73.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/79.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/80.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/82.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/83.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/85.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/86.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/88.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/89.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/90.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/91.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/92.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/93.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/95.png (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/build.properties b/build.properties index ea38d5b8a2..65af08acaa 100644 --- a/build.properties +++ b/build.properties @@ -1,7 +1,7 @@ minecraft.version=1.7.10 forge.version=10.13.4.1566-1.7.10 -gt.version=5.09.28pre3 +gt.version=5.09.28pre5 ae2.version=rv2-beta-33 applecore.version=1.7.10-1.2.1+107.59407 diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index ef0635bc2d..734c6b5c4f 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -254,7 +254,8 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.mExplosionItemDrop = tMainConfig.get("general", "ExplosionItemDrops", false).getBoolean(false); gregtechproxy.mAddGTRecipesToIC2Machines = tMainConfig.get("general", "AddGTRecipesToIC2Machines", true).getBoolean(true); gregtechproxy.mUndergroundOil.getConfig(tMainConfig, "undergroundfluid"); - + gregtechproxy.mLowGravProcessing = Loader.isModLoaded(GT_Values.MOD_ID_GC_CORE) && tMainConfig.get("general", "LowGravProcessing", true).getBoolean(true); + GregTech_API.mOutputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "OutputRF", true); GregTech_API.mInputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "InputRF", false); GregTech_API.mEUtoRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "100EUtoRF", 360); diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index 734e68f786..e093815b5b 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -640,7 +640,15 @@ public enum ItemList implements IItemContainer { ModularElectric1Helmet, ModularElectric1Chestplate, ModularElectric1Leggings, ModularElectric1Boots, ModularElectric2Helmet, ModularElectric2Chestplate, ModularElectric2Leggings, ModularElectric2Boots, Block_Powderbarrel, GelledToluene, FluidRegulator_LV, FluidRegulator_MV, FluidRegulator_HV, FluidRegulator_EV, FluidRegulator_IV, FluidRegulator_LuV, FluidRegulator_ZPM, FluidRegulator_UV, FluidFilter, CuringOven, Machine_Multi_Assemblyline, Machine_Multi_DieselEngine, QuantumEye, QuantumStar, Gravistar, Block_SSFUEL, Block_MSSFUEL, SFMixture, MSFMixture, Depleted_Naquadah_1, Depleted_Naquadah_2, Depleted_Naquadah_4, NaquadahCell_1, NaquadahCell_2, NaquadahCell_4, Hatch_AutoMaintenance, - Machine_Multi_Cleanroom; + Machine_Multi_Cleanroom, Circuit_Board_Coated, Circuit_Board_Phenolic, Circuit_Board_Epoxy, Circuit_Board_Fiberglass, Circuit_Board_Multifiberglass, Circuit_Board_Wetware, + Circuit_Parts_Resistor, Circuit_Parts_ResistorSMD, Circuit_Parts_Glass_Tube, Circuit_Parts_Vacuum_Tube, Circuit_Parts_Coil, Circuit_Parts_Diode, Circuit_Parts_DiodeSMD, Circuit_Parts_Transistor, Circuit_Parts_TransistorSMD, Circuit_Parts_Capacitor, Circuit_Parts_CapacitorSMD, + Circuit_Silicon_Ingot, Circuit_Silicon_Ingot2, Circuit_Silicon_Ingot3, Circuit_Silicon_Wafer, Circuit_Silicon_Wafer2, Circuit_Silicon_Wafer3, Circuit_Wafer_ILC, Circuit_Chip_ILC, Circuit_Wafer_Ram, Circuit_Chip_Ram, + Circuit_Wafer_NAND, Circuit_Chip_NAND, Circuit_Wafer_NOR, Circuit_Chip_NOR, Circuit_Wafer_CPU, Circuit_Chip_CPU, Circuit_Wafer_SoC, Circuit_Chip_SoC, Circuit_Wafer_SoC2, Circuit_Chip_SoC2, Circuit_Wafer_PIC, Circuit_Chip_PIC, + 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, + 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; public static final ItemList[] DYE_ONLY_ITEMS = {Color_00, Color_01, Color_02, Color_03, Color_04, Color_05, Color_06, Color_07, Color_08, Color_09, Color_10, Color_11, Color_12, Color_13, Color_14, Color_15}, SPRAY_CAN_DYES = {Spray_Color_00, Spray_Color_01, Spray_Color_02, Spray_Color_03, Spray_Color_04, Spray_Color_05, Spray_Color_06, Spray_Color_07, Spray_Color_08, Spray_Color_09, Spray_Color_10, Spray_Color_11, Spray_Color_12, Spray_Color_13, Spray_Color_14, Spray_Color_15}, SPRAY_CAN_DYES_USED = {Spray_Color_Used_00, Spray_Color_Used_01, Spray_Color_Used_02, Spray_Color_Used_03, Spray_Color_Used_04, Spray_Color_Used_05, Spray_Color_Used_06, Spray_Color_Used_07, Spray_Color_Used_08, Spray_Color_Used_09, Spray_Color_Used_10, Spray_Color_Used_11, Spray_Color_Used_12, Spray_Color_Used_13, Spray_Color_Used_14, Spray_Color_Used_15}, TRANSFORMERS = {Transformer_LV_ULV, Transformer_MV_LV, Transformer_HV_MV, Transformer_EV_HV, Transformer_IV_EV, Transformer_LuV_IV, Transformer_ZPM_LuV, Transformer_UV_ZPM, Transformer_MAX_UV}, MACHINE_HULLS = {Hull_ULV, Hull_LV, Hull_MV, Hull_HV, Hull_EV, Hull_IV, Hull_LuV, Hull_ZPM, Hull_UV, Hull_MAX}, HATCHES_DYNAMO = {Hatch_Dynamo_ULV, Hatch_Dynamo_LV, Hatch_Dynamo_MV, Hatch_Dynamo_HV, Hatch_Dynamo_EV, Hatch_Dynamo_IV, Hatch_Dynamo_LuV, Hatch_Dynamo_ZPM, Hatch_Dynamo_UV, Hatch_Dynamo_MAX}, HATCHES_ENERGY = {Hatch_Energy_ULV, Hatch_Energy_LV, Hatch_Energy_MV, Hatch_Energy_HV, Hatch_Energy_EV, Hatch_Energy_IV, Hatch_Energy_LuV, Hatch_Energy_ZPM, Hatch_Energy_UV, Hatch_Energy_MAX}, HATCHES_INPUT = {Hatch_Input_ULV, Hatch_Input_LV, Hatch_Input_MV, Hatch_Input_HV, Hatch_Input_EV, Hatch_Input_IV, Hatch_Input_LuV, Hatch_Input_ZPM, Hatch_Input_UV, Hatch_Input_MAX}, HATCHES_INPUT_BUS = {Hatch_Input_Bus_ULV, Hatch_Input_Bus_LV, Hatch_Input_Bus_MV, Hatch_Input_Bus_HV, Hatch_Input_Bus_EV, Hatch_Input_Bus_IV, Hatch_Input_Bus_LuV, Hatch_Input_Bus_ZPM, Hatch_Input_Bus_UV, Hatch_Input_Bus_MAX}, HATCHES_OUTPUT = {Hatch_Output_ULV, Hatch_Output_LV, Hatch_Output_MV, Hatch_Output_HV, Hatch_Output_EV, Hatch_Output_IV, Hatch_Output_LuV, Hatch_Output_ZPM, Hatch_Output_UV, Hatch_Output_MAX}, HATCHES_OUTPUT_BUS = {Hatch_Output_Bus_ULV, Hatch_Output_Bus_LV, Hatch_Output_Bus_MV, Hatch_Output_Bus_HV, Hatch_Output_Bus_EV, Hatch_Output_Bus_IV, Hatch_Output_Bus_LuV, Hatch_Output_Bus_ZPM, Hatch_Output_Bus_UV, Hatch_Output_Bus_MAX}, HATCHES_MUFFLER = {Hatch_Muffler_LV, Hatch_Muffler_LV, Hatch_Muffler_MV, Hatch_Muffler_HV, Hatch_Muffler_EV, Hatch_Muffler_IV, Hatch_Muffler_LuV, Hatch_Muffler_ZPM, Hatch_Muffler_UV, Hatch_Muffler_MAX}; diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index 85b9130061..6c2135ee44 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -103,7 +103,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Rubidium = new Materials(43, TextureSet.SET_METALLIC, 1.0F, 0, 2, 1|2|32, 240, 30, 30, 0, "Rubidium", "Rubidium", 0, 0, 312, 0, false, false, 4, 1, 1, Dyes.dyeRed, Element.Rb, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.VITREUS, 1))); public static Materials Samarium = new Materials(69, TextureSet.SET_METALLIC, 1.0F, 0, 2, 1|2|32, 255, 255, 255, 0, "Samarium", "Samarium", 0, 0, 1345, 1345, true, false, 4, 1, 1, Dyes._NULL, Element.Sm, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); public static Materials Scandium = new Materials(27, TextureSet.SET_METALLIC, 1.0F, 0, 2, 1|2|32, 255, 255, 255, 0, "Scandium", "Scandium", 0, 0, 1814, 1814, true, false, 2, 1, 1, Dyes.dyeYellow, Element.Sc, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Silicon = new Materials(20, TextureSet.SET_METALLIC, 1.0F, 0, 2, 1|2|32, 60, 60, 80, 0, "Silicon", "Silicon", 0, 0, 1687, 1687, true, false, 1, 1, 1, Dyes.dyeBlack, Element.Si, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.TENEBRAE, 1))); + public static Materials Silicon = new Materials(20, TextureSet.SET_METALLIC, 1.0F, 0, 2, 1|2|32, 60, 60, 80, 0, "Silicon", "Silicon", 0, 0, 1687, 1687, false, false, 1, 1, 1, Dyes.dyeBlack, Element.Si, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.TENEBRAE, 1))); public static Materials Silver = new Materials(54, TextureSet.SET_SHINY, 10.0F, 64, 2, 1|2|8|32|64|128, 220, 220, 255, 0, "Silver", "Silver", 0, 0, 1234, 0, false, false, 3, 1, 1, Dyes.dyeLightGray, Element.Ag, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.LUCRUM, 1))); public static Materials Sodium = new Materials(17, TextureSet.SET_METALLIC, 1.0F, 0, 2, 1 |32, 0, 0, 150, 0, "Sodium", "Sodium", 0, 0, 370, 0, false, false, 1, 1, 1, Dyes.dyeBlue, Element.Na, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 2), new TC_AspectStack(TC_Aspects.LUX, 1))); public static Materials Strontium = new Materials(44, TextureSet.SET_METALLIC, 1.0F, 0, 2, 1|32, 200, 200, 200, 0, "Strontium", "Strontium", 0, 0, 1050, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Element.Sr, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.STRONTIO, 1))); @@ -946,14 +946,16 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { Tungstate .addOreByProducts(Manganese , Silver , Lithium ); Bauxite .addOreByProducts(Grossular , Rutile , Gallium ); QuartzSand .addOreByProducts(CertusQuartz , Quartzite , Barite ); - Quartzite .addOreByProducts(CertusQuartz , Barite ); - CertusQuartz .addOreByProducts(Quartzite , Barite ); Redstone .addOreByProducts(Cinnabar , RareEarth , Glowstone ); Monazite .addOreByProducts(Thorium , Neodymium , RareEarth ); Forcicium .addOreByProducts(Thorium , Neodymium , RareEarth ); Forcillium .addOreByProducts(Thorium , Neodymium , RareEarth ); Malachite .addOreByProducts(Copper , BrownLimonite , Calcite ); YellowLimonite .addOreByProducts(Nickel , BrownLimonite , Cobalt ); + Lepidolite .addOreByProducts(Lithium , Caesium , Boron ); + Andradite .addOreByProducts(GarnetYellow , Iron , Boron ); + Quartzite .addOreByProducts(CertusQuartz , Barite ); + CertusQuartz .addOreByProducts(Quartzite , Barite ); BrownLimonite .addOreByProducts(Malachite , YellowLimonite ); Neodymium .addOreByProducts(Monazite , RareEarth ); Bastnasite .addOreByProducts(Neodymium , RareEarth ); @@ -962,7 +964,6 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { Tungsten .addOreByProducts(Manganese , Molybdenum ); Diatomite .addOreByProducts(BandedIron , Sapphire ); Iron .addOreByProducts(Nickel , Tin ); - Lepidolite .addOreByProducts(Lithium , Caesium ); Gold .addOreByProducts(Copper , Nickel ); Tin .addOreByProducts(Iron , Zinc ); Antimony .addOreByProducts(Zinc , Iron ); @@ -999,7 +1000,6 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { Pyrope .addOreByProducts(GarnetRed , Magnesium ); Almandine .addOreByProducts(GarnetRed , Aluminium ); Spessartine .addOreByProducts(GarnetRed , Manganese ); - Andradite .addOreByProducts(GarnetYellow , Iron ); Grossular .addOreByProducts(GarnetYellow , Calcium ); Uvarovite .addOreByProducts(GarnetYellow , Chrome ); Calcite .addOreByProducts(Andradite , Malachite ); diff --git a/src/main/java/gregtech/api/enums/OrePrefixes.java b/src/main/java/gregtech/api/enums/OrePrefixes.java index e8cf57ffd2..0577754fcc 100644 --- a/src/main/java/gregtech/api/enums/OrePrefixes.java +++ b/src/main/java/gregtech/api/enums/OrePrefixes.java @@ -697,11 +697,13 @@ public enum OrePrefixes { if (!enableUnusedFoil && !(aMaterial == Materials.Zinc || aMaterial == Materials.Aluminium || aMaterial == Materials.Silicon || aMaterial == Materials.Gold || aMaterial == Materials.Electrum || aMaterial == Materials.Platinum || aMaterial == Materials.Osmiridium || aMaterial == Materials.Osmium || aMaterial == Materials.AnnealedCopper || aMaterial == Materials.Steel || aMaterial == Materials.Copper || aMaterial == Materials.YttriumBariumCuprate - || aMaterial == Materials.VanadiumGallium || aMaterial == Materials.NiobiumTitanium || aMaterial == Materials.Naquadah)) + || aMaterial == Materials.VanadiumGallium || aMaterial == Materials.NiobiumTitanium || aMaterial == Materials.Naquadah || aMaterial == Materials.Manganese || + aMaterial == Materials.Plastic || aMaterial == Materials.Silicone)) foil.mDisabledItems.add(aMaterial); //Fine Wire if (!enableUnusedFineWires && !(aMaterial == Materials.Steel || aMaterial == Materials.AnnealedCopper || aMaterial == Materials.Platinum || aMaterial == Materials.Osmium || - aMaterial == Materials.Tin || aMaterial == Materials.Lead || aMaterial == Materials.SolderingAlloy)) + aMaterial == Materials.Tin || aMaterial == Materials.Lead || aMaterial == Materials.SolderingAlloy || aMaterial == Materials.Copper || aMaterial == Materials.Electrum || + aMaterial == Materials.Gold || aMaterial == Materials.RedAlloy || aMaterial == Materials.Graphene || aMaterial == Materials.NiobiumTitanium || aMaterial == Materials.YttriumBariumCuprate )) wireFine.mDisabledItems.add(aMaterial); //Gears if (!enableUnusedGears && !(aMaterial == Materials.Aluminium || aMaterial == Materials.Titanium || aMaterial == Materials.Iron || aMaterial == Materials.Copper || diff --git a/src/main/java/gregtech/api/enums/Tier.java b/src/main/java/gregtech/api/enums/Tier.java index 265d2866ab..c40a4d8ed2 100644 --- a/src/main/java/gregtech/api/enums/Tier.java +++ b/src/main/java/gregtech/api/enums/Tier.java @@ -9,13 +9,13 @@ public class Tier { new Tier(SubTag.ENERGY_ELECTRICITY, 0, 8, 1, 1, 1, Materials.WroughtIron, ItemList.Hull_ULV, OrePrefixes.cableGt01.get(Materials.Lead), OrePrefixes.cableGt04.get(Materials.Lead), OrePrefixes.circuit.get(Materials.Primitive), OrePrefixes.circuit.get(Materials.Basic)), new Tier(SubTag.ENERGY_ELECTRICITY, 1, 32, 1, 1, 1, Materials.Steel, ItemList.Hull_LV, OrePrefixes.cableGt01.get(Materials.Tin), OrePrefixes.cableGt04.get(Materials.Tin), OrePrefixes.circuit.get(Materials.Basic), OrePrefixes.circuit.get(Materials.Good)), new Tier(SubTag.ENERGY_ELECTRICITY, 2, 128, 1, 1, 1, Materials.Aluminium, ItemList.Hull_MV, OrePrefixes.cableGt01.get(Materials.AnyCopper), OrePrefixes.cableGt04.get(Materials.AnyCopper), OrePrefixes.circuit.get(Materials.Good), OrePrefixes.circuit.get(Materials.Advanced)), - new Tier(SubTag.ENERGY_ELECTRICITY, 3, 512, 1, 1, 1, Materials.StainlessSteel, ItemList.Hull_HV, OrePrefixes.cableGt01.get(Materials.Gold), OrePrefixes.cableGt04.get(Materials.Gold), OrePrefixes.circuit.get(Materials.Advanced), OrePrefixes.circuit.get(Materials.Elite)), - new Tier(SubTag.ENERGY_ELECTRICITY, 4, 2048, 1, 1, 1, Materials.Titanium, ItemList.Hull_EV, OrePrefixes.cableGt01.get(Materials.Aluminium), OrePrefixes.cableGt04.get(Materials.Aluminium), OrePrefixes.circuit.get(Materials.Elite), OrePrefixes.circuit.get(Materials.Master)), - new Tier(SubTag.ENERGY_ELECTRICITY, 5, 8192, 1, 1, 1, Materials.TungstenSteel, ItemList.Hull_IV, OrePrefixes.cableGt01.get(Materials.Platinum), OrePrefixes.cableGt04.get(Materials.Platinum), OrePrefixes.circuit.get(Materials.Master), OrePrefixes.circuit.get(Materials.Ultimate)), - new Tier(SubTag.ENERGY_ELECTRICITY, 6, 32768, 1, 1, 1, Materials.Chrome, ItemList.Hull_LuV, OrePrefixes.cableGt01.get(Materials.NiobiumTitanium), OrePrefixes.cableGt04.get(Materials.NiobiumTitanium), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Ultimate)), - new Tier(SubTag.ENERGY_ELECTRICITY, 7, 131072, 1, 1, 1, Materials.Iridium, ItemList.Hull_ZPM, OrePrefixes.cableGt01.get(Materials.Naquadah), OrePrefixes.cableGt04.get(Materials.Naquadah), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Ultimate)), - new Tier(SubTag.ENERGY_ELECTRICITY, 8, 524288, 1, 1, 1, Materials.Osmium, ItemList.Hull_UV, OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), OrePrefixes.cableGt01.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Ultimate)), - new Tier(SubTag.ENERGY_ELECTRICITY, 9, Integer.MAX_VALUE, 1, 1, 1, Materials.Neutronium, ItemList.Hull_MAX, OrePrefixes.wireGt01.get(Materials.Superconductor), OrePrefixes.wireGt04.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Ultimate)), + new Tier(SubTag.ENERGY_ELECTRICITY, 3, 512, 1, 1, 1, Materials.StainlessSteel, ItemList.Hull_HV, OrePrefixes.cableGt01.get(Materials.Gold), OrePrefixes.cableGt04.get(Materials.Gold), OrePrefixes.circuit.get(Materials.Advanced), OrePrefixes.circuit.get(Materials.Data)), + new Tier(SubTag.ENERGY_ELECTRICITY, 4, 2048, 1, 1, 1, Materials.Titanium, ItemList.Hull_EV, OrePrefixes.cableGt01.get(Materials.Aluminium), OrePrefixes.cableGt04.get(Materials.Aluminium), OrePrefixes.circuit.get(Materials.Data), OrePrefixes.circuit.get(Materials.Elite)), + new Tier(SubTag.ENERGY_ELECTRICITY, 5, 8192, 1, 1, 1, Materials.TungstenSteel, ItemList.Hull_IV, OrePrefixes.cableGt01.get(Materials.Platinum), OrePrefixes.cableGt04.get(Materials.Platinum), OrePrefixes.circuit.get(Materials.Elite), OrePrefixes.circuit.get(Materials.Master)), + new Tier(SubTag.ENERGY_ELECTRICITY, 6, 32768, 1, 1, 1, Materials.Chrome, ItemList.Hull_LuV, OrePrefixes.cableGt01.get(Materials.NiobiumTitanium), OrePrefixes.cableGt04.get(Materials.NiobiumTitanium), OrePrefixes.circuit.get(Materials.Master), OrePrefixes.circuit.get(Materials.Ultimate)), + new Tier(SubTag.ENERGY_ELECTRICITY, 7, 131072, 1, 1, 1, Materials.Iridium, ItemList.Hull_ZPM, OrePrefixes.cableGt01.get(Materials.Naquadah), OrePrefixes.cableGt04.get(Materials.Naquadah), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Superconductor)), + new Tier(SubTag.ENERGY_ELECTRICITY, 8, 524288, 1, 1, 1, Materials.Osmium, ItemList.Hull_UV, OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), OrePrefixes.cableGt01.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Infinite)), + new Tier(SubTag.ENERGY_ELECTRICITY, 9, Integer.MAX_VALUE, 1, 1, 1, Materials.Neutronium, ItemList.Hull_MAX, OrePrefixes.wireGt01.get(Materials.Superconductor), OrePrefixes.wireGt04.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Infinite), OrePrefixes.circuit.get(Materials.Infinite)), }, ROTATIONAL = new Tier[]{ new Tier(SubTag.ENERGY_ROTATIONAL, 1, 32, 1, 1, 1, Materials.Wood, OrePrefixes.frameGt.get(Materials.Wood), OrePrefixes.stick.get(Materials.Wood), OrePrefixes.ingot.get(Materials.Wood), OrePrefixes.gearGt.get(Materials.Wood), OrePrefixes.gearGt.get(Materials.Stone)), new Tier(SubTag.ENERGY_ROTATIONAL, 1, 32, 1, 2, 2, Materials.WoodSealed, OrePrefixes.frameGt.get(Materials.WoodSealed), OrePrefixes.stick.get(Materials.WoodSealed), OrePrefixes.ingot.get(Materials.WoodSealed), OrePrefixes.gearGt.get(Materials.WoodSealed), OrePrefixes.gearGt.get(Materials.Stone)), diff --git a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java index 0d50ae77c5..480cde5411 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java @@ -182,7 +182,7 @@ public interface IGT_RecipeAdder { public boolean addCNCRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt); /** - * Adds a Circuit Assembler Recipe + * Adds a Assembler Recipe * * @param aInput1 must be != null * @param aOutput1 must be != null @@ -192,7 +192,7 @@ public interface IGT_RecipeAdder { public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt); /** - * Adds a Circuit Assembler Recipe + * Adds a Assembler Recipe * * @param aInput1 must be != null * @param aOutput1 must be != null @@ -201,6 +201,18 @@ public interface IGT_RecipeAdder { */ public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt); + + /** + * Adds a Assembler Recipe + * + * @param aInputs must be 1-6 ItemStacks + * @param aFluidInput 0-1 fluids + * @param aOutput must be != null + * @param aDuration must be > 0 + * @param aEUt should be > 0 + */ + public boolean addCircuitAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, int aDuration, int aEUt); + /** * Adds a Assemblyline Recipe * @@ -458,6 +470,11 @@ public interface IGT_RecipeAdder { */ public boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt); + /** + * Adds a Recipe for the Autoclave + */ + public boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom); + /** * Adds a Recipe for the Mixer */ @@ -467,6 +484,10 @@ public interface IGT_RecipeAdder { * Adds a Recipe for the Laser Engraver */ public boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt); + /** + * Adds a Recipe for the Laser Engraver + */ + public boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt, boolean aCleanroom); /** * Adds a Recipe for the Forming Press diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java index 6da78e1871..d82d12149d 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java @@ -1,5 +1,6 @@ package gregtech.api.metatileentity.implementations; +import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; @@ -47,6 +48,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B public int mMainFacing = -1, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mOutputBlocked = 0; public FluidStack mOutputFluid; public String mGUIName = "", mNEIName = ""; + public GT_MetaTileEntity_MultiBlockBase mCleanroom; /** * Contains the Recipe which has been previously used, or null if there was no previous Recipe, which could have been buffered */ @@ -730,6 +732,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B if (tMap == null) return DID_NOT_FIND_RECIPE; GT_Recipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), getAllInputs()); if (tRecipe == null) return DID_NOT_FIND_RECIPE; + if (GT_Mod.gregtechproxy.mLowGravProcessing && tRecipe.mSpecialValue == -100 && getBaseMetaTileEntity().getWorld().provider.dimensionId == -27)return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe; if (!canOutput(tRecipe)) { mOutputBlocked++; @@ -741,6 +744,11 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B for (int i = 0; i < mOutputItems.length; i++) if (getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(i)) mOutputItems[i] = tRecipe.getOutput(i); + if(tRecipe.mSpecialValue == -200){ + if(mCleanroom==null)return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + if (mOutputItems[0]==null || getBaseMetaTileEntity().getRandomNumber(10000) > mCleanroom.mEfficiency) + mOutputItems[0] = null; + } mOutputFluid = tRecipe.getFluidOutput(0); calculateOverclockedNess(tRecipe); return FOUND_AND_SUCCESSFULLY_USED_RECIPE; diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index 755315e1e8..d509e6afe3 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -491,7 +491,8 @@ public class GT_Recipe { public static final GT_Recipe_Map sBenderRecipes = new GT_Recipe_Map(new HashSet(400), "gt.recipe.metalbender", "Metal Bender", null, RES_PATH_GUI + "basicmachines/Bender", 2, 1, 2, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sAlloySmelterRecipes = new GT_Recipe_Map(new HashSet(3000), "gt.recipe.alloysmelter", "Alloy Smelter", null, RES_PATH_GUI + "basicmachines/AlloySmelter", 2, 1, 2, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sAssemblerRecipes = new GT_Recipe_Map_Assembler(new HashSet(300), "gt.recipe.assembler", "Assembler", null, RES_PATH_GUI + "basicmachines/Assembler", 2, 1, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sCannerRecipes = new GT_Recipe_Map(new HashSet(300), "gt.recipe.canner", "Canning Machine", null, RES_PATH_GUI + "basicmachines/Canner", 2, 2, 1, 0, 1, E, 1, E, true, true); + public static final GT_Recipe_Map sCircuitAssemblerRecipes = new GT_Recipe_Map_Assembler(new HashSet(300), "gt.recipe.circuitassembler", "Circuit Assembler", null, RES_PATH_GUI + "basicmachines/CircuitAssembler", 6, 1, 1, 0, 1, E, 1, E, true, true); + public static final GT_Recipe_Map sCannerRecipes = new GT_Recipe_Map(new HashSet(300), "gt.recipe.canner", "Canning Machine", null, RES_PATH_GUI + "basicmachines/Canner", 2, 2, 1, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sCNCRecipes = new GT_Recipe_Map(new HashSet(100), "gt.recipe.cncmachine", "CNC Machine", null, RES_PATH_GUI + "basicmachines/Default", 2, 1, 2, 1, 1, E, 1, E, true, true); public static final GT_Recipe_Map sLatheRecipes = new GT_Recipe_Map(new HashSet(400), "gt.recipe.lathe", "Lathe", null, RES_PATH_GUI + "basicmachines/Lathe", 1, 2, 1, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sCutterRecipes = new GT_Recipe_Map(new HashSet(200), "gt.recipe.cuttingsaw", "Cutting Saw", null, RES_PATH_GUI + "basicmachines/Cutter", 1, 2, 1, 1, 1, E, 1, E, true, true); diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index cf70f21069..3d151175a2 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1520,7 +1520,7 @@ public class GT_Utility { return false; } - public static int getScaleСoordinates(double aValue, int aScale) { + public static int getScaleCoordinates(double aValue, int aScale) { return (int)Math.floor(aValue / aScale); } @@ -1533,7 +1533,7 @@ public class GT_Utility { if (GT_Mod.gregtechproxy.mUndergroundOil.CheckBlackList(aWorld.provider.dimensionId)) return null; - Random tRandom = new Random((aWorld.getSeed() + aWorld.provider.dimensionId * 2 + (getScaleСoordinates(aX,96)) + (7 * (getScaleСoordinates(aZ,96))))); + Random tRandom = new Random((aWorld.getSeed() + aWorld.provider.dimensionId * 2 + (getScaleCoordinates(aX,96)) + (7 * (getScaleCoordinates(aZ,96))))); int tAmount = 0; int tFluidId = 0; int tDecreasePerOperationAmount = 5; @@ -1556,7 +1556,7 @@ public class GT_Utility { tFluidId = 0; } - ChunkPosition tPos = new ChunkPosition(getScaleСoordinates(aX,16), aWorld.provider.dimensionId, getScaleСoordinates(aZ,16)); + ChunkPosition tPos = new ChunkPosition(getScaleCoordinates(aX,16), aWorld.provider.dimensionId, getScaleCoordinates(aZ,16)); int[] tInts = new int[0]; if(GT_Proxy.chunkData.containsKey(tPos)){ tInts = GT_Proxy.chunkData.get(tPos); @@ -1778,7 +1778,7 @@ public class GT_Utility { tList.add("Oil in Chunk: " + tFluid.amount + " " + tFluid.getLocalizedName()); } // if(aPlayer.capabilities.isCreativeMode){ - ChunkPosition tPos = new ChunkPosition(getScaleСoordinates(aX,16), aWorld.provider.dimensionId, getScaleСoordinates(aZ,16)); + ChunkPosition tPos = new ChunkPosition(getScaleCoordinates(aX,16), aWorld.provider.dimensionId, getScaleCoordinates(aZ,16)); if(GT_Proxy.chunkData.containsKey(tPos)){ int[] tPollution = GT_Proxy.chunkData.get(tPos); if(tPollution.length>1){ diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index e57c44040f..1fae98a25c 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -192,7 +192,7 @@ public class GT_Pollution { public static void addPollution(World aWorld, ChunkPosition aPos, int aPollution){ if(!GT_Mod.gregtechproxy.mPollution)return; try{ - ChunkPosition tPos = new ChunkPosition(GT_Utility.getScaleСoordinates(aPos.chunkPosX,16), aWorld.provider.dimensionId, GT_Utility.getScaleСoordinates(aPos.chunkPosZ,16)); // OLD in coordinate -1 -1 chunk 0 0 + ChunkPosition tPos = new ChunkPosition(GT_Utility.getScaleCoordinates(aPos.chunkPosX,16), aWorld.provider.dimensionId, GT_Utility.getScaleCoordinates(aPos.chunkPosZ,16)); // OLD in coordinate -1 -1 chunk 0 0 // System.out.println("add pollution dim: "+aWorld.provider.dimensionId+" x: "+ tPos.chunkPosX +" z: " + tPos.chunkPosZ +" poll: "+aPollution); int[] tData = new int[2]; if(GT_Proxy.chunkData.containsKey(tPos)){ diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 1639007c29..3d873bbb27 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -193,7 +193,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public boolean mEnableAllMaterials = false; public boolean mEnableAllComponents = false; public boolean mAddGTRecipesToIC2Machines = true; - + public boolean mLowGravProcessing = true; + public GT_Proxy() { GameRegistry.registerFuelHandler(this); MinecraftForge.EVENT_BUS.register(this); diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index 470cc665a6..bbcaf07ff9 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -610,15 +610,18 @@ public class GT_RecipeAdder GT_Recipe.GT_Recipe_Map.sPrinterRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, aSpecialSlot, null, new FluidStack[]{aFluid}, null, aDuration, aEUt, 0); return true; } - public boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt) { + return addAutoclaveRecipe(aInput, aFluid, aOutput, aChance, aDuration, aEUt, false); + } + + public boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) { if ((aInput == null) || (aFluid == null) || (aOutput == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("autoclave", aInput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, null, new int[]{aChance}, new FluidStack[]{aFluid}, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, null, new int[]{aChance}, new FluidStack[]{aFluid}, null, aDuration, aEUt, aCleanroom ? -100 : 0); return true; } @@ -635,15 +638,18 @@ public class GT_RecipeAdder GT_Recipe.GT_Recipe_Map.sMixerRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, aInput3, aInput4}, new ItemStack[]{aOutput}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0); return true; } - public boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt) { + return addLaserEngraverRecipe( aItemToEngrave, aLens, aEngravedItem, aDuration, aEUt, false); + } + + public boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt, boolean aCleanroom) { if ((aItemToEngrave == null) || (aLens == null) || (aEngravedItem == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("laserengraving", aEngravedItem, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes.addRecipe(true, new ItemStack[]{aItemToEngrave, aLens}, new ItemStack[]{aEngravedItem}, null, null, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes.addRecipe(true, new ItemStack[]{aItemToEngrave, aLens}, new ItemStack[]{aEngravedItem}, null, null, null, aDuration, aEUt, aCleanroom ? -200 : 0); return true; } @@ -835,6 +841,18 @@ public class GT_RecipeAdder return true; } + @Override + public boolean addCircuitAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, int aDuration, int aEUt) { + if ((aInputs == null) || (aOutput == null) || aInputs.length>6 || aInputs.length<1) { + return false; + } + if ((aDuration = GregTech_API.sRecipeFile.get("circuitassembler", aOutput, aDuration)) <= 0) { + return false; + } + GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes.addRecipe(true, aInputs, new ItemStack[]{aOutput}, null, null, new FluidStack[]{aFluidInput}, null, aDuration, aEUt, 0); + return true; + } + diff --git a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java index 73d3ec8c24..bb11224f13 100644 --- a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java +++ b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java @@ -21,7 +21,7 @@ import java.util.List; public class GT_IntegratedCircuit_Item extends GT_Generic_Item { private final static String aTextEmptyRow = " "; public GT_IntegratedCircuit_Item() { - super("integrated_circuit", "Integrated Circuit", ""); + super("integrated_circuit", "Programmed Circuit", ""); setHasSubtypes(true); setMaxDamage(0); 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 44c875f099..143fa32baf 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 @@ -616,31 +616,32 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { GT_ModHandler.addCraftingRecipe(ItemList.Sensor_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.EnderPearl), 'S', OrePrefixes.stick.get(Materials.Platinum), 'P', OrePrefixes.plate.get(Materials.Titanium), 'C', OrePrefixes.circuit.get(Materials.Elite)}); GT_ModHandler.addCraftingRecipe(ItemList.Sensor_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.EnderEye), 'S', OrePrefixes.stick.get(Materials.Osmium), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'C', OrePrefixes.circuit.get(Materials.Master)}); - ItemList.Circuit_Primitive.set(addItem(tLastID = 700, "NAND Chip", "A very simple Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Primitive)})); - ItemList.Circuit_Basic.set(addItem(tLastID = 701, "Basic Electronic Circuit", "A basic Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Basic)})); - ItemList.Circuit_Good.set(addItem(tLastID = 702, "Good Electronic Circuit", "A good Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Good)})); - ItemList.Circuit_Advanced.set(addItem(tLastID = 703, "Advanced Circuit", "An advanced Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Advanced)})); - ItemList.Circuit_Data.set(addItem(tLastID = 704, "Data Storage Circuit", "A Data Storage Chip", new Object[]{OrePrefixes.circuit.get(Materials.Data)})); - ItemList.Circuit_Elite.set(addItem(tLastID = 705, "Data Control Circuit", "A Processor", new Object[]{OrePrefixes.circuit.get(Materials.Elite)})); - ItemList.Circuit_Master.set(addItem(tLastID = 706, "Energy Flow Circuit", "A High Voltage Processor", new Object[]{OrePrefixes.circuit.get(Materials.Master)})); + ItemList.Circuit_Primitive.set(addItem(tLastID = 700, "Vacuum Tube", "A very simple Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Primitive), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Parts_Vacuum_Tube.set(ItemList.Circuit_Primitive.get(1,new Object[0])); + ItemList.Circuit_Basic.set(addItem(tLastID = 701, "Integrated Logic Circuit", "A basic Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Basic), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Good.set(addItem(tLastID = 702, "Good Electronic Circuit", "A good Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Good), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Advanced.set(addItem(tLastID = 703, "Processor Assembly", "An advanced Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Computer.set(ItemList.Circuit_Advanced.get(1,new Object[0])); + 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 Processor", new Object[]{OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Master.set(addItem(tLastID = 706, "Nanoprocessor Mainframe", "A master Processor", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION})); ItemList.Tool_DataOrb.set(addItem(tLastID = 707, "Data Orb", "A High Capacity Data Storage", new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION, new Behaviour_DataOrb()})); ItemList.Circuit_Ultimate.set(ItemList.Tool_DataOrb.get(1L, new Object[0])); 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", new Object[]{OrePrefixes.circuit.get(Materials.Data), 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, "Basic Circuit Board", "A basic Board", new Object[0])); - ItemList.Circuit_Board_Advanced.set(addItem(tLastID = 711, "Advanced Circuit Board", "An advanced Board", new Object[0])); - ItemList.Circuit_Board_Elite.set(addItem(tLastID = 712, "Processor Board", "A Processor Board", 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])); + ItemList.Circuit_Board_Advanced.set(addItem(tLastID = 711, "Epoxy Circuit Board", "An advanced Board", new Object[0])); ItemList.Circuit_Board_Epoxy.set(ItemList.Circuit_Board_Advanced.get(1,new Object[0])); + ItemList.Circuit_Board_Elite.set(addItem(tLastID = 712, "Multilayer Fiberglass Circuit Board", "A elite Board", new Object[0])); ItemList.Circuit_Board_Multifiberglass.set(ItemList.Circuit_Board_Elite.get(1,new Object[0])); ItemList.Circuit_Parts_Crystal_Chip_Elite.set(addItem(tLastID = 713, "Engraved Crystal Chip", "Needed for Circuits", new Object[0])); ItemList.Circuit_Parts_Crystal_Chip_Master.set(addItem(tLastID = 714, "Engraved Lapotron Chip", "Needed for Circuits", new Object[0])); - ItemList.Circuit_Parts_Advanced.set(addItem(tLastID = 715, "Advanced Circuit Parts", "Advanced Circuit Parts", new Object[0])); - ItemList.Circuit_Parts_Wiring_Basic.set(addItem(tLastID = 716, "Etched Medium Voltage Wiring", "Part of Circuit Boards", new Object[0])); - ItemList.Circuit_Parts_Wiring_Advanced.set(addItem(tLastID = 717, "Etched High Voltage Wiring", "Part of Circuit Boards", new Object[0])); - ItemList.Circuit_Parts_Wiring_Elite.set(addItem(tLastID = 718, "Etched Extreme Voltage Wiring", "Part of Circuit Boards", new Object[0])); - ItemList.Empty_Board_Basic.set(addItem(tLastID = 719, "Empty Circuit Board", "A Board Part", new Object[0])); - ItemList.Empty_Board_Elite.set(addItem(tLastID = 720, "Empty Processor Board", "A Processor Board Part", new Object[0])); + ItemList.Circuit_Parts_Advanced.set(addItem(tLastID = 715, "Diode", "Basic Electronic Component", new Object[0])); ItemList.Circuit_Parts_Diode.set(ItemList.Circuit_Parts_Advanced.get(1,new Object[0])); + ItemList.Circuit_Parts_Wiring_Basic.set(addItem(tLastID = 716, "Resistor", "Basic Electronic Component", new Object[0])); ItemList.Circuit_Parts_Resistor.set(ItemList.Circuit_Parts_Wiring_Basic.get(1,new Object[0])); + ItemList.Circuit_Parts_Wiring_Advanced.set(addItem(tLastID = 717, "Transistor", "Basic Electronic Component", new Object[0])); ItemList.Circuit_Parts_Transistor.set(ItemList.Circuit_Parts_Wiring_Advanced.get(1,new Object[0])); + ItemList.Circuit_Parts_Wiring_Elite.set(addItem(tLastID = 718, "Capacitor", "Electronic Component", new Object[0])); ItemList.Circuit_Parts_Capacitor.set(ItemList.Circuit_Parts_Wiring_Elite.get(1,new Object[0])); + ItemList.Empty_Board_Basic.set(addItem(tLastID = 719, "Phenolic Circuit Board", "A good Board", new Object[0])); ItemList.Circuit_Board_Phenolic.set(ItemList.Empty_Board_Basic.get(1,new Object[0])); + ItemList.Empty_Board_Elite.set(addItem(tLastID = 720, "Fiberglass Circuit Board", "An advanced Board", new Object[0])); ItemList.Circuit_Board_Fiberglass.set(ItemList.Empty_Board_Elite.get(1,new Object[0])); ItemList.Component_Sawblade_Diamond.set(addItem(tLastID = 721, "Diamond Sawblade", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L), OreDictNames.craftingDiamondBlade})); 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 c1da435e52..27c7f2b834 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 @@ -1,8 +1,20 @@ package gregtech.common.items; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.SubTag; import gregtech.api.items.GT_MetaGenerated_Item_X32; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import ic2.core.IC2; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { @@ -11,6 +23,168 @@ public class GT_MetaGenerated_Item_03 public GT_MetaGenerated_Item_03() { super("metaitem.03", new OrePrefixes[]{OrePrefixes.crateGtDust, OrePrefixes.crateGtIngot, OrePrefixes.crateGtGem, OrePrefixes.crateGtPlate}); INSTANCE = this; + int tLastID = 0; + Object[] o = new Object[0]; + + /** + * circuit boards tier 1-7: + * coated circuit board / wood plate + resin + * phenolic circuit board /carton+glue+chemical bath + * epoxy circuit board /epoxy plate + copper foil + sulfuric acid + * fiberglass circuit board (simple + multilayer) / glass + plastic + electrum foil + sulfurci acid + * wetware lifesupport board / fiberglass CB + teflon + + */ +// ItemList.Circuit_Board_Coated.set(addItem(tLastID = 1, "Coated Circuit Board", "A basic Board", o)); +// ItemList.Circuit_Board_Phenolic.set(addItem(tLastID = 2, "Phenolic Circuit Board", "A good Board", o)); +// ItemList.Circuit_Board_Epoxy.set(addItem(tLastID = 3, "Epoxy Circuit Board", "An advanced Board", o)); +// ItemList.Circuit_Board_Fiberglass.set(addItem(tLastID = 4, "Fiberglass Circuit Board", "An advanced Board", o)); +// ItemList.Circuit_Board_Multifiberglass.set(addItem(tLastID = 5, "Multilayer Fiberglass Circuit Board", "A elite Board", o)); + ItemList.Circuit_Board_Wetware.set(addItem(tLastID = 6, "Wetware Lifesupport Circuit Board", "The Board that keeps life", o)); + + /** + * electronic components: + * vacuum tube (glass tube + red alloy cables) + * basic electronic circuits normal+smd + * coils + * diodes normal+smd + * transistors normal+smd + * capacitors normal+smd + */ +// ItemList.Circuit_Parts_Resistor.set(addItem(tLastID = 10, "Resistor", "Basic Electronic Component", o)); //wiring mv + ItemList.Circuit_Parts_ResistorSMD.set(addItem(tLastID = 11, "SMD Resistor", "Electronic Component", o)); + ItemList.Circuit_Parts_Glass_Tube.set(addItem(tLastID = 12, "Glass Tube", "", o)); +// ItemList.Circuit_Parts_Vacuum_Tube.set(addItem(tLastID = 13, "Vacuum Tube", "Basic Electronic Component", o)); //Circuit_Primitive + ItemList.Circuit_Parts_Coil.set(addItem(tLastID = 14, "Small Coil", "Basic Electronic Component", o)); +// ItemList.Circuit_Parts_Diode.set(addItem(tLastID = 15, "Diode", "Basic Electronic Component", o)); + ItemList.Circuit_Parts_DiodeSMD.set(addItem(tLastID = 16, "SMD Diode", "Electronic Component", o)); +// ItemList.Circuit_Parts_Transistor.set(addItem(tLastID = 17, "Transistor", "Basic Electronic Component", o)); //wiring hv + ItemList.Circuit_Parts_TransistorSMD.set(addItem(tLastID = 18, "SMD Transistor", "Electronic Component", o)); +// ItemList.Circuit_Parts_Capacitor.set(addItem(tLastID = 19, "Capacitor", "Electronic Component", o)); //wiring ev + ItemList.Circuit_Parts_CapacitorSMD.set(addItem(tLastID = 20, "SMD Capacitor", "Electronic Component", o)); + + + /** + * ICs + * Lenses made from perfect crystals first instead of plates + * Monocrystalline silicon ingot (normal+glowstone+naquadah) EBF, normal silicon no EBF need anymore + * wafer(normal+glowstone+naquadah) cut mono silicon ingot in cutting machine + * + * Integrated Logic Circuit(8bit DIP) + * RAM + * NAND Memory + * NOR Memory + * CPU (4 sizes) + * SoCs(2 sizes, high tier cheap low tech component) + * Power IC/High Power IC + * + * nanotube interconnected circuit (H-IC + nanotubes) + * + * quantum chips + */ + ItemList.Circuit_Silicon_Ingot.set(addItem(tLastID = 30, "Monocrystalline Silicon Ingot", "Raw Circuit", o)); + ItemList.Circuit_Silicon_Ingot2.set(addItem(tLastID = 31, "Glowstone doted Monocrystalline Silicon Ingot", "Raw Circuit", o)); + ItemList.Circuit_Silicon_Ingot3.set(addItem(tLastID = 32, "Naquadah doted Monocrystalline Silicon Ingot", "Raw Circuit", o)); + + ItemList.Circuit_Silicon_Wafer.set(addItem(tLastID = 33, "Wafer", "Raw Circuit", o)); + ItemList.Circuit_Silicon_Wafer2.set(addItem(tLastID = 34, "Glowstone doted Wafer", "Raw Circuit", o)); + ItemList.Circuit_Silicon_Wafer3.set(addItem(tLastID = 35, "Naquadah doted Wafer", "Raw Circuit", o)); + + ItemList.Circuit_Wafer_ILC.set(addItem(tLastID = 36, "Integrated Logic Circuit (Wafer)", "Raw Circuit", o)); + ItemList.Circuit_Chip_ILC.set(addItem(tLastID = 37, "Integrated Logic Circuit", "Integrated Circuit", o)); + + ItemList.Circuit_Wafer_Ram.set(addItem(tLastID = 38, "Random Access Memory Chip (Wafer)", "Raw Circuit", o)); + ItemList.Circuit_Chip_Ram.set(addItem(tLastID = 39, "Random Access Memory Chip", "Integrated Circuit", o)); + + ItemList.Circuit_Wafer_NAND.set(addItem(tLastID = 40, "NAND Memory Chip (Wafer)", "Raw Circuit", o)); + ItemList.Circuit_Chip_NAND.set(addItem(tLastID = 41, "NAND Memory Chip", "Integrated Circuit", o)); + + ItemList.Circuit_Wafer_NOR.set(addItem(tLastID = 42, "NOR Memory Chip (Wafer)", "Raw Circuit", o)); + ItemList.Circuit_Chip_NOR.set(addItem(tLastID = 43, "NOR Memory Chip", "Integrated Circuit", o)); + + ItemList.Circuit_Wafer_CPU.set(addItem(tLastID = 44, "Central Processing Unit (Wafer)", "Raw Circuit", o)); + ItemList.Circuit_Chip_CPU.set(addItem(tLastID = 45, "Central Processing Unit", "Integrated Circuit", o)); + + ItemList.Circuit_Wafer_SoC.set(addItem(tLastID = 46, "SoC Wafer", "Raw Circuit", o)); + ItemList.Circuit_Chip_SoC.set(addItem(tLastID = 47, "SoC", "System on a Chip", o)); + + ItemList.Circuit_Wafer_SoC2.set(addItem(tLastID = 48, "ASoC Wafer", "Raw Circuit", o)); + ItemList.Circuit_Chip_SoC2.set(addItem(tLastID = 49, "ASoC", "Advanced System on a Chip", o)); + + ItemList.Circuit_Wafer_PIC.set(addItem(tLastID = 50, "PIC Wafer", "Raw Circuit", o)); + ItemList.Circuit_Chip_PIC.set(addItem(tLastID = 51, "Power IC", "Power Circuit", o)); + + ItemList.Circuit_Wafer_HPIC.set(addItem(tLastID = 52, "HPIC Wafer", "Raw Circuit", o)); + ItemList.Circuit_Chip_HPIC.set(addItem(tLastID = 53, "High Power IC", "High Power Circuit", o)); + + ItemList.Circuit_Wafer_NanoCPU.set(addItem(tLastID = 54, "NanoCPU Wafer", "Raw Circuit", o)); + ItemList.Circuit_Chip_NanoCPU.set(addItem(tLastID = 55, "Nanocomponent Central Processing Unit", "Power Circuit", o)); + + ItemList.Circuit_Wafer_QuantumCPU.set(addItem(tLastID = 56, "QBit Wafer", "Raw Circuit", o)); + ItemList.Circuit_Chip_QuantumCPU.set(addItem(tLastID = 57, "QBit Processing Unit", "Quantum CPU", o)); + + /** + * Engraved Crystal Chip + * Engraved Lapotron Chip + * Crystal CPU + * SoCrystal + * stem cells (disassemble eggs) + */ + ItemList.Circuit_Parts_RawCrystalChip.set(addItem(tLastID = 69, "Raw Crystal Chip", "Raw Crystal Processor", o)); + ItemList.Circuit_Chip_CrystalCPU.set(addItem(tLastID = 70, "Crystal Processing Unit", "Crystal CPU", o)); //Crystal chip elite part + ItemList.Circuit_Chip_CrystalSoC.set(addItem(tLastID = 71, "Crystal SoC", "Crystal System on a Chip", o)); + ItemList.Circuit_Chip_NeuroCPU.set(addItem(tLastID = 72, "Neuro Processing Unit", "Neuro CPU", o)); + ItemList.Circuit_Chip_Stemcell.set(addItem(tLastID = 73, "Stemcells", "Raw Intiligence (Disassembled Eggs)", o)); + + //Vacuum Tube Item01 + //Basic Circuit IC2 + //Good Circuit Item01 + + //Integrated Logic Circuit Item01 + ItemList.Circuit_Integrated_Good.set(addItem(tLastID = 79, "Good Integrated Circuit", "Good Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Good), SubTag.NO_UNIFICATION})); + //Good Integrated Circuit Item01 + //Advanced Circuit IC2 + + 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 + //Mainframe Item01 DataProcessor + + ItemList.Circuit_Nanoprocessor.set(addItem(tLastID = 82, "Nanoprocessor", "Advanced Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Nanocomputer.set(addItem(tLastID = 83, "Nanoprocessor Assembly", "Extreme Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Elitenanocomputer.set(addItem(tLastID = 84, "Elite Nanocomputer", "Elite Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION})); + //Nanoprocessor Mainframe Item01 Energy Flow Circuit + + ItemList.Circuit_Quantumprocessor.set(addItem(tLastID = 85, "Quantumprocessor", "Extreme Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Quantumcomputer.set(addItem(tLastID = 86, "Quantumprocessor Assembly", "Elite Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Masterquantumcomputer.set(addItem(tLastID = 87, "Master Quantumcomputer", "Master Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION})); + 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_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})); + +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Processor.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Computer.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Nanoprocessor.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Nanocomputer.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Elitenanocomputer.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Quantumprocessor.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Quantumcomputer.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Masterquantumcomputer.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Quantummainframe.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Crystalprocessor.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Crystalcomputer.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Crystalmainframe.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Neuroprocessor.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Wetwarecomputer.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Wetwaresupercomputer.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Wetwaremainframe.get(1, o)); } public boolean doesShowInCreative(OrePrefixes aPrefix, Materials aMaterial, boolean aDoShowAllItems) { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java index de3dcbb432..1379654393 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java @@ -126,11 +126,11 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba private void prospectOils(HashMap aOils) { - int tLeftXBound = GT_Utility.getScaleСoordinates(this.getBaseMetaTileEntity().getXCoord() - radius, 16); - int tRightXBound = GT_Utility.getScaleСoordinates(this.getBaseMetaTileEntity().getXCoord() + radius, 16); + int tLeftXBound = GT_Utility.getScaleCoordinates(this.getBaseMetaTileEntity().getXCoord() - radius, 16); + int tRightXBound = GT_Utility.getScaleCoordinates(this.getBaseMetaTileEntity().getXCoord() + radius, 16); - int tLeftZBound = GT_Utility.getScaleСoordinates(this.getBaseMetaTileEntity().getZCoord() - radius, 16); - int tRightZBound = GT_Utility.getScaleСoordinates(this.getBaseMetaTileEntity().getZCoord() + radius, 16); + int tLeftZBound = GT_Utility.getScaleCoordinates(this.getBaseMetaTileEntity().getZCoord() - radius, 16); + int tRightZBound = GT_Utility.getScaleCoordinates(this.getBaseMetaTileEntity().getZCoord() + radius, 16); HashMap tFluids = new HashMap(); @@ -138,7 +138,7 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba for (int x = tLeftXBound; x <= tRightXBound; ++x) for (int z = tLeftZBound; z <= tRightZBound; ++z) { - ChunkPosition tPos = new ChunkPosition(GT_Utility.getScaleСoordinates(x*16,96), 0, GT_Utility.getScaleСoordinates(z*16,96)); + ChunkPosition tPos = new ChunkPosition(GT_Utility.getScaleCoordinates(x*16,96), 0, GT_Utility.getScaleCoordinates(z*16,96)); FluidStack tFluid = GT_Utility.getUndergroundOil(getBaseMetaTileEntity().getWorld(), x*16, z*16); if (tFluid != null) if (tFluids.containsKey(tPos)) diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java index 9c35e87e7d..a63a2498bd 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java @@ -1,5 +1,6 @@ package gregtech.common.tileentities.machines.basic; +import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -7,6 +8,7 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; +import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -26,6 +28,16 @@ public class GT_MetaTileEntity_Disassembler public int checkRecipe() { if ((getInputAt(0) != null) && (isOutputEmpty())) { + if(GT_Utility.areStacksEqual(getInputAt(0), new ItemStack(Items.egg))){ + getInputAt(0).stackSize -= 1; + this.mEUt = (16 * (1 << this.mTier - 1) * (1 << this.mTier - 1)); + this.mMaxProgresstime = 2400; + this.mMaxProgresstime = this.mMaxProgresstime >> (mTier); + if (getBaseMetaTileEntity().getRandomNumber(100) < (this.mTier+1)) { + this.mOutputItems[0] = ItemList.Circuit_Chip_Stemcell.get(1, new Object[0]); + } + return 2; + } NBTTagCompound tNBT = getInputAt(0).getTagCompound(); if (tNBT != null) { tNBT = tNBT.getCompoundTag("GT.CraftingComponents"); @@ -55,6 +67,6 @@ public class GT_MetaTileEntity_Disassembler } public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (aStack.getTagCompound() != null) && (aStack.getTagCompound().getCompoundTag("GT.CraftingComponents") != null); + return (aIndex == 4 && GT_Utility.areStacksEqual(aStack, new ItemStack(Items.egg))) || (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (aStack.getTagCompound() != null) && (aStack.getTagCompound().getCompoundTag("GT.CraftingComponents") != null); } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java index 35ea5cdbe0..0ba05cab5c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java @@ -11,6 +11,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_GT_Recipe; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; @@ -52,7 +53,7 @@ return new String[]{ } public boolean checkRecipe(ItemStack aStack) { - this.mEfficiencyIncrease = 1; + this.mEfficiencyIncrease = 100; this.mMaxProgresstime = 100; this.mEUt = 4; return true; @@ -122,7 +123,20 @@ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack a } } } - if(mMaintenanceHatches.size()!=1||mEnergyHatches.size()!=1||mDoorCount!=2&&mHullCount<=10){return false;} + if(mMaintenanceHatches.size()!=1||mEnergyHatches.size()!=1||mDoorCount!=2||mHullCount>10){return false;} + for(int dX=-x+1;dX=y+1;dY--){ + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); + if(tTileEntity!=null){ + IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); + if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_BasicMachine_GT_Recipe){ + ((GT_MetaTileEntity_BasicMachine_GT_Recipe)aMetaTileEntity).mCleanroom = this; + } + } + } + } + } return true; } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java index fa1ca07b27..5d55f759c8 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java @@ -1,10 +1,12 @@ package gregtech.loaders.oreprocessing; +import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OreDictNames; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; import net.minecraft.item.ItemStack; public class ProcessingCircuit implements gregtech.api.interfaces.IOreRecipeRegistrator { @@ -13,27 +15,32 @@ public class ProcessingCircuit implements gregtech.api.interfaces.IOreRecipeRegi } public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + if(gregtech.api.util.GT_OreDictUnificator.isBlacklisted(aStack)&&aModName.equals("gregtech"))return; switch (aMaterial.mName) { case "Good": - case "Advanced": case "Data": case "Elite": case "Master": case "Ultimate": - if (!gregtech.api.util.GT_OreDictUnificator.isBlacklisted(aStack)) + if (!gregtech.api.util.GT_OreDictUnificator.isBlacklisted(aStack)&&!aModName.equals("gregtech")) GT_ModHandler.removeRecipeByOutput(aStack); break; case "Primitive": GT_ModHandler.removeRecipeByOutput(aStack); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Circuit_Primitive.get(1L, new Object[0]), new Object[]{GT_ModHandler.getIC2Item("casingadviron", 1L), OrePrefixes.wireGt01.get(Materials.RedAlloy), OrePrefixes.wireGt01.get(Materials.RedAlloy), OrePrefixes.wireGt01.get(Materials.Tin)}); - break; + break; case "Basic": GT_ModHandler.removeRecipeByOutput(aStack); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), new Object[]{"WWW", "CPC", "WWW", 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OreDictNames.craftingWireCopper, 'P', OrePrefixes.plate.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), new Object[]{"WCW", "WPW", "WCW", 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OreDictNames.craftingWireCopper, 'P', OrePrefixes.plate.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), new Object[]{"WWW", "CPC", "WWW", 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OrePrefixes.cableGt01.get(Materials.RedAlloy), 'P', OrePrefixes.plate.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), new Object[]{"WCW", "WPW", "WCW", 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OrePrefixes.cableGt01.get(Materials.RedAlloy), 'P', OrePrefixes.plate.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe(aStack, new Object[]{"RIR","VBV","CCC",'R',ItemList.Circuit_Parts_Resistor.get(1,new Object[0]),'C',GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.RedAlloy, 1),'V', ItemList.Circuit_Parts_Vacuum_Tube.get(1,new Object[0]),'B',ItemList.Circuit_Board_Coated.get(1,new Object[0]),'I',ItemList.IC2_Item_Casing_Steel.get(1,new Object[0])}); GT_ModHandler.addShapelessCraftingRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), new Object[]{ItemList.Circuit_Integrated.getWildcard(1L, new Object[0])}); + break; + case "Advanced": + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Integrated_Good.get(2,new Object[0]),ItemList.Circuit_Chip_ILC.get(3,new Object[0]),ItemList.Circuit_Chip_Ram.get(1,new Object[0]),ItemList.Circuit_Parts_Transistor.get(4,new Object[0]),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 16)},Materials.SolderingAlloy.getMolten(72), aStack, 800, 28); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Integrated_Good.get(2,new Object[0]),ItemList.Circuit_Chip_ILC.get(3,new Object[0]),ItemList.Circuit_Chip_Ram.get(1,new Object[0]),ItemList.Circuit_Parts_TransistorSMD.get(4,new Object[0]),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 16)},Materials.SolderingAlloy.getMolten(72), aStack, 800, 28); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Integrated_Good.get(2,new Object[0]),ItemList.Circuit_Chip_ILC.get(3,new Object[0]),ItemList.Circuit_Chip_Ram.get(1,new Object[0]),ItemList.Circuit_Parts_Transistor.get(4,new Object[0]),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 16)},Materials.Tin.getMolten(144), aStack, 800, 28); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Integrated_Good.get(2,new Object[0]),ItemList.Circuit_Chip_ILC.get(3,new Object[0]),ItemList.Circuit_Chip_Ram.get(1,new Object[0]),ItemList.Circuit_Parts_TransistorSMD.get(4,new Object[0]),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 16)},Materials.Tin.getMolten(144), aStack, 800, 28); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Integrated_Good.get(2,new Object[0]),ItemList.Circuit_Chip_ILC.get(3,new Object[0]),ItemList.Circuit_Chip_Ram.get(1,new Object[0]),ItemList.Circuit_Parts_Transistor.get(4,new Object[0]),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 16)},Materials.Lead.getMolten(288), aStack, 800, 28); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Integrated_Good.get(2,new Object[0]),ItemList.Circuit_Chip_ILC.get(3,new Object[0]),ItemList.Circuit_Chip_Ram.get(1,new Object[0]),ItemList.Circuit_Parts_TransistorSMD.get(4,new Object[0]),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 16)},Materials.Lead.getMolten(288), aStack, 800, 28); + break; } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java index 939d45d2ab..8487f1031b 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java @@ -26,28 +26,36 @@ public class ProcessingCrafting implements gregtech.api.interfaces.IOreRecipeReg case "craftingLensBlue": GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 13), 2000, 1920); GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 13), 2000, 1920); - GT_Values.RA.addLaserEngraverRecipe(ItemList.IC2_LapotronCrystal.getWildcard(1L, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Parts_Crystal_Chip_Master.get(3L, new Object[0]), 256, 480); + GT_Values.RA.addLaserEngraverRecipe(ItemList.IC2_LapotronCrystal.getWildcard(1L, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Parts_Crystal_Chip_Master.get(3L, new Object[0]), 256, 480,true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_PIC.get(1, new Object[0]), 500, 480,false); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_PIC.get(4, new Object[0]), 200, 1920,true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Chip_CrystalCPU.get(1L, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Chip_CrystalSoC.get(1, new Object[0]), 100, 40000,true); break; case "craftingLensYellow": GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 14), 2000, 1920); GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 14), 2000, 1920); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_SoC.get(1, new Object[0]), 200, 1920,true); break; + case "craftingLensOrange": + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_SoC2.get(1, new Object[0]), 200, 1920,true); + + break; case "craftingLensCyan": GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 15), 2000, 1920); GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 15), 2000, 1920); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_Ram.get(1, new Object[0]), 900, 120,false); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_Ram.get(4, new Object[0]), 500, 480,true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_Ram.get(8, new Object[0]), 200, 1920,true); + break; case "craftingLensRed": GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Redstone, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), 50, 120); - - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Copper, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Parts_Wiring_Basic.get(1L, new Object[0]), 64, 30); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.AnnealedCopper, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Parts_Wiring_Basic.get(1L, new Object[0]), 64, 30); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gold, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Parts_Wiring_Advanced.get(1L, new Object[0]), 64, 120); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Electrum, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Parts_Wiring_Advanced.get(1L, new Object[0]), 64, 120); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Platinum, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Parts_Wiring_Elite.get(1L, new Object[0]), 64, 480); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_ILC.get(1, new Object[0]), 900, 120,false); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_ILC.get(4, new Object[0]), 500, 480,true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_ILC.get(8, new Object[0]), 200, 1920,true); break; case "craftingLensGreen": - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Olivine, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1L, new Object[0]), 256, 480); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Emerald, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1L, new Object[0]), 256, 480); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1L, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Chip_CrystalCPU.get(1, new Object[0]), 100, 10000,true); break; case "craftingLensWhite": GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 19), 2000, 1920); @@ -57,6 +65,9 @@ public class ProcessingCrafting implements gregtech.api.interfaces.IOreRecipeReg GT_Values.RA.addLaserEngraverRecipe(new ItemStack(Blocks.stone, 1, 0), GT_Utility.copyAmount(0L, new Object[]{aStack}), new ItemStack(Blocks.stonebrick, 1, 3), 50, 16); GT_Values.RA.addLaserEngraverRecipe(new ItemStack(Blocks.quartz_block, 1, 0), GT_Utility.copyAmount(0L, new Object[]{aStack}), new ItemStack(Blocks.quartz_block, 1, 1), 50, 16); GT_Values.RA.addLaserEngraverRecipe(GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartz", 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartzChiseled", 1L), 50, 16); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_CPU.get(1, new Object[0]), 900, 120,true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_CPU.get(4, new Object[0]), 500, 480,true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_CPU.get(8, new Object[0]), 200, 1920,true); break; } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java index 682d09bbfd..df2e6ccb01 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java @@ -88,7 +88,7 @@ public class ProcessingGem implements gregtech.api.interfaces.IOreRecipeRegistra if (aFuelPower) GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, aMaterial.mFuelPower * 8, aMaterial.mFuelType); if (!aNoWorking) { - GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 3L), GT_OreDictUnificator.getDust(aMaterial, aPrefix.mMaterialAmount - OrePrefixes.stickLong.mMaterialAmount * 3L), (int) Math.max(aMaterialMass * 10L, 1L), 16); +// GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 3L), GT_OreDictUnificator.getDust(aMaterial, aPrefix.mMaterialAmount - OrePrefixes.stickLong.mMaterialAmount * 3L), (int) Math.max(aMaterialMass * 10L, 1L), 16); if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial)) if (aSpecialRecipeReq) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 4L), GT_Proxy.tBits, new Object[]{"X", "m", Character.valueOf('X'), OrePrefixes.gemExquisite.get(aMaterial)}); } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java index f6dea49ee6..d6db04fed8 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java @@ -16,7 +16,8 @@ public class ProcessingLens implements gregtech.api.interfaces.IOreRecipeRegistr } public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L), (int) Math.max(aMaterial.getMass() / 2L, 1L), 16); + GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L), (int) Math.max(aMaterial.getMass() / 2L, 1L), 480); + GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 2L), (int) Math.max(aMaterial.getMass() , 1L), 24); GregTech_API.registerCover(aStack, new GT_MultiTexture(new gregtech.api.interfaces.ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_LENS, aMaterial.mRGBa, false)}), new gregtech.common.covers.GT_Cover_Lens(aMaterial.mColor.mIndex)); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate.java index 317c9ebfba..2e00133a69 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate.java @@ -86,6 +86,8 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, aMaterial.mFuelPower, aMaterial.mFuelType); GT_Utility.removeSimpleIC2MachineRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), GT_ModHandler.getCompressorRecipeList(), GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial, 1L)); GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), 2, GT_OreDictUnificator.get(OrePrefixes.compressed, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L)); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, aMaterial, 2L), GT_Proxy.tBits, new Object[]{"hX", 'X', OrePrefixes.plate.get(aMaterial)}); + if (aMaterial == Materials.Paper) GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GregTech_API.sRecipeFile.get(gregtech.api.enums.ConfigCategories.Recipes.harderrecipes, aStack, true) ? 2L : 3L, new Object[]{aStack}), new Object[]{"XXX", 'X', new ItemStack(net.minecraft.init.Items.reeds, 1, 32767)}); diff --git a/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java index 6fa9a34530..66d870ccad 100644 --- a/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java @@ -403,7 +403,7 @@ public class GT_CraftingRecipeLoader implements Runnable { GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 3L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"NPT", "CCC", "HPT", 'H', OrePrefixes.cell.get(Materials.Helium), 'N', OrePrefixes.cell.get(Materials.Nitrogen), 'T', OrePrefixes.pipeTiny.get(Materials.TungstenSteel), 'P', ItemList.Electric_Pump_LV, 'C', OrePrefixes.wireGt01.get(Materials.NiobiumTitanium)}); GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 3L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"NPT", "CCC", "HPT", 'H', OrePrefixes.cell.get(Materials.Helium), 'N', OrePrefixes.cell.get(Materials.Nitrogen), 'T', OrePrefixes.pipeTiny.get(Materials.TungstenSteel), 'P', ItemList.Electric_Pump_LV, 'C', OrePrefixes.wireGt01.get(Materials.VanadiumGallium)}); GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 3L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"NPT", "CCC", "NPT", 'N', OrePrefixes.cell.get(Materials.Nitrogen), 'T', OrePrefixes.pipeTiny.get(Materials.TungstenSteel), 'P', ItemList.Electric_Pump_LV, 'C', OrePrefixes.wireGt01.get(Materials.YttriumBariumCuprate)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 3L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"NPT", "CCC", "NPT", 'N', OrePrefixes.cell.get(Materials.Nitrogen), 'T', OrePrefixes.pipeTiny.get(Materials.TungstenSteel), 'P', ItemList.Electric_Pump_LV, 'C', OrePrefixes.wireGt01.get(Materials.HSSG)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 3L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"NPT", "CCC", "NPT", 'N', OrePrefixes.cell.get(Materials.Nitrogen), 'T', OrePrefixes.pipeTiny.get(Materials.TungstenSteel), 'P', ItemList.Electric_Pump_LV, 'C', OrePrefixes.wireGt01.get(Materials.Naquadah)}); GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.IronMagnetic, 1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.stick.get(Materials.AnyIron), OrePrefixes.dust.get(Materials.Redstone), OrePrefixes.dust.get(Materials.Redstone), OrePrefixes.dust.get(Materials.Redstone), OrePrefixes.dust.get(Materials.Redstone)}); diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 33f99d52d4..f80c4659d4 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -8,8 +8,10 @@ import gregtech.api.objects.MaterialStack; import gregtech.api.util.*; import gregtech.common.GT_DummyWorld; import gregtech.common.items.GT_MetaGenerated_Item_03; +import ic2.api.item.IC2Items; import ic2.api.recipe.ILiquidHeatExchangerManager.HeatExchangeProperty; import ic2.api.recipe.Recipes; +import ic2.core.Ic2Items; import mods.railcraft.common.blocks.aesthetics.cube.EnumCube; import mods.railcraft.common.items.RailcraftToolItems; import net.minecraft.init.Blocks; @@ -411,10 +413,109 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addSlicerRecipe(ItemList.Food_Baked_Bun.get(1L, new Object[0]), ItemList.Shape_Slicer_Flat.get(0L, new Object[0]), ItemList.Food_Sliced_Bun.get(2L, new Object[0]), 128, 4); GT_Values.RA.addSlicerRecipe(ItemList.Food_Baked_Bread.get(1L, new Object[0]), ItemList.Shape_Slicer_Flat.get(0L, new Object[0]), ItemList.Food_Sliced_Bread.get(2L, new Object[0]), 128, 4); GT_Values.RA.addSlicerRecipe(ItemList.Food_Baked_Baguette.get(1L, new Object[0]), ItemList.Shape_Slicer_Flat.get(0L, new Object[0]), ItemList.Food_Sliced_Baguette.get(2L, new Object[0]), 128, 4); +//Circuit Recipes!!! + Object[] o = new Object[0]; + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Board_Coated.get(3, o), new Object[]{" R ","PPP"," R ",'P',GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Wood, 1),'R',ItemList.IC2_Resin.get(1, o)}); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Board_Phenolic.get(8, o), new Object[]{"PRP","PPP","PPP",'P',GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1),'R',GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glue, 1)}); + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Epoxid, 1), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Copper, 1), Materials.SulfuricAcid.getFluid(125), null, ItemList.Circuit_Board_Epoxy.get(1, o), 500, 10); + GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1), Materials.Electrum.getMolten(16), null, ItemList.Circuit_Board_Fiberglass.get(16, o), null, 80, 48, 2600); + GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Board_Fiberglass.get(1, o), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Electrum, 16), Materials.SulfuricAcid.getFluid(250), null, ItemList.Circuit_Board_Multifiberglass.get(1, o), 100, 480); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Board_Wetware.get(1, o), new Object[]{"DLD","PBP","TPT",'T',GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Polytetrafluoroethylene, 1),'L',ItemList.Electric_Pump_LV.get(1,o),'P',GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Silicone, 1),'D',ItemList.Bottle_Dragon_Blood.get(1, o),'B',ItemList.Circuit_Board_Multifiberglass.get(1, o)}); + + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Resistor.get(3, o), new Object[]{" P ","FCF"," P ",'P',new ItemStack(Items.paper),'F',OrePrefixes.wireGt01.get(Materials.Copper),'C',OrePrefixes.dust.get(Materials.Coal)}); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Resistor.get(3, o), new Object[]{" P ","FCF"," P ",'P',new ItemStack(Items.paper),'F',OrePrefixes.wireFine.get(Materials.Copper),'C',OrePrefixes.dust.get(Materials.Coal)}); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 4), ItemList.Circuit_Parts_Resistor.get(12, o), 160, 6); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 4),Materials.Plastic.getMolten(144), ItemList.Circuit_Parts_ResistorSMD.get(24, o), 80, 96); + GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 1), ItemList.Shape_Mold_Ball.get(0, o), ItemList.Circuit_Parts_Glass_Tube.get(1,o), 240, 8); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Vacuum_Tube.get(1, o), new Object[]{"PGP","FFF",'G',ItemList.Circuit_Parts_Glass_Tube,'P',new ItemStack(Items.paper),'F',OrePrefixes.wireFine.get(Materials.Copper)}); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Vacuum_Tube.get(1, o), new Object[]{"PGP","FFF",'G',ItemList.Circuit_Parts_Glass_Tube,'P',new ItemStack(Items.paper),'F',OrePrefixes.wireGt01.get(Materials.Copper)}); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Diode.get(1,o), new Object[]{"BG ","WDW","BG ",'B',OrePrefixes.dye.get(Materials.Black),'G',new ItemStack(Blocks.glass_pane),'D',OrePrefixes.dust.get(Materials.Gallium),'W',OrePrefixes.wireGt01.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Diode.get(1,o), new Object[]{"BG ","WDW","BG ",'B',OrePrefixes.dye.get(Materials.Black),'G',new ItemStack(Blocks.glass_pane),'D',OrePrefixes.dust.get(Materials.Gallium),'W',OrePrefixes.wireFine.get(Materials.Tin)}); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.AnnealedCopper, 4), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gallium, 1), Materials.Glass.getMolten(288), ItemList.Circuit_Parts_Diode.get(16, o), 400, 48); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 4), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gallium, 1), Materials.Glass.getMolten(288), ItemList.Circuit_Parts_DiodeSMD.get(32, o), 400, 192); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Coil.get(1,o), new Object[]{"WWW","WDW","WWW",'G',new ItemStack(Blocks.glass_pane),'D',ItemList.IC2_Item_Casing_Steel.get(1,o),'W',OrePrefixes.wireFine.get(Materials.Copper)}); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Tin, 6),Materials.Plastic.getMolten(144), ItemList.Circuit_Parts_Transistor.get(8, o), 80, 24); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Gallium, 1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.AnnealedCopper, 6),Materials.Plastic.getMolten(288), ItemList.Circuit_Parts_TransistorSMD.get(32, o), 80, 96); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Plastic, 2), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 1), ItemList.Circuit_Parts_Capacitor.get(2, o), 80, 96); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 2), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 1),Materials.Plastic.getMolten(72), ItemList.Circuit_Parts_CapacitorSMD.get(4, o), 100, 480); + + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1, new Object[0]), GT_Utility.copyAmount(0,GT_OreDictUnificator.get(OrePrefixes.lens, Materials.EnderPearl, 1)), ItemList.Circuit_Wafer_NAND.get(1, new Object[0]), 500, 480, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0,GT_OreDictUnificator.get(OrePrefixes.lens, Materials.EnderPearl, 1)), ItemList.Circuit_Wafer_NAND.get(4, new Object[0]), 200, 1920, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1, new Object[0]), GT_Utility.copyAmount(0,GT_OreDictUnificator.get(OrePrefixes.lens, Materials.EnderEye, 1)), ItemList.Circuit_Wafer_NOR.get(1, new Object[0]), 500, 480, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0,GT_OreDictUnificator.get(OrePrefixes.lens, Materials.EnderEye, 1)), ItemList.Circuit_Wafer_NOR.get(4, new Object[0]), 200, 1920, true); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_ILC.get(1, o), ItemList.Circuit_Chip_ILC.get(8,o), null, 600, 48); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_Ram.get(1, o), ItemList.Circuit_Chip_Ram.get(32,o), null, 600, 48); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_NAND.get(1, o), ItemList.Circuit_Chip_NAND.get(32,o), null, 600, 48); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_NOR.get(1, o), ItemList.Circuit_Chip_NOR.get(16,o), null, 600, 48); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_CPU.get(1, o), ItemList.Circuit_Chip_CPU.get(8,o), null, 600, 48); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_SoC.get(1, o), ItemList.Circuit_Chip_SoC.get(6,o), null, 600, 48); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_SoC2.get(1, o), ItemList.Circuit_Chip_SoC2.get(6,o), null, 600, 48); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_PIC.get(1, o), ItemList.Circuit_Chip_PIC.get(4,o), null, 600, 48); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_HPIC.get(1, o), ItemList.Circuit_Chip_HPIC.get(2,o), null, 600, 48); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_NanoCPU.get(1, o), ItemList.Circuit_Chip_NanoCPU.get(7,o), null, 600, 48); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_QuantumCPU.get(1, o), ItemList.Circuit_Chip_QuantumCPU.get(5,o), null, 600, 48); + GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Wafer_PIC.get(1, o), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gallium, 2), Materials.RedstoneAlloy.getMolten(288), null, ItemList.Circuit_Wafer_HPIC.get(1, o), 1200, 1920); + GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Wafer_CPU.get(1, o), GT_Utility.copyAmount(16, ic2.core.Ic2Items.carbonFiber), Materials.Glowstone.getMolten(576), null, ItemList.Circuit_Wafer_NanoCPU.get(1, o), 400, 1920); + GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Wafer_NanoCPU.get(1, o), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NetherStar, 1), Materials.NaquadahAlloy.getMolten(288), null, ItemList.Circuit_Wafer_QuantumCPU.get(1, o), 600, 1920); + GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Wafer_NanoCPU.get(1, o), ItemList.QuantumEye.get(1, o), Materials.Europium.getMolten(288), null, ItemList.Circuit_Wafer_QuantumCPU.get(1, o), 400, 1920); + + GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Emerald, 1), Materials.Europium.getMolten(16), ItemList.Circuit_Parts_RawCrystalChip.get(1,o), 1000, 12000, 320, true); + GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Olivine, 1), Materials.Europium.getMolten(16), ItemList.Circuit_Parts_RawCrystalChip.get(1,o), 1000, 12000, 320, true); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Circuit_Parts_RawCrystalChip.get(9,o), new Object[]{ItemList.Circuit_Chip_CrystalCPU.get(1,o)}); + GT_Values.RA.addBlastRecipe(ItemList.Circuit_Parts_RawCrystalChip.get(1,o), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Emerald, 1), Materials.Helium.getGas(1000), null, ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1,o), null, 900, 480, 5000); + GT_Values.RA.addBlastRecipe(ItemList.Circuit_Parts_RawCrystalChip.get(1,o), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Olivine, 1), Materials.Helium.getGas(1000), null, ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1,o), null, 900, 480, 5000); + + GT_Values.RA.addAssemblylineRecipe(ItemList.Circuit_Crystalmainframe.get(1,o), 72000, new ItemStack[]{ + ItemList.Circuit_Board_Wetware.get(1,o), + ItemList.Circuit_Chip_Stemcell.get(8,o), + ItemList.Circuit_Parts_Glass_Tube.get(8,o), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Plastic, 4), + ItemList.IC2_Item_Casing_Gold.get(8,o), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 64), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 4), + }, new FluidStack[]{ + new FluidStack(FluidRegistry.getFluid("ic2biomass"), 250), + Materials.UUMatter.getFluid(100), + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 1000), + }, ItemList.Circuit_Chip_NeuroCPU.get(1,o), 200, 80000); + + GT_Values.RA.addAssemblylineRecipe(ItemList.Circuit_Wetwaresupercomputer.get(1,o), 288000, new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Tritanium, 4), + ItemList.Circuit_Wetwaresupercomputer.get(8,o), + ItemList.Circuit_Parts_Coil.get(4,o), + ItemList.Circuit_Parts_CapacitorSMD.get(24,o), + ItemList.Circuit_Parts_ResistorSMD.get(64,o), + ItemList.Circuit_Parts_TransistorSMD.get(32,o), + ItemList.Circuit_Parts_DiodeSMD.get(16,o), + ItemList.Circuit_Chip_Ram.get(16,o),GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 32), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 64) + }, new FluidStack[]{ + Materials.SolderingAlloy.getMolten(2880), + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 10000), + }, ItemList.Circuit_Wetwaremainframe.get(1,o), 2000, 300000); + + GT_Values.RA.addAssemblylineRecipe(ItemList.Energy_LapotronicOrb2.get(1,o), 288000, new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 16L), + ItemList.Circuit_Wetwaremainframe.get(1,o), + ItemList.Circuit_Wetwaremainframe.get(1,o), + ItemList.Circuit_Wetwaremainframe.get(1,o), + ItemList.Circuit_Wetwaremainframe.get(1,o), + ItemList.Energy_LapotronicOrb2.get(8L, new Object[0]), + ItemList.Field_Generator_UV.get(2,o), + ItemList.Circuit_Wafer_HPIC.get(64,o), + ItemList.Circuit_Wafer_HPIC.get(64,o), + ItemList.Circuit_Parts_DiodeSMD.get(16,o), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 32), + }, new FluidStack[]{ + Materials.SolderingAlloy.getMolten(2880), + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 16000), + }, ItemList.ZPM2.get(1,o), 2000, 300000); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 16L), ItemList.Energy_LapotronicOrb2.get(8L, new Object[0]), GT_Values.NF, ItemList.ZPM2.get(1L, new Object[0]), 32768, 4096); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Plastic, 1L), ItemList.Empty_Board_Basic.get(1, new Object[0]), 32, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 2L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Polytetrafluoroethylene, 1L), ItemList.Empty_Board_Elite.get(1, new Object[0]), 32, 256); - + + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Good.get(1,o), new Object[]{"IVC","VDV","CVI",'D',ItemList.Circuit_Parts_Diode.get(1,o),'C',GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.RedAlloy, 1),'V', Ic2Items.electronicCircuit ,'I',ItemList.IC2_Item_Casing_Steel.get(1,o)}); + GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 1), 100, 120); GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 1), 100, 120); GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Gold, 1L), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 2), 200, 120); @@ -427,26 +528,56 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 1L), GT_ModHandler.getModItem(aTextAE, aTextAEMM, 0L, 14), GT_ModHandler.getModItem(aTextAE, aTextAEMM, 1L, 17), 200, 16); GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Gold, 1L), GT_ModHandler.getModItem(aTextAE, aTextAEMM, 0L, 15), GT_ModHandler.getModItem(aTextAE, aTextAEMM, 1L, 18), 200, 16); GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 1L), GT_ModHandler.getModItem(aTextAE, aTextAEMM, 0L, 19), GT_ModHandler.getModItem(aTextAE, aTextAEMM, 1L, 20), 200, 16); - GT_Values.RA.addFormingPressRecipe(ItemList.Empty_Board_Basic.get(1, new Object[0]), ItemList.Circuit_Parts_Wiring_Basic.get(4L, new Object[0]), ItemList.Circuit_Board_Basic.get(1L, new Object[0]), 32, 16); - GT_Values.RA.addFormingPressRecipe(ItemList.Empty_Board_Basic.get(1, new Object[0]), ItemList.Circuit_Parts_Wiring_Advanced.get(4L, new Object[0]), ItemList.Circuit_Board_Advanced.get(1L, new Object[0]), 32, 64); - GT_Values.RA.addFormingPressRecipe(ItemList.Empty_Board_Elite.get(1, new Object[0]), ItemList.Circuit_Parts_Wiring_Elite.get(4L, new Object[0]), ItemList.Circuit_Board_Elite.get(1L, new Object[0]), 32, 256); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lapis, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), ItemList.Circuit_Parts_Advanced.get(2L, new Object[0]), 32, 64); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lazurite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), ItemList.Circuit_Parts_Advanced.get(2L, new Object[0]), 32, 64); + GT_Values.RA.addFormingPressRecipe(ItemList.Food_Dough_Sugar.get(4L, new Object[0]), ItemList.Shape_Mold_Cylinder.get(0L, new Object[0]), ItemList.Food_Raw_Cake.get(1L, new Object[0]), 384, 4); GT_Values.RA.addFormingPressRecipe(new ItemStack(Blocks.glass, 1, 32767), ItemList.Shape_Mold_Arrow.get(0L, new Object[0]), ItemList.Arrow_Head_Glass_Emtpy.get(1L, new Object[0]), 64, 4); for (Materials tMat : Materials.values()) { if ((tMat.mStandardMoltenFluid != null) && (tMat.contains(SubTag.SOLDERING_MATERIAL))) { int tMultiplier = tMat.contains(SubTag.SOLDERING_MATERIAL_GOOD) ? 1 : tMat.contains(SubTag.SOLDERING_MATERIAL_BAD) ? 4 : 2; - - GT_Values.RA.addAssemblerRecipe(ItemList.IC2_Item_Casing_Steel.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.RedAlloy, 2L), tMat.getMolten(144L * tMultiplier / 8L), ItemList.Circuit_Primitive.get(1L, new Object[0]), 16, 8); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Plastic, 1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.RedAlloy, 1L), tMat.getMolten(144L * tMultiplier / 8L), ItemList.Circuit_Primitive.get(1L, new Object[0]), 16, 8); - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Board_Basic.get(1L, new Object[0]), ItemList.Circuit_Primitive.get(2L, new Object[0]), tMat.getMolten(144L * tMultiplier / 4L), ItemList.Circuit_Basic.get(1L, new Object[0]), 32, 16); - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), ItemList.Circuit_Primitive.get(2L, new Object[0]), tMat.getMolten(144L * tMultiplier / 4L), ItemList.Circuit_Good.get(1L, new Object[0]), 32, 16); - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Board_Advanced.get(1L, new Object[0]), ItemList.Circuit_Parts_Advanced.get(2L, new Object[0]), tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Advanced.get(1L, new Object[0]), 32, 64); - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Board_Advanced.get(1L, new Object[0]), ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1L, new Object[0]), tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Data.get(1L, new Object[0]), 32, 64); - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Board_Elite.get(1L, new Object[0]), ItemList.Circuit_Data.get(3L, new Object[0]), tMat.getMolten(144L * tMultiplier / 1L), ItemList.Circuit_Elite.get(1L, new Object[0]), 32, 256); - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Board_Elite.get(1L, new Object[0]), ItemList.Circuit_Parts_Crystal_Chip_Master.get(3L, new Object[0]), tMat.getMolten(144L * tMultiplier / 1L), ItemList.Circuit_Master.get(1L, new Object[0]), 32, 256); - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Data.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Plastic, 2L), tMat.getMolten(144L * tMultiplier / 2L), ItemList.Tool_DataStick.get(1L, new Object[0]), 128, 64); + //Circuit soldering + //Integraded Circuits + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic.get(1,o),ItemList.Circuit_Chip_ILC.get(1,o),ItemList.Circuit_Parts_Resistor.get(2,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Basic.get(1,o), 200, 8); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic.get(1,o),ItemList.Circuit_Chip_ILC.get(1,o),ItemList.Circuit_Parts_ResistorSMD.get(2,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Basic.get(1,o), 200, 8); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic.get(1,o),ItemList.Circuit_Chip_ILC.get(3,o),ItemList.Circuit_Parts_Resistor.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Gold, 8)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Integrated_Good.get(1,o), 400, 16); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic.get(1,o),ItemList.Circuit_Chip_ILC.get(3,o),ItemList.Circuit_Parts_ResistorSMD.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Gold, 8)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Integrated_Good.get(1,o), 400, 16); + //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, 140); + 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, 160); + 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, 160); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1),ItemList.Circuit_Computer.get(8,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, 140); + 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_CapacitorSMD.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, 160); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1),ItemList.Circuit_Computer.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.AnnealedCopper, 12)},tMat.getMolten(144L * tMultiplier*2), ItemList.Circuit_Elite.get(1,o), 1600, 480); + //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(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(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.AnnealedCopper, 12)},tMat.getMolten(144L * tMultiplier*2), ItemList.Circuit_Master.get(1,o), 1600, 1920); + //Quantum Circuits + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1,o),ItemList.Circuit_Chip_QuantumCPU.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.Platinum, 2)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Quantumprocessor.get(1,o), 200, 2400); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1,o),ItemList.Circuit_Quantumprocessor.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.Platinum, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Quantumcomputer.get(1,o), 400, 2400); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(2,o),ItemList.Circuit_Quantumcomputer.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.Platinum, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Masterquantumcomputer.get(1,o), 400, 2400); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1),ItemList.Circuit_Masterquantumcomputer.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.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(16,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); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Wetware.get(2,o),ItemList.Circuit_Wetwarecomputer.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.YttriumBariumCuprate, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Wetwaresupercomputer.get(1,o), 400, 38400); + + //SoC + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1,o),ItemList.Circuit_Chip_SoC.get(1,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.RedAlloy, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Basic.get(1,o), 50, 600); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1,o),ItemList.Circuit_Chip_SoC.get(1,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Processor.get(1,o), 50, 2400); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Fiberglass.get(1,o),ItemList.Circuit_Chip_SoC2.get(1,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Nanoprocessor.get(1,o), 50, 9600); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Fiberglass.get(1,o),ItemList.Circuit_Chip_SoC2.get(1,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.NiobiumTitanium, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Quantumprocessor.get(1,o), 50, 38400); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1,o),ItemList.Circuit_Chip_CrystalSoC.get(1,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.YttriumBariumCuprate, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Crystalprocessor.get(1,o), 50, 153600); + + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1,o),ItemList.Circuit_Chip_PIC.get(4,o), ItemList.Circuit_Parts_Crystal_Chip_Master.get(18L,o),ItemList.Circuit_Chip_NanoCPU.get(1,o), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 16)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Basic.get(1,o), 512, 1024); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1,o),ItemList.Circuit_Chip_HPIC.get(4,o), ItemList.Energy_LapotronicOrb.get(8L,o),ItemList.Circuit_Chip_QuantumCPU.get(1,o), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 16),GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Europium, 4L)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Basic.get(1,o), 512, 1024); + for (ItemStack tPlate : new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L)}) { GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.lever, 1, 32767), tPlate, tMat.getMolten(144L * tMultiplier / 2L), ItemList.Cover_Controller.get(1L, new Object[0]), 800, 16); GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.redstone_torch, 1, 32767), tPlate, tMat.getMolten(144L * tMultiplier / 2L), ItemList.Cover_ActivityDetector.get(1L, new Object[0]), 800, 16); @@ -456,14 +587,19 @@ if(Loader.isModLoaded("Railcraft")){ } } } + + GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 32), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Gallium, 1), null, null, ItemList.Circuit_Silicon_Ingot.get(1, new Object[0]), null, 9000, 120, 1784); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Silicon_Ingot.get(1, new Object[0]), ItemList.Circuit_Silicon_Wafer.get(16, new Object[0]),null, 200, 8); + GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 64), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 8), Materials.Nitrogen.getGas(8000), null, ItemList.Circuit_Silicon_Ingot2.get(1, new Object[0]), null, 12000, 480, 2484); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Silicon_Ingot2.get(1, new Object[0]), ItemList.Circuit_Silicon_Wafer2.get(32, new Object[0]),null, 400, 64); + GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Silicon, 16), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 1), Materials.Argon.getGas(8000), null, ItemList.Circuit_Silicon_Ingot3.get(1, new Object[0]), null, 1500, 1920, 4484); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Silicon_Ingot3.get(1, new Object[0]), ItemList.Circuit_Silicon_Wafer3.get(64, new Object[0]),null, 800, 384); + + GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.redstone_torch, 2, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), Materials.Concrete.getMolten(144L), new ItemStack(Items.repeater, 1, 0), 800, 1); GT_Values.RA.addAssemblerRecipe(new ItemStack(Items.leather, 1, 32767), new ItemStack(Items.lead, 1, 32767), Materials.Glue.getFluid(50L), new ItemStack(Items.name_tag, 1, 0), 100, 8); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 8L), new ItemStack(Items.compass, 1, 32767), GT_Values.NF, new ItemStack(Items.map, 1, 0), 100, 8); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tantalum, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Manganese, 1L), Materials.Plastic.getMolten(144L), ItemList.Battery_RE_ULV_Tantalum.get(1L, new Object[0]), 100, 4); - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Elite.get(2L, new Object[0]), ItemList.Circuit_Parts_Crystal_Chip_Elite.get(18L, new Object[0]), GT_Values.NF, ItemList.Tool_DataOrb.get(1L, new Object[0]), 512, 256); - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Master.get(2L, new Object[0]), ItemList.Circuit_Parts_Crystal_Chip_Master.get(18L, new Object[0]), GT_Values.NF, ItemList.Energy_LapotronicOrb.get(1L, new Object[0]), 512, 1024); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Europium, 4L), ItemList.Energy_LapotronicOrb.get(8L, new Object[0]), GT_Values.NF, ItemList.Energy_LapotronicOrb2.get(1L, new Object[0]), 2048, 4096); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 16L), ItemList.Energy_LapotronicOrb2.get(8L, new Object[0]), GT_Values.NF, ItemList.ZPM2.get(1L, new Object[0]), 32768, 4096); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tantalum, 1L), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Manganese, 1L), Materials.Plastic.getMolten(144L), ItemList.Battery_RE_ULV_Tantalum.get(8L, new Object[0]), 100, 4); GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("TwilightForest", "item.charmOfLife1", 4L, 0), ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), GT_Values.NF, GT_ModHandler.getModItem("TwilightForest", "item.charmOfLife2", 1L, 0), 100, 8); GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping1", 4L, 0), ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), GT_Values.NF, GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping2", 1L, 0), 100, 8); GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping2", 4L, 0), ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), GT_Values.NF, GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping3", 1L, 0), 100, 8); 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 2c598a14fc..511865619c 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -71,6 +71,7 @@ public class GT_Loader_MetaTileEntities implements Runnable { GT_ModHandler.addCraftingRecipe(ItemList.Casing_Gearbox_Titanium.get(1L, new Object[0]), bits, new Object[]{"PhP", "GFG", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Steel), 'F', OrePrefixes.frameGt.get(Materials.Titanium), 'G', OrePrefixes.gearGt.get(Materials.Titanium)}); GT_ModHandler.addCraftingRecipe(ItemList.Casing_Gearbox_TungstenSteel.get(1L, new Object[0]), bits, new Object[]{"PhP", "GFG", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Steel), 'F', OrePrefixes.frameGt.get(Materials.TungstenSteel), 'G', ItemList.Robot_Arm_IV}); GT_ModHandler.addCraftingRecipe(ItemList.Casing_Grate.get(1L, new Object[0]), bits, new Object[]{"PVP", "PFP", aTextPlateMotor, 'P', new ItemStack(Blocks.iron_bars,1), 'F', OrePrefixes.frameGt.get(Materials.Steel), 'M', ItemList.Electric_Motor_MV, 'V', OrePrefixes.rotor.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Vent.get(1L, new Object[0]), bits, new Object[]{"PPP", "SSS", "MFV", 'P', new ItemStack(Blocks.iron_bars,1), 'F', OrePrefixes.frameGt.get(Materials.Steel), 'M', ItemList.Electric_Motor_MV, 'V', OrePrefixes.rotor.get(Materials.Steel),'S',ItemList.Component_Filter}); GT_ModHandler.addCraftingRecipe(ItemList.Casing_Assembler.get(1L, new Object[0]), bits, new Object[]{"PVP", "PFP", aTextPlateMotor, 'P', OrePrefixes.circuit.get(Materials.Data), 'F', OrePrefixes.frameGt.get(Materials.TungstenSteel), 'M', ItemList.Electric_Motor_IV, 'V', OrePrefixes.circuit.get(Materials.Master)}); GT_ModHandler.addCraftingRecipe(ItemList.Casing_Firebox_Bronze.get(1L, new Object[0]), bits, new Object[]{"PSP", "SFS", "PSP", 'P', OrePrefixes.plate.get(Materials.Bronze), 'F', OrePrefixes.frameGt.get(Materials.Bronze), 'S', OrePrefixes.stick.get(Materials.Bronze)}); GT_ModHandler.addCraftingRecipe(ItemList.Casing_Firebox_Steel.get(1L, new Object[0]), bits, new Object[]{"PSP", "SFS", "PSP", 'P', OrePrefixes.plate.get(Materials.Steel), 'F', OrePrefixes.frameGt.get(Materials.Steel), 'S', OrePrefixes.stick.get(Materials.Steel)}); @@ -1241,6 +1242,16 @@ public class GT_Loader_MetaTileEntities implements Runnable { ItemList.Machine_Multi_Cleanroom.set(new GT_MetaTileEntity_Cleanroom(1172, "multimachine.cleanroom", "Cleanroom Controller").getStackForm(1)); GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_Cleanroom.get(1L, new Object[0]), bitsd, new Object[]{"FFF", "RMR", "MCM", 'M', ItemList.Hull_HV, 'F', ItemList.Component_Filter, 'R', OrePrefixes.rotor.get(Materials.StainlessSteel), 'M', ItemList.Electric_Motor_HV, 'C', OrePrefixes.circuit.get(Materials.Advanced)}); + + ItemList.Machine_LV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1180, "basicmachine.circuitassembler.tier.01", "Basic Circuit Assembling Machine", 1, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", "", aBoolConst_0, aBoolConst_0, 0, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); + ItemList.Machine_MV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1181, "basicmachine.circuitassembler.tier.02", "Advanced Circuit Assembling Machine", 2, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", "", aBoolConst_0, aBoolConst_0, 0, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); + ItemList.Machine_HV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1182, "basicmachine.circuitassembler.tier.03", "Advanced Circuit Assembling Machine II", 3, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", "", aBoolConst_0, aBoolConst_0, 0, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); + ItemList.Machine_EV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1183, "basicmachine.circuitassembler.tier.04", "Advanced Circuit Assembling Machine III", 4, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", "", aBoolConst_0, aBoolConst_0, 0, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); + ItemList.Machine_IV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1184, "basicmachine.circuitassembler.tier.05", "Advanced Circuit Assembling Machine IV", 5, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", "", aBoolConst_0, aBoolConst_0, 0, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); + ItemList.Machine_LuV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(1185, "basicmachine.circuitassembler.tier.06", "Advanced Circuit Assembling Machine V", 6, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", "", aBoolConst_0, aBoolConst_0, 0, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); + ItemList.Machine_ZPM_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(1186, "basicmachine.circuitassembler.tier.07", "Advanced Circuit Assembling Machine VI", 7, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", "", aBoolConst_0, aBoolConst_0, 0, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); + ItemList.Machine_UV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1187, "basicmachine.circuitassembler.tier.08", "Advanced Circuit Assembling Machine VII", 8, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", "", aBoolConst_0, aBoolConst_0, 0, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); + } private static void run4() { diff --git a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java index 35b71b24e9..247a7df4a6 100644 --- a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java +++ b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java @@ -10,6 +10,7 @@ import codechicken.nei.recipe.GuiRecipe; import codechicken.nei.recipe.GuiUsageRecipe; import codechicken.nei.recipe.TemplateRecipeHandler; import cpw.mods.fml.common.event.FMLInterModComms; +import gregtech.GT_Mod; import gregtech.api.enums.GT_Values; import gregtech.api.enums.OrePrefixes; import gregtech.api.gui.GT_GUIContainer_BasicMachine; @@ -209,8 +210,13 @@ public class GT_NEI_DefaultHandler if (tDuration > 0) { drawText(10, 113, "Time: " + (tDuration < 20 ? "< 1" : Integer.valueOf(tDuration / 20)) + " secs", -16777216); } - if ((GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost))) { - drawText(10, 123, this.mRecipeMap.mNEISpecialValuePre + ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue * this.mRecipeMap.mNEISpecialValueMultiplier + this.mRecipeMap.mNEISpecialValuePost, -16777216); + int tSpecial = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue; + if(tSpecial == -100 && GT_Mod.gregtechproxy.mLowGravProcessing){ + drawText(10, 123, "Needs Low Gravity", -16777216); + }else if(tSpecial == -200){ + drawText(10, 123, "Needs Cleanroom", -16777216); + }else if ((GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost))) { + drawText(10, 123, this.mRecipeMap.mNEISpecialValuePre + tSpecial * this.mRecipeMap.mNEISpecialValueMultiplier + this.mRecipeMap.mNEISpecialValuePost, -16777216); } } diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_BOTTOM.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_BOTTOM.png new file mode 100644 index 0000000000..6c7e63b924 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_BOTTOM.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_BOTTOM_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_BOTTOM_ACTIVE.png new file mode 100644 index 0000000000..6c7e63b924 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_BOTTOM_ACTIVE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_FRONT.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_FRONT.png new file mode 100644 index 0000000000..71b4efec65 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_FRONT.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_FRONT_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_FRONT_ACTIVE.png new file mode 100644 index 0000000000..9e46f30b5b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_FRONT_ACTIVE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_SIDE.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_SIDE.png new file mode 100644 index 0000000000..6c7e63b924 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_SIDE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_SIDE_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_SIDE_ACTIVE.png new file mode 100644 index 0000000000..6c7e63b924 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_SIDE_ACTIVE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_TOP.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_TOP.png new file mode 100644 index 0000000000..7e0ba95ed0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_TOP.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_TOP_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_TOP_ACTIVE.png new file mode 100644 index 0000000000..9c0b2e3454 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_TOP_ACTIVE.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/basicmachines/CircuitAssembler.png b/src/main/resources/assets/gregtech/textures/gui/basicmachines/CircuitAssembler.png new file mode 100644 index 0000000000..ee6b08274e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/basicmachines/CircuitAssembler.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/700.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/700.png index e10815677a..5af04ce86a 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/700.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/700.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/703.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/703.png index ec3c0358a1..cb9ada097b 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/703.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/703.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/705.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/705.png index f5d5a1bc39..7bdb5c7ac0 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/705.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/705.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/706.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/706.png index d6ff394c66..f2ac923359 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/706.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/706.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/710.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/710.png index 6f403c14f5..556ef01bec 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/710.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/710.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/711.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/711.png index 6614c152a6..6c6d9c620d 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/711.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/711.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/712.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/712.png index 98c4b4f2b7..c3fb13ee92 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/712.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/712.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/715.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/715.png index cffad53f13..4e2edfeca7 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/715.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/715.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/716.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/716.png index 6c9c006044..c62b237004 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/716.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/716.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/717.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/717.png index ee1c87e1b1..0190547a58 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/717.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/717.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/718.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/718.png index 6f8d8bdde5..1bcfb2d95e 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/718.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/718.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/719.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/719.png index 881bdaa78a..7d45cae3c0 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/719.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/719.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/720.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/720.png index 00900203dc..1f933fbbca 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/720.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/720.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/1.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/1.png new file mode 100644 index 0000000000..556ef01bec Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/1.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/10.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/10.png new file mode 100644 index 0000000000..c62b237004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/10.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/11.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/11.png new file mode 100644 index 0000000000..4b02911cfc Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/11.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/12.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/12.png new file mode 100644 index 0000000000..8a4fee39f5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/12.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/13.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/13.png new file mode 100644 index 0000000000..5af04ce86a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/13.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/14.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/14.png new file mode 100644 index 0000000000..71cfbbfac7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/14.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/15.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/15.png new file mode 100644 index 0000000000..4e2edfeca7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/15.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/16.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/16.png new file mode 100644 index 0000000000..2f900ccc47 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/16.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/17.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/17.png new file mode 100644 index 0000000000..0190547a58 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/17.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/18.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/18.png new file mode 100644 index 0000000000..d8cc8c5a56 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/18.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/19.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/19.png new file mode 100644 index 0000000000..1bcfb2d95e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/19.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/2.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/2.png new file mode 100644 index 0000000000..6c6d9c620d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/2.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/20.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/20.png new file mode 100644 index 0000000000..9d9f338e5a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/20.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/3.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/3.png new file mode 100644 index 0000000000..c3fb13ee92 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/3.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/30.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/30.png new file mode 100644 index 0000000000..9dd914ea74 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/30.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/31.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/31.png new file mode 100644 index 0000000000..acb258e066 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/31.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/32.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/32.png new file mode 100644 index 0000000000..78ba24aad1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/32.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/33.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/33.png new file mode 100644 index 0000000000..5e3fbb8a92 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/33.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/34.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/34.png new file mode 100644 index 0000000000..4ce59d721c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/34.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/35.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/35.png new file mode 100644 index 0000000000..5dcb72d92d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/35.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/36.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/36.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/36.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/37.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/37.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/37.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/38.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/38.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/38.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/39.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/39.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/39.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/4.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/4.png new file mode 100644 index 0000000000..7d45cae3c0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/4.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/40.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/40.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/40.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/41.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/41.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/41.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/42.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/42.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/42.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/43.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/43.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/43.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/44.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/44.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/44.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/45.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/45.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/45.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/46.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/46.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/46.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/47.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/47.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/47.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/48.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/48.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/48.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/49.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/49.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/49.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/5.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/5.png new file mode 100644 index 0000000000..1f933fbbca Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/5.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/50.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/50.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/50.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/51.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/51.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/51.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/52.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/52.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/52.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/53.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/53.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/53.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/54.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/54.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/54.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/55.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/55.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/55.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/56.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/56.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/56.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/57.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/57.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/57.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/6.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/6.png new file mode 100644 index 0000000000..498da22fca Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/6.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/69.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/69.png new file mode 100644 index 0000000000..7da7ab1e69 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/69.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/70.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/70.png new file mode 100644 index 0000000000..7da7ab1e69 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/70.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/700.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/700.png new file mode 100644 index 0000000000..e10815677a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/700.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/701.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/701.png new file mode 100644 index 0000000000..661cd14817 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/701.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/703.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/703.png new file mode 100644 index 0000000000..ec3c0358a1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/703.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/704.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/704.png new file mode 100644 index 0000000000..daace0f92a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/704.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/705.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/705.png new file mode 100644 index 0000000000..f5d5a1bc39 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/705.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/707.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/707.png new file mode 100644 index 0000000000..9f03d572b7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/707.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/708.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/708.png new file mode 100644 index 0000000000..548784db2a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/708.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/71.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/71.png new file mode 100644 index 0000000000..56da7e8d0d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/71.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/710.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/710.png new file mode 100644 index 0000000000..6f403c14f5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/710.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/711.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/711.png new file mode 100644 index 0000000000..6614c152a6 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/711.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/712.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/712.png new file mode 100644 index 0000000000..98c4b4f2b7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/712.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/713.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/713.png new file mode 100644 index 0000000000..7da7ab1e69 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/713.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/714.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/714.png new file mode 100644 index 0000000000..56da7e8d0d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/714.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/715.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/715.png new file mode 100644 index 0000000000..cffad53f13 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/715.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/716.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/716.png new file mode 100644 index 0000000000..6c9c006044 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/716.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/717.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/717.png new file mode 100644 index 0000000000..ee1c87e1b1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/717.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/718.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/718.png new file mode 100644 index 0000000000..6f8d8bdde5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/718.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/719.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/719.png new file mode 100644 index 0000000000..881bdaa78a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/719.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/72.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/72.png new file mode 100644 index 0000000000..98c4b4f2b7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/72.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/720.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/720.png new file mode 100644 index 0000000000..00900203dc Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/720.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/73.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/73.png new file mode 100644 index 0000000000..c568b54d85 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/73.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/79.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/79.png new file mode 100644 index 0000000000..6c64b90877 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/79.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/80.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/80.png new file mode 100644 index 0000000000..ec3c0358a1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/80.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/82.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/82.png new file mode 100644 index 0000000000..711716b238 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/82.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/83.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/83.png new file mode 100644 index 0000000000..13274dc9fb Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/83.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/85.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/85.png new file mode 100644 index 0000000000..1491144be9 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/85.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/86.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/86.png new file mode 100644 index 0000000000..f5d5a1bc39 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/86.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/88.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/88.png new file mode 100644 index 0000000000..9627adc0d2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/88.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/89.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/89.png new file mode 100644 index 0000000000..d2b7719d7e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/89.png differ 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 new file mode 100644 index 0000000000..d6ff394c66 Binary files /dev/null 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/91.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/91.png new file mode 100644 index 0000000000..ad726ffedd Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/91.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/92.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/92.png new file mode 100644 index 0000000000..b8db181cbe Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/92.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/93.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/93.png new file mode 100644 index 0000000000..c04431f175 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/93.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/95.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/95.png new file mode 100644 index 0000000000..9af72bb220 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/95.png differ -- cgit From 9cf2a8059de759d323791e0673e1e2abf30da517 Mon Sep 17 00:00:00 2001 From: Dimach Date: Thu, 2 Mar 2017 20:17:23 +0200 Subject: Fix basic machine bug (machine waste input when placed not in clearroom) --- .../implementations/GT_MetaTileEntity_BasicMachine.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java index d82d12149d..0aa078d686 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java @@ -732,23 +732,23 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B if (tMap == null) return DID_NOT_FIND_RECIPE; GT_Recipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), getAllInputs()); if (tRecipe == null) return DID_NOT_FIND_RECIPE; - if (GT_Mod.gregtechproxy.mLowGravProcessing && tRecipe.mSpecialValue == -100 && getBaseMetaTileEntity().getWorld().provider.dimensionId == -27)return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + if (GT_Mod.gregtechproxy.mLowGravProcessing && tRecipe.mSpecialValue == -100 && getBaseMetaTileEntity().getWorld().provider.dimensionId == -27) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe; if (!canOutput(tRecipe)) { mOutputBlocked++; return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; } + if (tRecipe.mSpecialValue == -200 && (mCleanroom == null || mCleanroom.mEfficiency == 0)) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; if (!tRecipe.isRecipeInputEqual(true, new FluidStack[]{getFillableStack()}, getAllInputs())) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; - for (int i = 0; i < mOutputItems.length; i++) if (getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(i)) mOutputItems[i] = tRecipe.getOutput(i); - if(tRecipe.mSpecialValue == -200){ - if(mCleanroom==null)return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; - if (mOutputItems[0]==null || getBaseMetaTileEntity().getRandomNumber(10000) > mCleanroom.mEfficiency) - mOutputItems[0] = null; - } + if (tRecipe.mSpecialValue == -200) + for (int i = 0; i < mOutputItems.length; i++) + if (mOutputItems[i] != null && getBaseMetaTileEntity().getRandomNumber(10000) > mCleanroom.mEfficiency) + mOutputItems[i] = null; mOutputFluid = tRecipe.getFluidOutput(0); calculateOverclockedNess(tRecipe); return FOUND_AND_SUCCESSFULLY_USED_RECIPE; -- cgit From 9c7e95b245fa4c0d943f0540f43470e044e003be Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Wed, 8 Mar 2017 17:28:05 +0100 Subject: Fix low grav processing check --- .../metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java index 0aa078d686..a128f748db 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java @@ -732,7 +732,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B if (tMap == null) return DID_NOT_FIND_RECIPE; GT_Recipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), getAllInputs()); if (tRecipe == null) return DID_NOT_FIND_RECIPE; - if (GT_Mod.gregtechproxy.mLowGravProcessing && tRecipe.mSpecialValue == -100 && getBaseMetaTileEntity().getWorld().provider.dimensionId == -27) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + if (GT_Mod.gregtechproxy.mLowGravProcessing && tRecipe.mSpecialValue == -100 && getBaseMetaTileEntity().getWorld().provider.dimensionId != -27) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe; if (!canOutput(tRecipe)) { mOutputBlocked++; -- cgit From 5f56c40a7590bf84f9cc121df71ef70a1b07d0e5 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Thu, 23 Mar 2017 13:00:58 +0100 Subject: Prevent empty batterys from stacking in battery buffer --- src/main/java/gregtech/api/gui/GT_Container.java | 11 +++++------ .../implementations/GT_MetaTileEntity_BasicBatteryBuffer.java | 5 +++++ 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/gui/GT_Container.java b/src/main/java/gregtech/api/gui/GT_Container.java index 8eb908ecae..ff0f1cbb9f 100644 --- a/src/main/java/gregtech/api/gui/GT_Container.java +++ b/src/main/java/gregtech/api/gui/GT_Container.java @@ -312,10 +312,9 @@ public class GT_Container extends Container { while (aStack.stackSize > 0 && (!par4 && var6 < aSlotCount || par4 && var6 >= aStartIndex)) { var7 = (Slot) this.inventorySlots.get(var6); var8 = var7.getStack(); - if (!(var7 instanceof GT_Slot_Holo) && !(var7 instanceof GT_Slot_Output) && var8 != null && var8.getItem() == aStack.getItem() && (!aStack.getHasSubtypes() || aStack.getItemDamage() == var8.getItemDamage()) && ItemStack.areItemStackTagsEqual(aStack, var8)) { int var9 = var8.stackSize + aStack.stackSize; - + if(var8.stackSize 0) { if (par4) { var6 = aSlotCount - 1; @@ -349,9 +347,10 @@ public class GT_Container extends Container { var8 = var7.getStack(); if (var8 == null) { - var7.putStack(GT_Utility.copy(aStack)); + int var10 = Math.min(aStack.stackSize, mTileEntity.getInventoryStackLimit()); + var7.putStack(GT_Utility.copyAmount(var10, aStack)); var7.onSlotChanged(); - aStack.stackSize = 0; + aStack.stackSize -= var10; var5 = true; break; } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java index 7091e70ab2..156473749b 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java @@ -261,6 +261,11 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier } return false; } + + @Override + public int getInventoryStackLimit() { + return 1; + } public long[] getStoredEnergy() { boolean scaleOverflow =false; -- cgit From dd8510792f19ace4bac0ec357e207abdf5fe6808 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Fri, 31 Mar 2017 19:01:32 +0200 Subject: Detect low grav dimensions by world provider --- src/main/java/gregtech/GT_Mod.java | 4 ++++ .../implementations/GT_MetaTileEntity_BasicMachine.java | 6 +++++- src/main/java/gregtech/api/util/GT_Utility.java | 1 + src/main/java/gregtech/common/GT_Proxy.java | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 4a068f752d..996a16bfe6 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -54,6 +54,8 @@ import net.minecraftforge.oredict.OreDictionary; import org.apache.commons.lang3.StringUtils; import java.io.*; +import java.time.LocalDate; +import java.time.ZoneId; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -255,6 +257,8 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.mAddGTRecipesToIC2Machines = tMainConfig.get("general", "AddGTRecipesToIC2Machines", true).getBoolean(true); gregtechproxy.mUndergroundOil.getConfig(tMainConfig, "undergroundfluid"); gregtechproxy.mLowGravProcessing = Loader.isModLoaded(GT_Values.MOD_ID_GC_CORE) && tMainConfig.get("general", "LowGravProcessing", true).getBoolean(true); + LocalDate tDate = new Date().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + gregtechproxy.mAprilFool = GregTech_API.sSpecialFile.get(ConfigCategories.general, "AprilFool", tDate.getMonthValue()==4 && tDate.getDayOfMonth() == 1); GregTech_API.mOutputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "OutputRF", true); GregTech_API.mInputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "InputRF", false); diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java index a128f748db..ce17874867 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java @@ -10,6 +10,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_ItemStack; import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.objects.XSTR; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; @@ -19,6 +20,7 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; @@ -424,6 +426,8 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B endProcess(); } if (mProgresstime > 5) mStuttering = false; + XSTR aXSTR = new XSTR(); + if(GT_Mod.gregtechproxy.mAprilFool && aXSTR.nextInt(5000)==0)GT_Utility.sendSoundToPlayers(aBaseMetaTileEntity.getWorld(), GregTech_API.sSoundList.get(5), 10.0F, -1.0F, aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(),aBaseMetaTileEntity.getZCoord()); } else { if (!mStuttering) { stutterProcess(); @@ -732,7 +736,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B if (tMap == null) return DID_NOT_FIND_RECIPE; GT_Recipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), getAllInputs()); if (tRecipe == null) return DID_NOT_FIND_RECIPE; - if (GT_Mod.gregtechproxy.mLowGravProcessing && tRecipe.mSpecialValue == -100 && getBaseMetaTileEntity().getWorld().provider.dimensionId != -27) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + if (GT_Mod.gregtechproxy.mLowGravProcessing && tRecipe.mSpecialValue == -100 && !(DimensionManager.getProvider(getBaseMetaTileEntity().getWorld().provider.dimensionId).getClass().getName().endsWith("Orbit")||DimensionManager.getProvider(getBaseMetaTileEntity().getWorld().provider.dimensionId).getClass().getName().endsWith("Space"))) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe; if (!canOutput(tRecipe)) { mOutputBlocked++; diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 6c3289af30..f4ae581fc7 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1602,6 +1602,7 @@ public class GT_Utility { Block tBlock = aWorld.getBlock(aX, aY, aZ); tList.add("----- X: " + aX + " Y: " + aY + " Z: " + aZ + " -----"); + tList.add("Dimension: "+DimensionManager.getProvider(aWorld.provider.dimensionId).getClass().getName()); try { if (tTileEntity instanceof IInventory) tList.add("Name: " + ((IInventory) tTileEntity).getInventoryName() + " MetaData: " + aWorld.getBlockMetadata(aX, aY, aZ)); diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 8cd47b8c88..4153c779d0 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -194,6 +194,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public boolean mEnableAllComponents = false; public boolean mAddGTRecipesToIC2Machines = true; public boolean mLowGravProcessing = false; + public boolean mAprilFool = false; public GT_Proxy() { GameRegistry.registerFuelHandler(this); -- cgit From 234c51ac200c5c48cb00ab578f5f4860d161ea92 Mon Sep 17 00:00:00 2001 From: Johannes Gäßler Date: Fri, 14 Apr 2017 23:33:20 +0200 Subject: Machine descriptions are now a String array instead of a single String. The field mDescription of the class GT_MetaTileEntity_TieredMachineBlock was turned into an array. Every class derived from GT_MetaTileEntity_TieredMachineBlock has received a new additional constructor that takes an array of Strings instead of a single one. --- .../examples/GT_MetaTileEntity_E_Furnace.java | 4 ++++ .../GT_MetaTileEntity_BasicBatteryBuffer.java | 9 ++++++++- .../GT_MetaTileEntity_BasicGenerator.java | 9 ++++++++- .../implementations/GT_MetaTileEntity_BasicHull.java | 4 ++++ .../GT_MetaTileEntity_BasicHull_NonElectric.java | 4 ++++ .../GT_MetaTileEntity_BasicMachine.java | 9 +++++++++ .../GT_MetaTileEntity_BasicMachine_Bronze.java | 4 ++++ .../GT_MetaTileEntity_BasicMachine_GT_Recipe.java | 12 ++++++++++++ .../GT_MetaTileEntity_BasicMachine_Steel.java | 4 ++++ .../implementations/GT_MetaTileEntity_BasicTank.java | 4 ++++ .../implementations/GT_MetaTileEntity_Buffer.java | 4 ++++ .../implementations/GT_MetaTileEntity_Hatch.java | 4 ++++ .../GT_MetaTileEntity_Hatch_Dynamo.java | 4 ++++ .../GT_MetaTileEntity_Hatch_Energy.java | 4 ++++ .../GT_MetaTileEntity_Hatch_Input.java | 4 ++++ .../GT_MetaTileEntity_Hatch_InputBus.java | 4 ++++ .../GT_MetaTileEntity_Hatch_Maintenance.java | 20 ++++++++++++++++++-- .../GT_MetaTileEntity_Hatch_Muffler.java | 10 +++++++++- .../GT_MetaTileEntity_Hatch_Output.java | 4 ++++ .../GT_MetaTileEntity_Hatch_OutputBus.java | 4 ++++ .../GT_MetaTileEntity_MultiBlockBase.java | 10 +++++----- .../GT_MetaTileEntity_TieredMachineBlock.java | 13 ++++++++++--- .../GT_MetaTileEntity_Transformer.java | 4 ++++ .../automation/GT_MetaTileEntity_ChestBuffer.java | 4 ++++ .../automation/GT_MetaTileEntity_Filter.java | 4 ++++ .../automation/GT_MetaTileEntity_Regulator.java | 4 ++++ .../automation/GT_MetaTileEntity_SuperBuffer.java | 4 ++++ .../automation/GT_MetaTileEntity_TypeFilter.java | 4 ++++ .../boilers/GT_MetaTileEntity_Boiler.java | 4 ++++ .../boilers/GT_MetaTileEntity_Boiler_Bronze.java | 3 +++ .../boilers/GT_MetaTileEntity_Boiler_Lava.java | 4 ++++ .../boilers/GT_MetaTileEntity_Boiler_Solar.java | 4 ++++ .../boilers/GT_MetaTileEntity_Boiler_Steel.java | 4 ++++ .../GT_MetaTileEntity_DieselGenerator.java | 5 +++++ .../GT_MetaTileEntity_FluidNaquadahReactor.java | 5 +++++ .../generators/GT_MetaTileEntity_GasTurbine.java | 5 +++++ .../generators/GT_MetaTileEntity_LightningRod.java | 4 ++++ .../GT_MetaTileEntity_MagicEnergyConverter.java | 5 +++++ .../GT_MetaTileEntity_MagicalEnergyAbsorber.java | 7 ++++++- .../GT_MetaTileEntity_PlasmaGenerator.java | 5 +++++ .../GT_MetaTileEntity_SolidNaquadahReactor.java | 5 +++++ .../generators/GT_MetaTileEntity_SteamTurbine.java | 10 +++++++++- .../machines/GT_MetaTileEntity_BasicHull_Bronze.java | 4 ++++ .../GT_MetaTileEntity_BasicHull_BronzeBricks.java | 4 ++++ .../machines/GT_MetaTileEntity_BasicHull_Steel.java | 4 ++++ .../GT_MetaTileEntity_BasicHull_SteelBricks.java | 4 ++++ .../GT_MetaTileEntity_AdvSeismicProspector.java | 9 +++++++++ .../machines/basic/GT_MetaTileEntity_Boxinator.java | 4 ++++ .../machines/basic/GT_MetaTileEntity_Charger.java | 4 ++++ .../machines/basic/GT_MetaTileEntity_CuringOven.java | 4 ++++ .../basic/GT_MetaTileEntity_Disassembler.java | 4 ++++ .../basic/GT_MetaTileEntity_Massfabricator.java | 4 ++++ ...GT_MetaTileEntity_MicrowaveEnergyTransmitter.java | 4 ++++ .../basic/GT_MetaTileEntity_MonsterRepellent.java | 4 ++++ .../basic/GT_MetaTileEntity_PotionBrewer.java | 4 ++++ .../machines/basic/GT_MetaTileEntity_Pump.java | 6 +++++- .../machines/basic/GT_MetaTileEntity_Replicator.java | 4 ++++ .../basic/GT_MetaTileEntity_RockBreaker.java | 4 ++++ .../machines/basic/GT_MetaTileEntity_Scanner.java | 4 ++++ .../basic/GT_MetaTileEntity_SeismicProspector.java | 4 ++++ .../machines/basic/GT_MetaTileEntity_Teleporter.java | 4 ++++ .../multi/GT_MetaTileEntity_LargeBoiler.java | 8 ++++---- .../steam/GT_MetaTileEntity_AlloySmelter_Bronze.java | 4 ++++ .../steam/GT_MetaTileEntity_AlloySmelter_Steel.java | 4 ++++ .../steam/GT_MetaTileEntity_Compressor_Bronze.java | 4 ++++ .../steam/GT_MetaTileEntity_Compressor_Steel.java | 4 ++++ .../steam/GT_MetaTileEntity_Extractor_Bronze.java | 4 ++++ .../steam/GT_MetaTileEntity_Extractor_Steel.java | 4 ++++ .../steam/GT_MetaTileEntity_ForgeHammer_Bronze.java | 4 ++++ .../steam/GT_MetaTileEntity_ForgeHammer_Steel.java | 4 ++++ .../steam/GT_MetaTileEntity_Furnace_Bronze.java | 4 ++++ .../steam/GT_MetaTileEntity_Furnace_Steel.java | 4 ++++ .../steam/GT_MetaTileEntity_Macerator_Bronze.java | 4 ++++ .../steam/GT_MetaTileEntity_Macerator_Steel.java | 4 ++++ .../storage/GT_MetaTileEntity_Locker.java | 9 ++++++++- .../storage/GT_MetaTileEntity_QuantumChest.java | 4 ++++ .../storage/GT_MetaTileEntity_QuantumTank.java | 4 ++++ 77 files changed, 377 insertions(+), 21 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java b/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java index 683fe8aab6..354aff7ccd 100644 --- a/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java +++ b/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java @@ -23,6 +23,10 @@ public class GT_MetaTileEntity_E_Furnace extends GT_MetaTileEntity_BasicMachine super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } + public GT_MetaTileEntity_E_Furnace(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + } + @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_E_Furnace(mName, mTier, mDescription, mTextures, mGUIName, mNEIName); diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java index 156473749b..2fd30f1c61 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java @@ -37,9 +37,16 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier super(aName, aTier, aSlotCount, aDescription, aTextures); } + public GT_MetaTileEntity_BasicBatteryBuffer(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, int aSlotCount) { + super(aName, aTier, aSlotCount, aDescription, aTextures); + } + @Override public String[] getDescription() { - return new String[]{mDescription, mInventory.length + " Slots"}; + String[] desc = new String[mDescription.length]; + System.arraycopy(mDescription, 0, desc, 0, mDescription.length); + desc[mDescription.length] = mInventory.length + " Slots"; + return desc; } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java index bd5b8d9ea6..7dc343370c 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java @@ -25,6 +25,10 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity public GT_MetaTileEntity_BasicGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, 3, aDescription, aTextures); } + + public GT_MetaTileEntity_BasicGenerator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 3, aDescription, aTextures); + } @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { @@ -51,7 +55,10 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity @Override public String[] getDescription() { - return new String[]{mDescription, "Fuel Efficiency: " + getEfficiency() + "%"}; + String[] desc = new String[mDescription.length + 1]; + System.arraycopy(mDescription, 0, desc, 0, desc.length); + desc[mDescription.length] = "Fuel Efficiency: " + getEfficiency() + "%"; + return desc; } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull.java index 37a1c9670d..5b652ece96 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull.java @@ -21,6 +21,10 @@ public class GT_MetaTileEntity_BasicHull extends GT_MetaTileEntity_BasicTank { public GT_MetaTileEntity_BasicHull(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } + + public GT_MetaTileEntity_BasicHull(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull_NonElectric.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull_NonElectric.java index 6294add731..73b45ecbb2 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull_NonElectric.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull_NonElectric.java @@ -12,6 +12,10 @@ public abstract class GT_MetaTileEntity_BasicHull_NonElectric extends GT_MetaTil super(aName, aTier, 1, aDescription, aTextures); } + public GT_MetaTileEntity_BasicHull_NonElectric(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 1, aDescription, aTextures); + } + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) { return mTextures[Math.min(2, aSide)][aColorIndex + 1]; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java index ce17874867..fc4ecfeea9 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java @@ -92,6 +92,15 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B mNEIName = aNEIName; } + public GT_MetaTileEntity_BasicMachine(String aName, int aTier, int aAmperage, String[] aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName) { + super(aName, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aTextures); + mInputSlotCount = Math.max(0, aInputSlotCount); + mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)]; + mAmperage = aAmperage; + mGUIName = aGUIName; + mNEIName = aNEIName; + } + public boolean setMainFacing(byte aDirection){ mMainFacing = aDirection; if(getBaseMetaTileEntity().getFrontFacing() == mMainFacing){ diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Bronze.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Bronze.java index 131f52f351..770f026d7c 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Bronze.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Bronze.java @@ -41,6 +41,10 @@ public abstract class GT_MetaTileEntity_BasicMachine_Bronze extends GT_MetaTileE super(aName, aBricked ? 1 : 0, 0, aDescription, aTextures, aInputSlotCount, aOutputSlotCount, "", ""); } + public GT_MetaTileEntity_BasicMachine_Bronze(String aName, String[] aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, boolean aBricked) { + super(aName, aBricked ? 1 : 0, 0, aDescription, aTextures, aInputSlotCount, aOutputSlotCount, "", ""); + } + @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java index 9b0e386df4..18ae6dd735 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java @@ -607,6 +607,18 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ mGUIParameterB = (byte) aGUIParameterB; } + public GT_MetaTileEntity_BasicMachine_GT_Recipe(String aName, int aTier, String[] aDescription, GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, int aAmperage, int aGUIParameterA, int aGUIParameterB, ITexture[][][] aTextures, String aGUIName, String aNEIName, String aSound, boolean aSharedTank, boolean aRequiresFluidForFiltering, int aSpecialEffect) { + super(aName, aTier, aAmperage, aDescription, aTextures, aInputSlots, aOutputSlots, aGUIName, aNEIName); + mSharedTank = aSharedTank; + mTankCapacity = aTankCapacity; + mSpecialEffect = aSpecialEffect; + mRequiresFluidForFiltering = aRequiresFluidForFiltering; + mRecipes = aRecipes; + mSound = aSound; + mGUIParameterA = (byte) aGUIParameterA; + mGUIParameterB = (byte) aGUIParameterB; + } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_BasicMachine_GT_Recipe(mName, mTier, mDescription, mRecipes, mInputSlotCount, mOutputItems == null ? 0 : mOutputItems.length, mTankCapacity, mAmperage, mGUIParameterA, mGUIParameterB, mTextures, mGUIName, mNEIName, mSound, mSharedTank, mRequiresFluidForFiltering, mSpecialEffect); diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Steel.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Steel.java index 00a79f26ac..767d47eeee 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Steel.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Steel.java @@ -20,6 +20,10 @@ public abstract class GT_MetaTileEntity_BasicMachine_Steel extends GT_MetaTileEn public GT_MetaTileEntity_BasicMachine_Steel(String aName, String aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, boolean aBricked) { super(aName, aDescription, aTextures, aInputSlotCount, aOutputSlotCount, aBricked); } + + public GT_MetaTileEntity_BasicMachine_Steel(String aName, String[] aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, boolean aBricked) { + super(aName, aDescription, aTextures, aInputSlotCount, aOutputSlotCount, aBricked); + } /* @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java index b6d3e3ca25..cf95cf1035 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java @@ -30,6 +30,10 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier public GT_MetaTileEntity_BasicTank(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } + + public GT_MetaTileEntity_BasicTank(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } @Override public boolean isSimpleMachine() { diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java index cffa88837e..abbf5b7ee5 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java @@ -23,6 +23,10 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM super(aName, aTier, aInvSlotCount, aDescription, aTextures); } + public GT_MetaTileEntity_Buffer(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } + @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[6][17][]; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java index b691086518..9c13aa1dd8 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java @@ -17,6 +17,10 @@ public abstract class GT_MetaTileEntity_Hatch extends GT_MetaTileEntity_BasicTan super(aName, aTier, aInvSlotCount, aDescription, aTextures); } + public GT_MetaTileEntity_Hatch(String aName, int aTier, int aInvSlotCount, String []aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } + public static int getSlots(int aTier) { return aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16; } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java index 2eda016f37..6f86232396 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java @@ -18,6 +18,10 @@ public class GT_MetaTileEntity_Hatch_Dynamo extends GT_MetaTileEntity_Hatch { super(aName, aTier, 0, aDescription, aTextures); } + public GT_MetaTileEntity_Hatch_Dynamo(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 0, aDescription, aTextures); + } + @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { return new ITexture[]{aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]}; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java index 91bf149ea1..c94b640ac0 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java @@ -18,6 +18,10 @@ public class GT_MetaTileEntity_Hatch_Energy extends GT_MetaTileEntity_Hatch { super(aName, aTier, 0, aDescription, aTextures); } + public GT_MetaTileEntity_Hatch_Energy(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 0, aDescription, aTextures); + } + @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { return new ITexture[]{aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier]}; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java index 4484347bd4..941f7862e4 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java @@ -22,6 +22,10 @@ public class GT_MetaTileEntity_Hatch_Input extends GT_MetaTileEntity_Hatch { super(aName, aTier, 3, aDescription, aTextures); } + public GT_MetaTileEntity_Hatch_Input(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 3, aDescription, aTextures); + } + @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_IN)}; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java index 13b269c74b..f10f9a8e00 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java @@ -22,6 +22,10 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch { public GT_MetaTileEntity_Hatch_InputBus(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, aDescription, aTextures); } + + public GT_MetaTileEntity_Hatch_InputBus(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, aDescription, aTextures); + } @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java index d4d8f9cec7..8e1f052d56 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java @@ -46,10 +46,26 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch mAuto = aAuto; } + public GT_MetaTileEntity_Hatch_Maintenance(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, boolean aAuto) { + super(aName, aTier, aAuto ? 4 : 1, aDescription, aTextures); + mAuto = aAuto; + } + @Override public String[] getDescription() { - if(mAuto)return new String[]{mDescription,"4 Ducttape, 2 Lubricant Cells","4 Steel Screws, 2 Adv Circuits","For each autorepair"}; - return new String[]{mDescription, "Cannot be shared between Multiblocks!"}; + if (mAuto) { + String[] desc = new String[mDescription.length + 3]; + System.arraycopy(mDescription, 0, desc, 0, mDescription.length); + desc[mDescription.length] = "4 Ducttape, 2 Lubricant Cells"; + desc[mDescription.length + 1] = "4 Ducttape, 2 Lubricant Cells"; + desc[mDescription.length + 2] = "For each autorepair"; + return desc; + } else { + String[] desc = new String[mDescription.length + 1]; + System.arraycopy(mDescription, 0, desc, 0, mDescription.length); + desc[mDescription.length] = "Cannot be shared between Multiblocks!"; + return desc; + } } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java index 7246a58c26..d4f8ae743b 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java @@ -19,9 +19,17 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { super(aName, aTier, 0, aDescription, aTextures); } + public GT_MetaTileEntity_Hatch_Muffler(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 0, aDescription, aTextures); + } + @Override public String[] getDescription() { - return new String[]{mDescription, "DO NOT OBSTRUCT THE OUTPUT!","Reduces Pollution to "+calculatePollutionReduction(100)+"%"}; + String[] desc = new String[mDescription.length + 2]; + System.arraycopy(mDescription, 0, desc, 0, mDescription.length); + desc[mDescription.length] = "DO NOT OBSTRUCT THE OUTPUT!"; + desc[mDescription.length + 1] = "Reduces Pollution to "+calculatePollutionReduction(100)+"%"; + return desc; } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java index 036f5e2195..62d7e81177 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java @@ -24,6 +24,10 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { super(aName, aTier, 3, aDescription, aTextures); } + public GT_MetaTileEntity_Hatch_Output(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 3, aDescription, aTextures); + } + @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java index 6ac3f840b7..f2a2d17ccf 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java @@ -19,6 +19,10 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch { super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, aDescription, aTextures); } + public GT_MetaTileEntity_Hatch_OutputBus(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, aDescription, aTextures); + } + @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; 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 b0aac0bc7e..75fbf0fd2a 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 @@ -49,7 +49,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public GT_MetaTileEntity_MultiBlockBase(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, 2); - this.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false); + GT_MetaTileEntity_MultiBlockBase.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false); this.damageFactorLow = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorLow", 5); this.damageFactorHigh = (float) GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorHigh", 0.6f); this.mNEI = ""; @@ -57,7 +57,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public GT_MetaTileEntity_MultiBlockBase(String aName) { super(aName, 2); - this.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false); + GT_MetaTileEntity_MultiBlockBase.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false); this.damageFactorLow = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorLow", 5); this.damageFactorHigh = (float) GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorHigh", 0.6f); } @@ -221,7 +221,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { if (mMachine) { for (GT_MetaTileEntity_Hatch_Maintenance tHatch : mMaintenanceHatches) { if (isValidMetaTileEntity(tHatch)) { - if (!this.disableMaintenance) { + if (!GT_MetaTileEntity_MultiBlockBase.disableMaintenance) { if(tHatch.mAuto && (!mWrench||!mScrewdriver||!mSoftHammer||!mHardHammer||!mSolderingTool||!mCrowbar))tHatch.autoMaintainance(); if (tHatch.mWrench) mWrench = true; if (tHatch.mScrewdriver) mScrewdriver = true; @@ -255,7 +255,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) { if (mOutputItems != null) for (ItemStack tStack : mOutputItems) if (tStack != null) { - try{GT_Mod.instance.achievements.issueAchivementHatch(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), tStack);}catch(Exception e){} + try{GT_Mod.achievements.issueAchivementHatch(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), tStack);}catch(Exception e){} addOutput(tStack); } if (mOutputFluids != null && mOutputFluids.length == 1) { @@ -275,7 +275,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { if (mOutputFluids != null && mOutputFluids.length > 0) { if (mOutputFluids.length > 1) { try { - GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "oilplant"); + GT_Mod.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "oilplant"); } catch (Exception e) { } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java index a37bacff14..39d097e34b 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java @@ -14,7 +14,7 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit /** * A simple Description. */ - public final String mDescription; + public final String[] mDescription; /** * Contains all Textures used by this Block. @@ -24,7 +24,7 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit public GT_MetaTileEntity_TieredMachineBlock(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription, ITexture... aTextures) { super(aID, aName, aNameRegional, aInvSlotCount); mTier = (byte) Math.max(0, Math.min(aTier, 9)); - mDescription = aDescription; + mDescription = new String[]{aDescription}; // must always be the last call! if (GT.isClientSide()) mTextures = getTextureSet(aTextures); @@ -32,6 +32,13 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit } public GT_MetaTileEntity_TieredMachineBlock(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + super(aName, aInvSlotCount); + mTier = (byte) aTier; + mDescription = new String[]{aDescription}; + mTextures = aTextures; + } + + public GT_MetaTileEntity_TieredMachineBlock(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aInvSlotCount); mTier = (byte) aTier; mDescription = aDescription; @@ -55,7 +62,7 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit @Override public String[] getDescription() { - return new String[]{mDescription}; + return mDescription; } /** diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java index 31cf58ad06..56de48ad01 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java @@ -36,6 +36,10 @@ public class GT_MetaTileEntity_Transformer extends GT_MetaTileEntity_TieredMachi super(aName, aTier, 0, aDescription, aTextures); } + public GT_MetaTileEntity_Transformer(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 0, aDescription, aTextures); + } + @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[12][17][]; diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java index b078f558f7..3d855a18d0 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java @@ -24,6 +24,10 @@ public class GT_MetaTileEntity_ChestBuffer public GT_MetaTileEntity_ChestBuffer(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } + + public GT_MetaTileEntity_ChestBuffer(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_ChestBuffer(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java index 4180484ad5..f9844242a5 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java @@ -25,6 +25,10 @@ public class GT_MetaTileEntity_Filter public GT_MetaTileEntity_Filter(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } + + public GT_MetaTileEntity_Filter(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Filter(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java index d5d04315f2..07358b878e 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java @@ -27,6 +27,10 @@ public class GT_MetaTileEntity_Regulator public GT_MetaTileEntity_Regulator(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } + + public GT_MetaTileEntity_Regulator(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Regulator(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java index 212c354fba..843eeed5d4 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java @@ -18,6 +18,10 @@ public class GT_MetaTileEntity_SuperBuffer public GT_MetaTileEntity_SuperBuffer(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } + + public GT_MetaTileEntity_SuperBuffer(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_SuperBuffer(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java index 287647975b..dff70c2445 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java @@ -31,6 +31,10 @@ public class GT_MetaTileEntity_TypeFilter super(aName, aTier, aInvSlotCount, aDescription, aTextures); } + public GT_MetaTileEntity_TypeFilter(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_TypeFilter(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); } diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java index bdfad2408b..f0c06e3448 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java @@ -34,6 +34,10 @@ public abstract class GT_MetaTileEntity_Boiler public GT_MetaTileEntity_Boiler(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, 4, aDescription, aTextures); } + + public GT_MetaTileEntity_Boiler(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 4, aDescription, aTextures); + } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { ITexture[] tmp = mTextures[aSide >= 2 ? aSide != aFacing ? 2 : ((byte) (aActive ? 4 : 3)) : aSide][aColorIndex + 1]; diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java index 5c6fdeeb33..f55d47bd13 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java @@ -28,6 +28,9 @@ public class GT_MetaTileEntity_Boiler_Bronze public GT_MetaTileEntity_Boiler_Bronze(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } + public GT_MetaTileEntity_Boiler_Bronze(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[5][17][]; diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java index 2806cbc943..713b82f65f 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java @@ -29,6 +29,10 @@ public class GT_MetaTileEntity_Boiler_Lava super(aName, aTier, aDescription, aTextures); } + public GT_MetaTileEntity_Boiler_Lava(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[5][17][]; for (byte i = -1; i < 16; i++) { diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java index 1fa7723a1a..69b9bb222e 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java @@ -24,6 +24,10 @@ public class GT_MetaTileEntity_Boiler_Solar public GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } + + public GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[4][17][]; diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java index c5ad432ad7..703fa12d62 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java @@ -29,6 +29,10 @@ public class GT_MetaTileEntity_Boiler_Steel super(aName, aTier, aDescription, aTextures); } + public GT_MetaTileEntity_Boiler_Steel(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + public ITexture[][][] getTextureSet(ITexture[] aTextures) { ITexture[][][] rTextures = new ITexture[5][17][]; for (byte i = -1; i < 16; i = (byte) (i + 1)) { diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java index e2103c02bf..158c2dd624 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java @@ -29,6 +29,11 @@ public class GT_MetaTileEntity_DieselGenerator super(aName, aTier, aDescription, aTextures); onConfigLoad(); } + + public GT_MetaTileEntity_DieselGenerator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + onConfigLoad(); + } public boolean isOutputFacing(byte aSide) { return aSide == getBaseMetaTileEntity().getFrontFacing(); diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java index 46ebb56e9a..9da7b6094e 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java @@ -25,6 +25,11 @@ public class GT_MetaTileEntity_FluidNaquadahReactor onConfigLoad(); } + public GT_MetaTileEntity_FluidNaquadahReactor(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + onConfigLoad(); + } + public boolean isOutputFacing(byte aSide) { return (aSide > 1) && (aSide != getBaseMetaTileEntity().getFrontFacing()) && (aSide != getBaseMetaTileEntity().getBackFacing()); } diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java index 777843b344..ec815be51c 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java @@ -24,6 +24,11 @@ public class GT_MetaTileEntity_GasTurbine super(aName, aTier, aDescription, aTextures); onConfigLoad(); } + + public GT_MetaTileEntity_GasTurbine(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + onConfigLoad(); + } public boolean isOutputFacing(byte aSide) { return aSide == getBaseMetaTileEntity().getFrontFacing(); diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java index 5353fbcdae..d93d9330c8 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java @@ -22,6 +22,10 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach public GT_MetaTileEntity_LightningRod(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } + + public GT_MetaTileEntity_LightningRod(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java index 17e6412688..cce8314904 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java @@ -25,6 +25,11 @@ public class GT_MetaTileEntity_MagicEnergyConverter onConfigLoad(); } + public GT_MetaTileEntity_MagicEnergyConverter(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + onConfigLoad(); + } + public boolean isOutputFacing(byte aSide) { return aSide == getBaseMetaTileEntity().getFrontFacing(); } diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java index 8e597eaf91..e6839b11bb 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java @@ -34,7 +34,7 @@ import static gregtech.api.enums.GT_Values.V; public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_BasicGenerator { - public static final ArrayList sUsedDragonCrystalList = new ArrayList(); + public static final ArrayList sUsedDragonCrystalList = new ArrayList(); public static boolean sAllowMultipleEggs = true; public static GT_MetaTileEntity_MagicalEnergyAbsorber mActiveSiphon = null; public static int sEnergyPerEnderCrystal = 32; @@ -53,6 +53,11 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B super(aName, aTier, aDescription, aTextures); onConfigLoad(); } + + public GT_MetaTileEntity_MagicalEnergyAbsorber(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + onConfigLoad(); + } public boolean isOutputFacing(byte aSide) { return aSide == getBaseMetaTileEntity().getFrontFacing(); diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java index 28a8ddbc89..bc28ba5b2d 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java @@ -25,6 +25,11 @@ public class GT_MetaTileEntity_PlasmaGenerator onConfigLoad(); } + public GT_MetaTileEntity_PlasmaGenerator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + onConfigLoad(); + } + public boolean isOutputFacing(byte aSide) { return aSide == getBaseMetaTileEntity().getFrontFacing(); } diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor.java index c8e73bdc21..d6d58ed7d2 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor.java @@ -24,6 +24,11 @@ public class GT_MetaTileEntity_SolidNaquadahReactor onConfigLoad(); } + public GT_MetaTileEntity_SolidNaquadahReactor(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + onConfigLoad(); + } + public boolean isOutputFacing(byte aSide) { return (aSide > 1) && (aSide != getBaseMetaTileEntity().getFrontFacing()) && (aSide != getBaseMetaTileEntity().getBackFacing()); } diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java index bf6d39c916..e86a792ac3 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java @@ -26,6 +26,11 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener onConfigLoad(); } + public GT_MetaTileEntity_SteamTurbine(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + onConfigLoad(); + } + public boolean isOutputFacing(byte aSide) { return aSide == getBaseMetaTileEntity().getFrontFacing(); } @@ -40,7 +45,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener @Override public String[] getDescription() { - return new String[]{mDescription, "Fuel Efficiency: " + (600 / getEfficiency()) + "%"}; + String[] desc = new String[mDescription.length + 1]; + System.arraycopy(mDescription, 0, desc, 0, mDescription.length); + desc[mDescription.length] = "Fuel Efficiency: " + (600 / getEfficiency()) + "%"; + return desc; } public int getCapacity() { diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java index 74f49df8a9..e5b4295c16 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java @@ -18,6 +18,10 @@ public class GT_MetaTileEntity_BasicHull_Bronze super(aName, aTier, aDescription, aTextures); } + public GT_MetaTileEntity_BasicHull_Bronze(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_BasicHull_Bronze(this.mName, this.mTier, this.mDescription, this.mTextures); } diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java index 2382a41ecb..993d44ae5b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java @@ -18,6 +18,10 @@ public class GT_MetaTileEntity_BasicHull_BronzeBricks super(aName, aTier, aDescription, aTextures); } + public GT_MetaTileEntity_BasicHull_BronzeBricks(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_BasicHull_BronzeBricks(this.mName, this.mTier, this.mDescription, this.mTextures); } diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java index e1395d59d7..68fc6a7134 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java @@ -18,6 +18,10 @@ public class GT_MetaTileEntity_BasicHull_Steel super(aName, aTier, aDescription, aTextures); } + public GT_MetaTileEntity_BasicHull_Steel(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_BasicHull_Steel(this.mName, this.mTier, this.mDescription, this.mTextures); } diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java index f8e35fdc55..95ae1ba318 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java @@ -18,6 +18,10 @@ public class GT_MetaTileEntity_BasicHull_SteelBricks super(aName, aTier, aDescription, aTextures); } + public GT_MetaTileEntity_BasicHull_SteelBricks(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_BasicHull_SteelBricks(this.mName, this.mTier, this.mDescription, this.mTextures); } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java index 1379654393..72e5a09d22 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java @@ -75,6 +75,15 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba step = aStep; } + protected GT_MetaTileEntity_AdvSeismicProspector(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, + String aGUIName, String aNEIName, int aNear, int aMiddle, int aRadius, int aStep) { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + radius = aRadius; + near = aNear; + middle = aMiddle; + step = aStep; + } + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_AdvSeismicProspector(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName, this.near, this.middle, this.radius, this.step); diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java index a869ad8d3a..eec4673ab7 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java @@ -22,6 +22,10 @@ public class GT_MetaTileEntity_Boxinator super(aName, aTier, 1, aDescription, aTextures, 2, 1, aGUIName, aNEIName); } + public GT_MetaTileEntity_Boxinator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 2, 1, aGUIName, aNEIName); + } + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Boxinator(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java index 8937dfbcf5..022bd0f59f 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java @@ -20,6 +20,10 @@ public class GT_MetaTileEntity_Charger extends GT_MetaTileEntity_BasicBatteryBuf super(aName, aTier, aDescription, aTextures, aSlotCount); } + public GT_MetaTileEntity_Charger(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, int aSlotCount) { + super(aName, aTier, aDescription, aTextures, aSlotCount); + } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Charger(mName, mTier, mDescription, mTextures, mInventory.length); diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java index 7d0de3fcc2..078e64e60d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java @@ -29,6 +29,10 @@ public class GT_MetaTileEntity_CuringOven super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } + public GT_MetaTileEntity_CuringOven(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + } + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_CuringOven(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java index a63a2498bd..8e3b716704 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java @@ -22,6 +22,10 @@ public class GT_MetaTileEntity_Disassembler super(aName, aTier, 1, aDescription, aTextures, 1, 9, aGUIName, aNEIName); } + public GT_MetaTileEntity_Disassembler(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 1, 9, aGUIName, aNEIName); + } + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Disassembler(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java index 4ea6166058..22573da7f6 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java @@ -30,6 +30,10 @@ public class GT_MetaTileEntity_Massfabricator super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } + public GT_MetaTileEntity_Massfabricator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + } + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Massfabricator(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java index de0a468582..5e0b975624 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java @@ -50,6 +50,10 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt super(aName, aTier, 3, aDescription, aTextures); } + public GT_MetaTileEntity_MicrowaveEnergyTransmitter(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 3, aDescription, aTextures); + } + @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { if (aBaseMetaTileEntity.isClientSide()) return true; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java index 2ba2cd140b..41526a753e 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java @@ -24,6 +24,10 @@ public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_Tiered super(aName, aTier, aInvSlotCount, aDescription, aTextures); } + public GT_MetaTileEntity_MonsterRepellent(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_MonsterRepellent(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java index 2dcde9c082..06c0e5b595 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java @@ -26,6 +26,10 @@ public class GT_MetaTileEntity_PotionBrewer super(aName, aTier, 1, aDescription, aTextures, 1, 0, aGUIName, aNEIName); } + public GT_MetaTileEntity_PotionBrewer(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 1, 0, aGUIName, aNEIName); + } + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_PotionBrewer(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java index bff1c616fd..ee6a89040b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java @@ -27,7 +27,7 @@ import static gregtech.api.enums.GT_Values.V; public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { - public ArrayList mPumpList = new ArrayList(); + public ArrayList mPumpList = new ArrayList(); public int mPumpTimer = 0; public int mPumpCountBelow = 0; public Block mPumpedBlock1 = null; @@ -41,6 +41,10 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { super(aName, aTier, 3, aDescription, aTextures); } + public GT_MetaTileEntity_Pump(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 3, aDescription, aTextures); + } + @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Pump(this.mName, this.mTier, this.mDescription, this.mTextures); diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java index 2e50df6e54..f2da7ffb80 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java @@ -29,6 +29,10 @@ public class GT_MetaTileEntity_Replicator super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } + public GT_MetaTileEntity_Replicator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + } + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Replicator(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java index 171c6a847a..f43b930a02 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java @@ -24,6 +24,10 @@ public class GT_MetaTileEntity_RockBreaker super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } + public GT_MetaTileEntity_RockBreaker(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + } + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_RockBreaker(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java index b7a63046dd..a089a4ecac 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java @@ -34,6 +34,10 @@ public class GT_MetaTileEntity_Scanner super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } + public GT_MetaTileEntity_Scanner(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + } + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Scanner(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java index 09a644a055..64e152812e 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java @@ -38,6 +38,10 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); } + public GT_MetaTileEntity_SeismicProspector(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + } + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_SeismicProspector(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java index 2ca0350988..bee79f80a3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java @@ -59,6 +59,10 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { super(aName, aTier, 3, aDescription, aTextures); } + public GT_MetaTileEntity_Teleporter(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 3, aDescription, aTextures); + } + private static float weightCalculation(Entity aEntity) { try { if ((aEntity instanceof EntityFX)) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java index 2a60093d3f..391fce1520 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java @@ -95,10 +95,10 @@ public abstract class GT_MetaTileEntity_LargeBoiler if (circuit_config >= 1 && circuit_config <= 25) { // If so, overwrite the current config this.integratedCircuitConfig = circuit_config; - } else { - //If not, set the config to zero - this.integratedCircuitConfig = 0; - } + } + } else { + //If not, set the config to zero + this.integratedCircuitConfig = 0; } this.mSuperEfficencyIncrease=0; diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java index 0635cb4255..c854233b7e 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java @@ -22,6 +22,10 @@ public class GT_MetaTileEntity_AlloySmelter_Bronze super(aName, aDescription, aTextures, 2, 1, true); } + public GT_MetaTileEntity_AlloySmelter_Bronze(String aName, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aDescription, aTextures, 2, 1, true); + } + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_AlloySmelter_Bronze(this.mName, this.mDescription, this.mTextures); } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java index a93d1fbf8a..269dd18381 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java @@ -22,6 +22,10 @@ public class GT_MetaTileEntity_AlloySmelter_Steel super(aName, aDescription, aTextures, 2, 1, true); } + public GT_MetaTileEntity_AlloySmelter_Steel(String aName, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aDescription, aTextures, 2, 1, true); + } + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_AlloySmelter_Steel(this.mName, this.mDescription, this.mTextures); } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java index cdf47fde88..70355d6d8b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java @@ -24,6 +24,10 @@ public class GT_MetaTileEntity_Compressor_Bronze super(aName, aDescription, aTextures, 1, 1, false); } + public GT_MetaTileEntity_Compressor_Bronze(String aName, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aDescription, aTextures, 1, 1, false); + } + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeCompressor.png", GT_Recipe.GT_Recipe_Map.sCompressorRecipes.mUnlocalizedName); } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java index 12a01d008b..b17789df88 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java @@ -24,6 +24,10 @@ public class GT_MetaTileEntity_Compressor_Steel super(aName, aDescription, aTextures, 1, 1, false); } + public GT_MetaTileEntity_Compressor_Steel(String aName, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aDescription, aTextures, 1, 1, false); + } + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelCompressor.png", GT_Recipe.GT_Recipe_Map.sCompressorRecipes.mUnlocalizedName); } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java index 772072e497..bd612ff06e 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java @@ -24,6 +24,10 @@ public class GT_MetaTileEntity_Extractor_Bronze super(aName, aDescription, aTextures, 1, 1, false); } + public GT_MetaTileEntity_Extractor_Bronze(String aName, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aDescription, aTextures, 1, 1, false); + } + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeExtractor.png", GT_Recipe.GT_Recipe_Map.sExtractorRecipes.mUnlocalizedName); } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java index f4149f45a3..05eec5d172 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java @@ -24,6 +24,10 @@ public class GT_MetaTileEntity_Extractor_Steel super(aName, aDescription, aTextures, 1, 1, false); } + public GT_MetaTileEntity_Extractor_Steel(String aName, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aDescription, aTextures, 1, 1, false); + } + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelExtractor.png", GT_Recipe.GT_Recipe_Map.sExtractorRecipes.mUnlocalizedName); } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java index 9ea2efe69d..34be280dda 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java @@ -22,6 +22,10 @@ public class GT_MetaTileEntity_ForgeHammer_Bronze super(aName, aDescription, aTextures, 1, 1, false); } + public GT_MetaTileEntity_ForgeHammer_Bronze(String aName, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aDescription, aTextures, 1, 1, false); + } + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_ForgeHammer_Bronze(this.mName, this.mDescription, this.mTextures); } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java index 63f99c60b4..d3841ff6ff 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java @@ -22,6 +22,10 @@ public class GT_MetaTileEntity_ForgeHammer_Steel super(aName, aDescription, aTextures, 1, 1, false); } + public GT_MetaTileEntity_ForgeHammer_Steel(String aName, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aDescription, aTextures, 1, 1, false); + } + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_ForgeHammer_Steel(this.mName, this.mDescription, this.mTextures); } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java index 1aaeb7f624..96555b71ed 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java @@ -23,6 +23,10 @@ public class GT_MetaTileEntity_Furnace_Bronze super(aName, aDescription, aTextures, 1, 1, true); } + public GT_MetaTileEntity_Furnace_Bronze(String aName, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aDescription, aTextures, 1, 1, true); + } + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeFurnace.png", "smelting"); } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java index 4e79958f06..5e79643d65 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java @@ -23,6 +23,10 @@ public class GT_MetaTileEntity_Furnace_Steel super(aName, aDescription, aTextures, 1, 1, true); } + public GT_MetaTileEntity_Furnace_Steel(String aName, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aDescription, aTextures, 1, 1, true); + } + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelFurnace.png", "smelting"); } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java index 62ee65e407..5997e5699f 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java @@ -29,6 +29,10 @@ public class GT_MetaTileEntity_Macerator_Bronze super(aName, aDescription, aTextures, 1, 1, false); } + public GT_MetaTileEntity_Macerator_Bronze(String aName, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aDescription, aTextures, 1, 1, false); + } + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeMacerator.png", GT_Recipe_Map.sMaceratorRecipes.mUnlocalizedName); } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java index 2287ff42ff..63e68ac48d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java @@ -29,6 +29,10 @@ public class GT_MetaTileEntity_Macerator_Steel super(aName, aDescription, aTextures, 1, 1, false); } + public GT_MetaTileEntity_Macerator_Steel(String aName, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aDescription, aTextures, 1, 1, false); + } + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelMacerator.png", GT_Recipe_Map.sMaceratorRecipes.mUnlocalizedName); } diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java index c9b57fc728..41beb1c8ec 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java @@ -25,8 +25,15 @@ public class GT_MetaTileEntity_Locker super(aName, aTier, 4, aDescription, aTextures); } + public GT_MetaTileEntity_Locker(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 4, aDescription, aTextures); + } + public String[] getDescription() { - return new String[]{this.mDescription, "Click with Screwdriver to change Style"}; + String[] desc = new String[mDescription.length + 1]; + System.arraycopy(mDescription, 0, desc, 0, mDescription.length); + desc[mDescription.length] = "Click with Screwdriver to change Style"; + return desc; } public ITexture[][][] getTextureSet(ITexture[] aTextures) { diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java index a5a0a11ac6..84c1d9e800 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java @@ -25,6 +25,10 @@ public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_TieredMach super(aName, aTier, 3, aDescription, aTextures); } + public GT_MetaTileEntity_QuantumChest(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 3, aDescription, aTextures); + } + @Override public boolean isSimpleMachine() { return true; diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java index 1be8e2ff6f..7d7868b2b5 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java @@ -19,6 +19,10 @@ public class GT_MetaTileEntity_QuantumTank super(aName, aTier, 3, aDescription, aTextures); } + public GT_MetaTileEntity_QuantumTank(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 3, aDescription, aTextures); + } + @Override public ITexture[][][] getTextureSet(ITexture[] aTextures) { return new ITexture[0][0][0]; -- cgit From d79721085e31208d62a613ca2f4f409037ba1c01 Mon Sep 17 00:00:00 2001 From: Johannes Gäßler Date: Sat, 15 Apr 2017 19:05:57 +0200 Subject: Tooltips have more info on Steam and pollution, adjusted pollution rates Boilers tooltips now explicitly state the amount of Steam produced per second. Gas Turbine tooltips now explicitly state how much steam is needed for them to run at full capacity. Machine tooltips now explicitly state how much Pollution they produce per second. Adjusted machine pollution values to have them align better. Diesel Generators / Engines now go 40, 80, 160, 320 Gas Turbines now go 20, 40, 80, 160 Large Boiler tooltips now mention the amount of time needed to heat up Formatted the source code for the Cleanroom Fixed a bug that caused Diesel Generators and Gas Turbines to not have a tooltip. --- .../GT_MetaTileEntity_BasicGenerator.java | 17 +- .../GT_MetaTileEntity_BasicTank.java | 4 + .../GT_MetaTileEntity_TieredMachineBlock.java | 10 + .../boilers/GT_MetaTileEntity_Boiler.java | 4 + .../boilers/GT_MetaTileEntity_Boiler_Bronze.java | 5 +- .../boilers/GT_MetaTileEntity_Boiler_Lava.java | 5 +- .../boilers/GT_MetaTileEntity_Boiler_Solar.java | 7 +- .../boilers/GT_MetaTileEntity_Boiler_Steel.java | 5 +- .../GT_MetaTileEntity_DieselGenerator.java | 9 +- .../generators/GT_MetaTileEntity_GasTurbine.java | 9 +- .../generators/GT_MetaTileEntity_SteamTurbine.java | 8 +- .../GT_MetaTileEntity_BronzeBlastFurnace.java | 3 +- .../multi/GT_MetaTileEntity_Charcoal_Pit.java | 3 +- .../multi/GT_MetaTileEntity_Cleanroom.java | 299 +++++++++++---------- .../multi/GT_MetaTileEntity_DieselEngine.java | 8 +- .../GT_MetaTileEntity_ElectricBlastFurnace.java | 3 +- .../GT_MetaTileEntity_ImplosionCompressor.java | 3 +- .../multi/GT_MetaTileEntity_LargeBoiler.java | 10 +- .../multi/GT_MetaTileEntity_LargeTurbine_Gas.java | 3 +- .../multi/GT_MetaTileEntity_MultiFurnace.java | 3 +- .../multi/GT_MetaTileEntity_PyrolyseOven.java | 3 +- 21 files changed, 250 insertions(+), 171 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java index 7dc343370c..9f8ac02c80 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java @@ -22,6 +22,10 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures); } + public GT_MetaTileEntity_BasicGenerator(int aID, String aName, String aNameRegional, int aTier, String[] aDescription, ITexture... aTextures) { + super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures); + } + public GT_MetaTileEntity_BasicGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, 3, aDescription, aTextures); } @@ -56,7 +60,7 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity @Override public String[] getDescription() { String[] desc = new String[mDescription.length + 1]; - System.arraycopy(mDescription, 0, desc, 0, desc.length); + System.arraycopy(mDescription, 0, desc, 0, mDescription.length); desc[mDescription.length] = "Fuel Efficiency: " + getEfficiency() + "%"; return desc; } @@ -186,7 +190,6 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && aTick % 10 == 0) { - long tProducedEU = 0; if (mFluid == null) { if (aBaseMetaTileEntity.getUniversalEnergyStored() < maxEUOutput() + getMinimumStoredEU()) { mInventory[getStackDisplaySlot()] = null; @@ -200,7 +203,8 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity if (tFuelValue > 0 && tConsumed > 0 && mFluid.amount > tConsumed) { long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue); if (tFluidAmountToUse > 0 && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) { - tProducedEU = tFluidAmountToUse * tFuelValue; + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), + 10 * getPollution()); mFluid.amount -= tFluidAmountToUse * tConsumed; } } @@ -212,14 +216,11 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), tEmptyContainer)) { aBaseMetaTileEntity.increaseStoredEnergyUnits(tFuelValue, true); aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); - tProducedEU = tFuelValue; + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), + 10 * getPollution()); } } } - if(tProducedEU>0&&getPollution()>0){ - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), - (int) ((tProducedEU * getPollution()/(500*mTier))+1)); - } } if (aBaseMetaTileEntity.isServerSide()) diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java index cf95cf1035..6d301ebd22 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java @@ -27,6 +27,10 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures); } + public GT_MetaTileEntity_BasicTank(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription, ITexture... aTextures) { + super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures); + } + public GT_MetaTileEntity_BasicTank(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java index 39d097e34b..8da8fdf619 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java @@ -31,6 +31,16 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit else mTextures = null; } + public GT_MetaTileEntity_TieredMachineBlock(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription, ITexture... aTextures) { + super(aID, aName, aNameRegional, aInvSlotCount); + mTier = (byte) Math.max(0, Math.min(aTier, 9)); + mDescription = aDescription; + + // must always be the last call! + if (GT.isClientSide()) mTextures = getTextureSet(aTextures); + else mTextures = null; + } + public GT_MetaTileEntity_TieredMachineBlock(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aInvSlotCount); mTier = (byte) aTier; diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java index f0c06e3448..021c5c736c 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java @@ -31,6 +31,10 @@ public abstract class GT_MetaTileEntity_Boiler super(aID, aName, aNameRegional, 0, 4, aDescription, aTextures); } + public GT_MetaTileEntity_Boiler(int aID, String aName, String aNameRegional, String[] aDescription, ITexture... aTextures) { + super(aID, aName, aNameRegional, 0, 4, aDescription, aTextures); + } + public GT_MetaTileEntity_Boiler(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, 4, aDescription, aTextures); } diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java index f55d47bd13..7357b23154 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java @@ -22,7 +22,10 @@ import net.minecraftforge.fluids.IFluidHandler; public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler { public GT_MetaTileEntity_Boiler_Bronze(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional, "An early way to get Steam Power", new ITexture[0]); + super(aID, aName, aNameRegional, new String[]{ + "An early way to get Steam Power", + "Produces 120L of Steam per second", + "Causes 20 Pollution per second"}, new ITexture[0]); } public GT_MetaTileEntity_Boiler_Bronze(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java index 713b82f65f..adede98dd9 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java @@ -22,7 +22,10 @@ import net.minecraftforge.fluids.IFluidHandler; public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler { public GT_MetaTileEntity_Boiler_Lava(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional, "A Boiler running off Lava", new ITexture[0]); + super(aID, aName, aNameRegional, new String[]{ + "A Boiler running off Lava", + "Produces 600L of Steam per second", + "Causes 20 Pollution per second"}, new ITexture[0]); } public GT_MetaTileEntity_Boiler_Lava(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java index 69b9bb222e..bb87a09c1b 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java @@ -18,7 +18,12 @@ import net.minecraftforge.fluids.IFluidHandler; public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { public GT_MetaTileEntity_Boiler_Solar(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional, "Steam Power by the Sun", new ITexture[0]); + super(aID, aName, aNameRegional, new String[]{ + "Steam Power by the Sun", + "Produces 120L of Steam per second", + "Calcifies over time, reducing Steam output to 40L/s", + "Break and replace to decalcify"}, + new ITexture[0]); } public GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java index 703fa12d62..76128df204 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java @@ -22,7 +22,10 @@ import net.minecraftforge.fluids.IFluidHandler; public class GT_MetaTileEntity_Boiler_Steel extends GT_MetaTileEntity_Boiler { public GT_MetaTileEntity_Boiler_Steel(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional, "Faster than the Bronze Boiler", new ITexture[0]); + super(aID, aName, aNameRegional, new String[]{ + "Faster than the Bronze Boiler", + "Produces 300L of Steam per second", + "Causes 20 Pollution per second"}, new ITexture[0]); } public GT_MetaTileEntity_Boiler_Steel(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java index 158c2dd624..47a0cbd95c 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java @@ -18,10 +18,15 @@ import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGenerator { + public static final int BASE_POLLUTION = 2; + public int mEfficiency; public GT_MetaTileEntity_DieselGenerator(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, "Requires liquid Fuel", new ITexture[0]); + super(aID, aName, aNameRegional, aTier, new String[]{ + "Requires liquid Fuel", + "Causes " + (int) (20 * BASE_POLLUTION * Math.pow(2, aTier - 1)) + " Pollution per second"}, + new ITexture[0]); onConfigLoad(); } @@ -110,6 +115,6 @@ public class GT_MetaTileEntity_DieselGenerator @Override public int getPollution() { - return 10; + return (int) (GT_MetaTileEntity_DieselGenerator.BASE_POLLUTION * Math.pow(2, mTier - 1)); } } diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java index ec815be51c..5ecde5a827 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java @@ -13,10 +13,15 @@ import gregtech.api.util.GT_Recipe; public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerator { + public static final int BASE_POLLUTION = 1; + public int mEfficiency; + public GT_MetaTileEntity_GasTurbine(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, "Requires flammable Gasses", new ITexture[0]); + super(aID, aName, aNameRegional, aTier, new String[]{ + "Requires flammable Gasses", + "Causes " + (int) (20 * BASE_POLLUTION * Math.pow(2, aTier - 1)) + " Pollution per second"}); onConfigLoad(); } @@ -97,6 +102,6 @@ public class GT_MetaTileEntity_GasTurbine @Override public int getPollution() { - return 5; + return (int) (GT_MetaTileEntity_GasTurbine.BASE_POLLUTION * Math.pow(2, mTier - 1)); } } diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java index e86a792ac3..c91ddc004b 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java @@ -17,7 +17,9 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener public int mEfficiency; public GT_MetaTileEntity_SteamTurbine(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, "Requires Steam to run", new ITexture[0]); + super(aID, aName, aNameRegional, aTier, new String[]{ + "Converts Steam into EU", + "Base rate: 2L of Steam -> 1 EU"}, new ITexture[0]); onConfigLoad(); } @@ -45,9 +47,11 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener @Override public String[] getDescription() { - String[] desc = new String[mDescription.length + 1]; + String[] desc = new String[mDescription.length + 2]; System.arraycopy(mDescription, 0, desc, 0, mDescription.length); desc[mDescription.length] = "Fuel Efficiency: " + (600 / getEfficiency()) + "%"; + desc[mDescription.length + 1] = String.format("Consumes up to %sL of Steam per second", + (int) (4000 * (8 * Math.pow(4, mTier) + Math.pow(2, mTier)) / (600 / getEfficiency()))); return desc; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java index 7efc667ade..ea8eb2f7ba 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java @@ -50,7 +50,8 @@ public class GT_MetaTileEntity_BronzeBlastFurnace "Controller Block for the Bronze Blast Furnace", "How to get your first Steel", "Size(WxHxD): 3x4x3 (Hollow, with opening on top)", - "Bronze Plated Bricks for the rest (32 at least!)"}; + "Bronze Plated Bricks for the rest (32 at least!)", + "Causes 50 Pollution per second"}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java index 9c4881d18c..11c0fd109a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java @@ -44,7 +44,8 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock "11x1x11 of Bricks (Bottom layer only)", "11x5x11 of Logs (Above bottom Brick layer)", "Only grass/dirt can touch Log blocks", - "No air between logs allowed"}; + "No air between logs allowed", + "Causes 100 Pollution per second"}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java index d1a3adb3af..484195a2cd 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java @@ -16,171 +16,188 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBase { -private int mHeatingCapacity = 0; - -public GT_MetaTileEntity_Cleanroom(int aID, String aName, String aNameRegional) { -super(aID, aName, aNameRegional); -} - -public GT_MetaTileEntity_Cleanroom(String aName) { -super(aName); -} - -public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { -return new GT_MetaTileEntity_Cleanroom(this.mName); -} - -public String[] getDescription() { -return new String[]{ - "Controller Block for the Cleanroom", - "Min(WxHxD): 3x3x3 (Hollow), Max(WxHxD): 15x15x15 (Hollow)", - "Controller (Top center), Walls Plascrete", - "Top besides contoller and corners filter casings", - "1 Reinforced Door", - "1x Energy Hatch, 1x Maintainance Hatch", - "up to 10 Machine Hull to transfer Items&Energy inside", - ""}; -} - -public boolean checkRecipe(ItemStack aStack) { - this.mEfficiencyIncrease = 100; - this.mMaxProgresstime = 100; - this.mEUt = -4; -return true; -} - -public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - int x=1; - int z=1; - int y=1; - int mDoorCount=0; - int mHullCount=0; - int mPlascreteCount=0; - boolean doorState=false; - mUpdate = 100; - for(int i = 1;i<8;i++){ - Block tBlock = aBaseMetaTileEntity.getBlockOffset(i, 0, 0); - int tMeta = aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0); - if(tBlock != GregTech_API.sBlockCasings3 || tMeta != 11){ - if(tBlock ==GregTech_API.sBlockReinforced || tMeta == 2){ - x=i; - z=i; + private int mHeatingCapacity = 0; + + public GT_MetaTileEntity_Cleanroom(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT_MetaTileEntity_Cleanroom(String aName) { + super(aName); + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Cleanroom(this.mName); + } + + public String[] getDescription() { + return new String[] { + "Controller Block for the Cleanroom", + "Min(WxHxD): 3x3x3 (Hollow), Max(WxHxD): 15x15x15 (Hollow)", + "Controller (Top center), Walls Plascrete", + "Top besides contoller and corners filter casings", + "1 Reinforced Door", + "1x Energy Hatch, 1x Maintainance Hatch", + "up to 10 Machine Hull to transfer Items & Energy inside"}; + } + + public boolean checkRecipe(ItemStack aStack) { + this.mEfficiencyIncrease = 100; + this.mMaxProgresstime = 100; + this.mEUt = -4; + return true; + } + + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + int x = 1; + int z = 1; + int y = 1; + int mDoorCount = 0; + int mHullCount = 0; + int mPlascreteCount = 0; + boolean doorState = false; + mUpdate = 100; + for (int i = 1; i < 8; i++) { + Block tBlock = aBaseMetaTileEntity.getBlockOffset(i, 0, 0); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0); + if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) { + if (tBlock == GregTech_API.sBlockReinforced || tMeta == 2) { + x = i; + z = i; + break; + } else { + return false; + } + } + } + for (int i = -1; i > -16; i--) { + Block tBlock = aBaseMetaTileEntity.getBlockOffset(x, i, z); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(x, i, z); + if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) { + y = i + 1; break; - }else{return false;} + } } - } - for(int i = -1; i>-16;i--){ - Block tBlock = aBaseMetaTileEntity.getBlockOffset(x, i, z); - int tMeta = aBaseMetaTileEntity.getMetaIDOffset(x, i, z); - if(tBlock != GregTech_API.sBlockReinforced || tMeta != 2){ - y = i+1; - break; + if (y > -2) { + return false; } - } - if(y>-2){return false;} - for(int dX=-x;dX<=x;dX++){ - for(int dZ=-z;dZ<=z;dZ++){ - for(int dY=0;dY>=y;dY--){ - if(dX==-x||dX==x||dY==-y||dY==y||dZ==-z||dZ==z){ - Block tBlock = aBaseMetaTileEntity.getBlockOffset(dX, dY, dZ); - int tMeta = aBaseMetaTileEntity.getMetaIDOffset(dX, dY, dZ); - if(y==0){ - if(dX==-x||dX==x||dZ==-z||dZ==z){ - if(tBlock!=GregTech_API.sBlockReinforced||tMeta!=2){return false;} - }else if(dX==0&&dZ==0){ - }else { - if(tBlock!=GregTech_API.sBlockCasings3||tMeta!=11){return false;} - } - }else if(tBlock==GregTech_API.sBlockReinforced&&tMeta==2){ - mPlascreteCount++; - }else{ - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); - if((!addMaintenanceToMachineList(tTileEntity, 82)) && (!addEnergyInputToMachineList(tTileEntity, 82))){ - if(tBlock instanceof ic2.core.block.BlockIC2Door){ - if((tMeta&8)==0){ - doorState=(Math.abs(dX)>Math.abs(dZ)==((tMeta&1)!=0))!=((tMeta&4)!=0); + for (int dX = -x; dX <= x; dX++) { + for (int dZ = -z; dZ <= z; dZ++) { + for (int dY = 0; dY >= y; dY--) { + if (dX == -x || dX == x || dY == -y || dY == y || dZ == -z || dZ == z) { + Block tBlock = aBaseMetaTileEntity.getBlockOffset(dX, dY, dZ); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(dX, dY, dZ); + if (y == 0) { + if (dX == -x || dX == x || dZ == -z || dZ == z) { + if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) { + return false; + } + } else if (dX == 0 && dZ == 0) { + } else { + if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) { + return false; + } + } + } else if (tBlock == GregTech_API.sBlockReinforced && tMeta == 2) { + mPlascreteCount++; + } else { + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); + if ((!addMaintenanceToMachineList(tTileEntity, 82)) && (!addEnergyInputToMachineList(tTileEntity, 82))) { + if (tBlock instanceof ic2.core.block.BlockIC2Door) { + if ((tMeta & 8) == 0) { + doorState = (Math.abs(dX) > Math.abs(dZ) == ((tMeta & 1) != 0)) != ((tMeta & 4) != 0); + } + mDoorCount++; + } else { + if (tTileEntity == null) { + { + return false; + } + } + IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicHull) { + mHullCount++; + } else { + return false; + } + } } - mDoorCount++; - }else{ - if (tTileEntity == null) { - {return false;} - } - IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) {return false;} - if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicHull){mHullCount++; - }else {return false;} } + } else { + } } - }else{ - - } } } - } - if(mMaintenanceHatches.size()!=1||mEnergyHatches.size()!=1||mDoorCount!=2||mHullCount>10){return false;} - for(int dX=-x+1;dX<=x-1;dX++){ - for(int dZ=-z+1;dZ<=z-1;dZ++){ - for(int dY=-1;dY>=y+1;dY--){ - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); - if(tTileEntity!=null){ - IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); - if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_BasicMachine_GT_Recipe){ - ((GT_MetaTileEntity_BasicMachine_GT_Recipe)aMetaTileEntity).mCleanroom = this; + if (mMaintenanceHatches.size() != 1 || mEnergyHatches.size() != 1 || mDoorCount != 2 || mHullCount > 10) { + return false; + } + for (int dX = -x + 1; dX <= x - 1; dX++) { + for (int dZ = -z + 1; dZ <= z - 1; dZ++) { + for (int dY = -1; dY >= y + 1; dY--) { + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); + if (tTileEntity != null) { + IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); + if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_BasicMachine_GT_Recipe) { + ((GT_MetaTileEntity_BasicMachine_GT_Recipe) aMetaTileEntity).mCleanroom = this; + } } } } } - } - if(doorState){ - mEfficiency=Math.max(0,mEfficiency-200); - } + if (doorState) { + mEfficiency = Math.max(0, mEfficiency - 200); + } -return true; -} + return true; + } -public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { -if (aSide == 0 || aSide == 1) { - return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE), new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_ACTIVE : Textures.BlockIcons.OVERLAY_TOP_CLEANROOM)}; + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == 0 || aSide == 1) { + return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE), + new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_ACTIVE : Textures.BlockIcons.OVERLAY_TOP_CLEANROOM) }; -} -return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE)}; -} + } + return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE) }; + } -public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { -return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MultiblockDisplay.png"); -} + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MultiblockDisplay.png"); + } -public GT_Recipe.GT_Recipe_Map getRecipeMap() { -return null; -} + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return null; + } -public boolean isCorrectMachinePart(ItemStack aStack) { -return true; -} + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } -public boolean isFacingValid(byte aFacing) { -return aFacing > 1; -} + public boolean isFacingValid(byte aFacing) { + return aFacing > 1; + } -public int getMaxEfficiency(ItemStack aStack) { -return 10000; -} + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } -public int getPollutionPerTick(ItemStack aStack) { -return 0; -} + public int getPollutionPerTick(ItemStack aStack) { + return 0; + } -public int getDamageToComponent(ItemStack aStack) { -return 0; -} + public int getDamageToComponent(ItemStack aStack) { + return 0; + } -public int getAmountOfOutputs() { -return 0; -} + public int getAmountOfOutputs() { + return 0; + } -public boolean explodesOnComponentBreak(ItemStack aStack) { -return false; -} + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } } \ No newline at end of file diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java index adcede79ba..dd2a3a6848 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java @@ -31,6 +31,7 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock public GT_MetaTileEntity_DieselEngine(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } + public GT_MetaTileEntity_DieselEngine(String aName) { super(aName); } @@ -48,7 +49,9 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock "1x Dynamo Hatch (back centered)", "Engine Intake Casings not obstructed in front (only air blocks)", "Supply Diesel Fuel and Lubricant to run. Supply Oxygen to boost output (optional).", - "2048EU/t default output, 6144EU/t boosted output"}; + "Default: Produces 2048EU/t at 100% efficiency", + "Boosted: Produces 6144EU/t at 150% efficiency", + "Causes 320 Pollution per second"}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { @@ -216,8 +219,9 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock @Override public int getPollutionPerTick(ItemStack aStack) { - return 15; + return 16; } + @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return true; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java index 48cafa9af4..ef7701c490 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java @@ -44,7 +44,8 @@ public class GT_MetaTileEntity_ElectricBlastFurnace "1x Energy Hatch (Any bottom layer casing)", "1x Maintenance Hatch (Any bottom layer casing)", "1x Muffler Hatch (Top middle)", - "Heat Proof Machine Casings for the rest"}; + "Heat Proof Machine Casings for the rest", + "Causes 100 Pollution per second"}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java index 5c0a028e72..36aa52f7e9 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java @@ -41,7 +41,8 @@ public class GT_MetaTileEntity_ImplosionCompressor "1x Maintenance Hatch (Any casing)", "1x Muffler Hatch (Any casing)", "1x Energy Hatch (Any casing)", - "Solid Steel Casings for the rest (16 at least!)"}; + "Solid Steel Casings for the rest (16 at least!)", + "Causes 2000 Pollution per second"}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java index 391fce1520..5181e0418b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java @@ -36,7 +36,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler public String[] getDescription() { return new String[]{ "Controller Block for the Large Boiler", - "Produces "+(getEUt()*40)*(runtimeBoost(20)/20f)+"L of Steam with 1 Coal in "+runtimeBoost(20)+" ticks", + "Produces "+(getEUt()*40)*(runtimeBoost(20)/20f)+"L of Steam with 1 Coal at "+getEUt()* 40+"L/s", + "A programmed circuit in the main block throttles the boiler (-1000L/s per config)", "Size(WxHxD): 3x5x3, Controller (Front middle in Fireboxes)", "3x1x3 of Fire Boxes (Bottom layer, Min 3)", "3x4x3 of Casings (Above Fireboxes, hollow, Min 24!)", @@ -46,7 +47,9 @@ public abstract class GT_MetaTileEntity_LargeBoiler "1x Output Hatch (Any Casing)", "1x Maintenance Hatch (Any Firebox)", "1x Muffler Hatch (Any Firebox)", - "Diesel fuels have 1/4 efficiency"}; + "Diesel fuels have 1/4 efficiency", + String.format("Takes %.2f seconds to heat up", 500.0 / getEfficiencyIncrease()), + "Causes up to 360 Pollution per second"}; } public abstract Block getCasingBlock(); @@ -239,7 +242,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler } public int getPollutionPerTick(ItemStack aStack) { - return 12; + int adjustedEUOutput = Math.max(25, getEUt() - 25 * integratedCircuitConfig); + return Math.max(1, 12 * adjustedEUOutput / getEUt()); } public int getDamageToComponent(ItemStack aStack) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java index ec0173526c..081c50159a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java @@ -42,7 +42,8 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT "1x Dynamo Hatch (Back centered)", "Stainless Steel Turbine Casings for the rest (24 at least!)", "Needs a Turbine Item (Inside controller GUI)", - "Output depending on Rotor: 102-6720EU/t"}; + "Output depending on Rotor: 102-6720EU/t", + "Causes 160 Pollution per second"}; } public int getFuelValue(FluidStack aLiquid) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java index 1570142f44..2feecb3271 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java @@ -45,7 +45,8 @@ public class GT_MetaTileEntity_MultiFurnace "1x Maintenance Hatch (One of bottom)", "1x Muffler Hatch (Top middle)", "1x Energy Hatch (One of bottom)", - "Heat Proof Machine Casings for the rest",}; + "Heat Proof Machine Casings for the rest", + "Causes 100 Pollution per second"}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java index c19307c43b..ad09a1ae37 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java @@ -39,7 +39,8 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock "1x Maintenance Hatch (Any bottom layer casing)", "1x Muffler Hatch (Centered 3x1x3 area in Top layer)", "1x Energy Hatch (Any bottom layer casing)", - "ULV Machine Casings for the rest (60 at least!)"}; + "ULV Machine Casings for the rest (60 at least!)", + "Causes 400 Pollution per second"}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { -- cgit From c2c9fad1204880aaf87e8c41e98eae2dc983b567 Mon Sep 17 00:00:00 2001 From: Johannes Gäßler Date: Mon, 24 Apr 2017 20:50:08 +0200 Subject: Fixed a bug that caused Battery Buffers to not have a tooltip --- .../implementations/GT_MetaTileEntity_BasicBatteryBuffer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java index 2fd30f1c61..a6b7e7c9fa 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java @@ -43,7 +43,7 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier @Override public String[] getDescription() { - String[] desc = new String[mDescription.length]; + String[] desc = new String[mDescription.length + 1]; System.arraycopy(mDescription, 0, desc, 0, mDescription.length); desc[mDescription.length] = mInventory.length + " Slots"; return desc; -- cgit From 1c75968fad51f87f3c04605a34536dca8f0f9afc Mon Sep 17 00:00:00 2001 From: Johannes Gäßler Date: Mon, 24 Apr 2017 23:40:24 +0200 Subject: Fixed the GTLog spam, ty Techlone --- .../implementations/GT_MetaTileEntity_TieredMachineBlock.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java index 8da8fdf619..ee033fe627 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java @@ -24,7 +24,7 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit public GT_MetaTileEntity_TieredMachineBlock(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription, ITexture... aTextures) { super(aID, aName, aNameRegional, aInvSlotCount); mTier = (byte) Math.max(0, Math.min(aTier, 9)); - mDescription = new String[]{aDescription}; + mDescription = aDescription == null ? new String[0] : new String[]{aDescription}; // must always be the last call! if (GT.isClientSide()) mTextures = getTextureSet(aTextures); @@ -34,7 +34,7 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit public GT_MetaTileEntity_TieredMachineBlock(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription, ITexture... aTextures) { super(aID, aName, aNameRegional, aInvSlotCount); mTier = (byte) Math.max(0, Math.min(aTier, 9)); - mDescription = aDescription; + mDescription = aDescription == null ? new String[0] : aDescription; // must always be the last call! if (GT.isClientSide()) mTextures = getTextureSet(aTextures); @@ -44,14 +44,14 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit public GT_MetaTileEntity_TieredMachineBlock(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aInvSlotCount); mTier = (byte) aTier; - mDescription = new String[]{aDescription}; + mDescription = aDescription == null ? new String[0] : new String[]{aDescription}; mTextures = aTextures; } public GT_MetaTileEntity_TieredMachineBlock(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aInvSlotCount); mTier = (byte) aTier; - mDescription = aDescription; + mDescription = aDescription == null ? new String[0] : aDescription; mTextures = aTextures; } -- cgit From 878738a75c86c9034e1226857b1858e6fbbf9ddb Mon Sep 17 00:00:00 2001 From: Johannes Gäßler Date: Mon, 24 Apr 2017 23:55:42 +0200 Subject: Corrected the Maintenance Hatch tooltip --- .../implementations/GT_MetaTileEntity_Hatch_Maintenance.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java index 8e1f052d56..1e1a7c78c5 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java @@ -57,7 +57,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch String[] desc = new String[mDescription.length + 3]; System.arraycopy(mDescription, 0, desc, 0, mDescription.length); desc[mDescription.length] = "4 Ducttape, 2 Lubricant Cells"; - desc[mDescription.length + 1] = "4 Ducttape, 2 Lubricant Cells"; + desc[mDescription.length + 1] = "4 Steel Screws, 2 Adv Circuits"; desc[mDescription.length + 2] = "For each autorepair"; return desc; } else { -- cgit From 8f4225f0b8d31931f33d18d6fcd6b43f7730a6fc Mon Sep 17 00:00:00 2001 From: Johannes Gäßler Date: Wed, 26 Apr 2017 20:37:47 +0200 Subject: Refactored mDescription to mDescriptionArray, added a deprecated field mDescription to ensure 100% backwards compatibility --- .../examples/GT_MetaTileEntity_E_Furnace.java | 2 +- .../GT_MetaTileEntity_BasicBatteryBuffer.java | 8 ++++---- .../GT_MetaTileEntity_BasicGenerator.java | 6 +++--- .../implementations/GT_MetaTileEntity_BasicHull.java | 2 +- .../GT_MetaTileEntity_BasicMachine_GT_Recipe.java | 2 +- .../GT_MetaTileEntity_Hatch_Dynamo.java | 2 +- .../GT_MetaTileEntity_Hatch_Energy.java | 2 +- .../GT_MetaTileEntity_Hatch_Input.java | 2 +- .../GT_MetaTileEntity_Hatch_InputBus.java | 2 +- .../GT_MetaTileEntity_Hatch_Maintenance.java | 20 ++++++++++---------- .../GT_MetaTileEntity_Hatch_Muffler.java | 10 +++++----- .../GT_MetaTileEntity_Hatch_Output.java | 2 +- .../GT_MetaTileEntity_Hatch_OutputBus.java | 2 +- .../GT_MetaTileEntity_TieredMachineBlock.java | 20 +++++++++++++------- .../GT_MetaTileEntity_Transformer.java | 2 +- .../automation/GT_MetaTileEntity_ChestBuffer.java | 2 +- .../automation/GT_MetaTileEntity_Filter.java | 2 +- .../automation/GT_MetaTileEntity_Regulator.java | 2 +- .../automation/GT_MetaTileEntity_SuperBuffer.java | 2 +- .../automation/GT_MetaTileEntity_TypeFilter.java | 2 +- .../boilers/GT_MetaTileEntity_Boiler_Bronze.java | 2 +- .../boilers/GT_MetaTileEntity_Boiler_Lava.java | 2 +- .../boilers/GT_MetaTileEntity_Boiler_Solar.java | 2 +- .../boilers/GT_MetaTileEntity_Boiler_Steel.java | 2 +- .../GT_MetaTileEntity_DieselGenerator.java | 2 +- .../GT_MetaTileEntity_FluidNaquadahReactor.java | 2 +- .../generators/GT_MetaTileEntity_GasTurbine.java | 2 +- .../generators/GT_MetaTileEntity_LightningRod.java | 2 +- .../GT_MetaTileEntity_MagicEnergyConverter.java | 2 +- .../GT_MetaTileEntity_MagicalEnergyAbsorber.java | 2 +- .../GT_MetaTileEntity_PlasmaGenerator.java | 2 +- .../GT_MetaTileEntity_SolidNaquadahReactor.java | 2 +- .../generators/GT_MetaTileEntity_SteamTurbine.java | 10 +++++----- .../machines/GT_MetaTileEntity_BasicHull_Bronze.java | 2 +- .../GT_MetaTileEntity_BasicHull_BronzeBricks.java | 2 +- .../machines/GT_MetaTileEntity_BasicHull_Steel.java | 2 +- .../GT_MetaTileEntity_BasicHull_SteelBricks.java | 2 +- .../GT_MetaTileEntity_AdvSeismicProspector.java | 2 +- .../machines/basic/GT_MetaTileEntity_Boxinator.java | 2 +- .../machines/basic/GT_MetaTileEntity_Charger.java | 2 +- .../machines/basic/GT_MetaTileEntity_CuringOven.java | 2 +- .../basic/GT_MetaTileEntity_Disassembler.java | 2 +- .../basic/GT_MetaTileEntity_Massfabricator.java | 2 +- ...GT_MetaTileEntity_MicrowaveEnergyTransmitter.java | 2 +- .../basic/GT_MetaTileEntity_MonsterRepellent.java | 2 +- .../basic/GT_MetaTileEntity_PotionBrewer.java | 2 +- .../machines/basic/GT_MetaTileEntity_Pump.java | 2 +- .../machines/basic/GT_MetaTileEntity_Replicator.java | 2 +- .../basic/GT_MetaTileEntity_RockBreaker.java | 2 +- .../machines/basic/GT_MetaTileEntity_Scanner.java | 2 +- .../basic/GT_MetaTileEntity_SeismicProspector.java | 2 +- .../machines/basic/GT_MetaTileEntity_Teleporter.java | 2 +- .../steam/GT_MetaTileEntity_AlloySmelter_Bronze.java | 2 +- .../steam/GT_MetaTileEntity_AlloySmelter_Steel.java | 2 +- .../steam/GT_MetaTileEntity_Compressor_Bronze.java | 2 +- .../steam/GT_MetaTileEntity_Compressor_Steel.java | 2 +- .../steam/GT_MetaTileEntity_Extractor_Bronze.java | 2 +- .../steam/GT_MetaTileEntity_Extractor_Steel.java | 2 +- .../steam/GT_MetaTileEntity_ForgeHammer_Bronze.java | 2 +- .../steam/GT_MetaTileEntity_ForgeHammer_Steel.java | 2 +- .../steam/GT_MetaTileEntity_Furnace_Bronze.java | 2 +- .../steam/GT_MetaTileEntity_Furnace_Steel.java | 2 +- .../steam/GT_MetaTileEntity_Macerator_Bronze.java | 2 +- .../steam/GT_MetaTileEntity_Macerator_Steel.java | 2 +- .../storage/GT_MetaTileEntity_Locker.java | 8 ++++---- .../storage/GT_MetaTileEntity_QuantumChest.java | 2 +- .../storage/GT_MetaTileEntity_QuantumTank.java | 2 +- 67 files changed, 104 insertions(+), 98 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java b/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java index 354aff7ccd..569338e905 100644 --- a/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java +++ b/src/main/java/gregtech/api/metatileentity/examples/GT_MetaTileEntity_E_Furnace.java @@ -29,7 +29,7 @@ public class GT_MetaTileEntity_E_Furnace extends GT_MetaTileEntity_BasicMachine @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_E_Furnace(mName, mTier, mDescription, mTextures, mGUIName, mNEIName); + return new GT_MetaTileEntity_E_Furnace(mName, mTier, mDescriptionArray, mTextures, mGUIName, mNEIName); } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java index a6b7e7c9fa..5c24805503 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java @@ -43,9 +43,9 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier @Override public String[] getDescription() { - String[] desc = new String[mDescription.length + 1]; - System.arraycopy(mDescription, 0, desc, 0, mDescription.length); - desc[mDescription.length] = mInventory.length + " Slots"; + String[] desc = new String[mDescriptionArray.length + 1]; + System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); + desc[mDescriptionArray.length] = mInventory.length + " Slots"; return desc; } @@ -66,7 +66,7 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_BasicBatteryBuffer(mName, mTier, mDescription, mTextures, mInventory.length); + return new GT_MetaTileEntity_BasicBatteryBuffer(mName, mTier, mDescriptionArray, mTextures, mInventory.length); } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java index 9f8ac02c80..b540bdded5 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java @@ -59,9 +59,9 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity @Override public String[] getDescription() { - String[] desc = new String[mDescription.length + 1]; - System.arraycopy(mDescription, 0, desc, 0, mDescription.length); - desc[mDescription.length] = "Fuel Efficiency: " + getEfficiency() + "%"; + String[] desc = new String[mDescriptionArray.length + 1]; + System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); + desc[mDescriptionArray.length] = "Fuel Efficiency: " + getEfficiency() + "%"; return desc; } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull.java index 5b652ece96..1577015e2e 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicHull.java @@ -28,7 +28,7 @@ public class GT_MetaTileEntity_BasicHull extends GT_MetaTileEntity_BasicTank { @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_BasicHull(mName, mTier, mInventory.length, mDescription, mTextures); + return new GT_MetaTileEntity_BasicHull(mName, mTier, mInventory.length, mDescriptionArray, mTextures); } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java index 18ae6dd735..bb1ef1332f 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java @@ -621,7 +621,7 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_BasicMachine_GT_Recipe(mName, mTier, mDescription, mRecipes, mInputSlotCount, mOutputItems == null ? 0 : mOutputItems.length, mTankCapacity, mAmperage, mGUIParameterA, mGUIParameterB, mTextures, mGUIName, mNEIName, mSound, mSharedTank, mRequiresFluidForFiltering, mSpecialEffect); + return new GT_MetaTileEntity_BasicMachine_GT_Recipe(mName, mTier, mDescriptionArray, mRecipes, mInputSlotCount, mOutputItems == null ? 0 : mOutputItems.length, mTankCapacity, mAmperage, mGUIParameterA, mGUIParameterB, mTextures, mGUIName, mNEIName, mSound, mSharedTank, mRequiresFluidForFiltering, mSpecialEffect); } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java index 6f86232396..e599aa0902 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java @@ -79,7 +79,7 @@ public class GT_MetaTileEntity_Hatch_Dynamo extends GT_MetaTileEntity_Hatch { @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_Dynamo(mName, mTier, mDescription, mTextures); + return new GT_MetaTileEntity_Hatch_Dynamo(mName, mTier, mDescriptionArray, mTextures); } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java index c94b640ac0..8d9f23f64e 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy.java @@ -84,7 +84,7 @@ public class GT_MetaTileEntity_Hatch_Energy extends GT_MetaTileEntity_Hatch { @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_Energy(mName, mTier, mDescription, mTextures); + return new GT_MetaTileEntity_Hatch_Energy(mName, mTier, mDescriptionArray, mTextures); } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java index 941f7862e4..4c24a148ab 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java @@ -53,7 +53,7 @@ public class GT_MetaTileEntity_Hatch_Input extends GT_MetaTileEntity_Hatch { @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_Input(mName, mTier, mDescription, mTextures); + return new GT_MetaTileEntity_Hatch_Input(mName, mTier, mDescriptionArray, mTextures); } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java index f10f9a8e00..e921ff63f4 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java @@ -59,7 +59,7 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch { @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_InputBus(mName, mTier, mDescription, mTextures); + return new GT_MetaTileEntity_Hatch_InputBus(mName, mTier, mDescriptionArray, mTextures); } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java index 1e1a7c78c5..339c3ae8db 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java @@ -54,16 +54,16 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch @Override public String[] getDescription() { if (mAuto) { - String[] desc = new String[mDescription.length + 3]; - System.arraycopy(mDescription, 0, desc, 0, mDescription.length); - desc[mDescription.length] = "4 Ducttape, 2 Lubricant Cells"; - desc[mDescription.length + 1] = "4 Steel Screws, 2 Adv Circuits"; - desc[mDescription.length + 2] = "For each autorepair"; + String[] desc = new String[mDescriptionArray.length + 3]; + System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); + desc[mDescriptionArray.length] = "4 Ducttape, 2 Lubricant Cells"; + desc[mDescriptionArray.length + 1] = "4 Steel Screws, 2 Adv Circuits"; + desc[mDescriptionArray.length + 2] = "For each autorepair"; return desc; } else { - String[] desc = new String[mDescription.length + 1]; - System.arraycopy(mDescription, 0, desc, 0, mDescription.length); - desc[mDescription.length] = "Cannot be shared between Multiblocks!"; + String[] desc = new String[mDescriptionArray.length + 1]; + System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); + desc[mDescriptionArray.length] = "Cannot be shared between Multiblocks!"; return desc; } } @@ -105,8 +105,8 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - if(aTileEntity.getMetaTileID()==111) return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescription, mTextures, true); - return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescription, mTextures, false); + if(aTileEntity.getMetaTileID()==111) return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescriptionArray, mTextures, true); + return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescriptionArray, mTextures, false); } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java index d4f8ae743b..1445323fd5 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java @@ -25,10 +25,10 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { @Override public String[] getDescription() { - String[] desc = new String[mDescription.length + 2]; - System.arraycopy(mDescription, 0, desc, 0, mDescription.length); - desc[mDescription.length] = "DO NOT OBSTRUCT THE OUTPUT!"; - desc[mDescription.length + 1] = "Reduces Pollution to "+calculatePollutionReduction(100)+"%"; + String[] desc = new String[mDescriptionArray.length + 2]; + System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); + desc[mDescriptionArray.length] = "DO NOT OBSTRUCT THE OUTPUT!"; + desc[mDescriptionArray.length + 1] = "Reduces Pollution to "+calculatePollutionReduction(100)+"%"; return desc; } @@ -64,7 +64,7 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_Muffler(mName, mTier, mDescription, mTextures); + return new GT_MetaTileEntity_Hatch_Muffler(mName, mTier, mDescriptionArray, mTextures); } public boolean polluteEnvironment() { diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java index 62d7e81177..8221290459 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java @@ -60,7 +60,7 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch { @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_Output(mName, mTier, mDescription, mTextures); + return new GT_MetaTileEntity_Hatch_Output(mName, mTier, mDescriptionArray, mTextures); } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java index f2a2d17ccf..9b685743ca 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java @@ -55,7 +55,7 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch { @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_OutputBus(mName, mTier, mDescription, mTextures); + return new GT_MetaTileEntity_Hatch_OutputBus(mName, mTier, mDescriptionArray, mTextures); } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java index ee033fe627..7a77861494 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java @@ -11,10 +11,13 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit */ public final byte mTier; + @Deprecated + public final String mDescription; + /** * A simple Description. */ - public final String[] mDescription; + public final String[] mDescriptionArray; /** * Contains all Textures used by this Block. @@ -24,8 +27,8 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit public GT_MetaTileEntity_TieredMachineBlock(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription, ITexture... aTextures) { super(aID, aName, aNameRegional, aInvSlotCount); mTier = (byte) Math.max(0, Math.min(aTier, 9)); - mDescription = aDescription == null ? new String[0] : new String[]{aDescription}; - + mDescriptionArray = aDescription == null ? new String[0] : new String[]{aDescription}; + mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : ""; // must always be the last call! if (GT.isClientSide()) mTextures = getTextureSet(aTextures); else mTextures = null; @@ -34,7 +37,8 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit public GT_MetaTileEntity_TieredMachineBlock(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription, ITexture... aTextures) { super(aID, aName, aNameRegional, aInvSlotCount); mTier = (byte) Math.max(0, Math.min(aTier, 9)); - mDescription = aDescription == null ? new String[0] : aDescription; + mDescriptionArray = aDescription == null ? new String[0] : aDescription; + mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : ""; // must always be the last call! if (GT.isClientSide()) mTextures = getTextureSet(aTextures); @@ -44,14 +48,16 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit public GT_MetaTileEntity_TieredMachineBlock(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { super(aName, aInvSlotCount); mTier = (byte) aTier; - mDescription = aDescription == null ? new String[0] : new String[]{aDescription}; + mDescriptionArray = aDescription == null ? new String[0] : new String[]{aDescription}; + mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : ""; mTextures = aTextures; } public GT_MetaTileEntity_TieredMachineBlock(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { super(aName, aInvSlotCount); mTier = (byte) aTier; - mDescription = aDescription == null ? new String[0] : aDescription; + mDescriptionArray = aDescription == null ? new String[0] : aDescription; + mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : ""; mTextures = aTextures; } @@ -72,7 +78,7 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit @Override public String[] getDescription() { - return mDescription; + return mDescriptionArray; } /** diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java index 56de48ad01..9320c6d8b4 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java @@ -67,7 +67,7 @@ public class GT_MetaTileEntity_Transformer extends GT_MetaTileEntity_TieredMachi @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Transformer(mName, mTier, mDescription, mTextures); + return new GT_MetaTileEntity_Transformer(mName, mTier, mDescriptionArray, mTextures); } @Override diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java index 3d855a18d0..540f9991df 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java @@ -30,7 +30,7 @@ public class GT_MetaTileEntity_ChestBuffer } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_ChestBuffer(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_ChestBuffer(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); } public ITexture getOverlayIcon() { diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java index f9844242a5..a0c752bdc0 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java @@ -31,7 +31,7 @@ public class GT_MetaTileEntity_Filter } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Filter(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_Filter(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); } public ITexture getOverlayIcon() { diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java index 07358b878e..9dde9094c0 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java @@ -33,7 +33,7 @@ public class GT_MetaTileEntity_Regulator } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Regulator(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_Regulator(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); } public ITexture getOverlayIcon() { diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java index 843eeed5d4..dfea774a2f 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java @@ -24,7 +24,7 @@ public class GT_MetaTileEntity_SuperBuffer } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_SuperBuffer(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_SuperBuffer(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); } public ITexture getOverlayIcon() { diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java index dff70c2445..2e4d0f5d81 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java @@ -36,7 +36,7 @@ public class GT_MetaTileEntity_TypeFilter } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_TypeFilter(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_TypeFilter(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); } public ITexture getOverlayIcon() { diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java index 7357b23154..db9e13ad83 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java @@ -60,7 +60,7 @@ public class GT_MetaTileEntity_Boiler_Bronze } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Boiler_Bronze(this.mName, this.mTier, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_Boiler_Bronze(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java index adede98dd9..8e044c7c2a 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java @@ -61,7 +61,7 @@ public class GT_MetaTileEntity_Boiler_Lava } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Boiler_Lava(this.mName, this.mTier, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_Boiler_Lava(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java index bb87a09c1b..1edfaca5a0 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java @@ -66,7 +66,7 @@ public class GT_MetaTileEntity_Boiler_Solar } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Boiler_Solar(this.mName, this.mTier, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_Boiler_Solar(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } private int mRunTime = 0; diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java index 76128df204..1e82f7efab 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java @@ -66,7 +66,7 @@ public class GT_MetaTileEntity_Boiler_Steel } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Boiler_Steel(this.mName, this.mTier, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_Boiler_Steel(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java index 47a0cbd95c..7b1487b3c3 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java @@ -45,7 +45,7 @@ public class GT_MetaTileEntity_DieselGenerator } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_DieselGenerator(this.mName, this.mTier, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_DieselGenerator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } public GT_Recipe.GT_Recipe_Map getRecipes() { diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java index 9da7b6094e..504b511de1 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java @@ -35,7 +35,7 @@ public class GT_MetaTileEntity_FluidNaquadahReactor } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_FluidNaquadahReactor(this.mName, this.mTier, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_FluidNaquadahReactor(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } public GT_Recipe.GT_Recipe_Map getRecipes() { diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java index 5ecde5a827..14f1eb2643 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java @@ -40,7 +40,7 @@ public class GT_MetaTileEntity_GasTurbine } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_GasTurbine(this.mName, this.mTier, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_GasTurbine(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } public GT_Recipe.GT_Recipe_Map getRecipes() { diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java index d93d9330c8..7501924f69 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java @@ -38,7 +38,7 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_LightningRod(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_LightningRod(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); } @Override diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java index cce8314904..eda960bf2b 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java @@ -35,7 +35,7 @@ public class GT_MetaTileEntity_MagicEnergyConverter } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_MagicEnergyConverter(this.mName, this.mTier, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_MagicEnergyConverter(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } public GT_Recipe.GT_Recipe_Map getRecipes() { diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java index e6839b11bb..cb4d988658 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java @@ -64,7 +64,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_MagicalEnergyAbsorber(this.mName, this.mTier, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_MagicalEnergyAbsorber(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } public GT_Recipe.GT_Recipe_Map getRecipes() { diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java index bc28ba5b2d..a8c0908ca4 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java @@ -35,7 +35,7 @@ public class GT_MetaTileEntity_PlasmaGenerator } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_PlasmaGenerator(this.mName, this.mTier, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_PlasmaGenerator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } public GT_Recipe.GT_Recipe_Map getRecipes() { diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor.java index d6d58ed7d2..422901c850 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor.java @@ -34,7 +34,7 @@ public class GT_MetaTileEntity_SolidNaquadahReactor } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_SolidNaquadahReactor(this.mName, this.mTier, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_SolidNaquadahReactor(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } public GT_Recipe.GT_Recipe_Map getRecipes() { diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java index c91ddc004b..8850f824be 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java @@ -38,7 +38,7 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_SteamTurbine(this.mName, this.mTier, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_SteamTurbine(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } public GT_Recipe.GT_Recipe_Map getRecipes() { @@ -47,10 +47,10 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener @Override public String[] getDescription() { - String[] desc = new String[mDescription.length + 2]; - System.arraycopy(mDescription, 0, desc, 0, mDescription.length); - desc[mDescription.length] = "Fuel Efficiency: " + (600 / getEfficiency()) + "%"; - desc[mDescription.length + 1] = String.format("Consumes up to %sL of Steam per second", + String[] desc = new String[mDescriptionArray.length + 2]; + System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); + desc[mDescriptionArray.length] = "Fuel Efficiency: " + (600 / getEfficiency()) + "%"; + desc[mDescriptionArray.length + 1] = String.format("Consumes up to %sL of Steam per second", (int) (4000 * (8 * Math.pow(4, mTier) + Math.pow(2, mTier)) / (600 / getEfficiency()))); return desc; } diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java index e5b4295c16..a9cd81f32d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java @@ -23,7 +23,7 @@ public class GT_MetaTileEntity_BasicHull_Bronze } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_BasicHull_Bronze(this.mName, this.mTier, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_BasicHull_Bronze(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } public ITexture[][][] getTextureSet(ITexture[] aTextures) { diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java index 993d44ae5b..df91b61db9 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java @@ -23,7 +23,7 @@ public class GT_MetaTileEntity_BasicHull_BronzeBricks } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_BasicHull_BronzeBricks(this.mName, this.mTier, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_BasicHull_BronzeBricks(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } public ITexture[][][] getTextureSet(ITexture[] aTextures) { diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java index 68fc6a7134..04ee00e209 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java @@ -23,7 +23,7 @@ public class GT_MetaTileEntity_BasicHull_Steel } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_BasicHull_Steel(this.mName, this.mTier, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_BasicHull_Steel(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } public ITexture[][][] getTextureSet(ITexture[] aTextures) { diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java index 95ae1ba318..eeecb3f88e 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java @@ -23,7 +23,7 @@ public class GT_MetaTileEntity_BasicHull_SteelBricks } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_BasicHull_SteelBricks(this.mName, this.mTier, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_BasicHull_SteelBricks(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } public ITexture[][][] getTextureSet(ITexture[] aTextures) { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java index 72e5a09d22..270fef65e3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java @@ -85,7 +85,7 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_AdvSeismicProspector(this.mName, this.mTier, this.mDescription, this.mTextures, + return new GT_MetaTileEntity_AdvSeismicProspector(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName, this.near, this.middle, this.radius, this.step); } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java index eec4673ab7..865c31285b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java @@ -27,7 +27,7 @@ public class GT_MetaTileEntity_Boxinator } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Boxinator(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + return new GT_MetaTileEntity_Boxinator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); } public GT_Recipe.GT_Recipe_Map getRecipeList() { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java index 022bd0f59f..c8a9e0be96 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java @@ -26,7 +26,7 @@ public class GT_MetaTileEntity_Charger extends GT_MetaTileEntity_BasicBatteryBuf @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Charger(mName, mTier, mDescription, mTextures, mInventory.length); + return new GT_MetaTileEntity_Charger(mName, mTier, mDescriptionArray, mTextures, mInventory.length); } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java index 078e64e60d..fcddee5bb3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java @@ -34,7 +34,7 @@ public class GT_MetaTileEntity_CuringOven } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_CuringOven(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + return new GT_MetaTileEntity_CuringOven(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); } public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java index 8e3b716704..132072910d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java @@ -27,7 +27,7 @@ public class GT_MetaTileEntity_Disassembler } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Disassembler(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + return new GT_MetaTileEntity_Disassembler(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); } public int checkRecipe() { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java index 22573da7f6..9de7168cf4 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java @@ -35,7 +35,7 @@ public class GT_MetaTileEntity_Massfabricator } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Massfabricator(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + return new GT_MetaTileEntity_Massfabricator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); } public void onConfigLoad(GT_Config aConfig) { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java index 5e0b975624..a60ed1daed 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java @@ -74,7 +74,7 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_MicrowaveEnergyTransmitter(this.mName, this.mTier, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_MicrowaveEnergyTransmitter(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } public String[] getInfoData() { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java index 41526a753e..a4cbe31bca 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java @@ -29,7 +29,7 @@ public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_Tiered } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_MonsterRepellent(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_MonsterRepellent(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java index 06c0e5b595..0f3f618737 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java @@ -31,7 +31,7 @@ public class GT_MetaTileEntity_PotionBrewer } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_PotionBrewer(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + return new GT_MetaTileEntity_PotionBrewer(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); } public GT_Recipe.GT_Recipe_Map getRecipeList() { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java index ee6a89040b..f484c4b635 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java @@ -47,7 +47,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Pump(this.mName, this.mTier, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_Pump(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } public void saveNBTData(NBTTagCompound aNBT) { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java index f2da7ffb80..591cf2f7b6 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java @@ -34,7 +34,7 @@ public class GT_MetaTileEntity_Replicator } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Replicator(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + return new GT_MetaTileEntity_Replicator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); } public int checkRecipe() { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java index f43b930a02..2698d9efc4 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java @@ -29,7 +29,7 @@ public class GT_MetaTileEntity_RockBreaker } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_RockBreaker(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + return new GT_MetaTileEntity_RockBreaker(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); } public GT_Recipe.GT_Recipe_Map getRecipeList() { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java index a089a4ecac..f71027d63d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java @@ -39,7 +39,7 @@ public class GT_MetaTileEntity_Scanner } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Scanner(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + return new GT_MetaTileEntity_Scanner(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); } public int checkRecipe() { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java index 64e152812e..b088e10d69 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java @@ -43,7 +43,7 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_SeismicProspector(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + return new GT_MetaTileEntity_SeismicProspector(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName); } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java index bee79f80a3..a834e48db7 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java @@ -162,7 +162,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Teleporter(this.mName, this.mTier, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_Teleporter(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java index c854233b7e..0fbd7383a8 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java @@ -27,7 +27,7 @@ public class GT_MetaTileEntity_AlloySmelter_Bronze } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_AlloySmelter_Bronze(this.mName, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_AlloySmelter_Bronze(this.mName, this.mDescriptionArray, this.mTextures); } public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java index 269dd18381..75a3f6447b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java @@ -27,7 +27,7 @@ public class GT_MetaTileEntity_AlloySmelter_Steel } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_AlloySmelter_Steel(this.mName, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_AlloySmelter_Steel(this.mName, this.mDescriptionArray, this.mTextures); } public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java index 70355d6d8b..3863c59d0f 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java @@ -33,7 +33,7 @@ public class GT_MetaTileEntity_Compressor_Bronze } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Compressor_Bronze(this.mName, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_Compressor_Bronze(this.mName, this.mDescriptionArray, this.mTextures); } public int checkRecipe() { diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java index b17789df88..6bf91a7447 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java @@ -33,7 +33,7 @@ public class GT_MetaTileEntity_Compressor_Steel } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Compressor_Steel(this.mName, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_Compressor_Steel(this.mName, this.mDescriptionArray, this.mTextures); } public int checkRecipe() { diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java index bd612ff06e..a5e6ae74ac 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java @@ -33,7 +33,7 @@ public class GT_MetaTileEntity_Extractor_Bronze } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Extractor_Bronze(this.mName, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_Extractor_Bronze(this.mName, this.mDescriptionArray, this.mTextures); } public int checkRecipe() { diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java index 05eec5d172..9a18312871 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java @@ -33,7 +33,7 @@ public class GT_MetaTileEntity_Extractor_Steel } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Extractor_Steel(this.mName, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_Extractor_Steel(this.mName, this.mDescriptionArray, this.mTextures); } public int checkRecipe() { diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java index 34be280dda..7a24222701 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java @@ -27,7 +27,7 @@ public class GT_MetaTileEntity_ForgeHammer_Bronze } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_ForgeHammer_Bronze(this.mName, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_ForgeHammer_Bronze(this.mName, this.mDescriptionArray, this.mTextures); } public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java index d3841ff6ff..66c40990cf 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java @@ -27,7 +27,7 @@ public class GT_MetaTileEntity_ForgeHammer_Steel } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_ForgeHammer_Steel(this.mName, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_ForgeHammer_Steel(this.mName, this.mDescriptionArray, this.mTextures); } public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java index 96555b71ed..717a09004d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java @@ -32,7 +32,7 @@ public class GT_MetaTileEntity_Furnace_Bronze } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Furnace_Bronze(this.mName, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_Furnace_Bronze(this.mName, this.mDescriptionArray, this.mTextures); } public int checkRecipe() { diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java index 5e79643d65..b572b79fbc 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java @@ -32,7 +32,7 @@ public class GT_MetaTileEntity_Furnace_Steel } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Furnace_Steel(this.mName, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_Furnace_Steel(this.mName, this.mDescriptionArray, this.mTextures); } public int checkRecipe() { diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java index 5997e5699f..573af14373 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java @@ -38,7 +38,7 @@ public class GT_MetaTileEntity_Macerator_Bronze } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Macerator_Bronze(this.mName, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_Macerator_Bronze(this.mName, this.mDescriptionArray, this.mTextures); } public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java index 63e68ac48d..d83711ac95 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java @@ -38,7 +38,7 @@ public class GT_MetaTileEntity_Macerator_Steel } public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Macerator_Steel(this.mName, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_Macerator_Steel(this.mName, this.mDescriptionArray, this.mTextures); } public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java index 41beb1c8ec..ba3b41adf5 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java @@ -30,9 +30,9 @@ public class GT_MetaTileEntity_Locker } public String[] getDescription() { - String[] desc = new String[mDescription.length + 1]; - System.arraycopy(mDescription, 0, desc, 0, mDescription.length); - desc[mDescription.length] = "Click with Screwdriver to change Style"; + String[] desc = new String[mDescriptionArray.length + 1]; + System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); + desc[mDescriptionArray.length] = "Click with Screwdriver to change Style"; return desc; } @@ -57,7 +57,7 @@ public class GT_MetaTileEntity_Locker } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Locker(this.mName, this.mTier, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_Locker(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } public boolean isSimpleMachine() { diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java index 84c1d9e800..2bfc81caf4 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java @@ -51,7 +51,7 @@ public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_TieredMach @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_QuantumChest(mName, mTier, mDescription, mTextures); + return new GT_MetaTileEntity_QuantumChest(mName, mTier, mDescriptionArray, mTextures); } @Override diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java index 7d7868b2b5..015ea7ab4b 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java @@ -126,7 +126,7 @@ public class GT_MetaTileEntity_QuantumTank @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_QuantumTank(mName, mTier, mDescription, mTextures); + return new GT_MetaTileEntity_QuantumTank(mName, mTier, mDescriptionArray, mTextures); } @Override -- cgit From cff6b44a84db895c8ef0555baf2c1e8d09b370e5 Mon Sep 17 00:00:00 2001 From: Techlone Date: Thu, 27 Apr 2017 16:32:27 +0500 Subject: Formatting clean up, nothing else --- .../GT_MetaTileEntity_BasicGenerator.java | 18 +- .../GT_MetaTileEntity_BasicMachine_GT_Recipe.java | 31 +- .../GT_MetaTileEntity_Hatch_Maintenance.java | 129 ++++---- .../GT_MetaTileEntity_Hatch_Muffler.java | 24 +- .../GT_MetaTileEntity_MultiBlockBase.java | 26 +- .../GT_MetaTileEntity_TieredMachineBlock.java | 4 +- src/main/java/gregtech/api/util/GT_Recipe.java | 137 ++++---- .../boilers/GT_MetaTileEntity_Boiler_Bronze.java | 11 +- .../boilers/GT_MetaTileEntity_Boiler_Lava.java | 10 +- .../boilers/GT_MetaTileEntity_Boiler_Solar.java | 19 +- .../boilers/GT_MetaTileEntity_Boiler_Steel.java | 10 +- .../GT_MetaTileEntity_DieselGenerator.java | 21 +- .../generators/GT_MetaTileEntity_GasTurbine.java | 20 +- .../generators/GT_MetaTileEntity_SteamTurbine.java | 40 +-- .../multi/GT_MetaTileEntity_Cleanroom.java | 366 ++++++++++----------- .../multi/GT_MetaTileEntity_LargeBoiler.java | 86 ++--- .../storage/GT_MetaTileEntity_Locker.java | 8 +- 17 files changed, 486 insertions(+), 474 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java index b540bdded5..76b2e9aaf5 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java @@ -29,7 +29,7 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity public GT_MetaTileEntity_BasicGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, 3, aDescription, aTextures); } - + public GT_MetaTileEntity_BasicGenerator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, 3, aDescription, aTextures); } @@ -59,9 +59,9 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity @Override public String[] getDescription() { - String[] desc = new String[mDescriptionArray.length + 1]; - System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); - desc[mDescriptionArray.length] = "Fuel Efficiency: " + getEfficiency() + "%"; + String[] desc = new String[mDescriptionArray.length + 1]; + System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); + desc[mDescriptionArray.length] = "Fuel Efficiency: " + getEfficiency() + "%"; return desc; } @@ -203,8 +203,8 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity if (tFuelValue > 0 && tConsumed > 0 && mFluid.amount > tConsumed) { long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue); if (tFluidAmountToUse > 0 && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) { - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), - 10 * getPollution()); + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), + 10 * getPollution()); mFluid.amount -= tFluidAmountToUse * tConsumed; } } @@ -216,8 +216,8 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), tEmptyContainer)) { aBaseMetaTileEntity.increaseStoredEnergyUnits(tFuelValue, true); aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), - 10 * getPollution()); + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), + 10 * getPollution()); } } } @@ -226,7 +226,7 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity if (aBaseMetaTileEntity.isServerSide()) aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU()); } - + public abstract int getPollution(); public abstract GT_Recipe_Map getRecipes(); diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java index bb1ef1332f..06a115d3d4 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java @@ -35,6 +35,7 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ private final String mSound; private final boolean mSharedTank, mRequiresFluidForFiltering; private final byte mGUIParameterA, mGUIParameterB; + public GT_MetaTileEntity_BasicMachine_GT_Recipe(int aID, String aName, String aNameRegional, int aTier, String aDescription, GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, int aGUIParameterA, int aGUIParameterB, String aGUIName, String aSound, boolean aSharedTank, boolean aRequiresFluidForFiltering, int aSpecialEffect, String aOverlays, Object[] aRecipe) { super(aID, aName, aNameRegional, aTier, aRecipes.mAmperage, aDescription, aInputSlots, aOutputSlots, aGUIName, aRecipes.mNEIName, new ITexture[]{new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_FRONT_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_FRONT")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_TOP_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_TOP")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_BOTTOM_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_BOTTOM"))}); mSharedTank = aSharedTank; @@ -74,8 +75,8 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ case 6: case 7: case 8: - aRecipe[i] = Ic2Items.reinforcedGlass; - break; + aRecipe[i] = Ic2Items.reinforcedGlass; + break; default: aRecipe[i] = new ItemStack(Blocks.glass, 1, W); break; @@ -634,17 +635,21 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), mGUIName, GT_Utility.isStringValid(mNEIName) ? mNEIName : getRecipeList() != null ? getRecipeList().mUnlocalizedName : "", mGUIParameterA, mGUIParameterB); } - @Override - public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) return false; - if (mInventory[aIndex] != null) return true; - switch (mInputSlotCount) { - case 0: return false; - case 1: return getFillableStack() == null ? !mRequiresFluidForFiltering && getRecipeList().containsInput(aStack) : null!=getRecipeList().findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, V[mTier], new FluidStack[] {getFillableStack()}, getSpecialSlot(), new ItemStack[] {aStack}); - case 2: return (!mRequiresFluidForFiltering || getFillableStack() != null) && (((getInputAt(0)!=null&&getInputAt(1)!=null) || (getInputAt(0)==null&&getInputAt(1)==null?getRecipeList().containsInput(aStack):(getRecipeList().containsInput(aStack)&&null!=getRecipeList().findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, V[mTier], new FluidStack[] {getFillableStack()}, getSpecialSlot(), aIndex == getInputSlot() ? new ItemStack[] {aStack, getInputAt(1)} : new ItemStack[] {getInputAt(0), aStack}))))); - default: return getRecipeList().containsInput(aStack); - } - } + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) return false; + if (mInventory[aIndex] != null) return true; + switch (mInputSlotCount) { + case 0: + return false; + case 1: + return getFillableStack() == null ? !mRequiresFluidForFiltering && getRecipeList().containsInput(aStack) : null != getRecipeList().findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), new ItemStack[]{aStack}); + case 2: + return (!mRequiresFluidForFiltering || getFillableStack() != null) && (((getInputAt(0) != null && getInputAt(1) != null) || (getInputAt(0) == null && getInputAt(1) == null ? getRecipeList().containsInput(aStack) : (getRecipeList().containsInput(aStack) && null != getRecipeList().findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), aIndex == getInputSlot() ? new ItemStack[]{aStack, getInputAt(1)} : new ItemStack[]{getInputAt(0), aStack}))))); + default: + return getRecipeList().containsInput(aStack); + } + } @Override public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java index 339c3ae8db..3bcd29a6c9 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java @@ -1,8 +1,5 @@ package gregtech.api.metatileentity.implementations; -import java.util.ArrayList; -import java.util.List; - import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; @@ -28,6 +25,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import scala.actors.threadpool.Arrays; +import java.util.List; + public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch { public boolean mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false, mAuto; @@ -35,7 +34,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch super(aID, aName, aNameRegional, aTier, 1, "For maintaining Multiblocks"); mAuto = false; } - + public GT_MetaTileEntity_Hatch_Maintenance(int aID, String aName, String aNameRegional, int aTier, boolean aAuto) { super(aID, aName, aNameRegional, aTier, 4, "For automatically maintaining Multiblocks"); mAuto = aAuto; @@ -53,19 +52,19 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch @Override public String[] getDescription() { - if (mAuto) { - String[] desc = new String[mDescriptionArray.length + 3]; - System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); - desc[mDescriptionArray.length] = "4 Ducttape, 2 Lubricant Cells"; - desc[mDescriptionArray.length + 1] = "4 Steel Screws, 2 Adv Circuits"; - desc[mDescriptionArray.length + 2] = "For each autorepair"; - return desc; - } else { - String[] desc = new String[mDescriptionArray.length + 1]; - System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); - desc[mDescriptionArray.length] = "Cannot be shared between Multiblocks!"; - return desc; - } + if (mAuto) { + String[] desc = new String[mDescriptionArray.length + 3]; + System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); + desc[mDescriptionArray.length] = "4 Ducttape, 2 Lubricant Cells"; + desc[mDescriptionArray.length + 1] = "4 Steel Screws, 2 Adv Circuits"; + desc[mDescriptionArray.length + 2] = "For each autorepair"; + return desc; + } else { + String[] desc = new String[mDescriptionArray.length + 1]; + System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); + desc[mDescriptionArray.length] = "Cannot be shared between Multiblocks!"; + return desc; + } } @Override @@ -105,7 +104,8 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - if(aTileEntity.getMetaTileID()==111) return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescriptionArray, mTextures, true); + if (aTileEntity.getMetaTileID() == 111) + return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescriptionArray, mTextures, true); return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescriptionArray, mTextures, false); } @@ -118,65 +118,65 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch @Override public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - if(mAuto) return new GT_Container_2by2(aPlayerInventory, aBaseMetaTileEntity); + if (mAuto) return new GT_Container_2by2(aPlayerInventory, aBaseMetaTileEntity); return new GT_Container_MaintenanceHatch(aPlayerInventory, aBaseMetaTileEntity); } @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - if(mAuto) return new GT_GUIContainer_2by2(aPlayerInventory, aBaseMetaTileEntity, getLocalName()); + if (mAuto) return new GT_GUIContainer_2by2(aPlayerInventory, aBaseMetaTileEntity, getLocalName()); return new GT_GUIContainer_MaintenanceHatch(aPlayerInventory, aBaseMetaTileEntity); } - + public boolean autoMaintainance() { - boolean tSuccess = true; - ItemStack[] mInputs = new ItemStack[]{ItemList.Duct_Tape.get(4, new Object[]{}),GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 2),GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 4),GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2)}; - List aInputs = Arrays.asList(mInventory); - if (mInputs.length > 0 && aInputs == null) tSuccess = false; - int amt = 0; - for (ItemStack tStack : mInputs) { - if (tStack != null) { - amt = tStack.stackSize; - boolean temp = true; - for (ItemStack aStack : aInputs) { - if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true))) { - amt -= aStack.stackSize; - if (amt < 1) { - temp = false; - break; - } - } + boolean tSuccess = true; + ItemStack[] mInputs = new ItemStack[]{ItemList.Duct_Tape.get(4, new Object[]{}), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 2), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 4), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2)}; + List aInputs = Arrays.asList(mInventory); + if (mInputs.length > 0 && aInputs == null) tSuccess = false; + int amt = 0; + for (ItemStack tStack : mInputs) { + if (tStack != null) { + amt = tStack.stackSize; + boolean temp = true; + for (ItemStack aStack : aInputs) { + if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true))) { + amt -= aStack.stackSize; + if (amt < 1) { + temp = false; + break; } - if (temp) tSuccess = false; } } - if(tSuccess){ - for (ItemStack tStack : mInputs) { - if (tStack != null) { - amt = tStack.stackSize; - for (ItemStack aStack : aInputs) { - if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true))) { - if (aStack.stackSize < amt){ - amt -= aStack.stackSize; - aStack.stackSize = 0; - }else{ - aStack.stackSize -= amt; - amt = 0; - break; - } + if (temp) tSuccess = false; + } + } + if (tSuccess) { + for (ItemStack tStack : mInputs) { + if (tStack != null) { + amt = tStack.stackSize; + for (ItemStack aStack : aInputs) { + if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true))) { + if (aStack.stackSize < amt) { + amt -= aStack.stackSize; + aStack.stackSize = 0; + } else { + aStack.stackSize -= amt; + amt = 0; + break; } } } } - this.mCrowbar = true; - this.mHardHammer = true; - this.mScrewdriver = true; - this.mSoftHammer = true; - this.mSolderingTool = true; - this.mWrench = true; - return true; - } - return false; + } + this.mCrowbar = true; + this.mHardHammer = true; + this.mScrewdriver = true; + this.mSoftHammer = true; + this.mSolderingTool = true; + this.mWrench = true; + return true; + } + return false; } public void onToolClick(ItemStack aStack, EntityLivingBase aPlayer) { @@ -199,7 +199,10 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch } if (mSolderingTool && aPlayer instanceof EntityPlayerMP) { EntityPlayerMP tPlayer = (EntityPlayerMP) aPlayer; - try{GT_Mod.instance.achievements.issueAchievement(tPlayer, "maintainance");}catch(Exception e){} + try { + GT_Mod.achievements.issueAchievement(tPlayer, "maintainance"); + } catch (Exception ignored) { + } } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java index 1445323fd5..dde8d7cf4f 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java @@ -25,11 +25,11 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { @Override public String[] getDescription() { - String[] desc = new String[mDescriptionArray.length + 2]; - System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); - desc[mDescriptionArray.length] = "DO NOT OBSTRUCT THE OUTPUT!"; - desc[mDescriptionArray.length + 1] = "Reduces Pollution to "+calculatePollutionReduction(100)+"%"; - return desc; + String[] desc = new String[mDescriptionArray.length + 2]; + System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); + desc[mDescriptionArray.length] = "DO NOT OBSTRUCT THE OUTPUT!"; + desc[mDescriptionArray.length + 1] = "Reduces Pollution to " + calculatePollutionReduction(100) + "%"; + return desc; } @Override @@ -68,15 +68,15 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { } public boolean polluteEnvironment() { - if(getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing())){ - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), calculatePollutionReduction(10000)); - return true; - } + if (getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing())) { + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), calculatePollutionReduction(10000)); + return true; + } return false; } - - public int calculatePollutionReduction(int aPollution){ - return (int) (aPollution *(Math.pow(0.7, mTier-1))); + + public int calculatePollutionReduction(int aPollution) { + return (int) (aPollution * (Math.pow(0.7, mTier - 1))); } @Override 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 75fbf0fd2a..3dd59126b8 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 @@ -117,8 +117,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { aNBT.setInteger("mRuntime", mRuntime); if (mOutputItems != null) { - aNBT.setInteger("mOutputItemsLength", mOutputItems.length); - for (int i = 0; i < mOutputItems.length; i++) + aNBT.setInteger("mOutputItemsLength", mOutputItems.length); + for (int i = 0; i < mOutputItems.length; i++) if (mOutputItems[i] != null) { NBTTagCompound tNBT = new NBTTagCompound(); mOutputItems[i].writeToNBT(tNBT); @@ -126,8 +126,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } } if (mOutputFluids != null) { - aNBT.setInteger("mOutputFluidsLength", mOutputFluids.length); - for (int i = 0; i < mOutputFluids.length; i++) + aNBT.setInteger("mOutputFluidsLength", mOutputFluids.length); + for (int i = 0; i < mOutputFluids.length; i++) if (mOutputFluids[i] != null) { NBTTagCompound tNBT = new NBTTagCompound(); mOutputFluids[i].writeToNBT(tNBT); @@ -152,12 +152,12 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { mEfficiency = aNBT.getInteger("mEfficiency"); mPollution = aNBT.getInteger("mPollution"); mRuntime = aNBT.getInteger("mRuntime"); - + int aOutputItemsLength = aNBT.getInteger("mOutputItemsLength"); if (aOutputItemsLength > 0) { mOutputItems = new ItemStack[aOutputItemsLength]; for (int i = 0; i < mOutputItems.length; i++) - mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i); + mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i); } int aOutputFluidsLength = aNBT.getInteger("mOutputFluidsLength"); @@ -166,7 +166,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { for (int i = 0; i < mOutputFluids.length; i++) mOutputFluids[i] = GT_Utility.loadFluid(aNBT, "mOutputFluids" + i); } - + mWrench = aNBT.getBoolean("mWrench"); mScrewdriver = aNBT.getBoolean("mScrewdriver"); mSoftHammer = aNBT.getBoolean("mSoftHammer"); @@ -222,7 +222,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { for (GT_MetaTileEntity_Hatch_Maintenance tHatch : mMaintenanceHatches) { if (isValidMetaTileEntity(tHatch)) { if (!GT_MetaTileEntity_MultiBlockBase.disableMaintenance) { - if(tHatch.mAuto && (!mWrench||!mScrewdriver||!mSoftHammer||!mHardHammer||!mSolderingTool||!mCrowbar))tHatch.autoMaintainance(); + if (tHatch.mAuto && (!mWrench || !mScrewdriver || !mSoftHammer || !mHardHammer || !mSolderingTool || !mCrowbar)) + tHatch.autoMaintainance(); if (tHatch.mWrench) mWrench = true; if (tHatch.mScrewdriver) mScrewdriver = true; if (tHatch.mSoftHammer) mSoftHammer = true; @@ -255,7 +256,10 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) { if (mOutputItems != null) for (ItemStack tStack : mOutputItems) if (tStack != null) { - try{GT_Mod.achievements.issueAchivementHatch(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), tStack);}catch(Exception e){} + try { + GT_Mod.achievements.issueAchivementHatch(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), tStack); + } catch (Exception ignored) { + } addOutput(tStack); } if (mOutputFluids != null && mOutputFluids.length == 1) { @@ -276,7 +280,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { if (mOutputFluids.length > 1) { try { GT_Mod.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "oilplant"); - } catch (Exception e) { + } catch (Exception ignored) { } } } @@ -724,7 +728,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); if (aMetaTileEntity == null) return false; if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) { - ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex; return mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity); } return false; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java index 7a77861494..4187307c6b 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java @@ -13,7 +13,7 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit @Deprecated public final String mDescription; - + /** * A simple Description. */ @@ -37,7 +37,7 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit public GT_MetaTileEntity_TieredMachineBlock(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription, ITexture... aTextures) { super(aID, aName, aNameRegional, aInvSlotCount); mTier = (byte) Math.max(0, Math.min(aTier, 9)); - mDescriptionArray = aDescription == null ? new String[0] : aDescription; + mDescriptionArray = aDescription == null ? new String[0] : aDescription; mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : ""; // must always be the last call! diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index aed39defb2..2c3134816d 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -76,7 +76,7 @@ public class GT_Recipe implements Comparable { * Used for describing recipes that do not fit the default recipe pattern (for example Large Boiler Fuels) */ private String[] neiDesc = null; - + private GT_Recipe(GT_Recipe aRecipe) { mInputs = GT_Utility.copyStackArray((Object[]) aRecipe.mInputs); mOutputs = GT_Utility.copyStackArray((Object[]) aRecipe.mOutputs); @@ -93,6 +93,7 @@ public class GT_Recipe implements Comparable { mEnabled = aRecipe.mEnabled; mHidden = aRecipe.mHidden; } + protected GT_Recipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecialItems, int[] aChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { if (aInputs == null) aInputs = new ItemStack[0]; if (aOutputs == null) aOutputs = new ItemStack[0]; @@ -330,13 +331,13 @@ public class GT_Recipe implements Comparable { boolean temp = true; amt = tFluid.amount; for (FluidStack aFluid : aFluidInputs) - if (aFluid != null && aFluid.isFluidEqual(tFluid)){ - if (aDontCheckStackSizes ){ + if (aFluid != null && aFluid.isFluidEqual(tFluid)) { + if (aDontCheckStackSizes) { temp = false; break; } amt -= aFluid.amount; - if (amt<1){ + if (amt < 1) { temp = false; break; } @@ -397,14 +398,14 @@ public class GT_Recipe implements Comparable { amt = tStack.stackSize; for (ItemStack aStack : aInputs) { if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true))) { - if (aDontCheckStackSizes){ + if (aDontCheckStackSizes) { aStack.stackSize -= amt; break; } - if (aStack.stackSize < amt){ + if (aStack.stackSize < amt) { amt -= aStack.stackSize; aStack.stackSize = 0; - }else{ + } else { aStack.stackSize -= amt; amt = 0; break; @@ -441,15 +442,16 @@ public class GT_Recipe implements Comparable { } public String[] getNeiDesc() { - return neiDesc; - } - protected void setNeiDesc(String... neiDesc) { - this.neiDesc = neiDesc; - } + return neiDesc; + } - public static class GT_Recipe_AssemblyLine{ + protected void setNeiDesc(String... neiDesc) { + this.neiDesc = neiDesc; + } + + public static class GT_Recipe_AssemblyLine { public static final ArrayList sAssemblylineRecipes = new ArrayList(); - + public ItemStack mResearchItem; public int mResearchTime; public ItemStack[] mInputs; @@ -457,17 +459,17 @@ public class GT_Recipe implements Comparable { public ItemStack mOutput; public int mDuration; public int mEUt; - + public GT_Recipe_AssemblyLine(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt) { - mResearchItem = aResearchItem; - mResearchTime = aResearchTime; - mInputs = aInputs; - mFluidInputs = aFluidInputs; - mOutput = aOutput; - mDuration = aDuration; - mEUt = aEUt; - } - + mResearchItem = aResearchItem; + mResearchTime = aResearchTime; + mInputs = aInputs; + mFluidInputs = aFluidInputs; + mOutput = aOutput; + mDuration = aDuration; + mEUt = aEUt; + } + } public static class GT_Recipe_Map { @@ -489,7 +491,7 @@ public class GT_Recipe implements Comparable { public static final GT_Recipe_Map sByProductList = new GT_Recipe_Map(new HashSet(1000), "gt.recipe.byproductlist", "Ore Byproduct List", null, RES_PATH_GUI + "basicmachines/Default", 1, 6, 1, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sReplicatorFakeRecipes = new GT_Recipe_Map(new HashSet(100), "gt.recipe.replicator", "Replicator", null, RES_PATH_GUI + "basicmachines/Replicator", 0, 1, 0, 1, 1, E, 1, E, true, true); public static final GT_Recipe_Map sAssemblylineFakeRecipes = new GT_Recipe_Map(new HashSet(30), "gt.recipe.scanner", "Scanner", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 1, 0, 1, E, 1, E, true, true); - + public static final GT_Recipe_Map sPlasmaArcFurnaceRecipes = new GT_Recipe_Map(new HashSet(10000), "gt.recipe.plasmaarcfurnace", "Plasma Arc Furnace", null, RES_PATH_GUI + "basicmachines/PlasmaArcFurnace", 1, 4, 1, 1, 1, E, 1, E, true, true); public static final GT_Recipe_Map sArcFurnaceRecipes = new GT_Recipe_Map(new HashSet(10000), "gt.recipe.arcfurnace", "Arc Furnace", null, RES_PATH_GUI + "basicmachines/ArcFurnace", 1, 4, 1, 1, 3, E, 1, E, true, true); public static final GT_Recipe_Map sPrinterRecipes = new GT_Recipe_Map_Printer(new HashSet(100), "gt.recipe.printer", "Printer", null, RES_PATH_GUI + "basicmachines/Printer", 1, 1, 1, 1, 1, E, 1, E, true, true); @@ -545,7 +547,7 @@ public class GT_Recipe implements Comparable { public static final GT_Recipe_Map_Fuel sLargeNaquadahReactorFuels = new GT_Recipe_Map_Fuel(new HashSet(10), "gt.recipe.largenaquadahreactor", "Large Naquadah Reactor", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true); public static final GT_Recipe_Map_Fuel sFluidNaquadahReactorFuels = new GT_Recipe_Map_Fuel(new HashSet(10), "gt.recipe.fluidnaquadahreactor", "Fluid Naquadah Reactor", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true); public static final GT_Recipe_Map_Large_Boiler_Fake_Fuels sLargeBoilerFakeFuels = new GT_Recipe_Map_Large_Boiler_Fake_Fuels(); - + /** * HashMap of Recipes based on their Items */ @@ -1378,47 +1380,46 @@ public class GT_Recipe implements Comparable { } public static class GT_Recipe_Map_Large_Boiler_Fake_Fuels extends GT_Recipe_Map { - - public GT_Recipe_Map_Large_Boiler_Fake_Fuels(){ - super(new HashSet(30), "gt.recipe.largeboilerfakefuels", "Large Boiler", null, RES_PATH_GUI + "basicmachines/Default", 1, 0, 1, 0, 1, E, 1, E, true , true); - GT_Recipe explanatoryRecipe = new GT_Recipe(true, new ItemStack[]{}, new ItemStack[]{}, null, null, null, null, 1, 1, 1); - explanatoryRecipe.setNeiDesc("Not all solid fuels are listed.", "Any item that burns in a", "vanilla furnace will burn in", "a Large Boiler."); - addRecipe(explanatoryRecipe); - } - - public GT_Recipe addDenseLiquidRecipe(GT_Recipe recipe) { - return addRecipe(recipe, ((double)recipe.mSpecialValue) / 10); - } - - public GT_Recipe addDieselRecipe(GT_Recipe recipe) { - return addRecipe(recipe,((double)recipe.mSpecialValue) / 40); - } - - public void addSolidRecipes(ItemStack ... itemStacks) { - for(ItemStack itemStack : itemStacks){ - addSolidRecipe(itemStack); - } - } - - public GT_Recipe addSolidRecipe(ItemStack fuelItemStack){ - return addRecipe(new GT_Recipe(true, new ItemStack[]{fuelItemStack}, new ItemStack[]{}, null, null, null, null, 1, 0, GT_ModHandler.getFuelValue(fuelItemStack) / 1600), ((double)GT_ModHandler.getFuelValue(fuelItemStack)) / 1600); - } - - private GT_Recipe addRecipe(GT_Recipe recipe, double baseBurnTime){ - recipe = new GT_Recipe(recipe); - - double bronzeBurnTime = baseBurnTime * 2; - double steelBurnTime = baseBurnTime * 1.5; - double titaniumBurnTime = baseBurnTime * 1.3; - double tungstensteelBurnTime = baseBurnTime * 1.2; - - recipe.setNeiDesc("Burn time in seconds:", - String.format("Bronze Boiler: %.4f", bronzeBurnTime), - String.format("Steel Boiler: %.4f", steelBurnTime), - String.format("Titanium Boiler: %.4f", titaniumBurnTime), - String.format("Tungstensteel Boiler: %.4f", tungstensteelBurnTime)); - return super.addRecipe(recipe); - } - + + public GT_Recipe_Map_Large_Boiler_Fake_Fuels() { + super(new HashSet(30), "gt.recipe.largeboilerfakefuels", "Large Boiler", null, RES_PATH_GUI + "basicmachines/Default", 1, 0, 1, 0, 1, E, 1, E, true, true); + GT_Recipe explanatoryRecipe = new GT_Recipe(true, new ItemStack[]{}, new ItemStack[]{}, null, null, null, null, 1, 1, 1); + explanatoryRecipe.setNeiDesc("Not all solid fuels are listed.", "Any item that burns in a", "vanilla furnace will burn in", "a Large Boiler."); + addRecipe(explanatoryRecipe); + } + + public GT_Recipe addDenseLiquidRecipe(GT_Recipe recipe) { + return addRecipe(recipe, ((double) recipe.mSpecialValue) / 10); + } + + public GT_Recipe addDieselRecipe(GT_Recipe recipe) { + return addRecipe(recipe, ((double) recipe.mSpecialValue) / 40); + } + + public void addSolidRecipes(ItemStack... itemStacks) { + for (ItemStack itemStack : itemStacks) { + addSolidRecipe(itemStack); + } + } + + public GT_Recipe addSolidRecipe(ItemStack fuelItemStack) { + return addRecipe(new GT_Recipe(true, new ItemStack[]{fuelItemStack}, new ItemStack[]{}, null, null, null, null, 1, 0, GT_ModHandler.getFuelValue(fuelItemStack) / 1600), ((double) GT_ModHandler.getFuelValue(fuelItemStack)) / 1600); + } + + private GT_Recipe addRecipe(GT_Recipe recipe, double baseBurnTime) { + recipe = new GT_Recipe(recipe); + + double bronzeBurnTime = baseBurnTime * 2; + double steelBurnTime = baseBurnTime * 1.5; + double titaniumBurnTime = baseBurnTime * 1.3; + double tungstensteelBurnTime = baseBurnTime * 1.2; + + recipe.setNeiDesc("Burn time in seconds:", + String.format("Bronze Boiler: %.4f", bronzeBurnTime), + String.format("Steel Boiler: %.4f", steelBurnTime), + String.format("Titanium Boiler: %.4f", titaniumBurnTime), + String.format("Tungstensteel Boiler: %.4f", tungstensteelBurnTime)); + return super.addRecipe(recipe); + } } } diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java index db9e13ad83..b16986fffd 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java @@ -23,14 +23,15 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler { public GT_MetaTileEntity_Boiler_Bronze(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, new String[]{ - "An early way to get Steam Power", - "Produces 120L of Steam per second", - "Causes 20 Pollution per second"}, new ITexture[0]); + "An early way to get Steam Power", + "Produces 120L of Steam per second", + "Causes 20 Pollution per second"}); } public GT_MetaTileEntity_Boiler_Bronze(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } + public GT_MetaTileEntity_Boiler_Bronze(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @@ -146,8 +147,8 @@ public class GT_MetaTileEntity_Boiler_Bronze this.mProcessingEnergy -= 1; this.mTemperature += 1; } - if(this.mProcessingEnergy>0 && (aTick % 20L == 0L)){ - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); + if (this.mProcessingEnergy > 0 && (aTick % 20L == 0L)) { + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); } aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); } diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java index 8e044c7c2a..3e5afedba2 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java @@ -23,9 +23,9 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler { public GT_MetaTileEntity_Boiler_Lava(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, new String[]{ - "A Boiler running off Lava", - "Produces 600L of Steam per second", - "Causes 20 Pollution per second"}, new ITexture[0]); + "A Boiler running off Lava", + "Produces 600L of Steam per second", + "Causes 20 Pollution per second"}); } public GT_MetaTileEntity_Boiler_Lava(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -126,8 +126,8 @@ public class GT_MetaTileEntity_Boiler_Lava this.mTemperature += 1; } - if(this.mProcessingEnergy>0 && (aTick % 20L == 0L)){ - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); + if (this.mProcessingEnergy > 0 && (aTick % 20L == 0L)) { + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); } aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); } diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java index 1edfaca5a0..e8b4ed1e8f 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java @@ -19,17 +19,16 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { public GT_MetaTileEntity_Boiler_Solar(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, new String[]{ - "Steam Power by the Sun", - "Produces 120L of Steam per second", - "Calcifies over time, reducing Steam output to 40L/s", - "Break and replace to decalcify"}, - new ITexture[0]); + "Steam Power by the Sun", + "Produces 120L of Steam per second", + "Calcifies over time, reducing Steam output to 40L/s", + "Break and replace to decalcify"}); } public GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } - + public GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @@ -68,9 +67,9 @@ public class GT_MetaTileEntity_Boiler_Solar public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Boiler_Solar(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } - + private int mRunTime = 0; - + @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); @@ -118,8 +117,8 @@ public class GT_MetaTileEntity_Boiler_Solar this.mFluid.amount -= 1; mRunTime += 1; int tOutput = 150; - if(mRunTime > 10000){ - tOutput = Math.max(50, 150 - ((mRunTime-10000)/100)); + if (mRunTime > 10000) { + tOutput = Math.max(50, 150 - ((mRunTime - 10000) / 100)); } if (this.mSteam == null) { this.mSteam = GT_ModHandler.getSteam(tOutput); diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java index 1e82f7efab..5d7ec97401 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java @@ -23,9 +23,9 @@ public class GT_MetaTileEntity_Boiler_Steel extends GT_MetaTileEntity_Boiler { public GT_MetaTileEntity_Boiler_Steel(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, new String[]{ - "Faster than the Bronze Boiler", - "Produces 300L of Steam per second", - "Causes 20 Pollution per second"}, new ITexture[0]); + "Faster than the Bronze Boiler", + "Produces 300L of Steam per second", + "Causes 20 Pollution per second"}); } public GT_MetaTileEntity_Boiler_Steel(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { @@ -152,8 +152,8 @@ public class GT_MetaTileEntity_Boiler_Steel this.mProcessingEnergy -= 2; this.mTemperature += 1; } - if(this.mProcessingEnergy>0 && (aTick % 20L == 0L)){ - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); + if (this.mProcessingEnergy > 0 && (aTick % 20L == 0L)) { + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); } aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); } diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java index 7b1487b3c3..503a1f7efb 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java @@ -18,15 +18,14 @@ import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGenerator { - public static final int BASE_POLLUTION = 2; - + public static final int BASE_POLLUTION = 2; + public int mEfficiency; public GT_MetaTileEntity_DieselGenerator(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, new String[]{ - "Requires liquid Fuel", - "Causes " + (int) (20 * BASE_POLLUTION * Math.pow(2, aTier - 1)) + " Pollution per second"}, - new ITexture[0]); + "Requires liquid Fuel", + "Causes " + (int) (20 * BASE_POLLUTION * Math.pow(2, aTier - 1)) + " Pollution per second"}); onConfigLoad(); } @@ -34,7 +33,7 @@ public class GT_MetaTileEntity_DieselGenerator super(aName, aTier, aDescription, aTextures); onConfigLoad(); } - + public GT_MetaTileEntity_DieselGenerator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); onConfigLoad(); @@ -65,7 +64,7 @@ public class GT_MetaTileEntity_DieselGenerator } public int getFuelValue(ItemStack aStack) { - if (GT_Utility.isStackInvalid(aStack) || getRecipes() == null) return 0; + if (GT_Utility.isStackInvalid(aStack) || getRecipes() == null) return 0; int rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack)); if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) { rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3); @@ -113,8 +112,8 @@ public class GT_MetaTileEntity_DieselGenerator return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE)}; } - @Override - public int getPollution() { - return (int) (GT_MetaTileEntity_DieselGenerator.BASE_POLLUTION * Math.pow(2, mTier - 1)); - } + @Override + public int getPollution() { + return (int) (GT_MetaTileEntity_DieselGenerator.BASE_POLLUTION * Math.pow(2, mTier - 1)); + } } diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java index 14f1eb2643..293669094b 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java @@ -13,15 +13,15 @@ import gregtech.api.util.GT_Recipe; public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerator { - public static final int BASE_POLLUTION = 1; - + public static final int BASE_POLLUTION = 1; + public int mEfficiency; - + public GT_MetaTileEntity_GasTurbine(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, new String[]{ - "Requires flammable Gasses", - "Causes " + (int) (20 * BASE_POLLUTION * Math.pow(2, aTier - 1)) + " Pollution per second"}); + "Requires flammable Gasses", + "Causes " + (int) (20 * BASE_POLLUTION * Math.pow(2, aTier - 1)) + " Pollution per second"}); onConfigLoad(); } @@ -29,7 +29,7 @@ public class GT_MetaTileEntity_GasTurbine super(aName, aTier, aDescription, aTextures); onConfigLoad(); } - + public GT_MetaTileEntity_GasTurbine(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); onConfigLoad(); @@ -100,8 +100,8 @@ public class GT_MetaTileEntity_GasTurbine return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_SIDE_ACTIVE)}; } - @Override - public int getPollution() { - return (int) (GT_MetaTileEntity_GasTurbine.BASE_POLLUTION * Math.pow(2, mTier - 1)); - } + @Override + public int getPollution() { + return (int) (GT_MetaTileEntity_GasTurbine.BASE_POLLUTION * Math.pow(2, mTier - 1)); + } } diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java index 8850f824be..e63fbe0579 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java @@ -18,8 +18,8 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener public GT_MetaTileEntity_SteamTurbine(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, new String[]{ - "Converts Steam into EU", - "Base rate: 2L of Steam -> 1 EU"}, new ITexture[0]); + "Converts Steam into EU", + "Base rate: 2L of Steam -> 1 EU"}); onConfigLoad(); } @@ -47,12 +47,12 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener @Override public String[] getDescription() { - String[] desc = new String[mDescriptionArray.length + 2]; - System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); - desc[mDescriptionArray.length] = "Fuel Efficiency: " + (600 / getEfficiency()) + "%"; - desc[mDescriptionArray.length + 1] = String.format("Consumes up to %sL of Steam per second", - (int) (4000 * (8 * Math.pow(4, mTier) + Math.pow(2, mTier)) / (600 / getEfficiency()))); - return desc; + String[] desc = new String[mDescriptionArray.length + 2]; + System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); + desc[mDescriptionArray.length] = "Fuel Efficiency: " + (600 / getEfficiency()) + "%"; + desc[mDescriptionArray.length + 1] = String.format("Consumes up to %sL of Steam per second", + (int) (4000 * (8 * Math.pow(4, mTier) + Math.pow(2, mTier)) / (600 / getEfficiency()))); + return desc; } public int getCapacity() { @@ -68,8 +68,8 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener } public int getFuelValue(FluidStack aLiquid) { - if(aLiquid==null)return 0; - String fluidName = aLiquid.getFluid().getUnlocalizedName(aLiquid); + if (aLiquid == null) return 0; + String fluidName = aLiquid.getFluid().getUnlocalizedName(aLiquid); return GT_ModHandler.isSteam(aLiquid) || fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name") ? 3 : 0; } @@ -119,18 +119,18 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_SIDE_ACTIVE)}; } - @Override - public int getPollution() { - return 0; - } - + @Override + public int getPollution() { + return 0; + } + @Override public boolean isFluidInputAllowed(FluidStack aFluid) { - if(aFluid.getFluid().getUnlocalizedName(aFluid).equals("ic2.fluidSuperheatedSteam")){ - aFluid.amount=0; - aFluid = null; - return false; - } + if (aFluid.getFluid().getUnlocalizedName(aFluid).equals("ic2.fluidSuperheatedSteam")) { + aFluid.amount = 0; + aFluid = null; + return false; + } return super.isFluidInputAllowed(aFluid); } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java index 484195a2cd..015670cb02 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java @@ -16,188 +16,184 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBase { - private int mHeatingCapacity = 0; - - public GT_MetaTileEntity_Cleanroom(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GT_MetaTileEntity_Cleanroom(String aName) { - super(aName); - } - - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Cleanroom(this.mName); - } - - public String[] getDescription() { - return new String[] { - "Controller Block for the Cleanroom", - "Min(WxHxD): 3x3x3 (Hollow), Max(WxHxD): 15x15x15 (Hollow)", - "Controller (Top center), Walls Plascrete", - "Top besides contoller and corners filter casings", - "1 Reinforced Door", - "1x Energy Hatch, 1x Maintainance Hatch", - "up to 10 Machine Hull to transfer Items & Energy inside"}; - } - - public boolean checkRecipe(ItemStack aStack) { - this.mEfficiencyIncrease = 100; - this.mMaxProgresstime = 100; - this.mEUt = -4; - return true; - } - - public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - int x = 1; - int z = 1; - int y = 1; - int mDoorCount = 0; - int mHullCount = 0; - int mPlascreteCount = 0; - boolean doorState = false; - mUpdate = 100; - for (int i = 1; i < 8; i++) { - Block tBlock = aBaseMetaTileEntity.getBlockOffset(i, 0, 0); - int tMeta = aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0); - if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) { - if (tBlock == GregTech_API.sBlockReinforced || tMeta == 2) { - x = i; - z = i; - break; - } else { - return false; - } - } - } - for (int i = -1; i > -16; i--) { - Block tBlock = aBaseMetaTileEntity.getBlockOffset(x, i, z); - int tMeta = aBaseMetaTileEntity.getMetaIDOffset(x, i, z); - if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) { - y = i + 1; - break; - } - } - if (y > -2) { - return false; - } - for (int dX = -x; dX <= x; dX++) { - for (int dZ = -z; dZ <= z; dZ++) { - for (int dY = 0; dY >= y; dY--) { - if (dX == -x || dX == x || dY == -y || dY == y || dZ == -z || dZ == z) { - Block tBlock = aBaseMetaTileEntity.getBlockOffset(dX, dY, dZ); - int tMeta = aBaseMetaTileEntity.getMetaIDOffset(dX, dY, dZ); - if (y == 0) { - if (dX == -x || dX == x || dZ == -z || dZ == z) { - if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) { - return false; - } - } else if (dX == 0 && dZ == 0) { - } else { - if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) { - return false; - } - } - } else if (tBlock == GregTech_API.sBlockReinforced && tMeta == 2) { - mPlascreteCount++; - } else { - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); - if ((!addMaintenanceToMachineList(tTileEntity, 82)) && (!addEnergyInputToMachineList(tTileEntity, 82))) { - if (tBlock instanceof ic2.core.block.BlockIC2Door) { - if ((tMeta & 8) == 0) { - doorState = (Math.abs(dX) > Math.abs(dZ) == ((tMeta & 1) != 0)) != ((tMeta & 4) != 0); - } - mDoorCount++; - } else { - if (tTileEntity == null) { - { - return false; - } - } - IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicHull) { - mHullCount++; - } else { - return false; - } - } - } - } - } else { - - } - } - } - } - if (mMaintenanceHatches.size() != 1 || mEnergyHatches.size() != 1 || mDoorCount != 2 || mHullCount > 10) { - return false; - } - for (int dX = -x + 1; dX <= x - 1; dX++) { - for (int dZ = -z + 1; dZ <= z - 1; dZ++) { - for (int dY = -1; dY >= y + 1; dY--) { - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); - if (tTileEntity != null) { - IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); - if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_BasicMachine_GT_Recipe) { - ((GT_MetaTileEntity_BasicMachine_GT_Recipe) aMetaTileEntity).mCleanroom = this; - } - } - } - } - } - - if (doorState) { - mEfficiency = Math.max(0, mEfficiency - 200); - } - - return true; - } - - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide == 0 || aSide == 1) { - return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE), - new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_ACTIVE : Textures.BlockIcons.OVERLAY_TOP_CLEANROOM) }; - - } - return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE) }; - } - - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MultiblockDisplay.png"); - } - - public GT_Recipe.GT_Recipe_Map getRecipeMap() { - return null; - } - - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } - - public boolean isFacingValid(byte aFacing) { - return aFacing > 1; - } - - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } - - public int getPollutionPerTick(ItemStack aStack) { - return 0; - } - - public int getDamageToComponent(ItemStack aStack) { - return 0; - } - - public int getAmountOfOutputs() { - return 0; - } - - public boolean explodesOnComponentBreak(ItemStack aStack) { - return false; - } -} \ No newline at end of file + private int mHeatingCapacity = 0; + + public GT_MetaTileEntity_Cleanroom(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT_MetaTileEntity_Cleanroom(String aName) { + super(aName); + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Cleanroom(this.mName); + } + + public String[] getDescription() { + return new String[]{ + "Controller Block for the Cleanroom", + "Min(WxHxD): 3x3x3 (Hollow), Max(WxHxD): 15x15x15 (Hollow)", + "Controller (Top center), Walls Plascrete", + "Top besides contoller and corners filter casings", + "1 Reinforced Door", + "1x Energy Hatch, 1x Maintainance Hatch", + "up to 10 Machine Hull to transfer Items & Energy inside"}; + } + + public boolean checkRecipe(ItemStack aStack) { + this.mEfficiencyIncrease = 100; + this.mMaxProgresstime = 100; + this.mEUt = -4; + return true; + } + + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + int x = 1; + int z = 1; + int y = 1; + int mDoorCount = 0; + int mHullCount = 0; + int mPlascreteCount = 0; + boolean doorState = false; + mUpdate = 100; + for (int i = 1; i < 8; i++) { + Block tBlock = aBaseMetaTileEntity.getBlockOffset(i, 0, 0); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0); + if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) { + if (tBlock == GregTech_API.sBlockReinforced || tMeta == 2) { + x = i; + z = i; + break; + } else { + return false; + } + } + } + for (int i = -1; i > -16; i--) { + Block tBlock = aBaseMetaTileEntity.getBlockOffset(x, i, z); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(x, i, z); + if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) { + y = i + 1; + break; + } + } + if (y > -2) { + return false; + } + for (int dX = -x; dX <= x; dX++) { + for (int dZ = -z; dZ <= z; dZ++) { + for (int dY = 0; dY >= y; dY--) { + if (dX == -x || dX == x || dY == -y || dY == y || dZ == -z || dZ == z) { + Block tBlock = aBaseMetaTileEntity.getBlockOffset(dX, dY, dZ); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(dX, dY, dZ); + if (y == 0) { + if (dX == -x || dX == x || dZ == -z || dZ == z) { + if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) { + return false; + } + } else if (dX == 0 && dZ == 0) { + } else { + if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) { + return false; + } + } + } else if (tBlock == GregTech_API.sBlockReinforced && tMeta == 2) { + mPlascreteCount++; + } else { + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); + if ((!addMaintenanceToMachineList(tTileEntity, 82)) && (!addEnergyInputToMachineList(tTileEntity, 82))) { + if (tBlock instanceof ic2.core.block.BlockIC2Door) { + if ((tMeta & 8) == 0) { + doorState = (Math.abs(dX) > Math.abs(dZ) == ((tMeta & 1) != 0)) != ((tMeta & 4) != 0); + } + mDoorCount++; + } else { + if (tTileEntity == null) { + return false; + } + IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicHull) { + mHullCount++; + } else { + return false; + } + } + } + } + } + } + } + } + if (mMaintenanceHatches.size() != 1 || mEnergyHatches.size() != 1 || mDoorCount != 2 || mHullCount > 10) { + return false; + } + for (int dX = -x + 1; dX <= x - 1; dX++) { + for (int dZ = -z + 1; dZ <= z - 1; dZ++) { + for (int dY = -1; dY >= y + 1; dY--) { + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); + if (tTileEntity != null) { + IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); + if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_BasicMachine_GT_Recipe) { + ((GT_MetaTileEntity_BasicMachine_GT_Recipe) aMetaTileEntity).mCleanroom = this; + } + } + } + } + } + + if (doorState) { + mEfficiency = Math.max(0, mEfficiency - 200); + } + + return true; + } + + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == 0 || aSide == 1) { + return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE), + new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_ACTIVE : Textures.BlockIcons.OVERLAY_TOP_CLEANROOM)}; + + } + return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE)}; + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MultiblockDisplay.png"); + } + + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return null; + } + + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + public boolean isFacingValid(byte aFacing) { + return aFacing > 1; + } + + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + public int getPollutionPerTick(ItemStack aStack) { + return 0; + } + + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + public int getAmountOfOutputs() { + return 0; + } + + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java index d720c688d8..04922c0a03 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java @@ -38,7 +38,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler public String[] getDescription() { return new String[]{ "Controller Block for the Large Boiler", - "Produces "+(getEUt()*40)*(runtimeBoost(20)/20f)+"L of Steam with 1 Coal at "+getEUt()* 40+"L/s", + "Produces " + (getEUt() * 40) * (runtimeBoost(20) / 20f) + "L of Steam with 1 Coal at " + getEUt() * 40 + "L/s", "A programmed circuit in the main block throttles the boiler (-1000L/s per config)", "Size(WxHxD): 3x5x3, Controller (Front middle in Fireboxes)", "3x1x3 of Fire Boxes (Bottom layer, Min 3)", @@ -94,27 +94,27 @@ public abstract class GT_MetaTileEntity_LargeBoiler } public boolean checkRecipe(ItemStack aStack) { - //Do we have an integrated circuit with a valid configuration? - if (mInventory[1] != null && mInventory[1].getUnlocalizedName().startsWith("gt.integrated_circuit")) { + //Do we have an integrated circuit with a valid configuration? + if (mInventory[1] != null && mInventory[1].getUnlocalizedName().startsWith("gt.integrated_circuit")) { int circuit_config = mInventory[1].getItemDamage(); if (circuit_config >= 1 && circuit_config <= 25) { // If so, overwrite the current config - this.integratedCircuitConfig = circuit_config; - } + this.integratedCircuitConfig = circuit_config; + } } else { - //If not, set the config to zero - this.integratedCircuitConfig = 0; + //If not, set the config to zero + this.integratedCircuitConfig = 0; } - - this.mSuperEfficencyIncrease=0; + + this.mSuperEfficencyIncrease = 0; for (GT_Recipe tRecipe : GT_Recipe.GT_Recipe_Map.sDieselFuels.mRecipeList) { FluidStack tFluid = GT_Utility.getFluidForFilledItem(tRecipe.getRepresentativeInput(0), true); - if ((tFluid != null) && (tRecipe.mSpecialValue > 1)) { + if (tFluid != null && tRecipe.mSpecialValue > 1) { tFluid.amount = 1000; if (depleteInput(tFluid)) { this.mMaxProgresstime = adjustBurnTimeForConfig(runtimeBoost(tRecipe.mSpecialValue / 2)); this.mEUt = adjustEUtForConfig(getEUt()); - this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease() * 4); + this.mEfficiencyIncrease = this.mMaxProgresstime * getEfficiencyIncrease() * 4; return true; } } @@ -126,7 +126,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler if (depleteInput(tFluid)) { this.mMaxProgresstime = adjustBurnTimeForConfig(Math.max(1, runtimeBoost(tRecipe.mSpecialValue * 2))); this.mEUt = adjustEUtForConfig(getEUt()); - this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease()); + this.mEfficiencyIncrease = this.mMaxProgresstime * getEfficiencyIncrease(); return true; } } @@ -134,17 +134,20 @@ public abstract class GT_MetaTileEntity_LargeBoiler ArrayList tInputList = getStoredInputs(); if (!tInputList.isEmpty()) { for (ItemStack tInput : tInputList) { - if ((GT_Utility.getFluidForFilledItem(tInput, true) == null) && ((this.mMaxProgresstime = GT_ModHandler.getFuelValue(tInput) / 80) > 0)) { - this.excessFuel += GT_ModHandler.getFuelValue(tInput) % 80; - this.mMaxProgresstime += this.excessFuel / 80; - this.excessFuel %= 80; - this.mMaxProgresstime = adjustBurnTimeForConfig(runtimeBoost(this.mMaxProgresstime)); - this.mEUt = adjustEUtForConfig(getEUt()); - this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease()); + if (GT_Utility.getFluidForFilledItem(tInput, true) == null && (this.mMaxProgresstime = GT_ModHandler.getFuelValue(tInput) / 80) > 0) { + this.excessFuel += GT_ModHandler.getFuelValue(tInput) % 80; + this.mMaxProgresstime += this.excessFuel / 80; + this.excessFuel %= 80; + this.mMaxProgresstime = adjustBurnTimeForConfig(runtimeBoost(this.mMaxProgresstime)); + this.mEUt = adjustEUtForConfig(getEUt()); + this.mEfficiencyIncrease = this.mMaxProgresstime * getEfficiencyIncrease(); this.mOutputItems = new ItemStack[]{GT_Utility.getContainerItem(tInput, true)}; tInput.stackSize -= 1; updateSlots(); - if(this.mEfficiencyIncrease>5000){ this.mEfficiencyIncrease=0;this.mSuperEfficencyIncrease=20;} + if (this.mEfficiencyIncrease > 5000) { + this.mEfficiencyIncrease = 0; + this.mSuperEfficencyIncrease = 20; + } return true; } } @@ -158,7 +161,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler public boolean onRunningTick(ItemStack aStack) { if (this.mEUt > 0) { - if(this.mSuperEfficencyIncrease>0)this.mEfficiency = Math.min(10000, this.mEfficiency + this.mSuperEfficencyIncrease); + if (this.mSuperEfficencyIncrease > 0) + this.mEfficiency = Math.min(10000, this.mEfficiency + this.mSuperEfficencyIncrease); int tGeneratedEU = (int) (this.mEUt * 2L * this.mEfficiency / 10000L); if (tGeneratedEU > 0) { long amount = (tGeneratedEU + 160) / 160; @@ -190,7 +194,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler int tFireboxAmount = 0; for (int i = -1; i < 2; i++) { for (int j = -1; j < 2; j++) { - if ((i != 0) || (j != 0)) { + if (i != 0 || j != 0) { for (int k = 1; k <= 4; k++) { if (!addOutputToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, k, zDir + j), getCasingTextureIndex())) { if (aBaseMetaTileEntity.getBlockOffset(xDir + i, k, zDir + j) != getCasingBlock()) { @@ -225,9 +229,9 @@ public abstract class GT_MetaTileEntity_LargeBoiler } for (int i = -1; i < 2; i++) { for (int j = -1; j < 2; j++) { - if ((xDir + i != 0) || (zDir + j != 0)) { + if (xDir + i != 0 || zDir + j != 0) { IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0, zDir + j); - if ((!addMaintenanceToMachineList(tTileEntity, getFireboxTextureIndex())) && (!addInputToMachineList(tTileEntity, getFireboxTextureIndex())) && (!addMufflerToMachineList(tTileEntity, getFireboxTextureIndex()))) { + if (!addMaintenanceToMachineList(tTileEntity, getFireboxTextureIndex()) && !addInputToMachineList(tTileEntity, getFireboxTextureIndex()) && !addMufflerToMachineList(tTileEntity, getFireboxTextureIndex())) { if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j) != getFireboxBlock()) { return false; } @@ -239,7 +243,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler } } } - return (tCasingAmount >= 24) && (tFireboxAmount >= 3); + return tCasingAmount >= 24 && tFireboxAmount >= 3; } public int getMaxEfficiency(ItemStack aStack) { @@ -247,7 +251,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler } public int getPollutionPerTick(ItemStack aStack) { - int adjustedEUOutput = Math.max(25, getEUt() - 25 * integratedCircuitConfig); + int adjustedEUOutput = Math.max(25, getEUt() - 25 * integratedCircuitConfig); return Math.max(1, 12 * adjustedEUOutput / getEUt()); } @@ -258,21 +262,21 @@ public abstract class GT_MetaTileEntity_LargeBoiler public boolean explodesOnComponentBreak(ItemStack aStack) { return false; } - - private int adjustEUtForConfig(int rawEUt){ - int adjustedSteamOutput = rawEUt - 25 * integratedCircuitConfig; - return Math.max(adjustedSteamOutput, 25); + + private int adjustEUtForConfig(int rawEUt) { + int adjustedSteamOutput = rawEUt - 25 * integratedCircuitConfig; + return Math.max(adjustedSteamOutput, 25); } - - private int adjustBurnTimeForConfig(int rawBurnTime){ - if(mEfficiency < 10000){ - return rawBurnTime; - } - int adjustedEUt = Math.max(25, getEUt() - 25 * integratedCircuitConfig); - int adjustedBurnTime = rawBurnTime * getEUt() / adjustedEUt; - this.excessProjectedEU += (getEUt() * rawBurnTime) - (adjustedEUt * adjustedBurnTime); - adjustedBurnTime += this.excessProjectedEU / adjustedEUt; - this.excessProjectedEU %= adjustedEUt; - return adjustedBurnTime; + + private int adjustBurnTimeForConfig(int rawBurnTime) { + if (mEfficiency < 10000) { + return rawBurnTime; + } + int adjustedEUt = Math.max(25, getEUt() - 25 * integratedCircuitConfig); + int adjustedBurnTime = rawBurnTime * getEUt() / adjustedEUt; + this.excessProjectedEU += getEUt() * rawBurnTime - adjustedEUt * adjustedBurnTime; + adjustedBurnTime += this.excessProjectedEU / adjustedEUt; + this.excessProjectedEU %= adjustedEUt; + return adjustedBurnTime; } } \ No newline at end of file diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java index ba3b41adf5..22e9a23843 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java @@ -30,10 +30,10 @@ public class GT_MetaTileEntity_Locker } public String[] getDescription() { - String[] desc = new String[mDescriptionArray.length + 1]; - System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); - desc[mDescriptionArray.length] = "Click with Screwdriver to change Style"; - return desc; + String[] desc = new String[mDescriptionArray.length + 1]; + System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length); + desc[mDescriptionArray.length] = "Click with Screwdriver to change Style"; + return desc; } public ITexture[][][] getTextureSet(ITexture[] aTextures) { -- cgit From 244ef3810efd241766601327a28ea3053d1b2744 Mon Sep 17 00:00:00 2001 From: Technus Date: Thu, 27 Apr 2017 19:03:07 +0200 Subject: Buildable --- src/main/java/gregtech/GT_Mod.java | 7 +- src/main/java/gregtech/api/enums/Materials.java | 113 ++-- src/main/java/gregtech/api/enums/Textures.java | 8 +- .../interfaces/tileentity/IEnergyConnected.java | 2 +- .../api/metatileentity/MetaPipeEntity.java | 2 +- .../api/metatileentity/MetaTileEntity.java | 2 +- .../GT_MetaTileEntity_Hatch_Muffler.java | 2 +- .../GT_MetaTileEntity_MultiBlockBase.java | 4 +- src/main/java/gregtech/api/util/GT_BaseCrop.java | 1 + src/main/java/gregtech/api/util/GT_Recipe.java | 4 +- src/main/java/gregtech/api/util/GT_Utility.java | 2 + src/main/java/gregtech/common/GT_Client.java | 2 +- src/main/java/gregtech/common/GT_Pollution.java | 11 +- src/main/java/gregtech/common/GT_Proxy.java | 14 +- src/main/java/gregtech/common/GT_RecipeAdder.java | 2 +- .../gregtech/common/GT_Worldgen_GT_Ore_Layer.java | 2 +- .../common/GT_Worldgen_GT_Ore_SmallPieces.java | 4 +- .../gregtech/common/items/armor/ArmorData.java | 676 ++++++++++++--------- .../common/items/armor/GuiElectricArmor1.java | 299 --------- .../java/gregtech/common/items/armor/Vector3.java | 11 +- .../items/armor/gui/ContainerModularArmor.java | 2 + .../gregtech/common/items/armor/gui/FluidSync.java | 9 + .../common/items/armor/gui/FluidSync2.java | 10 + .../gregtech/common/items/armor/gui/SlotFluid.java | 7 + .../basic/GT_MetaTileEntity_Disassembler.java | 2 + .../basic/GT_MetaTileEntity_Massfabricator.java | 5 +- .../basic/GT_MetaTileEntity_SeismicProspector.java | 2 +- .../GT_MetaTileEntity_BronzeBlastFurnace.java | 2 +- .../multi/GT_MetaTileEntity_Cleanroom.java | 310 +++++----- .../machines/multi/GT_MetaTileEntity_OilDrill.java | 5 +- .../materialprocessing/ProcessingModSupport.java | 6 +- .../gregtech/loaders/misc/GT_Achievements.java | 53 +- .../loaders/postload/GT_MachineRecipeLoader.java | 1 + .../preload/GT_Loader_MetaTileEntities.java | 34 +- src/main/java/gregtech/nei/NEI_GT_Config.java | 2 +- 35 files changed, 736 insertions(+), 882 deletions(-) delete mode 100644 src/main/java/gregtech/common/items/armor/GuiElectricArmor1.java (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index cbca284574..e0db6c8b36 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -34,7 +34,6 @@ import gregtech.loaders.load.GT_SonictronLoader; import gregtech.loaders.misc.GT_Achievements; import gregtech.loaders.misc.GT_Bees; import gregtech.loaders.misc.GT_CoverLoader; -import gregtech.loaders.misc.OreProcessingConfiguration; import gregtech.loaders.postload.*; import gregtech.loaders.preload.*; import ic2.api.recipe.IRecipeInput; @@ -59,9 +58,7 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; import org.apache.commons.lang3.StringUtils; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.PrintStream; +import java.io.*; import java.util.*; import java.util.Map.Entry; import java.util.regex.Matcher; @@ -434,8 +431,6 @@ public class GT_Mod implements IGT_Mod { new Enchantment_EnderDamage(); new Enchantment_Radioactivity(); - new OreProcessingConfiguration(aEvent.getModConfigurationDirectory()).run(); - new GT_Loader_OreProcessing().run(); new GT_Loader_OreDictionary().run(); new GT_Loader_ItemData().run(); diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index 92559837bc..24a3c86f23 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -146,7 +146,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials TarPitch = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "TarPitch" , "Tar Pitch" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); public static Materials Serpentine = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 |8 , 255, 255, 255, 0, "Serpentine" , "Serpentine" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); public static Materials Flux = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Flux" , "Flux" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials RedstoneAlloy = new Materials( 381, TextureSet.SET_METALLIC , 3.0F, 128, 2, 1|2 |64|128 , 181, 51, 51, 0, "RedstoneAlloy" , "Redstone Alloy" , 0, 0, 500,21000, true, false, 1, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(Redstone, 1), new MaterialStack(Silicon, 1), new MaterialStack(Coal, 1))); +//\/public static Materials RedstoneAlloy = new Materials( 381, TextureSet.SET_METALLIC , 3.0F, 128, 2, 1|2 |64|128 , 181, 51, 51, 0, "RedstoneAlloy" , "Redstone Alloy" , 0, 0, 500,21000, true, false, 1, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(Redstone, 1), new MaterialStack(Silicon, 1), new MaterialStack(Coal, 1))); public static Materials OsmiumTetroxide = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "OsmiumTetroxide" , "Osmium Tetroxide" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); public static Materials NitricAcid = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 255, 255, 255, 0, "NitricAcid" , "Nitric Acid" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); public static Materials RubberTreeSap = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 255, 255, 255, 0, "RubberTreeSap" , "Rubber Tree Sap" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); @@ -157,17 +157,17 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Lumium = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Lumium" , "Lumium" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); public static Materials PhasedIron = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "PhasedIron" , "Phased Iron" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); public static Materials PhasedGold = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "PhasedGold" , "Phased Gold" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Soularium = new Materials( 379, TextureSet.SET_METALLIC , 8.0F, 256, 2, 1|2 |64|128 , 65, 46, 29, 0, "Soularium" , "Soularium" , 0, 0, 800,21000, true, false, 3, 1, 1, Dyes.dyeBrown , 1, Arrays.asList(new MaterialStack(SoulSand, 1), new MaterialStack(Gold, 1), new MaterialStack(Ash, 1))); +//\/public static Materials Soularium = new Materials( 379, TextureSet.SET_METALLIC , 8.0F, 256, 2, 1|2 |64|128 , 65, 46, 29, 0, "Soularium" , "Soularium" , 0, 0, 800,21000, true, false, 3, 1, 1, Dyes.dyeBrown , 1, Arrays.asList(new MaterialStack(SoulSand, 1), new MaterialStack(Gold, 1), new MaterialStack(Ash, 1))); public static Materials HeeEndium = new Materials( 770, TextureSet.SET_DULL , 16.0F, 1024, 4, 1|2 |8 |64|128 , 165, 220, 250, 0, "HeeEndium" , "Endium" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeLightBlue ); public static Materials Prismarine = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |4 , 255, 255, 255, 0, "Prismarine" , "Prismarine" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); public static Materials GraveyardDirt = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "GraveyardDirt" , "Graveyard Dirt" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials DarkSteel = new Materials( 364, TextureSet.SET_METALLIC , 8.0F, 512, 3, 1|2 |64|128 , 80, 70, 80, 0, "DarkSteel" , "Dark Steel" , 0, 0, -1,21800, true, false, 3, 1, 1, Dyes.dyePurple , 1, Arrays.asList(new MaterialStack(ElectricalSteel, 1), new MaterialStack(Coal, 1), new MaterialStack(Obsidian, 1))); +//\/public static Materials DarkSteel = new Materials( 364, TextureSet.SET_METALLIC , 8.0F, 512, 3, 1|2 |64|128 , 80, 70, 80, 0, "DarkSteel" , "Dark Steel" , 0, 0, -1,21800, true, false, 3, 1, 1, Dyes.dyePurple , 1, Arrays.asList(new MaterialStack(ElectricalSteel, 1), new MaterialStack(Coal, 1), new MaterialStack(Obsidian, 1))); public static Materials Terrasteel = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Terrasteel" , "Terrasteel" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials ConductiveIron = new Materials( 369, TextureSet.SET_METALLIC , 6.0F, 256, 3, 1|2 |64|128 , 217, 178, 171, 0, "ConductiveIron" , "Conductive Iron" , 0, 0, -1,21200, true, false, 4, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(RedstoneAlloy, 1), new MaterialStack(Iron, 1), new MaterialStack(Silver, 1))); - public static Materials ElectricalSteel = new Materials( 365, TextureSet.SET_METALLIC , 6.0F, 512, 2, 1|2 |64|128 , 185, 185, 185, 0, "ElectricalSteel" , "Electrical Steel" , 0, 0, 1811,21000, true, false, 4, 1, 1, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Coal, 1), new MaterialStack(Silicon, 1))); - public static Materials EnergeticAlloy = new Materials( 366, TextureSet.SET_METALLIC , 12.0F, 1024, 3, 1|2 |64|128 , 255, 170, 81, 0, "EnergeticAlloy" , "Energetic Alloy" , 0, 0, -1,22200, true, false, 3, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(ConductiveIron, 1), new MaterialStack(Gold, 1), new MaterialStack(BlackSteel, 1))); - public static Materials VibrantAlloy = new Materials( 367, TextureSet.SET_METALLIC , 18.0F, 4048, 4, 1|2 |64|128 , 157, 188, 53, 0, "VibrantAlloy" , "Vibrant Alloy" , 0, 0, 3300,23300, true, false, 4, 1, 1, Dyes.dyeLime , 1, Arrays.asList(new MaterialStack(EnergeticAlloy, 1), new MaterialStack(EnderEye, 1), new MaterialStack(Chrome, 1))); - public static Materials PulsatingIron = new Materials( 378, TextureSet.SET_METALLIC , 6.0F, 256, 3, 1|2 |64|128 , 128, 246, 155, 0, "PulsatingIron" , "Pulsating Iron" , 0, 0, -1,21800, true, false, 4, 1, 1, Dyes.dyeLime , 1, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(EnderPearl, 1), new MaterialStack(RedstoneAlloy, 1))); +//\/public static Materials ConductiveIron = new Materials( 369, TextureSet.SET_METALLIC , 6.0F, 256, 3, 1|2 |64|128 , 217, 178, 171, 0, "ConductiveIron" , "Conductive Iron" , 0, 0, -1,21200, true, false, 4, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(RedstoneAlloy, 1), new MaterialStack(Iron, 1), new MaterialStack(Silver, 1))); +//\/public static Materials ElectricalSteel = new Materials( 365, TextureSet.SET_METALLIC , 6.0F, 512, 2, 1|2 |64|128 , 185, 185, 185, 0, "ElectricalSteel" , "Electrical Steel" , 0, 0, 1811,21000, true, false, 4, 1, 1, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Coal, 1), new MaterialStack(Silicon, 1))); +//\/public static Materials EnergeticAlloy = new Materials( 366, TextureSet.SET_METALLIC , 12.0F, 1024, 3, 1|2 |64|128 , 255, 170, 81, 0, "EnergeticAlloy" , "Energetic Alloy" , 0, 0, -1,22200, true, false, 3, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(ConductiveIron, 1), new MaterialStack(Gold, 1), new MaterialStack(BlackSteel, 1))); +//\/public static Materials VibrantAlloy = new Materials( 367, TextureSet.SET_METALLIC , 18.0F, 4048, 4, 1|2 |64|128 , 157, 188, 53, 0, "VibrantAlloy" , "Vibrant Alloy" , 0, 0, 3300,23300, true, false, 4, 1, 1, Dyes.dyeLime , 1, Arrays.asList(new MaterialStack(EnergeticAlloy, 1), new MaterialStack(EnderEye, 1), new MaterialStack(Chrome, 1))); +//\/public static Materials PulsatingIron = new Materials( 378, TextureSet.SET_METALLIC , 6.0F, 256, 3, 1|2 |64|128 , 128, 246, 155, 0, "PulsatingIron" , "Pulsating Iron" , 0, 0, -1,21800, true, false, 4, 1, 1, Dyes.dyeLime , 1, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(EnderPearl, 1), new MaterialStack(RedstoneAlloy, 1))); public static Materials Teslatite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 60, 180, 200, 0, "Teslatite" , "Teslatite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); public static Materials Fluix = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |4 , 255, 255, 255, 0, "Fluix" , "Fluix" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); public static Materials Manasteel = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Manasteel" , "Manasteel" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); @@ -242,7 +242,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Eclogite = new Materials( 860, TextureSet.SET_DULL , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Eclogite" , "Eclogite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); public static Materials ElectrumFlux = new Materials( 320, TextureSet.SET_SHINY , 16.0F, 512, 3, 1|2 |64 , 255, 255, 120, 0, "ElectrumFlux" , "Fluxed Electrum" , 0, 0, 9000,29000, true, false, 1, 1, 1, Dyes.dyeYellow ); public static Materials Emery = new Materials( 861, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 255, 255, 255, 0, "Emery" , "Emery" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Enderium = new Materials( 321, TextureSet.SET_DULL , 8.0F, 1500, 3, 1|2 |64|128 , 89, 145, 135, 0, "Enderium" , "Enderium" , 0, 0, 4500,24500, true, false, 1, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(EnderiumBase, 2), new MaterialStack(Thaumium, 1), new MaterialStack(EnderPearl, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ALIENIS, 1))); +//\/public static Materials Enderium = new Materials( 321, TextureSet.SET_DULL , 8.0F, 1500, 3, 1|2 |64|128 , 89, 145, 135, 0, "Enderium" , "Enderium" , 0, 0, 4500,24500, true, false, 1, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(EnderiumBase, 2), new MaterialStack(Thaumium, 1), new MaterialStack(EnderPearl, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ALIENIS, 1))); public static Materials EnderiumBase = new Materials( 380, TextureSet.SET_DULL , 16.0F, 768, 4, 1|2 |64|128 , 72, 119, 153, 0, "EnderiumBase" , "Enderium Base" , 0, 0, 3600,23600, true, false, 1, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(Tin, 2), new MaterialStack(Silver, 1), new MaterialStack(Platinum, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ALIENIS, 1))); public static Materials Energized = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 255, 255, 255, 0, "Energized" , "Energized" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); public static Materials Epidote = new Materials( 862, TextureSet.SET_DULL , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Epidote" , "Epidote" , 0, 0, -1, 0, false, false, 0, 1, 1, Dyes._NULL ); @@ -430,7 +430,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Almandine = new Materials( 820, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 |8 , 255, 0, 0, 0, "Almandine" , "Almandine" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Iron, 3), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12))); public static Materials Andradite = new Materials( 821, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 |8 , 150, 120, 0, 0, "Andradite" , "Andradite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeYellow , 1, Arrays.asList(new MaterialStack(Calcium, 3), new MaterialStack(Iron, 2), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12))); public static Materials AnnealedCopper = new Materials( 345, TextureSet.SET_SHINY , 1.0F, 0, 2, 1|2 |128 , 255, 120, 20, 0, "AnnealedCopper" , "Annealed Copper" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Copper, 1))); - public static Materials Asbestos = new Materials( 946, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 230, 230, 230, 0, "Asbestos" , "Asbestos" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Magnesium, 3), new MaterialStack(Silicon, 2), new MaterialStack(Hydrogen, 4), new MaterialStack(Oxygen, 9))), // Mg3Si2O5(OH)4 + public static Materials Asbestos = new Materials( 946, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 230, 230, 230, 0, "Asbestos" , "Asbestos" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Magnesium, 3), new MaterialStack(Silicon, 2), new MaterialStack(Hydrogen, 4), new MaterialStack(Oxygen, 9))); // Mg3Si2O5(OH)4 public static Materials Ash = new Materials( 815, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 150, 150, 150, 0, "Ash" , "Ashes" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , 2, Arrays.asList(new MaterialStack(Carbon, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.PERDITIO, 1))); public static Materials BandedIron = new Materials( 917, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 145, 90, 90, 0, "BandedIron" , "Banded Iron" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown , 1, Arrays.asList(new MaterialStack(Iron, 2), new MaterialStack(Oxygen, 3))); public static Materials BatteryAlloy = new Materials( 315, TextureSet.SET_DULL , 1.0F, 0, 1, 1|2 , 156, 124, 160, 0, "BatteryAlloy" , "Battery Alloy" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePurple , 2, Arrays.asList(new MaterialStack(Lead, 4), new MaterialStack(Antimony, 1))); @@ -438,7 +438,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Bone = new Materials( 806, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 250, 250, 250, 0, "Bone" , "Bone" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 0, Arrays.asList(new MaterialStack(Calcium, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.MORTUUS, 2), new TC_AspectStack(TC_Aspects.CORPUS, 1))); public static Materials Brass = new Materials( 301, TextureSet.SET_METALLIC , 7.0F, 96, 1, 1|2 |64|128 , 255, 180, 0, 0, "Brass" , "Brass" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Zinc, 1), new MaterialStack(Copper, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))); public static Materials Bronze = new Materials( 300, TextureSet.SET_METALLIC , 6.0F, 192, 2, 1|2 |64|128 , 255, 128, 0, 0, "Bronze" , "Bronze" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Tin, 1), new MaterialStack(Copper, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))); - public static Materials BrownLimonite = new Materials( 930, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8 , 200, 100, 0, 0, "BrownLimonite" , "Brown Limonite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown , 2, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Hydrogen, 1), new MaterialStack(Oxygen, 2))), // FeO(OH) + public static Materials BrownLimonite = new Materials( 930, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8 , 200, 100, 0, 0, "BrownLimonite" , "Brown Limonite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown , 2, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Hydrogen, 1), new MaterialStack(Oxygen, 2))); // FeO(OH) public static Materials Calcite = new Materials( 823, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 250, 230, 220, 0, "Calcite" , "Calcite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 3))); public static Materials Cassiterite = new Materials( 824, TextureSet.SET_METALLIC , 1.0F, 0, 1, 8 , 220, 220, 220, 0, "Cassiterite" , "Cassiterite" , 0, 0, -1, 0, false, false, 4, 3, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Tin, 1), new MaterialStack(Oxygen, 2))); public static Materials CassiteriteSand = new Materials( 937, TextureSet.SET_SAND , 1.0F, 0, 1, 8 , 220, 220, 220, 0, "CassiteriteSand" , "Cassiterite Sand" , 0, 0, -1, 0, false, false, 4, 3, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Tin, 1), new MaterialStack(Oxygen, 2))); @@ -479,9 +479,9 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Magnalium = new Materials( 313, TextureSet.SET_DULL , 6.0F, 256, 2, 1|2 |64|128 , 200, 190, 255, 0, "Magnalium" , "Magnalium" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Aluminium, 2))); public static Materials Magnesite = new Materials( 908, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 250, 250, 180, 0, "Magnesite" , "Magnesite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePink , 1, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 3))); public static Materials Magnetite = new Materials( 870, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 30, 30, 30, 0, "Magnetite" , "Magnetite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Iron, 3), new MaterialStack(Oxygen, 4)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); - public static Materials Molybdenite = new Materials( 942, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 25, 25, 25, 0, "Molybdenite" , "Molybdenite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlue , 1, Arrays.asList(new MaterialStack(Molybdenum, 1), new MaterialStack(Sulfur, 2))), // MoS2 (also source of Re) + public static Materials Molybdenite = new Materials( 942, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 25, 25, 25, 0, "Molybdenite" , "Molybdenite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlue , 1, Arrays.asList(new MaterialStack(Molybdenum, 1), new MaterialStack(Sulfur, 2))); // MoS2 (also source of Re) public static Materials Nichrome = new Materials( 311, TextureSet.SET_METALLIC , 6.0F, 64, 2, 1|2 |64 , 205, 206, 246, 0, "Nichrome" , "Nichrome" , 0, 0, 2700,22700, true, false, 1, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Nickel, 4), new MaterialStack(Chrome, 1))); - public static Materials NiobiumNitride = new Materials( 359, TextureSet.SET_DULL , 1.0F, 0, 2, 1|2 , 29, 41, 29, 0, "NiobiumNitride" , "Niobium Nitride" , 0, 0, 2573, 2573, true, false, 1, 1, 1, Dyes.dyeBlack , 1, Arrays.asList(new MaterialStack(Niobium, 1), new MaterialStack(Nitrogen, 1))), // Anti-Reflective Material + public static Materials NiobiumNitride = new Materials( 359, TextureSet.SET_DULL , 1.0F, 0, 2, 1|2 , 29, 41, 29, 0, "NiobiumNitride" , "Niobium Nitride" , 0, 0, 2573, 2573, true, false, 1, 1, 1, Dyes.dyeBlack , 1, Arrays.asList(new MaterialStack(Niobium, 1), new MaterialStack(Nitrogen, 1))); // Anti-Reflective Material public static Materials NiobiumTitanium = new Materials( 360, TextureSet.SET_DULL , 1.0F, 0, 2, 1|2 , 29, 29, 41, 0, "NiobiumTitanium" , "Niobium-Titanium" , 0, 0, 4500,24500, true, false, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Niobium, 1), new MaterialStack(Titanium, 1))); public static Materials NitroCarbon = new Materials( 716, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 0, 75, 100, 0, "NitroCarbon" , "Nitro-Carbon" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeCyan , 1, Arrays.asList(new MaterialStack(Nitrogen, 1), new MaterialStack(Carbon, 1))); public static Materials NitrogenDioxide = new Materials( 717, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 100, 175, 255, 0, "NitrogenDioxide" , "Nitrogen Dioxide" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeCyan , 1, Arrays.asList(new MaterialStack(Nitrogen, 1), new MaterialStack(Oxygen, 2))); @@ -541,18 +541,18 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Stibnite = new Materials( 945, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 70, 70, 70, 0, "Stibnite" , "Stibnite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Antimony, 2), new MaterialStack(Sulfur, 3))); public static Materials SulfuricAcid = new Materials( 720, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 255, 128, 0, 0, "SulfuricAcid" , "Sulfuric Acid" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Sulfur, 1), new MaterialStack(Oxygen, 4))); public static Materials Tanzanite = new Materials( 508, TextureSet.SET_GEM_VERTICAL , 7.0F, 256, 2, 1 |4|8 |64 , 64, 0, 200, 127, "Tanzanite" , "Tanzanite" , 0, 0, -1, 0, false, true, 5, 1, 1, Dyes.dyePurple , 1, Arrays.asList(new MaterialStack(Calcium, 2), new MaterialStack(Aluminium, 3), new MaterialStack(Silicon, 3), new MaterialStack(Hydrogen, 1), new MaterialStack(Oxygen, 13)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 5), new TC_AspectStack(TC_Aspects.VITREUS, 3))); - public static Materials Tetrahedrite = new Materials( 840, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 200, 32, 0, 0, "Tetrahedrite" , "Tetrahedrite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Copper, 3), new MaterialStack(Antimony, 1), new MaterialStack(Sulfur, 3), new MaterialStack(Iron, 1))), //Cu3SbS3 + x(Fe,Zn)6Sb2S9 + public static Materials Tetrahedrite = new Materials( 840, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 200, 32, 0, 0, "Tetrahedrite" , "Tetrahedrite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Copper, 3), new MaterialStack(Antimony, 1), new MaterialStack(Sulfur, 3), new MaterialStack(Iron, 1))); //Cu3SbS3 + x(Fe,Zn)6Sb2S9 public static Materials TinAlloy = new Materials( 363, TextureSet.SET_METALLIC , 6.5F, 96, 2, 1|2 |64|128 , 200, 200, 200, 0, "TinAlloy" , "Tin Alloy" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Tin, 1), new MaterialStack(Iron, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))); public static Materials Topaz = new Materials( 507, TextureSet.SET_GEM_HORIZONTAL , 7.0F, 256, 3, 1 |4|8 |64 , 255, 128, 0, 127, "Topaz" , "Topaz" , 0, 0, -1, 0, false, true, 5, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 1), new MaterialStack(Fluorine, 2), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 6)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 6), new TC_AspectStack(TC_Aspects.VITREUS, 4))); public static Materials Tungstate = new Materials( 841, TextureSet.SET_DULL , 1.0F, 0, 3, 1 |8 , 55, 50, 35, 0, "Tungstate" , "Tungstate" , 0, 0, 2500, 2500, true, false, 4, 1, 1, Dyes.dyeBlack , 0, Arrays.asList(new MaterialStack(Tungsten, 1), new MaterialStack(Lithium, 2), new MaterialStack(Oxygen, 4))); - public static Materials Ultimet = new Materials( 344, TextureSet.SET_SHINY , 9.0F, 2048, 4, 1|2 |64|128 , 180, 180, 230, 0, "Ultimet" , "Ultimet" , 0, 0, 2700, 2700, true, false, 1, 1, 1, Dyes.dyeLightBlue , 1, Arrays.asList(new MaterialStack(Cobalt, 5), new MaterialStack(Chrome, 2), new MaterialStack(Nickel, 1), new MaterialStack(Molybdenum, 1))), // 54% Cobalt, 26% Chromium, 9% Nickel, 5% Molybdenum, 3% Iron, 2% Tungsten, 0.8% Manganese, 0.3% Silicon, 0.08% Nitrogen and 0.06% Carbon + public static Materials Ultimet = new Materials( 344, TextureSet.SET_SHINY , 9.0F, 2048, 4, 1|2 |64|128 , 180, 180, 230, 0, "Ultimet" , "Ultimet" , 0, 0, 2700, 2700, true, false, 1, 1, 1, Dyes.dyeLightBlue , 1, Arrays.asList(new MaterialStack(Cobalt, 5), new MaterialStack(Chrome, 2), new MaterialStack(Nickel, 1), new MaterialStack(Molybdenum, 1))); // 54% Cobalt, 26% Chromium, 9% Nickel, 5% Molybdenum, 3% Iron, 2% Tungsten, 0.8% Manganese, 0.3% Silicon, 0.08% Nitrogen and 0.06% Carbon public static Materials Uraninite = new Materials( 922, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1 |8 , 35, 35, 35, 0, "Uraninite" , "Uraninite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLime , 2, Arrays.asList(new MaterialStack(Uranium, 1), new MaterialStack(Oxygen, 2))); public static Materials Uvarovite = new Materials( 842, TextureSet.SET_DIAMOND , 1.0F, 0, 2, 1 |8 , 180, 255, 180, 0, "Uvarovite" , "Uvarovite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(Calcium, 3), new MaterialStack(Chrome, 2), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12))); public static Materials VanadiumGallium = new Materials( 357, TextureSet.SET_SHINY , 1.0F, 0, 2, 1|2 , 128, 128, 140, 0, "VanadiumGallium" , "Vanadium-Gallium" , 0, 0, 4500,24500, true, false, 1, 1, 1, Dyes.dyeGray , 2, Arrays.asList(new MaterialStack(Vanadium, 3), new MaterialStack(Gallium, 1))); public static Materials Wood = new Materials( 809, TextureSet.SET_WOOD , 2.0F, 16, 0, 1|2 |64|128 , 100, 50, 0, 0, "Wood" , "Wood" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown , 0, Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 1), new MaterialStack(Hydrogen, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.ARBOR, 2))); public static Materials WroughtIron = new Materials( 304, TextureSet.SET_METALLIC , 6.0F, 384, 2, 1|2 |64|128 , 200, 180, 180, 0, "WroughtIron" , "Wrought Iron" , 0, 0, 1811, 0, false, false, 3, 1, 1, Dyes.dyeLightGray , 2, Arrays.asList(new MaterialStack(Iron, 1))); public static Materials Wulfenite = new Materials( 882, TextureSet.SET_DULL , 1.0F, 0, 3, 1 |8 , 255, 128, 0, 0, "Wulfenite" , "Wulfenite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Lead, 1), new MaterialStack(Molybdenum, 1), new MaterialStack(Oxygen, 4))); - public static Materials YellowLimonite = new Materials( 931, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 200, 200, 0, 0, "YellowLimonite" , "Yellow Limonite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Hydrogen, 1), new MaterialStack(Oxygen, 2))), // FeO(OH) + a bit Ni and Co + public static Materials YellowLimonite = new Materials( 931, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 200, 200, 0, 0, "YellowLimonite" , "Yellow Limonite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Hydrogen, 1), new MaterialStack(Oxygen, 2))); // FeO(OH) + a bit Ni and Co public static Materials YttriumBariumCuprate = new Materials( 358, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 , 80, 64, 70, 0, "YttriumBariumCuprate" , "Yttrium Barium Cuprate" , 0, 0, 4500, 4500, true, false, 1, 1, 1, Dyes.dyeGray , 0, Arrays.asList(new MaterialStack(Yttrium, 1), new MaterialStack(Barium, 2), new MaterialStack(Copper, 3), new MaterialStack(Oxygen, 7))); /** @@ -582,8 +582,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Apatite = new Materials( 530, TextureSet.SET_DIAMOND , 1.0F, 0, 1, 1 |4|8 , 200, 200, 255, 0, "Apatite" , "Apatite" , 0, 0, -1, 0, false, false, 2, 1, 1, Dyes.dyeCyan , 1, Arrays.asList(new MaterialStack(Calcium, 5), new MaterialStack(Phosphate, 3), new MaterialStack(Chlorine, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.MESSIS, 2))); public static Materials Alumite = new Materials( -1, TextureSet.SET_METALLIC , 1.5F, 64, 0, 1|2 |64 , 255, 255, 255, 0, "Alumite" , "Alumite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePink , 2, Arrays.asList(new MaterialStack(Aluminium, 5), new MaterialStack(Iron, 2), new MaterialStack(Obsidian, 2)), Arrays.asList(new TC_AspectStack(TC_Aspects.STRONTIO, 2))); public static Materials Manyullyn = new Materials( 386, TextureSet.SET_SHINY , 25.0F, 2048, 5, 1|2 |8 |64|128 , 154, 76, 185, 0, "Manyullyn" , "Manyullyn" , 0, 0, 3600,23600, true, false, 1, 1, 1, Dyes.dyePurple , 2, Arrays.asList(new MaterialStack(Cobalt, 1), new MaterialStack(Ardite, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.STRONTIO, 2))); - public static Materials ShadowIron = new Materials( 336, TextureSet.SET_METALLIC , 6.0F, 384, 3, 1|2 |8 |64 , 120, 120, 120, 0, "ShadowIron" , "Shadowiron" , 0, 0, -1, 0, false, false, 3, 4, 3, Dyes.dyeBlack , 3, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Thaumium, 3))); - public static Materials ShadowSteel = new Materials( 337, TextureSet.SET_METALLIC , 6.0F, 768, 4, 1|2 |64 , 90, 90, 90, 0, "ShadowSteel" , "Shadowsteel" , 0, 0, -1, 1700, true, false, 4, 4, 3, Dyes.dyeBlack , 3, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Thaumium, 3))); +//\/public static Materials ShadowIron = new Materials( 336, TextureSet.SET_METALLIC , 6.0F, 384, 3, 1|2 |8 |64 , 120, 120, 120, 0, "ShadowIron" , "Shadowiron" , 0, 0, -1, 0, false, false, 3, 4, 3, Dyes.dyeBlack , 3, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Thaumium, 3))); +//\/public static Materials ShadowSteel = new Materials( 337, TextureSet.SET_METALLIC , 6.0F, 768, 4, 1|2 |64 , 90, 90, 90, 0, "ShadowSteel" , "Shadowsteel" , 0, 0, -1, 1700, true, false, 4, 4, 3, Dyes.dyeBlack , 3, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Thaumium, 3))); public static Materials Steeleaf = new Materials( 339, TextureSet.SET_LEAF , 8.0F, 768, 3, 1|2 |64|128 , 50, 127, 50, 0, "Steeleaf" , "Steeleaf" , 5, 24, -1, 0, false, false, 4, 1, 1, Dyes.dyeGreen , 2, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.HERBA, 2), new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))); public static Materials Knightmetal = new Materials( 362, TextureSet.SET_METALLIC , 8.0F, 1024, 3, 1|2 |64|128 , 210, 240, 200, 0, "Knightmetal" , "Knightmetal" , 5, 24, -1, 0, false, false, 4, 1, 1, Dyes.dyeLime , 2, Arrays.asList(new MaterialStack(Steel, 2), new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 1), new TC_AspectStack(TC_Aspects.METALLUM, 2))); public static Materials SterlingSilver = new Materials( 350, TextureSet.SET_SHINY , 13.0F, 128, 2, 1|2 |64|128 , 250, 220, 225, 0, "SterlingSilver" , "Sterling Silver" , 0, 0, -1, 1700, true, false, 4, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Copper, 1), new MaterialStack(Silver, 4))); @@ -597,10 +597,10 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials TungstenSteel = new Materials( 316, TextureSet.SET_METALLIC , 8.0F, 2560, 4, 1|2 |64|128 , 100, 100, 160, 0, "TungstenSteel" , "Tungstensteel" , 0, 0, -1,23000, true, false, 4, 1, 1, Dyes.dyeBlue , 2, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Tungsten, 1))); public static Materials NitroCoalFuel = new Materials( -1, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 50, 70, 50, 0, "NitroCoalFuel" , "Nitro-Coalfuel" , 0, 48, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 0, Arrays.asList(new MaterialStack(Glyceryl, 1), new MaterialStack(CoalFuel, 4))); public static Materials NitroFuel = new Materials( 709, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 200, 255, 0, 0, "NitroFuel" , "Nitro-Diesel" , 0, 720, -1, 0, false, false, 1, 1, 1, Dyes.dyeLime , 0, Arrays.asList(new MaterialStack(Glyceryl, 1), new MaterialStack(Fuel, 4))); - public static Materials AstralSilver = new Materials( 333, TextureSet.SET_SHINY , 10.0F, 64, 2, 1|2 |64 , 230, 230, 255, 0, "AstralSilver" , "Astral Silver" , 0, 0, -1, 0, false, false, 4, 3, 2, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Silver, 2), new MaterialStack(Thaumium, 1))); +//\/public static Materials AstralSilver = new Materials( 333, TextureSet.SET_SHINY , 10.0F, 64, 2, 1|2 |64 , 230, 230, 255, 0, "AstralSilver" , "Astral Silver" , 0, 0, -1, 0, false, false, 4, 3, 2, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Silver, 2), new MaterialStack(Thaumium, 1))); ////public static Materials Midasium = new Materials( 332, TextureSet.SET_SHINY , 12.0F, 64, 2, 1|2 |8 |64 , 255, 200, 40, 0, "Midasium" , "Midasium" , 0, 0, -1, 0, false, false, 4, 3, 2, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Gold, 2), new MaterialStack(Thaumium, 1))); - public static Materials Mithril = new Materials( 331, TextureSet.SET_SHINY , 14.0F, 64, 3, 1|2 |8 |64 , 255, 255, 210, 0, "Mithril" , "Mithril" , 0, 0, -1, 0, false, false, 4, 3, 2, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Platinum, 2), new MaterialStack(Thaumium, 1))); - public static Materials BlueAlloy = new Materials( 309, TextureSet.SET_DULL , 1.0F, 0, 0, 1|2 , 100, 180, 255, 0, "BlueAlloy" , "Blue Alloy" , 0, 0, -1, 0, false, false, 3, 5, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Silver, 1), new MaterialStack(Electrotine, 4)), Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 3))); +//\/public static Materials Mithril = new Materials( 331, TextureSet.SET_SHINY , 14.0F, 64, 3, 1|2 |8 |64 , 255, 255, 210, 0, "Mithril" , "Mithril" , 0, 0, -1, 0, false, false, 4, 3, 2, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Platinum, 2), new MaterialStack(Thaumium, 1))); +//\/public static Materials BlueAlloy = new Materials( 309, TextureSet.SET_DULL , 1.0F, 0, 0, 1|2 , 100, 180, 255, 0, "BlueAlloy" , "Blue Alloy" , 0, 0, -1, 0, false, false, 3, 5, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Silver, 1), new MaterialStack(Electrotine, 4)), Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 3))); public static Materials RedAlloy = new Materials( 308, TextureSet.SET_DULL , 1.0F, 0, 0, 1|2 , 200, 0, 0, 0, "RedAlloy" , "Red Alloy" , 0, 0, -1, 0, false, false, 3, 5, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Copper, 1), new MaterialStack(Redstone, 4)), Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 3))); public static Materials CobaltBrass = new Materials( 343, TextureSet.SET_METALLIC , 8.0F, 256, 2, 1|2 |64|128 , 180, 180, 160, 0, "CobaltBrass" , "Cobalt Brass" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Brass, 7), new MaterialStack(Aluminium, 1), new MaterialStack(Cobalt, 1))); public static Materials Phosphorus = new Materials( 534, TextureSet.SET_FLINT , 1.0F, 0, 2, 1 |4|8|16 , 255, 255, 0, 0, "Phosphorus" , "Phosphorus" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Calcium, 3), new MaterialStack(Phosphate, 2))); @@ -619,38 +619,38 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials GraniteRed = new Materials( 850, TextureSet.SET_ROUGH , 4.0F, 64, 3, 1 |64|128 , 255, 0, 128, 0, "GraniteRed" , "Red Granite" , 0, 0, -1, 0, false, false, 0, 1, 1, Dyes.dyeMagenta , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(PotassiumFeldspar, 1), new MaterialStack(Oxygen, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.TUTAMEN, 1))); public static Materials Chrysotile = new Materials( 912, TextureSet.SET_DULL , 1.0F, 0, 2, 1|2 |8 |64|128 , 110, 140, 110, 0, "Chrysotile" , "Chrysotile" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Asbestos, 1))); public static Materials Realgar = new Materials( 913, TextureSet.SET_DULL , 1.0F, 32, 1, 1|2 |8 |64|128 , 140, 100, 100, 0, "Realgar" , "Realgar" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Arsenic, 4), new MaterialStack(Sulfur,4))); - public static Materials VanadiumMagnetite = new Materials( 923, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 35, 35, 60, 0, "VanadiumMagnetite" , "Vanadium Magnetite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Magnetite, 1), new MaterialStack(Vanadium, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))), // Mixture of Fe3O4 and V2O5 + public static Materials VanadiumMagnetite = new Materials( 923, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 35, 35, 60, 0, "VanadiumMagnetite" , "Vanadium Magnetite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Magnetite, 1), new MaterialStack(Vanadium, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); // Mixture of Fe3O4 and V2O5 public static Materials BasalticMineralSand = new Materials( 935, TextureSet.SET_SAND , 1.0F, 0, 1, 1 |8 , 40, 50, 40, 0, "BasalticMineralSand" , "Basaltic Mineral Sand" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Magnetite, 1), new MaterialStack(Basalt, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); public static Materials GraniticMineralSand = new Materials( 936, TextureSet.SET_SAND , 1.0F, 0, 1, 1 |8 , 40, 60, 60, 0, "GraniticMineralSand" , "Granitic Mineral Sand" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Magnetite, 1), new MaterialStack(GraniteBlack, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); public static Materials GarnetSand = new Materials( 938, TextureSet.SET_SAND , 1.0F, 0, 1, 1 |8 , 200, 100, 0, 0, "GarnetSand" , "Garnet Sand" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(GarnetRed, 1), new MaterialStack(GarnetYellow, 1))); public static Materials QuartzSand = new Materials( 939, TextureSet.SET_SAND , 1.0F, 0, 1, 1 |8 , 200, 200, 200, 0, "QuartzSand" , "Quartz Sand" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(CertusQuartz, 1), new MaterialStack(Quartzite, 1))); - public static Materials Bastnasite = new Materials( 905, TextureSet.SET_FINE , 1.0F, 0, 2, 1 |8 , 200, 110, 45, 0, "Bastnasite" , "Bastnasite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Cerium, 1), new MaterialStack(Carbon, 1), new MaterialStack(Fluorine, 1), new MaterialStack(Oxygen, 3))), // (Ce, La, Y)CO3F - public static Materials Pentlandite = new Materials( 909, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 165, 150, 5, 0, "Pentlandite" , "Pentlandite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Nickel, 9), new MaterialStack(Sulfur, 8))), // (Fe,Ni)9S8 - public static Materials Spodumene = new Materials( 920, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 190, 170, 170, 0, "Spodumene" , "Spodumene" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Lithium, 1), new MaterialStack(Aluminium, 1), new MaterialStack(Silicon, 2), new MaterialStack(Oxygen, 6))), // LiAl(SiO3)2 - public static Materials Pollucite = new Materials( 919, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 210, 210, 0, "Pollucite" , "Pollucite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Caesium, 2), new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 4), new MaterialStack(Water, 2), new MaterialStack(Oxygen, 12))), // (Cs,Na)2Al2Si4O12 2H2O (also a source of Rb) - public static Materials Tantalite = new Materials( 921, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1 |8 , 145, 80, 40, 0, "Tantalite" , "Tantalite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Manganese, 1), new MaterialStack(Tantalum, 2), new MaterialStack(Oxygen, 6))), // (Fe, Mn)Ta2O6 (also source of Nb) - public static Materials Lepidolite = new Materials( 907, TextureSet.SET_FINE , 1.0F, 0, 2, 1 |8 , 240, 50, 140, 0, "Lepidolite" , "Lepidolite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Lithium, 3), new MaterialStack(Aluminium, 4), new MaterialStack(Fluorine, 2), new MaterialStack(Oxygen, 10))), // K(Li,Al,Rb)3(Al,Si)4O10(F,OH)2 - public static Materials Glauconite = new Materials( 933, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 130, 180, 60, 0, "Glauconite" , "Glauconite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Magnesium, 2), new MaterialStack(Aluminium, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))), // (K,Na)(Fe3+,Al,Mg)2(Si,Al)4O10(OH)2 - public static Materials GlauconiteSand = new Materials( 949, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 130, 180, 60, 0, "GlauconiteSand" , "Glauconite Sand" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Magnesium, 2), new MaterialStack(Aluminium, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))), // (K,Na)(Fe3+,Al,Mg)2(Si,Al)4O10(OH)2 - public static Materials Vermiculite = new Materials( 932, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 200, 180, 15, 0, "Vermiculite" , "Vermiculite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Iron, 3), new MaterialStack(Aluminium, 4), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Water, 4), new MaterialStack(Oxygen, 12))), // (Mg+2, Fe+2, Fe+3)3 [(AlSi)4O10] (OH)2 4H2O) - public static Materials Bentonite = new Materials( 927, TextureSet.SET_ROUGH , 1.0F, 0, 2, 1 |8 , 245, 215, 210, 0, "Bentonite" , "Bentonite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 1), new MaterialStack(Magnesium, 6), new MaterialStack(Silicon, 12), new MaterialStack(Hydrogen, 6), new MaterialStack(Water, 5), new MaterialStack(Oxygen, 36))), // (Na,Ca)0.33(Al,Mg)2(Si4O10)(OH)2 nH2O - public static Materials FullersEarth = new Materials( 928, TextureSet.SET_FINE , 1.0F, 0, 2, 1 |8 , 160, 160, 120, 0, "FullersEarth" , "Fullers Earth" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 1), new MaterialStack(Water, 4), new MaterialStack(Oxygen, 11))), // (Mg,Al)2Si4O10(OH) 4(H2O) + public static Materials Bastnasite = new Materials( 905, TextureSet.SET_FINE , 1.0F, 0, 2, 1 |8 , 200, 110, 45, 0, "Bastnasite" , "Bastnasite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Cerium, 1), new MaterialStack(Carbon, 1), new MaterialStack(Fluorine, 1), new MaterialStack(Oxygen, 3))); // (Ce, La, Y)CO3F + public static Materials Pentlandite = new Materials( 909, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 165, 150, 5, 0, "Pentlandite" , "Pentlandite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Nickel, 9), new MaterialStack(Sulfur, 8))); // (Fe,Ni)9S8 + public static Materials Spodumene = new Materials( 920, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 190, 170, 170, 0, "Spodumene" , "Spodumene" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Lithium, 1), new MaterialStack(Aluminium, 1), new MaterialStack(Silicon, 2), new MaterialStack(Oxygen, 6))); // LiAl(SiO3)2 + public static Materials Pollucite = new Materials( 919, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 210, 210, 0, "Pollucite" , "Pollucite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Caesium, 2), new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 4), new MaterialStack(Water, 2), new MaterialStack(Oxygen, 12))); // (Cs,Na)2Al2Si4O12 2H2O (also a source of Rb) + public static Materials Tantalite = new Materials( 921, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1 |8 , 145, 80, 40, 0, "Tantalite" , "Tantalite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Manganese, 1), new MaterialStack(Tantalum, 2), new MaterialStack(Oxygen, 6))); // (Fe, Mn)Ta2O6 (also source of Nb) + public static Materials Lepidolite = new Materials( 907, TextureSet.SET_FINE , 1.0F, 0, 2, 1 |8 , 240, 50, 140, 0, "Lepidolite" , "Lepidolite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Lithium, 3), new MaterialStack(Aluminium, 4), new MaterialStack(Fluorine, 2), new MaterialStack(Oxygen, 10))); // K(Li,Al,Rb)3(Al,Si)4O10(F,OH)2 + public static Materials Glauconite = new Materials( 933, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 130, 180, 60, 0, "Glauconite" , "Glauconite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Magnesium, 2), new MaterialStack(Aluminium, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))); // (K,Na)(Fe3+,Al,Mg)2(Si,Al)4O10(OH)2 + public static Materials GlauconiteSand = new Materials( 949, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 130, 180, 60, 0, "GlauconiteSand" , "Glauconite Sand" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Magnesium, 2), new MaterialStack(Aluminium, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))); // (K,Na)(Fe3+,Al,Mg)2(Si,Al)4O10(OH)2 + public static Materials Vermiculite = new Materials( 932, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 200, 180, 15, 0, "Vermiculite" , "Vermiculite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Iron, 3), new MaterialStack(Aluminium, 4), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Water, 4), new MaterialStack(Oxygen, 12))); // (Mg+2, Fe+2, Fe+3)3 [(AlSi)4O10] (OH)2 4H2O) + public static Materials Bentonite = new Materials( 927, TextureSet.SET_ROUGH , 1.0F, 0, 2, 1 |8 , 245, 215, 210, 0, "Bentonite" , "Bentonite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 1), new MaterialStack(Magnesium, 6), new MaterialStack(Silicon, 12), new MaterialStack(Hydrogen, 6), new MaterialStack(Water, 5), new MaterialStack(Oxygen, 36))); // (Na,Ca)0.33(Al,Mg)2(Si4O10)(OH)2 nH2O + public static Materials FullersEarth = new Materials( 928, TextureSet.SET_FINE , 1.0F, 0, 2, 1 |8 , 160, 160, 120, 0, "FullersEarth" , "Fullers Earth" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 1), new MaterialStack(Water, 4), new MaterialStack(Oxygen, 11))); // (Mg,Al)2Si4O10(OH) 4(H2O) public static Materials Pitchblende = new Materials( 873, TextureSet.SET_DULL , 1.0F, 0, 3, 1 |8 , 200, 210, 0, 0, "Pitchblende" , "Pitchblende" , 0, 0, -1, 0, false, false, 5, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Uraninite, 3), new MaterialStack(Thorium, 1), new MaterialStack(Lead, 1))); - public static Materials Monazite = new Materials( 520, TextureSet.SET_DIAMOND , 1.0F, 0, 1, 1 |4|8 , 50, 70, 50, 0, "Monazite" , "Monazite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(RareEarth, 1), new MaterialStack(Phosphate, 1))), // Wikipedia: (Ce, La, Nd, Th, Sm, Gd)PO4 Monazite also smelt-extract to Helium, it is brown like the rare earth Item Monazite sand deposits are inevitably of the monazite-(Ce) composition. Typically, the lanthanides in such monazites contain about 45Ö´8% cerium, about 24% lanthanum, about 17% neodymium, about 5% praseodymium, and minor quantities of samarium, gadolinium, and yttrium. Europium concentrations tend to be low, about 0.05% Thorium content of monazite is variable and sometimes can be up to 20Öł0% - public static Materials Malachite = new Materials( 871, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 5, 95, 5, 0, "Malachite" , "Malachite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(Copper, 2), new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 5))), // Cu2CO3(OH)2 - public static Materials Mirabilite = new Materials( 900, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 250, 210, 0, "Mirabilite" , "Mirabilite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 2), new MaterialStack(Sulfur, 1), new MaterialStack(Water, 10), new MaterialStack(Oxygen, 4))), // Na2SO4 10H2O - public static Materials Mica = new Materials( 901, TextureSet.SET_FINE , 1.0F, 0, 1, 1 |8 , 195, 195, 205, 0, "Mica" , "Mica" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Aluminium, 3), new MaterialStack(Silicon, 3), new MaterialStack(Fluorine, 2), new MaterialStack(Oxygen, 10))), // KAl2(AlSi3O10)(F,OH)2 - public static Materials Trona = new Materials( 903, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8 , 135, 135, 95, 0, "Trona" , "Trona" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 3), new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 1), new MaterialStack(Water, 2), new MaterialStack(Oxygen, 6))), // Na3(CO3)(HCO3) 2H2O + public static Materials Monazite = new Materials( 520, TextureSet.SET_DIAMOND , 1.0F, 0, 1, 1 |4|8 , 50, 70, 50, 0, "Monazite" , "Monazite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(RareEarth, 1), new MaterialStack(Phosphate, 1))); // Wikipedia: (Ce, La, Nd, Th, Sm, Gd)PO4 Monazite also smelt-extract to Helium, it is brown like the rare earth Item Monazite sand deposits are inevitably of the monazite-(Ce) composition. Typically, the lanthanides in such monazites contain about 45Ö´8% cerium, about 24% lanthanum, about 17% neodymium, about 5% praseodymium, and minor quantities of samarium, gadolinium, and yttrium. Europium concentrations tend to be low, about 0.05% Thorium content of monazite is variable and sometimes can be up to 20Öł0% + public static Materials Malachite = new Materials( 871, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 5, 95, 5, 0, "Malachite" , "Malachite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(Copper, 2), new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 5))); // Cu2CO3(OH)2 + public static Materials Mirabilite = new Materials( 900, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 250, 210, 0, "Mirabilite" , "Mirabilite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 2), new MaterialStack(Sulfur, 1), new MaterialStack(Water, 10), new MaterialStack(Oxygen, 4))); // Na2SO4 10H2O + public static Materials Mica = new Materials( 901, TextureSet.SET_FINE , 1.0F, 0, 1, 1 |8 , 195, 195, 205, 0, "Mica" , "Mica" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Aluminium, 3), new MaterialStack(Silicon, 3), new MaterialStack(Fluorine, 2), new MaterialStack(Oxygen, 10))); // KAl2(AlSi3O10)(F,OH)2 + public static Materials Trona = new Materials( 903, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8 , 135, 135, 95, 0, "Trona" , "Trona" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 3), new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 1), new MaterialStack(Water, 2), new MaterialStack(Oxygen, 6))); // Na3(CO3)(HCO3) 2H2O public static Materials Barite = new Materials( 904, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 230, 235, 255, 0, "Barite" , "Barite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Barium, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Oxygen, 4))); - public static Materials Gypsum = new Materials( 934, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 230, 230, 250, 0, "Gypsum" , "Gypsum" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Water, 2), new MaterialStack(Oxygen, 4))), // CaSO4 2H2O - public static Materials Alunite = new Materials( 911, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 225, 180, 65, 0, "Alunite" , "Alunite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Aluminium, 3), new MaterialStack(Silicon, 2), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 14))), // KAl3(SO4)2(OH)6 - public static Materials Dolomite = new Materials( 914, TextureSet.SET_FLINT , 1.0F, 0, 1, 1 |8 , 225, 205, 205, 0, "Dolomite" , "Dolomite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Magnesium, 1), new MaterialStack(Carbon, 2), new MaterialStack(Oxygen, 6))), // CaMg(CO3)2 - public static Materials Wollastonite = new Materials( 915, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 240, 240, 0, "Wollastonite" , "Wollastonite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Silicon, 1), new MaterialStack(Oxygen, 3))), // CaSiO3 - public static Materials Zeolite = new Materials( 916, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 230, 230, 0, "Zeolite" , "Zeolite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 1), new MaterialStack(Calcium, 4), new MaterialStack(Silicon, 27), new MaterialStack(Aluminium, 9), new MaterialStack(Water, 28), new MaterialStack(Oxygen, 72))), // NaCa4(Si27Al9)O72 28(H2O) - public static Materials Kyanite = new Materials( 924, TextureSet.SET_FLINT , 1.0F, 0, 2, 1 |8 , 110, 110, 250, 0, "Kyanite" , "Kyanite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 1), new MaterialStack(Oxygen, 5))), // Al2SiO5 - public static Materials Kaolinite = new Materials( 929, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 245, 235, 235, 0, "Kaolinite" , "Kaolinite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 2), new MaterialStack(Hydrogen, 4), new MaterialStack(Oxygen, 9))), // Al2Si2O5(OH)4 - public static Materials Talc = new Materials( 902, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 90, 180, 90, 0, "Talc" , "Talc" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Magnesium, 3), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))), // H2Mg3(SiO3)4 - public static Materials Soapstone = new Materials( 877, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 95, 145, 95, 0, "Soapstone" , "Soapstone" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Magnesium, 3), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))), // H2Mg3(SiO3)4 + public static Materials Gypsum = new Materials( 934, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 230, 230, 250, 0, "Gypsum" , "Gypsum" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Water, 2), new MaterialStack(Oxygen, 4))); // CaSO4 2H2O + public static Materials Alunite = new Materials( 911, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 225, 180, 65, 0, "Alunite" , "Alunite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Aluminium, 3), new MaterialStack(Silicon, 2), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 14))); // KAl3(SO4)2(OH)6 + public static Materials Dolomite = new Materials( 914, TextureSet.SET_FLINT , 1.0F, 0, 1, 1 |8 , 225, 205, 205, 0, "Dolomite" , "Dolomite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Magnesium, 1), new MaterialStack(Carbon, 2), new MaterialStack(Oxygen, 6))); // CaMg(CO3)2 + public static Materials Wollastonite = new Materials( 915, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 240, 240, 0, "Wollastonite" , "Wollastonite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Silicon, 1), new MaterialStack(Oxygen, 3))); // CaSiO3 + public static Materials Zeolite = new Materials( 916, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 230, 230, 0, "Zeolite" , "Zeolite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 1), new MaterialStack(Calcium, 4), new MaterialStack(Silicon, 27), new MaterialStack(Aluminium, 9), new MaterialStack(Water, 28), new MaterialStack(Oxygen, 72))); // NaCa4(Si27Al9)O72 28(H2O) + public static Materials Kyanite = new Materials( 924, TextureSet.SET_FLINT , 1.0F, 0, 2, 1 |8 , 110, 110, 250, 0, "Kyanite" , "Kyanite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 1), new MaterialStack(Oxygen, 5))); // Al2SiO5 + public static Materials Kaolinite = new Materials( 929, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 245, 235, 235, 0, "Kaolinite" , "Kaolinite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 2), new MaterialStack(Hydrogen, 4), new MaterialStack(Oxygen, 9))); // Al2Si2O5(OH)4 + public static Materials Talc = new Materials( 902, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 90, 180, 90, 0, "Talc" , "Talc" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Magnesium, 3), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))); // H2Mg3(SiO3)4 + public static Materials Soapstone = new Materials( 877, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 95, 145, 95, 0, "Soapstone" , "Soapstone" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Magnesium, 3), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))); // H2Mg3(SiO3)4 public static Materials Concrete = new Materials( 947, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 , 100, 100, 100, 0, "Concrete" , "Concrete" , 0, 0, 300, 0, false, false, 0, 1, 1, Dyes.dyeGray , 0, Arrays.asList(new MaterialStack(Stone, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.TERRA, 1))); public static Materials IronMagnetic = new Materials( 354, TextureSet.SET_MAGNETIC , 6.0F, 256, 2, 1|2 |64|128 , 200, 200, 200, 0, "IronMagnetic" , "Magnetic Iron" , 0, 0, -1, 0, false, false, 4, 51, 50, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Iron, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); public static Materials SteelMagnetic = new Materials( 355, TextureSet.SET_MAGNETIC , 6.0F, 512, 2, 1|2 |64|128 , 128, 128, 128, 0, "SteelMagnetic" , "Magnetic Steel" , 0, 0, 1000, 1000, true, false, 4, 51, 50, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Steel, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 1), new TC_AspectStack(TC_Aspects.ORDO, 1), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); @@ -661,6 +661,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials HSSE = new Materials( 373, TextureSet.SET_METALLIC , 10.0F, 5120, 4, 1|2 |64|128 , 51, 102, 0, 0, "HSSE" , "HSS-E" , 0, 0, 5400,25400, true, false, 4, 1, 1, Dyes.dyeGreen , 2, Arrays.asList(new MaterialStack(HSSG, 6), new MaterialStack(Cobalt, 1),new MaterialStack(Manganese, 1), new MaterialStack(Silicon, 1))); public static Materials HSSS = new Materials( 374, TextureSet.SET_METALLIC , 14.0F, 3000, 4, 1|2 |64|128 , 102, 0, 51, 0, "HSSS" , "HSS-S" , 0, 0, 5400,25400, true, false, 4, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(HSSG, 6), new MaterialStack(Iridium, 2), new MaterialStack(Osmium, 1))); + //ADDED public static Materials Electrotine = new Materials( 812, TextureSet.SET_SHINY , 1.0F, 0, 1, 1 |8 , 60, 180, 200, 0, "Electrotine" , "Electrotine" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeCyan , 0, Arrays.asList(new MaterialStack(Redstone, 1), new MaterialStack(Electrum, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 2))); public static Materials Galgadorian = new Materials( 384, TextureSet.SET_METALLIC , 16.0F, 3600, 3, 1|2 |64|128 , 154, 105, 119, 0, "Galgadorian" , "Galgadorian" , 0, 0, 3000,23000, true, false, 1, 1, 1, Dyes.dyePink ); public static Materials EnhancedGalgadorian = new Materials( 385, TextureSet.SET_METALLIC , 32.0F, 7200, 5, 1|2| 64|128 , 152, 93, 133, 0, "EnhancedGalgadorian" , "Enhanced Galgadorian" , 0, 0, 4500,24500, true, false, 1, 1, 1, Dyes.dyePink ); @@ -669,12 +670,28 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { ////public static Materials RefinedObsidian = new Materials(----, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1|2 , 80, 50, 100, 0, "RefinedObsidian" , "Refined Obsidian" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePurple ); public static Materials Shadow = new Materials( 368, TextureSet.SET_METALLIC , 32.0F, 8192, 4, 1|2 |8 |64|128 , 16, 3, 66, 0, "Shadow" , "Shadow" , 0, 0, 1800, 1800, true, false, 3, 4, 3, Dyes.dyeBlue ); + //\/HAD TO MOVE DOWN SECTION + public static Materials RedstoneAlloy = new Materials( 381, TextureSet.SET_METALLIC , 3.0F, 128, 2, 1|2 |64|128 , 181, 51, 51, 0, "RedstoneAlloy" , "Redstone Alloy" , 0, 0, 500,21000, true, false, 1, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(Redstone, 1), new MaterialStack(Silicon, 1), new MaterialStack(Coal, 1))); + public static Materials Soularium = new Materials( 379, TextureSet.SET_METALLIC , 8.0F, 256, 2, 1|2 |64|128 , 65, 46, 29, 0, "Soularium" , "Soularium" , 0, 0, 800,21000, true, false, 3, 1, 1, Dyes.dyeBrown , 1, Arrays.asList(new MaterialStack(SoulSand, 1), new MaterialStack(Gold, 1), new MaterialStack(Ash, 1))); + public static Materials ConductiveIron = new Materials( 369, TextureSet.SET_METALLIC , 6.0F, 256, 3, 1|2 |64|128 , 217, 178, 171, 0, "ConductiveIron" , "Conductive Iron" , 0, 0, -1,21200, true, false, 4, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(RedstoneAlloy, 1), new MaterialStack(Iron, 1), new MaterialStack(Silver, 1))); + public static Materials ElectricalSteel = new Materials( 365, TextureSet.SET_METALLIC , 6.0F, 512, 2, 1|2 |64|128 , 185, 185, 185, 0, "ElectricalSteel" , "Electrical Steel" , 0, 0, 1811,21000, true, false, 4, 1, 1, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Coal, 1), new MaterialStack(Silicon, 1))); + public static Materials EnergeticAlloy = new Materials( 366, TextureSet.SET_METALLIC , 12.0F, 1024, 3, 1|2 |64|128 , 255, 170, 81, 0, "EnergeticAlloy" , "Energetic Alloy" , 0, 0, -1,22200, true, false, 3, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(ConductiveIron, 1), new MaterialStack(Gold, 1), new MaterialStack(BlackSteel, 1))); + public static Materials VibrantAlloy = new Materials( 367, TextureSet.SET_METALLIC , 18.0F, 4048, 4, 1|2 |64|128 , 157, 188, 53, 0, "VibrantAlloy" , "Vibrant Alloy" , 0, 0, 3300,23300, true, false, 4, 1, 1, Dyes.dyeLime , 1, Arrays.asList(new MaterialStack(EnergeticAlloy, 1), new MaterialStack(EnderEye, 1), new MaterialStack(Chrome, 1))); + public static Materials PulsatingIron = new Materials( 378, TextureSet.SET_METALLIC , 6.0F, 256, 3, 1|2 |64|128 , 128, 246, 155, 0, "PulsatingIron" , "Pulsating Iron" , 0, 0, -1,21800, true, false, 4, 1, 1, Dyes.dyeLime , 1, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(EnderPearl, 1), new MaterialStack(RedstoneAlloy, 1))); + public static Materials Enderium = new Materials( 321, TextureSet.SET_DULL , 8.0F, 1500, 3, 1|2 |64|128 , 89, 145, 135, 0, "Enderium" , "Enderium" , 0, 0, 4500,24500, true, false, 1, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(EnderiumBase, 2), new MaterialStack(Thaumium, 1), new MaterialStack(EnderPearl, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ALIENIS, 1))); + public static Materials DarkSteel = new Materials( 364, TextureSet.SET_METALLIC , 8.0F, 512, 3, 1|2 |64|128 , 80, 70, 80, 0, "DarkSteel" , "Dark Steel" , 0, 0, -1,21800, true, false, 3, 1, 1, Dyes.dyePurple , 1, Arrays.asList(new MaterialStack(ElectricalSteel, 1), new MaterialStack(Coal, 1), new MaterialStack(Obsidian, 1))); + public static Materials Mithril = new Materials( 331, TextureSet.SET_SHINY , 14.0F, 64, 3, 1|2 |8 |64 , 255, 255, 210, 0, "Mithril" , "Mithril" , 0, 0, -1, 0, false, false, 4, 3, 2, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Platinum, 2), new MaterialStack(Thaumium, 1))); + public static Materials BlueAlloy = new Materials( 309, TextureSet.SET_DULL , 1.0F, 0, 0, 1|2 , 100, 180, 255, 0, "BlueAlloy" , "Blue Alloy" , 0, 0, -1, 0, false, false, 3, 5, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Silver, 1), new MaterialStack(Electrotine, 4)), Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 3))); + public static Materials ShadowIron = new Materials( 336, TextureSet.SET_METALLIC , 6.0F, 384, 3, 1|2 |8 |64 , 120, 120, 120, 0, "ShadowIron" , "Shadowiron" , 0, 0, -1, 0, false, false, 3, 4, 3, Dyes.dyeBlack , 3, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Thaumium, 3))); + public static Materials ShadowSteel = new Materials( 337, TextureSet.SET_METALLIC , 6.0F, 768, 4, 1|2 |64 , 90, 90, 90, 0, "ShadowSteel" , "Shadowsteel" , 0, 0, -1, 1700, true, false, 4, 4, 3, Dyes.dyeBlack , 3, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Thaumium, 3))); + public static Materials AstralSilver = new Materials( 333, TextureSet.SET_SHINY , 10.0F, 64, 2, 1|2 |64 , 230, 230, 255, 0, "AstralSilver" , "Astral Silver" , 0, 0, -1, 0, false, false, 4, 3, 2, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Silver, 2), new MaterialStack(Thaumium, 1))); + /** * Galaxy Space 1.10 compat from Version 2.6 */ public static Materials Ledox = new Materials( 390, TextureSet.SET_SHINY , 15.0F, 1024, 4, 1|2 |8 |64|128 , 0, 116, 255, 0, "Ledox" , "Ledox" , 0, 0, -1, 0, false, false, 4, 1, 1, Dyes.dyeBlue ); public static Materials Quantium = new Materials( 391, TextureSet.SET_SHINY , 18.0F, 2048, 4, 1|2 |8 |64|128 , 0, 209, 11, 0, "Quantium" , "Quantium" , 0, 0, 4000, 4000, true, false, 4, 1, 1, Dyes.dyeLime ); - public static Materials Mytryl = new Materials( 387, TextureSet.SET_SHINY , 8.0F, 512, 4, 1|2 |8 |64|128 , 242, 100, 4, 0, "Mytryl" , "Mytryl" , 0, 0, 3600, 3600, true, false, 4, 1, 1, Dyes.dyeOrange) , + public static Materials Mytryl = new Materials( 387, TextureSet.SET_SHINY , 8.0F, 512, 4, 1|2 |8 |64|128 , 242, 100, 4, 0, "Mytryl" , "Mytryl" , 0, 0, 3600, 3600, true, false, 4, 1, 1, Dyes.dyeOrange ); public static Materials BlackPlutonium = new Materials( 388, TextureSet.SET_DULL , 36.0F, 8192, 6, 1|2 |8 |64|128 , 50, 50, 50, 0, "BlackPlutonium" , "Black Plutonium" , 0, 0, 9000, 9000, true, false, 4, 1, 1, Dyes.dyeBlack ); public static Materials CallistoIce = new Materials( 389, TextureSet.SET_SHINY , 9.0F, 1024, 4, 1|2 |8 |64|128 , 30, 177, 255, 0, "CallistoIce" , "Callisto Ice" , 0, 0, -1, 0, false, false, 4, 1, 1, Dyes.dyeLightBlue ); public static Materials Duralumin = new Materials( 392, TextureSet.SET_SHINY , 16.0F, 512, 3, 1|2 |8 |64|128 , 235, 209, 160, 0, "Duralumin" , "Duralumin" , 0, 0, 1600, 1600, true, false, 4, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Aluminium, 6), new MaterialStack(Copper, 1), new MaterialStack(Manganese, 1), new MaterialStack(Magnesium, 1))); diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index 32a001000d..5ee7de2b84 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -29,10 +29,12 @@ public class Textures { MACHINE_CASING_TANK_1, MACHINE_CASING_TANK_2, MACHINE_CASING_TANK_3, MACHINE_CASING_TANK_4, MACHINE_CASING_TANK_5, MACHINE_CASING_TANK_6, MACHINE_CASING_TANK_7, MACHINE_CASING_TANK_8, MACHINE_CASING_TANK_9, MACHINE_CASING_TANK_10,MACHINE_CASING_TANK_11,MACHINE_CASING_TANK_12, - MACHINE_CASING_TANK_13,MACHINE_CASING_TANK_14,MACHINE_CASING_TANK_15,MACHINE_CASING_TANK_0; + MACHINE_CASING_TANK_13,MACHINE_CASING_TANK_14,MACHINE_CASING_TANK_15,MACHINE_CASING_TANK_0, + BLOCK_STEELEAF, BLOCK_ICHORIUM, + OVERLAY_ENERGY_IN_POWER,OVERLAY_ENERGY_OUT_POWER,OVERLAY_AUTOMAINTENANCE,OVERLAY_AUTOMAINTENANCE_IDLE,OVERLAY_TELEPORTER_SIDES,INSULATION_MEDIUM_PLUS, // 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_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, @@ -104,7 +106,7 @@ public class Textures { BLOCK_CUPRONICKEL, BLOCK_DAMASCUSSTEEL, BLOCK_DARKIRON, BLOCK_DEEPIRON, BLOCK_DESH, BLOCK_DURANIUM, BLOCK_DYSPROSIUM, BLOCK_ELECTRUM, BLOCK_ELECTRUMFLUX, BLOCK_ENDERIUM, BLOCK_ERBIUM, BLOCK_EUROPIUM, BLOCK_FIERYSTEEL, BLOCK_GADOLINIUM, BLOCK_GALLIUM, BLOCK_HOLMIUM, BLOCK_HSLA, BLOCK_INDIUM, BLOCK_INFUSEDGOLD, BLOCK_INVAR, BLOCK_IRIDIUM, BLOCK_IRONMAGNETIC, BLOCK_IRONWOOD, BLOCK_KANTHAL, BLOCK_KNIGHTMETAL, BLOCK_LANTHANUM, BLOCK_LEAD, BLOCK_LUTETIUM, BLOCK_MAGNALIUM, BLOCK_MAGNESIUM, BLOCK_MANGANESE, BLOCK_METEORICIRON, - BLOCK_METEORICSTEEL, BLOCK_MIDASIUM, BLOCK_MITHRIL, BLOCK_MOLYBDENUM, BLOCK_NAQUADAH, BLOCK_NAQUADAHALLOY, BLOCK_NAQUADAHENRICHED, BLOCK_NAQUADRIA, BLOCK_NEODYMIUM, BLOCK_NEODYMIUMMAGNETIC, + BLOCK_METEORICSTEEL, BLOCK_MIDASIUM, BLOCK_TRINIUM,BLOCK_MITHRIL, BLOCK_MOLYBDENUM, BLOCK_NAQUADAH, BLOCK_NAQUADAHALLOY, BLOCK_NAQUADAHENRICHED, BLOCK_NAQUADRIA, BLOCK_NEODYMIUM, BLOCK_NEODYMIUMMAGNETIC, BLOCK_NEUTRONIUM, BLOCK_NICHROME, BLOCK_NICKEL, BLOCK_NIOBIUM, BLOCK_NIOBIUMNITRIDE, BLOCK_NIOBIUMTITANIUM, BLOCK_OSMIRIDIUM, BLOCK_OSMIUM, BLOCK_PALLADIUM, BLOCK_PIGIRON, BLOCK_PLATINUM, BLOCK_PLUTONIUM, BLOCK_PLUTONIUM241, BLOCK_PRASEODYMIUM, BLOCK_PROMETHIUM, BLOCK_REDALLOY, BLOCK_REDSTEEL, BLOCK_ROSEGOLD, BLOCK_RUBIDIUM, BLOCK_SAMARIUM, BLOCK_SCANDIUM, BLOCK_SHADOWIRON, BLOCK_SHADOWSTEEL, BLOCK_SILICON, BLOCK_SILVER, BLOCK_SOLDERINGALLOY, BLOCK_STAINLESSSTEEL, BLOCK_STEEL, BLOCK_STEELMAGNETIC, BLOCK_STERLINGSILVER, BLOCK_SUNNARIUM, BLOCK_TANTALUM, diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java index b35d797a9c..3762713fa3 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java @@ -108,7 +108,7 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd tWorld.setBlock(tX, tY, tZ, Blocks.air); if (GregTech_API.sMachineExplosions) if(GT_Mod.gregtechproxy.mPollution) - GT_Pollution.addPollution(new ChunkPosition(tX, tY, tZ), 100000); + GT_Pollution.addPollution(tWorld,new ChunkPosition(tX, tY, tZ), 100000); tWorld.createExplosion(null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true); } } diff --git a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java index 0182052f71..84e30620eb 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java @@ -668,7 +668,7 @@ public abstract class MetaPipeEntity implements IMetaTileEntity { tWorld.setBlock(tX, tY, tZ, Blocks.air); if (GregTech_API.sMachineExplosions) if(GT_Mod.gregtechproxy.mPollution) - GT_Pollution.addPollution(new ChunkPosition(tX, tY, tZ), 100000); + GT_Pollution.addPollution(getBaseMetaTileEntity().getWorld(),new ChunkPosition(tX, tY, tZ), 100000); tWorld.createExplosion(null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true); } diff --git a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java index 3cc96b5058..ccefab6a3a 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java @@ -858,7 +858,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity { tWorld.setBlock(tX, tY, tZ, Blocks.air); if (GregTech_API.sMachineExplosions) if(GT_Mod.gregtechproxy.mPollution) - GT_Pollution.addPollution(new ChunkPosition(tX, tY, tZ), 100000); + GT_Pollution.addPollution(tWorld,new ChunkPosition(tX, tY, tZ), 100000); tWorld.createExplosion(null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true); } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java index a99a5bae75..cdf19839a2 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java @@ -98,7 +98,7 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { boolean chk1,chk2,chk3; float ran1=floatGen.nextFloat(),ran2=0,ran3=0; chk1=ran1*100= GT_Mod.gregtechproxy.mPollutionSmogLimit){ + if(GT_Pollution.getPollutionAtCoords(aWorld,this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getZCoord())>= GT_Mod.gregtechproxy.mPollutionSmogLimit){ ran2=floatGen.nextFloat(); ran3=floatGen.nextFloat(); chk2=ran2*100 { public static final GT_Recipe_Map sRockBreakerFakeRecipes = new GT_Recipe_Map(new HashSet(3), "gt.recipe.rockbreaker", "Rock Breaker", null, RES_PATH_GUI + "basicmachines/RockBreaker", 1, 1, 0, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sByProductList = new GT_Recipe_Map(new HashSet(1000), "gt.recipe.byproductlist", "Ore Byproduct List", null, RES_PATH_GUI + "basicmachines/Default", 1, 6, 1, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sReplicatorFakeRecipes = new GT_Recipe_Map(new HashSet(100), "gt.recipe.replicator", "Replicator", null, RES_PATH_GUI + "basicmachines/Replicator", 0, 1, 0, 1, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sAssemblylineFakeRecipes = new GT_Recipe_Map(new HashSet(30), "gt.recipe.scanner", "Scanner", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sAssemblylineFakeRecipes = new GT_Recipe_Map(new HashSet(30), "gt.recipe.fakeAssemblylineProcess", "Assemblyline Process", null, RES_PATH_GUI + "FakeAssemblyline", 1, 1, 1, 0, 1, E, 1, E, true, false); + //public static final GT_Recipe_Map sAssemblylineFakeRecipes = new GT_Recipe_Map(new HashSet(30), "gt.recipe.scanner", "Scanner", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 1, 0, 1, E, 1, E, true, true); + public static final GT_Recipe_Map sAssemblylineVisualRecipes = new GT_Recipe_Map(new HashSet(30), "gt.recipe.fakeAssemblylineProcess", "Assemblyline Process", null, RES_PATH_GUI + "FakeAssemblyline", 1, 1, 1, 0, 1, E, 1, E, true, false); public static final GT_Recipe_Map sPlasmaArcFurnaceRecipes = new GT_Recipe_Map(new HashSet(10000), "gt.recipe.plasmaarcfurnace", "Plasma Arc Furnace", null, RES_PATH_GUI + "basicmachines/PlasmaArcFurnace", 1, 4, 1, 1, 1, E, 1, E, true, true); public static final GT_Recipe_Map sArcFurnaceRecipes = new GT_Recipe_Map(new HashSet(10000), "gt.recipe.arcfurnace", "Arc Furnace", null, RES_PATH_GUI + "basicmachines/ArcFurnace", 1, 4, 1, 1, 3, E, 1, E, true, true); public static final GT_Recipe_Map sPrinterRecipes = new GT_Recipe_Map_Printer(new HashSet(100), "gt.recipe.printer", "Printer", null, RES_PATH_GUI + "basicmachines/Printer", 1, 1, 1, 1, 1, E, 1, E, true, true); diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 7e38838728..7e28593abf 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -2,6 +2,7 @@ package gregtech.api.util; import cofh.api.transport.IItemDuct; import cpw.mods.fml.common.FMLCommonHandler; +import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.damagesources.GT_DamageSources; import gregtech.api.enchants.Enchantment_Radioactivity; @@ -17,6 +18,7 @@ import gregtech.api.items.GT_EnergyArmor_Item; import gregtech.api.items.GT_Generic_Item; import gregtech.api.net.GT_Packet_Sound; import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_UO_Fluid; import gregtech.api.objects.ItemData; import gregtech.api.objects.XSTR; import gregtech.api.threads.GT_Runnable_Sound; diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index 1a3ed25e6c..fa14abf03d 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -292,7 +292,7 @@ public class GT_Client extends GT_Proxy afterSomeTime=0; StatFileWriter sfw= Minecraft.getMinecraft().thePlayer.getStatFileWriter(); try { - for(GT_Recipe recipe:GT_Recipe.GT_Recipe_Map.sAssemblylineFakeRecipes.mRecipeList){ + for(GT_Recipe recipe:GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList){ recipe.mHidden=!sfw.hasAchievementUnlocked(GT_Mod.achievements.getAchievement(recipe.getOutput(0).getUnlocalizedName())); } }catch (Exception e){} diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index 39dc0c3b8f..5c7678e857 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -16,6 +16,7 @@ import net.minecraftforge.common.DimensionManager; import java.util.ArrayList; import java.util.List; +import java.util.TreeMap; //import net.minecraft.entity.EntityLiving; @@ -52,7 +53,7 @@ public class GT_Pollution {//TODO REWORK * LV (0%), MV (30%), HV (52%), EV (66%), IV (76%), LuV (84%), ZPM (89%), UV (92%), MAX (95%) */ - static TreeMap> tList = null; + static List tList = null; static int loops = 1; static XSTR tRan = new XSTR(); @@ -60,8 +61,8 @@ public class GT_Pollution {//TODO REWORK if(!GT_Mod.gregtechproxy.mPollution) return; int aWorldID=aWorld.provider.dimensionId; if(aTick == 0 || (tList==null && GT_Proxy.chunkData!=null)){ - tList = new TreeMap<>(); - tList.put(aWorld,new ArrayList(GT_Proxy.chunkData.keySet())); + //---tList = new TreeMap<>(); + //---tList.put(aWorld,new ArrayList(GT_Proxy.chunkData.keySet())); loops = (tList.size()/1200) + 1; //System.out.println("new Pollution loop"+aTick); } @@ -83,8 +84,8 @@ public class GT_Pollution {//TODO REWORK tNeighbor.add(new ChunkPosition(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ+1)); tNeighbor.add(new ChunkPosition(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ-1)); for(ChunkPosition tNPos : tNeighbor){ - if(!GT_Proxy.chunkData.containsKey(tNPos)) - GT_Utility.undergroundOil(aWorld,tNPos.chunkPosX,tNPos.chunkPosZ,false,0); + //---if(!GT_Proxy.chunkData.containsKey(tNPos)) + //--- GT_Utility.undergroundOil(aWorld,tNPos.chunkPosX,tNPos.chunkPosZ,false,0); //if(GT_Proxy.chunkData.containsKey(tNPos)){ int tNPol = GT_Proxy.chunkData.get(tNPos)[1]; diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 2a71740231..07c1ea9fce 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -656,12 +656,12 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { 'R', OrePrefixes.ring.get(Materials.Steel)}); GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadDrill, aMaterial, 1L), tBits, new Object[]{"XSX", "XSX", "ShS", 'X', OrePrefixes.plate.get(aMaterial), 'S', OrePrefixes.plate.get(Materials.Steel)}); - switch (aMaterial) { - case Wood: + switch (aMaterial.mName) { + case "Wood": GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial, 1L), tBits, new Object[]{"P ", " s", 'P', OrePrefixes.plank.get(aMaterial)}); break; - case Stone: + case "Stone": GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial, 1L), tBits, new Object[]{"P ", " f", 'P', OrePrefixes.stoneSmooth}); break; @@ -672,12 +672,12 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { //TODO CHECK } - switch (aMaterial) { - case Wood: + switch (aMaterial.mName) { + case "Wood": GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), tBits, new Object[]{"SPS", "PsP", "SPS", 'P', OrePrefixes.plank.get(aMaterial), 'S', OrePrefixes.stick.get(aMaterial)}); break; - case Stone: + case "Stone": GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), tBits, new Object[]{"SPS", "PfP", "SPS", 'P', OrePrefixes.stoneSmooth, 'S', new ItemStack(Blocks.stone_button, 1, 32767)}); break; @@ -739,7 +739,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { new Object[]{"h", "X", 'X', OrePrefixes.gemFlawless.get(aMaterial)}); GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, 2L), tBits, new Object[]{"h", "X", 'X', OrePrefixes.gemExquisite.get(aMaterial)}); - if ((aMaterial.contains(SubTag.MORTAR_GRINDABLE)) && (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, aMaterial.name(), true))) { + if ((aMaterial.contains(SubTag.MORTAR_GRINDABLE)) && (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, aMaterial.mName, true))) { GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L), tBits, new Object[]{"X", "m", 'X', OrePrefixes.gemChipped.get(aMaterial)}); GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 2L), tBits, diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index 090f64c1c4..80b6be70c5 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -896,7 +896,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if(tItem==null)System.out.println("addAssemblinglineRecipe"+aResearchItem.getDisplayName()); } GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{aResearchItem}, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Writes Research result", new Object[0])}, null, null, aResearchTime, 30, 0); - GT_Recipe.GT_Recipe_Map.sAssemblylineFakeRecipes.addFakeRecipe(false, aInputs, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0])}, aFluidInputs, null, aDuration, aEUt, 0,true); + GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.addFakeRecipe(false, aInputs, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0])}, aFluidInputs, null, aDuration, aEUt, 0,true); GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(new GT_Recipe_AssemblyLine( aResearchItem, aResearchTime, aInputs, aFluidInputs, aOutput, aDuration, aEUt)); return true; } diff --git a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java index 6d2df102f8..8d762a0d02 100644 --- a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java +++ b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java @@ -42,7 +42,7 @@ public class GT_Worldgen_GT_Ore_Layer //public final boolean mAsteroid; public final String aTextWorldgen = "worldgen."; - public GT_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, boolean aNether, boolean aEnd, Materials aPrimary, Materials aSecondary, Materials aBetween, Materials aSporadic) { + public GT_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, boolean GC_UNUSED3, Materials aPrimary, Materials aSecondary, Materials aBetween, Materials aSporadic) { super(aName, sList, aDefault); this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); diff --git a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java index 5b0d4d61f5..6a8cd49b6f 100644 --- a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java +++ b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java @@ -25,8 +25,8 @@ public class GT_Worldgen_GT_Ore_SmallPieces public final String mBiome; public final String aTextWorldgen = "worldgen."; - - public GT_Worldgen_GT_Ore_SmallPieces(String aName, boolean aDefault, int aMinY, int aMaxY, int aAmount, boolean aOverworld, boolean aNether, boolean aEnd, Materials aPrimary) { + //TODO CHECk IF INSTANTIATION IS CORRECT + public GT_Worldgen_GT_Ore_SmallPieces(String aName, boolean aDefault, int aMinY, int aMaxY, int aAmount, boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, boolean GC_UNUSED3, Materials aPrimary) { super(aName, GregTech_API.sWorldgenList, aDefault); this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); diff --git a/src/main/java/gregtech/common/items/armor/ArmorData.java b/src/main/java/gregtech/common/items/armor/ArmorData.java index 9a2b161a0f..00ec76aeea 100644 --- a/src/main/java/gregtech/common/items/armor/ArmorData.java +++ b/src/main/java/gregtech/common/items/armor/ArmorData.java @@ -1,344 +1,426 @@ -package gregtech.common.items.armor.gui; - -import gregtech.api.enums.GT_Values; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Utility; -import gregtech.common.GT_Network; -import gregtech.common.items.armor.ArmorData; -import gregtech.common.items.armor.components.StatType; +package gregtech.common.items.armor; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.text.NumberFormat; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Locale; +import java.util.Map; +import java.util.Random; -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.gui.inventory.GuiContainer; +import gregtech.api.damagesources.GT_DamageSources; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; +import gregtech.common.items.armor.components.ArmorComponent; +import gregtech.common.items.armor.components.StatType; +import gregtech.common.items.armor.gui.ContainerBasicArmor; +import gregtech.common.items.armor.gui.ContainerModularArmor; +import gregtech.common.items.armor.gui.InventoryArmor; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ResourceLocation; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.DamageSource; import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidContainerItem; -@SideOnly(Side.CLIENT) -public class GuiElectricArmor1 extends GuiContainer { - ContainerModularArmor cont; - EntityPlayer player; - private int tab; - - public GuiElectricArmor1(ContainerModularArmor containerModularArmor, EntityPlayer aPlayer) { - super(containerModularArmor); - player = aPlayer; - cont = containerModularArmor; - tab = 0; - } - @Override - public void onGuiClosed() - { - cont.saveInventory(player); - super.onGuiClosed(); - }; - public String seperateNumber(long number){ - DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US); - DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols(); - symbols.setGroupingSeparator(' '); - return formatter.format(number); - } +public class ArmorData { - @Override - protected void drawGuiContainerForegroundLayer(int x, int y) { - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - int x2 = x - xStart; - int y2 = y - yStart; - drawTooltip(x2, y2 + 5); - } + public int type; // 0 = helmet; 1 = chestplate; 2 = leggings; 3 = boots; + public int armorTier; // 0 = Basic Modular Armor; 1 = Modular Exoskeleton; 2= Modular Nanosuit; 3 = Heavy Power Armor + public List info; // needs Localization + public boolean isTopItem; + public int tooltipUpdate; + public boolean openGui; - @Override - protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { - GL11.glColor4f(1F, 1F, 1F, 1F); - this.mc.getTextureManager().bindTexture(new ResourceLocation("gregtech", "textures/gui/armorgui3x4.png")); - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - //Draw background - drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize); - //Draw active arrows - drawTexturedModalRect(xStart + 10, yStart + 70, 219, 11, 14, 5); - //Draw active armor symbol - switch (cont.mInvArmor.data.type) { - case 0: - drawTexturedModalRect(xStart + 73, yStart + 68, 177, 10, 10, 9); - break; - case 1: - drawTexturedModalRect(xStart + 83, yStart + 68, 187, 10, 10, 9); - break; - case 2: - drawTexturedModalRect(xStart + 93, yStart + 68, 197, 10, 10, 9); - break; - case 3: - drawTexturedModalRect(xStart + 103, yStart + 68, 207, 10, 10, 9); - break; - default: - break; + public ArmorData helmet; + public ArmorData chestplate; + public ArmorData leggings; + public ArmorData boots; + + public Map mStat = new HashMap(); + public Map mBStat = new HashMap(); + static ArrayList updateArmorStatTypeList; +// public boolean fullArmor; +// public boolean fullRadiationDef; +// public boolean fullElectricDef; +// +// public float fallDef; +// public float physicalDef; +// public float projectileDef; +// public float fireDef; +// public float magicDef; +// public float explosionDef; +// public float radiationDef; +// public float electricDef; +// public float witherDef; +// +// public float thorns; +// public float thornsSingle; +// public int magnet; +// public int magnetSingle; +// +// public int partsCharge; + public int maxCharge; + public int charge; +// public boolean thaumicGoggles; +// public boolean nightVision; +// public boolean potionInjector; +// public boolean autoFeeder; + + public FluidStack fluid; +// public int tankCap; +// +// public int weight; + public float maxWeight; +// public int processingPower; +// public int processingPowerUsed; +// public int partProcessing; +// public int partProcessingUsed; +// +// public int motorPower; +// public int motorEUusage; +// public int pistonJumpboost; +// public int pistonEUusage; +// public int electrolyzerProd; +// public int electrolyzerEUusage; +// public int fieldGenCap; +// public int fieldGenEUusage; +// +// public int jetpackMaxWeight; +// public int antiGravMaxWeight; + + public ArmorData(EntityPlayer player, ItemStack stack, int type, int tier) { + if(updateArmorStatTypeList == null) + { + updateArmorStatTypeList = new ArrayList(); + updateArmorStatTypeList.add(StatType.MAGNET); + updateArmorStatTypeList.add(StatType.THORNS); + updateArmorStatTypeList.add(StatType.PROCESSINGPOWER); + updateArmorStatTypeList.add(StatType.PROCESSINGPOWERUSED); } - //Draw active tab - switch(tab){ + this.type = type; + this.armorTier = tier; + ContainerModularArmor tmp = new ContainerBasicArmor((EntityPlayer) player, new InventoryArmor(ModularArmor_Item.class, stack)); + calculateArmor(tmp.mInvArmor.parts); + switch (tier) { case 0: + maxCharge = 0; break; case 1: - drawTexturedModalRect(xStart + 7, yStart + 14, 2, 167, 104, 54); + maxCharge = 250000; break; case 2: - drawTexturedModalRect(xStart + 7, yStart + 14, 107, 167, 104, 54); - break; - default: - break; + maxCharge = 1000000; } - float tankCap = cont.mInvArmor.data.mStat.containsKey(StatType.TANKCAP) ? cont.mInvArmor.data.mStat.get(StatType.TANKCAP) :0.0f; - if(tankCap>0){ - drawTexturedModalRect(xStart + 94, yStart + 32, 231, 69, 16, 34); + readNBT(stack.getTagCompound()); + } + + private void readNBT(NBTTagCompound nbt) { + if (nbt == null) { + return; } - float weight = cont.mInvArmor.data.mStat.containsKey(StatType.WEIGHT) ? cont.mInvArmor.data.mStat.get(StatType.WEIGHT) : 0.0f; - int bar = (int) Math.floor(18 * (weight)/(float)1000); - drawTexturedModalRect(xStart + 15, yStart + 7, 217, 26, bar, 5); - drawTexturedModalRect(xStart + bar + 15, yStart + 7, 197+bar, 26, 18-bar, 5); - - if(tab==0){ - //processing power bar - bar = Math.min((int) Math.floor(52 * ((float)cont.mInvArmor.data.mStat.get(StatType.PROCESSINGPOWERUSED)/(float)cont.mInvArmor.data.mStat.get(StatType.PROCESSINGPOWER))),52); - drawTexturedModalRect(xStart + 17, yStart + 17, 177, 146, bar, 5); - drawTexturedModalRect(xStart + bar + 17, yStart + 17, 177+bar, 139, 52-bar, 5); - }else if(tab==1){ - - }else{ - //Def tab values - if(cont.mInvArmor.data.mStat.get(StatType.PHYSICALDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 20, 186, 33, 7, 7); - drawBars(31, 20, cont.mInvArmor.data.mStat.get(StatType.PHYSICALDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.PROJECTILEDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 29, 186, 42, 7, 7); - drawBars(31, 29, cont.mInvArmor.data.mStat.get(StatType.PROJECTILEDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.FIREDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 38, 186, 51, 7, 7); - drawBars(31, 38, cont.mInvArmor.data.mStat.get(StatType.FIREDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.MAGICDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 47, 186, 60, 7, 7); - drawBars(31, 47, cont.mInvArmor.data.mStat.get(StatType.MAGICDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.EXPLOSIONDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 56, 186, 69, 7, 7); - drawBars(31, 56, cont.mInvArmor.data.mStat.get(StatType.EXPLOSIONDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.RADIATIONDEFENCE)>0)drawTexturedModalRect(xStart + 61, yStart + 20, 186, 87, 7, 7); - drawBars(62, 20, cont.mInvArmor.data.mStat.get(StatType.RADIATIONDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.ELECTRICALDEFENCE)>0)drawTexturedModalRect(xStart + 61, yStart + 29, 186, 96, 7, 7); - drawBars(62, 29, cont.mInvArmor.data.mStat.get(StatType.ELECTRICALDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.WITHERDEFENCE)>0)drawTexturedModalRect(xStart + 61, yStart + 38, 186, 105, 7, 7); - drawBars(62, 38, cont.mInvArmor.data.mStat.get(StatType.WITHERDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.FALLDEFENCE)>0)drawTexturedModalRect(xStart + 61, yStart + 47, 186, 114, 7, 7); - if(cont.mInvArmor.data.mStat.get(StatType.THORNS)>0)drawTexturedModalRect(xStart + 61, yStart + 56, 186, 123, 7, 7); - if(cont.mInvArmor.data.mStat.get(StatType.MAGNET)>0)drawTexturedModalRect(xStart + 70, yStart + 56, 186, 78, 7, 7); + if (nbt.hasKey("Charge")) { + this.charge = nbt.getInteger("Charge"); } - - } - protected void mouseClicked(int mouseX, int mouseY, int mouseBtn) { - int xStart = mouseX-((width - xSize) / 2); - int yStart = mouseY-((height - ySize) / 2); - if(yStart>68&&yStart<77){ - if(xStart>18&&xStart<26){ - tab++; - }else if(xStart>8&&xStart<17){ - tab--; - } - if(tab>2){tab=0;} - if(tab<0){tab=2;} - if(xStart>72&&xStart<112){ - if(xStart>72&&xStart<81&&cont.mInvArmor.data.helmet!=null){cont.mInvArmor.data.helmet.openGui=true;} - if(xStart>82&&xStart<91&&cont.mInvArmor.data.chestplate!=null){cont.mInvArmor.data.chestplate.openGui=true;} - if(xStart>92&&xStart<101&&cont.mInvArmor.data.leggings!=null){cont.mInvArmor.data.leggings.openGui=true;} - if(xStart>102&&xStart<112&&cont.mInvArmor.data.boots!=null){cont.mInvArmor.data.boots.openGui=true;} - -// if(xStart>72&&xStart<81&&cont.mInvArmor.data.helmet!=null){cont.mInvArmor.data.helmet.openGui=true;player.closeScreen();} -// if(xStart>82&&xStart<91&&cont.mInvArmor.data.chestplate!=null){cont.mInvArmor.data.chestplate.openGui=true;player.closeScreen();} -// if(xStart>92&&xStart<101&&cont.mInvArmor.data.leggings!=null){cont.mInvArmor.data.leggings.openGui=true;player.closeScreen();} -// if(xStart>102&&xStart<112&&cont.mInvArmor.data.boots!=null){cont.mInvArmor.data.boots.openGui=true;player.closeScreen();} - } + public void writeToNBT(NBTTagCompound nbt) { + if (nbt == null) { + return; } -// Slot slot = getSlotAtPosition(mouseX, mouseY); -// if (slot != null && slot instanceof SlotFluid && player != null && cont.mInvArmor.data.helmet!=null) { -// ItemStack tmp = player.inventory.getItemStack(); -// //GT_Network gtn = new GT_Network(); -// if (tmp == null) { -// //GT_Values.NW.sendToServer(new FluidSync(player.getCommandSenderName(), 0, "null")); -// } -// //ArmorData armorData = new ArmorData(player,); -// if (tmp != null && tmp.getItem() instanceof IFluidContainerItem) { -// FluidStack tmp2 = ((IFluidContainerItem) tmp.getItem()).getFluid(tmp); -// if (!slot.getHasStack() && tmp2 != null) { -// slot.putStack(GT_Utility.getFluidDisplayStack(tmp2, true)); -// -// if(cont.mInvArmor.data.helmet.fluid == null) -// { -// cont.mInvArmor.data.helmet.fluid = new FluidStack(tmp2.getFluid(), tmp2.amount); -// } -// else -// { -// cont.mInvArmor.data.helmet.fluid.amount += tmp2.amount; -// } -// -// //GT_Values.NW.sendToServer(new FluidSync(player.getCommandSenderName(), tmp2.amount, GT_Utility.getFluidName(tmp2, false))); -// ItemStack tmp4 = GT_Utility.getContainerForFilledItem(tmp, true); -// tmp4.stackSize = 1; -// if (tmp.stackSize > 1) { -// player.inventory.addItemStackToInventory(tmp4); -// tmp.stackSize--; -// player.inventory.setItemStack(tmp); -// //GT_Values.NW.sendToServer(new FluidSync2(player.getCommandSenderName())); -// } else { -// player.inventory.setItemStack(null); -// player.inventory.addItemStackToInventory(tmp4); -// //GT_Values.NW.sendToServer(new FluidSync2(player.getCommandSenderName())); -// } -// -// } else if (slot.getHasStack() && tmp2 != null) { -// Item fluidSlot = slot.getStack().getItem(); -// if (fluidSlot.getDamage(slot.getStack()) == tmp2.getFluidID()) { -// NBTTagCompound nbt = slot.getStack().getTagCompound(); -// if (nbt != null) { -// tmp2.amount += nbt.getLong("mFluidDisplayAmount"); -// ItemStack tmp3 = player.inventory.getItemStack(); -// if (tmp3.stackSize <= 1) { -// tmp3 = null; -// } else { -// tmp3.stackSize--; -// } -// player.inventory.setItemStack(tmp3); -// //GT_Values.NW.sendToServer(new FluidSync2(player.getCommandSenderName())); -// slot.putStack(GT_Utility.getFluidDisplayStack(tmp2, true)); -// if(cont.mInvArmor.data.helmet.fluid == null) -// { -// cont.mInvArmor.data.helmet.fluid = new FluidStack(tmp2.getFluid(), tmp2.amount); -// } -// else -// { -// cont.mInvArmor.data.helmet.fluid.amount += tmp2.amount; -// } -// //GT_Values.NW.sendToServer(new FluidSync(player.getCommandSenderName(), tmp2.amount, GT_Utility.getFluidName(tmp2, false))); -// } -// } -// } -// } -// } - super.mouseClicked(mouseX, mouseY, mouseBtn); + nbt.setInteger("Charge", this.charge); } - - protected void drawTooltip(int x, int y) { - List list = new ArrayList(); - //General tooltips - if(x>=7&&y>=11&&x<=33&&y<=17){ - list.add(GT_LanguageManager.getTranslation("Weight") + ": " + cont.mInvArmor.data.mStat.get(StatType.WEIGHT)); - list.add("Total Weight: "+cont.mInvArmor.data.maxWeight); - if (cont.mInvArmor.data.mStat.get(StatType.WEIGHT) > 1000) - list.add("Too Heavy!"); + + public ArmorData calculateArmor(ItemStack[] parts) { + mStat.clear(); + mBStat.clear(); + for(ItemStack tPart : parts){ + if(tPart!=null && ArmorComponent.mStacks.containsKey(tPart.getUnlocalizedName())) + ArmorComponent.mStacks.get(tPart.getUnlocalizedName()).calculateArmor(this); } - if(x>=56&&y>=11&&x<=112&&y<=17){ - list.add("Stored Energy: "+seperateNumber(cont.mInvArmor.data.charge)+" EU"); + for(StatType tType : StatType.values())if(!mStat.containsKey(tType))mStat.put(tType, .0f); + for(StatType tType : StatType.values())if(!mBStat.containsKey(tType))mBStat.put(tType, false); + updateTooltip(); + return this; + } + + public void updateTooltip() { + List tagList = new ArrayList(); + String tmp2 = ""; + if (maxWeight > 4000) { + tmp2 = " " + GT_LanguageManager.getTranslation("Too Heavy"); } - if(y>74&&y<83){ - if(x>8&&x<17){ - list.add("Previous Page"); - }else if(x>18&&x<27){ - list.add("Next Page"); - }else if(x>72&&x<80){ - list.add("Helmet"); - }else if(x>81&&x<90){ - list.add("Chestplate"); - }else if(x>91&&x<100){ - list.add("Leggings"); - }else if(x>101&&x<110){ - list.add("Boots"); + if (maxCharge != 0) { + DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US); + DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols(); + symbols.setGroupingSeparator(' '); + if (type == 0) { + if (mBStat.get(StatType.THAUMICGOGGLES)) { + tagList.add(GT_LanguageManager.getTranslation("Thaumic Goggles installed")); + } + if (mBStat.get(StatType.NIGHTVISION)) { + tagList.add(GT_LanguageManager.getTranslation("Nightvision installed")); + } + } + tagList.add("EU: " + formatter.format(charge + mStat.get(StatType.PARTSCHARGE))); + if (type == 2) { + tagList.add(GT_LanguageManager.getTranslation("Jumpboost") + ": " + mStat.get(StatType.PISTONJUMPBOOST) / 3 + "m"); } + if (type == 2 && mStat.get(StatType.PISTONJUMPBOOST) > 0) { + tagList.add(GT_LanguageManager.getTranslation("Uphill step assist active")); + } + if (type == 2 && mStat.get(StatType.MOTPRPOWER) > 0) { + tagList.add(GT_LanguageManager.getTranslation("Speedup") + ": " + mStat.get(StatType.MOTPRPOWER)); + tagList.add(GT_LanguageManager.getTranslation("Motor energy usage") + ": " + mStat.get(StatType.MOTOREUUSAGE) + " EU"); + if (maxWeight > 4000) { + tagList.add(GT_LanguageManager.getTranslation("Too Heavy!!!")); + } + } + tagList.add(GT_LanguageManager.getTranslation("Processing power ") + " " + mStat.get(StatType.PARTPROCESSING) + " " + GT_LanguageManager.getTranslation("")); + tagList.add(GT_LanguageManager.getTranslation("Processing power used") + ": " + mStat.get(StatType.PARTPROCESSINGUSED) + " " + GT_LanguageManager.getTranslation("")); + if (type == 0 && mStat.get(StatType.ELECTROLYZERPROD) > 0) { + tagList.add(GT_LanguageManager.getTranslation("Electrolyzer produces ") + " " + mStat.get(StatType.ELECTROLYZERPROD) / 2 + GT_LanguageManager.getTranslation("per second")); + } + if (mStat.get(StatType.TANKCAP) > 0) { + if (fluid != null) { + tagList.add(GT_LanguageManager.getTranslation("Tank Capacity") + ": " + fluid.getLocalizedName() + " " + fluid.amount + "L (" + mStat.get(StatType.TANKCAP) + ")"); + } else { + tagList.add(GT_LanguageManager.getTranslation("tankcap") + ": " + mStat.get(StatType.TANKCAP)); + } + } + } + tagList.add(GT_LanguageManager.getTranslation("Weight") + ": " + mStat.get(StatType.WEIGHT) + tmp2); + tagList.add(GT_LanguageManager.getTranslation("Physical Defence") + ": " + (Math.round(mStat.get(StatType.PHYSICALDEFENCE) * 1000) / 10.0) + "%"); + tagList.add(GT_LanguageManager.getTranslation("Projectile Defence") + ": " + (Math.round(mStat.get(StatType.PROJECTILEDEFENCE) * 1000) / 10.0) + "%"); + tagList.add(GT_LanguageManager.getTranslation("Fire Defence") + ": " + (Math.round(mStat.get(StatType.FIREDEFENCE) * 1000) / 10.0) + "%"); + tagList.add(GT_LanguageManager.getTranslation("Magic Defence") + ": " + (Math.round(mStat.get(StatType.MAGICDEFENCE) * 1000) / 10.0) + "%"); + tagList.add(GT_LanguageManager.getTranslation("Explosive Defence") + ": " + (Math.round(mStat.get(StatType.EXPLOSIONDEFENCE) * 1000) / 10.0) + "%"); + if (mStat.get(StatType.FALLDEFENCE) > 0 && type == 3) { + tagList.add(GT_LanguageManager.getTranslation("Absorbs") + " " + mStat.get(StatType.FALLDEFENCE) + GT_LanguageManager.getTranslation(" m of Fall Defence")); + } + if (mStat.get(StatType.THORNS) > 0) { + tagList.add(GT_LanguageManager.getTranslation("Thorns") + ": " + mStat.get(StatType.THORNS)); + } + if (mStat.get(StatType.MAGNET) > 0) { + tagList.add(GT_LanguageManager.getTranslation("Magnet") + ": " + mStat.get(StatType.MAGNET) + "m"); } - if(tab==0){ - if(x>=93&&y>=36&&x<=110&&y<=71){list.add("Tank Capacity: "+cont.mInvArmor.data.mStat.get(StatType.TANKCAP)+"L"); + if (mBStat.get(StatType.FULLRADIATIONARMOR)) { + tagList.add(GT_LanguageManager.getTranslation("Is Full Radiation Defence")); + } else { + if (mStat.get(StatType.RADIATIONDEFENCE) > 0.01d) { + tagList.add(GT_LanguageManager.getTranslation("Radiation Defence") + ": " + (Math.round(mStat.get(StatType.RADIATIONDEFENCE) * 1000) / 10.0) + "%"); } - if(x>=7&&y>=22&&x<=70&&y<=28){list.add("Processing Power Provided: "+cont.mInvArmor.data.mStat.get(StatType.PROCESSINGPOWER)); - list.add("Processing Power Used: "+cont.mInvArmor.data.mStat.get(StatType.PROCESSINGPOWERUSED)); + } + info = tagList; + } + + public void armorPartsEquipped(EntityPlayer aPlayer) { + helmet = null; + chestplate = null; + leggings = null; + boots = null; + for (int i = 1; i < 5; i++) { + ItemStack stack = aPlayer.getEquipmentInSlot(i); + if (stack != null && stack.getItem() instanceof ModularArmor_Item) { + ModularArmor_Item tmp = (ModularArmor_Item) stack.getItem(); + ContainerModularArmor tmp2 = new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, stack)); + if ((this.type + i) == 4) { + fluid = ArmorCalculation.getFluid(tmp2.mInvArmor.parts, Math.round(mStat.get(StatType.TANKCAP))); + } + if (maxCharge > 0 && charge < maxCharge) { + int loaded = ArmorCalculation.deChargeBatterys(tmp2.mInvArmor.parts, maxCharge - charge); + charge = charge + loaded; + change(mStat, StatType.PARTSCHARGE, -loaded); + + } + switch (tmp.armorType) { + case 0: + helmet = tmp.data; + break; + case 1: + chestplate = tmp.data; + break; + case 2: + leggings = tmp.data; + break; + case 3: + boots = tmp.data; + break; + default: + break; + } + writeToNBT(stack.getTagCompound()); } - }else if(tab==1){ + } + if (helmet != null && chestplate != null && leggings != null && boots != null) { + set(mBStat, StatType.FULLARMOR, true); + boolean helmHasFullRadiationDefence=false; + boolean chestplateHasFullRadiationDefence=false; + boolean leggingsHasFullRadiationDefence=false; + boolean bootsHasFullRadiationDefence=false; - }else{ - if (x >= 28 && x <= 58) { - if (y >= 25 && y <= 32) { - list.add(GT_LanguageManager.getTranslation("Physical Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.PHYSICALDEFENCE) * 1000) / 10.0) + "%"); - } else if (y >= 33 && y <= 41) { - list.add(GT_LanguageManager.getTranslation("Projectile Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.PROJECTILEDEFENCE) * 1000) / 10.0) + "%"); - } else if (y >= 42 && y <= 50) { - list.add(GT_LanguageManager.getTranslation("Fire Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.FIREDEFENCE) * 1000) / 10.0) + "%"); - } else if (y >= 51 && y <= 59) { - list.add(GT_LanguageManager.getTranslation("Magical Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.MAGICDEFENCE) * 1000) / 10.0) + "%"); - } else if (y >= 60 && y <= 68) { - list.add(GT_LanguageManager.getTranslation("Explosion Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.EXPLOSIONDEFENCE) * 1000) / 10.0) + "%"); + boolean helmHasFullElectricalDefenceDefence=false; + boolean chestplateHasFullElectricalDefenceDefence=false; + boolean leggingsHasFullElectricalDefenceDefence=false; + boolean bootsHasFullElectricalDefenceDefence=false; + //Check each armor pieces for valid mStat value and verify that the Hash contains the StatType key + if(helmet.mStat!= null) + { + if(helmet.mStat.containsKey(StatType.RADIATIONDEFENCE)) + { + helmHasFullRadiationDefence = helmet.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; + } + if(helmet.mStat.containsKey(StatType.ELECTRICALDEFENCE)) + { + helmHasFullElectricalDefenceDefence = helmet.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; + } + } + if(chestplate.mStat!= null) + { + if(chestplate.mStat.containsKey(StatType.RADIATIONDEFENCE)) + { + chestplateHasFullRadiationDefence = chestplate.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; + } + if(chestplate.mStat.containsKey(StatType.ELECTRICALDEFENCE)) + { + chestplateHasFullElectricalDefenceDefence = chestplate.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; + } } - } else if (x >= 59 && x <= 90) { - if (y >= 25 && y <= 32) { - list.add(GT_LanguageManager.getTranslation("Radiation Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.RADIATIONDEFENCE) * 1000) / 10.0) + "%"); - if(cont.mInvArmor.data.mBStat.get(StatType.FULLRADIATIONARMOR)){ - list.add(GT_LanguageManager.getTranslation("Radiation Immunity"));} - } else if (y >= 33 && y <= 41) { - list.add(GT_LanguageManager.getTranslation("Electrical Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.ELECTRICALDEFENCE) * 1000) / 10.0) + "%"); - if(cont.mInvArmor.data.mBStat.get(StatType.FULLELECTRICARMOR)){ - list.add(GT_LanguageManager.getTranslation("Electric Immunity"));} - } else if (y >= 42 && y <= 50) { - list.add(GT_LanguageManager.getTranslation("Wither Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.WITHERDEFENCE) * 1000) / 10.0) + "%"); - } else if (y >= 51 && y <= 59) { - if(cont.mInvArmor.data.type!=3){ - list.add(GT_LanguageManager.getTranslation("Fall Damage absorbtion")); - list.add(GT_LanguageManager.getTranslation("Only for Boots")); - }else{ - list.add(GT_LanguageManager.getTranslation("Absorbs") + " " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.FALLDEFENCE)) + GT_LanguageManager.getTranslation("m of Fall Damage"));} - } else if (y >= 60 && y <= 68) { - if(x<69){ - list.add(GT_LanguageManager.getTranslation("Thorns") + ": " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.THORNSSINGLE)) + " Dmg"); - list.add(GT_LanguageManager.getTranslation("Total Thorns") + ": " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.THORNS)) + " Dmg"); - }else{ - list.add(GT_LanguageManager.getTranslation("Magnet") + ": " + cont.mInvArmor.data.mStat.get(StatType.MAGNETSINGLE) + " m"); - list.add(GT_LanguageManager.getTranslation("Total Magnet") + ": " + cont.mInvArmor.data.mStat.get(StatType.MAGNET) + " m");} + if(leggings.mStat!= null) + { + if(leggings.mStat.containsKey(StatType.RADIATIONDEFENCE)) + { + leggingsHasFullRadiationDefence = leggings.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; + } + if(leggings.mStat.containsKey(StatType.ELECTRICALDEFENCE)) + { + leggingsHasFullElectricalDefenceDefence = leggings.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; + } } + if(boots.mStat!= null) + { + if(boots.mStat.containsKey(StatType.RADIATIONDEFENCE)) + { + bootsHasFullRadiationDefence = boots.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; + } + if(boots.mStat.containsKey(StatType.ELECTRICALDEFENCE)) + { + bootsHasFullElectricalDefenceDefence = boots.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; + } + } + //Set Status of Full Armor types + set(mBStat, StatType.FULLRADIATIONARMOR, helmHasFullRadiationDefence&&chestplateHasFullRadiationDefence&&leggingsHasFullRadiationDefence &&bootsHasFullRadiationDefence); + set(mBStat, StatType.FULLELECTRICARMOR, helmHasFullElectricalDefenceDefence&&chestplateHasFullElectricalDefenceDefence&&leggingsHasFullElectricalDefenceDefence &&bootsHasFullElectricalDefenceDefence); + } else { + //Reset Full armor type status to false for all types if StatType.FULLARMOR is false + set(mBStat, StatType.FULLARMOR, false); + set(mBStat, StatType.FULLRADIATIONARMOR, false); + set(mBStat, StatType.FULLELECTRICARMOR, false); } + + + set(mBStat, StatType.MAGNET, 0); + set(mBStat, StatType.THORNS, 0); + set(mBStat, StatType.PROCESSINGPOWER, 0); + set(mBStat, StatType.PROCESSINGPOWERUSED, 0); + + if (helmet != null) { + updateArmorStats(helmet,updateArmorStatTypeList ); } - if (!list.isEmpty()) - drawHoveringText(list, x, y, fontRendererObj); - } - - public void drawBars(int x, int y, float value) { + if (chestplate != null) { + updateArmorStats(chestplate,updateArmorStatTypeList ); - int bar = (int) Math.floor(18 * value); - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - xStart += 8; - yStart += 1; - drawTexturedModalRect(xStart + x, yStart + y, 217, 26, bar, 5); - drawTexturedModalRect(xStart+ bar + x, yStart + y, 197+bar, 26, 18-bar, 5); + } + if (leggings != null) { + updateArmorStats(leggings,updateArmorStatTypeList ); + + } + if (boots != null) { + updateArmorStats(boots,updateArmorStatTypeList ); + + } + isTopItem = false; + if (type == 0) { + isTopItem = true; + } else if (helmet == null && type == 1) { + isTopItem = true; + } else if (helmet == null && chestplate == null && type == 2) { + isTopItem = true; + } else if (helmet == null && chestplate == null && leggings == null && type == 3) { + isTopItem = true; + } + if (helmet != null) { + maxWeight = helmet.mStat.get(StatType.WEIGHT); + } + if (chestplate != null) { + maxWeight += chestplate.mStat.get(StatType.WEIGHT); + } + if (leggings != null) { + maxWeight += leggings.mStat.get(StatType.WEIGHT); + } + if (boots != null) { + maxWeight += boots.mStat.get(StatType.WEIGHT); + } } - protected Slot getSlotAtPosition(int p_146975_1_, int p_146975_2_) { - for (int k = 0; k < cont.inventorySlots.size(); ++k) { - Slot slot = (Slot) cont.inventorySlots.get(k); - if (this.isMouseOverSlot(slot, p_146975_1_, p_146975_2_)) { - return slot; - } + private void updateArmorStats(ArmorData armorData, ArrayList statTypes) { + for (StatType statType : statTypes) { + if(armorData == null || armorData.mStat == null || !armorData.mStat.containsKey(statType)) + continue; +// if(armorData != null && armorData.mStat != null && armorData.mStat.containsKey(statType)) +// { + set(mStat, statType, armorData.mStat.get(statType)); +// } + /*change(mStat, StatType.MAGNET, armorData.mStat.get(StatType.MAGNET)); + change(mStat, StatType.THORNS, armorData.mStat.get(StatType.THORNS)); + change(mStat, StatType.PROCESSINGPOWER, armorData.mStat.get(StatType.PROCESSINGPOWER)); + change(mStat, StatType.PROCESSINGPOWERUSED, armorData.mStat.get(StatType.PROCESSINGPOWERUSED));*/ + } + + + } + + public void set(Map aMap, StatType aType, boolean aSet){ + if(aMap.containsKey(aType))aMap.remove(aType); + aMap.put(aType, aSet); + } + + public void set(Map aMap, StatType aType, float aSet){ + if(aMap.containsKey(aType))aMap.remove(aType); + aMap.put(aType, aSet); + } + + public void change(Map aMap, StatType aType, float aChange){ + float tChange = 0; + if(aMap==null)System.out.println("changeMapnull"); + if(aMap.containsKey(aType)){ + Object value = aMap.get(aType); + tChange = value != null ? (float) aMap.get(aType) : 0.0f; + aMap.remove(aType); } - return null; + aMap.put(aType, (tChange + aChange)); + } + + public void dechargeComponents(int aCharge){ + } - private boolean isMouseOverSlot(Slot p_146981_1_, int p_146981_2_, int p_146981_3_) { - return this.func_146978_c(p_146981_1_.xDisplayPosition, p_146981_1_.yDisplayPosition, 16, 16, p_146981_2_, p_146981_3_); + public double getBaseAbsorptionRatio() { + switch (this.type) { + case 0: + return 0.15; + case 1: + return 0.40; + case 2: + return 0.30; + case 3: + return 0.15; + default: + return 0.00; + } } -} \ No newline at end of file +} diff --git a/src/main/java/gregtech/common/items/armor/GuiElectricArmor1.java b/src/main/java/gregtech/common/items/armor/GuiElectricArmor1.java deleted file mode 100644 index 6857535d65..0000000000 --- a/src/main/java/gregtech/common/items/armor/GuiElectricArmor1.java +++ /dev/null @@ -1,299 +0,0 @@ -package gregtech.common.items.armor; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.util.GT_LanguageManager; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Slot; -import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; - -import java.text.DecimalFormat; -import java.text.DecimalFormatSymbols; -import java.text.NumberFormat; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; - -@SideOnly(Side.CLIENT) -public class GuiElectricArmor1 extends GuiContainer { - ContainerModularArmor cont; - EntityPlayer player; - private int tab; - - public GuiElectricArmor1(ContainerModularArmor containerModularArmor, EntityPlayer aPlayer) { - super(containerModularArmor); - player = aPlayer; - cont = containerModularArmor; - tab = 0; - } - - public String seperateNumber(long number){ - DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US); - DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols(); - symbols.setGroupingSeparator(' '); - return formatter.format(number); - } - - @Override - protected void drawGuiContainerForegroundLayer(int x, int y) { - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - int x2 = x - xStart; - int y2 = y - yStart; - drawTooltip(x2, y2 + 5); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { - GL11.glColor4f(1F, 1F, 1F, 1F); - this.mc.getTextureManager().bindTexture(new ResourceLocation("gregtech", "textures/gui/armorgui3x4.png")); - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - //Draw background - drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize); - //Draw active arrows - drawTexturedModalRect(xStart + 10, yStart + 70, 219, 11, 14, 5); - //Draw active armor symbol - switch (cont.mInvArmor.data.type) { - case 0: - drawTexturedModalRect(xStart + 73, yStart + 68, 177, 10, 10, 9); - break; - case 1: - drawTexturedModalRect(xStart + 83, yStart + 68, 187, 10, 10, 9); - break; - case 2: - drawTexturedModalRect(xStart + 93, yStart + 68, 197, 10, 10, 9); - break; - case 3: - drawTexturedModalRect(xStart + 103, yStart + 68, 207, 10, 10, 9); - break; - default: - break; - } - //Draw active tab - switch(tab){ - case 0: - break; - case 1: - drawTexturedModalRect(xStart + 7, yStart + 14, 2, 167, 104, 54); - break; - case 2: - drawTexturedModalRect(xStart + 7, yStart + 14, 107, 167, 104, 54); - break; - default: - break; - } - - if(cont.mInvArmor.data.tankCap>0){ - drawTexturedModalRect(xStart + 94, yStart + 32, 231, 69, 16, 34); - } - - int bar = (int) Math.floor(18 * (cont.mInvArmor.data.weight/(float)1000)); - drawTexturedModalRect(xStart + 15, yStart + 7, 217, 26, bar, 5); - drawTexturedModalRect(xStart + bar + 15, yStart + 7, 197+bar, 26, 18-bar, 5); - - if(tab==0){ - //processing power bar - bar = Math.min((int) Math.floor(52 * ((float)cont.mInvArmor.data.processingPowerUsed/(float)cont.mInvArmor.data.processingPower)),52); - drawTexturedModalRect(xStart + 17, yStart + 17, 177, 146, bar, 5); - drawTexturedModalRect(xStart + bar + 17, yStart + 17, 177+bar, 139, 52-bar, 5); - }else if(tab==1){ - - }else{ - //Def tab values - if(cont.mInvArmor.data.physicalDef>0)drawTexturedModalRect(xStart + 30, yStart + 20, 186, 33, 7, 7); - drawBars(31, 20, cont.mInvArmor.data.physicalDef); - if(cont.mInvArmor.data.projectileDef>0)drawTexturedModalRect(xStart + 30, yStart + 29, 186, 42, 7, 7); - drawBars(31, 29, cont.mInvArmor.data.projectileDef); - if(cont.mInvArmor.data.fireDef>0)drawTexturedModalRect(xStart + 30, yStart + 38, 186, 51, 7, 7); - drawBars(31, 38, cont.mInvArmor.data.fireDef); - if(cont.mInvArmor.data.magicDef>0)drawTexturedModalRect(xStart + 30, yStart + 47, 186, 60, 7, 7); - drawBars(31, 47, cont.mInvArmor.data.magicDef); - if(cont.mInvArmor.data.explosionDef>0)drawTexturedModalRect(xStart + 30, yStart + 56, 186, 69, 7, 7); - drawBars(31, 56, cont.mInvArmor.data.explosionDef); - if(cont.mInvArmor.data.radiationDef>0)drawTexturedModalRect(xStart + 61, yStart + 20, 186, 87, 7, 7); - drawBars(62, 20, cont.mInvArmor.data.radiationDef); - if(cont.mInvArmor.data.electricDef>0)drawTexturedModalRect(xStart + 61, yStart + 29, 186, 96, 7, 7); - drawBars(62, 29, cont.mInvArmor.data.electricDef); - if(cont.mInvArmor.data.witherDef>0)drawTexturedModalRect(xStart + 61, yStart + 38, 186, 105, 7, 7); - drawBars(62, 38, cont.mInvArmor.data.witherDef); - if(cont.mInvArmor.data.fallDef>0)drawTexturedModalRect(xStart + 61, yStart + 47, 186, 114, 7, 7); - if(cont.mInvArmor.data.thorns>0)drawTexturedModalRect(xStart + 61, yStart + 56, 186, 123, 7, 7); - if(cont.mInvArmor.data.magnet>0)drawTexturedModalRect(xStart + 70, yStart + 56, 186, 78, 7, 7); - } - - - } - - protected void mouseClicked(int mouseX, int mouseY, int mouseBtn) { - int xStart = mouseX-((width - xSize) / 2); - int yStart = mouseY-((height - ySize) / 2); - if(yStart>68&&yStart<77){ - if(xStart>18&&xStart<26){ - tab++; - }else if(xStart>8&&xStart<17){ - tab--; - } - if(tab>2){tab=0;} - if(tab<0){tab=2;} - if(xStart>72&&xStart<112){ - if(xStart>72&&xStart<81&&cont.mInvArmor.data.helmet!=null){cont.mInvArmor.data.helmet.openGui=true;player.closeScreen();} - if(xStart>82&&xStart<91&&cont.mInvArmor.data.chestplate!=null){cont.mInvArmor.data.chestplate.openGui=true;player.closeScreen();} - if(xStart>92&&xStart<101&&cont.mInvArmor.data.leggings!=null){cont.mInvArmor.data.leggings.openGui=true;player.closeScreen();} - if(xStart>102&&xStart<112&&cont.mInvArmor.data.boots!=null){cont.mInvArmor.data.boots.openGui=true;player.closeScreen();} - } - } -// Slot slot = getSlotAtPosition(mouseX, mouseY); -// if (slot != null && slot instanceof SlotFluid && player != null) { -// ItemStack tmp = player.inventory.getItemStack(); -// if (tmp == null) { -// GTExtras.NET.sendToServer(new FluidSync(player.getCommandSenderName(), 0, "null")); -// } -// if (tmp != null && tmp.getItem() instanceof IFluidContainerItem) { -// FluidStack tmp2 = ((IFluidContainerItem) tmp.getItem()).getFluid(tmp); -// if (!slot.getHasStack() && tmp2 != null) { -// slot.putStack(UT.Fluids.display(tmp2, true)); -// GTExtras.NET.sendToServer(new FluidSync(player.getCommandSenderName(), tmp2.amount, UT.Fluids.name(tmp2, false))); -// ItemStack tmp4 = UT.Fluids.getContainerForFilledItem(tmp, true); -// tmp4.stackSize = 1; -// if (tmp.stackSize > 1) { -// player.inventory.addItemStackToInventory(tmp4); -// tmp.stackSize--; -// player.inventory.setItemStack(tmp); -// GTExtras.NET.sendToServer(new FluidSync2(player.getCommandSenderName())); -// } else { -// player.inventory.setItemStack(null); -// player.inventory.addItemStackToInventory(tmp4); -// GTExtras.NET.sendToServer(new FluidSync2(player.getCommandSenderName())); -// } -// -// } else if (slot.getHasStack() && tmp2 != null) { -// Item fluidSlot = slot.getStack().getItem(); -// if (fluidSlot.getDamage(slot.getStack()) == tmp2.getFluidID()) { -// NBTTagCompound nbt = slot.getStack().getTagCompound(); -// if (nbt != null) { -// tmp2.amount += nbt.getLong("mFluidDisplayAmount"); -// ItemStack tmp3 = player.inventory.getItemStack(); -// if (tmp3.stackSize <= 1) { -// tmp3 = null; -// } else { -// tmp3.stackSize--; -// } -// player.inventory.setItemStack(tmp3); -// GTExtras.NET.sendToServer(new FluidSync2(player.getCommandSenderName())); -// slot.putStack(UT.Fluids.display(tmp2, true)); -// GTExtras.NET.sendToServer(new FluidSync(player.getCommandSenderName(), tmp2.amount, UT.Fluids.name(tmp2, false))); -// } -// } -// } -// } -// } - super.mouseClicked(mouseX, mouseY, mouseBtn); - } - - protected void drawTooltip(int x, int y) { - List list = new ArrayList(); - //General tooltips - if(x>=7&&y>=11&&x<=33&&y<=17){ - list.add(GT_LanguageManager.getTranslation("weight") + ": " + cont.mInvArmor.data.weight); - list.add("Total Weight: "+cont.mInvArmor.data.maxWeight); - if (cont.mInvArmor.data.weight > 1000) - list.add("Too Heavy!"); - } - if(x>=56&&y>=11&&x<=112&&y<=17){ - list.add("Stored Energy: "+seperateNumber(cont.mInvArmor.data.charge)+" EU"); - } - if(y>74&&y<83){ - if(x>8&&x<17){ - list.add("Previous Page"); - }else if(x>18&&x<27){ - list.add("Next Page"); - }else if(x>72&&x<80){ - list.add("Helmet"); - }else if(x>81&&x<90){ - list.add("Chestplate"); - }else if(x>91&&x<100){ - list.add("Leggings"); - }else if(x>101&&x<110){ - list.add("Boots"); - } - } - if(tab==0){ - if(x>=93&&y>=36&&x<=110&&y<=71){list.add("Tank Capacity: "+cont.mInvArmor.data.tankCap+"L"); - } - if(x>=7&&y>=22&&x<=70&&y<=28){list.add("Processing Power Provided: "+cont.mInvArmor.data.processingPower); - list.add("Processing Power Used: "+cont.mInvArmor.data.processingPowerUsed); - } - }else if(tab==1){ - - }else{ - if (x >= 28 && x <= 58) { - if (y >= 25 && y <= 32) { - list.add(GT_LanguageManager.getTranslation("phydef") + ": " + (Math.round(cont.mInvArmor.data.physicalDef * 1000) / 10.0) + "%"); - } else if (y >= 33 && y <= 41) { - list.add(GT_LanguageManager.getTranslation("prodef") + ": " + (Math.round(cont.mInvArmor.data.projectileDef * 1000) / 10.0) + "%"); - } else if (y >= 42 && y <= 50) { - list.add(GT_LanguageManager.getTranslation("firedef") + ": " + (Math.round(cont.mInvArmor.data.fireDef * 1000) / 10.0) + "%"); - } else if (y >= 51 && y <= 59) { - list.add(GT_LanguageManager.getTranslation("magdef") + ": " + (Math.round(cont.mInvArmor.data.magicDef * 1000) / 10.0) + "%"); - } else if (y >= 60 && y <= 68) { - list.add(GT_LanguageManager.getTranslation("expdef") + ": " + (Math.round(cont.mInvArmor.data.explosionDef * 1000) / 10.0) + "%"); - } - } else if (x >= 59 && x <= 90) { - if (y >= 25 && y <= 32) { - list.add(GT_LanguageManager.getTranslation("raddef") + ": " + (Math.round(cont.mInvArmor.data.radiationDef * 1000) / 10.0) + "%"); - if(cont.mInvArmor.data.fullRadiationDef){ - list.add("Radiation Immunity");} - } else if (y >= 33 && y <= 41) { - list.add(GT_LanguageManager.getTranslation("eledef") + ": " + (Math.round(cont.mInvArmor.data.electricDef * 1000) / 10.0) + "%"); - if(cont.mInvArmor.data.fullElectricDef){ - list.add("Electric Immunity");} - } else if (y >= 42 && y <= 50) { - list.add(GT_LanguageManager.getTranslation("whidef") + ": " + (Math.round(cont.mInvArmor.data.witherDef * 1000) / 10.0) + "%"); - } else if (y >= 51 && y <= 59) { - if(cont.mInvArmor.data.type!=3){ - list.add("Fall Damage absorbtion"); - list.add("Only for Boots"); - }else{ - list.add(GT_LanguageManager.getTranslation("abs1") + " " + (int) Math.round(cont.mInvArmor.data.fallDef) + GT_LanguageManager.getTranslation("abs2"));} - } else if (y >= 60 && y <= 68) { - if(x<69){ - list.add(GT_LanguageManager.getTranslation("thorns") + ": " + (int) Math.round(cont.mInvArmor.data.thornsSingle) + " Dmg"); - list.add("Total "+GT_LanguageManager.getTranslation("thorns") + ": " + (int) Math.round(cont.mInvArmor.data.thorns) + " Dmg"); - }else{ - list.add(GT_LanguageManager.getTranslation("magnet") + ": " + cont.mInvArmor.data.magnetSingle + " m"); - list.add("Total "+GT_LanguageManager.getTranslation("magnet") + ": " + cont.mInvArmor.data.magnet + " m");} - } - } - } - if (!list.isEmpty()) - drawHoveringText(list, x, y, fontRendererObj); - } - - public void drawBars(int x, int y, float value) { - - int bar = (int) Math.floor(18 * value); - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - xStart += 8; - yStart += 1; - drawTexturedModalRect(xStart + x, yStart + y, 217, 26, bar, 5); - drawTexturedModalRect(xStart+ bar + x, yStart + y, 197+bar, 26, 18-bar, 5); - } - - protected Slot getSlotAtPosition(int p_146975_1_, int p_146975_2_) { - for (int k = 0; k < cont.inventorySlots.size(); ++k) { - Slot slot = (Slot) cont.inventorySlots.get(k); - if (this.isMouseOverSlot(slot, p_146975_1_, p_146975_2_)) { - return slot; - } - } - return null; - } - - private boolean isMouseOverSlot(Slot p_146981_1_, int p_146981_2_, int p_146981_3_) { - return this.func_146978_c(p_146981_1_.xDisplayPosition, p_146981_1_.yDisplayPosition, 16, 16, p_146981_2_, p_146981_3_); - } -} diff --git a/src/main/java/gregtech/common/items/armor/Vector3.java b/src/main/java/gregtech/common/items/armor/Vector3.java index 2f79ff4c69..590f544546 100644 --- a/src/main/java/gregtech/common/items/armor/Vector3.java +++ b/src/main/java/gregtech/common/items/armor/Vector3.java @@ -1,7 +1,8 @@ package gregtech.common.items.armor; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import java.math.BigDecimal; +import java.math.MathContext; +import java.math.RoundingMode; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; @@ -9,10 +10,8 @@ import net.minecraft.util.Vec3; import org.lwjgl.opengl.GL11; import org.lwjgl.util.vector.Vector3f; import org.lwjgl.util.vector.Vector4f; - -import java.math.BigDecimal; -import java.math.MathContext; -import java.math.RoundingMode; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class Vector3 { public static Vector3 zero = new Vector3(); diff --git a/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java b/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java index 1f63afac5e..0258a3eb3c 100644 --- a/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java +++ b/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java @@ -4,7 +4,9 @@ import gregtech.common.items.armor.ArmorData; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; diff --git a/src/main/java/gregtech/common/items/armor/gui/FluidSync.java b/src/main/java/gregtech/common/items/armor/gui/FluidSync.java index 0e17a82ee8..8f1aef56d1 100644 --- a/src/main/java/gregtech/common/items/armor/gui/FluidSync.java +++ b/src/main/java/gregtech/common/items/armor/gui/FluidSync.java @@ -1,5 +1,14 @@ package gregtech.common.items.armor.gui; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.WorldServer; +import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + +import com.google.common.base.Charsets; +import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataOutput; import com.google.common.io.ByteStreams; diff --git a/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java b/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java index 6882e67268..75c3c6d363 100644 --- a/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java +++ b/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java @@ -1,5 +1,15 @@ package gregtech.common.items.armor.gui; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.WorldServer; +import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + +import com.google.common.base.Charsets; +import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataOutput; import com.google.common.io.ByteStreams; diff --git a/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java b/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java index 63e8873df9..a3d2bdaf09 100644 --- a/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java +++ b/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java @@ -1,9 +1,16 @@ package gregtech.common.items.armor.gui; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import scala.reflect.internal.Trees.This; +import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.FluidRegistry; public class SlotFluid extends Slot{ diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java index b26a86a943..a6cf271d30 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java @@ -1,6 +1,7 @@ package gregtech.common.tileentities.machines.basic; import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -8,6 +9,7 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; +import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java index 19a4e97d4b..406a46a93b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java @@ -1,9 +1,6 @@ package gregtech.common.tileentities.machines.basic; -import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures; +import gregtech.api.enums.*; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java index cfef1ba345..cf5540aed6 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java @@ -98,7 +98,7 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic } } if(tStringList.size()<1){tStringList.add("No Ores found.");} - FluidStack tFluid = GT_Utility.undergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord()>>4, getBaseMetaTileEntity().getZCoord()>>4,false,0); + FluidStack tFluid = null;//<---GT_Utility.undergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord()>>4, getBaseMetaTileEntity().getZCoord()>>4,false,0);//TODO FIX String[] tStringArray = new String[tStringList.size()]; { for (int i = 0; i < tStringArray.length; i++) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java index cd769e31ec..8751da47f3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java @@ -237,7 +237,7 @@ public class GT_MetaTileEntity_BronzeBlastFurnace XSTR floatGen=new XSTR(); aWorld.spawnParticle("largesmoke", xPos + floatGen.nextFloat(), yPos, zPos + floatGen.nextFloat(), 0.0D, 0.3D, 0.0D); //Pollution particles intensify - if(GT_Pollution.getPollutionAtCoords(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getZCoord())>GT_Mod.gregtechproxy.mPollutionSmogLimit){ + if(GT_Pollution.getPollutionAtCoords(aWorld,this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getZCoord())>GT_Mod.gregtechproxy.mPollutionSmogLimit){ aWorld.spawnParticle("largesmoke", xPos + floatGen.nextFloat(), yPos, zPos + floatGen.nextFloat(), 0.0D, 0.45D, 0.0D); aWorld.spawnParticle("largesmoke", xPos + floatGen.nextFloat(), yPos, zPos + floatGen.nextFloat(), 0.0D, 0.6D, 0.0D); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java index d1a3adb3af..39da260e8e 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java @@ -16,171 +16,197 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBase { -private int mHeatingCapacity = 0; - -public GT_MetaTileEntity_Cleanroom(int aID, String aName, String aNameRegional) { -super(aID, aName, aNameRegional); -} - -public GT_MetaTileEntity_Cleanroom(String aName) { -super(aName); -} - -public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { -return new GT_MetaTileEntity_Cleanroom(this.mName); -} - -public String[] getDescription() { -return new String[]{ - "Controller Block for the Cleanroom", - "Min(WxHxD): 3x3x3 (Hollow), Max(WxHxD): 15x15x15 (Hollow)", - "Controller (Top center), Walls Plascrete", - "Top besides contoller and corners filter casings", - "1 Reinforced Door", - "1x Energy Hatch, 1x Maintainance Hatch", - "up to 10 Machine Hull to transfer Items&Energy inside", - ""}; -} - -public boolean checkRecipe(ItemStack aStack) { - this.mEfficiencyIncrease = 100; - this.mMaxProgresstime = 100; - this.mEUt = -4; -return true; -} - -public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - int x=1; - int z=1; - int y=1; - int mDoorCount=0; - int mHullCount=0; - int mPlascreteCount=0; - boolean doorState=false; - mUpdate = 100; - for(int i = 1;i<8;i++){ - Block tBlock = aBaseMetaTileEntity.getBlockOffset(i, 0, 0); - int tMeta = aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0); - if(tBlock != GregTech_API.sBlockCasings3 || tMeta != 11){ - if(tBlock ==GregTech_API.sBlockReinforced || tMeta == 2){ - x=i; - z=i; + private int mHeatingCapacity = 0; + + public GT_MetaTileEntity_Cleanroom(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT_MetaTileEntity_Cleanroom(String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Cleanroom(this.mName); + } + + @Override + public String[] getDescription() { + return new String[]{ + "Controller Block for the Cleanroom", + "Min(WxHxD): 3x3x3 (Hollow), Max(WxHxD): 15x15x15 (Hollow)", + "Controller (Top center), Walls Plascrete", + "Top besides contoller and corners filter casings", + "1 Reinforced Door", + "1x Energy Hatch, 1x Maintainance Hatch", + "up to 10 Machine Hull to transfer Items&Energy inside", + ""}; + } + + @Override + public boolean checkRecipe(ItemStack aStack) { + this.mEfficiencyIncrease = 100; + this.mMaxProgresstime = 100; + this.mEUt = -4; + return true; + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + int x = 1; + int z = 1; + int y = 1; + int mDoorCount = 0; + int mHullCount = 0; + int mPlascreteCount = 0; + boolean doorState = false; + mUpdate = 100; + for (int i = 1; i < 8; i++) { + Block tBlock = aBaseMetaTileEntity.getBlockOffset(i, 0, 0); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0); + if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) { + if (tBlock == GregTech_API.sBlockReinforced || tMeta == 2) { + x = i; + z = i; + break; + } else { + return false; + } + } + } + for (int i = -1; i > -16; i--) { + Block tBlock = aBaseMetaTileEntity.getBlockOffset(x, i, z); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(x, i, z); + if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) { + y = i + 1; break; - }else{return false;} + } } - } - for(int i = -1; i>-16;i--){ - Block tBlock = aBaseMetaTileEntity.getBlockOffset(x, i, z); - int tMeta = aBaseMetaTileEntity.getMetaIDOffset(x, i, z); - if(tBlock != GregTech_API.sBlockReinforced || tMeta != 2){ - y = i+1; - break; + if (y > -2) { + return false; } - } - if(y>-2){return false;} - for(int dX=-x;dX<=x;dX++){ - for(int dZ=-z;dZ<=z;dZ++){ - for(int dY=0;dY>=y;dY--){ - if(dX==-x||dX==x||dY==-y||dY==y||dZ==-z||dZ==z){ - Block tBlock = aBaseMetaTileEntity.getBlockOffset(dX, dY, dZ); - int tMeta = aBaseMetaTileEntity.getMetaIDOffset(dX, dY, dZ); - if(y==0){ - if(dX==-x||dX==x||dZ==-z||dZ==z){ - if(tBlock!=GregTech_API.sBlockReinforced||tMeta!=2){return false;} - }else if(dX==0&&dZ==0){ - }else { - if(tBlock!=GregTech_API.sBlockCasings3||tMeta!=11){return false;} - } - }else if(tBlock==GregTech_API.sBlockReinforced&&tMeta==2){ - mPlascreteCount++; - }else{ - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); - if((!addMaintenanceToMachineList(tTileEntity, 82)) && (!addEnergyInputToMachineList(tTileEntity, 82))){ - if(tBlock instanceof ic2.core.block.BlockIC2Door){ - if((tMeta&8)==0){ - doorState=(Math.abs(dX)>Math.abs(dZ)==((tMeta&1)!=0))!=((tMeta&4)!=0); + for (int dX = -x; dX <= x; dX++) { + for (int dZ = -z; dZ <= z; dZ++) { + for (int dY = 0; dY >= y; dY--) { + if (dX == -x || dX == x || dY == -y || dY == y || dZ == -z || dZ == z) { + Block tBlock = aBaseMetaTileEntity.getBlockOffset(dX, dY, dZ); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(dX, dY, dZ); + if (y == 0) { + if (dX == -x || dX == x || dZ == -z || dZ == z) { + if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) { + return false; + } + } else if (dX == 0 && dZ == 0) { + } else { + if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) { + return false; + } + } + } else if (tBlock == GregTech_API.sBlockReinforced && tMeta == 2) { + mPlascreteCount++; + } else { + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); + if ((!addMaintenanceToMachineList(tTileEntity, 82)) && (!addEnergyInputToMachineList(tTileEntity, 82))) { + if (tBlock instanceof ic2.core.block.BlockIC2Door) { + if ((tMeta & 8) == 0) { + doorState = (Math.abs(dX) > Math.abs(dZ) == ((tMeta & 1) != 0)) != ((tMeta & 4) != 0); + } + mDoorCount++; + } else { + if (tTileEntity == null) { + { + return false; + } + } + IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicHull) { + mHullCount++; + } else { + return false; + } + } } - mDoorCount++; - }else{ - if (tTileEntity == null) { - {return false;} - } - IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) {return false;} - if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicHull){mHullCount++; - }else {return false;} } + } else { + } } - }else{ - - } } } - } - if(mMaintenanceHatches.size()!=1||mEnergyHatches.size()!=1||mDoorCount!=2||mHullCount>10){return false;} - for(int dX=-x+1;dX<=x-1;dX++){ - for(int dZ=-z+1;dZ<=z-1;dZ++){ - for(int dY=-1;dY>=y+1;dY--){ - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); - if(tTileEntity!=null){ - IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); - if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_BasicMachine_GT_Recipe){ - ((GT_MetaTileEntity_BasicMachine_GT_Recipe)aMetaTileEntity).mCleanroom = this; + if (mMaintenanceHatches.size() != 1 || mEnergyHatches.size() != 1 || mDoorCount != 2 || mHullCount > 10) { + return false; + } + for (int dX = -x + 1; dX <= x - 1; dX++) { + for (int dZ = -z + 1; dZ <= z - 1; dZ++) { + for (int dY = -1; dY >= y + 1; dY--) { + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); + if (tTileEntity != null) { + IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); + if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_BasicMachine_GT_Recipe) { + ((GT_MetaTileEntity_BasicMachine_GT_Recipe) aMetaTileEntity).mCleanroom = this; + } } } } } - } - - if(doorState){ - mEfficiency=Math.max(0,mEfficiency-200); - } -return true; -} + if (doorState) { + mEfficiency = Math.max(0, mEfficiency - 200); + } -public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { -if (aSide == 0 || aSide == 1) { - return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE), new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_ACTIVE : Textures.BlockIcons.OVERLAY_TOP_CLEANROOM)}; + return true; + } -} -return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE)}; -} + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == 0 || aSide == 1) { + return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE), new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_ACTIVE : Textures.BlockIcons.OVERLAY_TOP_CLEANROOM)}; -public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { -return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MultiblockDisplay.png"); -} + } + return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE)}; + } -public GT_Recipe.GT_Recipe_Map getRecipeMap() { -return null; -} + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MultiblockDisplay.png"); + } -public boolean isCorrectMachinePart(ItemStack aStack) { -return true; -} + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return null; + } -public boolean isFacingValid(byte aFacing) { -return aFacing > 1; -} + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } -public int getMaxEfficiency(ItemStack aStack) { -return 10000; -} + @Override + public boolean isFacingValid(byte aFacing) { + return aFacing > 1; + } -public int getPollutionPerTick(ItemStack aStack) { -return 0; -} + @Override + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } -public int getDamageToComponent(ItemStack aStack) { -return 0; -} + @Override + public int getPollutionPerTick(ItemStack aStack) { + return 0; + } -public int getAmountOfOutputs() { -return 0; -} + @Override + public int getDamageToComponent(ItemStack aStack) { + return 0; + } -public boolean explodesOnComponentBreak(ItemStack aStack) { -return false; -} + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } } \ No newline at end of file diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java index 9cb614478d..26885c89a2 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java @@ -24,6 +24,7 @@ import java.util.ArrayList; public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase {//TODO REWORK private boolean completedCycle = false; + private int extractionSpeed=0; public GT_MetaTileEntity_OilDrill(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -78,7 +79,7 @@ public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase } } //Output fluid - FluidStack tFluid = GT_Utility.undergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord()>>4, getBaseMetaTileEntity().getZCoord()>>4,false,0); + FluidStack tFluid = null;//GT_Utility.undergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord()>>4, getBaseMetaTileEntity().getZCoord()>>4,false,0);//TODO FIX if (tFluid == null){ extractionSpeed=0; stopMachine(); @@ -100,7 +101,7 @@ public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase if(tFluid.amount>minExtraction) tFluid.amount= Math.max(minExtraction,Math.min(tFluid.amount/50000,500)); extractionSpeed=tFluid.amount; - GT_Utility.undergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord()>>4, getBaseMetaTileEntity().getZCoord()>>4,true,extractionSpeed); + //GT_Utility.undergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord()>>4, getBaseMetaTileEntity().getZCoord()>>4,true,extractionSpeed);//TODO FIX } this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; diff --git a/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java b/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java index 68ee13322c..b18b28dc73 100644 --- a/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java +++ b/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java @@ -41,7 +41,7 @@ public class ProcessingModSupport implements gregtech.api.interfaces.IMaterialHa Materials.Terbium.mHasParentMod = false; Materials.Thulium.mHasParentMod = false; Materials.Ytterbium.mHasParentMod = false; - Materials.Endium.mHasParentMod = false; + Materials.HeeEndium.mHasParentMod = false; Materials.DarkIron.mHasParentMod = false; Materials.ElectrumFlux.mHasParentMod = false; Materials.Force.mHasParentMod = false; @@ -78,7 +78,7 @@ public class ProcessingModSupport implements gregtech.api.interfaces.IMaterialHa Materials.ShadowIron.mHasParentMod = false; Materials.ShadowSteel.mHasParentMod = false; Materials.AstralSilver.mHasParentMod = false; - Materials.Midasium.mHasParentMod = false; + Materials.Trinium.mHasParentMod = false; } if (!aEnableThaumcraftMats) { Materials.Amber.mHasParentMod = false; @@ -101,7 +101,7 @@ public class ProcessingModSupport implements gregtech.api.interfaces.IMaterialHa Materials.Gabbro.mHasParentMod = false; Materials.Gneiss.mHasParentMod = false; Materials.Greenschist.mHasParentMod = false; - Materials.Greywacke.mHasParentMod = false; + //Materials.Greywacke.mHasParentMod = false; Materials.Komatiite.mHasParentMod = false; Materials.Rhyolite.mHasParentMod = false; } diff --git a/src/main/java/gregtech/loaders/misc/GT_Achievements.java b/src/main/java/gregtech/loaders/misc/GT_Achievements.java index 9143e5fd95..cf92dbcb46 100644 --- a/src/main/java/gregtech/loaders/misc/GT_Achievements.java +++ b/src/main/java/gregtech/loaders/misc/GT_Achievements.java @@ -47,41 +47,42 @@ public class GT_Achievements { public int adjY = 9; public GT_Achievements() { - this.achievementList = new ConcurrentHashMap(); - this.issuedAchievements = new ConcurrentHashMap(); + this.achievementList = new ConcurrentHashMap<>(); + this.issuedAchievements = new ConcurrentHashMap<>(); int oreList_sS=oreList.size(); for (int i = 0; i < oreList_sS; i++) { if (oreList.get(i) != null) { if (GT_Values.D1 && this.achievementList.get(oreList.get(i).mName) == null) { GT_Log.out.println("achievement." + oreList.get(i).mName + "=Find " + oreList.get(i).mName + " Ore"); - StringBuilder dimensions = new StringBuilder(); - boolean isFirst = true; - if(oreStats.get(i)[3] == 1) { - dimensions.append("Overworld"); - isFirst = false; - } - if(oreStats.get(i)[4] == 1) { - if(!isFirst) dimensions.append("/"); - dimensions.append("Nether"); - isFirst = false; - } - if(oreStats.get(i)[5] == 1) { - if(!isFirst) dimensions.append("/"); - dimensions.append("End"); - isFirst = false; + StringBuilder dimensions = new StringBuilder(); + boolean isFirst = true; + if (oreStats.get(i)[3] == 1) { + dimensions.append("Overworld"); + isFirst = false; + } + if (oreStats.get(i)[4] == 1) { + if (!isFirst) dimensions.append("/"); + dimensions.append("Nether"); + isFirst = false; + } + if (oreStats.get(i)[5] == 1) { + if (!isFirst) dimensions.append("/"); + dimensions.append("End"); + isFirst = false; + } + GT_Log.out.println("achievement." + oreList.get(i).mName + ".desc=Height: " + (oreStats.get(i)[0]) + "-" + (oreStats.get(i)[1]) + ", Chance: " + (oreStats.get(i)[2]) + ", " + dimensions.toString()); } - GT_Log.out.println("achievement." + oreList.get(i).mName + ".desc=Height: " + (oreStats.get(i)[0]) + "-" + (oreStats.get(i)[1]) + ", Chance: " + (oreStats.get(i)[2]) + ", " + dimensions.toString()); - } - //if(oreList.get(i)==null) - // GT_Log.out.println("GT Achievement - Ore with NULL pointer material tries to register achievement."); - //if(oreList.get(i).name()==null) - // GT_Log.out.println("GT Achievement - Ore with NULL named material tries to register achievement."); - //else + //if(oreList.get(i)==null) + // GT_Log.out.println("GT Achievement - Ore with NULL pointer material tries to register achievement."); + //if(oreList.get(i).name()==null) + // GT_Log.out.println("GT Achievement - Ore with NULL named material tries to register achievement."); + //else registerOreAchievement(oreList.get(i)); + } } - for(GT_Recipe recipe: GT_Recipe.GT_Recipe_Map.sAssemblylineFakeRecipes.mRecipeList) + for(GT_Recipe recipe: GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList) registerAssAchievement(recipe); registerAchievement("flintpick", 0, 0, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(2, 1, Materials.Flint, Materials.Wood, null), "", false); @@ -621,7 +622,7 @@ public class GT_Achievements { (stack.getItem() == Ic2Items.quantumHelmet.getItem()) || (stack.getItem() == Ic2Items.quantumLeggings.getItem())) { issueAchievement(player, "buildQArmor"); } - for(GT_Recipe recipe: GT_Recipe.GT_Recipe_Map.sAssemblylineFakeRecipes.mRecipeList){ + for(GT_Recipe recipe: GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList){ if(recipe.getOutput(0).getUnlocalizedName().equals(stack.getUnlocalizedName())) { issueAchievement(player, recipe.getOutput(0).getUnlocalizedName()); recipe.mHidden=false; diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index d3f6f5a99d..330a4f62b5 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -1,5 +1,6 @@ package gregtech.loaders.postload; +import com.dreammaster.gthandler.CustomItemList; import cpw.mods.fml.common.Loader; import gregtech.GT_Mod; import gregtech.api.GregTech_API; 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 ae5e54ffa2..ce8603dd1c 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -23,9 +23,7 @@ import gregtech.common.tileentities.machines.GT_MetaTileEntity_BasicHull_SteelBr import gregtech.common.tileentities.machines.basic.*; import gregtech.common.tileentities.machines.multi.*; import gregtech.common.tileentities.machines.steam.*; -import gregtech.common.tileentities.storage.GT_MetaTileEntity_Locker; -import gregtech.common.tileentities.storage.GT_MetaTileEntity_QuantumChest; -import gregtech.common.tileentities.storage.GT_MetaTileEntity_QuantumTank; +import gregtech.common.tileentities.storage.*; import ic2.core.Ic2Items; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -299,7 +297,7 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI //GT_ModHandler.addCraftingRecipe(ItemList.Quantum_Chest_EV.get(1L, new Object[0]), bitsd, new Object[]{"DPD", aTextPlateMotor, "DGD", 'M', ItemList.Hull_EV, 'G', ItemList.Field_Generator_EV, 'D', OrePrefixes.circuit.get(Materials.Master), 'P', OrePrefixes.plate.get(Materials.Europium)}); //GT_ModHandler.addCraftingRecipe(ItemList.Quantum_Chest_IV.get(1L, new Object[0]), bitsd, new Object[]{"DPD", aTextPlateMotor, "DGD", 'M', ItemList.Hull_IV, 'G', ItemList.Field_Generator_IV, 'D', OrePrefixes.circuit.get(Materials.Ultimate), 'P', OrePrefixes.plate.get(Materials.Americium)}); - ItemList.Super_Tank_LV.set(new GT_MetaTileEntity_SuperTank(130, "super.tank.tier.01", "Super Tank I", 1).getStackForm(1L)); + ItemList.Super_Tank_LV.set(new GT_MetaTileEntity_SuperTank(130, "super.tank.tier.01", "Super Tank I", 1).getStackForm(1L)); ItemList.Super_Tank_MV.set(new GT_MetaTileEntity_SuperTank(131, "super.tank.tier.02", "Super Tank II", 2).getStackForm(1L)); ItemList.Super_Tank_HV.set(new GT_MetaTileEntity_SuperTank(132, "super.tank.tier.03", "Super Tank III", 3).getStackForm(1L)); ItemList.Super_Tank_EV.set(new GT_MetaTileEntity_SuperTank(133, "super.tank.tier.04", "Super Tank IV", 4).getStackForm(1L)); @@ -1104,10 +1102,10 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI ItemList.Generator_Naquadah_Mark_III.set(new GT_MetaTileEntity_FluidNaquadahReactor(1192, "basicgenerator.naquadah.tier.06", "Naquadah Reactor Mark III", 6).getStackForm(1L)); ItemList.Generator_Naquadah_Mark_IV.set(new GT_MetaTileEntity_SolidNaquadahReactor3(1180, "basicgenerator.naquadah.tier.07", "Naquadah Reactor Mark IV", 7).getStackForm(1L)); ItemList.Generator_Naquadah_Mark_V.set(new GT_MetaTileEntity_SolidNaquadahReactor4(1181, "basicgenerator.naquadah.tier.08", "Naquadah Reactor Mark V", 8).getStackForm(1L)); - + //TODO CHECH RECIPES GT_ModHandler.addCraftingRecipe(ItemList.Generator_Naquadah_Mark_I.get(1L, new Object[0]), bitsd, new Object[]{"UCU", "FMF", aTextWireCoil, 'M', ItemList.Hull_EV, 'F', ItemList.Field_Generator_EV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.cableGt04.get(Materials.Aluminium), 'U', OrePrefixes.stick.get(Materials.Uranium235)}); GT_ModHandler.addCraftingRecipe(ItemList.Generator_Naquadah_Mark_II.get(1L, new Object[0]), bitsd, new Object[]{"PCP", "FMF", aTextWireCoil, 'M', ItemList.Hull_IV, 'F', ItemList.Field_Generator_IV, 'C', OrePrefixes.circuit.get(Materials.Master), 'W', OrePrefixes.cableGt04.get(Materials.Tungsten), 'P', OrePrefixes.stick.get(Materials.Plutonium241)}); - GT_ModHandler.addCraftingRecipe(ItemList.Generator_Naquadah_Fluid.get(1L, new Object[0]), bitsd, new Object[]{"NCN", "FMF", aTextWireCoil, 'M', ItemList.Hull_LuV, 'F', ItemList.Field_Generator_LuV, 'C', OrePrefixes.circuit.get(Materials.Ultimate), 'W', OrePrefixes.cableGt04.get(Materials.NiobiumTitanium), 'N', OrePrefixes.stick.get(Materials.NaquadahEnriched)}); + GT_ModHandler.addCraftingRecipe(ItemList.Generator_Naquadah_Mark_III.get(1L, new Object[0]), bitsd, new Object[]{"NCN", "FMF", aTextWireCoil, 'M', ItemList.Hull_LuV, 'F', ItemList.Field_Generator_LuV, 'C', OrePrefixes.circuit.get(Materials.Ultimate), 'W', OrePrefixes.cableGt04.get(Materials.NiobiumTitanium), 'N', OrePrefixes.stick.get(Materials.NaquadahEnriched)}); ItemList.MagicEnergyConverter_LV.set(new GT_MetaTileEntity_MagicEnergyConverter(1123, "basicgenerator.magicenergyconverter.tier.01", "Novice Magic Energy Converter", 1).getStackForm(1L)); ItemList.MagicEnergyConverter_MV.set(new GT_MetaTileEntity_MagicEnergyConverter(1124, "basicgenerator.magicenergyconverter.tier.02", "Adept Magic Energy Converter", 2).getStackForm(1L)); @@ -1525,19 +1523,19 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI } private static void makeWires(Materials aMaterial, int aStartID, long aLossInsulated, long aLoss, long aAmperage, long aVoltage, boolean aInsulatable, boolean aAutoInsulated) { - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt01, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 0, aTextWire1 + aMaterial.name().toLowerCase() + ".01", "1x " + aMaterial.mDefaultLocalName + aTextWire2, 0.125F, aMaterial, aLoss, 1L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt02, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 1, aTextWire1 + aMaterial.name().toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + aTextWire2, 0.25F, aMaterial, aLoss, 2L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt04, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 2, aTextWire1 + aMaterial.name().toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + aTextWire2, 0.375F, aMaterial, aLoss, 4L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt08, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 3, aTextWire1 + aMaterial.name().toLowerCase() + ".08", "8x " + aMaterial.mDefaultLocalName + aTextWire2, 0.5F, aMaterial, aLoss, 8L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt12, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 4, aTextWire1 + aMaterial.name().toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + aTextWire2, 0.625F, aMaterial, aLoss, 12L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt16, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 5, aTextWire1 + aMaterial.name().toLowerCase() + ".16", "16x " + aMaterial.mDefaultLocalName + aTextWire2, 0.75F, aMaterial, aLoss, 16L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt01, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 0, aTextWire1 + aMaterial.mName.toLowerCase() + ".01", "1x " + aMaterial.mDefaultLocalName + aTextWire2, 0.125F, aMaterial, aLoss, 1L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt02, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 1, aTextWire1 + aMaterial.mName.toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + aTextWire2, 0.25F, aMaterial, aLoss, 2L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt04, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 2, aTextWire1 + aMaterial.mName.toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + aTextWire2, 0.375F, aMaterial, aLoss, 4L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt08, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 3, aTextWire1 + aMaterial.mName.toLowerCase() + ".08", "8x " + aMaterial.mDefaultLocalName + aTextWire2, 0.5F, aMaterial, aLoss, 8L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt12, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 4, aTextWire1 + aMaterial.mName.toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + aTextWire2, 0.625F, aMaterial, aLoss, 12L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt16, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 5, aTextWire1 + aMaterial.mName.toLowerCase() + ".16", "16x " + aMaterial.mDefaultLocalName + aTextWire2, 0.75F, aMaterial, aLoss, 16L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); if (aInsulatable) { - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt01, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 6, aTextCable1 + aMaterial.name().toLowerCase() + ".01", "1x " + aMaterial.mDefaultLocalName + aTextCable2, 0.25F, aMaterial, aLossInsulated, 1L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt02, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 7, aTextCable1 + aMaterial.name().toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + aTextCable2, 0.375F, aMaterial, aLossInsulated, 2L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt04, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 8, aTextCable1 + aMaterial.name().toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + aTextCable2, 0.5F, aMaterial, aLossInsulated, 4L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt08, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 9, aTextCable1 + aMaterial.name().toLowerCase() + ".08", "8x " + aMaterial.mDefaultLocalName + aTextCable2, 0.625F, aMaterial, aLossInsulated, 8L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt12, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 10, aTextCable1 + aMaterial.name().toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + aTextCable2, 0.75F, aMaterial, aLossInsulated, 12L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt16, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 11, aTextCable1 + aMaterial.name().toLowerCase() + ".16", "16x " + aMaterial.mDefaultLocalName + aTextCable2, 0.875F, aMaterial, aLossInsulated, 16L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.cableGt01, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 6, aTextCable1 + aMaterial.mName.toLowerCase() + ".01", "1x " + aMaterial.mDefaultLocalName + aTextCable2, 0.25F, aMaterial, aLossInsulated, 1L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.cableGt02, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 7, aTextCable1 + aMaterial.mName.toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + aTextCable2, 0.375F, aMaterial, aLossInsulated, 2L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.cableGt04, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 8, aTextCable1 + aMaterial.mName.toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + aTextCable2, 0.5F, aMaterial, aLossInsulated, 4L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.cableGt08, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 9, aTextCable1 + aMaterial.mName.toLowerCase() + ".08", "8x " + aMaterial.mDefaultLocalName + aTextCable2, 0.625F, aMaterial, aLossInsulated, 8L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.cableGt12, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 10, aTextCable1 + aMaterial.mName.toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + aTextCable2, 0.75F, aMaterial, aLossInsulated, 12L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.cableGt16, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 11, aTextCable1 + aMaterial.mName.toLowerCase() + ".16", "16x " + aMaterial.mDefaultLocalName + aTextCable2, 0.875F, aMaterial, aLossInsulated, 16L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); } } diff --git a/src/main/java/gregtech/nei/NEI_GT_Config.java b/src/main/java/gregtech/nei/NEI_GT_Config.java index c33d5f4e22..36db6879db 100644 --- a/src/main/java/gregtech/nei/NEI_GT_Config.java +++ b/src/main/java/gregtech/nei/NEI_GT_Config.java @@ -17,7 +17,7 @@ public class NEI_GT_Config } } if(FMLCommonHandler.instance().getEffectiveSide().isClient()) - ALH=new GT_NEI_AssLineHandler(GT_Recipe.GT_Recipe_Map.sAssemblylineFakeRecipes); + ALH=new GT_NEI_AssLineHandler(GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes); sIsAdded = true; } -- cgit From c12e474c23ca02fb3479312850f6ae07e623d8b9 Mon Sep 17 00:00:00 2001 From: Technus Date: Mon, 1 May 2017 08:18:30 +0200 Subject: Oil and pollution overhaul --- .../interfaces/tileentity/IEnergyConnected.java | 2 +- .../api/metatileentity/BaseMetaTileEntity.java | 3 +- .../api/metatileentity/MetaPipeEntity.java | 2 +- .../api/metatileentity/MetaTileEntity.java | 2 - .../GT_MetaTileEntity_BasicGenerator.java | 6 +- .../GT_MetaTileEntity_Hatch_Muffler.java | 4 +- .../GT_MetaTileEntity_MultiBlockBase.java | 2 +- .../java/gregtech/api/objects/GT_UO_Dimension.java | 8 +- .../gregtech/api/objects/GT_UO_DimensionList.java | 11 +- .../java/gregtech/api/objects/GT_UO_Fluid.java | 6 +- src/main/java/gregtech/api/util/GT_Utility.java | 139 ++-------------- src/main/java/gregtech/common/GT_Pollution.java | 185 ++++++++++++--------- src/main/java/gregtech/common/GT_Proxy.java | 125 +++++++++----- .../java/gregtech/common/GT_UndergroundOil.java | 96 +++++++++++ .../boilers/GT_MetaTileEntity_Boiler_Bronze.java | 2 +- .../boilers/GT_MetaTileEntity_Boiler_Lava.java | 2 +- .../boilers/GT_MetaTileEntity_Boiler_Steel.java | 2 +- .../GT_MetaTileEntity_AdvSeismicProspector.java | 3 +- .../GT_MetaTileEntity_BronzeBlastFurnace.java | 4 +- .../multi/GT_MetaTileEntity_Charcoal_Pit.java | 2 +- .../machines/multi/GT_MetaTileEntity_OilDrill.java | 13 +- 21 files changed, 337 insertions(+), 282 deletions(-) create mode 100644 src/main/java/gregtech/common/GT_UndergroundOil.java (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java index 3762713fa3..f3790eff8a 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java @@ -108,7 +108,7 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd tWorld.setBlock(tX, tY, tZ, Blocks.air); if (GregTech_API.sMachineExplosions) if(GT_Mod.gregtechproxy.mPollution) - GT_Pollution.addPollution(tWorld,new ChunkPosition(tX, tY, tZ), 100000); + GT_Pollution.addPollution(tWorld.getChunkFromBlockCoords(tX,tZ), 100000); tWorld.createExplosion(null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true); } } diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index a16768850f..c724a83e68 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -1147,7 +1147,8 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE } } } - GT_Pollution.addPollution(getWorld(), new ChunkPosition(getXCoord(), getYCoord(), getZCoord()), 100000); + + GT_Pollution.addPollution(this, 100000); mMetaTileEntity.doExplosion(aAmount); } } diff --git a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java index 84e30620eb..9664845091 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java @@ -668,7 +668,7 @@ public abstract class MetaPipeEntity implements IMetaTileEntity { tWorld.setBlock(tX, tY, tZ, Blocks.air); if (GregTech_API.sMachineExplosions) if(GT_Mod.gregtechproxy.mPollution) - GT_Pollution.addPollution(getBaseMetaTileEntity().getWorld(),new ChunkPosition(tX, tY, tZ), 100000); + GT_Pollution.addPollution(getBaseMetaTileEntity(), 100000); tWorld.createExplosion(null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true); } diff --git a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java index ccefab6a3a..f9da109599 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java @@ -857,8 +857,6 @@ public abstract class MetaTileEntity implements IMetaTileEntity { GT_Utility.sendSoundToPlayers(tWorld, GregTech_API.sSoundList.get(209), 1.0F, -1, tX, tY, tZ); tWorld.setBlock(tX, tY, tZ, Blocks.air); if (GregTech_API.sMachineExplosions) - if(GT_Mod.gregtechproxy.mPollution) - GT_Pollution.addPollution(tWorld,new ChunkPosition(tX, tY, tZ), 100000); tWorld.createExplosion(null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true); } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java index 509c6f0ec5..492570c8f9 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java @@ -212,8 +212,7 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue); //long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUOutput() * 20 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue);//TODO CHECK if (tFluidAmountToUse > 0 && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) { - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), - 10 * getPollution()); + GT_Pollution.addPollution(getBaseMetaTileEntity(),10 * getPollution()); mFluid.amount -= tFluidAmountToUse * tConsumed; } } @@ -225,8 +224,7 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), tEmptyContainer)) { aBaseMetaTileEntity.increaseStoredEnergyUnits(tFuelValue, true); aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), - 10 * getPollution()); + GT_Pollution.addPollution(getBaseMetaTileEntity(),10 * getPollution()); } } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java index 617d17aadb..9b9e83296c 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java @@ -73,7 +73,7 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { public boolean polluteEnvironment() { if (getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing())) { - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), calculatePollutionReduction(10000)); + GT_Pollution.addPollution(getBaseMetaTileEntity(), calculatePollutionReduction(10000)); return true; } return false; @@ -106,7 +106,7 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { boolean chk1,chk2,chk3; float ran1=floatGen.nextFloat(),ran2=0,ran3=0; chk1=ran1*100= GT_Mod.gregtechproxy.mPollutionSmogLimit){ + if(GT_Pollution.getPollution(getBaseMetaTileEntity())>= GT_Mod.gregtechproxy.mPollutionSmogLimit){ ran2=floatGen.nextFloat(); ran3=floatGen.nextFloat(); chk2=ran2*100 fl : fFluids.entrySet()) { int chance = fl.getValue().Chance*1000/maxChance; if (random<=chance) return fl.getValue(); //System.out.println("GT UO "+fl.getValue().Registry+" Chance:"+chance+" Random:"+random); random-=chance; } - return null; - } } diff --git a/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java b/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java index 89340132be..c566affe41 100644 --- a/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java +++ b/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java @@ -48,15 +48,16 @@ public class GT_UO_DimensionList { fConfig.get(Category, "MaxAmount", aMaxAmount).getInt(aMaxAmount); fConfig.get(Category, "Chance", aChance).getInt(aChance); fConfig.get(Category, "DecreasePerOperationAmount", aDecreasePerOperationAmount).getInt(aDecreasePerOperationAmount); + //IT IS IN BUCKETS!!! } public void SetDafultValues() { - SetConfigValues("Overworld", "0", "gas_natural_gas", "gas_natural_gas", 0, 625, 20, 5); + SetConfigValues("Overworld", "0", "gas_natural_gas", "gas_natural_gas", 0, 625, 20, 7); SetConfigValues("Overworld", "0", "liquid_light_oil", "liquid_light_oil", 0, 625, 20, 5); - SetConfigValues("Overworld", "0", "liquid_medium_oil", "liquid_medium_oil", 0, 625, 20, 5); - SetConfigValues("Overworld", "0", "liquid_heavy_oil", "liquid_heavy_oil", 0, 625, 20, 5); - SetConfigValues("Overworld", "0", "oil", "oil", 0, 625, 20, 5); - SetConfigValues("Moon", "Moon", "helium-3", "helium-3", 0, 375, 100, 5); + SetConfigValues("Overworld", "0", "liquid_medium_oil", "liquid_medium_oil", 0, 625, 20, 3); + SetConfigValues("Overworld", "0", "liquid_heavy_oil", "liquid_heavy_oil", 0, 625, 20, 1); + SetConfigValues("Overworld", "0", "oil", "oil", 0, 625, 20, 3); + SetConfigValues("Moon", "Moon", "helium-3", "helium-3", 1, 375, 100, 1); } public void getConfig(Configuration aConfig, String aCategory) { diff --git a/src/main/java/gregtech/api/objects/GT_UO_Fluid.java b/src/main/java/gregtech/api/objects/GT_UO_Fluid.java index 84fefb5110..398717b5b6 100644 --- a/src/main/java/gregtech/api/objects/GT_UO_Fluid.java +++ b/src/main/java/gregtech/api/objects/GT_UO_Fluid.java @@ -14,7 +14,7 @@ public class GT_UO_Fluid { public int MaxAmount = 0; public int MinAmount = 0; public int Chance = 0; - public int DecreasePerOperationAmount = 5; + public int DecreasePerOperationAmountInBuckets = 5; public GT_UO_Fluid(ConfigCategory aConfigCategory) {//TODO CONFIGURE if (aConfigCategory.containsKey("Registry")) @@ -40,7 +40,7 @@ public class GT_UO_Fluid { if (aConfigCategory.containsKey("DecreasePerOperationAmount")) { aConfigCategory.get("DecreasePerOperationAmount").comment = "Decrease per operation Amount (X/5000L per operation)"; - DecreasePerOperationAmount = aConfigCategory.get("DecreasePerOperationAmount").getInt(5); + DecreasePerOperationAmountInBuckets = aConfigCategory.get("DecreasePerOperationAmount").getInt(5); } //System.out.println("GT UO "+aConfigCategory.getName()+" Fluid:"+Registry+" Max:"+MaxAmount+" Min:"+MinAmount+" Chance:"+Chance); } @@ -53,7 +53,7 @@ public class GT_UO_Fluid { } } - public int getRandomAmount(Random aRandom){ + public int getRandomAmount(Random aRandom){//generates milliBuckets int r1 = (int)Math.round(Math.pow((MaxAmount-MinAmount)*500000.d, 0.2)); int r2 = (int)Math.floor(Math.pow(MinAmount*500000.d, 0.2)); double amount = aRandom.nextInt(r1)+r2+aRandom.nextDouble(); diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 7e28593abf..af667eb4d5 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -56,9 +56,11 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MathHelper; +import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; import net.minecraft.world.WorldServer; +import net.minecraft.world.chunk.Chunk; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.ForgeDirection; @@ -75,6 +77,9 @@ import java.util.*; import java.util.Map.Entry; import static gregtech.api.enums.GT_Values.*; +import static gregtech.common.GT_Proxy.GTPOLLUTION; +import static gregtech.common.GT_Proxy.dimensionWiseChunkData; +import static gregtech.common.GT_UndergroundOil.undergroundOil; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! @@ -1575,114 +1580,6 @@ public class GT_Utility { return (int)Math.floor(aValue / aScale); } - public static FluidStack getUndergroundOil(World aWorld, int aX, int aZ) { - return getUndergroundOil(aWorld, aX, aZ, false); - } - - public static FluidStack getUndergroundOil(World aWorld, int aX, int aZ, boolean needConsumeOil) {//TODO RETROGEN!, CHECK FLUIDS AVAILABLE, REWORK - - if (GT_Mod.gregtechproxy.mUndergroundOil.CheckBlackList(aWorld.provider.dimensionId)) - return null; - - XSTR tRandom = new XSTR((aWorld.getSeed() + aWorld.provider.dimensionId * 2 + (getScaleCoordinates(aX,96)) + (7 * (getScaleCoordinates(aZ,96))))); - int tAmount = 0; - int tFluidId = 0; - int tDecreasePerOperationAmount = 5; - Fluid tFluid = null; -// System.out.println("Dimension: "+GT_Mod.gregtechproxy.mUndergroundOil.GetDimension(aWorld.provider.dimensionId).Dimension); - try { - GT_UO_Fluid uoFluid = GT_Mod.gregtechproxy.mUndergroundOil.GetDimension(aWorld.provider.dimensionId).getRandomFluid(tRandom); - if (uoFluid != null) - { - tFluid = uoFluid.getFluid(); - tAmount = uoFluid.getRandomAmount(tRandom); - tDecreasePerOperationAmount = uoFluid.DecreasePerOperationAmount; - if (tFluid != null) - tFluidId = tFluid.getID(); - //System.out.println("Fluid: ("+tFluidId+")"+tFluid.getName()+" Amount:"+tAmount); - } - - } catch (Exception e) { - tAmount = 0; - tFluidId = 0; - } - - try { - ChunkPosition tPos = new ChunkPosition(getScaleCoordinates(aX,16), aWorld.provider.dimensionId, getScaleCoordinates(aZ,16)); - int[] tInts = new int[3]; - if(GT_Proxy.chunkData.containsKey(tPos)){ - tInts = GT_Proxy.chunkData.get(tPos); - if(tInts.length>0){ - if(tInts[0]>0){tAmount = tInts[0];} - } - if(tInts.length>2){ - if(tInts[2]>0&&tInts[2]!=tFluidId) - { - tFluidId = tInts[2]; - tFluid = FluidRegistry.getFluid(tFluidId); - } - } - GT_Proxy.chunkData.remove(tPos); - } - - if (needConsumeOil && tAmount >= 5000) - tAmount = tAmount - tDecreasePerOperationAmount; - - tInts[0] = tAmount; - tInts[2] = tFluidId; - GT_Proxy.chunkData.put(tPos, tInts); - } catch (Exception e) { - System.out.println("getUndergroundOil() - Error put data"); - } - if (tFluid!=null) - return new FluidStack(tFluid, tAmount); - return null; - } - - //private static FluidStack getUndergroundOilFromInfo(int type,int amnt){ - // switch (type) {//0 is old system - // case 1: - // return new FluidStack(Materials.OilLight .mFluid,amnt); - // case 2: - // return new FluidStack(Materials.OilMedium.mFluid,amnt); - // case 3: - // return new FluidStack(Materials.OilHeavy .mFluid,amnt); - // case 4: - // return new FluidStack(Materials.Oil .mFluid,amnt); - // } - // return new FluidStack(Materials.NatruralGas.mGas,amnt);//5 - //} - // - //private static FluidStack setUndergroundOil(World aWorld, int aX, int aZ,ChunkPosition tPos,int[] tInts) { - // XSTR tRandom = new XSTR(aWorld.getSeed() ^ ((long)(aX / 6) + (long)(7000 * (aZ / 6)))); - // int type=tRandom.nextInt(5);//type slowly changes - // int amnt = (int)(Math.ceil(Math.pow(2D+(double)(tRandom.nextInt(48))+(new XSTR()).nextDouble(),8D)/200000D)); - // //roughly uses 28 bits - // FluidStack tFluidStack; - // switch (type) {//0 is old system - // case 1: - // tFluidStack=new FluidStack(Materials.OilLight .mFluid,amnt); - // break; - // case 2: - // tFluidStack=new FluidStack(Materials.OilMedium.mFluid,amnt); - // break; - // case 3: - // tFluidStack=new FluidStack(Materials.OilHeavy .mFluid,amnt); - // break; - // case 4: - // tFluidStack=new FluidStack(Materials.Oil .mFluid,amnt); - // break; - // default://case 0; -> 5 - // type=5;//important, 0 is invalid ! - // tFluidStack=new FluidStack(Materials.NatruralGas.mGas,amnt);//5 - // } - // - // tInts[0]=(type<<28)+amnt;//here since the switch changes type - // //tInts[2]|=0x01; - // GT_Proxy.chunkData.put(tPos, tInts); - // return tFluidStack; - //} - public static int getCoordinateScan(ArrayList aList, EntityPlayer aPlayer, World aWorld, int aScanLevel, int aX, int aY, int aZ, int aSide, float aClickX, float aClickY, float aClickZ) { if (aList == null) return 0; @@ -1872,23 +1769,23 @@ public class GT_Utility { } } if (aPlayer.capabilities.isCreativeMode && GT_Values.D1) { - FluidStack tFluid = getUndergroundOil(aWorld, aX, aZ); + FluidStack tFluid = undergroundOil(aWorld.getChunkFromBlockCoords(aX,aZ),-1);//-# to only read if (tFluid!=null) tList.add(EnumChatFormatting.GOLD+tFluid.getLocalizedName()+EnumChatFormatting.RESET+": " +EnumChatFormatting.YELLOW+ tFluid.amount +EnumChatFormatting.RESET+" L"); - } -// if(aPlayer.capabilities.isCreativeMode){ - ChunkPosition tPos = new ChunkPosition(getScaleCoordinates(aX,16), aWorld.provider.dimensionId, getScaleCoordinates(aZ,16)); - if(GT_Proxy.chunkData.containsKey(tPos)){ - int[] tPollution = GT_Proxy.chunkData.get(tPos); - if(tPollution.length>1){ - tList.add("Pollution in Chunk: "+EnumChatFormatting.RED+tPollution[1]+EnumChatFormatting.RESET+" gibbl"); - }else{ - tList.add(EnumChatFormatting.GREEN+"No Pollution in Chunk! HAYO!"+EnumChatFormatting.RESET); - } - }else{ + else + tList.add(EnumChatFormatting.GOLD+"Nothing"+EnumChatFormatting.RESET+": " +EnumChatFormatting.YELLOW+ '0' +EnumChatFormatting.RESET+" L"); + } +// if(aPlayer.capabilities.isCreativeMode){ + int[] chunkData = GT_Proxy.dimensionWiseChunkData.get(aWorld.provider.dimensionId).get(aWorld.getChunkFromBlockCoords(aX,aZ).getChunkCoordIntPair()); + if(chunkData !=null){ + if(chunkData[GTPOLLUTION]>0){ + tList.add("Pollution in Chunk: "+EnumChatFormatting.RED+chunkData[GTPOLLUTION]+EnumChatFormatting.RESET+" gibbl"); + }else{ tList.add(EnumChatFormatting.GREEN+"No Pollution in Chunk! HAYO!"+EnumChatFormatting.RESET); } -// } + }else{ + tList.add(EnumChatFormatting.GREEN+"No Pollution in Chunk! HAYO!"+EnumChatFormatting.RESET); + } try { if (tBlock instanceof IDebugableBlock) { diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index 5d3c7ee4b3..0120f2c353 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -1,6 +1,8 @@ package gregtech.common; +import cpw.mods.fml.common.gameevent.TickEvent; import gregtech.GT_Mod; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.XSTR; import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; @@ -10,17 +12,19 @@ import net.minecraft.init.Blocks; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; -import net.minecraftforge.common.DimensionManager; +import net.minecraft.world.chunk.Chunk; +import net.minecraftforge.event.world.WorldEvent; -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; +import java.util.*; + +import static gregtech.common.GT_Proxy.*; //import net.minecraft.entity.EntityLiving; -public class GT_Pollution {//TODO REWORK +public class GT_Pollution { /** * Pollution dispersion until effects start: * Calculation: ((Limit * 0.01) + 2000) * (4 <- spreading rate) @@ -52,62 +56,77 @@ public class GT_Pollution {//TODO REWORK * Muffler Hatch Pollution reduction: * LV (0%), MV (30%), HV (52%), EV (66%), IV (76%), LuV (84%), ZPM (89%), UV (92%), MAX (95%) */ + private static XSTR tRan = new XSTR(); + private List pollutionList = new ArrayList<>();//chunks left to process + private HashMap chunkData;//link to chunk data that is saved/loaded + private int operationsPerTick=0;//how much chunks should be processed in each cycle + private static final short cycleLen=1200; + private final World aWorld; - static List tList = null; - static int loops = 1; - static XSTR tRan = new XSTR(); + public GT_Pollution(World world){ + aWorld=world; + chunkData=dimensionWiseChunkData.get(aWorld.provider.dimensionId); + if(chunkData==null){ + chunkData=new HashMap<>(1024); + dimensionWiseChunkData.put(world.provider.dimensionId,chunkData); + } + dimensionWisePollution.put(aWorld.provider.dimensionId,this); + } - public static void onWorldTick(World aWorld, int aTick){ - if(true)return; //TODO FIX + public static void onWorldTick(TickEvent.WorldTickEvent aEvent){//called from proxy + //return if pollution disabled if(!GT_Mod.gregtechproxy.mPollution) return; - int aWorldID=aWorld.provider.dimensionId; - if(aTick == 0 || (tList==null && GT_Proxy.chunkData!=null)){ - //---tList = new TreeMap<>(); - //---tList.put(aWorld,new ArrayList(GT_Proxy.chunkData.keySet())); - loops = (tList.size()/1200) + 1; - //System.out.println("new Pollution loop"+aTick); + final GT_Pollution pollutionInstance = dimensionWisePollution.get(aEvent.world.provider.dimensionId); + if(pollutionInstance==null)return; + pollutionInstance.tickPollutionInWorld((int)(aEvent.world.getTotalWorldTime()%cycleLen)); + } + + private void tickPollutionInWorld(int aTickID){//called from method above + //gen data set + if(aTickID==0){ + pollutionList = new ArrayList<>(chunkData.keySet()); + //set operations per tick + if(pollutionList.size()>0) operationsPerTick =(pollutionList.size()/cycleLen); + else operationsPerTick=0;//SANity } - if(tList!=null && tList.size() > 0) for(int i = 0; i < loops ; i++) if(tList.size()>0){ - ChunkPosition tPos = tList.get(0); - tList.remove(0); - if(tPos!=null && GT_Proxy.chunkData.containsKey(tPos)){ - int tPollution = GT_Proxy.chunkData.get(tPos)[1]; - //System.out.println("process: "+tPos.chunkPosX+" "+tPos.chunkPosZ+" "+tPollution); - //Reduce pollution in chunk - tPollution = (int)(0.9945f*tPollution); - //tPollution -= 2000; - if(tPollution<=0) tPollution = 0; - //Spread Pollution - else if(tPollution>400000){ - List tNeighbor = new ArrayList(); - tNeighbor.add(new ChunkPosition(tPos.chunkPosX+1, tPos.chunkPosY, tPos.chunkPosZ)); - tNeighbor.add(new ChunkPosition(tPos.chunkPosX-1, tPos.chunkPosY, tPos.chunkPosZ)); - tNeighbor.add(new ChunkPosition(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ+1)); - tNeighbor.add(new ChunkPosition(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ-1)); - for(ChunkPosition tNPos : tNeighbor){ - //---if(!GT_Proxy.chunkData.containsKey(tNPos)) - //--- GT_Utility.undergroundOil(aWorld,tNPos.chunkPosX,tNPos.chunkPosZ,false,0); - - //if(GT_Proxy.chunkData.containsKey(tNPos)){ - int tNPol = GT_Proxy.chunkData.get(tNPos)[1]; - if(tNPol*6 < tPollution*5){ - int tDiff = tPollution - tNPol; - tDiff = tDiff/20; - tNPol = GT_Utility.safeInt((long)tNPol+tDiff);//tNPol += tDiff; - tPollution -= tDiff; - GT_Proxy.chunkData.get(tNPos)[1] = tNPol; - } - //} + + for(int chunksProcessed=0;chunksProcessed<=operationsPerTick;chunksProcessed++){ + if(pollutionList.size()==0)break;//no more stuff to do + ChunkCoordIntPair actualPos=pollutionList.remove(pollutionList.size()-1);//faster + //add default data if missing + if(!chunkData.containsKey(actualPos)) chunkData.put(actualPos,getDefaultChunkDataOnCreation()); + //get pollution + int tPollution = chunkData.get(actualPos)[GTPOLLUTION]; + //remove some + tPollution = (int)(0.9945f*tPollution); + //tPollution -= 2000;//This does not really matter... + + if(tPollution<=0) tPollution = 0;//SANity check + else if(tPollution>400000){//Spread Pollution + + ChunkCoordIntPair[] tNeighbors = new ChunkCoordIntPair[4];//array is faster + tNeighbors[0]=(new ChunkCoordIntPair(actualPos.chunkXPos+1,actualPos.chunkZPos)); + tNeighbors[1]=(new ChunkCoordIntPair(actualPos.chunkXPos-1,actualPos.chunkZPos)); + tNeighbors[2]=(new ChunkCoordIntPair(actualPos.chunkXPos,actualPos.chunkZPos+1)); + tNeighbors[3]=(new ChunkCoordIntPair(actualPos.chunkXPos,actualPos.chunkZPos-1)); + for(ChunkCoordIntPair neighborPosition : tNeighbors){ + if(!chunkData.containsKey(neighborPosition)) chunkData.put(actualPos,getDefaultChunkDataOnCreation()); + + int neighborPollution = chunkData.get(neighborPosition)[GTPOLLUTION]; + if(neighborPollution*6 < tPollution*5){//METHEMATICS... + int tDiff = tPollution - neighborPollution; + tDiff = tDiff/20; + neighborPollution = GT_Utility.safeInt((long)neighborPollution+tDiff);//tNPol += tDiff; + tPollution -= tDiff; + chunkData.get(neighborPosition)[GTPOLLUTION] = neighborPollution; } } - int[] tArray = GT_Proxy.chunkData.get(tPos); - tArray[1] = tPollution; - GT_Proxy.chunkData.remove(tPos); - GT_Proxy.chunkData.put(tPos, tArray); + + //Create Pollution effects //Smog filter TODO if(tPollution > GT_Mod.gregtechproxy.mPollutionSmogLimit) { - AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(tPos.chunkPosX << 4, 0, tPos.chunkPosZ << 4, (tPos.chunkPosX << 4) + 16, 256, (tPos.chunkPosZ << 4) + 16); + AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(actualPos.chunkXPos << 4, 0, actualPos.chunkZPos << 4, (actualPos.chunkXPos << 4) + 16, 256, (actualPos.chunkZPos << 4) + 16); List tEntitys = aWorld.getEntitiesWithinAABB(EntityLivingBase.class, chunk); for (EntityLivingBase tEnt : tEntitys) { if (!GT_Utility.isWearingFullGasHazmat(tEnt)) { @@ -121,6 +140,8 @@ public class GT_Pollution {//TODO REWORK } } } + + // Poison effects if (tPollution > GT_Mod.gregtechproxy.mPollutionPoisonLimit) { //AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(tPos.chunkPosX*16, 0, tPos.chunkPosZ*16, tPos.chunkPosX*16+16, 256, tPos.chunkPosZ*16+16); @@ -139,23 +160,27 @@ public class GT_Pollution {//TODO REWORK } } } + + // killing plants if (tPollution > GT_Mod.gregtechproxy.mPollutionVegetationLimit) { int f = 20; for (; f < (tPollution / 25000); f++) { - int x = (tPos.chunkPosX << 4) + tRan.nextInt(16); + int x = (actualPos.chunkXPos << 4) + tRan.nextInt(16); int y = 60 + (-f + tRan.nextInt(f * 2 + 1)); - int z = (tPos.chunkPosZ << 4) + tRan.nextInt(16); + int z = (actualPos.chunkZPos << 4) + tRan.nextInt(16); damageBlock(aWorld, x, y, z, tPollution > GT_Mod.gregtechproxy.mPollutionSourRainLimit); } } } } } + //Write new pollution to Hashmap !!! + chunkData.get(actualPos)[GTPOLLUTION] = tPollution; } } - public static void damageBlock(World world, int x, int y, int z, boolean sourRain){ + private static void damageBlock(World world, int x, int y, int z, boolean sourRain){ if (world.isRemote) return; Block tBlock = world.getBlock(x, y, z); int tMeta = world.getBlockMetadata(x, y, z); @@ -205,37 +230,31 @@ public class GT_Pollution {//TODO REWORK } } - //Add aWorld to Save Pollution - public static void addPollution(World aWorld, ChunkPosition aPos, int aPollution){ + public static void addPollution(IGregTechTileEntity te, int aPollution){ + System.out.println(te.getWorld().provider.dimensionId+" "+te.getXCoord()+" "+te.getZCoord()); + addPollution(te.getWorld().getChunkFromBlockCoords(te.getXCoord(),te.getZCoord()), aPollution); + } + + public static void addPollution(Chunk ch, int aPollution){ if(!GT_Mod.gregtechproxy.mPollution)return; - try{ - ChunkPosition tPos = new ChunkPosition(GT_Utility.getScaleCoordinates(aPos.chunkPosX,16), aWorld.provider.dimensionId, GT_Utility.getScaleCoordinates(aPos.chunkPosZ,16)); // OLD in coordinate -1 -1 chunk 0 0 -// System.out.println("add pollution dim: "+aWorld.provider.dimensionId+" x: "+ tPos.chunkPosX +" z: " + tPos.chunkPosZ +" poll: "+aPollution); - int[] tData = new int[3]; - if(GT_Proxy.chunkData.containsKey(tPos)){ - tData = GT_Proxy.chunkData.get(tPos); - if(tData.length>1){ - tData[1] += aPollution; - } - }else{ - tData[1] += aPollution; - GT_Proxy.chunkData.put(tPos, tData); - } - }catch(Exception e){ - + HashMap dataMap=dimensionWiseChunkData.get(ch.worldObj.provider.dimensionId); + if(dataMap==null){ + dataMap=new HashMap<>(1024); + dimensionWiseChunkData.put(ch.worldObj.provider.dimensionId,dataMap); } + if(dataMap.get(ch.getChunkCoordIntPair())==null) + dataMap.put(ch.getChunkCoordIntPair(),getDefaultChunkDataOnCreation()); + dataMap.get(ch.getChunkCoordIntPair())[GTPOLLUTION]+=aPollution; } - public static int getPollutionAtCoords(World aWorld, int aX, int aZ){//TODO FIX - ChunkPosition tPos = new ChunkPosition(aX>>4, aWorld.provider.dimensionId, aZ>>4); - if(GT_Proxy.chunkData.containsKey(tPos)){ - int[] tPollution = GT_Proxy.chunkData.get(tPos); - if(tPollution.length>1 && tPollution[1]>0){ - return tPollution[1]; - }else{ - return 0; - } - } - return 0; + public static int getPollution(IGregTechTileEntity te){ + return getPollution(te.getWorld().getChunkFromBlockCoords(te.getXCoord(),te.getZCoord())); + } + + public static int getPollution(Chunk ch){ + if(!GT_Mod.gregtechproxy.mPollution)return 0; + HashMap dataMap=dimensionWiseChunkData.get(ch.worldObj.provider.dimensionId); + if(dataMap==null || dataMap.get(ch.getChunkCoordIntPair())==null) return 0; + return dataMap.get(ch.getChunkCoordIntPair())[GTPOLLUTION]; } } diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 07c1ea9fce..f66a77261f 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -6,6 +6,8 @@ import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.ModContainer; import cpw.mods.fml.common.ProgressManager; import cpw.mods.fml.common.eventhandler.Event.Result; +import cpw.mods.fml.common.eventhandler.EventBus; +import cpw.mods.fml.common.eventhandler.EventPriority; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.common.network.FMLNetworkEvent; @@ -55,10 +57,11 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.DamageSource; -import net.minecraft.world.ChunkPosition; +import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.World; import net.minecraft.world.WorldSettings.GameType; import net.minecraft.world.gen.feature.WorldGenMinable; +import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.event.entity.EntityJoinWorldEvent; @@ -69,6 +72,7 @@ import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.event.terraingen.OreGenEvent; import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.event.world.ChunkDataEvent; +import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; @@ -780,6 +784,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { } } } catch (Throwable e) {e.printStackTrace(GT_Log.err);} + + dimensionWiseChunkData.clear();//!!! IMPORTANT for map switching... + dimensionWisePollution.clear();//!!! IMPORTANT for map switching... } public void onServerStarted() { @@ -1445,8 +1452,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { } } } - if(aEvent.world.provider.dimensionId==0) - GT_Pollution.onWorldTick(aEvent.world, (int) (aEvent.world.getTotalWorldTime() % 1200)); + + GT_Pollution.onWorldTick(aEvent); } } @@ -1905,50 +1912,92 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { ProgressManager.pop(progressBar); } - public static final HashMap chunkData = new HashMap(5000); + public static final HashMap> dimensionWiseChunkData = new HashMap<>(16);//stores chunk data that is loaded/saved + public static final HashMap dimensionWisePollution = new HashMap<>(16);//stores GT_Polluttors objects + public static final byte GTOIL=3,GTOILFLUID=2,GTPOLLUTION=1,GTMETADATA=0,NOT_LOADED=0,LOADED=1;//consts + //@Deprecated + //public static final HashMap chunkData = new HashMap<>(0); + + private static final byte oilVer=(byte)20;//non zero plz + + //TO get default's fast + public static int[] getDefaultChunkDataOnCreation(){ + return new int[]{NOT_LOADED,0,-1,-1}; + } + public static int[] getDefaultChunkDataOnLoad(){ + return new int[]{LOADED,0,-1,-1}; + } - private static final byte oilVer=(byte)0x20; @SubscribeEvent - public void handleChunkSaveEvent(ChunkDataEvent.Save event)//TODO FIX +RETROGEN - { - ChunkPosition tPos = new ChunkPosition(event.getChunk().xPosition,event.getChunk().worldObj.provider.dimensionId,event.getChunk().zPosition); - if(chunkData.containsKey(tPos)){ - int[] tInts = chunkData.get(tPos); - if(tInts.length>0){event.getData().setInteger("GTOIL", tInts[0]);} - if(tInts.length>1){event.getData().setInteger("GTPOLLUTION", tInts[1]);} - if(tInts.length>2){event.getData().setInteger("GTOILFLUID", tInts[2]);} - } + public void handleChunkSaveEvent(ChunkDataEvent.Save event) {//ALWAYS SAVE FROM THE HASH MAP DATA + HashMap chunkData=dimensionWiseChunkData.get(event.world.provider.dimensionId); + if(chunkData==null) return;//no dim info stored + + int[] tInts = chunkData.get(event.getChunk().getChunkCoordIntPair()); + if(tInts==null) return;//no chunk data stored + //assuming len of this array 4 + if(tInts[3]>=0)event.getData().setInteger("GTOIL", tInts[GTOIL]); + else event.getData().removeTag("GTOIL"); + if(tInts[2]>=0)event.getData().setInteger("GTOILFLUID", tInts[GTOILFLUID]); + else event.getData().removeTag("GTOILFLUID"); + if(tInts[1]>0)event.getData().setInteger("GTPOLLUTION", tInts[GTPOLLUTION]); + else event.getData().removeTag("GTPOLLUTION"); + event.getData().setByte("GTOILVER", oilVer);//version mark } @SubscribeEvent - public void handleChunkLoadEvent(ChunkDataEvent.Load event)//TODO FIX +RETROGEN - { - int tOil = 0; - int tOilFluid = 0; - int tPollution = 0; - - ChunkPosition tPos = new ChunkPosition(event.getChunk().xPosition,event.getChunk().worldObj.provider.dimensionId,event.getChunk().zPosition); - int[] tData = new int[0]; - if(chunkData.containsKey(tPos)){ - tData = chunkData.get(tPos); - chunkData.remove(tPos); - if(tData.length>0) - tOil = tData[0]; - if(tData.length>1) - tPollution = tData[1]; - if(tData.length>2) - tOilFluid = tData[2]; + public void handleChunkLoadEvent(ChunkDataEvent.Load event) { + final int worldID=event.world.provider.dimensionId; + HashMap chunkData = dimensionWiseChunkData.get(worldID); + if (chunkData == null){ + chunkData=new HashMap<>(1024); + dimensionWiseChunkData.put(worldID, chunkData); } + if (dimensionWisePollution.get(worldID) == null) + dimensionWisePollution.put(worldID, new GT_Pollution(event.world)); + + int[] tInts = chunkData.get(event.getChunk().getChunkCoordIntPair()); + if (tInts == null) { + //NOT LOADED and NOT PROCESSED by pollution algorithms + //regular load + tInts = getDefaultChunkDataOnLoad(); + + if (event.getData().getByte("GTOILVER") == oilVer) { + if (event.getData().hasKey("GTOIL")) + tInts[GTOIL] = event.getData().getInteger("GTOIL"); + if (event.getData().hasKey("GTOILFLUID")) + tInts[GTOILFLUID] = event.getData().getInteger("GTOILFLUID"); + } + + tInts[GTPOLLUTION] = event.getData().getInteger("GTPOLLUTION");//Defaults to 0 + + //store in HASH MAP if has useful data + if (tInts[GTPOLLUTION] > 0 || tInts[GTOIL] >= 0 || tInts[GTOILFLUID] >= 0) + chunkData.put(event.getChunk().getChunkCoordIntPair(), tInts); + } else if (tInts[GTMETADATA] == NOT_LOADED) {//was NOT loaded from chunk save game data + //NOT LOADED but generated + //append load + if (event.getData().getByte("GTOILVER") == oilVer) { + if (tInts[GTOIL] < 0 && event.getData().hasKey("GTOIL"))//if was not yet initialized + tInts[GTOIL] = event.getData().getInteger("GTOIL"); + + if (tInts[GTOILFLUID] < 0 && event.getData().hasKey("GTOILFLUID"))//if was not yet initialized + tInts[GTOILFLUID] = event.getData().getInteger("GTOILFLUID"); + } else { + tInts[GTOIL] = -1; + tInts[GTOILFLUID] = -1; + } - if(tOil==0&&event.getData().hasKey("GTOIL")) - tOil = event.getData().getInteger("GTOIL"); - if(tPollution==0&&event.getData().hasKey("GTPOLLUTION")) - tPollution = event.getData().getInteger("GTPOLLUTION"); - if(tOilFluid==0&&event.getData().hasKey("GTOILFLUID")) - tOilFluid = event.getData().getInteger("GTOILFLUID"); + tInts[GTPOLLUTION] += event.getData().getInteger("GTPOLLUTION");//Defaults to 0, add stored pollution to data + tInts[GTMETADATA] = LOADED;//mark as = loaded + //store in HASHMAP - chunkData.put(tPos, new int[]{tOil,tPollution,tOilFluid}); + chunkData.put(event.getChunk().getChunkCoordIntPair(), tInts); + }//else if(tInts[0]==1){ + ////Already loaded chunk data + ////DO NOTHING - this chunk data was already loaded and stored in hash map + //} } public static class OreDictEventContainer { diff --git a/src/main/java/gregtech/common/GT_UndergroundOil.java b/src/main/java/gregtech/common/GT_UndergroundOil.java new file mode 100644 index 0000000000..bc9a1331b1 --- /dev/null +++ b/src/main/java/gregtech/common/GT_UndergroundOil.java @@ -0,0 +1,96 @@ +package gregtech.common; + +import gregtech.GT_Mod; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_UO_Fluid; +import gregtech.api.objects.XSTR; +import gregtech.common.GT_Proxy; +import net.minecraft.world.ChunkCoordIntPair; +import net.minecraft.world.ChunkPosition; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + +import java.util.HashMap; + +import static gregtech.api.util.GT_Utility.getScaleCoordinates; +import static gregtech.common.GT_Proxy.*; + +/** + * Created by Tec on 29.04.2017. + */ +public class GT_UndergroundOil { + + public static FluidStack undergroundOil(IGregTechTileEntity te,float drainSpeedCoefficient){ + return undergroundOil(te.getWorld().getChunkFromBlockCoords(te.getXCoord(),te.getZCoord()),drainSpeedCoefficient); + } + + //Returns whole content for information purposes -> when drainSpeedCoeff < 0 + //Else returns extracted fluidStack if amount > 0, or null otherwise + public static FluidStack undergroundOil(Chunk chunk, float drainSpeedCoefficient) { + if (GT_Mod.gregtechproxy.mUndergroundOil.CheckBlackList(chunk.worldObj.provider.dimensionId)) return null; + World aWorld = chunk.worldObj; + + //Read hash map + HashMap chunkData = dimensionWiseChunkData.get(aWorld.provider.dimensionId); + if(chunkData==null){ + chunkData=new HashMap<>(1024); + dimensionWiseChunkData.put(aWorld.provider.dimensionId,chunkData); + } + + int[] tInts = chunkData.get(chunk.getChunkCoordIntPair()); + + if(tInts==null) tInts=getDefaultChunkDataOnCreation();//init if null + else if(tInts[GTOIL]==0){ + //can return 0 amount stack for info :D + return drainSpeedCoefficient>=0 ? null : new FluidStack(FluidRegistry.getFluid(tInts[GTOILFLUID]),0); + } + + //GEN IT TO GET OBJECT... + XSTR tRandom = new XSTR(aWorld.getSeed() + aWorld.provider.dimensionId * 2 + + (chunk.getChunkCoordIntPair().chunkXPos>>3) + + 8267 * (chunk.getChunkCoordIntPair().chunkZPos>>3)); + GT_UO_Fluid uoFluid = GT_Mod.gregtechproxy.mUndergroundOil.GetDimension(aWorld.provider.dimensionId).getRandomFluid(tRandom); + + //Fluid stack holder + FluidStack fluidInChunk; + + //Set fluidstack from uoFluid + if (uoFluid == null || uoFluid.getFluid()==null){ + tInts[GTOILFLUID]=Integer.MAX_VALUE;//null fluid pointer... kindof + tInts[GTOIL]=0; + chunkData.put(chunk.getChunkCoordIntPair(),tInts);//update hash map + return null; + } else { + if(tInts[GTOILFLUID]== uoFluid.getFluid().getID()){//if stored fluid matches uoFluid + fluidInChunk = new FluidStack(uoFluid.getFluid(),tInts[GTOIL]); + }else{ + fluidInChunk = new FluidStack(uoFluid.getFluid(), uoFluid.getRandomAmount(tRandom)); + tRandom=new XSTR(); + fluidInChunk.amount=(int)((float)fluidInChunk.amount*(0.75f+(tRandom.nextFloat()/2f)));//Randomly change amounts by +/- 25% + } + tInts[GTOIL]=fluidInChunk.amount; + tInts[GTOILFLUID]=fluidInChunk.getFluidID(); + } + + //do stuff on it if needed + if(drainSpeedCoefficient>=0) { + int actualExtractionSpeed=(int)(uoFluid.DecreasePerOperationAmountInBuckets*1000*drainSpeedCoefficient); + if(fluidInChunk.amount>actualExtractionSpeed) { + fluidInChunk.amount=actualExtractionSpeed;//give appropriate amount + tInts[GTOIL]-=actualExtractionSpeed;//diminish amount + }else if(fluidInChunk.amount>0) { + //fluidInChunk.amount= the same amount... going to return this + tInts[GTOIL]=0; + }else{ + fluidInChunk=null; + tInts[GTOIL]=0;//just to be on safe side... + } + } + + chunkData.put(chunk.getChunkCoordIntPair(),tInts);//update hash map + return fluidInChunk; + } +} diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java index b16986fffd..c725634030 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java @@ -148,7 +148,7 @@ public class GT_MetaTileEntity_Boiler_Bronze this.mTemperature += 1; } if (this.mProcessingEnergy > 0 && (aTick % 20L == 0L)) { - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); + GT_Pollution.addPollution(getBaseMetaTileEntity(), 20); } aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); } diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java index 3e5afedba2..8aef783b6b 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java @@ -127,7 +127,7 @@ public class GT_MetaTileEntity_Boiler_Lava } if (this.mProcessingEnergy > 0 && (aTick % 20L == 0L)) { - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); + GT_Pollution.addPollution(getBaseMetaTileEntity(), 20); } aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); } diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java index 0e03cc73dc..adc1a0b152 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java @@ -152,7 +152,7 @@ public class GT_MetaTileEntity_Boiler_Steel this.mTemperature += 1; } if (this.mProcessingEnergy > 0 && (aTick % 20L == 0L)) { - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 30); + GT_Pollution.addPollution(getBaseMetaTileEntity(), 30); } aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java index 404e3dd3a7..6f1a9e32e3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java @@ -22,6 +22,7 @@ import gregtech.api.objects.ItemData; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; +import gregtech.common.GT_UndergroundOil; import gregtech.common.blocks.GT_Block_Ores_Abstract; import gregtech.common.blocks.GT_TileEntity_Ores; import ic2.core.Ic2Items; @@ -153,7 +154,7 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba for (int z = tLeftZBound; z <= tRightZBound; ++z) { ChunkPosition tPos = new ChunkPosition(GT_Utility.getScaleCoordinates(x*16,96), 0, GT_Utility.getScaleCoordinates(z*16,96)); - FluidStack tFluid = GT_Utility.getUndergroundOil(getBaseMetaTileEntity().getWorld(), x*16, z*16); + FluidStack tFluid = GT_UndergroundOil.undergroundOil(getBaseMetaTileEntity(),-1); if (tFluid != null) if (tFluids.containsKey(tPos)) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java index 9be7fd36d9..f63c764c52 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java @@ -207,7 +207,7 @@ public class GT_MetaTileEntity_BronzeBlastFurnace } } if(this.mMaxProgresstime>0 && (aTimer % 20L == 0L)){ - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 200); + GT_Pollution.addPollution(getBaseMetaTileEntity(), 200); } aBaseMetaTileEntity.setActive((this.mMaxProgresstime > 0) && (this.mMachine)); @@ -238,7 +238,7 @@ public class GT_MetaTileEntity_BronzeBlastFurnace XSTR floatGen=new XSTR(); aWorld.spawnParticle("largesmoke", xPos + floatGen.nextFloat(), yPos, zPos + floatGen.nextFloat(), 0.0D, 0.3D, 0.0D); //Pollution particles intensify - if(GT_Pollution.getPollutionAtCoords(aWorld,this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getZCoord())>GT_Mod.gregtechproxy.mPollutionSmogLimit){ + if(GT_Pollution.getPollution(getBaseMetaTileEntity())>GT_Mod.gregtechproxy.mPollutionSmogLimit){ aWorld.spawnParticle("largesmoke", xPos + floatGen.nextFloat(), yPos, zPos + floatGen.nextFloat(), 0.0D, 0.45D, 0.0D); aWorld.spawnParticle("largesmoke", xPos + floatGen.nextFloat(), yPos, zPos + floatGen.nextFloat(), 0.0D, 0.6D, 0.0D); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java index c014724ab8..11c73709c1 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java @@ -87,7 +87,7 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock this.mEfficiency = 10000; this.mEfficiencyIncrease = 10000; this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), mMaxProgresstime*10); + GT_Pollution.addPollution(getBaseMetaTileEntity(), mMaxProgresstime*10); return true; } else { this.mEfficiency = 0; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java index 26885c89a2..a5a5617a42 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java @@ -21,7 +21,9 @@ import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; -public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase {//TODO REWORK +import static gregtech.common.GT_UndergroundOil.undergroundOil; + +public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase { private boolean completedCycle = false; private int extractionSpeed=0; @@ -79,29 +81,26 @@ public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase } } //Output fluid - FluidStack tFluid = null;//GT_Utility.undergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord()>>4, getBaseMetaTileEntity().getZCoord()>>4,false,0);//TODO FIX + FluidStack tFluid = undergroundOil(getBaseMetaTileEntity(),.5F+(getInputTier()*.25F));//consumes here... if (tFluid == null){ extractionSpeed=0; stopMachine(); return false;//impossible } if (getBaseMetaTileEntity().getBlockOffset(ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX, getYOfPumpHead() - 1 - getBaseMetaTileEntity().getYCoord(), ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ) != Blocks.bedrock) { + //Not at bedrock layer - i prefer to keep it like it is... if (completedCycle) { moveOneDown(); } tFluid = null; if (mEnergyHatches.size() > 0 && mEnergyHatches.get(0).getEUVar() > (512 + getMaxInputVoltage() * 4)) completedCycle = true; - } else if (tFluid.amount == 0) {//no fluid remaining + } else if (tFluid.amount == 0) {//no fluid remaining, for SANity extractionSpeed=0; stopMachine(); return false;//stops processing?? } else { - int minExtraction= (int)Math.pow((float)GT_Utility.getTier(getMaxInputVoltage()),3F);//tier^3 - if(tFluid.amount>minExtraction) - tFluid.amount= Math.max(minExtraction,Math.min(tFluid.amount/50000,500)); extractionSpeed=tFluid.amount; - //GT_Utility.undergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord()>>4, getBaseMetaTileEntity().getZCoord()>>4,true,extractionSpeed);//TODO FIX } this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; -- cgit From bd816f505b29d0bc7efc5a3f03e167ee04f5f4c4 Mon Sep 17 00:00:00 2001 From: Technus Date: Mon, 1 May 2017 08:22:53 +0200 Subject: Random text changes. --- .../implementations/GT_MetaTileEntity_Hatch_Maintenance.java | 2 +- src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java index b8f01f29d6..bcc24149f8 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java @@ -106,7 +106,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - if (aTileEntity.getMetaTileID() == 111)//TODO CHECK + if (aTileEntity.getMetaTileID() == 111) return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescriptionArray, mTextures, true); return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescriptionArray, mTextures, false); } diff --git a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java index 030a9ad06a..f6b6d19810 100644 --- a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java +++ b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java @@ -218,9 +218,9 @@ public class GT_NEI_DefaultHandler drawText(10, 113, "Time: " + (tDuration < 20 ? "< 1" : Integer.valueOf(tDuration / 20)) + " secs", -16777216); } int tSpecial = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue; - if (tSpecial == -100 && GT_Mod.gregtechproxy.mLowGravProcessing) { + if (tSpecial == -100 && GT_Mod.gregtechproxy.mLowGravProcessing) {//IF mSpecialValue == -100 THEN needs Low Gravity drawText(10, 123, "Needs Low Gravity", -16777216); - } else if (tSpecial == -200) { + } else if (tSpecial == -200) {//IF mSpecialValue == -200 THEN needs cleanroom drawText(10, 123, "Needs Cleanroom", -16777216); } else if ((GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost))) { drawText(10, 123, this.mRecipeMap.mNEISpecialValuePre + tSpecial * this.mRecipeMap.mNEISpecialValueMultiplier + this.mRecipeMap.mNEISpecialValuePost, -16777216); -- cgit From 80bf3fd2e66db794a7fc2678b080cdcf548ebc51 Mon Sep 17 00:00:00 2001 From: Technus Date: Mon, 1 May 2017 09:40:28 +0200 Subject: Not needed. --- src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java index 9664845091..ff728f57b9 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java @@ -666,10 +666,9 @@ public abstract class MetaPipeEntity implements IMetaTileEntity { int tX = getBaseMetaTileEntity().getXCoord(), tY = getBaseMetaTileEntity().getYCoord(), tZ = getBaseMetaTileEntity().getZCoord(); World tWorld = getBaseMetaTileEntity().getWorld(); tWorld.setBlock(tX, tY, tZ, Blocks.air); - if (GregTech_API.sMachineExplosions) - if(GT_Mod.gregtechproxy.mPollution) - GT_Pollution.addPollution(getBaseMetaTileEntity(), 100000); + if (GregTech_API.sMachineExplosions) { tWorld.createExplosion(null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true); + } } @Override -- cgit From f2b8bbdde8c7ebac99e5e6fdb3cc497d39dd575e Mon Sep 17 00:00:00 2001 From: Technus Date: Mon, 1 May 2017 10:24:30 +0200 Subject: Optimize imports --- .../interfaces/tileentity/IEnergyConnected.java | 1 - .../gregtech/api/items/GT_MetaGenerated_Tool.java | 1 - .../api/items/GT_RadioactiveCellIC_Item.java | 3 +-- .../api/metatileentity/BaseMetaTileEntity.java | 1 - .../api/metatileentity/MetaPipeEntity.java | 3 --- .../GT_MetaTileEntity_BasicGenerator.java | 2 -- .../GT_MetaTileEntity_BasicMachine.java | 3 +-- .../GT_MetaTileEntity_Hatch_Maintenance.java | 3 --- .../GT_MetaTileEntity_Hatch_Muffler.java | 1 - .../GT_MetaTileEntity_MultiBlockBase.java | 1 - .../java/gregtech/api/objects/GT_UO_Dimension.java | 10 ++------ .../gregtech/api/objects/GT_UO_DimensionList.java | 3 --- .../java/gregtech/api/objects/GT_UO_Fluid.java | 7 ++--- src/main/java/gregtech/api/util/GT_Utility.java | 8 ------ src/main/java/gregtech/common/GT_Client.java | 3 --- src/main/java/gregtech/common/GT_Pollution.java | 6 ++--- src/main/java/gregtech/common/GT_Proxy.java | 24 +++-------------- .../java/gregtech/common/GT_UndergroundOil.java | 4 --- .../gregtech/common/GT_Worldgen_GT_Ore_Layer.java | 1 - .../java/gregtech/common/GT_Worldgenerator.java | 1 - .../common/blocks/GT_Block_Reinforced.java | 3 --- .../common/covers/GT_Cover_Fluidfilter.java | 14 +--------- .../common/items/GT_MetaGenerated_Item_03.java | 10 -------- .../common/items/armor/ArmorCalculation.java | 7 ----- .../gregtech/common/items/armor/ArmorData.java | 21 ++++----------- .../common/items/armor/ElectricModularArmor1.java | 5 ---- .../common/items/armor/ModularArmor_Item.java | 30 +++++++++------------- .../java/gregtech/common/items/armor/Vector3.java | 11 ++++---- .../items/armor/components/ArmorComponent.java | 11 +++----- .../armor/components/LoadArmorComponents.java | 1 - .../common/items/armor/components/StatType.java | 4 --- .../items/armor/gui/ContainerModularArmor.java | 2 -- .../gregtech/common/items/armor/gui/FluidSync.java | 9 ------- .../common/items/armor/gui/FluidSync2.java | 10 -------- .../common/items/armor/gui/GuiElectricArmor1.java | 28 +++++--------------- .../common/items/armor/gui/GuiModularArmor.java | 15 +++++------ .../common/items/armor/gui/InventoryArmor.java | 8 ++---- .../gregtech/common/items/armor/gui/SlotFluid.java | 7 ----- .../items/behaviors/Behaviour_Plunger_Fluid.java | 1 - .../boilers/GT_MetaTileEntity_Boiler_Bronze.java | 1 - .../boilers/GT_MetaTileEntity_Boiler_Lava.java | 1 - .../boilers/GT_MetaTileEntity_Boiler_Steel.java | 1 - .../GT_MetaTileEntity_AdvSeismicProspector.java | 11 -------- .../machines/basic/GT_MetaTileEntity_Scanner.java | 1 - .../basic/GT_MetaTileEntity_Teleporter.java | 5 +--- .../GT_MetaTileEntity_BronzeBlastFurnace.java | 1 - .../GT_MetaTileEntity_LargeTurbine_Plasma.java | 2 -- .../multi/GT_MetaTileEntity_ProcessingArray.java | 2 -- .../steam/GT_MetaTileEntity_Compressor_Bronze.java | 2 -- .../steam/GT_MetaTileEntity_Compressor_Steel.java | 2 -- .../steam/GT_MetaTileEntity_Extractor_Bronze.java | 2 -- .../steam/GT_MetaTileEntity_Extractor_Steel.java | 2 -- .../steam/GT_MetaTileEntity_Macerator_Bronze.java | 1 - .../steam/GT_MetaTileEntity_Macerator_Steel.java | 1 - .../gregtech/loaders/misc/GT_Achievements.java | 1 - .../loaders/oreprocessing/ProcessingCircuit.java | 2 -- .../loaders/oreprocessing/ProcessingCrafting.java | 5 +++- .../oreprocessing/ProcessingCrushedOre.java | 1 - .../loaders/oreprocessing/ProcessingFoil.java | 1 - .../loaders/oreprocessing/ProcessingStick.java | 6 +---- .../loaders/postload/GT_MachineRecipeLoader.java | 3 +-- .../java/gregtech/nei/GT_NEI_DefaultHandler.java | 4 ++- 62 files changed, 65 insertions(+), 276 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java index f3790eff8a..809357f624 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java @@ -8,7 +8,6 @@ import gregtech.common.GT_Pollution; import ic2.api.energy.tile.IEnergySink; import net.minecraft.init.Blocks; import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; diff --git a/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java b/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java index 1c1f2f161e..640be5f23e 100644 --- a/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java +++ b/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java @@ -17,7 +17,6 @@ import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import gregtech.common.GT_Proxy; import mods.railcraft.api.core.items.IToolCrowbar; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; diff --git a/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java b/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java index fe136e0621..24dcc8ef5e 100644 --- a/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java +++ b/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java @@ -1,6 +1,7 @@ package gregtech.api.items; +import gregtech.api.GregTech_API; import ic2.api.reactor.IReactor; import ic2.api.reactor.IReactorComponent; import ic2.core.IC2Potion; @@ -12,8 +13,6 @@ import net.minecraft.world.World; import java.util.ArrayList; -import gregtech.api.GregTech_API; - public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implements IReactorComponent { public final int numberOfCells; diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index c724a83e68..028f47dee3 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -27,7 +27,6 @@ import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.ChunkPosition; import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; diff --git a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java index ff728f57b9..de352b6f8c 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java @@ -2,7 +2,6 @@ package gregtech.api.metatileentity; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -10,7 +9,6 @@ import gregtech.api.objects.GT_ItemStack; import gregtech.api.util.GT_Config; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; -import gregtech.common.GT_Pollution; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.texture.IIconRegister; @@ -22,7 +20,6 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.world.ChunkPosition; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java index 492570c8f9..c20b8ad3a8 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java @@ -7,11 +7,9 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Pollution; -import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; -import net.minecraft.world.ChunkPosition; import net.minecraftforge.fluids.FluidStack; import java.util.Collection; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java index 56df2b1a96..b2d1cbd3a1 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java @@ -10,7 +10,6 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_ItemStack; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.objects.XSTR; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; @@ -20,8 +19,8 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.DimensionManager; import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java index bcc24149f8..c96aa56aef 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java @@ -23,9 +23,6 @@ import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import scala.actors.threadpool.Arrays; - -import java.util.List; public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch { public boolean mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false, mAuto; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java index 9b9e83296c..8a53a598cc 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java @@ -10,7 +10,6 @@ import gregtech.api.objects.XSTR; import gregtech.common.GT_Pollution; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; 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 a67ced02c4..9256117ab3 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 @@ -23,7 +23,6 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.ChunkPosition; import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; diff --git a/src/main/java/gregtech/api/objects/GT_UO_Dimension.java b/src/main/java/gregtech/api/objects/GT_UO_Dimension.java index 657e9353c6..cca5e22bf7 100644 --- a/src/main/java/gregtech/api/objects/GT_UO_Dimension.java +++ b/src/main/java/gregtech/api/objects/GT_UO_Dimension.java @@ -1,16 +1,10 @@ package gregtech.api.objects; -import java.util.ArrayList; -import java.util.Random; -import java.util.Set; - import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; - -import gregtech.api.enums.GT_Values; import net.minecraftforge.common.config.ConfigCategory; -import net.minecraftforge.common.config.Configuration; -import net.minecraftforge.fluids.Fluid; + +import java.util.Random; public class GT_UO_Dimension { diff --git a/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java b/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java index c566affe41..68ad9cfca7 100644 --- a/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java +++ b/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java @@ -2,9 +2,6 @@ package gregtech.api.objects; import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; - -import gregtech.GT_Mod; -import gregtech.api.enums.GT_Values; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.config.ConfigCategory; import net.minecraftforge.common.config.Configuration; diff --git a/src/main/java/gregtech/api/objects/GT_UO_Fluid.java b/src/main/java/gregtech/api/objects/GT_UO_Fluid.java index 398717b5b6..81d1387e12 100644 --- a/src/main/java/gregtech/api/objects/GT_UO_Fluid.java +++ b/src/main/java/gregtech/api/objects/GT_UO_Fluid.java @@ -1,14 +1,11 @@ package gregtech.api.objects; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Random; - -import gregtech.api.enums.GT_Values; import net.minecraftforge.common.config.ConfigCategory; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; +import java.util.Random; + public class GT_UO_Fluid { public String Registry = "null"; public int MaxAmount = 0; diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index af667eb4d5..dbb6bd7e76 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -2,13 +2,11 @@ package gregtech.api.util; import cofh.api.transport.IItemDuct; import cpw.mods.fml.common.FMLCommonHandler; -import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.damagesources.GT_DamageSources; import gregtech.api.enchants.Enchantment_Radioactivity; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; import gregtech.api.enums.SubTag; import gregtech.api.events.BlockScanningEvent; import gregtech.api.interfaces.IDebugableBlock; @@ -18,9 +16,7 @@ import gregtech.api.items.GT_EnergyArmor_Item; import gregtech.api.items.GT_Generic_Item; import gregtech.api.net.GT_Packet_Sound; import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_UO_Fluid; import gregtech.api.objects.ItemData; -import gregtech.api.objects.XSTR; import gregtech.api.threads.GT_Runnable_Sound; import gregtech.common.GT_Proxy; import ic2.api.recipe.IRecipeInput; @@ -56,11 +52,8 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MathHelper; -import net.minecraft.world.ChunkCoordIntPair; -import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; import net.minecraft.world.WorldServer; -import net.minecraft.world.chunk.Chunk; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.ForgeDirection; @@ -78,7 +71,6 @@ import java.util.Map.Entry; import static gregtech.api.enums.GT_Values.*; import static gregtech.common.GT_Proxy.GTPOLLUTION; -import static gregtech.common.GT_Proxy.dimensionWiseChunkData; import static gregtech.common.GT_UndergroundOil.undergroundOil; /** diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index fa14abf03d..bc44095510 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -11,13 +11,11 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import gregtech.GT_Mod; import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.ITurnable; import gregtech.api.metatileentity.BaseMetaPipeEntity; -import gregtech.api.objects.GT_FluidStack; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_PlayedSound; import gregtech.api.util.GT_Recipe; @@ -33,7 +31,6 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatFileWriter; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChatComponentText; import net.minecraft.world.World; import net.minecraftforge.client.event.DrawBlockHighlightEvent; import net.minecraftforge.oredict.OreDictionary; diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index 0120f2c353..cfdd39cb8d 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -13,12 +13,12 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.ChunkCoordIntPair; -import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; -import net.minecraftforge.event.world.WorldEvent; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; import static gregtech.common.GT_Proxy.*; diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index f66a77261f..5a8fa2cc50 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -1,13 +1,7 @@ package gregtech.common; -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.IFuelHandler; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.ModContainer; -import cpw.mods.fml.common.ProgressManager; +import cpw.mods.fml.common.*; import cpw.mods.fml.common.eventhandler.Event.Result; -import cpw.mods.fml.common.eventhandler.EventBus; -import cpw.mods.fml.common.eventhandler.EventPriority; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.common.network.FMLNetworkEvent; @@ -24,20 +18,12 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.items.GT_MetaGenerated_Item; import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.objects.GT_Fluid; -import gregtech.api.objects.GT_FluidStack; -import gregtech.api.objects.GT_UO_DimensionList; -import gregtech.api.objects.ItemData; -import gregtech.api.objects.MaterialStack; +import gregtech.api.objects.*; import gregtech.api.util.*; import gregtech.common.entities.GT_Entity_Arrow; import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gregtech.common.items.armor.*; -import gregtech.common.items.armor.gui.ContainerBasicArmor; -import gregtech.common.items.armor.gui.ContainerElectricArmor1; -import gregtech.common.items.armor.gui.GuiElectricArmor1; -import gregtech.common.items.armor.gui.GuiModularArmor; -import gregtech.common.items.armor.gui.InventoryArmor; +import gregtech.common.items.armor.ModularArmor_Item; +import gregtech.common.items.armor.gui.*; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; @@ -61,7 +47,6 @@ import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.World; import net.minecraft.world.WorldSettings.GameType; import net.minecraft.world.gen.feature.WorldGenMinable; -import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.event.entity.EntityJoinWorldEvent; @@ -72,7 +57,6 @@ import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.event.terraingen.OreGenEvent; import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.event.world.ChunkDataEvent; -import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; diff --git a/src/main/java/gregtech/common/GT_UndergroundOil.java b/src/main/java/gregtech/common/GT_UndergroundOil.java index bc9a1331b1..c07729aaaa 100644 --- a/src/main/java/gregtech/common/GT_UndergroundOil.java +++ b/src/main/java/gregtech/common/GT_UndergroundOil.java @@ -4,18 +4,14 @@ import gregtech.GT_Mod; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_UO_Fluid; import gregtech.api.objects.XSTR; -import gregtech.common.GT_Proxy; import net.minecraft.world.ChunkCoordIntPair; -import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; -import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import java.util.HashMap; -import static gregtech.api.util.GT_Utility.getScaleCoordinates; import static gregtech.common.GT_Proxy.*; /** diff --git a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java index 8d762a0d02..2fa8f27307 100644 --- a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java +++ b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java @@ -2,7 +2,6 @@ package gregtech.common; import gregtech.GT_Mod; import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.util.GT_Log; import gregtech.api.world.GT_Worldgen; diff --git a/src/main/java/gregtech/common/GT_Worldgenerator.java b/src/main/java/gregtech/common/GT_Worldgenerator.java index 539ec1c746..334097c729 100644 --- a/src/main/java/gregtech/common/GT_Worldgenerator.java +++ b/src/main/java/gregtech/common/GT_Worldgenerator.java @@ -3,7 +3,6 @@ package gregtech.common; import cpw.mods.fml.common.IWorldGenerator; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; import gregtech.api.objects.XSTR; import gregtech.api.util.GT_Log; import gregtech.api.world.GT_Worldgen; diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java index d7a47c0bb6..05caf4cb6a 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java @@ -14,13 +14,10 @@ import gregtech.api.objects.MaterialStack; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; -import ic2.core.block.EntityIC2Explosive; -import ic2.core.block.EntityItnt; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EnumCreatureType; import net.minecraft.entity.boss.EntityWither; import net.minecraft.entity.item.EntityTNTPrimed; diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java b/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java index 2b65e36994..9b9e426bc3 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java @@ -1,23 +1,11 @@ package gregtech.common.covers; -import gregtech.api.GregTech_API; import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.interfaces.tileentity.IMachineProgress; -import gregtech.api.objects.ItemData; import gregtech.api.util.GT_CoverBehavior; -import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidContainerItem; -import net.minecraftforge.fluids.IFluidHandler; +import net.minecraftforge.fluids.*; public class GT_Cover_Fluidfilter 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 a99bea0c0e..b2d2c58b84 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 @@ -1,20 +1,10 @@ package gregtech.common.items; -import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.SubTag; import gregtech.api.items.GT_MetaGenerated_Item_X32; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; -import ic2.core.IC2; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { diff --git a/src/main/java/gregtech/common/items/armor/ArmorCalculation.java b/src/main/java/gregtech/common/items/armor/ArmorCalculation.java index 7c8100db62..8ecc5766ba 100644 --- a/src/main/java/gregtech/common/items/armor/ArmorCalculation.java +++ b/src/main/java/gregtech/common/items/armor/ArmorCalculation.java @@ -1,16 +1,9 @@ package gregtech.common.items.armor; -import cpw.mods.fml.common.Loader; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.objects.ItemData; import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.fluids.FluidStack; -import thaumcraft.api.nodes.IRevealer; public class ArmorCalculation { public static float[] calculateArmor(ItemStack[] parts) { diff --git a/src/main/java/gregtech/common/items/armor/ArmorData.java b/src/main/java/gregtech/common/items/armor/ArmorData.java index 00ec76aeea..52265a2b33 100644 --- a/src/main/java/gregtech/common/items/armor/ArmorData.java +++ b/src/main/java/gregtech/common/items/armor/ArmorData.java @@ -1,18 +1,6 @@ package gregtech.common.items.armor; -import java.text.DecimalFormat; -import java.text.DecimalFormatSymbols; -import java.text.NumberFormat; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Random; - -import gregtech.api.damagesources.GT_DamageSources; import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Utility; import gregtech.common.items.armor.components.ArmorComponent; import gregtech.common.items.armor.components.StatType; import gregtech.common.items.armor.gui.ContainerBasicArmor; @@ -21,12 +9,13 @@ import gregtech.common.items.armor.gui.InventoryArmor; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.DamageSource; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.text.NumberFormat; +import java.util.*; + public class ArmorData { public int type; // 0 = helmet; 1 = chestplate; 2 = leggings; 3 = boots; diff --git a/src/main/java/gregtech/common/items/armor/ElectricModularArmor1.java b/src/main/java/gregtech/common/items/armor/ElectricModularArmor1.java index 5d8bfd82f0..d310fa4c96 100644 --- a/src/main/java/gregtech/common/items/armor/ElectricModularArmor1.java +++ b/src/main/java/gregtech/common/items/armor/ElectricModularArmor1.java @@ -1,12 +1,7 @@ package gregtech.common.items.armor; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidContainerItem; public class ElectricModularArmor1 extends ModularArmor_Item{ diff --git a/src/main/java/gregtech/common/items/armor/ModularArmor_Item.java b/src/main/java/gregtech/common/items/armor/ModularArmor_Item.java index d2e51e67f1..80e28744c0 100644 --- a/src/main/java/gregtech/common/items/armor/ModularArmor_Item.java +++ b/src/main/java/gregtech/common/items/armor/ModularArmor_Item.java @@ -1,5 +1,11 @@ package gregtech.common.items.armor; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.damagesources.GT_DamageSources; import gregtech.api.enums.GT_Values; import gregtech.common.items.armor.components.StatType; @@ -7,20 +13,6 @@ import gregtech.common.items.armor.gui.ContainerBasicArmor; import gregtech.common.items.armor.gui.ContainerModularArmor; import gregtech.common.items.armor.gui.InventoryArmor; import ic2.core.IC2; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Random; - -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.Optional; -import thaumcraft.api.IGoggles; -import thaumcraft.api.nodes.IRevealer; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.settings.GameSettings; @@ -29,21 +21,23 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; -import net.minecraft.inventory.IInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; -import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.ISpecialArmor; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.event.entity.living.LivingFallEvent; +import thaumcraft.api.IGoggles; +import thaumcraft.api.nodes.IRevealer; + +import java.util.LinkedList; +import java.util.List; +import java.util.Random; @Optional.InterfaceList(value = { @Optional.Interface(iface = "thaumcraft.api.IGoggles", modid = "Thaumcraft", striprefs = true), @Optional.Interface(iface = "thaumcraft.api.nodes.IRevealer", modid = "Thaumcraft", striprefs = true) }) diff --git a/src/main/java/gregtech/common/items/armor/Vector3.java b/src/main/java/gregtech/common/items/armor/Vector3.java index 590f544546..2f79ff4c69 100644 --- a/src/main/java/gregtech/common/items/armor/Vector3.java +++ b/src/main/java/gregtech/common/items/armor/Vector3.java @@ -1,8 +1,7 @@ package gregtech.common.items.armor; -import java.math.BigDecimal; -import java.math.MathContext; -import java.math.RoundingMode; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; @@ -10,8 +9,10 @@ import net.minecraft.util.Vec3; import org.lwjgl.opengl.GL11; import org.lwjgl.util.vector.Vector3f; import org.lwjgl.util.vector.Vector4f; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.math.BigDecimal; +import java.math.MathContext; +import java.math.RoundingMode; public class Vector3 { public static Vector3 zero = new Vector3(); diff --git a/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java b/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java index 1d65f973ed..ea2f0184dd 100644 --- a/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java +++ b/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java @@ -1,20 +1,15 @@ package gregtech.common.items.armor.components; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier; import gregtech.api.GregTech_API; -import gregtech.api.objects.ItemData; -import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.items.armor.ArmorData; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; +import java.util.HashMap; +import java.util.Map; + public abstract class ArmorComponent implements IArmorComponent { public ItemStack mStack; public String mOreDict; diff --git a/src/main/java/gregtech/common/items/armor/components/LoadArmorComponents.java b/src/main/java/gregtech/common/items/armor/components/LoadArmorComponents.java index d6d37fd935..bea0e2b5b4 100644 --- a/src/main/java/gregtech/common/items/armor/components/LoadArmorComponents.java +++ b/src/main/java/gregtech/common/items/armor/components/LoadArmorComponents.java @@ -6,7 +6,6 @@ import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; -import ic2.core.Ic2Items; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; diff --git a/src/main/java/gregtech/common/items/armor/components/StatType.java b/src/main/java/gregtech/common/items/armor/components/StatType.java index 80fe5cc6d4..aacb997f9b 100644 --- a/src/main/java/gregtech/common/items/armor/components/StatType.java +++ b/src/main/java/gregtech/common/items/armor/components/StatType.java @@ -1,9 +1,5 @@ package gregtech.common.items.armor.components; -import java.util.List; - -import net.minecraftforge.fluids.FluidStack; - public enum StatType { ELECTRIC, ELECTRIC2, diff --git a/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java b/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java index 0258a3eb3c..1f63afac5e 100644 --- a/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java +++ b/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java @@ -4,9 +4,7 @@ import gregtech.common.items.armor.ArmorData; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; diff --git a/src/main/java/gregtech/common/items/armor/gui/FluidSync.java b/src/main/java/gregtech/common/items/armor/gui/FluidSync.java index 8f1aef56d1..0e17a82ee8 100644 --- a/src/main/java/gregtech/common/items/armor/gui/FluidSync.java +++ b/src/main/java/gregtech/common/items/armor/gui/FluidSync.java @@ -1,14 +1,5 @@ package gregtech.common.items.armor.gui; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.WorldServer; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; - -import com.google.common.base.Charsets; -import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataOutput; import com.google.common.io.ByteStreams; diff --git a/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java b/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java index 75c3c6d363..6882e67268 100644 --- a/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java +++ b/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java @@ -1,15 +1,5 @@ package gregtech.common.items.armor.gui; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.WorldServer; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; - -import com.google.common.base.Charsets; -import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataOutput; import com.google.common.io.ByteStreams; diff --git a/src/main/java/gregtech/common/items/armor/gui/GuiElectricArmor1.java b/src/main/java/gregtech/common/items/armor/gui/GuiElectricArmor1.java index dec19e0308..b1e08bc708 100644 --- a/src/main/java/gregtech/common/items/armor/gui/GuiElectricArmor1.java +++ b/src/main/java/gregtech/common/items/armor/gui/GuiElectricArmor1.java @@ -1,11 +1,14 @@ package gregtech.common.items.armor.gui; -import gregtech.api.enums.GT_Values; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Utility; -import gregtech.common.GT_Network; -import gregtech.common.items.armor.ArmorData; import gregtech.common.items.armor.components.StatType; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Slot; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; @@ -14,23 +17,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidContainerItem; - @SideOnly(Side.CLIENT) public class GuiElectricArmor1 extends GuiContainer { ContainerModularArmor cont; diff --git a/src/main/java/gregtech/common/items/armor/gui/GuiModularArmor.java b/src/main/java/gregtech/common/items/armor/gui/GuiModularArmor.java index ae2ba88013..9d552f4d2c 100644 --- a/src/main/java/gregtech/common/items/armor/gui/GuiModularArmor.java +++ b/src/main/java/gregtech/common/items/armor/gui/GuiModularArmor.java @@ -1,19 +1,16 @@ package gregtech.common.items.armor.gui; -import gregtech.api.util.GT_LanguageManager; -import gregtech.common.items.armor.components.StatType; - -import java.util.ArrayList; -import java.util.List; - -import org.lwjgl.opengl.GL11; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.util.GT_LanguageManager; +import gregtech.common.items.armor.components.StatType; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +import java.util.ArrayList; +import java.util.List; @SideOnly(Side.CLIENT) public class GuiModularArmor extends GuiContainer { diff --git a/src/main/java/gregtech/common/items/armor/gui/InventoryArmor.java b/src/main/java/gregtech/common/items/armor/gui/InventoryArmor.java index ff77584314..2a4ca46f4a 100644 --- a/src/main/java/gregtech/common/items/armor/gui/InventoryArmor.java +++ b/src/main/java/gregtech/common/items/armor/gui/InventoryArmor.java @@ -1,20 +1,16 @@ package gregtech.common.items.armor.gui; -import gregtech.api.util.GT_Utility; import gregtech.common.items.armor.ArmorData; import gregtech.common.items.armor.ModularArmor_Item; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.oredict.OreDictionary; +import java.util.Random; + public class InventoryArmor implements IInventory { public ItemStack[] parts; diff --git a/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java b/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java index a3d2bdaf09..63e8873df9 100644 --- a/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java +++ b/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java @@ -1,16 +1,9 @@ package gregtech.common.items.armor.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import scala.reflect.internal.Trees.This; -import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fluids.FluidRegistry; public class SlotFluid extends Slot{ diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Fluid.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Fluid.java index 0b9dcdf3c2..bd866ba994 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Fluid.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Fluid.java @@ -5,7 +5,6 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.items.GT_MetaBase_Item; import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBatteryBuffer; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java index c725634030..70f85673c4 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java @@ -14,7 +14,6 @@ import gregtech.common.GT_Pollution; import gregtech.common.gui.GT_Container_Boiler; import gregtech.common.gui.GT_GUIContainer_Boiler; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.world.ChunkPosition; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java index 8aef783b6b..352a9c66a3 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java @@ -14,7 +14,6 @@ import gregtech.common.GT_Pollution; import gregtech.common.gui.GT_Container_Boiler; import gregtech.common.gui.GT_GUIContainer_Boiler; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.world.ChunkPosition; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java index adc1a0b152..71827cc4e2 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java @@ -14,7 +14,6 @@ import gregtech.common.GT_Pollution; import gregtech.common.gui.GT_Container_Boiler; import gregtech.common.gui.GT_GUIContainer_Boiler; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.world.ChunkPosition; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java index 6f1a9e32e3..2b397329ce 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java @@ -1,25 +1,15 @@ package gregtech.common.tileentities.machines.basic; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; - 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.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; 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_Utility; import gregtech.common.GT_UndergroundOil; @@ -35,7 +25,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.ChunkPosition; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java index beb2e2b9b3..bbf6be7519 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java @@ -18,7 +18,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.nbt.NBTTagString; -import scala.tools.nsc.symtab.SymbolLoadersStats; public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java index 3b1fcab67c..8b74e6c2fa 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java @@ -1,14 +1,12 @@ package gregtech.common.tileentities.machines.basic; import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.Materials; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.objects.XSTR; import gregtech.api.util.GT_Config; import gregtech.api.util.GT_Utility; import gregtech.common.gui.GT_Container_Teleporter; @@ -22,13 +20,11 @@ import net.minecraft.entity.boss.EntityDragonPart; import net.minecraft.entity.effect.EntityWeatherEffect; import net.minecraft.entity.item.*; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.entity.projectile.EntityFireball; import net.minecraft.entity.projectile.EntityFishHook; import net.minecraft.entity.projectile.EntityThrowable; -import net.minecraft.init.Blocks; import net.minecraft.inventory.IInventory; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -37,6 +33,7 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.fluids.FluidStack; + import static gregtech.api.enums.GT_Values.V; public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java index f63c764c52..c46ad5e7bc 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java @@ -22,7 +22,6 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java index 2a3c6011d6..a8fea99f9a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java @@ -18,8 +18,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidRegistry; - import java.util.ArrayList; import java.util.Collection; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java index cd7f6e08f6..e8f00cf535 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java @@ -19,8 +19,6 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import org.apache.commons.lang3.ArrayUtils; -import static gregtech.api.enums.GT_Values.V; - import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java index 472f388202..ee2937bd26 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java @@ -8,11 +8,9 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_Compressor_Bronze extends GT_MetaTileEntity_BasicMachine_Bronze { diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java index c5d4b4b23a..6773499b3c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java @@ -8,11 +8,9 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_Compressor_Steel extends GT_MetaTileEntity_BasicMachine_Steel { diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java index 169121908b..396dc7857b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java @@ -8,11 +8,9 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_Extractor_Bronze extends GT_MetaTileEntity_BasicMachine_Bronze { diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java index 260d675c68..0d737be386 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java @@ -8,11 +8,9 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_Extractor_Steel extends GT_MetaTileEntity_BasicMachine_Steel { diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java index 573af14373..07e2c4722c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java @@ -8,7 +8,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java index 759d2a1de1..3ac197ee4d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java @@ -8,7 +8,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; diff --git a/src/main/java/gregtech/loaders/misc/GT_Achievements.java b/src/main/java/gregtech/loaders/misc/GT_Achievements.java index cf92dbcb46..bb4d700ff7 100644 --- a/src/main/java/gregtech/loaders/misc/GT_Achievements.java +++ b/src/main/java/gregtech/loaders/misc/GT_Achievements.java @@ -19,7 +19,6 @@ import gregtech.api.util.GT_Recipe; import gregtech.common.items.GT_MetaGenerated_Tool_01; import ic2.core.Ic2Items; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.stats.Achievement; diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java index 63b4c50473..f28aca2b40 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java @@ -1,9 +1,7 @@ package gregtech.loaders.oreprocessing; -import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; -import gregtech.api.enums.OreDictNames; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java index 6d5e5335ee..572ce9d2b1 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java @@ -1,6 +1,9 @@ package gregtech.loaders.oreprocessing; -import gregtech.api.enums.*; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrushedOre.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrushedOre.java index ba4264f7dd..31cd0d5568 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrushedOre.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrushedOre.java @@ -1,6 +1,5 @@ package gregtech.loaders.oreprocessing; -import cpw.mods.fml.common.Loader; import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingFoil.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingFoil.java index ce46671fdb..ae3e28b0b9 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingFoil.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingFoil.java @@ -4,7 +4,6 @@ import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.SubTag; import gregtech.api.interfaces.IOreRecipeRegistrator; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_OreDictUnificator; diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStick.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStick.java index 9a68738b05..e02359541d 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStick.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStick.java @@ -1,10 +1,6 @@ package gregtech.loaders.oreprocessing; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.SubTag; +import gregtech.api.enums.*; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index db3542abfc..f021f37ec4 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -1,5 +1,6 @@ package gregtech.loaders.postload; +import codechicken.nei.api.API; import com.dreammaster.gthandler.CustomItemList; import cpw.mods.fml.common.Loader; import gregtech.GT_Mod; @@ -26,8 +27,6 @@ import java.util.Arrays; import java.util.Iterator; import java.util.Map; -import codechicken.nei.api.API; - public class GT_MachineRecipeLoader implements Runnable { private final MaterialStack[][] mAlloySmelterList = {{new MaterialStack(Materials.Tetrahedrite, 3L), new MaterialStack(Materials.Tin, 1L), new MaterialStack(Materials.Bronze, 3L)}, {new MaterialStack(Materials.Tetrahedrite, 3L), new MaterialStack(Materials.Zinc, 1L), new MaterialStack(Materials.Brass, 3L)}, {new MaterialStack(Materials.Copper, 3L), new MaterialStack(Materials.Tin, 1L), new MaterialStack(Materials.Bronze, 4L)}, {new MaterialStack(Materials.Copper, 3L), new MaterialStack(Materials.Zinc, 1L), new MaterialStack(Materials.Brass, 4L)}, {new MaterialStack(Materials.Copper, 1L), new MaterialStack(Materials.Nickel, 1L), new MaterialStack(Materials.Cupronickel, 2L)}, {new MaterialStack(Materials.Copper, 1L), new MaterialStack(Materials.Redstone, 4L), new MaterialStack(Materials.RedAlloy, 1L)}, {new MaterialStack(Materials.AnnealedCopper, 3L), new MaterialStack(Materials.Tin, 1L), new MaterialStack(Materials.Bronze, 4L)}, {new MaterialStack(Materials.AnnealedCopper, 3L), new MaterialStack(Materials.Zinc, 1L), new MaterialStack(Materials.Brass, 4L)}, {new MaterialStack(Materials.AnnealedCopper, 1L), new MaterialStack(Materials.Nickel, 1L), new MaterialStack(Materials.Cupronickel, 2L)}, {new MaterialStack(Materials.AnnealedCopper, 1L), new MaterialStack(Materials.Redstone, 4L), new MaterialStack(Materials.RedAlloy, 1L)}, {new MaterialStack(Materials.Iron, 1L), new MaterialStack(Materials.Tin, 1L), new MaterialStack(Materials.TinAlloy, 2L)}, {new MaterialStack(Materials.WroughtIron, 1L), new MaterialStack(Materials.Tin, 1L), new MaterialStack(Materials.TinAlloy, 2L)}, {new MaterialStack(Materials.Iron, 2L), new MaterialStack(Materials.Nickel, 1L), new MaterialStack(Materials.Invar, 3L)}, {new MaterialStack(Materials.WroughtIron, 2L), new MaterialStack(Materials.Nickel, 1L), new MaterialStack(Materials.Invar, 3L)}, {new MaterialStack(Materials.Tin, 9L), new MaterialStack(Materials.Antimony, 1L), new MaterialStack(Materials.SolderingAlloy, 10L)}, {new MaterialStack(Materials.Lead, 4L), new MaterialStack(Materials.Antimony, 1L), new MaterialStack(Materials.BatteryAlloy, 5L)}, {new MaterialStack(Materials.Gold, 1L), new MaterialStack(Materials.Silver, 1L), new MaterialStack(Materials.Electrum, 2L)}, {new MaterialStack(Materials.Magnesium, 1L), new MaterialStack(Materials.Aluminium, 2L), new MaterialStack(Materials.Magnalium, 3L)}, {new MaterialStack(Materials.Silver, 1L), new MaterialStack(Materials.Nikolite, 4L), new MaterialStack(Materials.BlueAlloy, 1L)}}; private final static String aTextAE = "appliedenergistics2"; private final static String aTextAEMM = "item.ItemMultiMaterial"; private final static String aTextForestry = "Forestry"; diff --git a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java index f6b6d19810..cd9469850a 100644 --- a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java +++ b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java @@ -29,7 +29,9 @@ import net.minecraftforge.fluids.FluidStack; import org.lwjgl.opengl.GL11; import java.awt.*; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; import java.util.List; public class GT_NEI_DefaultHandler -- cgit From 254306ebfddbe41bef767ce5b78bf3992e1ea4ae Mon Sep 17 00:00:00 2001 From: Technus Date: Mon, 1 May 2017 10:28:29 +0200 Subject: Not needed --- src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java index de352b6f8c..ef4f4f1362 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java @@ -663,9 +663,8 @@ public abstract class MetaPipeEntity implements IMetaTileEntity { int tX = getBaseMetaTileEntity().getXCoord(), tY = getBaseMetaTileEntity().getYCoord(), tZ = getBaseMetaTileEntity().getZCoord(); World tWorld = getBaseMetaTileEntity().getWorld(); tWorld.setBlock(tX, tY, tZ, Blocks.air); - if (GregTech_API.sMachineExplosions) { + if (GregTech_API.sMachineExplosions) tWorld.createExplosion(null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true); - } } @Override -- cgit From 8f74a611629c09a9ce4d9970502c980355595d8f Mon Sep 17 00:00:00 2001 From: Technus Date: Sat, 6 May 2017 10:10:20 +0200 Subject: Remove compiletime dependency of CoreMod, Add runtime dependency of CoreMod +optimize imports +add ToDo for dream to migrate the recipes to coremod --- src/main/java/gregtech/GT_Mod.java | 2 +- .../gregtech/api/metatileentity/MetaTileEntity.java | 3 --- .../GT_MetaTileEntity_DieselGenerator.java | 4 ++-- .../multi/GT_MetaTileEntity_PyrolyseOven.java | 20 +++++++++++++------- .../loaders/oreprocessing/ProcessingWire.java | 2 -- .../loaders/postload/GT_CraftingRecipeLoader.java | 10 +++++----- .../loaders/postload/GT_MachineRecipeLoader.java | 6 ++---- 7 files changed, 23 insertions(+), 24 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index b99a3b1d3c..73d12546b2 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -64,7 +64,7 @@ import java.util.Map.Entry; import java.util.regex.Matcher; import java.util.regex.Pattern; -@Mod(modid = "gregtech", name = "GregTech", version = "MC1710", useMetadata = false, dependencies = "required-after:IC2; after:Forestry; after:PFAAGeologica; after:Thaumcraft; after:Railcraft; after:appliedenergistics2; after:ThermalExpansion; after:TwilightForest; after:harvestcraft; after:magicalcrops; after:BuildCraft|Transport; after:BuildCraft|Silicon; after:BuildCraft|Factory; after:BuildCraft|Energy; after:BuildCraft|Core; after:BuildCraft|Builders; after:GalacticraftCore; after:GalacticraftMars; after:GalacticraftPlanets; after:ThermalExpansion|Transport; after:ThermalExpansion|Energy; after:ThermalExpansion|Factory; after:RedPowerCore; after:RedPowerBase; after:RedPowerMachine; after:RedPowerCompat; after:RedPowerWiring; after:RedPowerLogic; after:RedPowerLighting; after:RedPowerWorld; after:RedPowerControl; after:UndergroundBiomes;") +@Mod(modid = "gregtech", name = "GregTech", version = "MC1710", useMetadata = false, dependencies = "required-after:dreamcraft; required-after:IC2; after:Forestry; after:PFAAGeologica; after:Thaumcraft; after:Railcraft; after:appliedenergistics2; after:ThermalExpansion; after:TwilightForest; after:harvestcraft; after:magicalcrops; after:BuildCraft|Transport; after:BuildCraft|Silicon; after:BuildCraft|Factory; after:BuildCraft|Energy; after:BuildCraft|Core; after:BuildCraft|Builders; after:GalacticraftCore; after:GalacticraftMars; after:GalacticraftPlanets; after:ThermalExpansion|Transport; after:ThermalExpansion|Energy; after:ThermalExpansion|Factory; after:RedPowerCore; after:RedPowerBase; after:RedPowerMachine; after:RedPowerCompat; after:RedPowerWiring; after:RedPowerLogic; after:RedPowerLighting; after:RedPowerWorld; after:RedPowerControl; after:UndergroundBiomes;") public class GT_Mod implements IGT_Mod { public static final int VERSION = 509; public static final int REQUIRED_IC2 = 624; diff --git a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java index f9da109599..d8349d0d04 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java @@ -2,7 +2,6 @@ package gregtech.api.metatileentity; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -11,7 +10,6 @@ import gregtech.api.util.GT_Config; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; -import gregtech.common.GT_Pollution; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.texture.IIconRegister; @@ -22,7 +20,6 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.world.ChunkPosition; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java index 6aa40a378c..b1505b0e2a 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java @@ -1,6 +1,5 @@ package gregtech.common.tileentities.generators; -import com.dreammaster.main.MainRegistry; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; @@ -11,6 +10,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; @@ -76,7 +76,7 @@ public class GT_MetaTileEntity_DieselGenerator @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if(aTick%100==0 && mFluid!=null && mFluid.amount>this.getCapacity()){ - MainRegistry.Logger.error("Dupe Abuse: "+aBaseMetaTileEntity.getOwnerName()+" Coords: "+aBaseMetaTileEntity.getXCoord()+" "+aBaseMetaTileEntity.getYCoord()+" "+aBaseMetaTileEntity.getZCoord(),aBaseMetaTileEntity); + GT_Log.err.println("Dupe Abuse: "+aBaseMetaTileEntity.getOwnerName()+" Coords: "+aBaseMetaTileEntity.getXCoord()+" "+aBaseMetaTileEntity.getYCoord()+" "+aBaseMetaTileEntity.getZCoord()); aBaseMetaTileEntity.setToFire(); } super.onPostTick(aBaseMetaTileEntity, aTick); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java index 7a6da0e95a..01bf4ecb31 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java @@ -1,6 +1,7 @@ package gregtech.common.tileentities.machines.multi; -import com.dreammaster.gthandler.casings.GT_Container_CasingsNH; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_MultiMachine; @@ -11,6 +12,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockB import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; @@ -118,6 +120,10 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 2; int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 2; + + Block CasingBlock= Loader.isModLoaded("dreamcraft")? GameRegistry.findBlock("dreamcraft","gt.blockcasingsNH"): GregTech_API.sBlockCasings1; + int CasingMeta= Loader.isModLoaded("dreamcraft")?2:0; + replaceDeprecatedCoils(aBaseMetaTileEntity); for (int i = -2; i < 3; i++) { for (int j = -2; j < 3; j++) { @@ -133,10 +139,10 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock } } else if (h == 3) {// innen decke (ulv casings + input + muffler) if ((!addInputToMachineList(tTileEntity, 120)) && (!addMufflerToMachineList(tTileEntity, 120))) { - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != GT_Container_CasingsNH.sBlockCasingsNH) { + if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != CasingBlock) { return false; } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 2) { + if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != CasingMeta) { return false; } } @@ -149,19 +155,19 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock if (h == 0) {// au�en boden (controller, output, energy, maintainance, rest ulv casings) if ((!addMaintenanceToMachineList(tTileEntity, 120)) && (!addOutputToMachineList(tTileEntity, 120)) && (!addEnergyInputToMachineList(tTileEntity, 120))) { if ((xDir + i != 0) || (zDir + j != 0)) {//no controller - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != GT_Container_CasingsNH.sBlockCasingsNH) { + if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != CasingBlock) { return false; } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 2) { + if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != CasingMeta) { return false; } } } } else {// au�en �ber boden (ulv casings) - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != GT_Container_CasingsNH.sBlockCasingsNH) { + if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != CasingBlock) { return false; } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 2) { + if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != CasingMeta) { return false; } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingWire.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingWire.java index d8b59bcf04..ca4b43f77f 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingWire.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingWire.java @@ -8,8 +8,6 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Proxy; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; import net.minecraft.item.ItemStack; public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistrator { diff --git a/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java index 2e582868ac..ab7a772747 100644 --- a/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java @@ -1,6 +1,5 @@ package gregtech.loaders.postload; -import com.dreammaster.gthandler.CustomItemList; import cpw.mods.fml.common.Loader; import gregtech.GT_Mod; import gregtech.api.GregTech_API; @@ -858,9 +857,10 @@ public class GT_CraftingRecipeLoader implements Runnable { GT_ModHandler.addCraftingRecipe(ItemList.ModularElectric2Leggings.getWildcard(1), bits, new Object[]{"BCB", "A A", "A A", 'A', OrePrefixes.stick.get(Materials.TungstenSteel), 'B', OrePrefixes.plateAlloy.get(Materials.Carbon), 'C', OrePrefixes.battery.get(Materials.Master)}); GT_ModHandler.addCraftingRecipe(ItemList.ModularElectric2Boots.getWildcard(1), bits, new Object[]{"A A", "BCB", "A A", 'A', OrePrefixes.stick.get(Materials.TungstenSteel), 'B', OrePrefixes.plateAlloy.get(Materials.Carbon), 'C', OrePrefixes.battery.get(Materials.Master)}); - GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SGS", "CPC", "TRT", 'C', OrePrefixes.circuit.get(Materials.Basic), 'G', new ItemStack(Blocks.glass_pane, 1), 'P', OrePrefixes.plateAlloy.get(Materials.Carbon), 'S', ItemList.Circuit_Silicon_Wafer, 'T', OrePrefixes.wireGt01.get(Materials.RedAlloy), 'R', CustomItemList.AluminiumIronPlate}); - GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_8V.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SGS", "CRC","PAP", 'C', OrePrefixes.circuit.get(Materials.Good), 'G', new ItemStack(Blocks.glass_pane, 1), 'P', OrePrefixes.wireGt01.get(Materials.Tin), 'S', ItemList.Circuit_Silicon_Wafer,'R', OrePrefixes.plate.get(Materials.GalliumArsenide), 'A', CustomItemList.ReinforcedAluminiumIronPlate}); - GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SGS", "CRC","PAP", 'C', OrePrefixes.circuit.get(Materials.Advanced), 'G', GT_ModHandler.getIC2Item("reinforcedGlass", 1L), 'P', OrePrefixes.wireGt01.get(Materials.Cobalt), 'S', ItemList.Circuit_Silicon_Wafer2,'R', OrePrefixes.plateDouble.get(Materials.GalliumArsenide), 'A', CustomItemList.IrradiantReinforcedAluminiumPlate}); - GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SGS", "CRC", "PAP", 'C', OrePrefixes.circuit.get(Materials.Data), 'G', GT_ModHandler.getIC2Item("reinforcedGlass", 1L), 'P', OrePrefixes.wireGt01.get(Materials.AnnealedCopper), 'S', ItemList.Circuit_Silicon_Wafer2, 'R', OrePrefixes.plateTriple.get(Materials.GalliumArsenide), 'A', CustomItemList.IrradiantReinforcedTitaniumPlate}); + //TODO MOVE TO COREMOD + //GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SGS", "CPC", "TRT", 'C', OrePrefixes.circuit.get(Materials.Basic), 'G', new ItemStack(Blocks.glass_pane, 1), 'P', OrePrefixes.plateAlloy.get(Materials.Carbon), 'S', ItemList.Circuit_Silicon_Wafer, 'T', OrePrefixes.wireGt01.get(Materials.RedAlloy), 'R', CustomItemList.AluminiumIronPlate}); + //GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_8V.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SGS", "CRC","PAP", 'C', OrePrefixes.circuit.get(Materials.Good), 'G', new ItemStack(Blocks.glass_pane, 1), 'P', OrePrefixes.wireGt01.get(Materials.Tin), 'S', ItemList.Circuit_Silicon_Wafer,'R', OrePrefixes.plate.get(Materials.GalliumArsenide), 'A', CustomItemList.ReinforcedAluminiumIronPlate}); + //GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SGS", "CRC","PAP", 'C', OrePrefixes.circuit.get(Materials.Advanced), 'G', GT_ModHandler.getIC2Item("reinforcedGlass", 1L), 'P', OrePrefixes.wireGt01.get(Materials.Cobalt), 'S', ItemList.Circuit_Silicon_Wafer2,'R', OrePrefixes.plateDouble.get(Materials.GalliumArsenide), 'A', CustomItemList.IrradiantReinforcedAluminiumPlate}); + //GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SGS", "CRC", "PAP", 'C', OrePrefixes.circuit.get(Materials.Data), 'G', GT_ModHandler.getIC2Item("reinforcedGlass", 1L), 'P', OrePrefixes.wireGt01.get(Materials.AnnealedCopper), 'S', ItemList.Circuit_Silicon_Wafer2, 'R', OrePrefixes.plateTriple.get(Materials.GalliumArsenide), 'A', CustomItemList.IrradiantReinforcedTitaniumPlate}); } } diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index cab7cd3275..ee8b2195f2 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -1,7 +1,6 @@ package gregtech.loaders.postload; import codechicken.nei.api.API; -import com.dreammaster.gthandler.CustomItemList; import cpw.mods.fml.common.Loader; import gregtech.GT_Mod; import gregtech.api.GregTech_API; @@ -12,7 +11,6 @@ import gregtech.common.GT_DummyWorld; import gregtech.common.items.GT_MetaGenerated_Item_03; import ic2.api.recipe.ILiquidHeatExchangerManager.HeatExchangeProperty; import ic2.api.recipe.Recipes; -import ic2.core.Ic2Items; import mods.railcraft.common.blocks.aesthetics.cube.EnumCube; import mods.railcraft.common.items.RailcraftToolItems; import net.minecraft.init.Blocks; @@ -438,7 +436,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.EnderEye, 1), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Elite, 4), Materials.TungstenSteel.getMolten(576), ItemList.Field_Generator_MV.get(1), 1800, 120); GT_Values.RA.addAssemblerRecipe(ItemList.QuantumEye.get(1), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Master, 4), Materials.NiobiumTitanium.getMolten(1152), ItemList.Field_Generator_HV.get(1), 1800, 480); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherStar, 1), ItemList.Tool_DataOrb.get(4L), Materials.HSSG.getMolten(1152), ItemList.Field_Generator_EV.get(1), 1800, 1920); - GT_Values.RA.addAssemblerRecipe(ItemList.QuantumStar.get(1), CustomItemList.HighEnergyFlowCircuit.get(4L), Materials.HSSS.getMolten(1728), ItemList.Field_Generator_IV.get(1), 1800, 7680); + //GT_Values.RA.addAssemblerRecipe(ItemList.QuantumStar.get(1), CustomItemList.HighEnergyFlowCircuit.get(4L), Materials.HSSS.getMolten(1728), ItemList.Field_Generator_IV.get(1), 1800, 7680);//TODO MOVE TO COREMOD GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Steel, 64), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Zinc, 16), null, ItemList.Component_Filter.get(1), 1600, 16); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 8), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicon, 1), Materials.Glue.getFluid(250L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Graphene, 1), 480, 240); GT_Values.RA.addAssemblerRecipe(ItemList.Electric_Pump_LV.get(1L, new Object[0]), OrePrefixes.circuit.get(Materials.Basic), 2, GT_Values.NF, ItemList.FluidRegulator_LV.get(1L, new Object[0]), 800, 4);//TODO Check @@ -535,7 +533,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addBlastRecipe(ItemList.Circuit_Parts_RawCrystalChip.get(1, o), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Emerald, 1), Materials.Helium.getGas(1000), null, ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1, o), null, 900, 480, 5000); GT_Values.RA.addBlastRecipe(ItemList.Circuit_Parts_RawCrystalChip.get(1, o), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Olivine, 1), Materials.Helium.getGas(1000), null, ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1, o), null, 900, 480, 5000); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Good.get(1, o), new Object[]{"PAP", "CBC", "DCD", 'D', ItemList.Circuit_Parts_Diode.get(1, o), 'C', Ic2Items.electronicCircuit, 'A', CustomItemList.AluminiumItemCasing.get(1, o), 'P', GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 1), 'B', ItemList.Circuit_Board_Phenolic_Good.get(1, o),}); + //GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Good.get(1, o), new Object[]{"PAP", "CBC", "DCD", 'D', ItemList.Circuit_Parts_Diode.get(1, o), 'C', Ic2Items.electronicCircuit, 'A', CustomItemList.AluminiumItemCasing.get(1, o), 'P', GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Plastic, 1), 'B', ItemList.Circuit_Board_Phenolic_Good.get(1, o),});//TODO MOVE TO COREMOD //TODO END //OLD RECIPES??? //GT_Values.RA.addFormingPressRecipe(ItemList.Empty_Board_Basic.get(1), ItemList.Circuit_Parts_Wiring_Basic.get(4L), ItemList.Circuit_Board_Basic.get(1L), 32, 16); -- cgit From 97042f0d48fd15087ad90320a310c6d758f2bf6f Mon Sep 17 00:00:00 2001 From: Technus Date: Sat, 6 May 2017 22:12:09 +0200 Subject: Expand low grav dimensions --- .../implementations/GT_MetaTileEntity_BasicMachine.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java index b2d1cbd3a1..1f1737d752 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java @@ -789,7 +789,15 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B if (tMap == null) return DID_NOT_FIND_RECIPE; GT_Recipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), getAllInputs()); if (tRecipe == null) return DID_NOT_FIND_RECIPE; - if (GT_Mod.gregtechproxy.mLowGravProcessing && tRecipe.mSpecialValue == -100 && !(DimensionManager.getProvider(getBaseMetaTileEntity().getWorld().provider.dimensionId).getClass().getName().endsWith("Orbit")||DimensionManager.getProvider(getBaseMetaTileEntity().getWorld().provider.dimensionId).getClass().getName().endsWith("Space"))) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + if (GT_Mod.gregtechproxy.mLowGravProcessing && + tRecipe.mSpecialValue == -100 && !(//TODO check or get a better solution + DimensionManager.getProvider(getBaseMetaTileEntity().getWorld().provider.dimensionId).getClass().getName().contains("Orbit") || + DimensionManager.getProvider(getBaseMetaTileEntity().getWorld().provider.dimensionId).getClass().getName().endsWith("Space") || + DimensionManager.getProvider(getBaseMetaTileEntity().getWorld().provider.dimensionId).getClass().getName().endsWith("Asteroids") || + DimensionManager.getProvider(getBaseMetaTileEntity().getWorld().provider.dimensionId).getClass().getName().endsWith("SS") || + DimensionManager.getProvider(getBaseMetaTileEntity().getWorld().provider.dimensionId).getClass().getName().contains("SpaceStation") + ) + ) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe; if (!canOutput(tRecipe)) { mOutputBlocked++; -- cgit From 1ddc91afc8aa2615241105c331e6fe145a7e8a6f Mon Sep 17 00:00:00 2001 From: Technus Date: Mon, 15 May 2017 08:13:34 +0200 Subject: Add low grav to proc array, - assuming that proc array is always considered in a clean room, added circuit assembler to proc array --- .../GT_MetaTileEntity_BasicMachine.java | 22 +++++++++------ .../multi/GT_MetaTileEntity_ProcessingArray.java | 32 +++++++++++++--------- 2 files changed, 32 insertions(+), 22 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java index 1f1737d752..e014f4039a 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java @@ -779,6 +779,16 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B return checkRecipe(false); } + public static boolean isValidForLowGravity(GT_Recipe tRecipe, int dimId){ + return //TODO check or get a better solution + DimensionManager.getProvider(dimId).getClass().getName().contains("Orbit") || + DimensionManager.getProvider(dimId).getClass().getName().endsWith("Space") || + DimensionManager.getProvider(dimId).getClass().getName().endsWith("Asteroids") || + DimensionManager.getProvider(dimId).getClass().getName().endsWith("SS") || + DimensionManager.getProvider(dimId).getClass().getName().contains("SpaceStation"); + } + + /** * * @param skipOC disables OverclockedNess calculation and check - if you do you must implement your own method... @@ -789,15 +799,9 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B if (tMap == null) return DID_NOT_FIND_RECIPE; GT_Recipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), getAllInputs()); if (tRecipe == null) return DID_NOT_FIND_RECIPE; - if (GT_Mod.gregtechproxy.mLowGravProcessing && - tRecipe.mSpecialValue == -100 && !(//TODO check or get a better solution - DimensionManager.getProvider(getBaseMetaTileEntity().getWorld().provider.dimensionId).getClass().getName().contains("Orbit") || - DimensionManager.getProvider(getBaseMetaTileEntity().getWorld().provider.dimensionId).getClass().getName().endsWith("Space") || - DimensionManager.getProvider(getBaseMetaTileEntity().getWorld().provider.dimensionId).getClass().getName().endsWith("Asteroids") || - DimensionManager.getProvider(getBaseMetaTileEntity().getWorld().provider.dimensionId).getClass().getName().endsWith("SS") || - DimensionManager.getProvider(getBaseMetaTileEntity().getWorld().provider.dimensionId).getClass().getName().contains("SpaceStation") - ) - ) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + if (GT_Mod.gregtechproxy.mLowGravProcessing && tRecipe.mSpecialValue == -100 && + !isValidForLowGravity(tRecipe,getBaseMetaTileEntity().getWorld().provider.dimensionId)) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe; if (!canOutput(tRecipe)) { mOutputBlocked++; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java index e8f00cf535..77a748369f 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java @@ -1,5 +1,6 @@ package gregtech.common.tileentities.machines.multi; +import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Textures; @@ -24,6 +25,8 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; +import static gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine.isValidForLowGravity; + public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBlockBase { private GT_Recipe mLastRecipe; @@ -92,7 +95,7 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl public GT_Recipe.GT_Recipe_Map getRecipeMap() { if (mInventory[1] == null) return null; - String tmp = mInventory[1].getUnlocalizedName().replaceAll("gt.blockmachines.basicmachine.", ""); + String tmp = mInventory[1].getUnlocalizedName().replaceAll("gt\\.blockmachines\\.basicmachine\\.", ""); if (tmp.startsWith("centrifuge")) { return GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes; } else if (tmp.startsWith("electrolyzer")) { @@ -158,23 +161,24 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl } else if (tmp.startsWith("polarizer")) { return GT_Recipe.GT_Recipe_Map.sPolarizerRecipes; } else if (tmp.startsWith("plasmaarcfurnace")) { - return GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes; + return GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes; } else if (tmp.startsWith("printer")) { - return GT_Recipe.GT_Recipe_Map.sPrinterRecipes; + return GT_Recipe.GT_Recipe_Map.sPrinterRecipes; } else if (tmp.startsWith("press")) { - return GT_Recipe.GT_Recipe_Map.sPressRecipes; + return GT_Recipe.GT_Recipe_Map.sPressRecipes; } else if (tmp.startsWith("fluidcanner")) { - return GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes; + return GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes; } else if (tmp.startsWith("fluidheater")) { - return GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes; + return GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes; } else if (tmp.startsWith("distillery")) { - return GT_Recipe.GT_Recipe_Map.sDistilleryRecipes; + return GT_Recipe.GT_Recipe_Map.sDistilleryRecipes; } else if (tmp.startsWith("slicer")) { - return GT_Recipe.GT_Recipe_Map.sSlicerRecipes; + return GT_Recipe.GT_Recipe_Map.sSlicerRecipes; } else if (tmp.startsWith("amplifier")) { - return GT_Recipe.GT_Recipe_Map.sAmplifiers; + return GT_Recipe.GT_Recipe_Map.sAmplifiers; + } else if (tmp.startsWith("circuitassembler")) { + return GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes; } - return null; } @@ -195,9 +199,7 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl return false; } GT_Recipe.GT_Recipe_Map map = getRecipeMap(); - if (map == null) { - return false; - } + if (map == null) return false; ArrayList tInputList = getStoredInputs(); if (mInventory[1].getUnlocalizedName().endsWith("10")) { @@ -254,6 +256,10 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl if (tInputList.size() > 0 || tFluids.length > 0) { GT_Recipe tRecipe = map.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs); if (tRecipe != null) { + if (GT_Mod.gregtechproxy.mLowGravProcessing && tRecipe.mSpecialValue == -100 && + !isValidForLowGravity(tRecipe,getBaseMetaTileEntity().getWorld().provider.dimensionId)) + return false; + mLastRecipe = tRecipe; this.mEUt = 0; this.mOutputItems = null; -- cgit From 08cd5fe48560f7b8db2252733afe59d160eaf426 Mon Sep 17 00:00:00 2001 From: Technus Date: Thu, 18 May 2017 10:50:21 +0200 Subject: Make the save/load the same as in bloodasp --- .../GT_MetaTileEntity_MultiBlockBase.java | 17 ++++++++++------- .../loaders/materialprocessing/ProcessingConfig.java | 2 ++ 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') 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 9256117ab3..8cbffc0cf2 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 @@ -119,23 +119,25 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { aNBT.setInteger("mRuntime", mRuntime); if (mOutputItems != null) { - aNBT.setInteger("mOutputItemsLength", mOutputItems.length); - for (int i = 0; i < mOutputItems.length; i++) + aNBT.setInteger("mOutputItemsLength", mOutputItems.length); + for (int i = 0; i < mOutputItems.length; i++) if (mOutputItems[i] != null) { NBTTagCompound tNBT = new NBTTagCompound(); mOutputItems[i].writeToNBT(tNBT); aNBT.setTag("mOutputItem" + i, tNBT); } } + if (mOutputFluids != null) { - aNBT.setInteger("mOutputFluidsLength", mOutputFluids.length); - for (int i = 0; i < mOutputFluids.length; i++) + aNBT.setInteger("mOutputFluidsLength", mOutputFluids.length); + for (int i = 0; i < mOutputFluids.length; i++) if (mOutputFluids[i] != null) { NBTTagCompound tNBT = new NBTTagCompound(); mOutputFluids[i].writeToNBT(tNBT); aNBT.setTag("mOutputFluids" + i, tNBT); } } + aNBT.setBoolean("mWrench", mWrench); aNBT.setBoolean("mScrewdriver", mScrewdriver); aNBT.setBoolean("mSoftHammer", mSoftHammer); @@ -154,12 +156,12 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { mEfficiency = aNBT.getInteger("mEfficiency"); mPollution = aNBT.getInteger("mPollution"); mRuntime = aNBT.getInteger("mRuntime"); - + int aOutputItemsLength = aNBT.getInteger("mOutputItemsLength"); if (aOutputItemsLength > 0) { mOutputItems = new ItemStack[aOutputItemsLength]; for (int i = 0; i < mOutputItems.length; i++) - mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i); + mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i); } int aOutputFluidsLength = aNBT.getInteger("mOutputFluidsLength"); @@ -168,7 +170,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { for (int i = 0; i < mOutputFluids.length; i++) mOutputFluids[i] = GT_Utility.loadFluid(aNBT, "mOutputFluids" + i); } - + + mWrench = aNBT.getBoolean("mWrench"); mScrewdriver = aNBT.getBoolean("mScrewdriver"); mSoftHammer = aNBT.getBoolean("mSoftHammer"); diff --git a/src/main/java/gregtech/loaders/materialprocessing/ProcessingConfig.java b/src/main/java/gregtech/loaders/materialprocessing/ProcessingConfig.java index 1baf79e6d9..abf63abe29 100644 --- a/src/main/java/gregtech/loaders/materialprocessing/ProcessingConfig.java +++ b/src/main/java/gregtech/loaders/materialprocessing/ProcessingConfig.java @@ -3,6 +3,7 @@ package gregtech.loaders.materialprocessing; import gregtech.api.GregTech_API; import gregtech.api.enums.Dyes; import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.TextureSet; public class ProcessingConfig implements gregtech.api.interfaces.IMaterialHandler { @@ -12,6 +13,7 @@ public class ProcessingConfig implements gregtech.api.interfaces.IMaterialHandle @Override public void onMaterialsInit() { + /** This is just left here as an example of how to add new materials. **/ int i = 0; for (int j = GregTech_API.sMaterialProperties.get("general", "AmountOfCustomMaterialSlots", 16); i < j; i++) { String aID = (i < 10 ? "0" : "") + i; -- cgit From 9398d2cd74e9cbae1978c14b21e8728f25bf0cfa Mon Sep 17 00:00:00 2001 From: Technus Date: Tue, 30 May 2017 12:15:10 +0200 Subject: Minor cleanup --- .../GT_MetaTileEntity_MultiBlockBase.java | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'src/main/java/gregtech/api/metatileentity') 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 8cbffc0cf2..89c75a0b4c 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 @@ -266,13 +266,15 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } addOutput(tStack); } - if (mOutputFluids != null && mOutputFluids.length == 1) { - for (FluidStack tStack : mOutputFluids) - if (tStack != null) { - addOutput(tStack); - } - } else if (mOutputFluids != null && mOutputFluids.length > 1) { - addFluidOutputs(mOutputFluids); + if(mOutputFluids!=null) { + if (mOutputFluids.length == 1) { + for (FluidStack tStack : mOutputFluids) + if (tStack != null) { + addOutput(tStack); + } + } else if (mOutputFluids.length > 1) { + addFluidOutputs(mOutputFluids); + } } mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]) - ((getIdealStatus() - getRepairStatus()) * 1000))); mOutputItems = null; @@ -607,13 +609,13 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { return false; } - private void addFluidOutputs(FluidStack[] mOutputFluids2) { - for (int i = 0; i < mOutputFluids2.length; i++) { - if (mOutputHatches.size() > i && mOutputHatches.get(i) != null && mOutputFluids2[i] != null && isValidMetaTileEntity(mOutputHatches.get(i))) { - mOutputHatches.get(i).fill(mOutputFluids2[i], true); + private void addFluidOutputs(FluidStack[] mOutputFluids) { + int min=mOutputFluids.length>mOutputHatches.size()?mOutputHatches.size():mOutputFluids.length; + for (int i = 0; i < min; ++i) { + if (this.mOutputHatches.get(i) != null && mOutputFluids[i] != null && isValidMetaTileEntity(this.mOutputHatches.get(i))) { + this.mOutputHatches.get(i).fill(mOutputFluids[i], true); } } - } public boolean depleteInput(FluidStack aLiquid) { -- cgit