Added big plasma turbine!

Also all turbines logic moved to separetaed class

Closes #69
This commit is contained in:
TheDarkDnKTv 2021-04-01 08:37:16 +03:00
parent 53563db6c2
commit dc6eebc891
49 changed files with 650 additions and 501 deletions

View file

@ -412,7 +412,7 @@ public class GT_Mod implements IGT_Mod {
GT_Worldgenerator.sGeneratedOres[11] = GregTech_API.sWorldgenFile.get("worldgen.end", "Olivineore" , true);
GT_Worldgenerator.sGeneratedOres[12] = GregTech_API.sWorldgenFile.get("worldgen.end", "Sodaliteore" , true);
GT_Config.system = (Calendar.getInstance().get(2) + 1 == 4 && Calendar.getInstance().get(5) >= 1 && Calendar.getInstance().get(5) <= 2);
GT_Config.system = (!GregTech_API.DEBUG_MODE && Calendar.getInstance().get(Calendar.MONTH) + 1 == 4 && Calendar.getInstance().get(Calendar.DATE) >= 1 && Calendar.getInstance().get(Calendar.DATE) <= 2);
Materials.init(GregTech_API.sMaterialProperties);
GT_Log.log.info("Saving Configs");

View file

@ -2,6 +2,7 @@ package gregtechmod.api.gui;
import gregtechmod.api.GregTech_API;
import gregtechmod.api.interfaces.IGregTechTileEntity;
import gregtechmod.api.interfaces.IMetaTileEntity;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
@ -16,14 +17,15 @@ public class GT_GUIContainer_MultiMachine extends GT_GUIContainerMetaTile_Machin
String mName = "";
public GT_GUIContainer_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile) {
super(new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity), GregTech_API.GUI_PATH + aTextureFile);
mName = aName;
public GT_GUIContainer_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
super(new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity), GregTech_API.GUI_PATH + "MultiblockDisplay.png");
IMetaTileEntity mte = aTileEntity.getMetaTileEntity();
mName = mte != null ? String.format("metatileentity.%s.name", mte.getInventoryName()) : "null";
}
@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
fontRenderer.drawString(I18n.format("metatileentity." + mName), 10, 8, 16448255);
fontRenderer.drawString(I18n.format(mName), 10, 8, 16448255);
if (mContainer != null) {
GT_Container_MultiMachine m = (GT_Container_MultiMachine) mContainer;

View file

@ -23,8 +23,8 @@ public class GT_MetaTileEntity_Hatch_Dynamo extends MetaTileEntity {
@Override public boolean isOutputFacing(byte aSide) {return aSide==getBaseMetaTileEntity().getFrontFacing();}
@Override public int getInvSize() {return 0;}
@Override public int getMinimumStoredEU() {return 512;}
@Override public int maxEUOutput() {return Math.max(0, Math.min(getEUVar() - getMinimumStoredEU(), GregTech_API.VOLTAGE_EXTREME));}
@Override public int maxEUStore() {return GregTech_API.VOLTAGE_EXTREME * 4 + getMinimumStoredEU();}
@Override public int maxEUOutput() {return Math.max(0, Math.min(getEUVar() - getMinimumStoredEU(), GregTech_API.VOLTAGE_INSANE));}
@Override public int maxEUStore() {return GregTech_API.VOLTAGE_INSANE * 4 + getMinimumStoredEU();}
@Override public String getSpecialVoltageToolTip() {return "metatileentity.TileEntity_EUp_OUT.Dynamo_Hatch.tooltip";}
@Override

View file

@ -40,7 +40,7 @@ public abstract class MTEWorkableMultiblock extends MetaTileEntityMultiblock imp
@Override
public ItemStack getStackIn(int idx) {
return super.getStackInSlot(idx);
return this.getStackInSlot(idx);
}
@Override

View file

@ -179,7 +179,7 @@ public class Recipe {
itemAmountInSlots[i] = itemInSlot == null ? 0 : itemInSlot.stackSize;
}
for (Ingredient ingr : itemInputs) {
for (Ingredient ingr : getInputs()) {
int ingrAmount = ingr.getCount();
boolean consumed = false;
@ -213,7 +213,7 @@ public class Recipe {
fluidAmountInSlots[i] = fluidInSlot == null ? 0 : fluidInSlot.amount;
}
for (FluidStack ingr : fluidInputs) {
for (FluidStack ingr : getFluidInputs()) {
int ingrAmount = ingr.amount;
boolean consumed = false;

View file

@ -219,8 +219,7 @@ public class GT_GUIHandler implements IGuiHandler {
if (ID == 154) return new GT_Container_BasicTank (player.inventory, (IGregTechTileEntity) tTileEntity);
if (ID == 155) return new GT_Container_MaintenanceHatch (player.inventory, (IGregTechTileEntity) tTileEntity);
if (ID == 156) return new GT_Container_MultiMachine (player.inventory, (IGregTechTileEntity) tTileEntity);
if (ID == 157) return new GT_Container_MultiMachine (player.inventory, (IGregTechTileEntity) tTileEntity);
if (ID == 158) return new GT_Container_MultiMachine (player.inventory, (IGregTechTileEntity) tTileEntity);
// free 157-158
if (ID == 159) return new GT_Container_BasicMachine (player.inventory, (IGregTechTileEntity) tTileEntity);
if (ID == 160) return new GT_Container_AdvancedWorkbench (player.inventory, (IGregTechTileEntity) tTileEntity);
if (ID == 161) return new GT_Container_BronzeWorkbench (player.inventory, (IGregTechTileEntity) tTileEntity);
@ -317,9 +316,8 @@ public class GT_GUIHandler implements IGuiHandler {
if (ID == 153) return new GT_GUIContainer_Hatch_Input (player.inventory, (IGregTechTileEntity)tTileEntity);
if (ID == 154) return new GT_GUIContainer_Hatch_Output (player.inventory, (IGregTechTileEntity)tTileEntity);
if (ID == 155) return new GT_GUIContainer_MaintenanceHatch (player.inventory, (IGregTechTileEntity)tTileEntity);
if (ID == 156) return new GT_GUIContainer_MultiMachine (player.inventory, (IGregTechTileEntity)tTileEntity, "GT_Multi_GasTurbine.name", "MultiblockDisplay.png");
if (ID == 157) return new GT_GUIContainer_MultiMachine (player.inventory, (IGregTechTileEntity)tTileEntity, "GT_Multi_SteamTurbine.name", "MultiblockDisplay.png");
if (ID == 158) return new GT_GUIContainer_MultiMachine (player.inventory, (IGregTechTileEntity)tTileEntity, "GT_Multi_ThermalBoiler.name", "MultiblockDisplay.png");
if (ID == 156) return new GT_GUIContainer_MultiMachine (player.inventory, (IGregTechTileEntity)tTileEntity);
// free 157-158
if (ID == 159) return new GT_GUIContainer_BasicMachine_Lathe (player.inventory, (IGregTechTileEntity)tTileEntity, "GT_Lathe.name", "Lathe.png");
if (ID == 160) return new GT_GUIContainer_AdvancedWorkbench (player.inventory, (IGregTechTileEntity)tTileEntity);
if (ID == 161) return new GT_GUIContainer_BronzeWorkbench (player.inventory, (IGregTechTileEntity)tTileEntity);

View file

@ -4,8 +4,9 @@ import gregtechmod.api.GregTech_API;
import gregtechmod.api.interfaces.IGregTechTileEntity;
import gregtechmod.api.util.GT_Config;
import gregtechmod.api.util.GT_OreDictUnificator;
import gregtechmod.common.tileentities.machines.multi.GT_MetaTileEntity_Multi_SteamTurbine;
import gregtechmod.common.tileentities.machines.multi.GT_MetaTileEntity_Multi_GasTurbine;
import gregtechmod.common.tileentities.energy.production.multi.GT_MetaTileEntity_Multi_GasTurbine;
import gregtechmod.common.tileentities.energy.production.multi.GT_MetaTileEntity_Multi_SteamTurbine;
import gregtechmod.common.tileentities.energy.production.multi.MultiPlasmaTurbine;
import java.util.List;
import java.util.Random;
@ -27,7 +28,13 @@ import cpw.mods.fml.relauncher.SideOnly;
public class GT_BlockMetaID_Block extends Block {
public static IIcon[] mIcons = new IIcon[52], mIconGasTurbine = new IIcon[9], mIconGasTurbineActive = new IIcon[9], mIconSteamTurbine = new IIcon[9], mIconSteamTurbineActive = new IIcon[9];
public static IIcon[] mIcons = new IIcon[52],
mIconGasTurbine = new IIcon[9],
mIconGasTurbineActive = new IIcon[9],
mIconSteamTurbine = new IIcon[9],
mIconSteamTurbineActive = new IIcon[9],
mIconPlasmaTurbine = new IIcon[9],
mIconPlasmaTurbineActive= new IIcon[9];
public static boolean mConnectedMachineTextures = true;
@ -49,6 +56,8 @@ public class GT_BlockMetaID_Block extends Block {
for (int i = 0; i < mIconGasTurbineActive .length; i++) mIconGasTurbineActive [i] = par1IconRegister.registerIcon(GregTech_API.TEXTURE_PATH_BLOCK + (GT_Config.system?"troll":"tile.GasTurbine/GasTurbineActive" + (i+1)));
for (int i = 0; i < mIconSteamTurbine .length; i++) mIconSteamTurbine [i] = par1IconRegister.registerIcon(GregTech_API.TEXTURE_PATH_BLOCK + (GT_Config.system?"troll":"tile.SteamTurbine/SteamTurbine" + (i+1)));
for (int i = 0; i < mIconSteamTurbineActive .length; i++) mIconSteamTurbineActive [i] = par1IconRegister.registerIcon(GregTech_API.TEXTURE_PATH_BLOCK + (GT_Config.system?"troll":"tile.SteamTurbine/SteamTurbineActive" + (i+1)));
for (int i = 0; i < mIconPlasmaTurbine .length; i++) mIconPlasmaTurbine [i] = par1IconRegister.registerIcon(GregTech_API.TEXTURE_PATH_BLOCK + (GT_Config.system?"troll":"tile.PlasmaTurbine/PlasmaTurbine" + (i+1)));
for (int i = 0; i < mIconPlasmaTurbineActive.length; i++) mIconPlasmaTurbineActive [i] = par1IconRegister.registerIcon(GregTech_API.TEXTURE_PATH_BLOCK + (GT_Config.system?"troll":"tile.PlasmaTurbine/PlasmaTurbineActive" + (i+1)));
if(GregTech_API.sPostloadFinished) {
GregTech_API.registerCover(GT_OreDictUnificator.getOres("plateSilver") , mIcons[ 3]);
@ -270,6 +279,62 @@ public class GT_BlockMetaID_Block extends Block {
}
}
if (tMeta == 15) {
TileEntity tTileEntity;
Object tMetaTileEntity;
if (aSide == 2 || aSide == 3) {
if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide==3?+1:-1), yCoord - 1, zCoord)) && tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getFrontFacing() == aSide && null != (tMetaTileEntity = ((IGregTechTileEntity)tTileEntity).getMetaTileEntity()) && tMetaTileEntity instanceof MultiPlasmaTurbine) {
if (((IGregTechTileEntity)tTileEntity).isActive()) return mIconPlasmaTurbineActive[0]; return mIconPlasmaTurbine[0];
}
if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide==3?+1:-1), yCoord , zCoord)) && tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getFrontFacing() == aSide && null != (tMetaTileEntity = ((IGregTechTileEntity)tTileEntity).getMetaTileEntity()) && tMetaTileEntity instanceof MultiPlasmaTurbine) {
if (((IGregTechTileEntity)tTileEntity).isActive()) return mIconPlasmaTurbineActive[3]; return mIconPlasmaTurbine[3];
}
if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide==3?+1:-1), yCoord + 1, zCoord)) && tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getFrontFacing() == aSide && null != (tMetaTileEntity = ((IGregTechTileEntity)tTileEntity).getMetaTileEntity()) && tMetaTileEntity instanceof MultiPlasmaTurbine) {
if (((IGregTechTileEntity)tTileEntity).isActive()) return mIconPlasmaTurbineActive[6]; return mIconPlasmaTurbine[6];
}
if (null != (tTileEntity = aWorld.getTileEntity(xCoord , yCoord - 1, zCoord)) && tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getFrontFacing() == aSide && null != (tMetaTileEntity = ((IGregTechTileEntity)tTileEntity).getMetaTileEntity()) && tMetaTileEntity instanceof MultiPlasmaTurbine) {
if (((IGregTechTileEntity)tTileEntity).isActive()) return mIconPlasmaTurbineActive[1]; return mIconPlasmaTurbine[1];
}
if (null != (tTileEntity = aWorld.getTileEntity(xCoord , yCoord + 1, zCoord)) && tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getFrontFacing() == aSide && null != (tMetaTileEntity = ((IGregTechTileEntity)tTileEntity).getMetaTileEntity()) && tMetaTileEntity instanceof MultiPlasmaTurbine) {
if (((IGregTechTileEntity)tTileEntity).isActive()) return mIconPlasmaTurbineActive[7]; return mIconPlasmaTurbine[7];
}
if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide==2?+1:-1), yCoord + 1, zCoord)) && tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getFrontFacing() == aSide && null != (tMetaTileEntity = ((IGregTechTileEntity)tTileEntity).getMetaTileEntity()) && tMetaTileEntity instanceof MultiPlasmaTurbine) {
if (((IGregTechTileEntity)tTileEntity).isActive()) return mIconPlasmaTurbineActive[8]; return mIconPlasmaTurbine[8];
}
if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide==2?+1:-1), yCoord , zCoord)) && tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getFrontFacing() == aSide && null != (tMetaTileEntity = ((IGregTechTileEntity)tTileEntity).getMetaTileEntity()) && tMetaTileEntity instanceof MultiPlasmaTurbine) {
if (((IGregTechTileEntity)tTileEntity).isActive()) return mIconPlasmaTurbineActive[5]; return mIconPlasmaTurbine[5];
}
if (null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide==2?+1:-1), yCoord - 1, zCoord)) && tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getFrontFacing() == aSide && null != (tMetaTileEntity = ((IGregTechTileEntity)tTileEntity).getMetaTileEntity()) && tMetaTileEntity instanceof MultiPlasmaTurbine) {
if (((IGregTechTileEntity)tTileEntity).isActive()) return mIconPlasmaTurbineActive[2]; return mIconPlasmaTurbine[2];
}
} else if (aSide == 4 || aSide == 5) {
if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide==4?+1:-1))) && tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getFrontFacing() == aSide && null != (tMetaTileEntity = ((IGregTechTileEntity)tTileEntity).getMetaTileEntity()) && tMetaTileEntity instanceof MultiPlasmaTurbine) {
if (((IGregTechTileEntity)tTileEntity).isActive()) return mIconPlasmaTurbineActive[0]; return mIconPlasmaTurbine[0];
}
if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord , zCoord + (aSide==4?+1:-1))) && tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getFrontFacing() == aSide && null != (tMetaTileEntity = ((IGregTechTileEntity)tTileEntity).getMetaTileEntity()) && tMetaTileEntity instanceof MultiPlasmaTurbine) {
if (((IGregTechTileEntity)tTileEntity).isActive()) return mIconPlasmaTurbineActive[3]; return mIconPlasmaTurbine[3];
}
if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide==4?+1:-1))) && tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getFrontFacing() == aSide && null != (tMetaTileEntity = ((IGregTechTileEntity)tTileEntity).getMetaTileEntity()) && tMetaTileEntity instanceof MultiPlasmaTurbine) {
if (((IGregTechTileEntity)tTileEntity).isActive()) return mIconPlasmaTurbineActive[6]; return mIconPlasmaTurbine[6];
}
if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord )) && tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getFrontFacing() == aSide && null != (tMetaTileEntity = ((IGregTechTileEntity)tTileEntity).getMetaTileEntity()) && tMetaTileEntity instanceof MultiPlasmaTurbine) {
if (((IGregTechTileEntity)tTileEntity).isActive()) return mIconPlasmaTurbineActive[1]; return mIconPlasmaTurbine[1];
}
if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord )) && tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getFrontFacing() == aSide && null != (tMetaTileEntity = ((IGregTechTileEntity)tTileEntity).getMetaTileEntity()) && tMetaTileEntity instanceof MultiPlasmaTurbine) {
if (((IGregTechTileEntity)tTileEntity).isActive()) return mIconPlasmaTurbineActive[7]; return mIconPlasmaTurbine[7];
}
if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide==5?+1:-1))) && tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getFrontFacing() == aSide && null != (tMetaTileEntity = ((IGregTechTileEntity)tTileEntity).getMetaTileEntity()) && tMetaTileEntity instanceof MultiPlasmaTurbine) {
if (((IGregTechTileEntity)tTileEntity).isActive()) return mIconPlasmaTurbineActive[8]; return mIconPlasmaTurbine[8];
}
if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord , zCoord + (aSide==5?+1:-1))) && tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getFrontFacing() == aSide && null != (tMetaTileEntity = ((IGregTechTileEntity)tTileEntity).getMetaTileEntity()) && tMetaTileEntity instanceof MultiPlasmaTurbine) {
if (((IGregTechTileEntity)tTileEntity).isActive()) return mIconPlasmaTurbineActive[5]; return mIconPlasmaTurbine[5];
}
if (null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide==5?+1:-1))) && tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getFrontFacing() == aSide && null != (tMetaTileEntity = ((IGregTechTileEntity)tTileEntity).getMetaTileEntity()) && tMetaTileEntity instanceof MultiPlasmaTurbine) {
if (((IGregTechTileEntity)tTileEntity).isActive()) return mIconPlasmaTurbineActive[2]; return mIconPlasmaTurbine[2];
}
}
}
boolean[] tConnectedSides = {
aWorld.getBlock(xCoord, yCoord-1, zCoord) == this && aWorld.getBlockMetadata(xCoord, yCoord-1, zCoord) == tMeta,
aWorld.getBlock(xCoord, yCoord+1, zCoord) == this && aWorld.getBlockMetadata(xCoord, yCoord+1, zCoord) == tMeta,

View file

@ -49,6 +49,8 @@ public class RecipeMaps {
public static final RecipeMap<GeneratorRecipeFactory> PLASMA_FUELS = new RecipeMap<>(0, 1, 0, 1, 0, 1, 0, 0, new GeneratorRecipeFactory());
public static final RecipeMap<GeneratorRecipeFactory> MAGIC_FUELS = new RecipeMap<>(0, 1, 0, 1, 0, 1, 0, 0, new GeneratorRecipeFactory());
public static final RecipeMap<GeneratorRecipeFactory> STEAM_FUELS = new RecipeMap<>(0, 0, 0, 0, 0, 1, 0, 1, new GeneratorRecipeFactory());
// Fake RecipeMaps
public static final IC2RecipeMap MACERATION = new IC2RecipeMap(1, 2, 1, 2, GT_ModHandler::getMaceratorResult);
public static final IC2RecipeMap EXTRACTION = new IC2RecipeMap(1, 2, 1, 2, GT_ModHandler::getExtractorResult);

View file

@ -102,6 +102,12 @@ public class GeneratorRecipeLogic extends RecipeLogic {
}
}
@Override
public void stop() {
super.stop();
leftEU = 0;
}
@Override
public void saveToNBT(NBTTagCompound data) {
super.saveToNBT(data);

View file

@ -0,0 +1,335 @@
package gregtechmod.common.tileentities.energy.production.multi;
import java.lang.ref.WeakReference;
import java.util.List;
import java.util.Map;
import java.util.function.IntSupplier;
import org.apache.commons.lang3.tuple.Pair;
import gregtechmod.api.GregTech_API;
import gregtechmod.api.enums.GT_Items;
import gregtechmod.api.interfaces.IGregTechTileEntity;
import gregtechmod.api.interfaces.IMetaTileEntity;
import gregtechmod.api.interfaces.IRecipeWorkable;
import gregtechmod.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo;
import gregtechmod.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
import gregtechmod.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance;
import gregtechmod.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
import gregtechmod.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
import gregtechmod.api.metatileentity.implementations.MTEWorkableMultiblock;
import gregtechmod.api.recipe.Recipe;
import gregtechmod.api.recipe.RecipeLogic;
import gregtechmod.api.recipe.RecipeMap;
import gregtechmod.api.util.GT_ModHandler;
import gregtechmod.api.util.GT_Utility;
import gregtechmod.api.util.InfoBuilder;
import gregtechmod.common.recipe.logic.GeneratorRecipeLogic;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.fluids.FluidStack;
/** An class of common multitubine logic, usually an shape of multiblock and simple logic
* @author TheDarkDnKTv
*
*/
public abstract class AbstractTurbine extends MTEWorkableMultiblock {
private static ItemStack RC_TURBINE;
protected int mEfficiencyIncrease = 0;
protected int MAX_EFFICIENCY = 10_000;
protected int TURBINE_OUTPUT_EU = 800;
protected boolean NEED_AN_MUFFLER = false;
@Override public void updateEfficiency() {}
@Override public void endProcess() {}
@Override public boolean allowToCheckRecipe() {return true;}
@Override public boolean isGivingInformation() {return true;}
@Override public boolean isFacingValid(byte aFacing) {return aFacing > 1;}
@Override public int maxEUOutput() {return TURBINE_OUTPUT_EU;}
@Override public RecipeLogic getRecipeLogic() {return recipeLogic;}
@Override public int increaseProgress(int aProgress) {recipeLogic.increaseProgressTime(aProgress);return recipeLogic.getMaxProgressTime()-recipeLogic.getProgressTime();}
@Override public void onRightclick(EntityPlayer aPlayer) {getBaseMetaTileEntity().openGUI(aPlayer, 156, GregTech_API.gregtechmod);}
public AbstractTurbine(int aID, String aName, RecipeMap<?> map) {
super(aID, aName, map);
}
public AbstractTurbine(RecipeMap<?> map) {
super(map);
}
protected abstract Pair<Block, Integer> getHull();
/**
* Called right after resources was consumed
*/
protected void onRecipeUpdateTick() {
mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]) - ((getIdealStatus() - getRepairStatus()) * 1000)));
}
protected int getCurrentEfficiency() {
return getMaxEfficiency(mInventory[1]);
}
private final boolean checkAir() {
int tAirCount = 0;
for (byte i = -1; i < 2; i++) for (byte j = -1; j < 2; j++) for (byte k = -1; k < 2; k++) {
if (getBaseMetaTileEntity().getAirOffset(i, j, k)) tAirCount++;
}
if (tAirCount != 10) return false;
return true;
}
@Override
protected final boolean checkMachine(ItemStack aStack) {
byte tSide = getBaseMetaTileEntity().getBackFacing();
if (getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 1) && getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 2)) {
TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 3);
if (tTileEntity != null && tTileEntity instanceof IGregTechTileEntity) if (((IGregTechTileEntity)tTileEntity).getMetaTileEntity() != null) if (((IGregTechTileEntity)tTileEntity).getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Dynamo) {
mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo)((IGregTechTileEntity)tTileEntity).getMetaTileEntity());
} else {
return false;
}
for (byte i = 2; i < 6; i++) {
if (null != (tTileEntity = getBaseMetaTileEntity().getTileEntityAtSideAndDistance(i, 2)) && tTileEntity instanceof IGregTechTileEntity) {
if (((IGregTechTileEntity)tTileEntity).getFrontFacing() == getBaseMetaTileEntity().getFrontFacing() && ((IGregTechTileEntity)tTileEntity).getMetaTileEntity() != null) {
if (((IGregTechTileEntity)tTileEntity).getMetaTileEntity().getClass() == this.getClass()) return false;
}
}
}
int tX = getBaseMetaTileEntity().getXCoord(), tY = getBaseMetaTileEntity().getYCoord(), tZ = getBaseMetaTileEntity().getZCoord();
for (byte i = -1; i < 2; i++) for (byte j = -1; j < 2; j++) if (i != 0 || j != 0) for (byte k = 0; k < 4; k++) {
Pair<Block, Integer> hull = this.getHull();
if ((i == 0 || j == 0) && (k == 1 || k == 2)) {
if (getBaseMetaTileEntity().getBlock(tX+(tSide<4?i:tSide==5?+k:-k), tY+j, tZ+(tSide<4?tSide==3?+k:-k:i)) != hull.getKey() || getBaseMetaTileEntity().getMetaID(tX+(tSide<4?i:tSide==5?+k:-k), tY+j, tZ+(tSide<4?tSide==3?+k:-k:i)) != hull.getValue()) {
tTileEntity = getBaseMetaTileEntity().getTileEntity(tX+(tSide<4?i:tSide==5?+k:-k), tY+j, tZ+(tSide<4?tSide==3?+k:-k:i));
if (tTileEntity != null && tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getMetaTileEntity() != null) {
IMetaTileEntity mte = ((IGregTechTileEntity)tTileEntity).getMetaTileEntity();
if (mte instanceof GT_MetaTileEntity_Hatch_Maintenance) {
maintenanceHatch = new WeakReference<>((GT_MetaTileEntity_Hatch_Maintenance)mte);
} else if (mte instanceof GT_MetaTileEntity_Hatch_Input) {
mInputHatches.add((GT_MetaTileEntity_Hatch_Input)mte);
} else if (mte instanceof GT_MetaTileEntity_Hatch_Output) {
mOutputHatches.add((GT_MetaTileEntity_Hatch_Output)mte);
} else if (NEED_AN_MUFFLER && mte instanceof GT_MetaTileEntity_Hatch_Muffler) {
mufflerHatch = new WeakReference<>((GT_MetaTileEntity_Hatch_Muffler)mte);
} else {
return false;
}
} else {
return false;
}
}
} else {
if (getBaseMetaTileEntity().getBlock(tX+(tSide<4?i:tSide==5?+k:-k), tY+j, tZ+(tSide<4?tSide==3?+k:-k:i)) != hull.getKey() || getBaseMetaTileEntity().getMetaID(tX+(tSide<4?i:tSide==5?+k:-k), tY+j, tZ+(tSide<4?tSide==3?+k:-k:i)) != hull.getValue()) {
return false;
}
}
}
} else {
return false;
}
return NEED_AN_MUFFLER ? (mufflerHatch != null && mufflerHatch.get() != null) : true;
}
@Override
protected void initRecipeLogic(RecipeMap<?> map) {
recipeLogic = new MultiTurbineLogic(() -> mEfficiency / 100, map, this);
}
@Override
public void stopMachine() {
recipeLogic.stop();
mEfficiencyIncrease = 0;
mEfficiency = 0;
getBaseMetaTileEntity().setActive(false);
}
@Override
public void startProcess() {
if (GT_Items.Component_Turbine_Bronze.isStackEqual(mInventory[1], true, true)) {
mEfficiencyIncrease = 10;
} else if (GT_Items.Component_Turbine_Steel.isStackEqual(mInventory[1], true, true)) {
mEfficiencyIncrease = 20;
} else if (GT_Items.Component_Turbine_Magnalium.isStackEqual(mInventory[1], true, true)) {
mEfficiencyIncrease = 50;
} else if (GT_Items.Component_Turbine_TungstenSteel.isStackEqual(mInventory[1], true, true)) {
mEfficiencyIncrease = 15;
} else if (GT_Items.Component_Turbine_Carbon.isStackEqual(mInventory[1], true, true)) {
mEfficiencyIncrease = 100;
} else {
mEfficiencyIncrease = 20;
}
}
@Override
public void saveNBTData(NBTTagCompound aNBT) {
super.saveNBTData(aNBT);
aNBT.setInteger("mEfficiencyIncrease", mEfficiencyIncrease);
}
@Override
public void loadNBTData(NBTTagCompound aNBT) {
super.loadNBTData(aNBT);
mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease");
}
@Override
public void onServerStart() {
RC_TURBINE = GT_ModHandler.getRCItem("part.turbine.rotor", 1, GregTech_API.ITEM_WILDCARD_DAMAGE);
}
@Override
public Map<String, List<Object>> getInfoData() {
InfoBuilder b = InfoBuilder.create()
.newKey("metatileentity.turbine.speed", GT_Utility.parseNumberToString(mEfficiency * 100.0D / MAX_EFFICIENCY))
.newKey("metatileentity.multiblock.dynamo_output", (int)(TURBINE_OUTPUT_EU * mEfficiency * 1.0D / MAX_EFFICIENCY))
.newKey("metatileentity.multiblock.malfunction_amount", getIdealStatus() - getRepairStatus());
if (isCorrectMachinePart(mInventory[1])) {
int damage = mInventory[1].getMaxDamage() - mInventory[1].getItemDamage();
if (RC_TURBINE != null && mInventory[1].getItem() == RC_TURBINE.getItem())
damage /= 2;
b.newKey("metatileentity.turbine.durability", GT_Utility.parseNumberToString(damage));
} else {
b.newKey("metatileentity.turbine.no_turbine");
}
return b.build();
}
@Override
public final boolean isCorrectMachinePart(ItemStack aStack) {
return this.getMaxEfficiency(aStack) > 0;
}
@Override
public final int getMaxEfficiency(ItemStack aStack) {
if (GT_Items.Component_Turbine_Bronze.isStackEqual(aStack, true, true)) return 60_00;
if (GT_Items.Component_Turbine_Steel.isStackEqual(aStack, true, true)) return 80_00;
if (GT_Items.Component_Turbine_Magnalium.isStackEqual(aStack, true, true)) return 100_00;
if (GT_Items.Component_Turbine_TungstenSteel.isStackEqual(aStack, true, true)) return 90_00;
if (GT_Items.Component_Turbine_Carbon.isStackEqual(aStack, true, true)) return 125_00;
if (GT_Utility.areStacksEqual(aStack, RC_TURBINE)) return 80_00;
return 0;
}
@Override
public final int getDamageToComponent(ItemStack aStack) {
return GT_Utility.areStacksEqual(aStack, RC_TURBINE) ? 2 : 1;
}
@Override
public final boolean explodesOnComponentBreak(ItemStack aStack) {
return true;
}
public static class MultiTurbineLogic extends GeneratorRecipeLogic {
protected MultiTurbineLogic(IntSupplier efficiency, RecipeMap<?> recipeMap, IRecipeWorkable machine) {
super(efficiency, recipeMap, machine);
metadataVerifier = rec -> rec.getInputs().isEmpty() && rec.getAllOutputs().isEmpty(); // only fluid recipes allow
}
protected boolean depleteInputs() {
int fluidMult = (int) (getMachine().maxEUOutput() / leftEU);
if (previousRecipe != null) {
for (FluidStack fluid : previousRecipe.getFluidInputs()) {
FluidStack dummy = fluid.copy();
dummy.amount *= fluidMult;
if (!getMachine().depleteInput(dummy))
return false;
}
}
return true;
}
@Override
public boolean update() {
boolean success = false;
IGregTechTileEntity base = getMachine().getBaseMetaTileEntity();
if (base.isAllowedToWork()) {
if (leftEU > 0) {
long tmp = leftEU;
success = updateRecipeProgress();
if (tmp == 0 && !success) {
throw new IllegalStateException();
}
}
if (leftEU == 0) {
if (getMachine().hasInventoryBeenModified() || base.hasWorkJustBeenEnabled() || success || base.getTimer() % 600 == 0) {
trySerachRecipe();
}
}
} else if (leftEU > 0) getMachine().stopMachine();
return success;
}
@Override
protected void trySerachRecipe() {
if (getMachine().allowToCheckRecipe()) {
if (previousRecipe != null) {
if (match(previousRecipe)) {
startRecipe(previousRecipe);
} else {
previousRecipe = null;
getMachine().stopMachine();
}
} else {
// find new recipe
Recipe resRec = findRecipe();
if (resRec != null)
startRecipe(resRec);
}
}
}
@Override
protected boolean updateRecipeProgress() {
if ((getMachine().getBaseMetaTileEntity().getTimer() % 10 == 0 ? getMachine().checkAir() : true) && depleteInputs()) {
getMachine().onRecipeUpdateTick();
int EU = (int) (getMachine().maxEUOutput() * (efficiency.getAsInt() / 100.0D));
getMachine().addEnergyOutput(EU);
} else getMachine().stopMachine();
return false;
}
@Override
protected void startRecipe(Recipe recipe) {
if (getMachine().spaceForOutput(recipe)) {
previousRecipe = recipe;
progressTime = 1;
leftEU = recipe.getDuration() * recipe.getEUt();
maxProgressTime = (int) Math.ceil(leftEU * 1.0D / getMachine().maxEUOutput());
triggerMachine(true);
getMachine().startProcess();
} else {
getMachine().stopMachine();
}
}
@Override
protected AbstractTurbine getMachine() {
return (AbstractTurbine) metaTileEntity.get();
}
}
}

