diff options
| author | Draknyte1 <Draknyte1@hotmail.com> | 2016-06-19 14:53:32 +1000 |
|---|---|---|
| committer | Draknyte1 <Draknyte1@hotmail.com> | 2016-06-19 14:53:32 +1000 |
| commit | d4f11459f2e78e954a4c060c92861614c114d1cb (patch) | |
| tree | a9d22e4f658e25163ae0fdbe4a1e3395da9efac9 /src/Java/miscutil/gregtech/common/tileentities/generators | |
| parent | 2615992e7d0d4ed3ac205800be71c831029b2dc5 (diff) | |
| download | GT5-Unofficial-d4f11459f2e78e954a4c060c92861614c114d1cb.tar.gz GT5-Unofficial-d4f11459f2e78e954a4c060c92861614c114d1cb.tar.bz2 GT5-Unofficial-d4f11459f2e78e954a4c060c92861614c114d1cb.zip | |
+More classes stolen from GT to implement my own items on a metaitem.
+Added LuV -> Max Voltage Machine components.
+Added Rocket Engines, High tier diesel generators.
+Added new textures for everything.
+Added BedLocator_Base.java - Debug item for testing and NBT data storage.
+Added Machine_Charger.java - Another Debug machine for testing NBT value manipulation.
Diffstat (limited to 'src/Java/miscutil/gregtech/common/tileentities/generators')
| -rw-r--r-- | src/Java/miscutil/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/src/Java/miscutil/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java b/src/Java/miscutil/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java new file mode 100644 index 0000000000..ecf292392a --- /dev/null +++ b/src/Java/miscutil/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java @@ -0,0 +1,119 @@ +package miscutil.gregtech.common.tileentities.generators; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Recipe; +import miscutil.gregtech.api.metatileentity.implementations.base.GregtechRocketFuelGeneratorBase; +import net.minecraft.item.ItemStack; +import cpw.mods.fml.common.registry.GameRegistry; + +public class GregtechMetaTileEntityRocketFuelGenerator + extends GregtechRocketFuelGeneratorBase { + + public int mEfficiency; + + public GregtechMetaTileEntityRocketFuelGenerator(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, "Requires liquid Fuel", new ITexture[0]); + onConfigLoad(); + } + + public GregtechMetaTileEntityRocketFuelGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + onConfigLoad(); + } + + @Override + public boolean isOutputFacing(byte aSide) { + return aSide == getBaseMetaTileEntity().getFrontFacing(); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GregtechMetaTileEntityRocketFuelGenerator(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override + public GT_Recipe.GT_Recipe_Map getRecipes() { + return GT_Recipe.GT_Recipe_Map.sDieselFuels; + } + + @Override + public int getCapacity() { + return 32000; + } + + public void onConfigLoad() { + this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "RocketEngine.efficiency.tier." + this.mTier, (100 - this.mTier * 8)); + } + + @Override + public int getEfficiency() { + return this.mEfficiency; + } + + @Override + public int getFuelValue(ItemStack aStack) { + int rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack)); + if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) { + rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3); + } + return rValue; + } + + @Override + public ITexture[] getFront(byte aColor) { + return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]}; + } + + @Override + public ITexture[] getBack(byte aColor) { + return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK)}; + } + + @Override + public ITexture[] getBottom(byte aColor) { + return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM)}; + } + + @Override + public ITexture[] getTop(byte aColor) { + return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP)}; + } + + @Override + public ITexture[] getSides(byte aColor) { + return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE)}; + } + + @Override + public ITexture[] getFrontActive(byte aColor) { + return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT_ACTIVE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]}; + } + + @Override + public ITexture[] getBackActive(byte aColor) { + return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK_ACTIVE)}; + } + + @Override + public ITexture[] getBottomActive(byte aColor) { + return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE)}; + } + + @Override + public ITexture[] getTopActive(byte aColor) { + return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE)}; + } + + @Override + public ITexture[] getSidesActive(byte aColor) { + return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE)}; + } +} |
