aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/metatileentity/implementations
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity/implementations')
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java8
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java8
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java4
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java64
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Bronze.java71
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Steel.java46
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java6
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java5
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Output.java38
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java4
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Transformer.java10
11 files changed, 129 insertions, 135 deletions
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 8666f609b6..788753f0cc 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
@@ -218,10 +218,10 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile
if (GT_Mod.gregtechproxy.gt6Cable && GT_ModHandler.damageOrDechargeItem(aPlayer.inventory.getCurrentItem(), 1, 500, aPlayer)) {
if(isConnectedAtSide(aWrenchingSide)) {
disconnect(aWrenchingSide);
- GT_Utility.sendChatToPlayer(aPlayer, trans("215", "Disconnected"));
+ GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("215", "Disconnected"));
}else if(!GT_Mod.gregtechproxy.costlyCableConnection){
if (connect(aWrenchingSide) > 0)
- GT_Utility.sendChatToPlayer(aPlayer, trans("214", "Connected"));
+ GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("214", "Connected"));
}
return true;
}
@@ -233,10 +233,10 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile
if (GT_Mod.gregtechproxy.gt6Cable && GT_ModHandler.damageOrDechargeItem(aPlayer.inventory.getCurrentItem(), 1, 500, aPlayer)) {
if (isConnectedAtSide(aWrenchingSide)) {
disconnect(aWrenchingSide);
- GT_Utility.sendChatToPlayer(aPlayer, trans("215", "Disconnected"));
+ GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("215", "Disconnected"));
} else if (!GT_Mod.gregtechproxy.costlyCableConnection || GT_ModHandler.consumeSolderingMaterial(aPlayer)) {
if (connect(aWrenchingSide) > 0)
- GT_Utility.sendChatToPlayer(aPlayer, trans("214", "Connected"));
+ GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("214", "Connected"));
}
return true;
}
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 8cce529050..bf87c03d79 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
@@ -392,20 +392,20 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity {
if (aPlayer.isSneaking()) {
if (isInputDisabledAtSide(tSide)) {
mDisableInput &= ~tMask;
- GT_Utility.sendChatToPlayer(aPlayer, trans("212", "Input enabled"));
+ GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("212", "Input enabled"));
if (!isConnectedAtSide(tSide))
connect(tSide);
} else {
mDisableInput |= tMask;
- GT_Utility.sendChatToPlayer(aPlayer, trans("213", "Input disabled"));
+ GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("213", "Input disabled"));
}
} else {
if (!isConnectedAtSide(tSide)) {
if (connect(tSide) > 0)
- GT_Utility.sendChatToPlayer(aPlayer, trans("214", "Connected"));
+ GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("214", "Connected"));
} else {
disconnect(tSide);
- GT_Utility.sendChatToPlayer(aPlayer, trans("215", "Disconnected"));
+ GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("215", "Disconnected"));
}
}
return true;
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java
index e316a44c80..db4f5b7603 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java
@@ -197,10 +197,10 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE
byte tSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ);
if (isConnectedAtSide(tSide)) {
disconnect(tSide);
- GT_Utility.sendChatToPlayer(aPlayer, trans("215", "Disconnected"));
+ GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("215", "Disconnected"));
} else {
if (connect(tSide) > 0)
- GT_Utility.sendChatToPlayer(aPlayer, trans("214", "Connected"));
+ GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("214", "Connected"));
}
return true;
}
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 6cdbe77526..ef492950a1 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
@@ -11,8 +11,10 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_CoverBehaviorBase;
+import gregtech.common.power.BasicMachineEUPower;
import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.common.power.Power;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.api.util.GT_Utility;
@@ -67,6 +69,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;
+ private final Power mPower;
@Deprecated
@@ -101,7 +104,9 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
mAmperage = aAmperage;
mGUIName = aGUIName;
mNEIName = aNEIName;
+ mPower = buildPower();
}
+
public GT_MetaTileEntity_BasicMachine(int aID, String aName, String aNameRegional, int aTier, int aAmperage, String[] aDescription, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName, ITexture... aOverlays) {
super(aID, aName, aNameRegional, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aOverlays);
mInputSlotCount = Math.max(0, aInputSlotCount);
@@ -109,6 +114,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
mAmperage = aAmperage;
mGUIName = aGUIName;
mNEIName = aNEIName;
+ mPower = buildPower();
}
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);
@@ -117,6 +123,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
mAmperage = aAmperage;
mGUIName = aGUIName;
mNEIName = aNEIName;
+ mPower = buildPower();
}
public GT_MetaTileEntity_BasicMachine(String aName, int aTier, int aAmperage, String[] aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName) {
@@ -126,6 +133,14 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
mAmperage = aAmperage;
mGUIName = aGUIName;
mNEIName = aNEIName;
+ mPower = buildPower();
+ }
+
+ /**
+ * To be called by the constructor to initialize this instance's Power
+ */
+ protected Power buildPower() {
+ return new BasicMachineEUPower(mTier, mAmperage);
}
protected boolean isValidMainFacing(byte aSide) {
@@ -546,7 +561,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
if (doesAutoOutput() && !isOutputEmpty() && aBaseMetaTileEntity.getFrontFacing() != mMainFacing && (tSucceeded || mOutputBlocked % 300 == 1 || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0)) {
TileEntity tTileEntity2 = aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getFrontFacing());
long tStoredEnergy = aBaseMetaTileEntity.getUniversalEnergyStored();
- int tMaxStacks = (int)(tStoredEnergy/64l);
+ int tMaxStacks = (int)(tStoredEnergy/64L);
if (tMaxStacks > mOutputItems.length)
tMaxStacks = mOutputItems.length;
@@ -641,42 +656,9 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
* @param aDuration - recipe Duration
*/
protected void calculateOverclockedNess(int aEUt, int aDuration) {
- if(mTier==0){
- //Long time calculation
- long xMaxProgresstime = ((long)aDuration)<<1;
- if(xMaxProgresstime>Integer.MAX_VALUE-1){
- //make impossible if too long
- mEUt=Integer.MAX_VALUE-1;
- mMaxProgresstime=Integer.MAX_VALUE-1;
- }else{
- mEUt=aEUt>>2;
- mMaxProgresstime=(int)xMaxProgresstime;
- }
- }else{
- //Long EUt calculation
- long xEUt=aEUt;
- //Isnt too low EUt check?
- long tempEUt = Math.max(xEUt, V[1]);
-
- mMaxProgresstime = aDuration;
-
- while (tempEUt <= V[mTier -1] * (long)mAmperage) {
- tempEUt<<=2;//this actually controls overclocking
- //xEUt *= 4;//this is effect of everclocking
- mMaxProgresstime>>=1;//this is effect of overclocking
- xEUt = mMaxProgresstime==0 ? xEUt>>1 : xEUt<<2;//U know, if the time is less than 1 tick make the machine use 2x less power
- }
- if(xEUt>Integer.MAX_VALUE-1){
- mEUt = Integer.MAX_VALUE-1;
- mMaxProgresstime = Integer.MAX_VALUE-1;
- }else{
- mEUt = (int)xEUt;
- if(mEUt==0)
- mEUt = 1;
- if(mMaxProgresstime==0)
- mMaxProgresstime = 1;//set time to 1 tick
- }
- }
+ mPower.computePowerUsageAndDuration(aEUt, aDuration);
+ mEUt = mPower.getEuPerTick();
+ mMaxProgresstime = mPower.getDurationTicks();
}
protected ItemStack getSpecialSlot() {
@@ -843,7 +825,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("GT5U.hatch.disableFilter." + mDisableFilter));
} else {
mAllowInputFromOutputSide = !mAllowInputFromOutputSide;
- GT_Utility.sendChatToPlayer(aPlayer, mAllowInputFromOutputSide ? trans("095", "Input from Output Side allowed") : trans("096", "Input from Output Side forbidden"));
+ GT_Utility.sendChatToPlayer(aPlayer, mAllowInputFromOutputSide ? GT_Utility.trans("095", "Input from Output Side allowed") : GT_Utility.trans("096", "Input from Output Side forbidden"));
}
}
}
@@ -1059,7 +1041,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
@Override
public void getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
final NBTTagCompound tag = accessor.getNBTData();
-
+
currenttip.add(String.format("Progress: %d s / %d s", tag.getInteger("progressSingleBlock"), tag.getInteger("maxProgressSingleBlock")));
super.getWailaBody(itemStack, currenttip, accessor, config);
}
@@ -1071,4 +1053,8 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
tag.setInteger("progressSingleBlock", mProgresstime / 20);
tag.setInteger("maxProgressSingleBlock", mMaxProgresstime / 20);
}
+
+ public Power getPower() {
+ return mPower;
+ }
}
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 204156f3ab..02e94a7ea9 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
@@ -7,6 +7,9 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Log;
+import gregtech.common.power.Power;
+import gregtech.api.util.GT_Recipe;
+import gregtech.common.power.SteamPower;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.WorldSpawnedEventBuilder;
import net.minecraft.entity.EntityLivingBase;
@@ -33,25 +36,28 @@ import static gregtech.api.objects.XSTR.XSTR_INSTANCE;
* Extend this class to make a simple Machine
*/
public abstract class GT_MetaTileEntity_BasicMachine_Bronze extends GT_MetaTileEntity_BasicMachine {
- /*
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_BasicMachine_Bronze(mTier, mDescription, mTextures);
- }
- */
private static final int NEEDS_STEAM_VENTING = 64;
public boolean mNeedsSteamVenting = false;
- public GT_MetaTileEntity_BasicMachine_Bronze(int aID, String aName, String aNameRegional, String aDescription, int aInputSlotCount, int aOutputSlotCount, boolean aBricked) {
- super(aID, aName, aNameRegional, aBricked ? 1 : 0, 0, aDescription, aInputSlotCount, aOutputSlotCount, "", "");
+ public GT_MetaTileEntity_BasicMachine_Bronze(int aID, String aName, String aNameRegional, String aDescription, int aInputSlotCount, int aOutputSlotCount, boolean aHighPressure) {
+ super(aID, aName, aNameRegional, aHighPressure ? 2 : 1, 0, aDescription, 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, "", "");
+ public GT_MetaTileEntity_BasicMachine_Bronze(String aName, String aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, boolean aHighPressure) {
+ super(aName, aHighPressure ? 2 : 1, 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, "", "");
+ public GT_MetaTileEntity_BasicMachine_Bronze(String aName, String[] aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, boolean aHighPressure) {
+ super(aName, aHighPressure ? 2 : 1, 0, aDescription, aTextures, aInputSlotCount, aOutputSlotCount, "", "");
+ }
+
+ protected boolean isBricked() {
+ return false;
+ }
+
+ @Override
+ public Power buildPower() {
+ return new SteamPower(mTier, 1, 2);
}
@Override
@@ -153,6 +159,17 @@ public abstract class GT_MetaTileEntity_BasicMachine_Bronze extends GT_MetaTileE
}
@Override
+ public int checkRecipe() {
+ GT_Recipe tRecipe = getRecipeList().findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[mTier], null, getAllInputs());
+ if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) {
+ this.mOutputItems[0] = tRecipe.getOutput(0);
+ calculateOverclockedNess(tRecipe);
+ return 2;
+ }
+ return 0;
+ }
+
+ @Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
super.onPostTick(aBaseMetaTileEntity, aTick);
// Super already zeroed out setErrorDisplayID, add additional error codes here.
@@ -199,76 +216,76 @@ public abstract class GT_MetaTileEntity_BasicMachine_Bronze extends GT_MetaTileE
}
public float getSteamDamage() {
- return 6.0F;
+ return 6.0F * mTier;
}
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_TOP : MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_TOP : MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_TOP : MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_TOP : MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_BOTTOM : MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_BOTTOM : MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_BOTTOM : MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_BOTTOM : MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
}
@Override
public ITexture[] getBottomFacingPipeActive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_BOTTOM : MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_BOTTOM : MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
}
@Override
public ITexture[] getBottomFacingPipeInactive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_BOTTOM : MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_BOTTOM : MACHINE_BRONZE_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
}
@Override
public ITexture[] getTopFacingPipeActive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_TOP : MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_TOP : MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
}
@Override
public ITexture[] getTopFacingPipeInactive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_TOP : MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_TOP : MACHINE_BRONZE_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
}
@Override
public ITexture[] getSideFacingPipeActive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
}
@Override
public ITexture[] getSideFacingPipeInactive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_BRONZEBRICKS_SIDE : MACHINE_BRONZE_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
}
}
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 20a3758324..a58cf6345d 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
@@ -3,6 +3,8 @@ package gregtech.api.metatileentity.implementations;
import gregtech.api.enums.Dyes;
import gregtech.api.interfaces.ITexture;
import gregtech.api.render.TextureFactory;
+import gregtech.common.power.Power;
+import gregtech.common.power.SteamPower;
import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM;
import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE;
@@ -20,90 +22,90 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT;
* Extend this class to make a simple Machine
*/
public abstract class GT_MetaTileEntity_BasicMachine_Steel extends GT_MetaTileEntity_BasicMachine_Bronze {
- public GT_MetaTileEntity_BasicMachine_Steel(int aID, String aName, String aNameRegional, String aDescription, int aInputSlotCount, int aOutputSlotCount, boolean aBricked) {
- super(aID, aName, aNameRegional, aDescription, aInputSlotCount, aOutputSlotCount, aBricked);
+ public GT_MetaTileEntity_BasicMachine_Steel(int aID, String aName, String aNameRegional, String aDescription, int aInputSlotCount, int aOutputSlotCount, boolean aHighPressure) {
+ super(aID, aName, aNameRegional, aDescription, aInputSlotCount, aOutputSlotCount, aHighPressure);
}
- 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 aHighPressure) {
+ super(aName, aDescription, aTextures, aInputSlotCount, aOutputSlotCount, aHighPressure);
}
- 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 aHighPressure) {
+ super(aName, aDescription, aTextures, aInputSlotCount, aOutputSlotCount, aHighPressure);
}
@Override
- public float getSteamDamage() {
- return 12.0F;
+ public Power buildPower() {
+ return new SteamPower(mTier, 2, 1);
}
@Override
public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
}
@Override
public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
}
@Override
public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
}
@Override
public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
}
@Override
public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_TOP : MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_TOP : MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
}
@Override
public ITexture[] getTopFacingInactive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_TOP : MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_TOP : MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
}
@Override
public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_BOTTOM : MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_BOTTOM : MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
}
@Override
public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_BOTTOM : MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_BOTTOM : MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa))};
}
@Override
public ITexture[] getBottomFacingPipeActive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_BOTTOM : MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_BOTTOM : MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
}
@Override
public ITexture[] getBottomFacingPipeInactive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_BOTTOM : MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_BOTTOM : MACHINE_STEEL_BOTTOM, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
}
@Override
public ITexture[] getTopFacingPipeActive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_TOP : MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_TOP : MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
}
@Override
public ITexture[] getTopFacingPipeInactive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_TOP : MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_TOP : MACHINE_STEEL_TOP, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
}
@Override
public ITexture[] getSideFacingPipeActive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
}
@Override
public ITexture[] getSideFacingPipeInactive(byte aColor) {
- return new ITexture[]{TextureFactory.of(mTier == 1 ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
+ return new ITexture[]{TextureFactory.of(isBricked() ? MACHINE_STEELBRICKS_SIDE : MACHINE_STEEL_SIDE, Dyes.getModulation(aColor, Dyes._NULL.mRGBa)), TextureFactory.of(OVERLAY_PIPE_OUT)};
}
}
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 1df2dac0f0..a3662b78f3 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
@@ -254,9 +254,9 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM
mTargetStackSize = (byte) ((mTargetStackSize + (aPlayer.isSneaking()? -1 : 1)) % 65);
if(mTargetStackSize <0){mTargetStackSize = mMaxStackSize;}
if (mTargetStackSize == 0) {
- GT_Utility.sendChatToPlayer(aPlayer, trans("098","Do not regulate Item Stack Size"));
+ GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("098","Do not regulate Item Stack Size"));
} else {
- GT_Utility.sendChatToPlayer(aPlayer, trans("099","Regulate Item Stack Size to: ") + mTargetStackSize);
+ GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("099","Regulate Item Stack Size to: ") + mTargetStackSize);
}
}
}
@@ -360,7 +360,7 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM
if (aPlayer.isSneaking()) {
// I was so proud of all this but I literally just copied code from OutputBus
bSortStacks = !bSortStacks;
- GT_Utility.sendChatToPlayer(aPlayer, trans("200", "Sort mode: " + (bSortStacks ? "Enabled" : "Disabled")));
+ GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("200", "Sort mode: " + (bSortStacks ? "Enabled" : "Disabled")));
return true;
}
return super.onSolderingToolRightClick(aSide,aWrenchingSide,aPlayer,aX,aY,aZ);
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 2b7e50519d..3b8ed18e94 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
@@ -207,11 +207,6 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch {
}
@Override
- public String trans(String aKey, String aEnglish) {
- return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false);
- }
-
- @Override
public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
return aSide == getBaseMetaTileEntity().getFrontFacing();
}
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 02db2aec47..893ae970a6 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
@@ -5,7 +5,6 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.render.TextureFactory;
-import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Utility;
import gregtech.common.gui.GT_Container_OutputHatch;
import gregtech.common.gui.GT_GUIContainer_OutputHatch;
@@ -214,58 +213,58 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch {
String inBrackets;
switch (mMode) {
case 0:
- GT_Utility.sendChatToPlayer(aPlayer, trans("108","Outputs misc. Fluids, Steam and Items"));
+ GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("108","Outputs misc. Fluids, Steam and Items"));
this.setLockedFluidName(null);
break;
case 1:
- GT_Utility.sendChatToPlayer(aPlayer, trans("109","Outputs Steam and Items"));
+ GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("109","Outputs Steam and Items"));
this.setLockedFluidName(null);
break;
case 2:
- GT_Utility.sendChatToPlayer(aPlayer, trans("110","Outputs Steam and misc. Fluids"));
+ GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("110","Outputs Steam and misc. Fluids"));
this.setLockedFluidName(null);
break;
case 3:
- GT_Utility.sendChatToPlayer(aPlayer, trans("111","Outputs Steam"));
+ GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("111","Outputs Steam"));
this.setLockedFluidName(null);
break;
case 4:
- GT_Utility.sendChatToPlayer(aPlayer, tra