View file

@ -0,0 +1,57 @@
package gregtechmod.common.tileentities.energy.production.multi;
import org.apache.commons.lang3.tuple.Pair;
import gregtechmod.api.GregTech_API;
import gregtechmod.api.interfaces.IGregTechTileEntity;
import gregtechmod.api.metatileentity.MetaTileEntity;
import gregtechmod.common.blocks.GT_BlockMetaID_Block;
import gregtechmod.common.recipe.RecipeMaps;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
public class GT_MetaTileEntity_Multi_GasTurbine extends AbstractTurbine {
public GT_MetaTileEntity_Multi_GasTurbine(int aID, String mName) {
super(aID, mName, RecipeMaps.TURBINE_FUELS);
TURBINE_OUTPUT_EU = 675;
NEED_AN_MUFFLER = true;
}
public GT_MetaTileEntity_Multi_GasTurbine() {
super(RecipeMaps.TURBINE_FUELS);
TURBINE_OUTPUT_EU = 675;
NEED_AN_MUFFLER = true;
}
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_Multi_GasTurbine();
}
@Override
protected Pair<Block, Integer> getHull() {
return Pair.of(GregTech_API.sBlockList[0], Integer.valueOf(14));
}
@Override
public IIcon getTextureIcon(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
if (aActive) return GT_BlockMetaID_Block.mIconGasTurbineActive[4];
return GT_BlockMetaID_Block.mIconGasTurbine[4];
}
return null;
}
@Override
public int getPollutionPerTick(ItemStack aStack) {
return 1;
}
@Override
public String getDescription() {
return "metatileentity.GT_Multi_GasTurbine.tooltip";
}
}

