More fixes, added recipes for turbine components

This commit is contained in:
aidancbrady 2016-01-25 11:58:32 -05:00
parent 5f23709b0f
commit 47b06cd577
5 changed files with 34 additions and 12 deletions

View file

@ -1,9 +1,10 @@
package mekanism.common.network;
import io.netty.buffer.ByteBuf;
import java.util.ArrayList;
import mekanism.api.Coord4D;
import mekanism.api.transmitters.DynamicNetwork;
import mekanism.api.transmitters.IGridTransmitter;
import mekanism.api.transmitters.ITransmitterTile;
import mekanism.common.Mekanism;
@ -11,8 +12,7 @@ import mekanism.common.PacketHandler;
import mekanism.common.base.ITileNetwork;
import mekanism.common.network.PacketDataRequest.DataRequestMessage;
import mekanism.common.network.PacketTileEntity.TileEntityMessage;
import mekanism.common.tile.TileEntityDynamicTank;
import mekanism.common.tile.TileEntityMultiblock;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.tileentity.TileEntity;
@ -22,8 +22,6 @@ import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
import io.netty.buffer.ByteBuf;
public class PacketDataRequest implements IMessageHandler<DataRequestMessage, IMessage>
{
@Override
@ -36,9 +34,9 @@ public class PacketDataRequest implements IMessageHandler<DataRequestMessage, IM
{
TileEntity tileEntity = message.coord4D.getTileEntity(worldServer);
if(tileEntity instanceof TileEntityDynamicTank)
if(tileEntity instanceof TileEntityMultiblock)
{
((TileEntityDynamicTank)tileEntity).sendStructure = true;
((TileEntityMultiblock)tileEntity).sendStructure = true;
}
if(tileEntity instanceof ITransmitterTile)

View file

@ -56,7 +56,7 @@ public class GuiIndustrialTurbine extends GuiMekanism
int xAxis = (mouseX - (width - xSize) / 2);
int yAxis = (mouseY - (height - ySize) / 2);
fontRendererObj.drawString(tileEntity.getInventoryName(), (xSize/2)-(fontRendererObj.getStringWidth(tileEntity.getInventoryName())/2), 6, 0x404040);
fontRendererObj.drawString(tileEntity.getInventoryName(), (xSize/2)-(fontRendererObj.getStringWidth(tileEntity.getInventoryName())/2), 5, 0x404040);
double energyMultiplier = TileEntityTurbineCasing.ENERGY_PER_STEAM*Math.min(tileEntity.structure.blades, tileEntity.structure.coils*TileEntityTurbineCasing.BLADE_TO_COIL_RATIO);

View file

@ -34,16 +34,16 @@ public class GuiTurbineStats extends GuiMekanism
int xAxis = (mouseX - (width - xSize) / 2);
int yAxis = (mouseY - (height - ySize) / 2);
String stats = LangUtils.localize("gui.matrixStats");
String stats = LangUtils.localize("gui.turbineStats");
String limiting = EnumColor.DARK_RED + " (" + LangUtils.localize("gui.limiting") + ")";
fontRendererObj.drawString(stats, (xSize/2)-(fontRendererObj.getStringWidth(stats)/2), 6, 0x404040);
fontRendererObj.drawString(LangUtils.localize("gui.tankVolume") + ": " + tileEntity.structure.lowerVolume, 8, 26, 0x404040);
boolean dispersersLimiting = tileEntity.structure.clientDispersers*TileEntityTurbineCasing.DISPERSER_GAS_FLOW <
boolean dispersersLimiting = tileEntity.structure.lowerVolume*tileEntity.structure.clientDispersers*TileEntityTurbineCasing.DISPERSER_GAS_FLOW <
tileEntity.structure.vents*TileEntityTurbineCasing.VENT_GAS_FLOW;
boolean ventsLimiting = tileEntity.structure.clientDispersers*TileEntityTurbineCasing.DISPERSER_GAS_FLOW >
boolean ventsLimiting = tileEntity.structure.lowerVolume*tileEntity.structure.clientDispersers*TileEntityTurbineCasing.DISPERSER_GAS_FLOW >
tileEntity.structure.vents*TileEntityTurbineCasing.VENT_GAS_FLOW;
fontRendererObj.drawString(LangUtils.localize("gui.steamFlow"), 8, 40, 0x797979);

View file

@ -138,6 +138,30 @@ public class MekanismGenerators implements IModule
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(GeneratorsBlocks.Generator, 1, 6), new Object[] {
" O ", "OAO", "ECE", Character.valueOf('O'), "ingotOsmium", Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('E'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC)
}));
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(GeneratorsItems.TurbineBlade), new Object[] {
" S ", "SAS", " S ", Character.valueOf('S'), "ingotSteel", Character.valueOf('A'), MekanismItems.EnrichedAlloy
}));
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(GeneratorsBlocks.Generator, 1, 7), new Object[] {
"SAS", "SAS", "SAS", Character.valueOf('S'), "ingotSteel", Character.valueOf('A'), MekanismItems.EnrichedAlloy
}));
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(GeneratorsBlocks.Generator, 1, 8), new Object[] {
"SAS", "CAC", "SAS", Character.valueOf('S'), "ingotSteel", Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('C'), "circuitAdvanced"
}));
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(GeneratorsBlocks.Generator, 1, 9), new Object[] {
"SFS", "FAF", "SFS", Character.valueOf('S'), "ingotSteel", Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('F'), Blocks.iron_bars
}));
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(GeneratorsBlocks.Generator, 1, 10), new Object[] {
"SGS", "GEG", "SGS", Character.valueOf('S'), "ingotSteel", Character.valueOf('G'), "ingotGold", Character.valueOf('E'), MekanismItems.EnergyTablet.getUnchargedItem()
}));
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(GeneratorsBlocks.Generator, 4, 11), new Object[] {
" S ", "SOS", " S ", Character.valueOf('S'), "ingotSteel", Character.valueOf('O'), "ingotOsmium"
}));
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(GeneratorsBlocks.Generator, 2, 12), new Object[] {
" I ", "ICI", " I ", Character.valueOf('I'), new ItemStack(GeneratorsBlocks.Generator, 1, 11), Character.valueOf('C'), "circuitAdvanced"
}));
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(GeneratorsBlocks.Generator, 2, 13), new Object[] {
" I ", "IFI", " I ", Character.valueOf('I'), new ItemStack(GeneratorsBlocks.Generator, 1, 11), Character.valueOf('F'), Blocks.iron_bars
}));
//Reactor Recipes
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(GeneratorsBlocks.Reactor, 4, 1), new Object[] {

View file

@ -37,7 +37,7 @@ public class SynchronizedTurbineData extends SynchronizedData<SynchronizedTurbin
public double getEnergyCapacity()
{
return volume*16000000; //16 MJ energy capacity per volume
return volume*16000000D; //16 MJ energy capacity per volume
}
public boolean needsRenderUpdate()