Major 1.7 work, down to a little more than 500 errors

This commit is contained in:
Aidan C. Brady 2014-05-29 17:55:47 +01:00
parent 1d22ddadc3
commit 6f69c6d7b4
78 changed files with 728 additions and 740 deletions

File diff suppressed because it is too large Load diff

View file

@ -47,5 +47,4 @@ public class ClientConnectionHandler
} catch(Exception e) {}
}
}
}

View file

@ -127,6 +127,7 @@ import mekanism.common.tile.TileEntityTeleporter;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
@ -134,11 +135,8 @@ import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.config.Configuration;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.KeyBindingRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.TickRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -333,23 +331,23 @@ public class ClientProxy extends CommonProxy
//Register item handler
ItemRenderingHandler handler = new ItemRenderingHandler();
MinecraftForgeClient.registerItemRenderer(Mekanism.energyCubeID, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.machineBlockID, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.machineBlock2ID, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.Robit.itemID, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.WalkieTalkie.itemID, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.gasTankID, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.obsidianTNTID, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.basicBlockID, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.Jetpack.itemID, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.ArmoredJetpack.itemID, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.PartTransmitter.itemID, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.GasMask.itemID, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.ScubaTank.itemID, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.Balloon.itemID, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.FreeRunners.itemID, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.AtomicDisassembler.itemID, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.GlowPanel.itemID, handler);
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(Mekanism.EnergyCube), handler);
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(Mekanism.MachineBlock), handler);
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(Mekanism.MachineBlock2), handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.Robit, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.WalkieTalkie, handler);
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(Mekanism.GasTank), handler);
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(Mekanism.ObsidianTNT), handler);
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(Mekanism.BasicBlock), handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.Jetpack, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.ArmoredJetpack, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.PartTransmitter, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.GasMask, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.ScubaTank, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.Balloon, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.FreeRunners, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.AtomicDisassembler, handler);
MinecraftForgeClient.registerItemRenderer(Mekanism.GlowPanel, handler);
//Register block handlers
RenderingRegistry.registerBlockHandler(new MachineRenderingHandler());
@ -485,12 +483,10 @@ public class ClientProxy extends CommonProxy
TickRegistry.registerTickHandler(new ClientTickHandler(), Side.CLIENT);
TickRegistry.registerTickHandler(new RenderTickHandler(), Side.CLIENT);
NetworkRegistry.instance().registerConnectionHandler(new ClientConnectionHandler());
NetworkRegistry..registerConnectionHandler(new ClientConnectionHandler());
KeyBindingRegistry.registerKeyBinding(new MekanismKeyHandler());
GameRegistry.registerPlayerTracker(new ClientPlayerTracker());
HolidayManager.init();
}

View file

@ -64,7 +64,7 @@ public class GuiAdvancedElectricMachine extends GuiMekanism
int xAxis = (mouseX - (width - xSize) / 2);
int yAxis = (mouseY - (height - ySize) / 2);
fontRendererObj.drawString(tileEntity.getInvName(), (xSize/2)-(fontRendererObj.getStringWidth(tileEntity.getInvName())/2), 6, 0x404040);
fontRendererObj.drawString(tileEntity.getInventoryName(), (xSize/2)-(fontRendererObj.getStringWidth(tileEntity.getInventoryName())/2), 6, 0x404040);
fontRendererObj.drawString("Inventory", 8, (ySize - 96) + 2, 0x404040);
if(xAxis >= 61 && xAxis <= 67 && yAxis >= 37 && yAxis <= 49)

View file