View file

@ -0,0 +1,62 @@
package gregtechmod.common.tileentities.energy.production.multi;
import org.apache.commons.lang3.tuple.Pair;
import gregtechmod.api.GregTech_API;
import gregtechmod.api.interfaces.IGregTechTileEntity;
import gregtechmod.api.metatileentity.MetaTileEntity;
import gregtechmod.api.util.GT_ModHandler;
import gregtechmod.common.blocks.GT_BlockMetaID_Block;
import gregtechmod.common.recipe.RecipeMaps;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
public class GT_MetaTileEntity_Multi_SteamTurbine extends AbstractTurbine {
public GT_MetaTileEntity_Multi_SteamTurbine(int aID, String mName) {
super(aID, mName, RecipeMaps.STEAM_FUELS);
TURBINE_OUTPUT_EU = 800;
}
public GT_MetaTileEntity_Multi_SteamTurbine() {
super(RecipeMaps.STEAM_FUELS);
TURBINE_OUTPUT_EU = 800;
}
@Override
protected void onRecipeUpdateTick() {
super.onRecipeUpdateTick();
addOutput(GT_ModHandler.getWater(10));
}
@Override
protected Pair<Block, Integer> getHull() {
return Pair.of(GregTech_API.sBlockList[0], Integer.valueOf(13));
}
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_Multi_SteamTurbine();
}
@Override
public IIcon getTextureIcon(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
if (aActive) return GT_BlockMetaID_Block.mIconSteamTurbineActive[4];
return GT_BlockMetaID_Block.mIconSteamTurbine[4];
}
return null;
}
@Override
public int getPollutionPerTick(ItemStack aStack) {
return 0;
}
@Override
public String getDescription() {
return "metatileentity.GT_Multi_SteamTurbine.tooltip";
}
}

