diff options
Diffstat (limited to 'src/main/java/gregtech/common')
9 files changed, 217 insertions, 80 deletions
diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index 51264c7676..48713f9224 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -16,6 +16,7 @@ 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_ItemStack; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_PlayedSound; import gregtech.api.util.GT_Recipe; @@ -136,14 +137,81 @@ public class GT_Client extends GT_Proxy GL11.glLineWidth(2.0F); GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.5F); GL11.glBegin(1); - GL11.glVertex3d(0.5D, 0.0D, -0.25D); - GL11.glVertex3d(-0.5D, 0.0D, -0.25D); - GL11.glVertex3d(0.5D, 0.0D, 0.25D); - GL11.glVertex3d(-0.5D, 0.0D, 0.25D); - GL11.glVertex3d(0.25D, 0.0D, -0.5D); - GL11.glVertex3d(0.25D, 0.0D, 0.5D); - GL11.glVertex3d(-0.25D, 0.0D, -0.5D); - GL11.glVertex3d(-0.25D, 0.0D, 0.5D); + GL11.glVertex3d(+.50D, .0D, -.25D); + GL11.glVertex3d(-.50D, .0D, -.25D); + GL11.glVertex3d(+.50D, .0D, +.25D); + GL11.glVertex3d(-.50D, .0D, +.25D); + GL11.glVertex3d(+.25D, .0D, -.50D); + GL11.glVertex3d(+.25D, .0D, +.50D); + GL11.glVertex3d(-.25D, .0D, -.50D); + GL11.glVertex3d(-.25D, .0D, +.50D); + GL11.glLineWidth(2.0F); + TileEntity tTile = aEvent.player.worldObj.getTileEntity(aEvent.target.blockX, aEvent.target.blockY, aEvent.target.blockZ); + if (tTile instanceof BaseMetaPipeEntity) { + int[][] GridSwitchArr = new int[][]{ + {0, 5, 3, 1, 2, 4}, + {5, 0, 1, 3, 2, 4}, + {1, 3, 0, 5, 2, 4}, + {3, 1, 5, 0, 2, 4}, + {4, 2, 3, 1, 0, 5}, + {2, 4, 3, 1, 5, 0}, + }; + int tConnections = ((BaseMetaPipeEntity) tTile).mConnections; + for (byte i = 0; i < 6; i++) { + if ((tConnections & (1 << i)) != 0) { + switch (GridSwitchArr[aEvent.target.sideHit][i]) { + case 0: + GL11.glVertex3d(+.25D, .0D, +.25D); + GL11.glVertex3d(-.25D, .0D, -.25D); + GL11.glVertex3d(-.25D, .0D, +.25D); + GL11.glVertex3d(+.25D, .0D, -.25D); + break; + case 1: + GL11.glVertex3d(-.25D, .0D, +.50D); + GL11.glVertex3d(+.25D, .0D, +.25D); + GL11.glVertex3d(-.25D, .0D, +.25D); + GL11.glVertex3d(+.25D, .0D, +.50D); + break; + case 2: + GL11.glVertex3d(-.50D, .0D, -.25D); + GL11.glVertex3d(-.25D, .0D, +.25D); + GL11.glVertex3d(-.50D, .0D, +.25D); + GL11.glVertex3d(-.25D, .0D, -.25D); + break; + case 3: + GL11.glVertex3d(-.25D, .0D, -.50D); + GL11.glVertex3d(+.25D, .0D, -.25D); + GL11.glVertex3d(-.25D, .0D, -.25D); + GL11.glVertex3d(+.25D, .0D, -.50D); + break; + case 4: + GL11.glVertex3d(+.50D, .0D, -.25D); + GL11.glVertex3d(+.25D, .0D, +.25D); + GL11.glVertex3d(+.50D, .0D, +.25D); + GL11.glVertex3d(+.25D, .0D, -.25D); + break; + case 5: + GL11.glVertex3d(+.50D, .0D, +.50D); + GL11.glVertex3d(+.25D, .0D, +.25D); + GL11.glVertex3d(+.50D, .0D, +.25D); + GL11.glVertex3d(+.25D, .0D, +.50D); + GL11.glVertex3d(+.50D, .0D, -.50D); + GL11.glVertex3d(+.25D, .0D, -.25D); + GL11.glVertex3d(+.50D, .0D, -.25D); + GL11.glVertex3d(+.25D, .0D, -.50D); + GL11.glVertex3d(-.50D, .0D, +.50D); + GL11.glVertex3d(-.25D, .0D, +.25D); + GL11.glVertex3d(-.50D, .0D, +.25D); + GL11.glVertex3d(-.25D, .0D, +.50D); + GL11.glVertex3d(-.50D, .0D, -.50D); + GL11.glVertex3d(-.25D, .0D, -.25D); + GL11.glVertex3d(-.50D, .0D, -.25D); + GL11.glVertex3d(-.25D, .0D, -.50D); + break; + } + } + } + } GL11.glEnd(); GL11.glPopMatrix(); } @@ -354,7 +422,7 @@ public class GT_Client extends GT_Proxy TileEntity aTileEntity = aEvent.player.worldObj.getTileEntity(aEvent.target.blockX, aEvent.target.blockY, aEvent.target.blockZ); try { Class.forName("codechicken.lib.vec.Rotation"); - if (((aTileEntity instanceof BaseMetaPipeEntity)) && (((ICoverable) aTileEntity).getCoverIDAtSide((byte) aEvent.target.sideHit) == 0) && ((GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sCovers.keySet())) || (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sCrowbarList)) || (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sScrewdriverList)))) { + if (((aTileEntity instanceof BaseMetaPipeEntity)) && (((ICoverable) aTileEntity).getCoverIDAtSide((byte) aEvent.target.sideHit) == 0) && ((GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sCovers.keySet())) || (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sCrowbarList)) || (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sScrewdriverList)) || (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sWireCutterList)) || (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sSolderingToolList)))) { drawGrid(aEvent); return; } @@ -563,9 +631,9 @@ public class GT_Client extends GT_Proxy try { EntityPlayer player = Minecraft.getMinecraft().thePlayer; if (player == null) return 0; - ItemStack held = player.getCurrentEquippedItem(); - if (held == null) return 0; - int[] ids = OreDictionary.getOreIDs(held); + ItemStack tCurrentItem = player.getCurrentEquippedItem(); + if (tCurrentItem == null) return 0; + int[] ids = OreDictionary.getOreIDs(tCurrentItem); int hide = 0; for (int i : ids) { if (OreDictionary.getOreName(i).equals("craftingToolSolderingIron")) { @@ -573,6 +641,16 @@ public class GT_Client extends GT_Proxy break; } } + if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sHardHammerList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSoftHammerList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWireCutterList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList) + || GT_Utility.isStackInList(tCurrentItem, GregTech_API.sCrowbarList) + || GregTech_API.sCovers.containsKey(new GT_ItemStack(tCurrentItem))) { + hide |= 0x2; + } return hide; }catch(Exception e){ return 0; diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 3d484b6f8a..fa425d5b5c 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -130,6 +130,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public boolean mHardcoreCables = false; public boolean mDisableVanillaOres = true; public boolean mNerfStorageBlocks = true; + public boolean mHardMachineCasings = true; public boolean mNerfDustCrafting = true; public boolean mSortToTheEnd = true; public boolean mCraftingUnification = true; @@ -202,6 +203,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public boolean enableBasaltOres = true; public boolean enableGCOres = true; public boolean enableUBOres = true; + public boolean gt6Pipe = true; + public boolean gt6Cable = false; + public boolean costlyCableConnection = false; public GT_Proxy() { GameRegistry.registerFuelHandler(this); @@ -1589,12 +1593,16 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { crackedFluids[i] = addFluid(prefixes[i] + aMaterial.mName.toLowerCase(Locale.ENGLISH), uncrackedFluid.mTextureName, localPrefixes[i] + aMaterial.mDefaultLocalName, null, aMaterial.mRGBa, 2, 775, null, null, 0); int hydrogenAmount = 2 * i + 2; + int crackerEUT = 120 + 60 * i; + int crackerT = 20 + 10 * i; + int chemReactorEUT = 30; + int chemReactorT = (crackerT*crackerEUT) / chemReactorEUT; GT_Values.RA.addCrackingRecipe(i + 1, new FluidStack(uncrackedFluid, 1000), Materials.Hydrogen.getGas(hydrogenAmount * 1000), - new FluidStack(crackedFluids[i], 1000), 40 + 20 * i, 120 + 60 * i); + new FluidStack(crackedFluids[i], 1000), crackerT, crackerEUT); GT_Values.RA.addChemicalRecipe(Materials.Hydrogen.getCells(hydrogenAmount), GT_Utility.getIntegratedCircuit(i + 1), new FluidStack(uncrackedFluid, 1000), - new FluidStack(crackedFluids[i], 800), Materials.Empty.getCells(hydrogenAmount), 160 + 80 * i, 30); + new FluidStack(crackedFluids[i], 800), Materials.Empty.getCells(hydrogenAmount), chemReactorT, chemReactorEUT); GT_Values.RA.addChemicalRecipe(aMaterial.getCells(1), GT_Utility.getIntegratedCircuit(i + 1), Materials.Hydrogen.getGas(hydrogenAmount * 1000), - new FluidStack(crackedFluids[i], 800), Materials.Empty.getCells(1), 160 + 80 * i, 30); + new FluidStack(crackedFluids[i], 800), Materials.Empty.getCells(1), chemReactorT, chemReactorEUT); } aMaterial.setHydroCrackedFluids(crackedFluids); } @@ -1610,14 +1618,18 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { uncrackedFluid = (GT_Fluid) aMaterial.mGas; } for (int i = 0; i < 3; i++) { + int crackerEUT = 240 + 120 * i; + int crackerT = 20 + 10 * i; + int chemReactorEUT = 30; + int chemReactorT = (crackerT*crackerEUT) / chemReactorEUT; crackedFluids[i] = addFluid(prefixes[i] + aMaterial.mName.toLowerCase(Locale.ENGLISH), uncrackedFluid.mTextureName, localPrefixes[i] + aMaterial.mDefaultLocalName, null, aMaterial.mRGBa, 2, 775, null, null, 0); GT_Values.RA.addCrackingRecipe(i + 1, new FluidStack(uncrackedFluid, 1000), GT_ModHandler.getSteam(1000), - new FluidStack(crackedFluids[i], 1000), 40 + 20 * i, 240 + 120 * i); + new FluidStack(crackedFluids[i], 1000), crackerT, crackerEUT); GT_Values.RA.addChemicalRecipe(GT_ModHandler.getIC2Item("steamCell", 1L), GT_Utility.getIntegratedCircuit(i + 1), new FluidStack(uncrackedFluid, 1000), - new FluidStack(crackedFluids[i], 800), Materials.Empty.getCells(1), 160 + 80 * i, 30); + new FluidStack(crackedFluids[i], 800), Materials.Empty.getCells(1), chemReactorT, chemReactorEUT); GT_Values.RA.addChemicalRecipe(aMaterial.getCells(1), GT_Utility.getIntegratedCircuit(i + 1), GT_ModHandler.getSteam(1000), - new FluidStack(crackedFluids[i], 800), Materials.Empty.getCells(1), 160 + 80 * i, 30); + new FluidStack(crackedFluids[i], 800), Materials.Empty.getCells(1), chemReactorT, chemReactorEUT); } aMaterial.setSteamCrackedFluids(crackedFluids); } 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 a6a36cf79f..a200fbd52c 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java @@ -2,6 +2,7 @@ package gregtech.common.blocks; import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
+import gregtech.api.interfaces.metatileentity.IConnectable;
import gregtech.api.enums.Materials;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Cable;
@@ -157,6 +158,9 @@ public class GT_Item_Machines tTileEntity.setOwnerName(aPlayer.getDisplayName());
}
tTileEntity.getMetaTileEntity().initDefaultModes(aStack.getTagCompound());
+ if (tTileEntity.getMetaTileEntity() instanceof IConnectable) {
+ ((IConnectable) tTileEntity.getMetaTileEntity()).connect(GT_Utility.getOppositeSide(side));
+ }
}
} else if (!aWorld.setBlock(aX, aY, aZ, this.field_150939_a, tDamage, 3)) {
return false;
diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java index ec5c20ff06..a71cfbb62f 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java @@ -71,7 +71,7 @@ public class GT_MetaGenerated_Tool_01 extends GT_MetaGenerated_Tool { GregTech_API.registerTool(addTool(20, "Crowbar", "Dismounts Covers and Rotates Rails", new GT_Tool_Crowbar(), ToolDictNames.craftingToolCrowbar, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 2L)), GregTech_API.sCrowbarList);
GregTech_API.registerTool(addTool(22, "Screwdriver", "Adjusts Covers and Machines", new GT_Tool_Screwdriver(), ToolDictNames.craftingToolScrewdriver, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), GregTech_API.sScrewdriverList);
addTool(24, "Mortar", "", new GT_Tool_Mortar(), ToolDictNames.craftingToolMortar, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L));
- addTool(26, "Wire Cutter", "", new GT_Tool_WireCutter(), ToolDictNames.craftingToolWireCutter, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L));
+ GregTech_API.registerTool(addTool(26, "Wire Cutter", "", new GT_Tool_WireCutter(), ToolDictNames.craftingToolWireCutter, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)), GregTech_API.sWireCutterList);
addTool(28, "Scoop", "", new GT_Tool_Scoop(), ToolDictNames.craftingToolScoop, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.BESTIA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PANNUS, 2L));
addTool(30, "Branch Cutter", "", new GT_Tool_BranchCutter(), ToolDictNames.craftingToolBranchCutter, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.HERBA, 2L));
GregTech_API.registerTool(addTool(32, "Universal Spade", "", new GT_Tool_UniversalSpade(), ToolDictNames.craftingToolBlade, ToolDictNames.craftingToolShovel, ToolDictNames.craftingToolCrowbar, ToolDictNames.craftingToolSaw, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 1L)), GregTech_API.sCrowbarList);
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 cb4d988658..dc56e7d3a7 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 @@ -38,7 +38,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B public static boolean sAllowMultipleEggs = true; public static GT_MetaTileEntity_MagicalEnergyAbsorber mActiveSiphon = null; public static int sEnergyPerEnderCrystal = 32; - public static int sEnergyFromVis = 12800; + public static int sEnergyFromVis = 512; public static int sDragonEggEnergyPerTick = 128; public static boolean isThaumcraftLoaded; public int mEfficiency; @@ -109,34 +109,31 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B // Energyzed node if (isThaumcraftLoaded) { try { + int multFactor = 2; World tmpWorld = this.getBaseMetaTileEntity().getWorld(); int tmpX = this.getBaseMetaTileEntity().getXCoord(); int tmpY = this.getBaseMetaTileEntity().getYCoord(); int tmpZ = this.getBaseMetaTileEntity().getZCoord(); - int fire = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.FIRE, 1000); + int fire = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.FIRE, 1000); // all of these should be 1000 int earth = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.EARTH, 1000); int air = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.AIR, 1000); - int destruction = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.ENTROPY, 1000); + int entropy = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.ENTROPY, 1000); int order = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.ORDER, 1000); int water = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.WATER, 1000); - int visEU = (int) (Math.pow(fire, 4) + Math.pow(earth, 4) + Math.pow(air, 4) + Math.pow(destruction, 4) + Math.pow(order, 4) + Math.pow( - water, 4)); - int mult = 85; - if (fire > 4) - mult += 15; - if (earth > 4) - mult += 15; - if (air > 4) - mult += 15; - if (destruction > 4) - mult += 15; - if (order > 4) - mult += 15; - if (water > 4) - mult += 15; - visEU = (visEU * mult) / 100; - getBaseMetaTileEntity().increaseStoredEnergyUnits(Math.min(maxEUOutput(), visEU * getEfficiency() / this.sEnergyFromVis), false); + int visEU = (int) (Math.pow(fire, 2) + Math.pow(earth, 2) + Math.pow(air, 2) + Math.pow(entropy, 2) + Math.pow(order, 2) + Math.pow(water, 2)); + int mult = 0; //this should make it more dependant on how big your node is + mult += fire * multFactor; + mult += earth * multFactor; + mult += air * multFactor; + mult += entropy * multFactor; + mult += order * multFactor; + mult += water * multFactor; + visEU = (visEU * mult) / 100; + + getBaseMetaTileEntity().increaseStoredEnergyUnits(Math.min(maxEUOutput(), visEU * getEfficiency() / sEnergyFromVis), false); + } catch (Throwable e) { + } } // EnderCrystal @@ -294,4 +291,4 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B public int getPollution() { return 0; } -}
\ No newline at end of file +} diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java index 9ff143c92c..3e0da9048d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java @@ -36,7 +36,8 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine { final static int[] ENERGY = new int[]{8, 8, 32, 128}; //Miner energy consumption per tier public GT_MetaTileEntity_Miner(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, "Digging ore instead of you", 2, 2, "Miner.png", "", new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM"))); + super(aID, aName, aNameRegional, aTier, 1, new String[]{"Digging ore instead of you", ENERGY[aTier] + " EU/t, " + SPEED[aTier] / 20 + " sec per block", + "Work area " + (RADIUS[aTier] * 2 + 1) + "x" + (RADIUS[aTier] * 2 + 1)}, 2, 2, "Miner.png", "", new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM"))); } public GT_MetaTileEntity_Miner(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { 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 826cab56ab..fec22324e5 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,7 +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); } @@ -222,7 +222,7 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock public int getPollutionPerTick(ItemStack aStack) { return 16; } - + @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return true; @@ -231,12 +231,13 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock @Override public String[] getInfoData() { return new String[]{ - "Diesel Engine", - "Current Output: "+mEUt*mEfficiency/10000 +" EU/t", - "Fuel Consumption: "+fuelConsumption+"L/t", - "Fuel Value: "+fuelValue+" EU/L", - "Fuel Remaining: "+fuelRemaining+" Litres", - "Current Efficiency: "+(mEfficiency/100)+"%"}; + "Diesel Engine", + "Current Output: " + mEUt * mEfficiency / 10000 + " EU/t", + "Fuel Consumption: " + fuelConsumption + "L/t", + "Fuel Value: " + fuelValue + " EU/L", + "Fuel Remaining: " + fuelRemaining + " Litres", + "Current Efficiency: " + (mEfficiency / 100) + "%", + getIdealStatus() == getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance"}; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java index 393aeeff70..d053693e42 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java @@ -21,7 +21,7 @@ import java.util.ArrayList; public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_MultiBlockBase { private final int CASING_INDEX = 176; - + public GT_MetaTileEntity_LargeChemicalReactor(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } @@ -45,12 +45,12 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu "Size(WxHxD): 3x3x3", "3x3x3 of Chemically Inert Machine Casings (hollow, min 8!)", "Controller (Front centered)", - "1x Cupronickel Coil Block (Bottom centered)", "1x PTFE Pipe Machine Casing (inside the hollow casings)", + "1x Cupronickel Coil Block (next to PTFE Pipe Machine Casing)", "1x Input Bus/Hatch (Any inert casing)", "1x Output Bus/Hatch (Any inert casing)", "1x Maintenance Hatch (Any inert casing)", - "1x Energy Hatch (Any inert casing)"}; + "1x Energy Hatch (Any inert casing)" }; } @Override @@ -64,11 +64,11 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu } return new ITexture[] { Textures.BlockIcons.casingTexturePages[1][48] }; } - + @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeChemicalReactor.png"); - } + } @Override public boolean isCorrectMachinePart(ItemStack aStack) { @@ -134,7 +134,7 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu maxProgresstime = 2; EUt = recipe.mEUt * recipe.mDuration / 2; } - + this.mEUt = -EUt; this.mMaxProgresstime = maxProgresstime; this.mOutputItems = recipe.mOutputs; @@ -151,28 +151,44 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; int casingAmount = 0; + boolean hasHeatingCoil = false; // x=width, z=depth, y=height for (int x = -1 + xDir; x <= xDir + 1; x++) { for (int z = -1 + zDir; z <= zDir + 1; z++) { for (int y = -1; y <= 1; y++) { + if (x == 0 && y == 0 && z == 0) { + continue; + } IGregTechTileEntity tileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(x, y, z); Block block = aBaseMetaTileEntity.getBlockOffset(x, y, z); - if (x == xDir && z == zDir && y <= 0) { - if ((y == -1) - && (block != GregTech_API.sBlockCasings5 || aBaseMetaTileEntity.getMetaIDOffset(x, y, z) != 0)) { - return false; - } else if (y == 0 && (block != GregTech_API.sBlockCasings8 || aBaseMetaTileEntity.getMetaIDOffset(x, y, z) != 1)) { + int centerCoords = 0; + if (x == xDir) { + centerCoords++; + } + if (y == 0) { + centerCoords++; + } + if (z == zDir) { + centerCoords++; + } + if (centerCoords == 3) { + if (block == GregTech_API.sBlockCasings8 && aBaseMetaTileEntity.getMetaIDOffset(x, y, z) == 1) { + continue; + } else { return false; } - } else if (x != 0 || y != 0 || z != 0) { - if (!addInputToMachineList(tileEntity, CASING_INDEX) && !addOutputToMachineList(tileEntity, CASING_INDEX) - && !addMaintenanceToMachineList(tileEntity, CASING_INDEX) - && !addEnergyInputToMachineList(tileEntity, CASING_INDEX)) { - if (block == GregTech_API.sBlockCasings8 && aBaseMetaTileEntity.getMetaIDOffset(x, y, z) == 0) { - casingAmount++; - } else { - return false; - } + } + if (centerCoords == 2 && block == GregTech_API.sBlockCasings5 && aBaseMetaTileEntity.getMetaIDOffset(x, y, z) == 0) { + hasHeatingCoil = true; + continue; + } + if (!addInputToMachineList(tileEntity, CASING_INDEX) && !addOutputToMachineList(tileEntity, CASING_INDEX) + && !addMaintenanceToMachineList(tileEntity, CASING_INDEX) + && !addEnergyInputToMachineList(tileEntity, CASING_INDEX)) { + if (block == GregTech_API.sBlockCasings8 && aBaseMetaTileEntity.getMetaIDOffset(x, y, z) == 0) { + casingAmount++; + } else { + return false; } } @@ -180,7 +196,7 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu } } - return casingAmount >= 8; + return casingAmount >= 8 && hasHeatingCoil; } @Override 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 dc04602d0f..540f2a32f3 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 @@ -38,12 +38,13 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBa "Thermally cracks heavy hydrocarbons into lighter fractions", "Size(WxHxD): 5x3x3 (Hollow), Controller (Front center)", "Ring of 8 Cupronickel Coils (Each side of Controller)", - "1x Hydrocarbon Input Bus/Hatch (Any left side casing)", + "1x Hydrocarbon Input Bus/Hatch (Any left/right side casing)", "1x Steam/Hydrogen Input Hatch (Any middle ring casing)", - "1x Cracked Hydrocarbon Output Hatch (Any right side casing)", - "1x Maintenance Hatch (Any middle ring casing)", - "1x Energy Hatch (Any middle ring casing)", - "Clean Stainless Steel Machine Casings for the rest (18 at least!)"}; + "1x Cracked Hydrocarbon Output Hatch (Any left/right side casing)", + "1x Maintenance Hatch (Any casing)", + "1x Energy Hatch (Any casing)", + "Clean Stainless Steel Machine Casings for the rest (18 at least!)", + "Input/Output Hatches must be on opposite sides"}; } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { @@ -95,6 +96,7 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBa int zDir = this.orientation.offsetZ; int amount = 0; replaceDeprecatedCoils(aBaseMetaTileEntity); + boolean negSideInput = false, negSideOutput = false, posSideInput = false, posSideOutput = false; if (xDir != 0) { for (int i = -1; i < 2; i++) {// xDirection for (int j = -1; j < 2; j++) {// height @@ -110,8 +112,19 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBa } if (h == 2 || h == -2) { IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, j, h + zDir); - boolean tSide = ((aBaseMetaTileEntity.getBackFacing() == 4 && 2 == h) || (aBaseMetaTileEntity.getBackFacing() == 5 && -2 == h)); - if (tSide ? !addInputToMachineList(tTileEntity, 49) : !addOutputToMachineList(tTileEntity, 49)) { + if (addInputToMachineList(tTileEntity, 49)) { + if (h == -2) { + negSideInput = true; + } else { + posSideInput = true; + } + } else if (addOutputToMachineList(tTileEntity, 49)) { + if (h == -2) { + negSideOutput = true; + } else { + posSideOutput = true; + } + } else if (!addEnergyInputToMachineList(tTileEntity, 49) && !addMaintenanceToMachineList(tTileEntity, 49)){ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, j, h + zDir) != GregTech_API.sBlockCasings4) { return false; } @@ -156,8 +169,19 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBa } if (h == 2 || h == -2) { IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + h, j, i + zDir); - boolean tSide = (aBaseMetaTileEntity.getBackFacing() == h || (aBaseMetaTileEntity.getBackFacing() == 3 && -2 == h)); - if (tSide ? !addOutputToMachineList(tTileEntity, 49) : !addInputToMachineList(tTileEntity, 49)) { + if (addInputToMachineList(tTileEntity, 49)) { + if (h == -2) { + negSideInput = true; + } else { + posSideInput = true; + } + } else if (addOutputToMachineList(tTileEntity, 49)) { + if (h == -2) { + negSideOutput = true; + } else { + posSideOutput = true; + } + } else if (!addEnergyInputToMachineList(tTileEntity, 49) && !addMaintenanceToMachineList(tTileEntity, 49)){ if (aBaseMetaTileEntity.getBlockOffset(xDir + h, j, i + zDir) != GregTech_API.sBlockCasings4) { return false; } @@ -188,6 +212,10 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBa } } } + if ((negSideInput && negSideOutput) || (posSideInput && posSideOutput) + || (negSideInput && posSideInput) || (negSideOutput && posSideOutput)) { + return false; + } if (amount < 18) return false; return true; } |