aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Arm.java12
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java15
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Pump.java26
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_SteamValve.java16
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java12
-rw-r--r--src/main/java/gregtech/common/items/ItemComb.java2
-rw-r--r--src/main/java/gregtech/common/render/GT_Renderer_Block.java58
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java48
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java25
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java25
11 files changed, 119 insertions, 125 deletions
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java
index 77558e001d..c07f1f7a3a 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java
@@ -43,15 +43,6 @@ public class GT_Cover_Arm
aCoverVariable = CONVERTED_BIT | Math.min(Math.abs(aCoverVariable-1), SLOT_ID_MASK);
}
- boolean usePower = false;
- if (aTileEntity.getUniversalEnergyCapacity() >= 128L) {
- if (aTileEntity.isUniversalEnergyStored(256L)) {
- usePower = true;
- } else {
- return aCoverVariable;
- }
- }
-
TileEntity toTile, fromTile;
int toSlot, fromSlot;
@@ -98,9 +89,6 @@ public class GT_Cover_Arm
movedItems = GT_Utility.moveOneItemStack(fromTile, toTile, fromSide, toSide, null, false, (byte)64, (byte)1, (byte)64, (byte)1);
}
- if (usePower)
- aTileEntity.decreaseStoredEnergyUnits(4*movedItems, true);
-
return aCoverVariable;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
index aee46b7aab..1e21f80ed0 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
@@ -41,21 +41,8 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior {
toEntity = aCoverVariable % 2 != 0 ? aTileEntity : tTileEntity;
byte fromSide = aCoverVariable % 2 != 0 ? GT_Utility.getOppositeSide(aSide) : aSide,
toSide = aCoverVariable % 2 == 0 ? GT_Utility.getOppositeSide(aSide) : aSide;
- boolean costsEnergy = ((aCoverVariable % 2 == 0) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (aTileEntity.getUniversalEnergyCapacity() >= 128L);
- byte moved;
-
-
- if (costsEnergy) {
- long tStoredEnergy = aTileEntity.getUniversalEnergyStored();
- int tMaxStacks = (int)(tStoredEnergy/(4*64*this.mMaxStacks));
- if (tMaxStacks > this.mMaxStacks)
- tMaxStacks = this.mMaxStacks;
- int tCost = moveMultipleItemStacks(fromEntity, toEntity, fromSide , toSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1,tMaxStacks);
- aTileEntity.decreaseStoredEnergyUnits(4 * tCost, true);
- } else {
- moveMultipleItemStacks(fromEntity, toEntity, fromSide , toSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1,this.mMaxStacks);
- }
+ moveMultipleItemStacks(fromEntity, toEntity, fromSide , toSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1,this.mMaxStacks);
// for(int i=0 ; i < this.mMaxStacks ; i++) {
// // Costs energy but we don't have enough, bail
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
index a6f7d653b9..3facde63a1 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
@@ -40,15 +40,8 @@ public class GT_Cover_Pump
if (tLiquid != null) {
tLiquid = tLiquid.copy();
tLiquid.amount = tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid, false);
- if (tLiquid.amount > 0) {
- if (((aCoverVariable % 2 == 0) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (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.getOrientation(aSide), tLiquid.amount, true), true);
- }
- } else {
- tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tTank1.drain(ForgeDirection.getOrientation(aSide), tLiquid.amount, true), true);
- }
+ if (tLiquid.amount > 0 && canTransferFluid(tLiquid)) {
+ tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tTank1.drain(ForgeDirection.getOrientation(aSide), tLiquid.amount, true), true);
}
}
} else {
@@ -56,15 +49,8 @@ public class GT_Cover_Pump
if (tLiquid != null) {
tLiquid = tLiquid.copy();
tLiquid.amount = tTank1.fill(ForgeDirection.getOrientation(aSide), tLiquid, false);
- if (tLiquid.amount > 0) {
- if (((aCoverVariable % 2 == 0) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (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.getOrientation(aSide), tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid.amount, true), true);
- }
- } else {
- tTank1.fill(ForgeDirection.getOrientation(aSide), tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid.amount, true), true);
- }
+ if (tLiquid.amount > 0 && canTransferFluid(tLiquid)) {
+ tTank1.fill(ForgeDirection.getOrientation(aSide), tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid.amount, true), true);
}
}
}
@@ -73,6 +59,10 @@ public class GT_Cover_Pump
return aCoverVariable;
}
+ protected boolean canTransferFluid(FluidStack fluid) {
+ return true;
+ }
+
public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 12;
if(aCoverVariable <0){aCoverVariable = 11;}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_SteamValve.java b/src/main/java/gregtech/common/covers/GT_Cover_SteamValve.java
new file mode 100644
index 0000000000..8ac8a0dae9
--- /dev/null
+++ b/src/main/java/gregtech/common/covers/GT_Cover_SteamValve.java
@@ -0,0 +1,16 @@
+package gregtech.common.covers;
+
+import gregtech.api.util.GT_ModHandler;
+import net.minecraftforge.fluids.FluidStack;
+
+public class GT_Cover_SteamValve extends GT_Cover_Pump {
+
+ public GT_Cover_SteamValve(int aTransferRate) {
+ super(aTransferRate);
+ }
+
+ @Override
+ protected boolean canTransferFluid(FluidStack fluid) {
+ return GT_ModHandler.isAnySteam(fluid);
+ }
+}
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 ad2457b721..cb7d208bc4 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
@@ -550,6 +550,18 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
GregTech_API.registerCover(ItemList.Electric_Pump_UHV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[9][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(1048576));
GregTech_API.registerCover(ItemList.Electric_Pump_UEV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[9][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(2097152));
+ ItemList.Steam_Valve_LV.set(addItem(620, "Steam Valve (LV)", "20.480 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L)}));
+ ItemList.Steam_Valve_MV.set(addItem(621, "Steam Valve (MV)", "40.960 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L)}));
+ ItemList.Steam_Valve_HV.set(addItem(622, "Steam Valve (HV)", "81.920 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L)}));
+ ItemList.Steam_Valve_EV.set(addItem(623, "Steam Valve (EV)", "163.840 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L)}));
+ ItemList.Steam_Valve_IV.set(addItem(624, "Steam Valve (IV)", "327.680 L/sec (as Cover)", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L)}));
+
+ GregTech_API.registerCover(ItemList.Steam_Valve_LV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_VALVE)}), new GT_Cover_SteamValve(1024));
+ GregTech_API.registerCover(ItemList.Steam_Valve_MV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_VALVE)}), new GT_Cover_SteamValve(2048));
+ GregTech_API.registerCover(ItemList.Steam_Valve_HV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_VALVE)}), new GT_Cover_SteamValve(4096));
+ GregTech_API.registerCover(ItemList.Steam_Valve_EV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_VALVE)}), new GT_Cover_SteamValve(8192));
+ GregTech_API.registerCover(ItemList.Steam_Valve_IV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_VALVE)}), new GT_Cover_SteamValve(16384));
+
ItemList.FluidRegulator_LV.set(addItem(tLastID = 660, "Fluid Regulator (LV)", "Configuable up to 640 L/sec (as Cover)/n Rightclick/Screwdriver-rightclick/Shift-screwdriver-rightclick/n to adjust the pump speed by 1/16/256 L/sec per click", new Object[]{}));
ItemList.FluidRegulator_MV.set(addItem(tLastID = 661, "Fluid Regulator (MV)", "Configuable up to 2.560 L/sec (as Cover)/n Rightclick/Screwdriver-rightclick/Shift-screwdriver-rightclick/n to adjust the pump speed by 1/16/256 L/sec per click", new Object[]{}));
ItemList.FluidRegulator_HV.set(addItem(tLastID = 662, "Fluid Regulator (HV)", "Configuable up to 10.240 L/sec (as Cover)/n Rightclick/Screwdriver-rightclick/Shift-screwdriver-rightclick/n to adjust the pump speed by 1/16/256 L/sec per click", new Object[]{}));
diff --git a/src/main/java/gregtech/common/items/ItemComb.java b/src/main/java/gregtech/common/items/ItemComb.java
index 0b88ec41ae..114d7dad75 100644
--- a/src/main/java/gregtech/common/items/ItemComb.java
+++ b/src/main/java/gregtech/common/items/ItemComb.java
@@ -665,7 +665,7 @@ public class ItemComb extends Item {
tComb = getStackForType(CombType.MARS);
GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.MarsStoneDust", 1L, 0), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 3000, 0, 0, 0, 0}, 300, 480);
tComb = getStackForType(CombType.JUPITER);
- GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_ModHandler.getModItem("dreamcraft", "item.IoStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.EuropaIceDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.EuropaStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.GanymedStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.CallistoStoneDust", 1L, 0), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.CallistoIce, 1L), new int[]{3000, 3000, 3000, 3000, 3000, 500}, 300, 480);
+ GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_ModHandler.getModItem("dreamcraft", "item.IoStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.EuropaIceDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.EuropaStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.GanymedeStoneDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.CallistoStoneDust", 1L, 0), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.CallistoIce, 1L), new int[]{3000, 3000, 3000, 3000, 3000, 500}, 300, 480);
tComb = getStackForType(CombType.MERCURY);
GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.FR_Wax.get(1L), GT_ModHandler.getModItem("dreamcraft", "item.MercuryCoreDust", 1L, 0), GT_ModHandler.getModItem("dreamcraft", "item.MercuryStoneDust", 1L, 0), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 3000, 3000, 0, 0, 0}, 300, 1920);
tComb = getStackForType(CombType.VENUS);
diff --git a/src/main/java/gregtech/common/render/GT_Renderer_Block.java b/src/main/java/gregtech/common/render/GT_Renderer_Block.java
index 795e93f582..5ee32f8dc6 100644
--- a/src/main/java/gregtech/common/render/GT_Renderer_Block.java
+++ b/src/main/java/gregtech/common/render/GT_Renderer_Block.java
@@ -154,7 +154,7 @@ public class GT_Renderer_Block
}
boolean[] tIsCovered = new boolean[6];
for (byte i = 0; i < 6; i = (byte) (i + 1)) {
- tIsCovered[i] = (aTileEntity.getCoverIDAtSide(i) != 0 ? true : false);
+ tIsCovered[i] = (aTileEntity.getCoverIDAtSide(i) != 0);
}
if ((tIsCovered[0]) && (tIsCovered[1]) && (tIsCovered[2]) && (tIsCovered[3]) && (tIsCovered[4]) && (tIsCovered[5])) {
return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer);
@@ -420,20 +420,17 @@ public class GT_Renderer_Block
}
public static void renderNegativeYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) {
- if (aWorld != null) {
- if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY - 1, aZ, 0))) {
- return;
- }
- Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY - 1 : aY, aZ));
- }
+ if (aWorld == null) return;
+ if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY - 1, aZ, 0))) return;
+ Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY - 1 : aY, aZ));
+
if (aIcon != null) {
- for (int i = 0; i < aIcon.length; i++) {
- if (aIcon[i] != null) {
- aIcon[i].renderYNeg(aRenderer, aBlock, aX, aY, aZ);
+ for (ITexture iTexture : aIcon) {
+ if (iTexture != null) {
+ iTexture.renderYNeg(aRenderer, aBlock, aX, aY, aZ);
}
}
}
- aRenderer.flipTexture = false;
}
public static void renderPositiveYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) {
@@ -444,13 +441,12 @@ public class GT_Renderer_Block
Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY + 1 : aY, aZ));
}
if (aIcon != null) {
- for (int i = 0; i < aIcon.length; i++) {
- if (aIcon[i] != null) {
- aIcon[i].renderYPos(aRenderer, aBlock, aX, aY, aZ);
+ for (ITexture iTexture : aIcon) {
+ if (iTexture != null) {
+ iTexture.renderYPos(aRenderer, aBlock, aX, aY, aZ);
}
}
}
- aRenderer.flipTexture = false;
}
public static void renderNegativeZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) {
@@ -460,15 +456,13 @@ public class GT_Renderer_Block
}
Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ - 1 : aZ));
}
- aRenderer.flipTexture = (!aFullBlock);
if (aIcon != null) {
- for (int i = 0; i < aIcon.length; i++) {
- if (aIcon[i] != null) {
- aIcon[i].renderZNeg(aRenderer, aBlock, aX, aY, aZ);
+ for (ITexture iTexture : aIcon) {
+ if (iTexture != null) {
+ iTexture.renderZNeg(aRenderer, aBlock, aX, aY, aZ);
}
}
}
- aRenderer.flipTexture = false;
}
public static void renderPositiveZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) {
@@ -479,13 +473,12 @@ public class GT_Renderer_Block
Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ + 1 : aZ));
}
if (aIcon != null) {
- for (int i = 0; i < aIcon.length; i++) {
- if (aIcon[i] != null) {
- aIcon[i].renderZPos(aRenderer, aBlock, aX, aY, aZ);
+ for (ITexture iTexture : aIcon) {
+ if (iTexture != null) {
+ iTexture.renderZPos(aRenderer, aBlock, aX, aY, aZ);
}
}
}
- aRenderer.flipTexture = false;
}
public static void renderNegativeXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) {
@@ -496,13 +489,12 @@ public class GT_Renderer_Block
Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX - 1 : aX, aY, aZ));
}
if (aIcon != null) {
- for (int i = 0; i < aIcon.length; i++) {
- if (aIcon[i] != null) {
- aIcon[i].renderXNeg(aRenderer, aBlock, aX, aY, aZ);
+ for (ITexture iTexture : aIcon) {
+ if (iTexture != null) {
+ iTexture.renderXNeg(aRenderer, aBlock, aX, aY, aZ);
}
}
}
- aRenderer.flipTexture = false;
}
public static void renderPositiveXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, ITexture[] aIcon, boolean aFullBlock) {
@@ -512,15 +504,13 @@ public class GT_Renderer_Block
}
Tessellator.instance.setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX + 1 : aX, aY, aZ));
}
- aRenderer.flipTexture = (!aFullBlock);
if (aIcon != null) {
- for (int i = 0; i < aIcon.length; i++) {
- if (aIcon[i] != null) {
- aIcon[i].renderXPos(aRenderer, aBlock, aX, aY, aZ);
+ for (ITexture iTexture : aIcon) {
+ if (iTexture != null) {
+ iTexture.renderXPos(aRenderer, aBlock, aX, aY, aZ);
}
}
}
- aRenderer.flipTexture = false;
}
public void renderInventoryBlock(Block aBlock, int aMeta, int aModelID, RenderBlocks aRenderer) {
@@ -579,7 +569,7 @@ public class GT_Renderer_Block
if (aTileEntity == null) {
return false;
}
- if (((aTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) aTileEntity).getMetaTileEntity() != null) && (((IGregTechTileEntity) aTileEntity).getMetaTileEntity().renderInWorld(aWorld, aX, aY, aZ, aBlock, aRenderer))) {
+ if (aTileEntity instanceof IGregTechTileEntity && (((IGregTechTileEntity) aTileEntity).getMetaTileEntity() != null) && (((IGregTechTileEntity) aTileEntity).getMetaTileEntity().renderInWorld(aWorld, aX, aY, aZ, aBlock, aRenderer))) {
return true;
}
if ((aTileEntity instanceof IPipeRenderedTileEntity)) {
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 b248dc5aae..7a1421c3bb 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
@@ -69,8 +69,7 @@ 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);
- return GT_ModHandler.isSteam(aLiquid) || fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name") ? 3 : 0;
+ return GT_ModHandler.isAnySteam(aLiquid) ? 3 : 0;
}
public int consumedFluidPerOperation(FluidStack aLiquid) {
@@ -126,7 +125,7 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
@Override
public boolean isFluidInputAllowed(FluidStack aFluid) {
- if (aFluid.getFluid().getUnlocalizedName(aFluid).equals("ic2.fluidSuperheatedSteam")) {
+ if (GT_ModHandler.isSuperHeatedSteam(aFluid)) {
aFluid.amount = 0;
aFluid = null;
return false;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java
index 0daaf9cb51..363d689c84 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java
@@ -1,5 +1,7 @@
package gregtech.common.tileentities.machines.multi;
+import org.lwjgl.input.Keyboard;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import gregtech.api.enums.Textures;
@@ -10,6 +12,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import net.minecraft.block.Block;
import net.minecraft.entity.player.InventoryPlayer;
@@ -29,23 +32,34 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die
@Override
public String[] getDescription() {
- return new String[]{//change to new format after it's approved
- "Controller Block for the Extreme Combustion Engine",
- "Size(WxHxD): 3x3x4, Controller (front centered)",
- "3x3x4 of Robust Tungstensteel Machine Casing (hollow, Min 16!)",
- "2x Titanium Gear Box Machine Casing inside the Hollow Casing",
- "8x Extreme Engine Intake Casing (around controller)",
- "2x Input Hatch (HOG/Lubricant) (one of the Casings next to a Gear Box)",
- "1x Input Hatch (Optional, for Liquid Oxygen) (one of the Casings next to a Gear Box)",
- "1x Maintenance Hatch (one of the Casings next to a Gear Box)",
- "1x Muffler Hatch (top middle back, above the rear Gear Box)",
- "1x Dynamo Hatch (back centered)",
- "Engine Intake Casings must not be obstructed in front (only air blocks)",
- "Supply High Octane Gasoline and 8000L of Lubricant per hour to run.",
- "Supply 320L of Liquid Oxygen per second to boost output (optional).",
- "Default: Produces 8192EU/t at 100% efficiency",
- "Boosted: Produces 32768EU/t at 400% efficiency",
- "Causes " + 20 * getPollutionPerTick(null) + " Pollution per second"};
+ final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
+ tt.addMachineType("Combustion Generator")
+ .addInfo("Controller block for the Extreme Combustion Engine")
+ .addInfo("Supply High Octane Gasoline and 8000L of Lubricant per hour to run")
+ .addInfo("Supply 320L/s of Liquid Oxygen to boost output (optional)")
+ .addInfo("Default: Produces 8192EU/t at 100% fuel efficiency")
+ .addInfo("Boosted: Produces 32768EU/t at 400% fuel efficiency")
+ .addInfo("You need to wait for it to reach 400% to output full power")
+ .addPollutionAmount(20 * getPollutionPerTick(null))
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, false)
+ .addController("Front center")
+ .addCasingInfo("Robust Tungstensteel Machine Casing", 16)
+ .addOtherStructurePart("Titanium Gear Box Machine Casing", "Inner 2 blocks")
+ .addOtherStructurePart("Extreme Engine Intake Machine Casing", "8x, ring around controller")
+ .addStructureInfo("Extreme Engine Intake Casings must not be obstructed in front (only air blocks)")
+ .addDynamoHatch("Back center")
+ .addMaintenanceHatch("One of the casings next to a Gear Box")
+ .addMufflerHatch("Top middle back, above the rear Gear Box")
+ .addInputHatch("HOG, next to a Gear Box")
+ .addInputHatch("Lubricant, next to a Gear Box")
+ .addInputHatch("Liquid Oxygen, optional, next to a Gear Box")
+ .toolTipFinisher("Gregtech");
+ if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
+ return tt.getInformation();
+ } else {
+ return tt.getStructureInformation();
+ }
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java
index 2355b89fa8..d4e793346f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java
@@ -1,11 +1,5 @@
package gregtech.common.tileentities.machines.multi;
-import static gregtech.api.objects.XSTR.XSTR_INSTANCE;
-
-import java.util.ArrayList;
-
-import org.lwjgl.input.Keyboard;
-
import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
@@ -21,6 +15,11 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.fluids.FluidStack;
+import org.lwjgl.input.Keyboard;
+
+import java.util.ArrayList;
+
+import static gregtech.api.objects.XSTR.XSTR_INSTANCE;
public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_LargeTurbine {
@@ -111,11 +110,11 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La
storedFluid=0;
for (int i = 0; i < aFluids.size() && remainingFlow > 0; i++) {
- String fluidName = aFluids.get(i).getFluid().getUnlocalizedName(aFluids.get(i));
- if (fluidName.equals("ic2.fluidSuperheatedSteam")) {
- flow = Math.min(aFluids.get(i).amount, remainingFlow); // try to use up w/o exceeding remainingFlow
- depleteInput(new FluidStack(aFluids.get(i), flow)); // deplete that amount
- this.storedFluid += aFluids.get(i).amount;
+ final FluidStack aFluidStack = aFluids.get(i);
+ if (GT_ModHandler.isSuperHeatedSteam(aFluidStack)) {
+ flow = Math.min(aFluidStack.amount, remainingFlow); // try to use up w/o exceeding remainingFlow
+ depleteInput(new FluidStack(aFluidStack, flow)); // deplete that amount
+ this.storedFluid += aFluidStack.amount;
remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches
totalFlow += flow; // track total input used
if (!achievement) {
@@ -125,8 +124,8 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La
}
achievement = true;
}
- }else if(fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name")){
- depleteInput(new FluidStack(aFluids.get(i), aFluids.get(i).amount));
+ } else if(GT_ModHandler.isAnySteam(aFluidStack)){
+ depleteInput(new FluidStack(aFluidStack, aFluidStack.amount));
}
}
if(totalFlow<=0)return 0;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
index 20bcbf10d0..b50ff52ddd 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
@@ -1,11 +1,5 @@
package gregtech.common.tileentities.machines.multi;
-import static gregtech.api.objects.XSTR.XSTR_INSTANCE;
-
-import java.util.ArrayList;
-
-import org.lwjgl.input.Keyboard;
-
import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
@@ -21,6 +15,11 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.fluids.FluidStack;
+import org.lwjgl.input.Keyboard;
+
+import java.util.ArrayList;
+
+import static gregtech.api.objects.XSTR.XSTR_INSTANCE;
public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_LargeTurbine {
@@ -120,19 +119,19 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg
storedFluid=0;
for (int i = 0; i < aFluids.size() && remainingFlow > 0; i++) { // loop through each hatch; extract inputs and track totals.
- String fluidName = aFluids.get(i).getFluid().getUnlocalizedName(aFluids.get(i));
- if (fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name")) {
- flow = Math.min(aFluids.get(i).amount, remainingFlow); // try to use up w/o exceeding remainingFlow
- depleteInput(new FluidStack(aFluids.get(i), flow)); // deplete that amount
- this.storedFluid += aFluids.get(i).amount;
+ final FluidStack aFluidStack = aFluids.get(i);
+ if (GT_ModHandler.isAnySteam(aFluidStack)) {
+ flow = Math.min(aFluidStack.amount, remainingFlow); // try to use up w/o exceeding remainingFlow
+ depleteInput(new FluidStack(aFluidStack, flow)); // deplete that amount
+ this.storedFluid += aFluidStack.amount;
remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches
totalFlow += flow; // track total input used
if (!achievement) {
GT_Mod.instance.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "muchsteam");
achievement = true;
}
- }else if(fluidName.equals("ic2.fluidSuperheatedSteam")){
- depleteInput(new FluidStack(aFluids.get(i), aFluids.get(i).amount));
+ }else if(GT_ModHandler.isSuperHeatedSteam(aFluidStack)) {
+ depleteInput(new FluidStack(aFluidStack, aFluidStack.amount));
}
}
if(totalFlow<=0)return 0;