View file

@ -0,0 +1,59 @@
package gregtechmod.common.tileentities.energy.production.multi;
import org.apache.commons.lang3.tuple.Pair;
import gregtechmod.api.GregTech_API;
import gregtechmod.api.interfaces.IGregTechTileEntity;
import gregtechmod.api.interfaces.IMetaTileEntity;
import gregtechmod.common.blocks.GT_BlockMetaID_Block;
import gregtechmod.common.recipe.RecipeMaps;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
/**
* @author TheDarkDnKTv
*
*/
public class MultiPlasmaTurbine extends AbstractTurbine {
public MultiPlasmaTurbine(int aID, String aName) {
super(aID, aName, RecipeMaps.PLASMA_FUELS);
TURBINE_OUTPUT_EU = 8192;
}
public MultiPlasmaTurbine() {
super(RecipeMaps.PLASMA_FUELS);
TURBINE_OUTPUT_EU = 8192;
}
@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new MultiPlasmaTurbine();
}
@Override
public IIcon getTextureIcon(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
if (aActive) return GT_BlockMetaID_Block.mIconPlasmaTurbineActive[4];
return GT_BlockMetaID_Block.mIconPlasmaTurbine[4];
}
return null;
}
@Override
public String getDescription() {
return "metatileentity.GT_Multi_PlasmaTurbine.tooltip";
}
@Override
protected Pair<Block, Integer> getHull() {
return Pair.of(GregTech_API.sBlockList[0], Integer.valueOf(15));
}
@Override
public int getPollutionPerTick(ItemStack aStack) {
return 0;
}
}

