diff options
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations')
43 files changed, 2347 insertions, 2911 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBreaker.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBreaker.java index b9ffc8740a..8d8ec9b1be 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBreaker.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBreaker.java @@ -1,7 +1,13 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; + import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.gui.modularui.GT_UIInfos; @@ -15,10 +21,6 @@ import gtPlusPlus.core.lib.CORE; import gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power.GTPP_MTE_TieredMachineBlock; import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; public class GT_MetaTileEntity_BasicBreaker extends GTPP_MTE_TieredMachineBlock implements IAddUIWidgets { @@ -30,18 +32,18 @@ public class GT_MetaTileEntity_BasicBreaker extends GTPP_MTE_TieredMachineBlock private long mStored = 0L; private long mMax = 0L; - public GT_MetaTileEntity_BasicBreaker( - int aID, String aName, String aNameRegional, int aTier, String aDescription, int aSlotCount) { + public GT_MetaTileEntity_BasicBreaker(int aID, String aName, String aNameRegional, int aTier, String aDescription, + int aSlotCount) { super(aID, aName, aNameRegional, aTier, aSlotCount, aDescription, new ITexture[0]); } - public GT_MetaTileEntity_BasicBreaker( - String aName, int aTier, String aDescription, ITexture[][][] aTextures, int aSlotCount) { + public GT_MetaTileEntity_BasicBreaker(String aName, int aTier, String aDescription, ITexture[][][] aTextures, + int aSlotCount) { super(aName, aTier, aSlotCount, aDescription, aTextures); } - public GT_MetaTileEntity_BasicBreaker( - String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, int aSlotCount) { + public GT_MetaTileEntity_BasicBreaker(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, + int aSlotCount) { super(aName, aTier, aSlotCount, aDescription, aTextures); } @@ -49,13 +51,21 @@ public class GT_MetaTileEntity_BasicBreaker extends GTPP_MTE_TieredMachineBlock final String[] desc = new String[6]; int tTier = this.mTier; desc[0] = "" + EnumChatFormatting.BOLD + "16 Fuse Slots"; - desc[1] = "Per each fuse, you may insert " + EnumChatFormatting.YELLOW + (GT_Values.V[tTier]) - + EnumChatFormatting.GRAY + " EU/t"; - desc[2] = "However this " + EnumChatFormatting.ITALIC + EnumChatFormatting.RED + "MUST" - + EnumChatFormatting.GRAY + " be in a single Amp"; + desc[1] = "Per each fuse, you may insert " + EnumChatFormatting.YELLOW + + (GT_Values.V[tTier]) + + EnumChatFormatting.GRAY + + " EU/t"; + desc[2] = "However this " + EnumChatFormatting.ITALIC + + EnumChatFormatting.RED + + "MUST" + + EnumChatFormatting.GRAY + + " be in a single Amp"; desc[3] = "This machine can accept upto a single amp of " + GT_Values.VN[Math.min(tTier + 2, 15)] + " as a result"; - desc[4] = "Breaker Loss: " + EnumChatFormatting.RED + "" + (GT_Values.V[tTier] / 16) + EnumChatFormatting.GRAY + desc[4] = "Breaker Loss: " + EnumChatFormatting.RED + + "" + + (GT_Values.V[tTier] / 16) + + EnumChatFormatting.GRAY + " EU/t"; desc[5] = CORE.GT_Tooltip; return desc; @@ -65,37 +75,30 @@ public class GT_MetaTileEntity_BasicBreaker extends GTPP_MTE_TieredMachineBlock ITexture[][][] rTextures = new ITexture[2][17][]; for (byte i = -1; i < 16; ++i) { - rTextures[0][i + 1] = new ITexture[] { - BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], - this.mInventory.length > 4 - ? BlockIcons.OVERLAYS_ENERGY_IN_MULTI[Math.min(12, mTier)] - : BlockIcons.OVERLAYS_ENERGY_IN[Math.min(12, mTier)] - }; - - rTextures[1][i + 1] = new ITexture[] { - BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], - this.mInventory.length > 4 - ? BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] - : BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] - }; + rTextures[0][i + 1] = new ITexture[] { BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], + this.mInventory.length > 4 ? BlockIcons.OVERLAYS_ENERGY_IN_MULTI[Math.min(12, mTier)] + : BlockIcons.OVERLAYS_ENERGY_IN[Math.min(12, mTier)] }; + + rTextures[1][i + 1] = new ITexture[] { BlockIcons.MACHINE_CASINGS[this.mTier][i + 1], + this.mInventory.length > 4 ? BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] + : BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; } return rTextures; } - public ITexture[] getTexture( - IGregTechTileEntity aBaseMetaTileEntity, - byte aSide, - byte aFacing, - byte aColorIndex, - boolean aActive, - boolean aRedstone) { + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, + boolean aActive, boolean aRedstone) { return this.mTextures[aSide == aFacing ? 1 : 0][aColorIndex + 1]; } public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_BasicBreaker( - this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mInventory.length); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures, + this.mInventory.length); } public boolean isSimpleMachine() { @@ -198,23 +201,14 @@ public class GT_MetaTileEntity_BasicBreaker extends GTPP_MTE_TieredMachineBlock public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); if (aBaseMetaTileEntity.isServerSide()) { - /*this.mCharge = aBaseMetaTileEntity.getStoredEU() / 2L > aBaseMetaTileEntity.getEUCapacity() / 3L; - this.mDecharge = aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity() / 3L; - this.mBatteryCount = 0; - this.mChargeableCount = 0; - ItemStack[] arg3 = this.mInventory; - int arg4 = arg3.length; - - for (int arg5 = 0; arg5 < arg4; ++arg5) { - ItemStack tStack = arg3[arg5]; - if (GT_ModHandler.isElectricItem(tStack, this.mTier)) { - if (GT_ModHandler.isChargerItem(tStack)) { - ++this.mBatteryCount; - } - - ++this.mChargeableCount; - } - }*/ + /* + * this.mCharge = aBaseMetaTileEntity.getStoredEU() / 2L > aBaseMetaTileEntity.getEUCapacity() / 3L; + * this.mDecharge = aBaseMetaTileEntity.getStoredEU() < aBaseMetaTileEntity.getEUCapacity() / 3L; + * this.mBatteryCount = 0; this.mChargeableCount = 0; ItemStack[] arg3 = this.mInventory; int arg4 = + * arg3.length; for (int arg5 = 0; arg5 < arg4; ++arg5) { ItemStack tStack = arg3[arg5]; if + * (GT_ModHandler.isElectricItem(tStack, this.mTier)) { if (GT_ModHandler.isChargerItem(tStack)) { + * ++this.mBatteryCount; } ++this.mChargeableCount; } } + */ } } @@ -274,11 +268,11 @@ public class GT_MetaTileEntity_BasicBreaker extends GTPP_MTE_TieredMachineBlock tStored = Long.MAX_VALUE; } - return new long[] {tStored, tScale}; + return new long[] { tStored, tScale }; } public String[] getInfoData() { - return new String[] {"Tile Type: " + this.getTileEntityBaseType()}; + return new String[] { "Tile Type: " + this.getTileEntityBaseType() }; } public boolean isGivingInformation() { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GTPP_Recipe.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GTPP_Recipe.java index cf92bdc0ba..a47ed592c4 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GTPP_Recipe.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GTPP_Recipe.java @@ -6,25 +6,10 @@ import gregtech.api.util.GT_Recipe.GT_Recipe_Map; public class GT_MetaTileEntity_BasicMachine_GTPP_Recipe extends GT_MetaTileEntity_BasicMachine_GT_Recipe { - public GT_MetaTileEntity_BasicMachine_GTPP_Recipe( - int aID, - String aName, - String aNameRegional, - int aTier, - String aDescription, - GT_Recipe_Map aRecipes, - int aInputSlots, - int aOutputSlots, - int aTankCapacity, - int aGUIParameterA, - int aGUIParameterB, - String aGUIName, - String aSound, - boolean aSharedTank, - boolean aRequiresFluidForFiltering, - int aSpecialEffect, - String aOverlays, - Object[] aRecipe) { + public GT_MetaTileEntity_BasicMachine_GTPP_Recipe(int aID, String aName, String aNameRegional, int aTier, + String aDescription, GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, + int aGUIParameterA, int aGUIParameterB, String aGUIName, String aSound, boolean aSharedTank, + boolean aRequiresFluidForFiltering, int aSpecialEffect, String aOverlays, Object[] aRecipe) { super( aID, aName, @@ -46,24 +31,10 @@ public class GT_MetaTileEntity_BasicMachine_GTPP_Recipe extends GT_MetaTileEntit aRecipe); } - public GT_MetaTileEntity_BasicMachine_GTPP_Recipe( - String aName, - int aTier, - String aDescription, - GT_Recipe_Map aRecipes, - int aInputSlots, - int aOutputSlots, - int aTankCapacity, - int aAmperage, - int aGUIParameterA, - int aGUIParameterB, - ITexture[][][] aTextures, - String aGUIName, - String aNEIName, - String aSound, - boolean aSharedTank, - boolean aRequiresFluidForFiltering, - int aSpecialEffect) { + public GT_MetaTileEntity_BasicMachine_GTPP_Recipe(String aName, int aTier, String aDescription, + GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, int aAmperage, + int aGUIParameterA, int aGUIParameterB, ITexture[][][] aTextures, String aGUIName, String aNEIName, + String aSound, boolean aSharedTank, boolean aRequiresFluidForFiltering, int aSpecialEffect) { super( aName, aTier, @@ -84,24 +55,10 @@ public class GT_MetaTileEntity_BasicMachine_GTPP_Recipe extends GT_MetaTileEntit aSpecialEffect); } - public GT_MetaTileEntity_BasicMachine_GTPP_Recipe( - String aName, - int aTier, - String[] aDescription, - GT_Recipe_Map aRecipes, - int aInputSlots, - int aOutputSlots, - int aTankCapacity, - int aAmperage, - int aGUIParameterA, - int aGUIParameterB, - ITexture[][][] aTextures, - String aGUIName, - String aNEIName, - String aSound, - boolean aSharedTank, - boolean aRequiresFluidForFiltering, - int aSpecialEffect) { + public GT_MetaTileEntity_BasicMachine_GTPP_Recipe(String aName, int aTier, String[] aDescription, + GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, int aAmperage, + int aGUIParameterA, int aGUIParameterB, ITexture[][][] aTextures, String aGUIName, String aNEIName, + String aSound, boolean aSharedTank, boolean aRequiresFluidForFiltering, int aSpecialEffect) { super( aName, aTier, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java index 7273977101..6852d7be5f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java @@ -31,8 +31,8 @@ public class GT_MetaTileEntity_Dehydrator extends GT_MetaTileEntity_BasicMachine // 3 8 } - public GT_MetaTileEntity_Dehydrator( - int aID, String aName, String aNameRegional, int aTier, String aDescription, int aTankCapacity) { + public GT_MetaTileEntity_Dehydrator(int aID, String aName, String aNameRegional, int aTier, String aDescription, + int aTankCapacity) { super( aID, aName, @@ -54,16 +54,9 @@ public class GT_MetaTileEntity_Dehydrator extends GT_MetaTileEntity_BasicMachine null); } - public GT_MetaTileEntity_Dehydrator( - String aName, - int aTier, - String[] aDescription, - GT_Recipe.GT_Recipe_Map aRecipes, - int aTankCapacity, - int aAmperage, - ITexture[][][] aTextures, - String aGUIName, - String aNEIName) { + public GT_MetaTileEntity_Dehydrator(String aName, int aTier, String[] aDescription, + GT_Recipe.GT_Recipe_Map aRecipes, int aTankCapacity, int aAmperage, ITexture[][][] aTextures, + String aGUIName, String aNEIName) { super( aName, aTier, @@ -116,13 +109,8 @@ public class GT_MetaTileEntity_Dehydrator extends GT_MetaTileEntity_BasicMachine } @Override - public ITexture[] getTexture( - final IGregTechTileEntity aBaseMetaTileEntity, - final byte aSide, - final byte aFacing, - final byte aColorIndex, - final boolean aActive, - final boolean aRedstone) { + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, + final byte aColorIndex, final boolean aActive, final boolean aRedstone) { return super.getTexture(aBaseMetaTileEntity, aSide, aFacing, aColorIndex, aActive, aRedstone); // return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == // GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; @@ -130,87 +118,79 @@ public class GT_MetaTileEntity_Dehydrator extends GT_MetaTileEntity_BasicMachine @Override public ITexture[] getFrontFacingInactive(final byte aColor) { - return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[0]) - }; + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], + new GT_RenderedTexture(sDehydratorOverlays[0]) }; } @Override public ITexture[] getBottomFacingInactive(final byte aColor) { - return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[2]) - }; + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], + new GT_RenderedTexture(sDehydratorOverlays[2]) }; } @Override public ITexture[] getTopFacingInactive(final byte aColor) { - return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[3]) - }; + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], + new GT_RenderedTexture(sDehydratorOverlays[3]) }; } @Override public ITexture[] getSideFacingInactive(final byte aColor) { - return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[4]) - }; + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], + new GT_RenderedTexture(sDehydratorOverlays[4]) }; } @Override public ITexture[] getFrontFacingActive(final byte aColor) { - return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[5]) - }; + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], + new GT_RenderedTexture(sDehydratorOverlays[5]) }; } @Override public ITexture[] getBottomFacingActive(final byte aColor) { - return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[7]) - }; + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], + new GT_RenderedTexture(sDehydratorOverlays[7]) }; } @Override public ITexture[] getTopFacingActive(final byte aColor) { - return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[8]) - }; + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], + new GT_RenderedTexture(sDehydratorOverlays[8]) }; } @Override public ITexture[] getSideFacingActive(final byte aColor) { - return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[9]) - }; + return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], + new GT_RenderedTexture(sDehydratorOverlays[9]) }; } @Override public ITexture[] getBottomFacingPipeActive(byte aColor) { - return new ITexture[] {MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] { MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT) }; } @Override public ITexture[] getBottomFacingPipeInactive(byte aColor) { - return new ITexture[] {MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] { MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT) }; } @Override public ITexture[] getTopFacingPipeActive(byte aColor) { - return new ITexture[] {MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] { MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT) }; } @Override public ITexture[] getTopFacingPipeInactive(byte aColor) { - return new ITexture[] {MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] { MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT) }; } @Override public ITexture[] getSideFacingPipeActive(byte aColor) { - return new ITexture[] {MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] { MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT) }; } @Override public ITexture[] getSideFacingPipeInactive(byte aColor) { - return new ITexture[] {MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)}; + return new ITexture[] { MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT) }; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java index 299580391a..8b39d1da32 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java @@ -2,6 +2,17 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; import static gregtech.api.enums.GT_Values.V; +import java.util.Arrays; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; |
