From 877312184c472d9845e5ef1008bc538f4634059f Mon Sep 17 00:00:00 2001 From: Foghrye4 Date: Thu, 10 Aug 2017 18:50:56 +0300 Subject: fix missing source folder --- .../GT_MetaTileEntity_DieselGenerator.java | 145 +++++++++++ .../GT_MetaTileEntity_FluidNaquadahReactor.java | 119 ++++++++++ .../generators/GT_MetaTileEntity_GasTurbine.java | 131 ++++++++++ .../GT_MetaTileEntity_MagicEnergyConverter.java | 125 ++++++++++ .../GT_MetaTileEntity_MagicalEnergyAbsorber.java | 264 +++++++++++++++++++++ .../GT_MetaTileEntity_PlasmaGenerator.java | 125 ++++++++++ .../GT_MetaTileEntity_SolidNaquadahReactor.java | 119 ++++++++++ .../generators/GT_MetaTileEntity_SteamTurbine.java | 144 +++++++++++ 8 files changed, 1172 insertions(+) create mode 100644 main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java create mode 100644 main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java create mode 100644 main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java create mode 100644 main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java create mode 100644 main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java create mode 100644 main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java create mode 100644 main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor.java create mode 100644 main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java (limited to 'main/java/gregtech/common/tileentities/generators') diff --git a/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java b/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java new file mode 100644 index 0000000..6f10baf --- /dev/null +++ b/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java @@ -0,0 +1,145 @@ +/* 1: */ package gregtech.common.tileentities.generators; +/* 2: */ +/* 3: */ import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +/* 4: */ import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +/* 6: */ import gregtech.api.interfaces.ITexture; +/* 7: */ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +/* 8: */ import gregtech.api.metatileentity.MetaTileEntity; +/* 9: */ +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; +/* 10: */ import gregtech.api.objects.GT_RenderedTexture; +/* 11: */ import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Recipe; +/* 13: */ import net.minecraft.item.ItemStack; +/* 14: */ +/* 15: */ public class GT_MetaTileEntity_DieselGenerator +/* 16: */ extends GT_MetaTileEntity_BasicGenerator +/* 17: */ { + + public int mEfficiency; +/* 18: */ @Override +public boolean isOutputFacing(byte aSide) +/* 19: */ { +/* 20:16 */ return aSide == getBaseMetaTileEntity().getFrontFacing(); +/* 21: */ } +/* 22: */ +/* 23: */ public GT_MetaTileEntity_DieselGenerator(int aID, String aName, String aNameRegional, int aTier) +/* 24: */ { +/* 25:19 */ super(aID, aName, aNameRegional, aTier, "Requires liquid Fuel", new ITexture[0]); + onConfigLoad(); +/* 26: */ } +/* 27: */ +/* 28: */ public GT_MetaTileEntity_DieselGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) +/* 29: */ { +/* 30:23 */ super(aName, aTier, aDescription, aTextures); + onConfigLoad(); +/* 31: */ } +/* 32: */ +/* 33: */ @Override +public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) +/* 34: */ { +/* 35:28 */ return new GT_MetaTileEntity_DieselGenerator(this.mName, this.mTier, this.mDescription, this.mTextures); +/* 36: */ } +/* 37: */ +/* 38: */ @Override +public GT_Recipe.GT_Recipe_Map getRecipes() +/* 39: */ { +/* 40:33 */ return GT_Recipe.GT_Recipe_Map.sDieselFuels; +/* 41: */ } +/* 42: */ +/* 43: */ @Override +public int getCapacity() +/* 44: */ { +/* 45:38 */ return 16000; +/* 46: */ } + +/* 47: */ public void onConfigLoad() +/* 39: */ { + this.mEfficiency =GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "DieselGenerator.efficiency.tier."+this.mTier, (100 - this.mTier * 10)); +} + +/* 48: */ @Override +public int getEfficiency() +/* 49: */ { +/* 50:43 */ return this.mEfficiency; +/* 51: */ } +/* 52: */ +/* 53: */ @Override +public int getFuelValue(ItemStack aStack) +/* 54: */ { +/* 55:48 */ int rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack)); +/* 56:49 */ if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) { +/* 57:49 */ rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3); +/* 58: */ } +/* 59:50 */ return rValue; +/* 60: */ } +/* 61: */ +/* 62: */ @Override +public ITexture[] getFront(byte aColor) +/* 63: */ { +/* 64:53 */ return new ITexture[] { super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; +/* 65: */ } +/* 66: */ +/* 67: */ @Override +public ITexture[] getBack(byte aColor) +/* 68: */ { +/* 69:54 */ return new ITexture[] { super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK) }; +/* 70: */ } +/* 71: */ +/* 72: */ @Override +public ITexture[] getBottom(byte aColor) +/* 73: */ { +/* 74:55 */ return new ITexture[] { super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM) }; +/* 75: */ } +/* 76: */ +/* 77: */ @Override +public ITexture[] getTop(byte aColor) +/* 78: */ { +/* 79:56 */ return new ITexture[] { super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP) }; +/* 80: */ } +/* 81: */ +/* 82: */ @Override +public ITexture[] getSides(byte aColor) +/* 83: */ { +/* 84:57 */ return new ITexture[] { super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE) }; +/* 85: */ } +/* 86: */ +/* 87: */ @Override +public ITexture[] getFrontActive(byte aColor) +/* 88: */ { +/* 89:58 */ return new ITexture[] { super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT_ACTIVE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; +/* 90: */ } +/* 91: */ +/* 92: */ @Override +public ITexture[] getBackActive(byte aColor) +/* 93: */ { +/* 94:59 */ return new ITexture[] { super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK_ACTIVE) }; +/* 95: */ } +/* 96: */ +/* 97: */ @Override +public ITexture[] getBottomActive(byte aColor) +/* 98: */ { +/* 99:60 */ return new ITexture[] { super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE) }; +/* :0: */ } +/* :1: */ +/* :2: */ @Override +public ITexture[] getTopActive(byte aColor) +/* :3: */ { +/* :4:61 */ return new ITexture[] { super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE) }; +/* :5: */ } +/* :6: */ +/* :7: */ @Override +public ITexture[] getSidesActive(byte aColor) +/* :8: */ { +/* :9:62 */ return new ITexture[] { super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE) }; +/* ;0: */ } +/* ;1: */ } + + +/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar + * Qualified Name: gregtech.common.tileentities.generators.GT_MetaTileEntity_DieselGenerator + * JD-Core Version: 0.7.0.1 + */ \ No newline at end of file diff --git a/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java b/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java new file mode 100644 index 0000000..294abdf --- /dev/null +++ b/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java @@ -0,0 +1,119 @@ +/* 1: */ package gregtech.common.tileentities.generators; +/* 2: */ +/* 3: */ import gregtech.api.enums.Textures; +/* 4: */ import gregtech.api.interfaces.ITexture; +/* 5: */ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +/* 6: */ import gregtech.api.metatileentity.MetaTileEntity; +/* 7: */ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; +/* 8: */ import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +/* 10: */ +/* 11: */ public class GT_MetaTileEntity_FluidNaquadahReactor +/* 12: */ extends GT_MetaTileEntity_BasicGenerator +/* 13: */ { +/* 14: */ @Override +public boolean isOutputFacing(byte aSide) +/* 15: */ { +/* 16:12 */ return (aSide > 1) && (aSide != getBaseMetaTileEntity().getFrontFacing()) && (aSide != getBaseMetaTileEntity().getBackFacing()); +/* 17: */ } +/* 18: */ +/* 19: */ public GT_MetaTileEntity_FluidNaquadahReactor(int aID, String aName, String aNameRegional, int aTier) +/* 20: */ { +/* 21:15 */ super(aID, aName, aNameRegional, aTier, "Requires Fluid Heavy Naquadah", new ITexture[0]); +/* 22: */ } +/* 23: */ +/* 24: */ public GT_MetaTileEntity_FluidNaquadahReactor(String aName, int aTier, String aDescription, ITexture[][][] aTextures) +/* 25: */ { +/* 26:19 */ super(aName, aTier, aDescription, aTextures); +/* 27: */ } +/* 28: */ +/* 29: */ @Override +public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) +/* 30: */ { +/* 31:24 */ return new GT_MetaTileEntity_FluidNaquadahReactor(this.mName, this.mTier, this.mDescription, this.mTextures); +/* 32: */ } +/* 33: */ +/* 34: */ @Override +public GT_Recipe.GT_Recipe_Map getRecipes() +/* 35: */ { +/* 36:29 */ return GT_Recipe.GT_Recipe_Map.sFluidNaquadahReactorFuels; +/* 37: */ } +/* 38: */ +/* 39: */ @Override +public int getCapacity() +/* 40: */ { +/* 41:34 */ return 16000; +/* 42: */ } +/* 43: */ +/* 44: */ @Override +public int getEfficiency() +/* 45: */ { +/* 46:39 */ return 100; +/* 47: */ } +/* 48: */ +/* 49: */ @Override +public ITexture[] getFront(byte aColor) +/* 50: */ { +/* 51:42 */ return new ITexture[] { super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_FRONT) }; +/* 52: */ } +/* 53: */ +/* 54: */ @Override +public ITexture[] getBack(byte aColor) +/* 55: */ { +/* 56:43 */ return new ITexture[] { super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_BACK) }; +/* 57: */ } +/* 58: */ +/* 59: */ @Override +public ITexture[] getBottom(byte aColor) +/* 60: */ { +/* 61:44 */ return new ITexture[] { super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_BOTTOM) }; +/* 62: */ } +/* 63: */ +/* 64: */ @Override +public ITexture[] getTop(byte aColor) +/* 65: */ { +/* 66:45 */ return new ITexture[] { super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_TOP) }; +/* 67: */ } +/* 68: */ +/* 69: */ @Override +public ITexture[] getSides(byte aColor) +/* 70: */ { +/* 71:46 */ return new ITexture[] { super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE) }; +/* 72: */ } +/* 73: */ +/* 74: */ @Override +public ITexture[] getFrontActive(byte aColor) +/* 75: */ { +/* 76:47 */ return new ITexture[] { super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_FRONT_ACTIVE) }; +/* 77: */ } +/* 78: */ +/* 79: */ @Override +public ITexture[] getBackActive(byte aColor) +/* 80: */ { +/* 81:48 */ return new ITexture[] { super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_BACK_ACTIVE) }; +/* 82: */ } +/* 83: */ +/* 84: */ @Override +public ITexture[] getBottomActive(byte aColor) +/* 85: */ { +/* 86:49 */ return new ITexture[] { super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_BOTTOM_ACTIVE) }; +/* 87: */ } +/* 88: */ +/* 89: */ @Override +public ITexture[] getTopActive(byte aColor) +/* 90: */ { +/* 91:50 */ return new ITexture[] { super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_TOP_ACTIVE) }; +/* 92: */ } +/* 93: */ +/* 94: */ @Override +public ITexture[] getSidesActive(byte aColor) +/* 95: */ { +/* 96:51 */ return new ITexture[] { super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE) }; +/* 97: */ } +/* 98: */ } + + +/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar + * Qualified Name: gregtech.common.tileentities.generators.GT_MetaTileEntity_FluidNaquadahReactor + * JD-Core Version: 0.7.0.1 + */ \ No newline at end of file diff --git a/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java b/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java new file mode 100644 index 0000000..f8683a0 --- /dev/null +++ b/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java @@ -0,0 +1,131 @@ +/* 1: */ package gregtech.common.tileentities.generators; +/* 2: */ +/* 3: */ import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.Textures; +/* 4: */ import gregtech.api.interfaces.ITexture; +/* 5: */ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +/* 6: */ import gregtech.api.metatileentity.MetaTileEntity; +/* 7: */ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; +/* 8: */ import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +/* 10: */ +/* 11: */ public class GT_MetaTileEntity_GasTurbine +/* 12: */ extends GT_MetaTileEntity_BasicGenerator +/* 13: */ { + + public int mEfficiency; +/* 14: */ @Override +public boolean isOutputFacing(byte aSide) +/* 15: */ { +/* 16:12 */ return aSide == getBaseMetaTileEntity().getFrontFacing(); +/* 17: */ } +/* 18: */ +/* 19: */ public GT_MetaTileEntity_GasTurbine(int aID, String aName, String aNameRegional, int aTier) +/* 20: */ { +/* 21:15 */ super(aID, aName, aNameRegional, aTier, "Requires flammable Gasses", new ITexture[0]); +onConfigLoad(); +/* 22: */ } +/* 23: */ +/* 24: */ public GT_MetaTileEntity_GasTurbine(String aName, int aTier, String aDescription, ITexture[][][] aTextures) +/* 25: */ { +/* 26:19 */ super(aName, aTier, aDescription, aTextures); +onConfigLoad(); +/* 27: */ } +/* 28: */ +/* 29: */ @Override +public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) +/* 30: */ { +/* 31:24 */ return new GT_MetaTileEntity_GasTurbine(this.mName, this.mTier, this.mDescription, this.mTextures); +/* 32: */ } +/* 33: */ +/* 34: */ @Override +public GT_Recipe.GT_Recipe_Map getRecipes() +/* 35: */ { +/* 36:29 */ return GT_Recipe.GT_Recipe_Map.sTurbineFuels; +/* 37: */ } +/* 38: */ +/* 39: */ @Override +public int getCapacity() +/* 40: */ { +/* 41:34 */ return 16000; +/* 42: */ } + +public void onConfigLoad() +/* 39: */ { + this.mEfficiency =GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "GasTurbine.efficiency.tier."+this.mTier, (100 - this.mTier * 10)); +} + +/* 43: */ +/* 44: */ @Override +public int getEfficiency() +/* 45: */ { +/* 46:39 */ return this.mEfficiency; +/* 47: */ } +/* 48: */ +/* 49: */ @Override +public ITexture[] getFront(byte aColor) +/* 50: */ { +/* 51:42 */ return new ITexture[] { super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_FRONT), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; +/* 52: */ } +/* 53: */ +/* 54: */ @Override +public ITexture[] getBack(byte aColor) +/* 55: */ { +/* 56:43 */ return new ITexture[] { super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_BACK) }; +/* 57: */ } +/* 58: */ +/* 59: */ @Override +public ITexture[] getBottom(byte aColor) +/* 60: */ { +/* 61:44 */ return new ITexture[] { super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_BOTTOM) }; +/* 62: */ } +/* 63: */ +/* 64: */ @Override +public ITexture[] getTop(byte aColor) +/* 65: */ { +/* 66:45 */ return new ITexture[] { super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_TOP) }; +/* 67: */ } +/* 68: */ +/* 69: */ @Override +public ITexture[] getSides(byte aColor) +/* 70: */ { +/* 71:46 */ return new ITexture[] { super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_SIDE) }; +/* 72: */ } +/* 73: */ +/* 74: */ @Override +public ITexture[] getFrontActive(byte aColor) +/* 75: */ { +/* 76:47 */ return new ITexture[] { super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_FRONT_ACTIVE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; +/* 77: */ } +/* 78: */ +/* 79: */ @Override +public ITexture[] getBackActive(byte aColor) +/* 80: */ { +/* 81:48 */ return new ITexture[] { super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_BACK_ACTIVE) }; +/* 82: */ } +/* 83: */ +/* 84: */ @Override +public ITexture[] getBottomActive(byte aColor) +/* 85: */ { +/* 86:49 */ return new ITexture[] { super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_BOTTOM_ACTIVE) }; +/* 87: */ } +/* 88: */ +/* 89: */ @Override +public ITexture[] getTopActive(byte aColor) +/* 90: */ { +/* 91:50 */ return new ITexture[] { super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_TOP_ACTIVE) }; +/* 92: */ } +/* 93: */ +/* 94: */ @Override +public ITexture[] getSidesActive(byte aColor) +/* 95: */ { +/* 96:51 */ return new ITexture[] { super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_SIDE_ACTIVE) }; +/* 97: */ } +/* 98: */ } + + +/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar + * Qualified Name: gregtech.common.tileentities.generators.GT_MetaTileEntity_GasTurbine + * JD-Core Version: 0.7.0.1 + */ \ No newline at end of file diff --git a/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java b/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java new file mode 100644 index 0000000..342b2ce --- /dev/null +++ b/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java @@ -0,0 +1,125 @@ +package gregtech.common.tileentities.generators; + +/* 3: */ import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.Textures; +/* 4: */ import gregtech.api.interfaces.ITexture; +/* 5: */ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +/* 6: */ import gregtech.api.metatileentity.MetaTileEntity; +/* 7: */ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; +/* 8: */ import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +/* 10: */ +/* 11: */ public class GT_MetaTileEntity_MagicEnergyConverter +/* 12: */ extends GT_MetaTileEntity_BasicGenerator +/* 13: */ { + + public int mEfficiency; +/* 14: */ @Override +public boolean isOutputFacing(byte aSide) +/* 15: */ { +/* 16:12 */ return aSide == getBaseMetaTileEntity().getFrontFacing(); +/* 17: */ } +/* 18: */ +/* 19: */ public GT_MetaTileEntity_MagicEnergyConverter(int aID, String aName, String aNameRegional, int aTier) +/* 20: */ { +/* 21:15 */ super(aID, aName, aNameRegional, aTier, "Put your strange stuff in here", new ITexture[0]); +onConfigLoad(); +/* 22: */ } +/* 23: */ +/* 24: */ public GT_MetaTileEntity_MagicEnergyConverter(String aName, int aTier, String aDescription, ITexture[][][] aTextures) +/* 25: */ { +/* 26:19 */ super(aName, aTier, aDescription, aTextures); +onConfigLoad(); +/* 27: */ } +/* 28: */ +/* 29: */ @Override +public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) +/* 30: */ { +/* 31:24 */ return new GT_MetaTileEntity_MagicEnergyConverter(this.mName, this.mTier, this.mDescription, this.mTextures); +/* 32: */ } +/* 33: */ +/* 34: */ @Override +public GT_Recipe.GT_Recipe_Map getRecipes() +/* 35: */ { +/* 36:29 */ return GT_Recipe.GT_Recipe_Map.sMagicFuels; +/* 37: */ } +/* 38: */ +/* 39: */ @Override +public int getCapacity() +/* 40: */ { +/* 41:34 */ return 16000; +/* 42: */ } + +public void onConfigLoad() +/* 39: */ { + this.mEfficiency =GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MagicEnergyConverter.efficiency.tier."+this.mTier, 100-this.mTier*10); +} + +/* 43: */ +/* 44: */ @Override +public int getEfficiency() +/* 45: */ { +/* 46:39 */ return this.mEfficiency; +/* 47: */ } +/* 48: */ +/* 49: */ @Override +public ITexture[] getFront(byte aColor) +/* 50: */ { +/* 51:42 */ return new ITexture[] { super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; +/* 52: */ } +/* 53: */ +/* 54: */ @Override +public ITexture[] getBack(byte aColor) +/* 55: */ { +/* 56:43 */ return new ITexture[] { super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT) }; +/* 57: */ } +/* 58: */ +/* 59: */ @Override +public ITexture[] getBottom(byte aColor) +/* 60: */ { +/* 61:44 */ return new ITexture[] { super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC) }; +/* 62: */ } +/* 63: */ +/* 64: */ @Override +public ITexture[] getTop(byte aColor) +/* 65: */ { +/* 66:45 */ return new ITexture[] { super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC) }; +/* 67: */ } +/* 68: */ +/* 69: */ @Override +public ITexture[] getSides(byte aColor) +/* 70: */ { +/* 71:46 */ return new ITexture[] { super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC) }; +/* 72: */ } +/* 73: */ +/* 74: */ @Override +public ITexture[] getFrontActive(byte aColor) +/* 75: */ { +/* 76:47 */ return new ITexture[] { super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; +/* 77: */ } +/* 78: */ +/* 79: */ @Override +public ITexture[] getBackActive(byte aColor) +/* 80: */ { +/* 81:48 */ return new ITexture[] { super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_ACTIVE) }; +/* 82: */ } +/* 83: */ +/* 84: */ @Override +public ITexture[] getBottomActive(byte aColor) +/* 85: */ { +/* 86:49 */ return new ITexture[] { super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE) }; +/* 87: */ } +/* 88: */ +/* 89: */ @Override +public ITexture[] getTopActive(byte aColor) +/* 90: */ { +/* 91:50 */ return new ITexture[] { super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE) }; +/* 92: */ } +/* 93: */ +/* 94: */ @Override +public ITexture[] getSidesActive(byte aColor) +/* 95: */ { +/* 96:51 */ return new ITexture[] { super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE) }; +/* 97: */ } +/* 98: */ } \ No newline at end of file diff --git a/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java b/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java new file mode 100644 index 0000000..9718dc1 --- /dev/null +++ b/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java @@ -0,0 +1,264 @@ +package gregtech.common.tileentities.generators; + +/* 3: */ import java.util.ArrayList; + +import cpw.mods.fml.common.Loader; +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.Textures; +/* 4: */ import gregtech.api.interfaces.ITexture; +/* 5: */ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +/* 6: */ import gregtech.api.metatileentity.MetaTileEntity; +/* 7: */ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; +/* 8: */ import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import net.minecraft.block.Block; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.entity.item.EntityEnderCrystal; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemEnchantedBook; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.AxisAlignedBB; +/* 10: */ +/* 11: */ public class GT_MetaTileEntity_MagicalEnergyAbsorber +/* 12: */ extends GT_MetaTileEntity_BasicGenerator +/* 13: */ { + + public int mEfficiency; + public static boolean sAllowMultipleEggs = true; + public static GT_MetaTileEntity_MagicalEnergyAbsorber mActiveSiphon = null; + public static int sEnergyPerEnderCrystal = 32; + public static int sEnergyFromVis = 12800; + public static final ArrayList sUsedDragonCrystalList = new ArrayList(); + public EntityEnderCrystal mTargetedCrystal; + public static int sDragonEggEnergyPerTick = 128; + public static boolean isThaumcraftLoaded; + +/* 14: */ @Override +public boolean isOutputFacing(byte aSide) +/* 15: */ { +/* 16:12 */ return aSide == getBaseMetaTileEntity().getFrontFacing(); +/* 17: */ } +/* 18: */ +/* 19: */ public GT_MetaTileEntity_MagicalEnergyAbsorber(int aID, String aName, String aNameRegional, int aTier) +/* 20: */ { +/* 21:15 */ super(aID, aName, aNameRegional, aTier, "Feasts on magic close to it", new ITexture[0]); + onConfigLoad(); +/* 22: */ } +/* 23: */ +/* 24: */ public GT_MetaTileEntity_MagicalEnergyAbsorber(String aName, int aTier, String aDescription, ITexture[][][] aTextures) +/* 25: */ { +/* 26:19 */ super(aName, aTier, aDescription, aTextures); + onConfigLoad(); +/* 27: */ } +/* 28: */ +/* 29: */ @Override +public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) +/* 30: */ { +/* 31:24 */ return new GT_MetaTileEntity_MagicalEnergyAbsorber(this.mName, this.mTier, this.mDescription, this.mTextures); +/* 32: */ } +/* 33: */ +/* 34: */ @Override +public GT_Recipe.GT_Recipe_Map getRecipes() +/* 35: */ { +/* 36:29 */ return GT_Recipe.GT_Recipe_Map.sMagicFuels; +/* 37: */ } +/* 38: */ +/* 39: */ @Override +public int getCapacity() +/* 40: */ { +/* 41:34 */ return 16000; +/* 42: */ } + + public void onConfigLoad() +/* 39: */ { + this.mEfficiency =GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MagicEnergyAbsorber.efficiency.tier."+this.mTier, 100-this.mTier*10); + GT_MetaTileEntity_MagicalEnergyAbsorber.sAllowMultipleEggs = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MagicEnergyAbsorber.AllowMultipleEggs", false); + GT_MetaTileEntity_MagicalEnergyAbsorber.sEnergyPerEnderCrystal = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MagicEnergyAbsorber.EnergyPerTick.EnderCrystal", 32); + GT_MetaTileEntity_MagicalEnergyAbsorber.sEnergyFromVis = (GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MagicEnergyAbsorber.EnergyPerVisDivisor", 2500)*10); + GT_MetaTileEntity_MagicalEnergyAbsorber.sDragonEggEnergyPerTick = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MagicEnergyAbsorber.EnergyPerTick", 2048); + GT_MetaTileEntity_MagicalEnergyAbsorber.isThaumcraftLoaded = Loader.isModLoaded("Thaumcraft"); + } + + @SuppressWarnings("unchecked") + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.getUniversalEnergyStored() < maxEUOutput() + aBaseMetaTileEntity.getEUCapacity()) { + //Dragon Egg + if(hasEgg()&&aTick%10==0){ + getBaseMetaTileEntity().increaseStoredEnergyUnits(sDragonEggEnergyPerTick*getEfficiency()*10, false); + if ((mActiveSiphon != this) && (!sAllowMultipleEggs)) { + if ((mActiveSiphon == null) || (mActiveSiphon.getBaseMetaTileEntity() == null) || (mActiveSiphon.getBaseMetaTileEntity().isInvalidTileEntity()) || (!mActiveSiphon.hasEgg())) { + mActiveSiphon = this; + } else { + getBaseMetaTileEntity().doExplosion(Integer.MAX_VALUE); + } + } + } + //Energyzed node + //EnderCrystal + + if (sEnergyPerEnderCrystal > 0) { + if (this.mTargetedCrystal == null) + { + ArrayList tList = (ArrayList)getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(EntityEnderCrystal.class, AxisAlignedBB.getBoundingBox(getBaseMetaTileEntity().getXCoord() - 64, getBaseMetaTileEntity().getYCoord() - 64, getBaseMetaTileEntity().getZCoord() - 64, getBaseMetaTileEntity().getXCoord() + 64, getBaseMetaTileEntity().getYCoord() + 64, getBaseMetaTileEntity().getZCoord() + 64)); + if ((tList != null) && (!tList.isEmpty())) + { + tList.removeAll(sUsedDragonCrystalList); + if (tList.size() > 0) + { + this.mTargetedCrystal = (tList.get(0)); + if (this.mTargetedCrystal != null) { + sUsedDragonCrystalList.add(this.mTargetedCrystal); + } + } + } + } + else if (this.mTargetedCrystal.isEntityAlive()) + { + getBaseMetaTileEntity().increaseStoredEnergyUnits(sEnergyPerEnderCrystal * 10, false); + } + else + { + sUsedDragonCrystalList.remove(this.mTargetedCrystal); + this.mTargetedCrystal = null; + } + } + + //Absorb entchantments + + try + { + if ((this.mInventory[0] != null) && (this.mInventory[1] == null)) + { + if ((this.mInventory[0].isItemEnchanted()) && (this.mInventory[0].getItem().getItemEnchantability() > 0)) + { + NBTTagList tEnchantments = this.mInventory[0].getEnchantmentTagList(); + if (tEnchantments != null) + { + for (int i = 0; i < tEnchantments.tagCount(); i++) + { + short tID = tEnchantments.getCompoundTagAt(i).getShort("id"); + short tLevel = tEnchantments.getCompoundTagAt(i).getShort("lvl"); + if ((tID > -1) && (tID < Enchantment.enchantmentsList.length)) + { + Enchantment tEnchantment = Enchantment.enchantmentsList[tID]; + if (tEnchantment != null) { + getBaseMetaTileEntity().increaseStoredEnergyUnits(1000000 * tLevel / (tEnchantment.getMaxLevel() * tEnchantment.getWeight()), true); + } + } + } + this.mInventory[0].stackTagCompound.removeTag("ench"); + } + } + else if ((this.mInventory[0].getItem() instanceof ItemEnchantedBook)) + { + NBTTagList tEnchantments = ((ItemEnchantedBook)this.mInventory[0].getItem()).func_92110_g(this.mInventory[0]); + if (tEnchantments != null) + { + for (int i = 0; i < tEnchantments.tagCount(); i++) + { + short tID = tEnchantments.getCompoundTagAt(i).getShort("id"); + short tLevel = tEnchantments.getCompoundTagAt(i).getShort("lvl"); + if ((tID > -1) && (tID < Enchantment.enchantmentsBookList.length)) + { + Enchantment tEnchantment = Enchantment.enchantmentsBookList[tID]; + if (tEnchantment != null) { + getBaseMetaTileEntity().increaseStoredEnergyUnits(1000000 * tLevel / (tEnchantment.getMaxLevel() * tEnchantment.getWeight()), true); + } + } + } + this.mInventory[0] = new ItemStack(Items.book, 1); + } + } + this.mInventory[1] = this.mInventory[0]; + this.mInventory[0] = null; + } + } + catch (Throwable e){} + } + } + + @Override + public void inValidate() + { + if (mActiveSiphon == this) { + mActiveSiphon = null; + } + } + + public boolean hasEgg() + { + Block above = getBaseMetaTileEntity().getBlockOffset(0, 1, 0); + if(above==null||Blocks.air==above){return false;} + return Blocks.dragon_egg == above || above.getUnlocalizedName().equals("tile.dragonEgg"); + } +/* 43: */ +/* 44: */ @Override +public int getEfficiency() +/* 45: */ { +/* 46:39 */ return this.mEfficiency; +/* 47: */ } +/* 48: */ +/* 49: */ @Override +public ITexture[] getFront(byte aColor) +/* 50: */ { +/* 51:42 */ return new ITexture[] { super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; +/* 52: */ } +/* 53: */ +/* 54: */ @Override +public ITexture[] getBack(byte aColor) +/* 55: */ { +/* 56:43 */ return new ITexture[] { super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT) }; +/* 57: */ } +/* 58: */ +/* 59: */ @Override +public ITexture[] getBottom(byte aColor) +/* 60: */ { +/* 61:44 */ return new ITexture[] { super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC) }; +/* 62: */ } +/* 63: */ +/* 64: */ @Override +public ITexture[] getTop(byte aColor) +/* 65: */ { +/* 66:45 */ return new ITexture[] { super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_DRAGONEGG) }; +/* 67: */ } +/* 68: */ +/* 69: */ @Override +public ITexture[] getSides(byte aColor) +/* 70: */ { +/* 71:46 */ return new ITexture[] { super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC) }; +/* 72: */ } +/* 73: */ +/* 74: */ @Override +public ITexture[] getFrontActive(byte aColor) +/* 75: */ { +/* 76:47 */ return new ITexture[] { super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; +/* 77: */ } +/* 78: */ +/* 79: */ @Override +public ITexture[] getBackActive(byte aColor) +/* 80: */ { +/* 81:48 */ return new ITexture[] { super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_ACTIVE) }; +/* 82: */ } +/* 83: */ +/* 84: */ @Override +public ITexture[] getBottomActive(byte aColor) +/* 85: */ { +/* 86:49 */ return new ITexture[] { super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE) }; +/* 87: */ } +/* 88: */ +/* 89: */ @Override +public ITexture[] getTopActive(byte aColor) +/* 90: */ { +/* 91:50 */ return new ITexture[] { super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_DRAGONEGG) }; +/* 92: */ } +/* 93: */ +/* 94: */ @Override +public ITexture[] getSidesActive(byte aColor) +/* 95: */ { +/* 96:51 */ return new ITexture[] { super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE) }; +/* 97: */ } +/* 98: */ } \ No newline at end of file diff --git a/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java b/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java new file mode 100644 index 0000000..26cd32f --- /dev/null +++ b/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java @@ -0,0 +1,125 @@ +package gregtech.common.tileentities.generators; + +/* 3: */ import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.Textures; +/* 4: */ import gregtech.api.interfaces.ITexture; +/* 5: */ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +/* 6: */ import gregtech.api.metatileentity.MetaTileEntity; +/* 7: */ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; +/* 8: */ import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +/* 10: */ +/* 11: */ public class GT_MetaTileEntity_PlasmaGenerator +/* 12: */ extends GT_MetaTileEntity_BasicGenerator +/* 13: */ { + + public int mEfficiency; +/* 14: */ @Override +public boolean isOutputFacing(byte aSide) +/* 15: */ { +/* 16:12 */ return aSide == getBaseMetaTileEntity().getFrontFacing(); +/* 17: */ } +/* 18: */ +/* 19: */ public GT_MetaTileEntity_PlasmaGenerator(int aID, String aName, String aNameRegional, int aTier) +/* 20: */ { +/* 21:15 */ super(aID, aName, aNameRegional, aTier, "Plasma into energy", new ITexture[0]); +onConfigLoad(); +/* 22: */ } +/* 23: */ +/* 24: */ public GT_MetaTileEntity_PlasmaGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) +/* 25: */ { +/* 26:19 */ super(aName, aTier, aDescription, aTextures); +onConfigLoad(); +/* 27: */ } +/* 28: */ +/* 29: */ @Override +public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) +/* 30: */ { +/* 31:24 */ return new GT_MetaTileEntity_PlasmaGenerator(this.mName, this.mTier, this.mDescription, this.mTextures); +/* 32: */ } +/* 33: */ +/* 34: */ @Override +public GT_Recipe.GT_Recipe_Map getRecipes() +/* 35: */ { +/* 36:29 */ return GT_Recipe.GT_Recipe_Map.sPlasmaFuels; +/* 37: */ } +/* 38: */ +/* 39: */ @Override +public int getCapacity() +/* 40: */ { +/* 41:34 */ return 16000; +/* 42: */ } + +public void onConfigLoad() +/* 39: */ { + this.mEfficiency =GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "PlasmaGenerator.efficiency.tier."+this.mTier, (10 + (this.mTier * 10))); +} + +/* 43: */ +/* 44: */ @Override +public int getEfficiency() +/* 45: */ { +/* 46:39 */ return this.mEfficiency; +/* 47: */ } +/* 48: */ +/* 49: */ @Override +public ITexture[] getFront(byte aColor) +/* 50: */ { +/* 51:42 */ return new ITexture[] { super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; +/* 52: */ } +/* 53: */ +/* 54: */ @Override +public ITexture[] getBack(byte aColor) +/* 55: */ { +/* 56:43 */ return new ITexture[] { super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS) }; +/* 57: */ } +/* 58: */ +/* 59: */ @Override +public ITexture[] getBottom(byte aColor) +/* 60: */ { +/* 61:44 */ return new ITexture[] { super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS) }; +/* 62: */ } +/* 63: */ +/* 64: */ @Override +public ITexture[] getTop(byte aColor) +/* 65: */ { +/* 66:45 */ return new ITexture[] { super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS) }; +/* 67: */ } +/* 68: */ +/* 69: */ @Override +public ITexture[] getSides(byte aColor) +/* 70: */ { +/* 71:46 */ return new ITexture[] { super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS) }; +/* 72: */ } +/* 73: */ +/* 74: */ @Override +public ITexture[] getFrontActive(byte aColor) +/* 75: */ { +/* 76:47 */ return new ITexture[] { super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; +/* 77: */ } +/* 78: */ +/* 79: */ @Override +public ITexture[] getBackActive(byte aColor) +/* 80: */ { +/* 81:48 */ return new ITexture[] { super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW) }; +/* 82: */ } +/* 83: */ +/* 84: */ @Override +public ITexture[] getBottomActive(byte aColor) +/* 85: */ { +/* 86:49 */ return new ITexture[] { super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW) }; +/* 87: */ } +/* 88: */ +/* 89: */ @Override +public ITexture[] getTopActive(byte aColor) +/* 90: */ { +/* 91:50 */ return new ITexture[] { super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW) }; +/* 92: */ } +/* 93: */ +/* 94: */ @Override +public ITexture[] getSidesActive(byte aColor) +/* 95: */ { +/* 96:51 */ return new ITexture[] { super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW) }; +/* 97: */ } +/* 98: */ } \ No newline at end of file diff --git a/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor.java b/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor.java new file mode 100644 index 0000000..666c16f --- /dev/null +++ b/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SolidNaquadahReactor.java @@ -0,0 +1,119 @@ +/* 1: */ package gregtech.common.tileentities.generators; +/* 2: */ +/* 3: */ import gregtech.api.enums.Textures; +/* 4: */ import gregtech.api.interfaces.ITexture; +/* 5: */ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +/* 6: */ import gregtech.api.metatileentity.MetaTileEntity; +/* 7: */ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; +/* 8: */ import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +/* 10: */ +/* 11: */ public class GT_MetaTileEntity_SolidNaquadahReactor +/* 12: */ extends GT_MetaTileEntity_BasicGenerator +/* 13: */ { +/* 14: */ @Override +public boolean isOutputFacing(byte aSide) +/* 15: */ { +/* 16:12 */ return (aSide > 1) && (aSide != getBaseMetaTileEntity().getFrontFacing()) && (aSide != getBaseMetaTileEntity().getBackFacing()); +/* 17: */ } +/* 18: */ +/* 19: */ public GT_MetaTileEntity_SolidNaquadahReactor(int aID, String aName, String aNameRegional, int aTier) +/* 20: */ { +/* 21:15 */ super(aID, aName, aNameRegional, aTier, "Requires Enriched Naquadah Bolts", new ITexture[0]); +/* 22: */ } +/* 23: */ +/* 24: */ public GT_MetaTileEntity_SolidNaquadahReactor(String aName, int aTier, String aDescription, ITexture[][][] aTextures) +/* 25: */ { +/* 26:19 */ super(aName, aTier, aDescription, aTextures); +/* 27: */ } +/* 28: */ +/* 29: */ @Override +public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) +/* 30: */ { +/* 31:24 */ return new GT_MetaTileEntity_SolidNaquadahReactor(this.mName, this.mTier, this.mDescription, this.mTextures); +/* 32: */ } +/* 33: */ +/* 34: */ @Override +public GT_Recipe.GT_Recipe_Map getRecipes() +/* 35: */ { +/* 36:29 */ return GT_Recipe.GT_Recipe_Map.sSmallNaquadahReactorFuels; +/* 37: */ } +/* 38: */ +/* 39: */ @Override +public int getCapacity() +/* 40: */ { +/* 41:34 */ return 0; +/* 42: */ } +/* 43: */ +/* 44: */ @Override +public int getEfficiency() +/* 45: */ { +/* 46:39 */ return 80; +/* 47: */ } +/* 48: */ +/* 49: */ @Override +public ITexture[] getFront(byte aColor) +/* 50: */ { +/* 51:42 */ return new ITexture[] { super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT) }; +/* 52: */ } +/* 53: */ +/* 54: */ @Override +public ITexture[] getBack(byte aColor) +/* 55: */ { +/* 56:43 */ return new ITexture[] { super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BACK) }; +/* 57: */ } +/* 58: */ +/* 59: */ @Override +public ITexture[] getBottom(byte aColor) +/* 60: */ { +/* 61:44 */ return new ITexture[] { super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BOTTOM) }; +/* 62: */ } +/* 63: */ +/* 64: */ @Override +public ITexture[] getTop(byte aColor) +/* 65: */ { +/* 66:45 */ return new ITexture[] { super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP) }; +/* 67: */ } +/* 68: */ +/* 69: */ @Override +public ITexture[] getSides(byte aColor) +/* 70: */ { +/* 71:46 */ return new ITexture[] { super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_SIDE) }; +/* 72: */ } +/* 73: */ +/* 74: */ @Override +public ITexture[] getFrontActive(byte aColor) +/* 75: */ { +/* 76:47 */ return new ITexture[] { super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE) }; +/* 77: */ } +/* 78: */ +/* 79: */ @Override +public ITexture[] getBackActive(byte aColor) +/* 80: */ { +/* 81:48 */ return new ITexture[] { super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BACK_ACTIVE) }; +/* 82: */ } +/* 83: */ +/* 84: */ @Override +public ITexture[] getBottomActive(byte aColor) +/* 85: */ { +/* 86:49 */ return new ITexture[] { super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE) }; +/* 87: */ } +/* 88: */ +/* 89: */ @Override +public ITexture[] getTopActive(byte aColor) +/* 90: */ { +/* 91:50 */ return new ITexture[] { super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE) }; +/* 92: */ } +/* 93: */ +/* 94: */ @Override +public ITexture[] getSidesActive(byte aColor) +/* 95: */ { +/* 96:51 */ return new ITexture[] { super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE) }; +/* 97: */ } +/* 98: */ } + + +/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar + * Qualified Name: gregtech.common.tileentities.generators.GT_MetaTileEntity_SolidNaquadahReactor + * JD-Core Version: 0.7.0.1 + */ \ No newline at end of file diff --git a/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java b/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java new file mode 100644 index 0000000..45aaa61 --- /dev/null +++ b/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java @@ -0,0 +1,144 @@ +/* 1: */ package gregtech.common.tileentities.generators; +/* 2: */ +/* 3: */ import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.Textures; +/* 4: */ import gregtech.api.interfaces.ITexture; +/* 5: */ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +/* 6: */ import gregtech.api.metatileentity.MetaTileEntity; +/* 7: */ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; +/* 8: */ import gregtech.api.objects.GT_RenderedTexture; +/* 9: */ import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Recipe; +/* 11: */ import net.minecraftforge.fluids.FluidStack; +/* 12: */ +/* 13: */ public class GT_MetaTileEntity_SteamTurbine +/* 14: */ extends GT_MetaTileEntity_BasicGenerator +/* 15: */ { + + public int mEfficiency; +/* 16: */ @Override +public boolean isOutputFacing(byte aSide) +/* 17: */ { +/* 18:14 */ return aSide == getBaseMetaTileEntity().getFrontFacing(); +/* 19: */ } +/* 20: */ +/* 21: */ public GT_MetaTileEntity_SteamTurbine(int aID, String aName, String aNameRegional, int aTier) +/* 22: */ { +/* 23:17 */ super(aID, aName, aNameRegional, aTier, "Requires Steam to run", new ITexture[0]); +onConfigLoad(); +/* 24: */ } +/* 25: */ +/* 26: */ public GT_MetaTileEntity_SteamTurbine(String aName, int aTier, String aDescription, ITexture[][][] aTextures) +/* 27: */ { +/* 28:21 */ super(aName, aTier, aDescription, aTextures); +onConfigLoad(); +/* 29: */ } +/* 30: */ +/* 31: */ @Override +public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) +/* 32: */ { +/* 33:26 */ return new GT_MetaTileEntity_SteamTurbine(this.mName, this.mTier, this.mDescription, this.mTextures); +/* 34: */ } +/* 35: */ +/* 36: */ @Override +public GT_Recipe.GT_Recipe_Map getRecipes() +/* 37: */ { +/* 38:31 */ return null; +/* 39: */ } +/* 40: */ +/* 41: */ @Override +public int getCapacity() +/* 42: */ { +/* 43:36 */ return 24000 * this.mTier; +/* 44: */ } + +public void onConfigLoad() +/* 39: */ { + this.mEfficiency =GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SteamTurbine.efficiency.tier."+this.mTier, (200 / consumedFluidPerOperation(GT_ModHandler.getSteam(1L)))); +} +/* 45: */ +/* 46: */ @Override +public int getEfficiency() +/* 47: */ { +/* 48:41 */ return this.mEfficiency; +/* 49: */ } +/* 50: */ +/* 51: */ @Override +public int getFuelValue(FluidStack aLiquid) +/* 52: */ { +/* 53:46 */ return GT_ModHandler.isSteam(aLiquid) ? 1 : 0; +/* 54: */ } +/* 55: */ +/* 56: */ @Override +public int consumedFluidPerOperation(FluidStack aLiquid) +/* 57: */ { +/* 58:51 */ return 2 + this.mTier; +/* 59: */ } +/* 60: */ +/* 61: */ @Override +public ITexture[] getFront(byte aColor) +/* 62: */ { +/* 63:54 */ return new ITexture[] { super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_FRONT), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; +/* 64: */ } +/* 65: */ +/* 66: */ @Override +public ITexture[] getBack(byte aColor) +/* 67: */ { +/* 68:55 */ return new ITexture[] { super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_BACK) }; +/* 69: */ } +/* 70: */ +/* 71: */ @Override +public ITexture[] getBottom(byte aColor) +/* 72: */ { +/* 73:56 */ return new ITexture[] { super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_BOTTOM) }; +/* 74: */ } +/* 75: */ +/* 76: */ @Override +public ITexture[] getTop(byte aColor) +/* 77: */ { +/* 78:57 */ return new ITexture[] { super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_TOP) }; +/* 79: */ } +/* 80: */ +/* 81: */ @Override +public ITexture[] getSides(byte aColor) +/* 82: */ { +/* 83:58 */ return new ITexture[] { super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_SIDE) }; +/* 84: */ } +/* 85: */ +/* 86: */ @Override +public ITexture[] getFrontActive(byte aColor) +/* 87: */ { +/* 88:59 */ return new ITexture[] { super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_FRONT_ACTIVE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; +/* 89: */ } +/* 90: */ +/* 91: */ @Override +public ITexture[] getBackActive(byte aColor) +/* 92: */ { +/* 93:60 */ return new ITexture[] { super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_BACK_ACTIVE) }; +/* 94: */ } +/* 95: */ +/* 96: */ @Override +public ITexture[] getBottomActive(byte aColor) +/* 97: */ { +/* 98:61 */ return new ITexture[] { super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_BOTTOM_ACTIVE) }; +/* 99: */ } +/* :0: */ +/* :1: */ @Override +public ITexture[] getTopActive(byte aColor) +/* :2: */ { +/* :3:62 */ return new ITexture[] { super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_TOP_ACTIVE) }; +/* :4: */ } +/* :5: */ +/* :6: */ @Override +public ITexture[] getSidesActive(byte aColor) +/* :7: */ { +/* :8:63 */ return new ITexture[] { super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_SIDE_ACTIVE) }; +/* :9: */ } +/* ;0: */ } + + +/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar + * Qualified Name: gregtech.common.tileentities.generators.GT_MetaTileEntity_SteamTurbine + * JD-Core Version: 0.7.0.1 + */ \ No newline at end of file -- cgit v1.2.3