View file

@ -1,242 +0,0 @@
package gregtechmod.common.tileentities.machines.multi;
import java.lang.ref.WeakReference;
import java.util.function.IntSupplier;
import gregtechmod.api.GregTech_API;
import gregtechmod.api.enums.GT_Items;
import gregtechmod.api.interfaces.IGregTechTileEntity;
import gregtechmod.api.interfaces.IMetaTileEntity;
import gregtechmod.api.interfaces.IRecipeWorkable;
import gregtechmod.api.metatileentity.MetaTileEntity;
import gregtechmod.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo;
import gregtechmod.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
import gregtechmod.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance;
import gregtechmod.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
import gregtechmod.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
import gregtechmod.api.metatileentity.implementations.MTEWorkableMultiblock;
import gregtechmod.api.recipe.Recipe;
import gregtechmod.api.recipe.RecipeMap;
import gregtechmod.api.util.GT_Log;
import gregtechmod.api.util.GT_ModHandler;
import gregtechmod.api.util.GT_Utility;
import gregtechmod.common.blocks.GT_BlockMetaID_Block;
import gregtechmod.common.recipe.RecipeMaps;
import gregtechmod.common.recipe.logic.GeneratorRecipeLogic;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
public class GT_MetaTileEntity_Multi_GasTurbine extends MTEWorkableMultiblock {
protected int mEfficiencyIncrease = 0;
@Override public boolean isFacingValid(byte aFacing) {return aFacing > 1;}
@Override public void onRightclick(EntityPlayer aPlayer) {getBaseMetaTileEntity().openGUI(aPlayer, 156, GregTech_API.gregtechmod);}
@Override public int maxEUOutput() {return 675;}
public GT_MetaTileEntity_Multi_GasTurbine(int aID, String mName) {
super(aID, mName, RecipeMaps.TURBINE_FUELS);
}
public GT_MetaTileEntity_Multi_GasTurbine() {
super(RecipeMaps.TURBINE_FUELS);
}
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_Multi_GasTurbine();
}
@Override
public boolean isCorrectMachinePart(ItemStack aStack) {
return this.getMaxEfficiency(aStack) > 0;
}
@Override
public boolean explodesOnComponentBreak(ItemStack aStack) {
return true;
}
@Override
public int getDamageToComponent(ItemStack aStack) {
return GT_Utility.areStacksEqual(GT_ModHandler.getRCItem("part.turbine.rotor", 1, GregTech_API.ITEM_WILDCARD_DAMAGE), aStack)?2:1;
}
@Override
protected void initRecipeLogic(RecipeMap<?> map) {
recipeLogic = new GeneratorMultiblockRecipeLogic(() -> mEfficiency / 100, map, this);
}
@Override
public int getMaxEfficiency(ItemStack aStack) {
if (GT_Items.Component_Turbine_Bronze.isStackEqual(aStack, true, true)) return 60_00;
if (GT_Items.Component_Turbine_Steel.isStackEqual(aStack, true, true)) return 80_00;
if (GT_Items.Component_Turbine_Magnalium.isStackEqual(aStack, true, true)) return 100_00;
if (GT_Items.Component_Turbine_TungstenSteel.isStackEqual(aStack, true, true)) return 90_00;
if (GT_Items.Component_Turbine_Carbon.isStackEqual(aStack, true, true)) return 125_00;
if (GT_Utility.areStacksEqual(aStack, GT_ModHandler.getRCItem("part.turbine.rotor", 1, GregTech_API.ITEM_WILDCARD_DAMAGE))) return 80_00;
return 0;
}
@Override
public boolean checkMachine(ItemStack aStack) {
byte tSide = getBaseMetaTileEntity().getBackFacing();
if (getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 1) && getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 2)) {
TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 3);
if (tTileEntity != null && tTileEntity instanceof IGregTechTileEntity) if (((IGregTechTileEntity)tTileEntity).getMetaTileEntity() != null) if (((IGregTechTileEntity)tTileEntity).getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Dynamo) {
mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo)((IGregTechTileEntity)tTileEntity).getMetaTileEntity());
} else {
return false;
}
int tAirCount = 0;
for (byte i = -1; i < 2; i++) for (byte j = -1; j < 2; j++) for (byte k = -1; k < 2; k++) {
if (getBaseMetaTileEntity().getAirOffset(i, j, k)) tAirCount++;
}
if (tAirCount != 10) return false;
for (byte i = 2; i < 6; i++) {
if (null != (tTileEntity = getBaseMetaTileEntity().getTileEntityAtSideAndDistance(i, 2)) && tTileEntity instanceof IGregTechTileEntity) {
if (((IGregTechTileEntity)tTileEntity).getFrontFacing() == getBaseMetaTileEntity().getFrontFacing() && ((IGregTechTileEntity)tTileEntity).getMetaTileEntity() != null) {
if (((IGregTechTileEntity)tTileEntity).getMetaTileEntity() instanceof GT_MetaTileEntity_Multi_GasTurbine) return false;
}
}
}
int tX = getBaseMetaTileEntity().getXCoord(), tY = getBaseMetaTileEntity().getYCoord(), tZ = getBaseMetaTileEntity().getZCoord();
for (byte i = -1; i < 2; i++) for (byte j = -1; j < 2; j++) if (i != 0 || j != 0) for (byte k = 0; k < 4; k++) {
if ((i == 0 || j == 0) && (k == 1 || k == 2)) {
if (getBaseMetaTileEntity().getBlock(tX+(tSide<4?i:tSide==5?+k:-k), tY+j, tZ+(tSide<4?tSide==3?+k:-k:i)) != GregTech_API.sBlockList[0] || getBaseMetaTileEntity().getMetaID(tX+(tSide<4?i:tSide==5?+k:-k), tY+j, tZ+(tSide<4?tSide==3?+k:-k:i)) != 14) {
tTileEntity = getBaseMetaTileEntity().getTileEntity(tX+(tSide<4?i:tSide==5?+k:-k), tY+j, tZ+(tSide<4?tSide==3?+k:-k:i));
if (tTileEntity != null && tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getMetaTileEntity() != null) {
IMetaTileEntity mte = ((IGregTechTileEntity)tTileEntity).getMetaTileEntity();
if (mte instanceof GT_MetaTileEntity_Hatch_Maintenance) {
maintenanceHatch = new WeakReference<>((GT_MetaTileEntity_Hatch_Maintenance)mte);
} else if (mte instanceof GT_MetaTileEntity_Hatch_Input) {
mInputHatches.add((GT_MetaTileEntity_Hatch_Input)mte);
} else if (mte instanceof GT_MetaTileEntity_Hatch_Output) {
mOutputHatches.add((GT_MetaTileEntity_Hatch_Output)mte);
} else if (mte instanceof GT_MetaTileEntity_Hatch_Muffler) {
mufflerHatch = new WeakReference<>((GT_MetaTileEntity_Hatch_Muffler)mte);
} else {
return false;
}
} else {
return false;
}
}
} else {
if (getBaseMetaTileEntity().getBlock(tX+(tSide<4?i:tSide==5?+k:-k), tY+j, tZ+(tSide<4?tSide==3?+k:-k:i)) != GregTech_API.sBlockList[0] || getBaseMetaTileEntity().getMetaID(tX+(tSide<4?i:tSide==5?+k:-k), tY+j, tZ+(tSide<4?tSide==3?+k:-k:i)) != 14) {
return false;
}
}
}
} else {
return false;
}
return true;
}
@Override
public void startProcess() {
if (GT_Items.Component_Turbine_Bronze.isStackEqual(mInventory[1], true, true)) {
mEfficiencyIncrease = 10;
} else if (GT_Items.Component_Turbine_Steel.isStackEqual(mInventory[1], true, true)) {
mEfficiencyIncrease = 20;
} else if (GT_Items.Component_Turbine_Magnalium.isStackEqual(mInventory[1], true, true)) {
mEfficiencyIncrease = 50;
} else if (GT_Items.Component_Turbine_TungstenSteel.isStackEqual(mInventory[1], true, true)) {
mEfficiencyIncrease = 15;
} else if (GT_Items.Component_Turbine_Carbon.isStackEqual(mInventory[1], true, true)) {
mEfficiencyIncrease = 100;
} else {
mEfficiencyIncrease = 20;
}
}
@Override
public IIcon getTextureIcon(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
if (aActive) return GT_BlockMetaID_Block.mIconGasTurbineActive[4];
return GT_BlockMetaID_Block.mIconGasTurbine[4];
}
return null;
}
@Override
public int getPollutionPerTick(ItemStack aStack) {
return 1;
}
@Override
public String getDescription() {
return "metatileentity.GT_Multi_GasTurbine.tooltip";
}
@Override
public void saveNBTData(NBTTagCompound aNBT) {
super.saveNBTData(aNBT);
aNBT.setInteger("mEfficiencyIncrease", mEfficiencyIncrease);
}
@Override
public void loadNBTData(NBTTagCompound aNBT) {
super.loadNBTData(aNBT);
mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease");
}
protected class GeneratorMultiblockRecipeLogic extends GeneratorRecipeLogic {
protected GeneratorMultiblockRecipeLogic(IntSupplier efficiency, RecipeMap<?> recipeMap, IRecipeWorkable tile) {
super(efficiency, recipeMap, tile);
}
@Override
protected boolean updateRecipeProgress() {
if (leftEU > 0) {
int EU = (int) (Math.min(((MetaTileEntity) getMachine()).maxEUOutput(), leftEU) * (efficiency.getAsInt() / 100.0D));
leftEU -= EU;
if (addEnergyOutput(EU)) {
if (leftEU <= 0) {
progressTime = 0;
maxProgressTime = 0;
EUt = 0;
leftEU = 0;
endRecipe(previousRecipe);
getMachine().endProcess();
return true;
}
}
}
return false;
}
@Override
protected void startRecipe(Recipe recipe) {
if (getMachine().spaceForOutput(recipe)) {
previousRecipe = recipe;
progressTime = 1;
leftEU = recipe.getDuration() * recipe.getEUt();
maxProgressTime = (int) Math.ceil(leftEU * 1.0D / ((MetaTileEntity) getMachine()).maxEUOutput());
if (consumeInputs(recipe)) {
triggerMachine(true);
getMachine().startProcess();
} else {
GT_Log.log.catching(new IllegalStateException("Error state detected! RecipeMap passed recipe, but it's not matching! Report about this!!!"));
leftEU = 0;
progressTime = 0;
maxProgressTime = 0;
previousRecipe = null;
}
} else {
triggerMachine(false);
}
}
}
}