@ -57,7 +57,7 @@ public class GuiChanceMachine extends GuiMekanism
@Override
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
{
fontRendererObj.drawString(tileEntity.getInvName(), 45, 6, 0x404040);
fontRendererObj.drawString(tileEntity.getInventoryName(), 45, 6, 0x404040);
fontRendererObj.drawString(MekanismUtils.localize("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
super.drawGuiContainerForegroundLayer(mouseX, mouseY);

View file

@ -92,7 +92,7 @@ public class GuiChemicalCrystallizer extends GuiMekanism
int xAxis = (mouseX - (width - xSize) / 2);
int yAxis = (mouseY - (height - ySize) / 2);
fontRendererObj.drawString(tileEntity.getInvName(), 37, 4, 0x404040);
fontRendererObj.drawString(tileEntity.getInventoryName(), 37, 4, 0x404040);
if(tileEntity.inputTank.getGas() != null)
{

View file

@ -68,7 +68,7 @@ public class GuiChemicalOxidizer extends GuiMekanism
int xAxis = (mouseX - (width - xSize) / 2);
int yAxis = (mouseY - (height - ySize) / 2);
fontRendererObj.drawString(tileEntity.getInvName(), 45, 6, 0x404040);
fontRendererObj.drawString(tileEntity.getInventoryName(), 45, 6, 0x404040);
fontRendererObj.drawString(MekanismUtils.localize("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
super.drawGuiContainerForegroundLayer(mouseX, mouseY);

View file

@ -87,7 +87,7 @@ public class GuiChemicalWasher extends GuiMekanism
@Override
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
{
fontRendererObj.drawString(tileEntity.getInvName(), 45, 4, 0x404040);
fontRendererObj.drawString(tileEntity.getInventoryName(), 45, 4, 0x404040);
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
}

View file

@ -159,7 +159,7 @@ public class GuiDigitalMiner extends GuiMekanism
int xAxis = (mouseX - (width - xSize) / 2);
int yAxis = (mouseY - (height - ySize) / 2);
fontRendererObj.drawString(tileEntity.getInvName(), 69, 6, 0x404040);
fontRendererObj.drawString(tileEntity.getInventoryName(), 69, 6, 0x404040);
fontRendererObj.drawString(MekanismUtils.localize("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
fontRendererObj.drawString(tileEntity.running ? MekanismUtils.localize("gui.digitalMiner.running") : MekanismUtils.localize("gui.idle"), 9, 10, 0x00CD00);

View file

@ -31,7 +31,7 @@ public class GuiDynamicTank extends GuiMekanism
int xAxis = (mouseX - (width - xSize) / 2);
int yAxis = (mouseY - (height - ySize) / 2);
fontRendererObj.drawString(tileEntity.getInvName(), 45, 6, 0x404040);
fontRendererObj.drawString(tileEntity.getInventoryName(), 45, 6, 0x404040);
fontRendererObj.drawString(MekanismUtils.localize("container.inventory"), 8, (ySize - 94) + 2, 0x404040);
fontRendererObj.drawString(MekanismUtils.localize("gui.volume") + ": " + tileEntity.clientCapacity/TankUpdateProtocol.FLUID_PER_TANK, 53, 26, 0x00CD00);
fontRendererObj.drawString(tileEntity.structure.fluidStored != null ? tileEntity.structure.fluidStored.getFluid().getName() + ":" : MekanismUtils.localize("gui.noFluid"), 53, 44, 0x00CD00);

View file

@ -60,7 +60,7 @@ public class GuiElectricMachine extends GuiMekanism
@Override
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
{
fontRendererObj.drawString(tileEntity.getInvName(), 45, 6, 0x404040);
fontRendererObj.drawString(tileEntity.getInventoryName(), 45, 6, 0x404040);
fontRendererObj.drawString(MekanismUtils.localize("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
super.drawGuiContainerForegroundLayer(mouseX, mouseY);

View file

@ -47,7 +47,7 @@ public class GuiElectricPump extends GuiMekanism
@Override
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
{
fontRendererObj.drawString(tileEntity.getInvName(), 45, 6, 0x404040);
fontRendererObj.drawString(tileEntity.getInventoryName(), 45, 6, 0x404040);
fontRendererObj.drawString(MekanismUtils.localize("container.inventory"), 8, (ySize - 94) + 2, 0x404040);
fontRendererObj.drawString(MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()), 51, 26, 0x00CD00);
fontRendererObj.drawString(tileEntity.fluidTank.getFluid() != null ? tileEntity.fluidTank.getFluid().getFluid().getName() + ": " + tileEntity.fluidTank.getFluid().amount : MekanismUtils.localize("gui.noFluid"), 51, 35, 0x00CD00);

View file

@ -99,8 +99,7 @@ public class GuiElectrolyticSeparator extends GuiMekanism
data.add((byte)0);
Mekanism.packetPipeline.sendToServer(new PacketTileEntity(Coord4D.get(tileEntity), data));
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
playClickSound();
}
else if(xAxis > 160 && xAxis < 169 && yAxis > 73 && yAxis < 82)
{
@ -108,15 +107,14 @@ public class GuiElectrolyticSeparator extends GuiMekanism
data.add((byte)1);
Mekanism.packetPipeline.sendToServer(new PacketTileEntity(Coord4D.get(tileEntity), data));
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
playClickSound();
}
}
@Override
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
{
fontRendererObj.drawString(tileEntity.getInvName(), 45, 6, 0x404040);
fontRendererObj.drawString(tileEntity.getInventoryName(), 45, 6, 0x404040);
String name = tileEntity.dumpLeft ? "Dumping..." : tileEntity.leftTank.getGas() == null ? MekanismUtils.localize("gui.none") : tileEntity.leftTank.getGas().getGas().getLocalizedName();
fontRendererObj.drawString(name, 21, 73, 0x404040);

View file

@ -51,7 +51,7 @@ public class GuiFactory extends GuiMekanism
int xAxis = (mouseX - (width - xSize) / 2);
int yAxis = (mouseY - (height - ySize) / 2);
fontRendererObj.drawString(tileEntity.getInvName(), 48, 4, 0x404040);
fontRendererObj.drawString(tileEntity.getInventoryName(), 48, 4, 0x404040);
fontRendererObj.drawString(MekanismUtils.localize("container.inventory"), 8, (ySize - 93) + 2, 0x404040);
fontRendererObj.drawString(RecipeType.values()[tileEntity.recipeType].getName(), 104, (ySize - 93) + 2, 0x404040);

View file

@ -36,7 +36,7 @@ public class GuiGasTank extends GuiMekanism
String capacityInfo = tileEntity.gasTank.getStored() + "/" + tileEntity.MAX_GAS;
fontRendererObj.drawString(tileEntity.getInvName(), 43, 6, 0x404040);
fontRendererObj.drawString(tileEntity.getInventoryName(), 43, 6, 0x404040);
fontRendererObj.drawString(capacityInfo, 45, 40, 0x404040);
fontRendererObj.drawString("Gas: " + (tileEntity.gasTank.getGas() != null ? tileEntity.gasTank.getGas().getGas().getLocalizedName() : "None"), 45, 49, 0x404040);
fontRendererObj.drawString(MekanismUtils.localize("container.inventory"), 8, ySize - 96 + 2, 0x404040);
@ -82,8 +82,7 @@ public class GuiGasTank extends GuiMekanism
data.add(0);
Mekanism.packetPipeline.sendToServer(new PacketTileEntity(Coord4D.get(tileEntity), data));
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
playClickSound();
}
}
}

View file

@ -16,7 +16,6 @@ import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import sun.net.www.content.text.plain;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

View file

@ -95,7 +95,7 @@ public class GuiRotaryCondensentrator extends GuiMekanism
int xAxis = (mouseX - (width - xSize) / 2);
int yAxis = (mouseY - (height - ySize) / 2);
fontRendererObj.drawString(tileEntity.getInvName(), 26, 4, 0x404040);
fontRendererObj.drawString(tileEntity.getInventoryName(), 26, 4, 0x404040);
fontRendererObj.drawString(tileEntity.mode == 0 ? MekanismUtils.localize("gui.condensentrating") : MekanismUtils.localize("gui.decondensentrating"), 6, (ySize - 94) + 2, 0x404040);
if(xAxis >= 116 && xAxis <= 168 && yAxis >= 76 && yAxis <= 80)

View file

@ -35,7 +35,7 @@ public class GuiSeismicVibrator extends GuiMekanism
int xAxis = (mouseX - (width - xSize) / 2);
int yAxis = (mouseY - (height - ySize) / 2);
fontRendererObj.drawString(tileEntity.getInvName(), 45, 6, 0x404040);
fontRendererObj.drawString(tileEntity.getInventoryName(), 45, 6, 0x404040);
fontRendererObj.drawString(MekanismUtils.localize("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
fontRendererObj.drawString(tileEntity.isActive ? "Vibrating" : "Idle", 19, 26, 0x00CD00);

View file

@ -165,7 +165,7 @@ public class RenderPartTransmitter implements IIconRegister
entityItem.hoverStart = 0;
entityItem.setPosition(transporter.x() + 0.5, transporter.y() + 0.5, transporter.z() + 0.5);
entityItem.getWorldObj() = transporter.world();
entityItem.worldObj = transporter.world();
for(TransporterStack stack : transporter.transit)
{
@ -179,7 +179,7 @@ public class RenderPartTransmitter implements IIconRegister
GL11.glTranslated(vec.x + pos[0], vec.y + pos[1] - entityItem.yOffset, vec.z + pos[2]);
GL11.glScalef(0.75F, 0.75F, 0.75F);
renderer.doRenderItem(entityItem, 0, 0, 0, 0, 0);
renderer.doRender(entityItem, 0, 0, 0, 0, 0);
GL11.glPopMatrix();
if(stack.color != null)

View file

@ -22,7 +22,7 @@ public class BasicRenderingHandler implements ISimpleBlockRenderingHandler
GL11.glPushMatrix();
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
if(block.blockID == Mekanism.basicBlockID || block.blockID == Mekanism.basicBlock2ID)
if(block == Mekanism.BasicBlock || block == Mekanism.BasicBlock2)
{
MekanismRenderer.renderItem(renderer, metadata, block);
}
@ -33,7 +33,7 @@ public class BasicRenderingHandler implements ISimpleBlockRenderingHandler
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer)
{
if(block.blockID == Mekanism.basicBlockID || block.blockID == Mekanism.basicBlock2ID)
if(block == Mekanism.BasicBlock || block == Mekanism.BasicBlock2)
{
int metadata = world.getBlockMetadata(x, y, z);
@ -46,15 +46,15 @@ public class BasicRenderingHandler implements ISimpleBlockRenderingHandler
return false;
}
@Override
public boolean shouldRender3DInInventory()
{
return true;
}
@Override
public int getRenderId()
{
return ClientProxy.BASIC_RENDER_ID;
}
@Override
public boolean shouldRender3DInInventory(int modelId)
{
return true;
}
}

View file

@ -47,7 +47,7 @@ public class MachineRenderingHandler implements ISimpleBlockRenderingHandler
@Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
{
if(block == null || renderer == null || MachineType.get(block.blockID, metadata) == null)
if(block == null || renderer == null || MachineType.get(block, metadata) == null)
{
return;
}
@ -55,7 +55,7 @@ public class MachineRenderingHandler implements ISimpleBlockRenderingHandler
GL11.glPushMatrix();
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
MachineType type = MachineType.get(block.blockID, metadata);
MachineType type = MachineType.get(block, metadata);
if(type == MachineType.ELECTRIC_PUMP)
{
@ -165,9 +165,9 @@ public class MachineRenderingHandler implements ISimpleBlockRenderingHandler
{
int metadata = world.getBlockMetadata(x, y, z);
if(MachineType.get(block.blockID, metadata) != null)
if(MachineType.get(block, metadata) != null)
{
if(!MachineType.get(block.blockID, metadata).hasModel)
if(!MachineType.get(block, metadata).hasModel)
{
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBoundsFromBlock(block);
@ -179,7 +179,7 @@ public class MachineRenderingHandler implements ISimpleBlockRenderingHandler
}
@Override
public boolean shouldRender3DInInventory()
public boolean shouldRender3DInInventory(int modelId)
{
return true;
}

View file

@ -30,7 +30,6 @@ import mekanism.common.item.ItemAtomicDisassembler;
import mekanism.common.item.ItemBalloon;
import mekanism.common.item.ItemBlockBasic;
import mekanism.common.item.ItemBlockMachine;
import mekanism.common.item.ItemBlockPlastic;
import mekanism.common.item.ItemFreeRunners;
import mekanism.common.item.ItemGasMask;
import mekanism.common.item.ItemRobit;
@ -52,7 +51,6 @@ import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
@ -88,7 +86,7 @@ public class ItemRenderingHandler implements IItemRenderer
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type)
{
if(item.itemID == Mekanism.WalkieTalkie.itemID)
if(item.getItem() == Mekanism.WalkieTalkie)
{
return type != ItemRenderType.INVENTORY;
}
@ -156,9 +154,9 @@ public class ItemRenderingHandler implements IItemRenderer
}
else if(item.getItem() instanceof ItemBlockBasic && item.getItemDamage() == 6)
{
RenderingRegistry.instance().renderInventoryBlock((RenderBlocks)data[0], Blocks.blocksList[Mekanism.basicBlockID], item.getItemDamage(), ClientProxy.BASIC_RENDER_ID);
RenderingRegistry.instance().renderInventoryBlock((RenderBlocks)data[0], Mekanism.BasicBlock, item.getItemDamage(), ClientProxy.BASIC_RENDER_ID);
if(binRenderer == null || binRenderer.getFontRenderer() == null)
if(binRenderer == null || binRenderer.func_147498_b()/*getFontRenderer()*/ == null)
{
return;
}
@ -180,7 +178,7 @@ public class ItemRenderingHandler implements IItemRenderer
{
GL11.glPushMatrix();
if(!(itemStack.getItem() instanceof ItemBlock) || Blocks.blocksList[itemStack.itemID].getRenderType() != 0)
if(!(itemStack.getItem() instanceof ItemBlock) || Block.getBlockFromItem(itemStack.getItem()).getRenderType() != 0)
{
GL11.glRotatef(180, 0, 0, 1);
GL11.glTranslatef(-1.02F, -0.2F, 0);
@ -208,7 +206,7 @@ public class ItemRenderingHandler implements IItemRenderer
GL11.glDisable(GL11.GL_LIGHTING);
renderItem.renderItemAndEffectIntoGUI(binRenderer.getFontRenderer(), renderEngine, itemStack, 0, 0);
renderItem.renderItemAndEffectIntoGUI(binRenderer.func_147498_b()/*getFontRenderer()*/, renderEngine, itemStack, 0, 0);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopMatrix();
@ -239,7 +237,7 @@ public class ItemRenderingHandler implements IItemRenderer
GL11.glTranslatef(displayWidth / 2, 1F, displayHeight / 2);
GL11.glRotatef(-90, 1, 0, 0);
FontRenderer fontRenderer = binRenderer.getFontRenderer();
FontRenderer fontRenderer = binRenderer.func_147498_b();//getFontRenderer();
int requiredWidth = Math.max(fontRenderer.getStringWidth(amount), 1);
int lineHeight = fontRenderer.FONT_HEIGHT + 2;
@ -273,7 +271,7 @@ public class ItemRenderingHandler implements IItemRenderer
GL11.glPopMatrix();
}
}
else if(item.itemID == Mekanism.gasTankID)
else if(Block.getBlockFromItem(item.getItem()) == Mekanism.GasTank)
{
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "GasTank.png"));
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
@ -281,7 +279,7 @@ public class ItemRenderingHandler implements IItemRenderer
GL11.glTranslatef(0.0F, -1.0F, 0.0F);
gasTank.render(0.0625F);
}
else if(item.itemID == Mekanism.obsidianTNTID)
else if(Block.getBlockFromItem(item.getItem()) == Mekanism.ObsidianTNT)
{
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ObsidianTNT.png"));
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
@ -435,11 +433,11 @@ public class ItemRenderingHandler implements IItemRenderer
else {
if(item.getItem() instanceof ItemBlockMachine)
{
RenderingRegistry.instance().renderInventoryBlock((RenderBlocks)data[0], Blocks.blocksList[item.itemID], item.getItemDamage(), ClientProxy.MACHINE_RENDER_ID);
RenderingRegistry.instance().renderInventoryBlock((RenderBlocks)data[0], Block.getBlockFromItem(item.getItem()), item.getItemDamage(), ClientProxy.MACHINE_RENDER_ID);
}
else if(item.getItem() instanceof ItemBlockBasic)
{
RenderingRegistry.instance().renderInventoryBlock((RenderBlocks)data[0], Blocks.blocksList[item.itemID], item.getItemDamage(), ClientProxy.BASIC_RENDER_ID);
RenderingRegistry.instance().renderInventoryBlock((RenderBlocks)data[0], Block.getBlockFromItem(item.getItem()), item.getItemDamage(), ClientProxy.BASIC_RENDER_ID);
}
}
}

View file

@ -10,11 +10,10 @@ import mekanism.client.render.MekanismRenderer.Model3D;
import mekanism.common.IInvConfiguration;
import mekanism.common.item.ItemConfigurator;
import mekanism.common.util.MekanismUtils;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;

View file

@ -1,7 +1,5 @@
package mekanism.common;
import java.util.EnumSet;
import mekanism.common.item.ItemFreeRunners;
import mekanism.common.item.ItemGasMask;
import mekanism.common.item.ItemJetpack;
@ -13,6 +11,7 @@ import mekanism.common.util.MekanismUtils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.network.NetHandlerPlayServer;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent;
@ -136,7 +135,7 @@ public class CommonPlayerTickHandler
if(player instanceof EntityPlayerMP)
{
((EntityPlayerMP)player).playerNetServerHandler.ticksForFloatKick = 0;
MekanismUtils.setPrivateValue(((EntityPlayerMP)player).playerNetServerHandler, 0, NetHandlerPlayServer.class, ObfuscatedNames.NetHandlerPlayServer_floatingTickCount);
}
jetpack.useGas(player.getEquipmentInSlot(3));

View file

@ -71,15 +71,14 @@ import mekanism.common.tile.TileEntityRotaryCondensentrator;
import mekanism.common.tile.TileEntitySalinationController;
import mekanism.common.tile.TileEntitySeismicVibrator;
import mekanism.common.tile.TileEntityTeleporter;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.inventory.Container;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.config.Configuration;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.TickRegistry;
import cpw.mods.fml.relauncher.FMLInjectionData;
import cpw.mods.fml.relauncher.Side;
@ -175,22 +174,6 @@ public class CommonProxy
public void loadConfiguration()
{
Mekanism.configuration.load();
Mekanism.oreBlockID = Mekanism.configuration.getBlock("OreBlock", Mekanism.BLOCK_ID++).getInt();
Mekanism.basicBlockID = Mekanism.configuration.getBlock("BasicBlock", Mekanism.BLOCK_ID++).getInt();
Mekanism.basicBlock2ID = Mekanism.configuration.getBlock("BasicBlock2", Mekanism.BLOCK_ID++).getInt();
Mekanism.machineBlockID = Mekanism.configuration.getBlock("MachineBlock", Mekanism.BLOCK_ID++).getInt();
Mekanism.machineBlock2ID = Mekanism.configuration.getBlock("MachineBlock2", Mekanism.BLOCK_ID++).getInt();
Mekanism.cardboardBoxID = Mekanism.configuration.getBlock("CardboardBox", Mekanism.BLOCK_ID++).getInt();
Mekanism.obsidianTNTID = Mekanism.configuration.getBlock("ObsidianTNT", Mekanism.BLOCK_ID++).getInt();
Mekanism.energyCubeID = Mekanism.configuration.getBlock("EnergyCube", Mekanism.BLOCK_ID++).getInt();
Mekanism.gasTankID = Mekanism.configuration.getBlock("GasTank", Mekanism.BLOCK_ID++).getInt();
Mekanism.boundingBlockID = Mekanism.configuration.getBlock("BoundingBlock", Mekanism.BLOCK_ID++).getInt();
Mekanism.plasticID = Mekanism.configuration.getBlock("PlasticBlock", Mekanism.BLOCK_ID++).getInt();
Mekanism.slickPlasticID = Mekanism.configuration.getBlock("SlickPlasticBlock", Mekanism.BLOCK_ID++).getInt();
Mekanism.glowPlasticID = Mekanism.configuration.getBlock("GlowPlasticBlock", Mekanism.BLOCK_ID++).getInt();
Mekanism.reinforcedPlasticID = Mekanism.configuration.getBlock("ReinforcedPlasticBlock", Mekanism.BLOCK_ID++).getInt();
Mekanism.roadPlasticID = Mekanism.configuration.getBlock("RoadPlasticBlock", Mekanism.BLOCK_ID++).getInt();
Mekanism.plasticFenceID = Mekanism.configuration.getBlock("PlasticFenceBlock", Mekanism.BLOCK_ID++).getInt();
Mekanism.osmiumGenerationEnabled = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "OsmiumGenerationEnabled", true).getBoolean(true);
Mekanism.copperGenerationEnabled = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "CopperGenerationEnabled", true).getBoolean(true);
@ -225,10 +208,10 @@ public class CommonProxy
if(Mekanism.cardboardSpawners)
{
MekanismAPI.removeBoxBlacklist(Blocks.mobSpawner.blockID, 0);
MekanismAPI.removeBoxBlacklist(Blocks.mob_spawner, 0);
}
else {
MekanismAPI.addBoxBlacklist(Blocks.mobSpawner.blockID, 0);
MekanismAPI.addBoxBlacklist(Blocks.mob_spawner, 0);
}
Mekanism.enrichmentChamberUsage = Mekanism.configuration.get("usage", "EnrichmentChamberUsage", 50D).getDouble(50D);
@ -433,10 +416,10 @@ public class CommonProxy
{
if(Mekanism.cardboardSpawners)
{
MekanismAPI.removeBoxBlacklist(Blocks.mobSpawner.blockID, 0);
MekanismAPI.removeBoxBlacklist(Blocks.mob_spawner, 0);
}
else {
MekanismAPI.addBoxBlacklist(Blocks.mobSpawner.blockID, 0);
MekanismAPI.addBoxBlacklist(Blocks.mob_spawner, 0);
}
System.out.println("[Mekanism] Received config from server.");

View file

@ -219,7 +219,7 @@ public class EnergyNetwork extends DynamicNetwork<TileEntity, EnergyNetwork>
if(receiver != null)
{
float toSend = receiver.receiveEnergy(Type.PIPE, (float)(Math.min(receiver.powerRequest(), currentSending*Mekanism.TO_BC)), side.getOpposite());
double toSend = receiver.receiveEnergy(Type.PIPE, (float)(Math.min(receiver.powerRequest(), currentSending*Mekanism.TO_BC)), side.getOpposite());
sent += toSend*Mekanism.FROM_BC;
}
}

View file

@ -13,4 +13,5 @@ public final class ObfuscatedNames
public static String[] GuiScreen_fontRenderer = new String[] {"fontRenderer", "field_73886_k", "o"};
public static String[] GuiContainer_guiLeft = new String[] {"guiLeft", "field_74198_m"};
public static String[] GuiContainer_guiTop = new String[] {"guiTop", "field_74197_n"};
public static String[] NetHandlerPlayServerd_floatingTickCount = new String[] {"floatingTickCount", "field_147365_f"};
}

View file

@ -2,8 +2,7 @@ package mekanism.common;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.ChunkProviderEnd;
@ -25,7 +24,7 @@ public class OreHandler implements IWorldGenerator
int randPosX = (chunkX*16) + random.nextInt(16);
int randPosY = random.nextInt(60);
int randPosZ = (chunkZ*16) + random.nextInt(16);
new WorldGenMinable(Mekanism.oreBlockID, 0, 8, Blocks.stone.blockID).generate(world, random, randPosX, randPosY, randPosZ);
new WorldGenMinable(Mekanism.OreBlock, 0, 8, Blocks.stone).generate(world, random, randPosX, randPosY, randPosZ);
}
}
@ -36,7 +35,7 @@ public class OreHandler implements IWorldGenerator
int randPosX = (chunkX*16) + random.nextInt(16);
int randPosY = random.nextInt(60);
int randPosZ = (chunkZ*16) + random.nextInt(16);
new WorldGenMinable(Mekanism.oreBlockID, 1, 8, Blocks.stone.blockID).generate(world, random, randPosX, randPosY, randPosZ);
new WorldGenMinable(Mekanism.OreBlock, 1, 8, Blocks.stone).generate(world, random, randPosX, randPosY, randPosZ);
}
}
@ -47,7 +46,7 @@ public class OreHandler implements IWorldGenerator
int randPosX = (chunkX*16) + random.nextInt(16);
int randPosY = random.nextInt(60);
int randPosZ = (chunkZ*16) + random.nextInt(16);
new WorldGenMinable(Mekanism.oreBlockID, 2, 8, Blocks.stone.blockID).generate(world, random, randPosX, randPosY, randPosZ);
new WorldGenMinable(Mekanism.OreBlock, 2, 8, Blocks.stone).generate(world, random, randPosX, randPosY, randPosZ);
}
}
}

View file

@ -1236,7 +1236,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
@Override
public IPeripheral getPeripheral(World world, int x, int y, int z, int side) {
TileEntity te = world.getBlockTileEntity(x, y, z);
TileEntity te = world.getTileEntity(x, y, z);
if(te != null && te instanceof IPeripheral)
{

View file

@ -43,14 +43,14 @@ public class InventoryElectricChest extends InventoryBasic
}
@Override
public void openChest()
public void openInventory()
{
read();
((IElectricChest)getStack().getItem()).setOpen(getStack(), true);
}
@Override
public void closeChest()
public void closeInventory()
{
write();
((IElectricChest)getStack().getItem()).setOpen(getStack(), false);
@ -89,7 +89,7 @@ public class InventoryElectricChest extends InventoryBasic
{
for(int tagCount = 0; tagCount < tagList.tagCount(); tagCount++)
{
NBTTagCompound tagCompound = (NBTTagCompound)tagList.tagAt(tagCount);
NBTTagCompound tagCompound = (NBTTagCompound)tagList.getCompoundTagAt(tagCount);
byte slotID = tagCompound.getByte("Slot");
if(slotID >= 0 && slotID < getSizeInventory())

View file

@ -45,7 +45,7 @@ public class ContainerAdvancedElectricMachine extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -54,7 +54,7 @@ public class ContainerAdvancedElectricMachine extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -41,7 +41,7 @@ public class ContainerChanceMachine extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -50,7 +50,7 @@ public class ContainerChanceMachine extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -39,7 +39,7 @@ public class ContainerChemicalCrystallizer extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -48,7 +48,7 @@ public class ContainerChemicalCrystallizer extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -41,7 +41,7 @@ public class ContainerChemicalDissolutionChamber extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -50,7 +50,7 @@ public class ContainerChemicalDissolutionChamber extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -40,7 +40,7 @@ public class ContainerChemicalInfuser extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -49,7 +49,7 @@ public class ContainerChemicalInfuser extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -40,7 +40,7 @@ public class ContainerChemicalOxidizer extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -49,7 +49,7 @@ public class ContainerChemicalOxidizer extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -42,7 +42,7 @@ public class ContainerChemicalWasher extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -51,7 +51,7 @@ public class ContainerChemicalWasher extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -48,7 +48,7 @@ public class ContainerDigitalMiner extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -57,7 +57,7 @@ public class ContainerDigitalMiner extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -34,7 +34,7 @@ public class ContainerDynamicTank extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -43,7 +43,7 @@ public class ContainerDynamicTank extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -28,10 +28,10 @@ public class ContainerElectricChest extends Container
if(isBlock)
{
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
else {
itemInventory.openChest();
itemInventory.openInventory();
}
for(int slotY = 0; slotY < 6; slotY++)
@ -79,10 +79,10 @@ public class ContainerElectricChest extends Container
if(isBlock)
{
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
else {
itemInventory.closeChest();
itemInventory.closeInventory();
}
}

View file

@ -40,7 +40,7 @@ public class ContainerElectricMachine extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -49,7 +49,7 @@ public class ContainerElectricMachine extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -37,7 +37,7 @@ public class ContainerElectricPump extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -46,7 +46,7 @@ public class ContainerElectricPump extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -39,7 +39,7 @@ public class ContainerElectrolyticSeparator extends Container
addSlotToContainer(new Slot(inventory, slotX, 8 + slotX * 18, 142));
}
tileEntity.openChest();
tileEntity.openInventory();
tileEntity.open(inventory.player);
}
@ -48,7 +48,7 @@ public class ContainerElectrolyticSeparator extends Container
{
super.onContainerClosed(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
tileEntity.close(entityplayer);
}

View file

@ -38,7 +38,7 @@ public class ContainerEnergyCube extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -47,7 +47,7 @@ public class ContainerEnergyCube extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -96,7 +96,7 @@ public class ContainerFactory extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -105,7 +105,7 @@ public class ContainerFactory extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -31,7 +31,7 @@ public class ContainerFilter extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -40,7 +40,7 @@ public class ContainerFilter extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -35,7 +35,7 @@ public class ContainerGasTank extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -44,7 +44,7 @@ public class ContainerGasTank extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -44,7 +44,7 @@ public class ContainerMetallurgicInfuser extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -53,7 +53,7 @@ public class ContainerMetallurgicInfuser extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -13,7 +13,7 @@ public class ContainerNull extends Container
tileEntity = tile;
tileEntity.open(player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -22,7 +22,7 @@ public class ContainerNull extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -41,7 +41,7 @@ public class ContainerPRC extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -50,7 +50,7 @@ public class ContainerPRC extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -14,7 +14,7 @@ public class ContainerRobitInventory extends Container
public ContainerRobitInventory(InventoryPlayer inventory, EntityRobit entity)
{
robit = entity;
robit.openChest();
robit.openInventory();
for(int slotY = 0; slotY < 3; slotY++)
{
@ -92,6 +92,6 @@ public class ContainerRobitInventory extends Container
public void onContainerClosed(EntityPlayer entityplayer)
{
super.onContainerClosed(entityplayer);
robit.closeChest();
robit.closeInventory();
}
}

View file

@ -17,7 +17,7 @@ public class ContainerRobitMain extends Container
robit = entity;
addSlotToContainer(new SlotDischarge(entity, 27, 153, 17));
robit.openChest();
robit.openInventory();
int slotX;
@ -39,7 +39,7 @@ public class ContainerRobitMain extends Container
public void onContainerClosed(EntityPlayer entityplayer)
{
super.onContainerClosed(entityplayer);
robit.closeChest();
robit.closeInventory();
}
@Override

View file

@ -22,7 +22,7 @@ public class ContainerRobitSmelting extends Container
public ContainerRobitSmelting(InventoryPlayer inventory, EntityRobit entity)
{
robit = entity;
robit.openChest();
robit.openInventory();
addSlotToContainer(new Slot(entity, 28, 56, 17));
addSlotToContainer(new Slot(entity, 29, 56, 53));
@ -182,6 +182,6 @@ public class ContainerRobitSmelting extends Container
public void onContainerClosed(EntityPlayer entityplayer)
{
super.onContainerClosed(entityplayer);
robit.closeChest();
robit.closeInventory();
}
}

View file

@ -42,7 +42,7 @@ public class ContainerRotaryCondensentrator extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -51,7 +51,7 @@ public class ContainerRotaryCondensentrator extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -40,7 +40,7 @@ public class ContainerSalinationController extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -49,7 +49,7 @@ public class ContainerSalinationController extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -33,7 +33,7 @@ public class ContainerSeismicVibrator extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -42,7 +42,7 @@ public class ContainerSeismicVibrator extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -33,7 +33,7 @@ public class ContainerTeleporter extends Container
}
tileEntity.open(inventory.player);
tileEntity.openChest();
tileEntity.openInventory();
}
@Override
@ -42,7 +42,7 @@ public class ContainerTeleporter extends Container
super.onContainerClosed(entityplayer);
tileEntity.close(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
}
@Override

View file

@ -72,13 +72,13 @@ public class ItemBlockCardboardBox extends ItemBlock
{
if(!player.isSneaking() && !world.isAirBlock(x, y, z) && stack.getItemDamage() == 0)
{
int id = world.getBlockId(x, y, z);
Block block = world.getBlock(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
if(!world.isRemote && MekanismAPI.isBlockCompatible(id, meta))
if(!world.isRemote && MekanismAPI.isBlockCompatible(id, meta))//TODO
{
BlockData data = new BlockData();
data.id = id;
data.block = block;
data.meta = meta;
isMonitoring = true;
@ -97,7 +97,7 @@ public class ItemBlockCardboardBox extends ItemBlock
stack.stackSize--;
}
world.setBlock(x, y, z, Mekanism.cardboardBoxID, 1, 3);
world.setBlock(x, y, z, Mekanism.CardboardBox, 1, 3);
isMonitoring = false;

View file

@ -240,7 +240,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
for(int i = 0; i < tagList.tagCount(); i++)
{
miner.filters.add(MinerFilter.readFromNBT((NBTTagCompound)tagList.tagAt(i)));
miner.filters.add(MinerFilter.readFromNBT((NBTTagCompound)tagList.getCompoundTagAt(i)));
}
}
}
@ -266,7 +266,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
for(int i = 0; i < tagList.tagCount(); i++)
{
sorter.filters.add(TransporterFilter.readFromNBT((NBTTagCompound)tagList.tagAt(i)));
sorter.filters.add(TransporterFilter.readFromNBT((NBTTagCompound)tagList.getCompoundTagAt(i)));
}
}
}

View file

@ -13,9 +13,9 @@ import com.google.common.io.ByteArrayDataInput;
public class MItemStackFilter extends MinerFilter
{
private static List<Integer> metaIgnoreArray = ListUtils.asList(Blocks.planks.blockID, Blocks.ladder.blockID, Blocks.torchWood.blockID,
Blocks.furnaceBurning.blockID, Blocks.furnaceIdle.blockID, Blocks.dispenser.blockID, Blocks.pistonBase.blockID,
Blocks.pistonExtension.blockID, Blocks.pistonStickyBase.blockID, Blocks.pistonMoving.blockID);
private static List<Block> metaIgnoreArray = ListUtils.asList(Blocks.planks, Blocks.ladder, Blocks.torch,
Blocks.furnace, Blocks.dispenser, Blocks.piston,
Blocks.piston_extension, Blocks.piston_head);
public ItemStack itemType;

View file

@ -9,7 +9,7 @@ import mekanism.api.ItemInfo;
import mekanism.common.IBoundingBlock;
import mekanism.common.tile.TileEntityDigitalMiner;
import mekanism.common.util.MekanismUtils;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
@ -44,7 +44,7 @@ public class ThreadMinerSearch extends Thread
Coord4D coord = tileEntity.getStartingCoord();
int diameter = tileEntity.getDiameter();
int size = tileEntity.getTotalSize();
ItemInfo info = new ItemInfo(0,0);
ItemInfo info = new ItemInfo(0, 0);
for(int i = 0; i < size; i++)
{
@ -73,10 +73,10 @@ public class ThreadMinerSearch extends Thread
continue;
}
info.id = tileEntity.getWorldObj().getBlockId(x, y, z);
info.block = tileEntity.getWorldObj().getBlock(x, y, z);
info.meta = tileEntity.getWorldObj().getBlockMetadata(x, y, z);
if(info.id != 0 && info.id != Blocks.bedrock.blockID)
if(info.block != null && info.block != Blocks.bedrock)
{
boolean canFilter = false;
@ -85,7 +85,7 @@ public class ThreadMinerSearch extends Thread
canFilter = acceptedItems.get(info);
}
else {
ItemStack stack = new ItemStack(info.id, 1, info.meta);
ItemStack stack = new ItemStack(info.block, 1, info.meta);
if(tileEntity.replaceStack != null && tileEntity.replaceStack.isItemEqual(stack))
{

View file

@ -5,30 +5,26 @@ import java.util.Collections;
import mekanism.api.EnumColor;
import mekanism.client.render.RenderGlowPanel;
import mekanism.common.Mekanism;
import net.minecraft.client.particle.EffectRenderer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.IIcon;
import net.minecraft.util.MovingObjectPosition;
import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import codechicken.lib.data.MCDataInput;
import codechicken.lib.data.MCDataOutput;
import codechicken.lib.lighting.LazyLightMatrix;
import codechicken.lib.vec.Cuboid6;
import codechicken.lib.vec.Rotation;
import codechicken.lib.vec.Translation;
import codechicken.lib.vec.Vector3;
import codechicken.multipart.IIconHitEffects;
import codechicken.multipart.IconHitEffects;
import codechicken.multipart.JCuboidPart;
import codechicken.multipart.JIconHitEffects;
import codechicken.multipart.JNormalOcclusion;
import codechicken.multipart.NormalOcclusionTest;
import codechicken.multipart.TMultiPart;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class PartGlowPanel extends JCuboidPart implements JNormalOcclusion, JIconHitEffects
{
@ -153,13 +149,13 @@ public class PartGlowPanel extends JCuboidPart implements JNormalOcclusion, JIco
@Override
public void addHitEffects(MovingObjectPosition hit, EffectRenderer effectRenderer)
{
IIconHitEffects.addHitEffects(this, hit, effectRenderer);
IconHitEffects.addHitEffects(this, hit, effectRenderer);
}
@Override
public void addDestroyEffects(MovingObjectPosition mop, EffectRenderer effectRenderer)
{
IIconHitEffects.addDestroyEffects(this, effectRenderer, false);
IconHitEffects.addDestroyEffects(this, effectRenderer, false);
}
@Override

View file

@ -613,7 +613,7 @@ public class PartLogisticalTransporter extends PartSidedPipe implements ILogisti
for(int i = 0; i < tagList.tagCount(); i++)
{
TransporterStack stack = TransporterStack.readFromNBT((NBTTagCompound)tagList.tagAt(i));
TransporterStack stack = TransporterStack.readFromNBT((NBTTagCompound)tagList.getCompoundTagAt(i));
transit.add(stack);
TransporterManager.add(stack);

View file

@ -1,6 +1,5 @@
package mekanism.common.multipart;
import codechicken.microblock.ISidedHollowConnect;
import ic2.api.tile.IWrenchable;
import java.util.ArrayList;
@ -20,7 +19,6 @@ import mekanism.common.IConfigurable;
import mekanism.common.ITileNetwork;
import mekanism.common.Mekanism;
import mekanism.common.Tier;
import mekanism.common.Tier.CableTier;
import mekanism.common.item.ItemConfigurator;
import mekanism.common.multipart.TransmitterType.Size;
import net.minecraft.client.particle.EffectRenderer;
@ -35,14 +33,14 @@ import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.api.tools.IToolWrench;
import codechicken.lib.data.MCDataInput;
import codechicken.lib.data.MCDataOutput;
import codechicken.lib.lighting.LazyLightMatrix;
import codechicken.lib.raytracer.ExtendedMOP;
import codechicken.lib.raytracer.IndexedCuboid6;
import codechicken.lib.raytracer.RayTracer;
import codechicken.lib.render.CCModel;
import codechicken.lib.vec.Cuboid6;
import codechicken.lib.vec.Vector3;
import codechicken.multipart.IIconHitEffects;
import codechicken.microblock.ISidedHollowConnect;
import codechicken.multipart.IconHitEffects;
import codechicken.multipart.JIconHitEffects;
import codechicken.multipart.JNormalOcclusion;
import codechicken.multipart.NormalOcclusionTest;
@ -323,13 +321,13 @@ public abstract class PartSidedPipe extends TMultiPart implements TSlottedPart,
@Override
public void addHitEffects(MovingObjectPosition hit, EffectRenderer effectRenderer)
{
IIconHitEffects.addHitEffects(this, hit, effectRenderer);
IconHitEffects.addHitEffects(this, hit, effectRenderer);
}
@Override
public void addDestroyEffects(MovingObjectPosition mop, EffectRenderer effectRenderer)
{
IIconHitEffects.addDestroyEffects(this, effectRenderer, false);
IconHitEffects.addDestroyEffects(this, effectRenderer, false);
}
public abstract boolean isValidAcceptor(TileEntity tile, ForgeDirection side);

View file

@ -125,25 +125,25 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
}
@Override
public void openChest()
public void openInventory()
{
if(getInv() == null)
{
return;
}
getInv().openChest();
getInv().openInventory();
}
@Override
public void closeChest()
public void closeInventory()
{
if(getInv() == null)
{
return;
}
getInv().closeChest();
getInv().closeInventory();
}
@Override

View file

@ -440,10 +440,10 @@ public class TileEntityBin extends TileEntityBasicBlock implements ISidedInvento
}
@Override
public void openChest() {}
public void openInventory() {}
@Override
public void closeChest() {}
public void closeInventory() {}
@Override
public boolean isItemValidForSlot(int i, ItemStack itemstack)

View file

@ -15,7 +15,6 @@ import mekanism.common.ILogisticalTransporter;
import mekanism.common.IRedstoneControl;
import mekanism.common.IUpgradeTile;
import mekanism.common.Mekanism;
import mekanism.common.PacketHandler;
import mekanism.common.block.BlockMachine.MachineType;
import mekanism.common.inventory.container.ContainerFilter;
import mekanism.common.inventory.container.ContainerNull;
@ -42,14 +41,15 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.util.Constants.NBT;
import net.minecraftforge.common.util.ForgeDirection;
import com.google.common.io.ByteArrayDataInput;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dan200.computercraft.api.peripheral.IComputerAccess;
import dan200.computercraft.api.lua.ILuaContext;
import dan200.computercraft.api.peripheral.IComputerAccess;
import dan200.computercraft.api.peripheral.IPeripheral;
public class TileEntityDigitalMiner extends TileEntityElectricBlock implements IPeripheral, IUpgradeTile, IRedstoneControl, IActiveState, IAdvancedBoundingBlock
@ -172,10 +172,10 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
continue;
}
int id = coord.getBlockId(worldObj);
Block block = coord.getBlock(worldObj);
int meta = coord.getMetadata(worldObj);
if(id == 0)
if(block == Blocks.air)
{
toRemove.add(index);
next = index + 1;
@ -186,7 +186,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
for(MinerFilter filter : filters)
{
if(filter.canFilter(new ItemStack(id, 1, meta)))
if(filter.canFilter(new ItemStack(block, 1, meta)))
{
hasFilter = true;
break;
@ -209,7 +209,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
setReplace(coord);
toRemove.add(index);
worldObj.playAuxSFXAtEntity(null, 2001, coord.xCoord, coord.yCoord, coord.zCoord, id + (meta << 12));
worldObj.playAuxSFXAtEntity(null, 2001, coord.xCoord, coord.yCoord, coord.zCoord, Block.getIdFromBlock(block) + (meta << 12));
delay = getDelay();
}
@ -541,7 +541,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
if(nbtTags.hasKey("filters"))
{
NBTTagList tagList = nbtTags.getTagList("filters");
NBTTagList tagList = nbtTags.getTagList("filters", NBT.TAG_ANY_NUMERIC);
for(int i = 0; i < tagList.tagCount(); i++)
{
@ -613,7 +613,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
if(!doNull)
{
replaceStack = new ItemStack(dataStream.readInt(), 1, dataStream.readInt());
replaceStack = new ItemStack(Block.getBlockById(dataStream.readInt()), 1, dataStream.readInt());
}
else {
replaceStack = null;
@ -679,7 +679,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
if(dataStream.readBoolean())
{
replaceStack = new ItemStack(dataStream.readInt(), 1, dataStream.readInt());
replaceStack = new ItemStack(Block.getBlockById(dataStream.readInt()), 1, dataStream.readInt());
}
else {
replaceStack = null;
@ -713,7 +713,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
if(dataStream.readBoolean())
{
replaceStack = new ItemStack(dataStream.readInt(), 1, dataStream.readInt());
replaceStack = new ItemStack(Block.getBlockById(dataStream.readInt()), 1, dataStream.readInt());
}
else {
replaceStack = null;
@ -1139,7 +1139,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
@Override
public String getType()
{
return getInvName();
return getInventoryName();
}
public String[] names = {"setRadius", "setMin", "setMax", "setReplace", "addFilter", "removeFilter", "addOreFilter", "removeOreFilter", "reset", "start", "stop"};

View file

@ -378,7 +378,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
for(int i = 0; i < tagList.tagCount(); i++)
{
recurringNodes.add(Coord4D.read((NBTTagCompound)tagList.tagAt(i)));
recurringNodes.add(Coord4D.read((NBTTagCompound)tagList.getCompoundTagAt(i)));
}
}
@ -388,7 +388,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
for(int i = 0; i < tagList.tagCount(); i++)
{
cleaningNodes.add(Coord4D.read((NBTTagCompound)tagList.tagAt(i)));
cleaningNodes.add(Coord4D.read((NBTTagCompound)tagList.getCompoundTagAt(i)));
}
}
}

View file

@ -249,7 +249,7 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
for(int i = 0; i < tagList.tagCount(); i++)
{
filters.add(TransporterFilter.readFromNBT((NBTTagCompound)tagList.tagAt(i)));
filters.add(TransporterFilter.readFromNBT((NBTTagCompound)tagList.getCompoundTagAt(i)));
}
}
}
@ -487,7 +487,7 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
}
@Override
public void openChest()
public void openInventory()
{
if(!worldObj.isRemote)
{
@ -608,7 +608,7 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
for(int i = 0; i < tagList.tagCount(); i++)
{
filters.add(TransporterFilter.readFromNBT((NBTTagCompound)tagList.tagAt(i)));
filters.add(TransporterFilter.readFromNBT((NBTTagCompound)tagList.getCompoundTagAt(i)));
}
}
}

View file

@ -332,7 +332,7 @@ public final class CableUtils
if(receiver != null)
{
double transferEnergy = Math.min(sendingEnergy, receiver.powerRequest()*Mekanism.FROM_BC);
float used = receiver.receiveEnergy(Type.STORAGE, (float)(transferEnergy*Mekanism.TO_BC), side.getOpposite());
double used = receiver.receiveEnergy(Type.STORAGE, (float)(transferEnergy*Mekanism.TO_BC), side.getOpposite());
sent += used*Mekanism.FROM_BC;
}
}

View file

@ -6,7 +6,7 @@ import mekanism.api.energy.EnergizedItemManager;
import mekanism.api.energy.IEnergizedItem;
import mekanism.common.Mekanism;
import mekanism.common.tile.TileEntityElectricBlock;
import net.minecraft.item.Item;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import cofh.api.energy.IEnergyContainerItem;
@ -45,7 +45,7 @@ public final class ChargeUtils
storer.setEnergy(storer.getEnergy() + (item.extractEnergy(itemStack, toTransfer, false)*Mekanism.FROM_TE));
}
else if(storer.inventory[slotID].itemID == Items.redstone.itemID && storer.getEnergy()+Mekanism.ENERGY_PER_REDSTONE <= storer.getMaxEnergy())
else if(storer.inventory[slotID].getItem() == Items.redstone && storer.getEnergy()+Mekanism.ENERGY_PER_REDSTONE <= storer.getMaxEnergy())
{
storer.setEnergy(storer.getEnergy() + Mekanism.ENERGY_PER_REDSTONE);
storer.inventory[slotID].stackSize--;
@ -99,7 +99,7 @@ public final class ChargeUtils
return (itemstack.getItem() instanceof IElectricItem && ((IElectricItem)itemstack.getItem()).canProvideEnergy(itemstack)) ||
(itemstack.getItem() instanceof IEnergizedItem && ((IEnergizedItem)itemstack.getItem()).canSend(itemstack)) ||
(itemstack.getItem() instanceof IEnergyContainerItem && ((IEnergyContainerItem)itemstack.getItem()).extractEnergy(itemstack, 1, true) != 0) ||
itemstack.itemID == Items.redstone.itemID;
itemstack.getItem() == Items.redstone;
}
/**

View file

@ -28,7 +28,6 @@ import mekanism.common.IRedstoneControl;
import mekanism.common.IRedstoneControl.RedstoneControl;
import mekanism.common.Mekanism;
import mekanism.common.OreDictCache;
import mekanism.common.PacketHandler;
import mekanism.common.Teleporter;
import mekanism.common.Tier.EnergyCubeTier;
import mekanism.common.Tier.FactoryTier;
@ -47,6 +46,7 @@ import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.Item;
@ -59,6 +59,7 @@ import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import net.minecraft.util.Vec3;
import net.minecraft.world.EnumSkyBlock;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@ -704,9 +705,15 @@ public final class MekanismUtils
if(!(world.getTileEntity(x, y, z) instanceof IActiveState) || ((IActiveState)world.getTileEntity(x, y, z)).lightUpdate() && Mekanism.machineEffects)
{
world.updateAllLightTypes(x, y, z);
updateAllLightTypes(world, x, y, z);
}
}
public static void updateAllLightTypes(World world, int x, int y, int z)
{
world.updateLightByType(EnumSkyBlock.Block, x, y, z);
world.updateLightByType(EnumSkyBlock.Sky, x, y, z);
}
/**
* Whether or not a certain block is considered a fluid.
@ -731,25 +738,25 @@ public final class MekanismUtils
*/
public static FluidStack getFluid(World world, int x, int y, int z)
{
int id = world.getBlockId(x, y, z);
Block block = world.getBlock(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
if(id == 0)
if(block == null)
{
return null;
}
if((id == Blocks.waterStill.blockID || id == Blocks.waterMoving.blockID) && meta == 0)
if(block == Blocks.water && meta == 0)
{
return new FluidStack(FluidRegistry.WATER, FluidContainerRegistry.BUCKET_VOLUME);
}
else if((id == Blocks.lavaStill.blockID || id == Blocks.lavaMoving.blockID) && meta == 0)
else if(block == Blocks.lava && meta == 0)
{
return new FluidStack(FluidRegistry.LAVA, FluidContainerRegistry.BUCKET_VOLUME);
}
else if(Blocks.blocksList[id] instanceof IFluidBlock)
else if(block instanceof IFluidBlock)
{
IFluidBlock fluid = (IFluidBlock)Blocks.blocksList[id];
IFluidBlock fluid = (IFluidBlock)block;
if(meta == 0)
{
@ -770,26 +777,26 @@ public final class MekanismUtils
*/
public static int getFluidId(World world, int x, int y, int z)
{
int id = world.getBlockId(x, y, z);
Block block = world.getBlock(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
if(id == 0)
if(block == null)
{
return 0;
}
if(id == Blocks.waterMoving.blockID)
if(block == Blocks.water)
{
return FluidRegistry.WATER.getID();
}
else if(id == Blocks.lavaMoving.blockID)
else if(block == Blocks.lava)
{
return FluidRegistry.LAVA.getID();
}
for(Fluid fluid : FluidRegistry.getRegisteredFluids().values())
{
if(fluid.getBlockID() == id)
if(fluid.getBlock() == block)
{
return fluid.getID();
}
@ -808,26 +815,24 @@ public final class MekanismUtils
*/
public static boolean isDeadFluid(World world, int x, int y, int z)
{
int id = world.getBlockId(x, y, z);
Block block = world.getBlock(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
if(id == 0)
if(block == null)
{
return false;
}
if((id == Blocks.waterStill.blockID || id == Blocks.waterMoving.blockID) && meta != 0)
if(block == Blocks.water && meta != 0)
{
return true;
}
else if((id == Blocks.lavaStill.blockID || id == Blocks.lavaMoving.blockID) && meta != 0)
else if(block == Blocks.lava && meta != 0)
{
return true;
}
else if(Blocks.blocksList[id] instanceof IFluidBlock)
else if(block instanceof IFluidBlock)
{
IFluidBlock fluid = (IFluidBlock)Blocks.blocksList[id];
if(meta != 0)
{
return true;
@ -1109,7 +1114,7 @@ public final class MekanismUtils
Vec3 lookVec = player.getLook(1);
Vec3 endVec = headVec.addVector(lookVec.xCoord*reach, lookVec.yCoord*reach, lookVec.zCoord*reach);
return world.rayTraceBlocks_do_do(headVec, endVec, true, false);
return world.rayTraceBlocks(headVec, endVec, true);
}
/**
@ -1283,6 +1288,16 @@ public final class MekanismUtils
return false;
}
public static Block getBlock(ItemStack itemStack)
{
if(itemStack == null)
{
return null;
}
return Block.getBlockFromItem(itemStack.getItem());
}
public static enum ResourceType
{

View file

@ -60,12 +60,12 @@ public class VoiceConnection extends Thread
if(!server.isDedicatedServer() && playerIP.equals("127.0.0.1") && !Mekanism.voiceManager.foundLocal)
{
Mekanism.voiceManager.foundLocal = true;
username = playerMP.username;
username = playerMP.getCommandSenderName();
break;
}
else if(playerIP.equals(socket.getInetAddress().getHostAddress()))
{
username = playerMP.username;
username = playerMP.getCommandSenderName();
break;
}
}

View file

@ -35,7 +35,7 @@ public class ContainerBioGenerator extends Container
addSlotToContainer(new Slot(inventory, slotX, 8 + slotX * 18, 142));
}
tileEntity.openChest();
tileEntity.openInventory();
tileEntity.open(inventory.player);
}
@ -44,7 +44,7 @@ public class ContainerBioGenerator extends Container
{
super.onContainerClosed(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
tileEntity.close(entityplayer);
}

View file

@ -33,7 +33,7 @@ public class ContainerHeatGenerator extends Container
addSlotToContainer(new Slot(inventory, slotX, 8 + slotX * 18, 142));
}
tileEntity.openChest();
tileEntity.openInventory();
tileEntity.open(inventory.player);
}
@ -42,7 +42,7 @@ public class ContainerHeatGenerator extends Container
{
super.onContainerClosed(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
tileEntity.close(entityplayer);
}

View file

@ -35,7 +35,7 @@ public class ContainerHydrogenGenerator extends Container
addSlotToContainer(new Slot(inventory, slotX, 8 + slotX * 18, 142));
}
tileEntity.openChest();
tileEntity.openInventory();
tileEntity.open(inventory.player);
}
@ -43,7 +43,7 @@ public class ContainerHydrogenGenerator extends Container
public void onContainerClosed(EntityPlayer entityplayer)
{
super.onContainerClosed(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
tileEntity.close(entityplayer);
}

View file

@ -32,7 +32,7 @@ public class ContainerSolarGenerator extends Container
addSlotToContainer(new Slot(inventory, slotX, 8 + slotX * 18, 142));
}
tileEntity.openChest();
tileEntity.openInventory();
tileEntity.open(inventory.player);
}
@ -41,7 +41,7 @@ public class ContainerSolarGenerator extends Container
{
super.onContainerClosed(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
tileEntity.close(entityplayer);
}

View file

@ -32,7 +32,7 @@ public class ContainerWindTurbine extends Container
addSlotToContainer(new Slot(inventory, slotX, 8 + slotX * 18, 142));
}
tileEntity.openChest();
tileEntity.openInventory();
tileEntity.open(inventory.player);
}
@ -41,7 +41,7 @@ public class ContainerWindTurbine extends Container
{
super.onContainerClosed(entityplayer);
tileEntity.closeChest();
tileEntity.closeInventory();
tileEntity.close(entityplayer);
}