mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Actually get it compiling again.
Seems to run ok, I think?
This commit is contained in:
1 parent
84336ec4d1
commit
78c2afb5ea
53 files changed
+290
-251
No files matched your search
@@ -21,8 +21,6 @@ import net.minecraft.util.Vec3i;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
|
||||
/**
|
||||
* Coord4D - an integer-based way to keep track of and perform operations on blocks in a Minecraft-based environment. This also takes
|
||||
|
||||
@@ -85,18 +85,12 @@ import mekanism.client.render.tileentity.RenderEnergyCube;
|
||||
import mekanism.client.render.tileentity.RenderFluidTank;
|
||||
import mekanism.client.render.tileentity.RenderFluidicPlenisher;
|
||||
import mekanism.client.render.tileentity.RenderGasTank;
|
||||
import mekanism.client.render.tileentity.RenderLaser;
|
||||
import mekanism.client.render.tileentity.RenderLaserAmplifier;
|
||||
import mekanism.client.render.tileentity.RenderLaserTractorBeam;
|
||||
import mekanism.client.render.tileentity.RenderLogisticalSorter;
|
||||
import mekanism.client.render.tileentity.RenderMetallurgicInfuser;
|
||||
import mekanism.client.render.tileentity.RenderObsidianTNT;
|
||||
import mekanism.client.render.tileentity.RenderPortableTank;
|
||||
import mekanism.client.render.tileentity.RenderPressurizedReactionChamber;
|
||||
import mekanism.client.render.tileentity.RenderRotaryCondensentrator;
|
||||
import mekanism.client.render.tileentity.RenderThermalEvaporationController;
|
||||
import mekanism.client.render.tileentity.RenderSeismicVibrator;
|
||||
import mekanism.client.render.tileentity.RenderSolarNeutronActivator;
|
||||
import mekanism.client.render.tileentity.RenderTeleporter;
|
||||
import mekanism.client.render.tileentity.RenderThermalEvaporationController;
|
||||
import mekanism.client.render.tileentity.RenderThermoelectricBoiler;
|
||||
@@ -465,7 +459,7 @@ public class ClientProxy extends CommonProxy
|
||||
registerItemRender(MekanismItems.Crystal);
|
||||
registerItemRender(MekanismItems.FreeRunners);
|
||||
registerItemRender(MekanismItems.ArmoredJetpack);
|
||||
registerItemRender(MekanismItems.FilterCard);
|
||||
registerItemRender(MekanismItems.ConfigurationCard);
|
||||
registerItemRender(MekanismItems.SeismicReader);
|
||||
registerItemRender(MekanismItems.Substrate);
|
||||
registerItemRender(MekanismItems.Polyethene);
|
||||
@@ -586,18 +580,18 @@ public class ClientProxy extends CommonProxy
|
||||
case 37:
|
||||
return new GuiChemicalCrystallizer(player.inventory, (TileEntityChemicalCrystallizer)tileEntity);
|
||||
case 38:
|
||||
ItemStack itemStack1 = player.getCurrentEquippedItem().copy();
|
||||
ItemStack itemStack1 = player.getCurrentEquippedItem();
|
||||
|
||||
if(itemStack1 != null && itemStack1.getItem() instanceof ItemSeismicReader)
|
||||
{
|
||||
return new GuiSeismicReader(world, new Coord4D(player), itemStack1);
|
||||
return new GuiSeismicReader(world, new Coord4D(player), itemStack1.copy());
|
||||
}
|
||||
case 39:
|
||||
return new GuiSeismicVibrator(player.inventory, (TileEntitySeismicVibrator)tileEntity);
|
||||
case 40:
|
||||
return new GuiPRC(player.inventory, (TileEntityPRC)tileEntity);
|
||||
case 41:
|
||||
return new GuiPortableTank(player.inventory, (TileEntityPortableTank)tileEntity);
|
||||
return new GuiFluidTank(player.inventory, (TileEntityFluidTank)tileEntity);
|
||||
case 42:
|
||||
return new GuiFluidicPlenisher(player.inventory, (TileEntityFluidicPlenisher)tileEntity);
|
||||
case 43:
|
||||
@@ -607,7 +601,7 @@ public class ClientProxy extends CommonProxy
|
||||
case 45:
|
||||
return new GuiLaserTractorBeam(player.inventory, (TileEntityLaserTractorBeam)tileEntity);
|
||||
case 46:
|
||||
return new GuiEntangledBlock(player.inventory, (TileEntityEntangledBlock)tileEntity);
|
||||
return new GuiQuantumEntangloporter(player.inventory, (TileEntityQuantumEntangloporter)tileEntity);
|
||||
case 47:
|
||||
return new GuiSolarNeutronActivator(player.inventory, (TileEntitySolarNeutronActivator)tileEntity);
|
||||
case 48:
|
||||
|
||||
@@ -422,11 +422,11 @@ public class ClientTickHandler
|
||||
}
|
||||
else if(jetpack.getMode(stack) == JetpackMode.HOVER)
|
||||
{
|
||||
if((!mc.gameSettings.keyBindJump.getIsKeyPressed() && !mc.gameSettings.keyBindSneak.getIsKeyPressed()) || (mc.gameSettings.keyBindJump.getIsKeyPressed() && mc.gameSettings.keyBindSneak.getIsKeyPressed()) || mc.currentScreen != null)
|
||||
if((!mc.gameSettings.keyBindJump.isPressed() && !mc.gameSettings.keyBindSneak.isPressed()) || (mc.gameSettings.keyBindJump.isPressed() && mc.gameSettings.keyBindSneak.isPressed()) || mc.currentScreen != null)
|
||||
{
|
||||
return !player.onGround;
|
||||
}
|
||||
else if(mc.gameSettings.keyBindSneak.getIsKeyPressed() && mc.currentScreen == null)
|
||||
else if(mc.gameSettings.keyBindSneak.isPressed() && mc.currentScreen == null)
|
||||
{
|
||||
return !player.onGround;
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiBoilerStats extends GuiMekanism
|
||||
|
||||
@@ -66,7 +66,7 @@ public class GuiElectricPump extends GuiMekanism
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString(tileEntity.getName(), (xSize / 2) - (fontRendererObj.getStringWidth(tileEntity.getInventoryName()) / 2), 6, 0x404040);
|
||||
fontRendererObj.drawString(tileEntity.getName(), (xSize / 2) - (fontRendererObj.getStringWidth(tileEntity.getName()) / 2), 6, 0x404040);
|
||||
fontRendererObj.drawString(LangUtils.localize("container.inventory"), 8, (ySize - 94) + 2, 0x404040);
|
||||
fontRendererObj.drawString(MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()), 51, 26, 0x00CD00);
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ public class GuiFluidicPlenisher extends GuiMekanism
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString(tileEntity.getName(), (xSize / 2) - (fontRendererObj.getStringWidth(tileEntity.getInventoryName()) / 2), 6, 0x404040);
|
||||
fontRendererObj.drawString(tileEntity.getName(), (xSize / 2) - (fontRendererObj.getStringWidth(tileEntity.getName()) / 2), 6, 0x404040);
|
||||
fontRendererObj.drawString(LangUtils.localize("container.inventory"), 8, (ySize - 94) + 2, 0x404040);
|
||||
fontRendererObj.drawString(MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()), 51, 26, 0x00CD00);
|
||||
fontRendererObj.drawString(LangUtils.localize("gui.finished") + ": " + LangUtils.transYesNo(tileEntity.finishedCalc), 51, 35, 0x00CD00);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package mekanism.client.gui;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -30,8 +31,8 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiFormulaicAssemblicator extends GuiMekanism
|
||||
@@ -65,7 +66,7 @@ public class GuiFormulaicAssemblicator 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.getName(), (xSize/2)-(fontRendererObj.getStringWidth(tileEntity.getName())/2), 6, 0x404040);
|
||||
fontRendererObj.drawString(LangUtils.localize("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
|
||||
|
||||
if(xAxis >= 44 && xAxis <= 60 && yAxis >= 75 && yAxis <= 91)
|
||||
@@ -199,7 +200,7 @@ public class GuiFormulaicAssemblicator extends GuiMekanism
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
MekanismRenderer.blendOn();
|
||||
itemRender.renderItemAndEffectIntoGUI(fontRendererObj, mc.getTextureManager(), stack, guiWidth + slot.xDisplayPosition, guiHeight + slot.yDisplayPosition);
|
||||
itemRender.renderItemAndEffectIntoGUI(stack, guiWidth + slot.xDisplayPosition, guiHeight + slot.yDisplayPosition);
|
||||
MekanismRenderer.blendOff();
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
@@ -217,7 +218,7 @@ public class GuiFormulaicAssemblicator extends GuiMekanism
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int mouseX, int mouseY, int button)
|
||||
protected void mouseClicked(int mouseX, int mouseY, int button) throws IOException
|
||||
{
|
||||
super.mouseClicked(mouseX, mouseY, button);
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package mekanism.client.gui;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -28,8 +29,8 @@ import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiQuantumEntangloporter extends GuiMekanism
|
||||
@@ -90,7 +91,7 @@ public class GuiQuantumEntangloporter extends GuiMekanism
|
||||
setButton = new GuiButton(2, guiWidth + 27, guiHeight + 116, 60, 20, LangUtils.localize("gui.set"));
|
||||
deleteButton = new GuiButton(3, guiWidth + 89, guiHeight + 116, 60, 20, LangUtils.localize("gui.delete"));
|
||||
|
||||
frequencyField = new GuiTextField(fontRendererObj, guiWidth + 50, guiHeight + 104, 86, 11);
|
||||
frequencyField = new GuiTextField(4, fontRendererObj, guiWidth + 50, guiHeight + 104, 86, 11);
|
||||
frequencyField.setMaxStringLength(MAX_LENGTH);
|
||||
frequencyField.setEnableBackgroundDrawing(false);
|
||||
|
||||
@@ -194,7 +195,7 @@ public class GuiQuantumEntangloporter extends GuiMekanism
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseClicked(int mouseX, int mouseY, int button)
|
||||
public void mouseClicked(int mouseX, int mouseY, int button) throws IOException
|
||||
{
|
||||
super.mouseClicked(mouseX, mouseY, button);
|
||||
|
||||
@@ -217,7 +218,7 @@ public class GuiQuantumEntangloporter extends GuiMekanism
|
||||
}
|
||||
|
||||
@Override
|
||||
public void keyTyped(char c, int i)
|
||||
public void keyTyped(char c, int i) throws IOException
|
||||
{
|
||||
if(!frequencyField.isFocused() || i == Keyboard.KEY_ESCAPE)
|
||||
{
|
||||
@@ -242,7 +243,7 @@ public class GuiQuantumEntangloporter extends GuiMekanism
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton guibutton)
|
||||
protected void actionPerformed(GuiButton guibutton) throws IOException
|
||||
{
|
||||
super.actionPerformed(guibutton);
|
||||
|
||||
@@ -299,7 +300,7 @@ public class GuiQuantumEntangloporter 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), 4, 0x404040);
|
||||
fontRendererObj.drawString(tileEntity.getName(), (xSize/2)-(fontRendererObj.getStringWidth(tileEntity.getName())/2), 4, 0x404040);
|
||||
fontRendererObj.drawString(LangUtils.localize("gui.owner") + ": " + (tileEntity.owner != null ? tileEntity.owner : LangUtils.localize("gui.none")), 8, (ySize-96)+4, 0x404040);
|
||||
|
||||
fontRendererObj.drawString(LangUtils.localize("gui.freq") + ":", 32, 81, 0x404040);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package mekanism.client.gui;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -29,8 +30,8 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiResistiveHeater extends GuiMekanism
|
||||
@@ -76,7 +77,7 @@ public class GuiResistiveHeater extends GuiMekanism
|
||||
|
||||
String prevEnergyUsage = energyUsageField != null ? energyUsageField.getText() : "";
|
||||
|
||||
energyUsageField = new GuiTextField(fontRendererObj, guiWidth + 49, guiHeight + 52, 66, 11);
|
||||
energyUsageField = new GuiTextField(0, fontRendererObj, guiWidth + 49, guiHeight + 52, 66, 11);
|
||||
energyUsageField.setMaxStringLength(7);
|
||||
energyUsageField.setEnableBackgroundDrawing(false);
|
||||
energyUsageField.setText(prevEnergyUsage);
|
||||
@@ -85,7 +86,7 @@ public class GuiResistiveHeater extends GuiMekanism
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString(tileEntity.getInventoryName(), (xSize / 2) - (fontRendererObj.getStringWidth(tileEntity.getInventoryName()) / 2), 6, 0x404040);
|
||||
fontRendererObj.drawString(tileEntity.getName(), (xSize / 2) - (fontRendererObj.getStringWidth(tileEntity.getName()) / 2), 6, 0x404040);
|
||||
fontRendererObj.drawString(LangUtils.localize("container.inventory"), 8, (ySize - 94) + 2, 0x404040);
|
||||
|
||||
renderScaledText(LangUtils.localize("gui.temp") + ": " + MekanismUtils.getTemperatureDisplay(tileEntity.temperature, TemperatureUnit.AMBIENT), 50, 25, 0x00CD00, 76);
|
||||
@@ -143,7 +144,7 @@ public class GuiResistiveHeater extends GuiMekanism
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseClicked(int mouseX, int mouseY, int button)
|
||||
public void mouseClicked(int mouseX, int mouseY, int button) throws IOException
|
||||
{
|
||||
super.mouseClicked(mouseX, mouseY, button);
|
||||
|
||||
@@ -163,7 +164,7 @@ public class GuiResistiveHeater extends GuiMekanism
|
||||
}
|
||||
|
||||
@Override
|
||||
public void keyTyped(char c, int i)
|
||||
public void keyTyped(char c, int i) throws IOException
|
||||
{
|
||||
if(!energyUsageField.isFocused() || i == Keyboard.KEY_ESCAPE)
|
||||
{
|
||||
|
||||
@@ -24,8 +24,8 @@ import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiThermoelectricBoiler extends GuiMekanism
|
||||
@@ -83,7 +83,7 @@ public class GuiThermoelectricBoiler extends GuiMekanism
|
||||
int yAxis = (mouseY - (height - ySize) / 2);
|
||||
|
||||
fontRendererObj.drawString(LangUtils.localize("container.inventory"), 8, (ySize - 96) + 4, 0x404040);
|
||||
fontRendererObj.drawString(tileEntity.getInventoryName(), (xSize/2)-(fontRendererObj.getStringWidth(tileEntity.getInventoryName())/2), 5, 0x404040);
|
||||
fontRendererObj.drawString(tileEntity.getName(), (xSize/2)-(fontRendererObj.getStringWidth(tileEntity.getName())/2), 5, 0x404040);
|
||||
|
||||
renderScaledText(LangUtils.localize("gui.temp") + ": " + MekanismUtils.getTemperatureDisplay(tileEntity.structure.temperature, TemperatureUnit.AMBIENT), 43, 30, 0x00CD00, 90);
|
||||
renderScaledText(LangUtils.localize("gui.boilRate") + ": " + tileEntity.structure.lastBoilRate + " mB/t", 43, 39, 0x00CD00, 90);
|
||||
@@ -151,7 +151,7 @@ public class GuiThermoelectricBoiler extends GuiMekanism
|
||||
}
|
||||
|
||||
mc.renderEngine.bindTexture(MekanismRenderer.getBlocksTexture());
|
||||
drawTexturedModelRectFromIcon(guiWidth + xPos, guiHeight + yPos + 58 - renderRemaining - start, fluid.getFluid().getIcon(), 16, 16 - (16 - renderRemaining));
|
||||
//TODO drawTexturedModelRectFromIcon(guiWidth + xPos, guiHeight + yPos + 58 - renderRemaining - start, fluid.getFluid().getIcon(), 16, 16 - (16 - renderRemaining));
|
||||
start+=16;
|
||||
|
||||
if(renderRemaining == 0 || scale == 0)
|
||||
|
||||
@@ -10,9 +10,8 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import codechicken.lib.vec.Rectangle4i;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiBoilerTab extends GuiElement
|
||||
|
||||
@@ -11,9 +11,8 @@ import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import codechicken.lib.vec.Rectangle4i;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiGraph extends GuiElement
|
||||
|
||||
@@ -10,9 +10,8 @@ import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import codechicken.lib.vec.Rectangle4i;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiHeatInfo extends GuiElement
|
||||
|
||||
@@ -152,7 +152,7 @@ public class MekanismRenderer
|
||||
|
||||
RenderDynamicTank.resetDisplayInts();
|
||||
RenderThermalEvaporationController.resetDisplayInts();
|
||||
RenderPortableTank.resetDisplayInts();
|
||||
RenderFluidTank.resetDisplayInts();
|
||||
}
|
||||
|
||||
public static void initFluidTextures(TextureMap map) {
|
||||
|
||||
@@ -179,7 +179,7 @@ public class RenderTickHandler
|
||||
Pos3D motion = vec.clone().scale(0.2).translate(new Pos3D(p.motionX, p.motionY, p.motionZ));
|
||||
|
||||
Pos3D v = playerPos.clone().translate(vec);
|
||||
spawnAndSetParticle("bubble", world, v.xPos, v.yPos, v.zPos, motion.xPos, motion.yPos + 0.2, motion.zPos);
|
||||
spawnAndSetParticle(EnumParticleTypes.WATER_BUBBLE, world, v.xCoord, v.yCoord, v.zCoord, motion.xCoord, motion.yCoord + 0.2, motion.zCoord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.entity.EntityFlame;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@@ -16,6 +17,11 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderFlame extends Render<EntityFlame>
|
||||
{
|
||||
public RenderFlame(RenderManager renderManager)
|
||||
{
|
||||
super(renderManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRender(EntityFlame entity, double x, double y, double z, float f, float partialTick)
|
||||
{
|
||||
|
||||
@@ -3,10 +3,12 @@ package mekanism.client.render.particle;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntityBubbleFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.fml.client.FMLClientHandler;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class EntityScubaBubbleFX extends EntityBubbleFX
|
||||
@@ -28,14 +30,13 @@ public class EntityScubaBubbleFX extends EntityBubbleFX
|
||||
|
||||
particleAge++;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void renderParticle(Tessellator p_70539_1_, float p_70539_2_, float p_70539_3_, float p_70539_4_, float p_70539_5_, float p_70539_6_, float p_70539_7_)
|
||||
public void renderParticle(WorldRenderer worldRendererIn, Entity entityIn, float partialTicks, float p_180434_4_, float p_180434_5_, float p_180434_6_, float p_180434_7_, float p_180434_8_)
|
||||
{
|
||||
if(particleAge > 0)
|
||||
{
|
||||
particleAlpha = Math.min(1, (particleAge+p_70539_2_)/20F);
|
||||
super.renderParticle(p_70539_1_, p_70539_2_, p_70539_3_, p_70539_4_, p_70539_5_, p_70539_6_, p_70539_7_);
|
||||
super.renderParticle(worldRendererIn, entityIn, partialTicks, p_180434_4_, p_180434_5_, p_180434_6_, p_180434_7_, p_180434_8_);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,11 +21,11 @@ import net.minecraftforge.fluids.FluidRegistry;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer
|
||||
public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer<TileEntityBoilerCasing>
|
||||
{
|
||||
private static Map<RenderData, DisplayInteger[]> cachedLowerFluids = new HashMap<RenderData, DisplayInteger[]>();
|
||||
private static Map<RenderData, DisplayInteger> cachedUpperFluids = new HashMap<RenderData, DisplayInteger>();
|
||||
@@ -35,12 +35,7 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer
|
||||
private Fluid WATER = FluidRegistry.WATER;
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTick)
|
||||
{
|
||||
renderAModelAt((TileEntityBoilerCasing)tileEntity, x, y, z, partialTick);
|
||||
}
|
||||
|
||||
public void renderAModelAt(TileEntityBoilerCasing tileEntity, double x, double y, double z, float partialTick)
|
||||
public void renderTileEntityAt(TileEntityBoilerCasing tileEntity, double x, double y, double z, float partialTick, int destroyStage)
|
||||
{
|
||||
if(tileEntity.clientHasStructure && tileEntity.isRendering && tileEntity.structure != null && tileEntity.structure.renderLocation != null && tileEntity.structure.upperRenderLocation != null)
|
||||
{
|
||||
@@ -49,7 +44,7 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer
|
||||
RenderData data = new RenderData();
|
||||
|
||||
data.location = tileEntity.structure.renderLocation;
|
||||
data.height = (tileEntity.structure.upperRenderLocation.yCoord-1)-tileEntity.structure.renderLocation.yCoord;
|
||||
data.height = (tileEntity.structure.upperRenderLocation.getY()-1)-tileEntity.structure.renderLocation.getY();
|
||||
data.length = tileEntity.structure.volLength;
|
||||
data.width = tileEntity.structure.volWidth;
|
||||
|
||||
@@ -59,12 +54,12 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer
|
||||
{
|
||||
push();
|
||||
|
||||
GL11.glTranslated(getX(data.location.xCoord), getY(data.location.yCoord), getZ(data.location.zCoord));
|
||||
GL11.glTranslated(getX(data.location.getX()), getY(data.location.getY()), getZ(data.location.getZ()));
|
||||
|
||||
MekanismRenderer.glowOn(tileEntity.structure.waterStored.getFluid().getLuminosity());
|
||||
MekanismRenderer.colorFluid(tileEntity.structure.waterStored.getFluid());
|
||||
|
||||
DisplayInteger[] displayList = getLowerDisplay(data, tileEntity.structure.waterStored.getFluid(), tileEntity.getWorldObj());
|
||||
DisplayInteger[] displayList = getLowerDisplay(data, tileEntity.structure.waterStored.getFluid(), tileEntity.getWorld());
|
||||
|
||||
if(tileEntity.structure.waterStored.getFluid().isGaseous())
|
||||
{
|
||||
@@ -84,11 +79,11 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer
|
||||
{
|
||||
push();
|
||||
|
||||
GL11.glTranslated(getX(valveData.location.xCoord), getY(valveData.location.yCoord), getZ(valveData.location.zCoord));
|
||||
GL11.glTranslated(getX(valveData.location.getX()), getY(valveData.location.getY()), getZ(valveData.location.getZ()));
|
||||
|
||||
MekanismRenderer.glowOn(tileEntity.structure.waterStored.getFluid().getLuminosity());
|
||||
|
||||
getValveDisplay(ValveRenderData.get(data, valveData), tileEntity.structure.waterStored.getFluid(), tileEntity.getWorldObj()).render();
|
||||
getValveDisplay(ValveRenderData.get(data, valveData), tileEntity.structure.waterStored.getFluid(), tileEntity.getWorld()).render();
|
||||
|
||||
MekanismRenderer.glowOff();
|
||||
MekanismRenderer.resetColor();
|
||||
@@ -103,7 +98,7 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer
|
||||
RenderData data = new RenderData();
|
||||
|
||||
data.location = tileEntity.structure.upperRenderLocation;
|
||||
data.height = (tileEntity.structure.renderLocation.yCoord+tileEntity.structure.volHeight-2)-(tileEntity.structure.upperRenderLocation.yCoord);
|
||||
data.height = (tileEntity.structure.renderLocation.getY()+tileEntity.structure.volHeight-2)-(tileEntity.structure.upperRenderLocation.getY());
|
||||
data.length = tileEntity.structure.volLength;
|
||||
data.width = tileEntity.structure.volWidth;
|
||||
|
||||
@@ -113,12 +108,12 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer
|
||||
{
|
||||
push();
|
||||
|
||||
GL11.glTranslated(getX(data.location.xCoord), getY(data.location.yCoord), getZ(data.location.zCoord));
|
||||
GL11.glTranslated(getX(data.location.getX()), getY(data.location.getY()), getZ(data.location.getZ()));
|
||||
|
||||
MekanismRenderer.glowOn(tileEntity.structure.steamStored.getFluid().getLuminosity());
|
||||
MekanismRenderer.colorFluid(tileEntity.structure.steamStored.getFluid());
|
||||
|
||||
DisplayInteger display = getUpperDisplay(data, tileEntity.structure.steamStored.getFluid(), tileEntity.getWorldObj());
|
||||
DisplayInteger display = getUpperDisplay(data, tileEntity.structure.steamStored.getFluid(), tileEntity.getWorld());
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, Math.min(1, ((float)tileEntity.structure.steamStored.amount / (float)tileEntity.clientSteamCapacity)+MekanismRenderer.GAS_RENDER_BASE));
|
||||
display.render();
|
||||
@@ -157,7 +152,7 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer
|
||||
|
||||
Model3D toReturn = new Model3D();
|
||||
toReturn.baseBlock = Blocks.water;
|
||||
toReturn.setTexture(fluid.getIcon());
|
||||
toReturn.setTexture(fluid.getStill());
|
||||
|
||||
final int stages = getStages(data.height);
|
||||
DisplayInteger[] displays = new DisplayInteger[stages];
|
||||
@@ -168,7 +163,7 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer
|
||||
{
|
||||
displays[i] = DisplayInteger.createAndStart();
|
||||
|
||||
if(fluid.getIcon() != null)
|
||||
if(fluid.getStill() != null)
|
||||
{
|
||||
toReturn.minX = 0 + .01;
|
||||
toReturn.minY = 0 + .01;
|
||||
@@ -196,14 +191,14 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer
|
||||
|
||||
Model3D toReturn = new Model3D();
|
||||
toReturn.baseBlock = Blocks.water;
|
||||
toReturn.setTexture(fluid.getIcon());
|
||||
toReturn.setTexture(fluid.getStill());
|
||||
|
||||
final int stages = getStages(data.height);
|
||||
DisplayInteger display = DisplayInteger.createAndStart();
|
||||
|
||||
cachedUpperFluids.put(data, display);
|
||||
|
||||
if(STEAM.getIcon() != null)
|
||||
if(STEAM.getStill() != null)
|
||||
{
|
||||
toReturn.minX = 0 + .01;
|
||||
toReturn.minY = 0 + .01;
|
||||
@@ -230,7 +225,7 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer
|
||||
|
||||
Model3D toReturn = new Model3D();
|
||||
toReturn.baseBlock = Blocks.water;
|
||||
toReturn.setTexture(fluid.getFlowingIcon());
|
||||
toReturn.setTexture(fluid.getFlowing());
|
||||
|
||||
DisplayInteger display = DisplayInteger.createAndStart();
|
||||
|
||||
@@ -310,7 +305,7 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer
|
||||
}
|
||||
}
|
||||
|
||||
if(fluid.getFlowingIcon() != null)
|
||||
if(fluid.getFlowing() != null)
|
||||
{
|
||||
MekanismRenderer.renderObject(toReturn);
|
||||
}
|
||||
@@ -322,7 +317,7 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer
|
||||
|
||||
private int getValveFluidHeight(ValveRenderData data)
|
||||
{
|
||||
return data.valveLocation.yCoord - data.location.yCoord;
|
||||
return data.valveLocation.getY() - data.location.getY();
|
||||
}
|
||||
|
||||
private int getStages(int height)
|
||||
|
||||
@@ -10,12 +10,14 @@ import mekanism.common.item.ItemJetpack.JetpackMode;
|
||||
import mekanism.common.item.ItemScubaTank;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.NetHandlerPlayServer;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.TickEvent.Phase;
|
||||
@@ -138,12 +140,13 @@ public class CommonPlayerTickHandler
|
||||
public static boolean isOnGround(EntityPlayer player)
|
||||
{
|
||||
int x = MathHelper.floor_double(player.posX);
|
||||
int y = (int)Math.round(player.posY-player.yOffset - 1);
|
||||
int y = (int)Math.round(player.posY - 1);
|
||||
int z = MathHelper.floor_double(player.posZ);
|
||||
|
||||
Block b = player.worldObj.getBlock(x, y, z);
|
||||
AxisAlignedBB box = b.getCollisionBoundingBoxFromPool(player.worldObj, x, y, z);
|
||||
AxisAlignedBB playerBox = player.boundingBox.copy().offset(0, -0.01, 0);
|
||||
|
||||
BlockPos pos = new BlockPos(x, y, z);
|
||||
IBlockState s = player.worldObj.getBlockState(pos);
|
||||
AxisAlignedBB box = s.getBlock().getCollisionBoundingBox(player.worldObj, pos, s);
|
||||
AxisAlignedBB playerBox = player.getCollisionBoundingBox().offset(0, -0.01, 0);
|
||||
|
||||
return box != null && playerBox.intersectsWith(box);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import mekanism.api.IHeatTransfer;
|
||||
import mekanism.api.transmitters.DynamicNetwork;
|
||||
import mekanism.api.transmitters.IGridTransmitter;
|
||||
import mekanism.api.util.UnitDisplayUtils.TemperatureUnit;
|
||||
import mekanism.common.multipart.MultipartTransmitter;
|
||||
//import mekanism.common.multipart.MultipartTransmitter;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
|
||||
@@ -77,6 +77,7 @@ public class HeatNetwork extends DynamicNetwork<IHeatTransfer, HeatNetwork>
|
||||
{
|
||||
for(IGridTransmitter<IHeatTransfer, HeatNetwork> transmitter : transmitters)
|
||||
{
|
||||
/*
|
||||
if(transmitter instanceof MultipartTransmitter && ((MultipartTransmitter)transmitter).getPart() instanceof IHeatTransfer)
|
||||
{
|
||||
IHeatTransfer heatTransmitter = (IHeatTransfer)((MultipartTransmitter)transmitter).getPart();
|
||||
@@ -84,15 +85,18 @@ public class HeatNetwork extends DynamicNetwork<IHeatTransfer, HeatNetwork>
|
||||
newHeatTransferred += d[0];
|
||||
newHeatLost += d[1];
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
for(IGridTransmitter<IHeatTransfer, HeatNetwork> transmitter : transmitters)
|
||||
{
|
||||
/*
|
||||
if(transmitter instanceof MultipartTransmitter && ((MultipartTransmitter)transmitter).getPart() instanceof IHeatTransfer)
|
||||
{
|
||||
IHeatTransfer heatTransmitter = (IHeatTransfer)((MultipartTransmitter)transmitter).getPart();
|
||||
newSumTemp += heatTransmitter.applyTemperatureChange();
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ import mekanism.common.base.IChunkLoadHandler;
|
||||
import mekanism.common.base.IFactory.RecipeType;
|
||||
import mekanism.common.base.IModule;
|
||||
import mekanism.common.block.states.BlockStateMachine;
|
||||
import mekanism.common.block.states.BlockStateMachine.MachineType;
|
||||
import mekanism.common.chunkloading.ChunkManager;
|
||||
import mekanism.common.content.boiler.SynchronizedBoilerData;
|
||||
import mekanism.common.content.entangloporter.InventoryFrequency;
|
||||
@@ -1269,7 +1270,7 @@ public class Mekanism
|
||||
GasRegistry.register(new Gas("lithium")).registerFluid();
|
||||
|
||||
FluidRegistry.registerFluid(new Fluid("heavyWater", new ResourceLocation("mekanism:heavy_water"), new ResourceLocation("mekanism:heavy_water")));
|
||||
FluidRegistry.registerFluid(new Fluid("steam").setGaseous(true));
|
||||
FluidRegistry.registerFluid(new Fluid("steam", new ResourceLocation("mekanism:steam"), new ResourceLocation("mekanism:steam")).setGaseous(true));
|
||||
|
||||
for(Resource resource : Resource.values())
|
||||
{
|
||||
|
||||
@@ -577,7 +577,7 @@ public final class Tier
|
||||
return BASIC;
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
public static enum FluidTankTier implements ITier
|
||||
{
|
||||
BASIC(14000, 400),
|
||||
@@ -711,7 +711,6 @@ public final class Tier
|
||||
dataStream.writeInt(storage);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
public static void init()
|
||||
{
|
||||
@@ -776,6 +775,5 @@ public final class Tier
|
||||
public void readConfig(ByteBuf dataStream);
|
||||
|
||||
public void writeConfig(ByteBuf dataStream);
|
||||
*/
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package mekanism.common.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import mekanism.common.block.states.BlockStateBounding;
|
||||
import mekanism.common.tile.TileEntityAdvancedBoundingBlock;
|
||||
import mekanism.common.tile.TileEntityBoundingBlock;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
@@ -10,6 +10,7 @@ import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.energy.IEnergizedItem;
|
||||
import mekanism.api.energy.IStrictEnergyStorage;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.Tier.BaseTier;
|
||||
import mekanism.common.Tier.FluidTankTier;
|
||||
import mekanism.common.base.IActiveState;
|
||||
import mekanism.common.base.IBoundingBlock;
|
||||
@@ -43,6 +44,7 @@ import mekanism.common.tile.TileEntityLaserAmplifier;
|
||||
import mekanism.common.tile.TileEntityLogisticalSorter;
|
||||
import mekanism.common.tile.TileEntityMetallurgicInfuser;
|
||||
import mekanism.common.tile.TileEntityFluidTank;
|
||||
import mekanism.common.tile.TileEntityQuantumEntangloporter;
|
||||
import mekanism.common.tile.TileEntityTeleporter;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
@@ -337,7 +339,7 @@ public abstract class BlockMachine extends BlockContainer implements ISpecialBou
|
||||
else if(tileEntity instanceof TileEntityQuantumEntangloporter)
|
||||
{
|
||||
TileEntityQuantumEntangloporter entangloporter = (TileEntityQuantumEntangloporter)tileEntity;
|
||||
entangloporter.owner = entityliving.getCommandSenderName();
|
||||
entangloporter.owner = placer.getName();
|
||||
}
|
||||
|
||||
if(tileEntity instanceof IBoundingBlock)
|
||||
@@ -699,12 +701,12 @@ public abstract class BlockMachine extends BlockContainer implements ISpecialBou
|
||||
|
||||
if(teleporter.owner == null)
|
||||
{
|
||||
teleporter.owner = entityplayer.getCommandSenderName();
|
||||
teleporter.owner = entityplayer.getName();
|
||||
}
|
||||
|
||||
if(teleporter.owner.equals(entityplayer.getCommandSenderName()) || MekanismUtils.isOp((EntityPlayerMP)entityplayer))
|
||||
if(teleporter.owner.equals(entityplayer.getName()) || MekanismUtils.isOp((EntityPlayerMP)entityplayer))
|
||||
{
|
||||
entityplayer.openGui(Mekanism.instance, type.guiId, world, x, y, z);
|
||||
entityplayer.openGui(Mekanism.instance, type.guiId, world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
else {
|
||||
entityplayer.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("gui.entangloporter.noAccess")));
|
||||
@@ -1107,7 +1109,7 @@ public abstract class BlockMachine extends BlockContainer implements ISpecialBou
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBox(World world, BlockPos pos, IBlockState state)
|
||||
{
|
||||
setBlockBoundsBasedOnState(world, x, y, z);
|
||||
setBlockBoundsBasedOnState(world, pos);
|
||||
|
||||
if(world.getTileEntity(pos) instanceof TileEntityChargepad)
|
||||
{
|
||||
|
||||
@@ -30,9 +30,10 @@ import mekanism.common.tile.TileEntityElectrolyticSeparator;
|
||||
import mekanism.common.tile.TileEntityEliteFactory;
|
||||
import mekanism.common.tile.TileEntityEnergizedSmelter;
|
||||
import mekanism.common.tile.TileEntityEnrichmentChamber;
|
||||
import mekanism.common.tile.TileEntityEntangledBlock;
|
||||
import mekanism.common.tile.TileEntityFactory;
|
||||
import mekanism.common.tile.TileEntityFluidTank;
|
||||
import mekanism.common.tile.TileEntityFluidicPlenisher;
|
||||
import mekanism.common.tile.TileEntityFormulaicAssemblicator;
|
||||
import mekanism.common.tile.TileEntityLaser;
|
||||
import mekanism.common.tile.TileEntityLaserAmplifier;
|
||||
import mekanism.common.tile.TileEntityLaserTractorBeam;
|
||||
@@ -41,9 +42,10 @@ import mekanism.common.tile.TileEntityMetallurgicInfuser;
|
||||
import mekanism.common.tile.TileEntityOredictionificator;
|
||||
import mekanism.common.tile.TileEntityOsmiumCompressor;
|
||||
import mekanism.common.tile.TileEntityPRC;
|
||||
import mekanism.common.tile.TileEntityPortableTank;
|
||||
import mekanism.common.tile.TileEntityPrecisionSawmill;
|
||||
import mekanism.common.tile.TileEntityPurificationChamber;
|
||||
import mekanism.common.tile.TileEntityQuantumEntangloporter;
|
||||
import mekanism.common.tile.TileEntityResistiveHeater;
|
||||
import mekanism.common.tile.TileEntityRotaryCondensentrator;
|
||||
import mekanism.common.tile.TileEntitySeismicVibrator;
|
||||
import mekanism.common.tile.TileEntitySolarNeutronActivator;
|
||||
@@ -141,17 +143,17 @@ public class BlockStateMachine extends BlockStateFacing
|
||||
CHEMICAL_CRYSTALLIZER(MachineBlock.MACHINE_BLOCK_2, 8, "ChemicalCrystallizer", 37, TileEntityChemicalCrystallizer.class, true, true, true, Plane.HORIZONTAL, true),
|
||||
SEISMIC_VIBRATOR(MachineBlock.MACHINE_BLOCK_2, 9, "SeismicVibrator", 39, TileEntitySeismicVibrator.class, true, true, false, Plane.HORIZONTAL, true),
|
||||
PRESSURIZED_REACTION_CHAMBER(MachineBlock.MACHINE_BLOCK_2, 10, "PressurizedReactionChamber", 40, TileEntityPRC.class, true, true, false, Plane.HORIZONTAL, true),
|
||||
PORTABLE_TANK(MachineBlock.MACHINE_BLOCK_2, 11, "PortableTank", 41, TileEntityPortableTank.class, false, true, false, never, true),
|
||||
FLUID_TANK(MachineBlock.MACHINE_BLOCK_2, 11, "PortableTank", 41, TileEntityFluidTank.class, false, true, false, never, true),
|
||||
FLUIDIC_PLENISHER(MachineBlock.MACHINE_BLOCK_2, 12, "FluidicPlenisher", 42, TileEntityFluidicPlenisher.class, true, true, false, Plane.HORIZONTAL, true),
|
||||
LASER(MachineBlock.MACHINE_BLOCK_2, 13, "Laser", -1, TileEntityLaser.class, true, true, false, always, false),
|
||||
LASER_AMPLIFIER(MachineBlock.MACHINE_BLOCK_2, 14, "LaserAmplifier", 44, TileEntityLaserAmplifier.class, false, true, false, always, true),
|
||||
LASER_TRACTOR_BEAM(MachineBlock.MACHINE_BLOCK_2, 15, "LaserTractorBeam", 45, TileEntityLaserTractorBeam.class, false, true, false, always, true),
|
||||
QUANTUM_ENTANGLOPORTER(MachineBlock.MACHINE_BLOCK_3, 0, "EntangledBlock", 46, TileEntityEntangledBlock.class, true, false, false, Plane.HORIZONTAL, true),
|
||||
QUANTUM_ENTANGLOPORTER(MachineBlock.MACHINE_BLOCK_3, 0, "EntangledBlock", 46, TileEntityQuantumEntangloporter.class, true, false, false, Plane.HORIZONTAL, true),
|
||||
SOLAR_NEUTRON_ACTIVATOR(MachineBlock.MACHINE_BLOCK_3, 1, "SolarNeutronActivator", 47, TileEntitySolarNeutronActivator.class, false, true, false, Plane.HORIZONTAL, true),
|
||||
AMBIENT_ACCUMULATOR(MachineBlock.MACHINE_BLOCK_3, 2, "AmbientAccumulator", 48, TileEntityAmbientAccumulator.class, true, false, false, never, true),
|
||||
OREDICTIONIFICATOR(MachineBlock.MACHINE_BLOCK_3, 3, "Oredictionificator", 52, TileEntityOredictionificator.class, false, false, false, Plane.HORIZONTAL, true),
|
||||
RESISTIVE_HEATER(MachineBlock.MACHINE_BLOCK_3, 4, "ResistiveHeater", 53, TileEntityResistiveHeater.class, true, false, false),
|
||||
FORMULAIC_ASSEMBLICATOR(MachineBlock.MACHINE_BLOCK_3, 5, "FormulaicAssemblicator", 56, TileEntityFormulaicAssemblicator.class, true, false, true);
|
||||
RESISTIVE_HEATER(MachineBlock.MACHINE_BLOCK_3, 4, "ResistiveHeater", 53, TileEntityResistiveHeater.class, true, false, false, always, true),
|
||||
FORMULAIC_ASSEMBLICATOR(MachineBlock.MACHINE_BLOCK_3, 5, "FormulaicAssemblicator", 56, TileEntityFormulaicAssemblicator.class, true, false, true, always, true);
|
||||
|
||||
public MachineBlock typeBlock;
|
||||
public int meta;
|
||||
@@ -206,7 +208,7 @@ public class BlockStateMachine extends BlockStateFacing
|
||||
|
||||
for(MachineType type : MachineType.values())
|
||||
{
|
||||
if(type != ENTANGLED_BLOCK && type != AMBIENT_ACCUMULATOR)
|
||||
if(type != QUANTUM_ENTANGLOPORTER && type != AMBIENT_ACCUMULATOR)
|
||||
{
|
||||
ret.add(type);
|
||||
}
|
||||
|
||||
@@ -156,11 +156,10 @@ public class BoilerUpdateProtocol extends UpdateProtocol<SynchronizedBoilerData>
|
||||
@Override
|
||||
public final boolean isValid(Coord4D coord)
|
||||
{
|
||||
return coord.getY() < initDisperser.getY() && (coord.isAirBlock(pointer.getWorld()) || isViableNode(coord));
|
||||
return coord.yCoord >= renderLocation.yCoord-1 && coord.yCoord < initDisperser.yCoord &&
|
||||
coord.xCoord >= renderLocation.xCoord && coord.xCoord < renderLocation.xCoord+volLength &&
|
||||
coord.zCoord >= renderLocation.zCoord && coord.zCoord < renderLocation.zCoord+volWidth &&
|
||||
(coord.isAirBlock(pointer.getWorldObj()) || isViableNode(coord.xCoord, coord.yCoord, coord.zCoord));
|
||||
return coord.getY() >= renderLocation.getY()-1 && coord.getY() < initDisperser.getY() &&
|
||||
coord.getX() >= renderLocation.getX() && coord.getX() < renderLocation.getX()+volLength &&
|
||||
coord.getZ() >= renderLocation.getZ() && coord.getZ() < renderLocation.getZ()+volWidth &&
|
||||
(coord.isAirBlock(pointer.getWorld()) || isViableNode(coord));
|
||||
}
|
||||
}).calculate(initAir);
|
||||
|
||||
@@ -173,7 +172,7 @@ public class BoilerUpdateProtocol extends UpdateProtocol<SynchronizedBoilerData>
|
||||
int steamHeight = (structure.renderLocation.getY()+structure.volHeight-2)-initDisperser.getY();
|
||||
structure.steamVolume = structure.volWidth*structure.volLength*steamHeight;
|
||||
|
||||
structure.upperRenderLocation = new Coord4D(structure.renderLocation.xCoord, initDisperser.yCoord+1, structure.renderLocation.zCoord);
|
||||
structure.upperRenderLocation = new Coord4D(structure.renderLocation.getX(), initDisperser.getY()+1, structure.renderLocation.getZ());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ public class InventoryFrequency extends Frequency
|
||||
if(storedFluid.getFluid() != null)
|
||||
{
|
||||
data.add(true);
|
||||
data.add(storedFluid.getFluid().getFluidID());
|
||||
data.add(storedFluid.getFluid().getFluid().getName());
|
||||
data.add(storedFluid.getFluidAmount());
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -21,6 +21,7 @@ import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
@@ -3,7 +3,7 @@ package mekanism.common.inventory;
|
||||
import mekanism.api.util.StackUtils;
|
||||
import mekanism.common.Tier.BinTier;
|
||||
import mekanism.common.base.ITierItem;
|
||||
import mekanism.common.block.BlockBasic.BasicType;
|
||||
import mekanism.common.block.states.BlockStateBasic.BasicBlockType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
@@ -76,7 +76,7 @@ public class InventoryBin
|
||||
return false;
|
||||
}
|
||||
|
||||
if(BasicType.get(stack) == BasicType.BIN)
|
||||
if(BasicBlockType.get(stack) == BasicBlockType.BIN)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
+5
-5
@@ -11,8 +11,8 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class ContainerFormulaicAssemblicator extends Container
|
||||
{
|
||||
@@ -82,7 +82,7 @@ public class ContainerFormulaicAssemblicator extends Container
|
||||
}
|
||||
|
||||
tileEntity.open(inventory.player);
|
||||
tileEntity.openInventory();
|
||||
tileEntity.openInventory(inventory.player);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -91,7 +91,7 @@ public class ContainerFormulaicAssemblicator extends Container
|
||||
super.onContainerClosed(entityplayer);
|
||||
|
||||
tileEntity.close(entityplayer);
|
||||
tileEntity.closeInventory();
|
||||
tileEntity.closeInventory(entityplayer);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -150,7 +150,7 @@ public class ContainerFormulaicAssemblicator extends Container
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if(tileEntity.formula == null || tileEntity.formula.isIngredient(tileEntity.getWorldObj(), slotStack))
|
||||
else if(tileEntity.formula == null || tileEntity.formula.isIngredient(tileEntity.getWorld(), slotStack))
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 20, false))
|
||||
{
|
||||
|
||||
+2
-2
@@ -31,7 +31,7 @@ public class ContainerQuantumEntangloporter extends Container
|
||||
}
|
||||
|
||||
tileEntity.open(inventory.player);
|
||||
tileEntity.openInventory();
|
||||
tileEntity.openInventory(inventory.player);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -40,7 +40,7 @@ public class ContainerQuantumEntangloporter extends Container
|
||||
super.onContainerClosed(entityplayer);
|
||||
|
||||
tileEntity.close(entityplayer);
|
||||
tileEntity.closeInventory();
|
||||
tileEntity.closeInventory(entityplayer);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -34,7 +34,7 @@ public class ContainerResistiveHeater extends Container
|
||||
}
|
||||
|
||||
tileEntity.open(inventory.player);
|
||||
tileEntity.openInventory();
|
||||
tileEntity.openInventory(inventory.player);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -43,7 +43,7 @@ public class ContainerResistiveHeater extends Container
|
||||
super.onContainerClosed(entityplayer);
|
||||
|
||||
tileEntity.close(entityplayer);
|
||||
tileEntity.closeInventory();
|
||||
tileEntity.closeInventory(entityplayer);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -221,8 +221,8 @@ public class ItemBlockBasic extends ItemBlock implements IEnergizedItem, ITierIt
|
||||
return null;
|
||||
}
|
||||
|
||||
int newCount = stack.stackTagCompound.getInteger("newCount");
|
||||
stack.stackTagCompound.removeTag("newCount");
|
||||
int newCount = stack.getTagCompound().getInteger("newCount");
|
||||
stack.getTagCompound().removeTag("newCount");
|
||||
|
||||
ItemStack ret = stack.copy();
|
||||
ret.getTagCompound().setInteger("itemCount", newCount);
|
||||
@@ -315,7 +315,7 @@ public class ItemBlockBasic extends ItemBlock implements IEnergizedItem, ITierIt
|
||||
|
||||
if(type == BasicBlockType.INDUCTION_CELL || type == BasicBlockType.INDUCTION_PROVIDER)
|
||||
{
|
||||
return getTier(itemstack).getLocalizedName() + " " + super.getItemStackDisplayName(itemstack);
|
||||
return getBaseTier(itemstack).getLocalizedName() + " " + super.getItemStackDisplayName(itemstack);
|
||||
}
|
||||
|
||||
return super.getItemStackDisplayName(itemstack);
|
||||
|
||||
@@ -113,7 +113,7 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IE
|
||||
@Override
|
||||
public EnergyCubeTier getEnergyCubeTier(ItemStack itemstack)
|
||||
{
|
||||
if(itemstack.getTagCompound() == null)
|
||||
if(!itemstack.hasTagCompound())
|
||||
{
|
||||
return EnergyCubeTier.BASIC;
|
||||
}
|
||||
@@ -129,7 +129,7 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IE
|
||||
@Override
|
||||
public void setEnergyCubeTier(ItemStack itemstack, EnergyCubeTier tier)
|
||||
{
|
||||
if(itemstack.getTagCompound() == null)
|
||||
if(!itemstack.hasTagCompound())
|
||||
{
|
||||
itemstack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
@@ -172,7 +172,7 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IE
|
||||
{
|
||||
ItemStack itemStack = (ItemStack)data[0];
|
||||
|
||||
if(itemStack.getTagCompound() == null)
|
||||
if(!itemStack.hasTagCompound())
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
@@ -188,7 +188,7 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IE
|
||||
{
|
||||
ItemStack itemStack = (ItemStack)data[0];
|
||||
|
||||
if(itemStack.getTagCompound() == null)
|
||||
if(!itemStack.hasTagCompound())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -202,12 +202,12 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IE
|
||||
@Override
|
||||
public double getEnergy(ItemStack itemStack)
|
||||
{
|
||||
if(itemStack.getTagCompound() == null)
|
||||
if(!itemStack.hasTagCompound())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return electricityStored = itemStack.getTagCompound().getDouble("electricity");
|
||||
return itemStack.getTagCompound().getDouble("electricity");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -218,7 +218,7 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IE
|
||||
return;
|
||||
}
|
||||
|
||||
if(itemStack.getTagCompound() == null)
|
||||
if(!itemStack.hasTagCompound())
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
@@ -177,23 +177,23 @@ public class ItemBlockGasTank extends ItemBlock implements IGasItem, ISustainedI
|
||||
@Override
|
||||
public BaseTier getBaseTier(ItemStack itemstack)
|
||||
{
|
||||
if(itemstack.stackTagCompound == null)
|
||||
if(!itemstack.hasTagCompound())
|
||||
{
|
||||
return BaseTier.BASIC;
|
||||
}
|
||||
|
||||
return BaseTier.values()[itemstack.stackTagCompound.getInteger("tier")];
|
||||
return BaseTier.values()[itemstack.getTagCompound().getInteger("tier")];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBaseTier(ItemStack itemstack, BaseTier tier)
|
||||
{
|
||||
if(itemstack.stackTagCompound == null)
|
||||
if(!itemstack.hasTagCompound())
|
||||
{
|
||||
itemstack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
itemstack.stackTagCompound.setInteger("tier", tier.ordinal());
|
||||
itemstack.getTagCompound().setInteger("tier", tier.ordinal());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -262,7 +262,7 @@ public class ItemBlockGasTank extends ItemBlock implements IGasItem, ISustainedI
|
||||
{
|
||||
ItemStack itemStack = (ItemStack)data[0];
|
||||
|
||||
if(itemStack.getTagCompound() == null)
|
||||
if(!itemStack.hasTagCompound())
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
@@ -278,7 +278,7 @@ public class ItemBlockGasTank extends ItemBlock implements IGasItem, ISustainedI
|
||||
{
|
||||
ItemStack itemStack = (ItemStack)data[0];
|
||||
|
||||
if(itemStack.getTagCompound() == null)
|
||||
if(!itemStack.hasTagCompound())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1006,22 +1006,22 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
||||
@Override
|
||||
public BaseTier getBaseTier(ItemStack itemstack)
|
||||
{
|
||||
if(itemstack.stackTagCompound == null)
|
||||
if(!itemstack.hasTagCompound())
|
||||
{
|
||||
return BaseTier.BASIC;
|
||||
}
|
||||
|
||||
return BaseTier.values()[itemstack.stackTagCompound.getInteger("tier")];
|
||||
return BaseTier.values()[itemstack.getTagCompound().getInteger("tier")];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBaseTier(ItemStack itemstack, BaseTier tier)
|
||||
{
|
||||
if(itemstack.stackTagCompound == null)
|
||||
if(!itemstack.hasTagCompound())
|
||||
{
|
||||
itemstack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
itemstack.stackTagCompound.setInteger("tier", tier.ordinal());
|
||||
itemstack.getTagCompound().setInteger("tier", tier.ordinal());
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,9 @@ 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.BlockPos;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemConfigurationCard extends ItemMekanism
|
||||
@@ -33,13 +35,13 @@ public class ItemConfigurationCard extends ItemMekanism
|
||||
|
||||
list.add(EnumColor.GREY + LangUtils.localize("gui.data") + ": " + EnumColor.INDIGO + LangUtils.localize(getDataType(itemstack)));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
|
||||
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
if(!world.isRemote)
|
||||
{
|
||||
TileEntity tileEntity = world.getTileEntity(x, y, z);
|
||||
TileEntity tileEntity = world.getTileEntity(pos);
|
||||
|
||||
if(tileEntity instanceof IConfigCardAccess)
|
||||
{
|
||||
@@ -138,35 +140,35 @@ public class ItemConfigurationCard extends ItemMekanism
|
||||
|
||||
public void setData(ItemStack itemstack, NBTTagCompound data)
|
||||
{
|
||||
if(itemstack.stackTagCompound == null)
|
||||
if(itemstack.hasTagCompound())
|
||||
{
|
||||
itemstack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if(data != null)
|
||||
{
|
||||
itemstack.stackTagCompound.setTag("data", data);
|
||||
itemstack.getTagCompound().setTag("data", data);
|
||||
}
|
||||
else {
|
||||
itemstack.stackTagCompound.removeTag("data");
|
||||
itemstack.getTagCompound().removeTag("data");
|
||||
}
|
||||
}
|
||||
|
||||
public NBTTagCompound getData(ItemStack itemstack)
|
||||
{
|
||||
if(itemstack.stackTagCompound == null)
|
||||
if(itemstack.hasTagCompound())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
NBTTagCompound data = itemstack.stackTagCompound.getCompoundTag("data");
|
||||
NBTTagCompound data = itemstack.getTagCompound().getCompoundTag("data");
|
||||
|
||||
if(data.hasNoTags())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
return itemstack.stackTagCompound.getCompoundTag("data");
|
||||
return itemstack.getTagCompound().getCompoundTag("data");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package mekanism.common.item;
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.common.Tier.BaseTier;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -4,29 +4,28 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.common.util.InventoryUtils;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.Constants.NBT;
|
||||
import codechicken.lib.inventory.InventoryUtils;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemCraftingFormula extends ItemMekanism
|
||||
{
|
||||
public IIcon[] icons = new IIcon[3];
|
||||
// public IIcon[] icons = new IIcon[3];
|
||||
|
||||
public ItemCraftingFormula()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister register)
|
||||
@@ -42,14 +41,15 @@ public class ItemCraftingFormula extends ItemMekanism
|
||||
{
|
||||
return getInventory(stack) == null ? icons[0] : (isInvalid(stack) ? icons[1] : icons[2]);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean requiresMultipleRenderPasses()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag)
|
||||
@@ -104,7 +104,7 @@ public class ItemCraftingFormula extends ItemMekanism
|
||||
setInventory(stack, null);
|
||||
setInvalid(stack, false);
|
||||
|
||||
((EntityPlayerMP)player).sendContainerAndContentsToPlayer(player.openContainer, player.openContainer.getInventory());
|
||||
((EntityPlayerMP)player).sendContainerToPlayer(player.openContainer);
|
||||
|
||||
return stack;
|
||||
}
|
||||
@@ -132,32 +132,32 @@ public class ItemCraftingFormula extends ItemMekanism
|
||||
|
||||
public boolean isInvalid(ItemStack stack)
|
||||
{
|
||||
if(stack.stackTagCompound == null)
|
||||
if(!stack.hasTagCompound())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return stack.stackTagCompound.getBoolean("invalid");
|
||||
return stack.getTagCompound().getBoolean("invalid");
|
||||
}
|
||||
|
||||
public void setInvalid(ItemStack stack, boolean invalid)
|
||||
{
|
||||
if(stack.stackTagCompound == null)
|
||||
if(!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
stack.stackTagCompound.setBoolean("invalid", invalid);
|
||||
stack.getTagCompound().setBoolean("invalid", invalid);
|
||||
}
|
||||
|
||||
public ItemStack[] getInventory(ItemStack stack)
|
||||
{
|
||||
if(stack.stackTagCompound == null || !stack.stackTagCompound.hasKey("Items"))
|
||||
if(!stack.hasTagCompound() || !stack.getTagCompound().hasKey("Items"))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
NBTTagList tagList = stack.stackTagCompound.getTagList("Items", NBT.TAG_COMPOUND);
|
||||
NBTTagList tagList = stack.getTagCompound().getTagList("Items", NBT.TAG_COMPOUND);
|
||||
ItemStack[] inventory = new ItemStack[9];
|
||||
|
||||
for(int tagCount = 0; tagCount < tagList.tagCount(); tagCount++)
|
||||
@@ -176,14 +176,14 @@ public class ItemCraftingFormula extends ItemMekanism
|
||||
|
||||
public void setInventory(ItemStack stack, ItemStack[] inv)
|
||||
{
|
||||
if(stack.stackTagCompound == null)
|
||||
if(!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if(inv == null)
|
||||
{
|
||||
stack.stackTagCompound.removeTag("Items");
|
||||
stack.getTagCompound().removeTag("Items");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -200,6 +200,6 @@ public class ItemCraftingFormula extends ItemMekanism
|
||||
}
|
||||
}
|
||||
|
||||
stack.stackTagCompound.setTag("Items", tagList);
|
||||
stack.getTagCompound().setTag("Items", tagList);
|
||||
}
|
||||
}
|
||||
@@ -19,8 +19,8 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidContainerItem;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemGaugeDropper extends ItemMekanism implements IGasItem, IFluidContainerItem
|
||||
{
|
||||
@@ -65,14 +65,14 @@ public class ItemGaugeDropper extends ItemMekanism implements IGasItem, IFluidCo
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemRightClick(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
|
||||
{
|
||||
if(player.isSneaking() && !world.isRemote)
|
||||
{
|
||||
setGas(stack, null);
|
||||
setFluid(stack, null);
|
||||
|
||||
((EntityPlayerMP)player).sendContainerAndContentsToPlayer(player.openContainer, player.openContainer.getInventory());
|
||||
((EntityPlayerMP)player).sendContainerToPlayer(player.openContainer);
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package mekanism.common.recipe;
|
||||
|
||||
import mekanism.common.MekanismItems;
|
||||
import mekanism.common.block.BlockBasic.BasicType;
|
||||
import mekanism.common.block.states.BlockStateBasic.BasicBlockType;
|
||||
import mekanism.common.inventory.InventoryBin;
|
||||
import mekanism.common.item.ItemProxy;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
@@ -40,7 +40,7 @@ public class BinRecipe implements IRecipe
|
||||
return false;
|
||||
}
|
||||
|
||||
return BasicType.get(itemStack) == BasicType.BIN && itemStack.stackSize <= 1;
|
||||
return BasicBlockType.get(itemStack) == BasicBlockType.BIN && itemStack.stackSize <= 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -170,7 +170,7 @@ public class TileEntityBoilerCasing extends TileEntityMultiblock<SynchronizedBoi
|
||||
if(!player.isSneaking() && structure != null)
|
||||
{
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
player.openGui(Mekanism.instance, 54, worldObj, xCoord, yCoord, zCoord);
|
||||
player.openGui(Mekanism.instance, 54, worldObj, getPos().getX(), getPos().getY(), getPos().getZ());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -221,7 +221,7 @@ public class TileEntityBoilerCasing extends TileEntityMultiblock<SynchronizedBoi
|
||||
if(structure.waterStored != null)
|
||||
{
|
||||
data.add(1);
|
||||
data.add(structure.waterStored.getFluid().getName()());
|
||||
data.add(structure.waterStored.getFluid().getName());
|
||||
data.add(structure.waterStored.amount);
|
||||
}
|
||||
else {
|
||||
@@ -231,7 +231,7 @@ public class TileEntityBoilerCasing extends TileEntityMultiblock<SynchronizedBoi
|
||||
if(structure.steamStored != null)
|
||||
{
|
||||
data.add(1);
|
||||
data.add(structure.steamStored.getFluid().getName()());
|
||||
data.add(structure.steamStored.getFluid().getName());
|
||||
data.add(structure.steamStored.amount);
|
||||
}
|
||||
else {
|
||||
@@ -265,6 +265,26 @@ public class TileEntityBoilerCasing extends TileEntityMultiblock<SynchronizedBoi
|
||||
return data;
|
||||
}
|
||||
|
||||
public int getScaledWaterLevel(int i)
|
||||
{
|
||||
if(clientWaterCapacity == 0 || structure.waterStored == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return structure.waterStored.amount*i / clientWaterCapacity;
|
||||
}
|
||||
|
||||
public int getScaledSteamLevel(int i)
|
||||
{
|
||||
if(clientSteamCapacity == 0 || structure.steamStored == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return structure.steamStored.amount*i / clientSteamCapacity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlePacketData(ByteBuf dataStream)
|
||||
{
|
||||
@@ -309,7 +329,7 @@ public class TileEntityBoilerCasing extends TileEntityMultiblock<SynchronizedBoi
|
||||
{
|
||||
ValveData data = new ValveData();
|
||||
data.location = Coord4D.read(dataStream);
|
||||
data.side = ForgeDirection.getOrientation(dataStream.readInt());
|
||||
data.side = EnumFacing.getFront(dataStream.readInt());
|
||||
|
||||
valveViewing.add(data);
|
||||
|
||||
@@ -398,7 +418,7 @@ public class TileEntityBoilerCasing extends TileEntityMultiblock<SynchronizedBoi
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName()
|
||||
public String getName()
|
||||
{
|
||||
return LangUtils.localize("gui.thermoelectricBoiler");
|
||||
}
|
||||
|
||||
@@ -32,13 +32,13 @@ public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFl
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
if(structure != null && structure.upperRenderLocation != null && yCoord >= structure.upperRenderLocation.yCoord)
|
||||
if(structure != null && structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.getY())
|
||||
{
|
||||
if(structure.steamStored != null && structure.steamStored.amount > 0)
|
||||
{
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing side : EnumFacing.values())
|
||||
{
|
||||
TileEntity tile = Coord4D.get(this).getFromSide(side).getTileEntity(worldObj);
|
||||
TileEntity tile = Coord4D.get(this).offset(side).getTileEntity(worldObj);
|
||||
|
||||
if(tile instanceof IFluidHandler && !(tile instanceof TileEntityBoilerValve))
|
||||
{
|
||||
@@ -63,7 +63,7 @@ public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFl
|
||||
{
|
||||
if((!worldObj.isRemote && structure != null) || (worldObj.isRemote && clientHasStructure))
|
||||
{
|
||||
if(structure.upperRenderLocation != null && yCoord >= structure.upperRenderLocation.yCoord)
|
||||
if(structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.getY())
|
||||
{
|
||||
return new FluidTankInfo[] {steamTank.getInfo()};
|
||||
}
|
||||
@@ -78,7 +78,7 @@ public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFl
|
||||
@Override
|
||||
public int fill(EnumFacing from, FluidStack resource, boolean doFill)
|
||||
{
|
||||
if(structure != null && structure.upperRenderLocation != null && yCoord < structure.upperRenderLocation.yCoord)
|
||||
if(structure != null && structure.upperRenderLocation != null && getPos().getY() < structure.upperRenderLocation.getY())
|
||||
{
|
||||
return waterTank.fill(resource, doFill);
|
||||
}
|
||||
@@ -89,7 +89,7 @@ public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFl
|
||||
@Override
|
||||
public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain)
|
||||
{
|
||||
if(structure != null && structure.upperRenderLocation != null && yCoord >= structure.upperRenderLocation.yCoord)
|
||||
if(structure != null && structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.getY())
|
||||
{
|
||||
if(structure.steamStored != null)
|
||||
{
|
||||
@@ -106,7 +106,7 @@ public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFl
|
||||
@Override
|
||||
public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain)
|
||||
{
|
||||
if(structure != null && structure.upperRenderLocation != null && yCoord >= structure.upperRenderLocation.yCoord)
|
||||
if(structure != null && structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.getY())
|
||||
{
|
||||
return steamTank.drain(maxDrain, doDrain);
|
||||
}
|
||||
@@ -119,7 +119,7 @@ public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFl
|
||||
{
|
||||
if((!worldObj.isRemote && structure != null) || (worldObj.isRemote && clientHasStructure))
|
||||
{
|
||||
return structure.upperRenderLocation != null && yCoord < structure.upperRenderLocation.yCoord;
|
||||
return structure.upperRenderLocation != null && getPos().getY() < structure.upperRenderLocation.getY();
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -130,7 +130,7 @@ public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFl
|
||||
{
|
||||
if((!worldObj.isRemote && structure != null) || (worldObj.isRemote && clientHasStructure))
|
||||
{
|
||||
return structure.upperRenderLocation != null && yCoord >= structure.upperRenderLocation.yCoord;
|
||||
return structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.getY();
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -867,7 +867,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
||||
if(clientActive != isActive)
|
||||
{
|
||||
isActive = clientActive;
|
||||
MekanismUtils.updateBlock(worldObj, xCoord, yCoord, zCoord);
|
||||
MekanismUtils.updateBlock(worldObj, getPos());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1184,6 +1184,6 @@ public class TileEntityFactory extends TileEntityNoisyElectricBlock implements I
|
||||
@Override
|
||||
public String getDataType()
|
||||
{
|
||||
return tier.getBaseTier().getLocalizedName() + " " + recipeType.getLocalizedName() + " " + super.getInventoryName();
|
||||
return tier.getBaseTier().getLocalizedName() + " " + recipeType.getLocalizedName() + " " + super.getName();
|
||||
}
|
||||
}
|
||||
@@ -147,7 +147,7 @@ public class TileEntityFluidTank extends TileEntityContainerBlock implements IAc
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName()
|
||||
public String getName()
|
||||
{
|
||||
return LangUtils.localize("tile.FluidTank" + tier.getBaseTier().getName() + ".name");
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import mekanism.common.Upgrade;
|
||||
import mekanism.common.base.IRedstoneControl;
|
||||
import mekanism.common.base.ISideConfiguration;
|
||||
import mekanism.common.base.IUpgradeTile;
|
||||
import mekanism.common.block.BlockMachine.MachineType;
|
||||
import mekanism.common.block.states.BlockStateMachine.MachineType;
|
||||
import mekanism.common.content.assemblicator.RecipeFormula;
|
||||
import mekanism.common.item.ItemCraftingFormula;
|
||||
import mekanism.common.tile.component.TileComponentConfig;
|
||||
@@ -27,6 +27,7 @@ import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public class TileEntityFormulaicAssemblicator extends TileEntityElectricBlock implements ISideConfiguration, IUpgradeTile, IRedstoneControl, IConfigCardAccess
|
||||
{
|
||||
@@ -231,13 +232,13 @@ public class TileEntityFormulaicAssemblicator extends TileEntityElectricBlock im
|
||||
container = null;
|
||||
}
|
||||
|
||||
if(container != null && !stack.getItem().doesContainerItemLeaveCraftingGrid(stack))
|
||||
if(container != null/*TODO && !stack.getItem().doesContainerItemLeaveCraftingGrid(stack)*/)
|
||||
{
|
||||
if(!stack.getItem().doesContainerItemLeaveCraftingGrid(stack))
|
||||
/*TODOif(!stack.getItem().doesContainerItemLeaveCraftingGrid(stack))
|
||||
{
|
||||
inventory[i] = container.copy();
|
||||
}
|
||||
else {
|
||||
else*/ {
|
||||
boolean move = tryMoveToOutput(container.copy(), false);
|
||||
|
||||
if(move)
|
||||
@@ -461,13 +462,13 @@ public class TileEntityFormulaicAssemblicator extends TileEntityElectricBlock im
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side)
|
||||
public int[] getSlotsForFace(EnumFacing side)
|
||||
{
|
||||
return configComponent.getOutput(TransmissionType.ITEM, side, facing).availableSlots;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
|
||||
public boolean canExtractItem(int slotID, ItemStack itemstack, EnumFacing side)
|
||||
{
|
||||
if(slotID == 1)
|
||||
{
|
||||
@@ -646,7 +647,7 @@ public class TileEntityFormulaicAssemblicator extends TileEntityElectricBlock im
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrientation()
|
||||
public EnumFacing getOrientation()
|
||||
{
|
||||
return facing;
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ public class TileEntityGasTank extends TileEntityContainerBlock implements IGasH
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName()
|
||||
public String getName()
|
||||
{
|
||||
return LangUtils.localize("tile.GasTank" + tier.getBaseTier().getName() + ".name");
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ import mekanism.common.util.PipeUtils;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
@@ -53,7 +53,7 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp
|
||||
public List<Frequency> publicCache = new ArrayList<Frequency>();
|
||||
public List<Frequency> privateCache = new ArrayList<Frequency>();
|
||||
|
||||
public static final EnumSet<ForgeDirection> nothing = EnumSet.noneOf(ForgeDirection.class);
|
||||
public static final EnumSet<EnumFacing> nothing = EnumSet.noneOf(EnumFacing.class);
|
||||
|
||||
public TileComponentEjector ejectorComponent;
|
||||
public TileComponentConfig configComponent;
|
||||
@@ -325,7 +325,7 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList getNetworkedData(ArrayList data)
|
||||
public ArrayList<Object> getNetworkedData(ArrayList<Object> data)
|
||||
{
|
||||
super.getNetworkedData(data);
|
||||
|
||||
@@ -376,13 +376,13 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<ForgeDirection> getOutputtingSides()
|
||||
public EnumSet<EnumFacing> getOutputtingSides()
|
||||
{
|
||||
return !hasFrequency() ? nothing : configComponent.getSidesForData(TransmissionType.ENERGY, facing, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<ForgeDirection> getConsumingSides()
|
||||
public EnumSet<EnumFacing> getConsumingSides()
|
||||
{
|
||||
return !hasFrequency() ? nothing : configComponent.getSidesForData(TransmissionType.ENERGY, facing, 1);
|
||||
}
|
||||
@@ -415,13 +415,13 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public int fill(ForgeDirection from, FluidStack resource, boolean doFill)
|
||||
public int fill(EnumFacing from, FluidStack resource, boolean doFill)
|
||||
{
|
||||
return !hasFrequency() ? 0 : frequency.storedFluid.fill(resource, doFill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain)
|
||||
public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain)
|
||||
{
|
||||
if(hasFrequency() && resource.isFluidEqual(frequency.storedFluid.getFluid()))
|
||||
{
|
||||
@@ -432,7 +432,7 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain)
|
||||
public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain)
|
||||
{
|
||||
if(hasFrequency())
|
||||
{
|
||||
@@ -443,9 +443,9 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canFill(ForgeDirection from, Fluid fluid)
|
||||
public boolean canFill(EnumFacing from, Fluid fluid)
|
||||
{
|
||||
if(hasFrequency() && configComponent.getOutput(TransmissionType.FLUID, from.ordinal(), facing).ioState == IOState.INPUT)
|
||||
if(hasFrequency() && configComponent.getOutput(TransmissionType.FLUID, from, facing).ioState == IOState.INPUT)
|
||||
{
|
||||
return frequency.storedFluid.getFluid() == null || fluid == frequency.storedFluid.getFluid().getFluid();
|
||||
}
|
||||
@@ -454,9 +454,9 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrain(ForgeDirection from, Fluid fluid)
|
||||
public boolean canDrain(EnumFacing from, Fluid fluid)
|
||||
{
|
||||
if(hasFrequency() && configComponent.getOutput(TransmissionType.FLUID, from.ordinal(), facing).ioState == IOState.OUTPUT)
|
||||
if(hasFrequency() && configComponent.getOutput(TransmissionType.FLUID, from, facing).ioState == IOState.OUTPUT)
|
||||
{
|
||||
return frequency.storedFluid.getFluid() == null || fluid == frequency.storedFluid.getFluid().getFluid();
|
||||
}
|
||||
@@ -465,11 +465,11 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTankInfo[] getTankInfo(ForgeDirection from)
|
||||
public FluidTankInfo[] getTankInfo(EnumFacing from)
|
||||
{
|
||||
if(hasFrequency())
|
||||
{
|
||||
if(configComponent.getOutput(TransmissionType.FLUID, from.ordinal(), facing).ioState != IOState.OFF)
|
||||
if(configComponent.getOutput(TransmissionType.FLUID, from, facing).ioState != IOState.OFF)
|
||||
{
|
||||
return new FluidTankInfo[] {frequency.storedFluid.getInfo()};
|
||||
}
|
||||
@@ -479,33 +479,33 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveGas(ForgeDirection side, GasStack stack, boolean doTransfer)
|
||||
public int receiveGas(EnumFacing side, GasStack stack, boolean doTransfer)
|
||||
{
|
||||
return !hasFrequency() ? 0 : frequency.storedGas.receive(stack, doTransfer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveGas(ForgeDirection side, GasStack stack)
|
||||
public int receiveGas(EnumFacing side, GasStack stack)
|
||||
{
|
||||
return receiveGas(side, stack, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
|
||||
public GasStack drawGas(EnumFacing side, int amount, boolean doTransfer)
|
||||
{
|
||||
return !hasFrequency() ? null : frequency.storedGas.draw(amount, doTransfer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GasStack drawGas(ForgeDirection side, int amount)
|
||||
public GasStack drawGas(EnumFacing side, int amount)
|
||||
{
|
||||
return drawGas(side, amount, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canReceiveGas(ForgeDirection side, Gas type)
|
||||
public boolean canReceiveGas(EnumFacing side, Gas type)
|
||||
{
|
||||
if(hasFrequency() && configComponent.getOutput(TransmissionType.GAS, side.ordinal(), facing).ioState == IOState.INPUT)
|
||||
if(hasFrequency() && configComponent.getOutput(TransmissionType.GAS, side, facing).ioState == IOState.INPUT)
|
||||
{
|
||||
return frequency.storedGas.getGasType() == null || type == frequency.storedGas.getGasType();
|
||||
}
|
||||
@@ -514,9 +514,9 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrawGas(ForgeDirection side, Gas type)
|
||||
public boolean canDrawGas(EnumFacing side, Gas type)
|
||||
{
|
||||
if(hasFrequency() && configComponent.getOutput(TransmissionType.GAS, side.ordinal(), facing).ioState == IOState.OUTPUT)
|
||||
if(hasFrequency() && configComponent.getOutput(TransmissionType.GAS, side, facing).ioState == IOState.OUTPUT)
|
||||
{
|
||||
return frequency.storedGas.getGasType() == null || type == frequency.storedGas.getGasType();
|
||||
}
|
||||
@@ -569,7 +569,7 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getInsulationCoefficient(ForgeDirection side)
|
||||
public double getInsulationCoefficient(EnumFacing side)
|
||||
{
|
||||
return 1000;
|
||||
}
|
||||
@@ -600,17 +600,17 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectHeat(ForgeDirection side)
|
||||
public boolean canConnectHeat(EnumFacing side)
|
||||
{
|
||||
return hasFrequency() && configComponent.getOutput(TransmissionType.HEAT, side.ordinal(), facing).ioState != IOState.OFF;
|
||||
return hasFrequency() && configComponent.getOutput(TransmissionType.HEAT, side, facing).ioState != IOState.OFF;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IHeatTransfer getAdjacent(ForgeDirection side)
|
||||
public IHeatTransfer getAdjacent(EnumFacing side)
|
||||
{
|
||||
TileEntity adj = Coord4D.get(this).getFromSide(side).getTileEntity(worldObj);
|
||||
TileEntity adj = Coord4D.get(this).offset(side).getTileEntity(worldObj);
|
||||
|
||||
if(hasFrequency() && configComponent.getOutput(TransmissionType.HEAT, side.ordinal(), facing).ioState == IOState.INPUT)
|
||||
if(hasFrequency() && configComponent.getOutput(TransmissionType.HEAT, side, facing).ioState == IOState.INPUT)
|
||||
{
|
||||
if(adj instanceof IHeatTransfer)
|
||||
{
|
||||
@@ -622,13 +622,13 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int slotID, ItemStack itemstack, int side)
|
||||
public boolean canInsertItem(int slotID, ItemStack itemstack, EnumFacing side)
|
||||
{
|
||||
return hasFrequency() && configComponent.getOutput(TransmissionType.ITEM, side, facing).ioState == IOState.INPUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side)
|
||||
public int[] getSlotsForFace(EnumFacing side)
|
||||
{
|
||||
if(hasFrequency() && configComponent.getOutput(TransmissionType.ITEM, side, facing).ioState != IOState.OFF)
|
||||
{
|
||||
@@ -639,7 +639,7 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
|
||||
public boolean canExtractItem(int slotID, ItemStack itemstack, EnumFacing side)
|
||||
{
|
||||
return hasFrequency() && configComponent.getOutput(TransmissionType.ITEM, side, facing).ioState == IOState.OUTPUT;
|
||||
}
|
||||
@@ -662,7 +662,7 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrientation()
|
||||
public EnumFacing getOrientation()
|
||||
{
|
||||
return facing;
|
||||
}
|
||||
@@ -674,9 +674,9 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTubeConnect(ForgeDirection side)
|
||||
public boolean canTubeConnect(EnumFacing side)
|
||||
{
|
||||
return frequency != null && configComponent.getOutput(TransmissionType.GAS, side.ordinal(), facing).ioState != IOState.OFF;
|
||||
return frequency != null && configComponent.getOutput(TransmissionType.GAS, side, facing).ioState != IOState.OFF;
|
||||
}
|
||||
|
||||
private static final String[] methods = new String[] {"setFrequency"};
|
||||
|
||||
@@ -10,7 +10,7 @@ import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.base.IRedstoneControl;
|
||||
import mekanism.common.block.BlockMachine.MachineType;
|
||||
import mekanism.common.block.states.BlockStateMachine.MachineType;
|
||||
import mekanism.common.integration.IComputerIntegration;
|
||||
import mekanism.common.network.PacketTileEntity.TileEntityMessage;
|
||||
import mekanism.common.util.ChargeUtils;
|
||||
@@ -19,7 +19,7 @@ import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public class TileEntityResistiveHeater extends TileEntityNoisyElectricBlock implements IHeatTransfer, IComputerIntegration, IRedstoneControl
|
||||
{
|
||||
@@ -62,7 +62,7 @@ public class TileEntityResistiveHeater extends TileEntityNoisyElectricBlock impl
|
||||
if(updateDelay == 0 && clientActive != isActive)
|
||||
{
|
||||
isActive = clientActive;
|
||||
MekanismUtils.updateBlock(worldObj, xCoord, yCoord, zCoord);
|
||||
MekanismUtils.updateBlock(worldObj, getPos());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ public class TileEntityResistiveHeater extends TileEntityNoisyElectricBlock impl
|
||||
{
|
||||
updateDelay = general.UPDATE_DELAY;
|
||||
isActive = clientActive;
|
||||
MekanismUtils.updateBlock(worldObj, xCoord, yCoord, zCoord);
|
||||
MekanismUtils.updateBlock(worldObj, getPos());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ public class TileEntityResistiveHeater extends TileEntityNoisyElectricBlock impl
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getInsulationCoefficient(ForgeDirection side)
|
||||
public double getInsulationCoefficient(EnumFacing side)
|
||||
{
|
||||
return 1000;
|
||||
}
|
||||
@@ -240,15 +240,15 @@ public class TileEntityResistiveHeater extends TileEntityNoisyElectricBlock impl
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectHeat(ForgeDirection side)
|
||||
public boolean canConnectHeat(EnumFacing side)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IHeatTransfer getAdjacent(ForgeDirection side)
|
||||
public IHeatTransfer getAdjacent(EnumFacing side)
|
||||
{
|
||||
TileEntity adj = Coord4D.get(this).getFromSide(side).getTileEntity(worldObj);
|
||||
TileEntity adj = Coord4D.get(this).offset(side).getTileEntity(worldObj);
|
||||
|
||||
if(adj instanceof IHeatTransfer)
|
||||
{
|
||||
@@ -265,7 +265,7 @@ public class TileEntityResistiveHeater extends TileEntityNoisyElectricBlock impl
|
||||
|
||||
if(clientActive != active && updateDelay == 0)
|
||||
{
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList<Object>())), new Range4D(Coord4D.get(this)));
|
||||
|
||||
updateDelay = 10;
|
||||
clientActive = active;
|
||||
|
||||
@@ -110,7 +110,7 @@ public class TileEntityThermalEvaporationValve extends TileEntityThermalEvaporat
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getInsulationCoefficient(ForgeDirection side)
|
||||
public double getInsulationCoefficient(EnumFacing side)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -139,13 +139,13 @@ public class TileEntityThermalEvaporationValve extends TileEntityThermalEvaporat
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectHeat(ForgeDirection side)
|
||||
public boolean canConnectHeat(EnumFacing side)
|
||||
{
|
||||
return getController() != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IHeatTransfer getAdjacent(ForgeDirection side)
|
||||
public IHeatTransfer getAdjacent(EnumFacing side)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -539,4 +539,13 @@ public final class InventoryUtils
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*TODO From CCLib -- go back to that version when we're using dependencies again*/
|
||||
public static boolean canStack(ItemStack stack1, ItemStack stack2) {
|
||||
return stack1 == null || stack2 == null ||
|
||||
(stack1.getItem() == stack2.getItem() &&
|
||||
(!stack2.getHasSubtypes() || stack2.getItemDamage() == stack1.getItemDamage()) &&
|
||||
ItemStack.areItemStackTagsEqual(stack2, stack1)) &&
|
||||
stack1.isStackable();
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ import mekanism.common.Upgrade;
|
||||
import mekanism.common.base.IEnergyCube;
|
||||
import mekanism.common.base.IFactory;
|
||||
import mekanism.common.base.ITierItem;
|
||||
import mekanism.common.block.BlockBasic.BasicType;
|
||||
import mekanism.common.block.states.BlockStateBasic.BasicBlockType;
|
||||
import mekanism.common.block.states.BlockStateMachine;
|
||||
import mekanism.common.inventory.InventoryBin;
|
||||
import mekanism.common.recipe.ShapedMekanismRecipe;
|
||||
@@ -27,6 +27,9 @@ import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidContainerItem;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class RecipeUtils
|
||||
@@ -190,7 +193,7 @@ public class RecipeUtils
|
||||
}
|
||||
}
|
||||
|
||||
if(BasicType.get(toReturn) == BasicType.BIN)
|
||||
if(BasicBlockType.get(toReturn) == BasicBlockType.BIN)
|
||||
{
|
||||
int foundCount = 0;
|
||||
ItemStack foundType = null;
|
||||
@@ -199,7 +202,7 @@ public class RecipeUtils
|
||||
{
|
||||
ItemStack itemstack = inv.getStackInSlot(i);
|
||||
|
||||
if(BasicType.get(itemstack) == BasicType.BIN)
|
||||
if(BasicBlockType.get(itemstack) == BasicBlockType.BIN)
|
||||
{
|
||||
InventoryBin binInv = new InventoryBin(itemstack);
|
||||
|
||||
|
||||
Reference in new issue
Block a user