aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java5
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedWorkbench.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_AdvancedWorkbench.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java139
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java66
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java10
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechWorkbenches.java29
7 files changed, 243 insertions, 14 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
index de0a72f484..346b239932 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
@@ -125,7 +125,10 @@ public enum GregtechItemList implements GregtechItemContainer {
Industrial_MultiTank, Industrial_MultiTankDense, Casing_MultitankExterior,
//Gt4 Workbenches
- GT4_Workbench_Bronze, GT4_Workbench_Advanced;
+ GT4_Workbench_Bronze, GT4_Workbench_Advanced,
+
+ //Geothermal Engines
+ Geothermal_Engine_EV, Geothermal_Engine_IV, Geothermal_Engine_LuV;
public static final GregtechItemList[]
DYE_ONLY_ITEMS = {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedWorkbench.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedWorkbench.java
index 47c8aedb98..c5bfc4ac7b 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedWorkbench.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedWorkbench.java
@@ -1,19 +1,19 @@
package gtPlusPlus.xmod.gregtech.api.gui;
-import gregtech.api.gui.GT_ContainerMetaTile_Machine;
import gregtech.api.gui.GT_Slot_Holo;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.slots.SlotGtTool;
import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.xmod.gregtech.api.gui.dev.GT_ContainerMetaTile_MachineEx;
import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_AdvancedCraftingTable;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
-public class CONTAINER_AdvancedWorkbench extends GT_ContainerMetaTile_Machine {
+public class CONTAINER_AdvancedWorkbench extends GT_ContainerMetaTile_MachineEx {
public CONTAINER_AdvancedWorkbench(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
super(aInventoryPlayer, aTileEntity);
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_AdvancedWorkbench.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_AdvancedWorkbench.java
index 7da9238bd5..c52d50d674 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_AdvancedWorkbench.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_AdvancedWorkbench.java
@@ -1,12 +1,12 @@
package gtPlusPlus.xmod.gregtech.api.gui;
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.xmod.gregtech.api.gui.dev.GT_GUIContainerMetaTile_MachineEx;
import net.minecraft.entity.player.InventoryPlayer;
public class GUI_AdvancedWorkbench
-extends GT_GUIContainerMetaTile_Machine
+extends GT_GUIContainerMetaTile_MachineEx
{
public GUI_AdvancedWorkbench(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity)
{
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java
new file mode 100644
index 0000000000..263254c751
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java
@@ -0,0 +1,139 @@
+package gtPlusPlus.xmod.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.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import cpw.mods.fml.common.registry.GameRegistry;
+
+public class GregtechMetaTileEntityGeothermalGenerator
+extends GT_MetaTileEntity_BasicGenerator
+{
+
+ public int mEfficiency;
+
+ public GregtechMetaTileEntityGeothermalGenerator(int aID, String aName, String aNameRegional, int aTier) {
+ super(aID, aName, aNameRegional, aTier, "Requires Pahoehoe Lava or Normal Lava as Fuel", new ITexture[0]);
+ onConfigLoad();
+ }
+
+ public GregtechMetaTileEntityGeothermalGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ super(aName, aTier, aDescription, aTextures);
+ onConfigLoad();
+ }
+
+ @Override
+ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
+ if (aBaseMetaTileEntity.isClientSide()){
+ return true;
+ }
+ aBaseMetaTileEntity.openGUI(aPlayer);
+ return true;
+ }
+
+ @Override
+ public int getCapacity() {
+ //return MathUtils.roundToClosestMultiple(32000*(this.mTier/2), 25000);
+ return 5000*this.mTier;
+ }
+
+ public void onConfigLoad() {
+ this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "ThermalGenerator.efficiency.tier." + this.mTier, (100 - this.mTier * 7));
+ }
+
+ @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 boolean isOutputFacing(byte aSide) {
+ return aSide == getBaseMetaTileEntity().getFrontFacing();
+ }
+
+ @Override
+ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntityGeothermalGenerator(this.mName, this.mTier, this.mDescription, this.mTextures);
+ }
+
+ @Override
+ public ITexture[] getFront(byte aColor) {
+ return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE), 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), new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP)};
+ }
+
+ @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_SIDE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER)};
+ }
+
+ @Override
+ public ITexture[] getSides(byte aColor) {
+ return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT)};
+ }
+
+ @Override
+ public ITexture[] getFrontActive(byte aColor) {
+ return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_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), new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP_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_SIDE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE)};
+ }
+
+ @Override
+ public ITexture[] getSidesActive(byte aColor) {
+ return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT_ACTIVE)};
+ }
+
+
+ @Override
+ public String[] getDescription()
+ {
+ return new String[] {"Generates power from Lava/Pahoehoe at " + getEfficiency() + "% Efficiency per tick"};
+ }
+
+ @Override
+ public GT_Recipe_Map getRecipes()
+ {
+ return GT_Recipe_Map.sHotFuels;
+ }
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java
new file mode 100644
index 0000000000..961abedc8d
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java
@@ -0,0 +1,66 @@
+package gtPlusPlus.xmod.gregtech.registration.gregtech;
+
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.core.lib.LoadedMods;
+import gtPlusPlus.core.recipe.RECIPE_CONSTANTS;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
+import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes;
+import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials;
+import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntityGeothermalGenerator;
+import net.minecraft.item.ItemStack;
+
+public class GregtechGeothermalThermalGenerator {
+
+ public static void run()
+ {
+ if (LoadedMods.Gregtech){
+ Utils.LOG_INFO("Gregtech5u Content | Registering Industrial Geothermal Engines.");
+ run1();
+ }
+
+ }
+
+ private static void run1(){
+ GregtechItemList.Geothermal_Engine_EV.set(new GregtechMetaTileEntityGeothermalGenerator(830, "advancedgenerator.geothermalFuel.tier.01", "Basic Geothermal Engine", 4).getStackForm(1L));
+ GregtechItemList.Geothermal_Engine_IV.set(new GregtechMetaTileEntityGeothermalGenerator(831, "advancedgenerator.geothermalFuel.tier.02", "Turbo Geothermal Engine", 5).getStackForm(1L));
+ GregtechItemList.Geothermal_Engine_LuV.set(new GregtechMetaTileEntityGeothermalGenerator(832, "advancedgenerator.geothermalFuel.tier.03", "Vulcan Geothermal Engine", 6).getStackForm(1L));
+
+ GT_ModHandler.addCraftingRecipe(
+ GregtechItemList.Geothermal_Engine_EV.get(1L, new Object[0]),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED,
+ new Object[]{"CEC", "GMG", "PWP",
+ Character.valueOf('M'), ItemList.Hull_EV,
+ Character.valueOf('P'), ItemList.Electric_Piston_EV,
+ Character.valueOf('E'), ItemList.Electric_Motor_EV,
+ Character.valueOf('C'), GregtechOrePrefixes.circuit.get(Materials.Ultimate),
+ Character.valueOf('W'), OrePrefixes.cableGt04.get(Materials.Aluminium),
+ Character.valueOf('G'), OrePrefixes.gearGt.get(Materials.Titanium)});
+
+ GT_ModHandler.addCraftingRecipe(GregtechItemList.Geothermal_Engine_IV.get(1L, new Object[0]),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED,
+ new Object[]{"CEC", "GMG", "PWP",
+ Character.valueOf('M'), ItemList.Hull_IV,
+ Character.valueOf('P'), ItemList.Electric_Piston_IV,
+ Character.valueOf('E'), ItemList.Electric_Motor_IV,
+ Character.valueOf('C'), GregtechOrePrefixes.circuit.get(GT_Materials.Symbiotic),
+ Character.valueOf('W'), OrePrefixes.cableGt04.get(Materials.Platinum),
+ Character.valueOf('G'), OrePrefixes.gearGt.get(Materials.TungstenSteel)});
+
+ final ItemStack INGREDIENT_1 = RECIPE_CONSTANTS.electricPiston_LuV;
+ final ItemStack INGREDIENT_2 = RECIPE_CONSTANTS.electricMotor_LuV;
+ GT_ModHandler.addCraftingRecipe(GregtechItemList.Geothermal_Engine_LuV.get(1L, new Object[0]),
+ GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED,
+ new Object[]{"CEC", "GMG", "PWP",
+ Character.valueOf('M'), ItemList.Hull_LuV,
+ Character.valueOf('P'), INGREDIENT_1,
+ Character.valueOf('E'), INGREDIENT_2,
+ Character.valueOf('C'), GregtechOrePrefixes.circuit.get(GT_Materials.Neutronic),
+ Character.valueOf('W'), OrePrefixes.cableGt04.get(Materials.Tungsten),
+ Character.valueOf('G'), OrePrefixes.gearGt.get(Materials.Chrome)});
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java
index 4632b306ed..690ebcc0ec 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java
@@ -3,8 +3,6 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
-import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_AdvancedCraftingTable;
-import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_BronzeCraftingTable;
import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredTank;
import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_NBT_Tank;
@@ -32,13 +30,7 @@ public class GregtechTieredFluidTanks
GregtechItemList.GT_FluidTank_LuV.set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.06", "Ludicrous Voltage Fluid Tank", 6).getStackForm(1L));
GregtechItemList.GT_FluidTank_ZPM.set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.07", "ZPM Voltage Fluid Tank", 7).getStackForm(1L));
GregtechItemList.GT_FluidTank_UV.set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.08", "Ultimate Voltage Fluid Tank", 8).getStackForm(1L));
- GregtechItemList.GT_FluidTank_MAX.set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.09", "MAX Voltage Fluid Tank", 9).getStackForm(1L));
-
- //Gregtech 4 Workbenches
- GregtechItemList.GT4_Workbench_Bronze.set(new GT_MetaTileEntity_BronzeCraftingTable(828, "workbench.bronze", "Bronze Workbench", 0).getStackForm(1L));
- GregtechItemList.GT4_Workbench_Advanced.set(new GT_MetaTileEntity_AdvancedCraftingTable(829, "workbench.advanced", "Advanced Workbench", 1).getStackForm(1L));
-
-
+ GregtechItemList.GT_FluidTank_MAX.set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.09", "MAX Voltage Fluid Tank", 9).getStackForm(1L));
}
private static void run2()
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechWorkbenches.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechWorkbenches.java
new file mode 100644
index 0000000000..4486bc5cd5
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechWorkbenches.java
@@ -0,0 +1,29 @@
+package gtPlusPlus.xmod.gregtech.registration.gregtech;
+
+import gtPlusPlus.core.lib.LoadedMods;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
+import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_AdvancedCraftingTable;
+import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_BronzeCraftingTable;
+
+public class GregtechWorkbenches
+{
+ public static void run()
+ {
+ if (LoadedMods.Gregtech){
+ Utils.LOG_INFO("Gregtech5u Content | Registering Workbenches.");
+ run1();
+ //run2();
+ }
+
+ }
+
+ private static void run1()
+ {
+ //Gregtech 4 Workbenches
+ GregtechItemList.GT4_Workbench_Bronze.set(new GT_MetaTileEntity_BronzeCraftingTable(828, "workbench.bronze", "Bronze Workbench", 0).getStackForm(1L));
+ GregtechItemList.GT4_Workbench_Advanced.set(new GT_MetaTileEntity_AdvancedCraftingTable(829, "workbench.advanced", "Advanced Workbench", 1).getStackForm(1L));
+
+
+ }
+}