View file

@ -1,220 +0,0 @@
package gregtechmod.common.tileentities.machines.multi;
import java.lang.ref.WeakReference;
import java.util.List;
import java.util.Map;
import gregtechmod.api.GregTech_API;
import gregtechmod.api.enums.GT_Items;
import gregtechmod.api.interfaces.IGregTechTileEntity;
import gregtechmod.api.interfaces.IMetaTileEntity;
import gregtechmod.api.metatileentity.MetaTileEntity;
import gregtechmod.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo;
import gregtechmod.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
import gregtechmod.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance;
import gregtechmod.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
import gregtechmod.api.metatileentity.implementations.MetaTileEntityMultiblock;
import gregtechmod.api.util.GT_ModHandler;
import gregtechmod.api.util.GT_Utility;
import gregtechmod.api.util.InfoBuilder;
import gregtechmod.common.blocks.GT_BlockMetaID_Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
public class GT_MetaTileEntity_Multi_SteamTurbine extends MetaTileEntityMultiblock {
public static final int TURBINE_OUTPUT_EU = 800;
public static final int MAX_EFFICIENCY = 100_00;
protected int mEfficiencyIncrease = 0;
@Override public boolean isFacingValid(byte aFacing) {return aFacing > 1;}
@Override public void onRightclick(EntityPlayer aPlayer) {getBaseMetaTileEntity().openGUI(aPlayer, 157, GregTech_API.gregtechmod);}
@Override public boolean isGivingInformation() {return true;}
@Override public void updateEfficiency() {}
public GT_MetaTileEntity_Multi_SteamTurbine(int aID, String mName) {
super(aID, mName);
mEfficiency = MAX_EFFICIENCY;
}
public GT_MetaTileEntity_Multi_SteamTurbine() {
mEfficiency = MAX_EFFICIENCY;
}
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_Multi_SteamTurbine();
}
@Override
public boolean isCorrectMachinePart(ItemStack aStack) {
return this.getMaxEfficiency(aStack) > 0;
}
@Override
public int getDamageToComponent(ItemStack aStack) {
return GT_Utility.areStacksEqual(GT_ModHandler.getRCItem("part.turbine.rotor", 1, GregTech_API.ITEM_WILDCARD_DAMAGE), aStack)?2:1;
}
@Override
public void onPostTick() {
super.onPostTick();
if (getBaseMetaTileEntity().isServerSide()) {
if (this.checkRecipe(mInventory[1]) && getBaseMetaTileEntity().isAllowedToWork() && getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing())) {
mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]) - ((getIdealStatus() - getRepairStatus()) * 1000)));
this.addEnergyOutput((int)(TURBINE_OUTPUT_EU * mEfficiency * 1.0D / MAX_EFFICIENCY));
if (!getBaseMetaTileEntity().isActive()) getBaseMetaTileEntity().setActive(true);
if (!doRandomMaintenanceDamage() || !polluteEnvironment(getPollutionPerTick(mInventory[1]))) {
stopMachine();
}
} else {
mEfficiency = 0;
mEfficiencyIncrease = 0;
stopMachine();
}
}
}
public boolean checkRecipe(ItemStack aStack) {
if (depleteInput(GT_ModHandler.getSteam(TURBINE_OUTPUT_EU * 2)) || depleteInput(GT_ModHandler.getIC2Steam(TURBINE_OUTPUT_EU * 2))) {
if (GT_Items.Component_Turbine_Bronze.isStackEqual(aStack, true, true)) {
this.mEfficiencyIncrease = 10;
} else if (GT_Items.Component_Turbine_Steel.isStackEqual(aStack, true, true)) {
this.mEfficiencyIncrease = 20;
} else if (GT_Items.Component_Turbine_Magnalium.isStackEqual(aStack, true, true)) {
this.mEfficiencyIncrease = 50;
} else if (GT_Items.Component_Turbine_TungstenSteel.isStackEqual(aStack, true, true)) {
this.mEfficiencyIncrease = 15;
} else if (GT_Items.Component_Turbine_Carbon.isStackEqual(aStack, true, true)) {
this.mEfficiencyIncrease = 100;
} else {
this.mEfficiencyIncrease = 20;
}
addOutput(GT_ModHandler.getWater(10));
return true;
}
return false;
}
@Override
public boolean checkMachine(ItemStack aStack) {
byte tSide = getBaseMetaTileEntity().getBackFacing();
if (getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 1) && getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 2)) {
TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 3);
if (tTileEntity != null && tTileEntity instanceof IGregTechTileEntity) if (((IGregTechTileEntity)tTileEntity).getMetaTileEntity() != null) if (((IGregTechTileEntity)tTileEntity).getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Dynamo) {
mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo)((IGregTechTileEntity)tTileEntity).getMetaTileEntity());
} else {
return false;
}
int tAirCount = 0;
for (byte i = -1; i < 2; i++) for (byte j = -1; j < 2; j++) for (byte k = -1; k < 2; k++) {
if (getBaseMetaTileEntity().getAirOffset(i, j, k)) tAirCount++;
}
if (tAirCount != 10) return false;
for (byte i = 2; i < 6; i++) {
if (null != (tTileEntity = getBaseMetaTileEntity().getTileEntityAtSideAndDistance(i, 2)) && tTileEntity instanceof IGregTechTileEntity) {
if (((IGregTechTileEntity)tTileEntity).getFrontFacing() == getBaseMetaTileEntity().getFrontFacing() && ((IGregTechTileEntity)tTileEntity).getMetaTileEntity() != null) {
if (((IGregTechTileEntity)tTileEntity).getMetaTileEntity() instanceof GT_MetaTileEntity_Multi_SteamTurbine) return false;
}
}
}
int tX = getBaseMetaTileEntity().getXCoord(), tY = getBaseMetaTileEntity().getYCoord(), tZ = getBaseMetaTileEntity().getZCoord();
for (byte i = -1; i < 2; i++) for (byte j = -1; j < 2; j++) if (i != 0 || j != 0) for (byte k = 0; k < 4; k++) {
if ((i == 0 || j == 0) && (k == 1 || k == 2)) {
if (getBaseMetaTileEntity().getBlock(tX+(tSide<4?i:tSide==5?+k:-k), tY+j, tZ+(tSide<4?tSide==3?+k:-k:i)) != GregTech_API.sBlockList[0] || getBaseMetaTileEntity().getMetaID(tX+(tSide<4?i:tSide==5?+k:-k), tY+j, tZ+(tSide<4?tSide==3?+k:-k:i)) != 13) {
tTileEntity = getBaseMetaTileEntity().getTileEntity(tX+(tSide<4?i:tSide==5?+k:-k), tY+j, tZ+(tSide<4?tSide==3?+k:-k:i));
if (tTileEntity != null && tTileEntity instanceof IGregTechTileEntity && ((IGregTechTileEntity)tTileEntity).getMetaTileEntity() != null) {
IMetaTileEntity mte = ((IGregTechTileEntity)tTileEntity).getMetaTileEntity();
if (mte instanceof GT_MetaTileEntity_Hatch_Maintenance) {
maintenanceHatch = new WeakReference<>((GT_MetaTileEntity_Hatch_Maintenance)mte);
} else if (mte instanceof GT_MetaTileEntity_Hatch_Input) {
mInputHatches.add((GT_MetaTileEntity_Hatch_Input)mte);
} else if (mte instanceof GT_MetaTileEntity_Hatch_Output) {
mOutputHatches.add((GT_MetaTileEntity_Hatch_Output)mte);
} else {
return false;
}
} else {
return false;
}
}
} else {
if (getBaseMetaTileEntity().getBlock(tX+(tSide<4?i:tSide==5?+k:-k), tY+j, tZ+(tSide<4?tSide==3?+k:-k:i)) != GregTech_API.sBlockList[0] || getBaseMetaTileEntity().getMetaID(tX+(tSide<4?i:tSide==5?+k:-k), tY+j, tZ+(tSide<4?tSide==3?+k:-k:i)) != 13) {
return false;
}
}
}
} else {
return false;
}
return true;
}
@Override
public boolean explodesOnComponentBreak(ItemStack aStack) {
return true;
}
@Override
public int getMaxEfficiency(ItemStack aStack) {
if (GT_Items.Component_Turbine_Bronze.isStackEqual(aStack, true, true)) return 60_00;
if (GT_Items.Component_Turbine_Steel.isStackEqual(aStack, true, true)) return 80_00;
if (GT_Items.Component_Turbine_Magnalium.isStackEqual(aStack, true, true)) return 100_00;
if (GT_Items.Component_Turbine_TungstenSteel.isStackEqual(aStack, true, true)) return 90_00;
if (GT_Items.Component_Turbine_Carbon.isStackEqual(aStack, true, true)) return 125_00;
if (GT_Utility.areStacksEqual(aStack, GT_ModHandler.getRCItem("part.turbine.rotor", 1, GregTech_API.ITEM_WILDCARD_DAMAGE))) return 80_00;
return 0;
}
@Override
public IIcon getTextureIcon(byte aSide, byte aFacing, boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
if (aActive) return GT_BlockMetaID_Block.mIconSteamTurbineActive[4];
return GT_BlockMetaID_Block.mIconSteamTurbine[4];
}
return null;
}
@Override
public int getPollutionPerTick(ItemStack aStack) {
return 0;
}
@Override
public Map<String, List<Object>> getInfoData() {
InfoBuilder b = InfoBuilder.create()
.newKey("metatileentity.turbine.speed", GT_Utility.parseNumberToString(mEfficiency * 100.0D / MAX_EFFICIENCY))
.newKey("metatileentity.multiblock.dynamo_output", (int)(TURBINE_OUTPUT_EU * mEfficiency * 1.0D / MAX_EFFICIENCY))
.newKey("metatileentity.multiblock.malfunction_amount", getIdealStatus() - getRepairStatus());
if (isCorrectMachinePart(mInventory[1])) {
b.newKey("metatileentity.turbine.durability", GT_Utility.parseNumberToString(mInventory[1].getMaxDamage() - mInventory[1].getItemDamage()));
} else {
b.newKey("metatileentity.turbine.no_turbine");
}
return b.build();
}
@Override
public String getDescription() {
return "metatileentity.GT_Multi_SteamTurbine.tooltip";
}
@Override
public void saveNBTData(NBTTagCompound aNBT) {
super.saveNBTData(aNBT);
aNBT.setInteger("mEfficiencyIncrease", mEfficiencyIncrease);
}
@Override
public void loadNBTData(NBTTagCompound aNBT) {
super.loadNBTData(aNBT);
mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease");
}
}

View file

@ -37,7 +37,7 @@ import net.minecraftforge.fluids.FluidStack;
public class GT_MetaTileEntity_Multi_ThermalBoiler extends MTEWorkableMultiblock {
@Override public boolean isFacingValid(byte aFacing) {return aFacing > 1;}
@Override public void onRightclick(EntityPlayer aPlayer) {getBaseMetaTileEntity().openGUI(aPlayer, 158, GregTech_API.gregtechmod);}
@Override public void onRightclick(EntityPlayer aPlayer) {getBaseMetaTileEntity().openGUI(aPlayer, 156, GregTech_API.gregtechmod);}
@Override public int maxEUOutput() {return 400;}
public GT_MetaTileEntity_Multi_ThermalBoiler(int aID, String mName) {

View file

@ -82,6 +82,9 @@ public class GT_LiquidAndFuelLoader implements Runnable {
RecipeMaps.MAGIC_FUELS.factory().EUt(24).duration(3125).input(new ItemStack(Items.ghast_tear, 1)).buildAndRegister();
RecipeMaps.MAGIC_FUELS.factory().EUt(20).duration(Materials.NetherStar.mFuelPower * 2 / 20).input(new ItemStack(Blocks.beacon, 1)).buildAndRegister();
FluidStack steam = null;
if ((steam = GT_ModHandler.getSteam(2)) != null) RecipeMaps.STEAM_FUELS.factory().EUt(1).duration(1).input(steam).buildAndRegister();
if ((steam = GT_ModHandler.getIC2Steam(2)) != null) RecipeMaps.STEAM_FUELS.factory().EUt(1).duration(1).input(steam).buildAndRegister();
GT_ModHandler.addBoilerFuel(GT_Utility.getFluidForFilledItem(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NitroCoalFuel)), 18000);
GT_ModHandler.addBoilerFuel(GT_Utility.getFluidForFilledItem(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lithium)), 24000);

View file

@ -259,9 +259,9 @@ public class GT_BookAndLootLoader implements Runnable {
}
tStack = GT_Utility.getWrittenBook("Turbine Manual", "Gregorius Techneticies", new String[] {
"This Book explains how to set up and run your advanced Gas or Steam Turbine. We are not responsible for any Damage done by this Book itself nor its content."
, "First you need to craft the following things for a normal Turbine to Function: The Main Turbine Block, 28 Machine Casings (Gas = Reinforced, Steam = Standard), a Dynamo Hatch, an Input Hatch, an Output Hatch, a Turbine Rotor, "
, "a bunch of different Tools, in case of the Gas Turbine (not needed for Steam Turbine) a Muffler Hatch, as every Machine, which burns things causes some unwanted Gasses and finally a Maintenance Hatch"
"This Book explains how to set up and run your advanced Gas, Steam and Plasme Turbines. We are not responsible for any Damage done by this Book itself nor its content."
, "First you need to craft the following things for a normal Turbine to Function: The Main Turbine Block, 28 Machine Casings (Plasma = Advanced, Gas = Reinforced, Steam = Standard), a Dynamo Hatch, an Input Hatch, an Output Hatch(only for Steam), a Turbine Rotor, "
, "a bunch of different Tools, in case of the Gas Turbine (not needed for Steam and Plasma Turbine) a Muffler Hatch, as every Machine, which burns things causes some unwanted Gasses and finally a Maintenance Hatch"
, "To begin the building, lay out the first 3x4 layer of Machine Casings on the ground, then place the Turbine Block facing outward in the middle of one of the two 3m wide Sides. Now 3 of the Casings should look like Rotors."
, "Now grab your Dynamo Hatch and place it on the opposite 3m wide Side also facing outwards. And now the four corners of the Machine need also a Machine Casing. You should have a 2x3 inbetween the two 'Walls' you just created left by now."
, "So, now place a 3x4 of Machine Casings ontop, at the 3rd Layer. The Turbine should now look like connected. There are 4 Spots left, place the Input, Output, Muffler (or another Machine Casing) and the Maintenance Hatch in the Spots facing outwards."

View file

@ -664,6 +664,10 @@ public class GT_CraftingRecipeLoader implements Runnable {
GT_ModHandler.addCraftingRecipe(new ItemStack(GregTech_API.sBlockList[1], 1,109), new Object[] {"XXX", "GMG", "XCX", 'G', OrePrefixes.gearGt.get(Materials.Steel), 'X', new ItemStack(GregTech_API.sBlockList[1], 1,34), 'M', GT_OreDictNames.craftingRawMachineTier02, 'C', OrePrefixes.circuit.get(Materials.Advanced)});
}
if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.gregtechrecipes, "multi_plasmaturbine", true)) {
GT_ModHandler.addCraftingRecipe(new ItemStack(GregTech_API.sBlockList[1], 1,117), new Object[] {"XCX", "XMX", "GCG", 'G', OrePrefixes.gearGt.get(Materials.TungstenSteel), 'X', new ItemStack(GregTech_API.sBlockList[1], 1,37), 'M', GT_OreDictNames.craftingRawMachineTier04, 'C', OrePrefixes.circuit.get(Materials.Master)});
}
if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.gregtechrecipes, "multi_thermalboiler", true)) {
GT_ModHandler.addCraftingRecipe(new ItemStack(GregTech_API.sBlockList[1], 1,110), new Object[] {"XMX", "GCG", "XMX", 'G', OrePrefixes.gearGt.get(Materials.Titanium), 'X', new ItemStack(GregTech_API.sBlockList[1], 1,35), 'M', GT_OreDictNames.craftingCentrifuge, 'C', OrePrefixes.circuit.get(Materials.Elite)});
GT_ModHandler.addCraftingRecipe(new ItemStack(GregTech_API.sBlockList[1], 1,110), new Object[] {"XMX", "GCG", "XMX", 'G', OrePrefixes.gearGt.get(Materials.TungstenSteel), 'X', new ItemStack(GregTech_API.sBlockList[1], 1,35), 'M', GT_OreDictNames.craftingCentrifuge, 'C', OrePrefixes.circuit.get(Materials.Elite)});

View file

@ -184,21 +184,6 @@ public class GT_ItemLoader implements Runnable {
GT_MetaItem_Component.addItem(88, GT_OreDictNames.craftingLock , null);
GT_MetaItem_Component.addItem(89, GT_OreDictNames.craftingMuffler , null);
// GT_MetaItem_Component.addItem(96, "gearGtIron" , null);
// GT_OreDictUnificator.registerOreLater("craftingGearTier01" , GT_MetaItem_Component.instance.getUnunifiedStack( 96, 1));
// GT_MetaItem_Component.addItem(97, "gearGtBronze" , null);
// GT_OreDictUnificator.registerOreLater("craftingGearTier01" , GT_MetaItem_Component.instance.getUnunifiedStack( 97, 1));
// GT_MetaItem_Component.addItem(98, "gearGtSteel" , null);
// GT_OreDictUnificator.registerOreLater("craftingGearTier02" , GT_MetaItem_Component.instance.getUnunifiedStack( 98, 1));
// GT_MetaItem_Component.addItem(99, "gearGtTitanium" , null);
// GT_OreDictUnificator.registerOreLater("craftingGearTier03" , GT_MetaItem_Component.instance.getUnunifiedStack( 99, 1));
// GT_MetaItem_Component.addItem(100, "gearGtTungstenSteel" , null);
// GT_OreDictUnificator.registerOreLater("craftingGearTier03" , GT_MetaItem_Component.instance.getUnunifiedStack(100, 1));
// GT_MetaItem_Component.addItem(101, "gearGtIridium" , null);
// GT_OreDictUnificator.registerOreLater("craftingGearTier04" , GT_MetaItem_Component.instance.getUnunifiedStack(101, 1));
// GT_MetaItem_Component.addItem(102, "gearGtStainlessSteel" , null);
// GT_OreDictUnificator.registerOreLater("craftingGearTier02" , GT_MetaItem_Component.instance.getUnunifiedStack(102, 1));
GT_MetaGenerated_Item_01 tMetaGenerated;
GregTech_API.sItemList[8] = tMetaGenerated = new GT_MetaGenerated_Item_01();
tMetaGenerated.setBurnValue(17000 + Materials.Wood.mMetaItemSubID, 1600);

View file

@ -9,6 +9,9 @@ import gregtechmod.api.util.GT_Log;
import gregtechmod.common.recipe.RecipeMaps;
import gregtechmod.common.tileentities.automation.*;
import gregtechmod.common.tileentities.energy.production.*;
import gregtechmod.common.tileentities.energy.production.multi.GT_MetaTileEntity_Multi_GasTurbine;
import gregtechmod.common.tileentities.energy.production.multi.GT_MetaTileEntity_Multi_SteamTurbine;
import gregtechmod.common.tileentities.energy.production.multi.MultiPlasmaTurbine;
import gregtechmod.common.tileentities.energy.storage.*;
import gregtechmod.common.tileentities.frames.*;
import gregtechmod.common.tileentities.machines.*;
@ -125,7 +128,8 @@ public class GT_MetaTileEntityLoader implements Runnable {
new GT_MetaTileEntity_Scanner (114, "GT_Scanner" , RecipeMaps.SCANNING);
new GT_MetaTileEntity_Extruder (115, "GT_Extruder" , RecipeMaps.EXTRUDING);
new GT_MetaTileEntity_ElectricRetrieverAdvanced (116, "GT_RetrieverAdvanced");
new MultiPlasmaTurbine (117, "GT_Multi_PlasmaTurbine");
new GT_MetaTileEntity_ElectricTypeFilter (126, "GT_E_T_Filter");
new GT_MetaTileEntity_ElectricFilter (127, "GT_E_Filter");

View file

@ -279,6 +279,8 @@ metatileentity.GT_Multi_GasTurbine.name=Large Gas Turbine
metatileentity.GT_Multi_GasTurbine.tooltip=About 42 small Gas Turbines worth
metatileentity.GT_Multi_SteamTurbine.name=Large Steam Turbine
metatileentity.GT_Multi_SteamTurbine.tooltip=Consumes 1600 Liters of Steam per Tick
metatileentity.GT_Multi_PlasmaTurbine.name=Large Plasma Turbine
metatileentity.GT_Multi_PlasmaTurbine.tooltip=Gives you and 8192 EU per tick!
metatileentity.GT_Multi_ThermalBoiler.name=Thermal Boiler
metatileentity.GT_Multi_ThermalBoiler.tooltip=Converts Heat into Steam
metatileentity.GT_Lathe.name=Lathe
@ -347,7 +349,7 @@ metatileentity.TileEntity_DESCRIPTION.tooltip=
metatileentity.TileEntity_EUp_IN.tooltip=Max EU/p IN: %d
metatileentity.TileEntity_EUp_OUT.tooltip=Max EU/p OUT: %d
metatileentity.TileEntity_EUp_OUT.AESU.tooltip=Max EU/p OUT: 0 - 8192 (Adjustable)
metatileentity.TileEntity_EUp_OUT.Dynamo_Hatch.tooltip=Max EU/p OUT: 0 - 2048 (depends on generated Energy)
metatileentity.TileEntity_EUp_OUT.Dynamo_Hatch.tooltip=Max EU/p OUT: 0 - 8192 (depends on generated Energy)
metatileentity.TileEntity_EUp_AMOUNT.tooltip=Amount of Output Packets: %d
metatileentity.TileEntity_EUp_STORE.tooltip=EU Storage: %d
metatileentity.TileEntity_UPGRADES.tooltip=Possible Upgrades:

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 910 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 883 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 765 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B