Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

megabitus

Members
  • Joined

  • Last visited

Posts posted by megabitus

  1. Posted

    When I open the GUI minecraft crashes with this:

     

     

    [11:27:55] [Client thread/ERROR] [FML]: OpenGuiHandler exception

    java.lang.NullPointerException

    at net.minecraft.client.gui.GuiTextField.setText(GuiTextField.java:70) ~[GuiTextField.class:?]

    at com.mega.bir.client.interfaces.interchest.GuiInterChest.initGui(GuiInterChest.java:59) ~[GuiInterChest.class:?]

    at net.minecraft.client.gui.GuiScreen.setWorldAndResolution(GuiScreen.java:296) ~[GuiScreen.class:?]

    at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:864) ~[Minecraft.class:?]

    at cpw.mods.fml.client.FMLClientHandler.showGuiScreen(FMLClientHandler.java:445) ~[FMLClientHandler.class:?]

    at cpw.mods.fml.common.FMLCommonHandler.showGuiScreen(FMLCommonHandler.java:302) ~[FMLCommonHandler.class:?]

    at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:94) ~[FMLNetworkHandler.class:?]

    at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2514) ~[EntityPlayer.class:?]

    at cpw.mods.fml.common.network.internal.OpenGuiHandler.channelRead0(OpenGuiHandler.java:16) ~[OpenGuiHandler.class:?]

    at cpw.mods.fml.common.network.internal.OpenGuiHandler.channelRead0(OpenGuiHandler.java:11) ~[OpenGuiHandler.class:?]

    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[simpleChannelInboundHandler.class:?]

    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]

    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]

    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:101) [simpleChannelInboundHandler.class:?]

    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]

    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]

    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [MessageToMessageDecoder.class:?]

    at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:?]

    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]

    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]

    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?]

    at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?]

    at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.class:?]

    at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:247) [NetworkManager.class:?]

    at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:321) [PlayerControllerMP.class:?]

    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1693) [Minecraft.class:?]

    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) [Minecraft.class:?]

    at net.minecraft.client.Minecraft.run(Minecraft.java:961) [Minecraft.class:?]

    at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]

    at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]

    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]

    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]

    at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]

    at GradleStart.bounce(GradleStart.java:107) [start/:?]

    at GradleStart.startClient(GradleStart.java:100) [start/:?]

    at GradleStart.main(GradleStart.java:65) [start/:?]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]

    at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]

    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) [idea_rt.jar:?]

    [11:27:55] [Client thread/ERROR] [FML]: HandshakeCompletionHandler exception

    java.lang.NullPointerException

    at net.minecraft.client.gui.GuiTextField.setText(GuiTextField.java:70) ~[GuiTextField.class:?]

    at com.mega.bir.client.interfaces.interchest.GuiInterChest.initGui(GuiInterChest.java:59) ~[GuiInterChest.class:?]

    at net.minecraft.client.gui.GuiScreen.setWorldAndResolution(GuiScreen.java:296) ~[GuiScreen.class:?]

    at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:864) ~[Minecraft.class:?]

    at cpw.mods.fml.client.FMLClientHandler.showGuiScreen(FMLClientHandler.java:445) ~[FMLClientHandler.class:?]

    at cpw.mods.fml.common.FMLCommonHandler.showGuiScreen(FMLCommonHandler.java:302) ~[FMLCommonHandler.class:?]

    at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:94) ~[FMLNetworkHandler.class:?]

    at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2514) ~[EntityPlayer.class:?]

    at cpw.mods.fml.common.network.internal.OpenGuiHandler.channelRead0(OpenGuiHandler.java:16) ~[OpenGuiHandler.class:?]

    at cpw.mods.fml.common.network.internal.OpenGuiHandler.channelRead0(OpenGuiHandler.java:11) ~[OpenGuiHandler.class:?]

    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[simpleChannelInboundHandler.class:?]

    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]

    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]

    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:101) [simpleChannelInboundHandler.class:?]

    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]

    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]

    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [MessageToMessageDecoder.class:?]

    at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:?]

    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]

    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]

    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?]

    at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?]

    at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.class:?]

    at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:247) [NetworkManager.class:?]

    at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:321) [PlayerControllerMP.class:?]

    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1693) [Minecraft.class:?]

    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) [Minecraft.class:?]

    at net.minecraft.client.Minecraft.run(Minecraft.java:961) [Minecraft.class:?]

    at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]

    at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]

    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]

    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]

    at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]

    at GradleStart.bounce(GradleStart.java:107) [start/:?]

    at GradleStart.startClient(GradleStart.java:100) [start/:?]

    at GradleStart.main(GradleStart.java:65) [start/:?]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]

    at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]

    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) [idea_rt.jar:?]

    [11:27:55] [Client thread/ERROR] [FML]: There was a critical exception handling a packet on channel FML

    java.lang.NullPointerException

    at net.minecraft.client.gui.GuiTextField.setText(GuiTextField.java:70) ~[GuiTextField.class:?]

    at com.mega.bir.client.interfaces.interchest.GuiInterChest.initGui(GuiInterChest.java:59) ~[GuiInterChest.class:?]

    at net.minecraft.client.gui.GuiScreen.setWorldAndResolution(GuiScreen.java:296) ~[GuiScreen.class:?]

    at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:864) ~[Minecraft.class:?]

    at cpw.mods.fml.client.FMLClientHandler.showGuiScreen(FMLClientHandler.java:445) ~[FMLClientHandler.class:?]

    at cpw.mods.fml.common.FMLCommonHandler.showGuiScreen(FMLCommonHandler.java:302) ~[FMLCommonHandler.class:?]

    at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:94) ~[FMLNetworkHandler.class:?]

    at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2514) ~[EntityPlayer.class:?]

    at cpw.mods.fml.common.network.internal.OpenGuiHandler.channelRead0(OpenGuiHandler.java:16) ~[OpenGuiHandler.class:?]

    at cpw.mods.fml.common.network.internal.OpenGuiHandler.channelRead0(OpenGuiHandler.java:11) ~[OpenGuiHandler.class:?]

    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[simpleChannelInboundHandler.class:?]

    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]

    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]

    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:101) ~[simpleChannelInboundHandler.class:?]

    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]

    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]

    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[MessageToMessageDecoder.class:?]

    at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?]

    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]

    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]

    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?]

    at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:?]

    at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.class:?]

    at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:247) [NetworkManager.class:?]

    at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:321) [PlayerControllerMP.class:?]

    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1693) [Minecraft.class:?]

    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) [Minecraft.class:?]

    at net.minecraft.client.Minecraft.run(Minecraft.java:961) [Minecraft.class:?]

    at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]

    at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]

    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]

    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]

    at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]

    at GradleStart.bounce(GradleStart.java:107) [start/:?]

    at GradleStart.startClient(GradleStart.java:100) [start/:?]

    at GradleStart.main(GradleStart.java:65) [start/:?]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]

    at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]

    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) [idea_rt.jar:?]

     

     

    TileEntityInterChest: https://github.com/megabitus98/Blocks-Items-Revolution/blob/master/src/main/java/com/mega/bir/block/tileentity/TileEntityInterChest.java

    GuiInterChest: https://github.com/megabitus98/Blocks-Items-Revolution/blob/master/src/main/java/com/mega/bir/client/interfaces/interchest/GuiInterChest.java

  2. Posted

    Hi! I've made a custom crafting for my Machine and when I place the items It doesn't craft, I get no error, can you help me?

    This is my ContainerMachine:

     

     

    package com.mega.bir.client.interfaces.machine;

    import com.mega.bir.block.tileentity.TileEntityInterChest;

    import com.mega.bir.block.tileentity.TileEntityMachine;

    import com.mega.bir.helping.ItemHelper;

    import net.minecraft.entity.player.EntityPlayer;

    import net.minecraft.entity.player.InventoryPlayer;

    import net.minecraft.inventory.*;

    import net.minecraft.item.ItemStack;

    import net.minecraft.world.World;

    /**

    * Created by Megabitus on 8/13/2014 and hour 19.

    */

    public class ContainerMachine extends Container{

    private TileEntityMachine machine;

    public InventoryCrafting craftMatrix = new InventoryCrafting(this, TileEntityMachine.INVENTORY_SIZE, 1);

    public IInventory craftResult = new InventoryCraftResult();

    private World worldObj;

    public ContainerMachine(InventoryPlayer invPlayer, TileEntityMachine machine, World world){

    this.worldObj = world;

    this.machine = machine;

    for(int x = 0; x < 9; x++){

    addSlotToContainer(new Slot(invPlayer, x, 8 + 18 * x, 142));

    }

    for(int y = 0; y < 3; y++){

    for(int x = 0; x < 9; x++){

    addSlotToContainer(new Slot(invPlayer, x + y * 9 + 9, 8 + 18 * x, 84 + y * 18));

    }

    }

    this.addSlotToContainer(new SlotCrafting(invPlayer.player, this.craftMatrix, this.craftResult, 0, 79, 41));

    this.addSlotToContainer(new Slot(craftMatrix, 1, 48, 59));

    this.addSlotToContainer(new Slot(craftMatrix, 2, 79, 5));

    this.addSlotToContainer(new Slot(craftMatrix, 3, 112, 59));

    onCraftMatrixChanged(craftMatrix);

    }

    @Override

    public boolean canInteractWith(EntityPlayer entityplayer){

    return machine.isUseableByPlayer(entityplayer);

    }

    @Override

    protected boolean mergeItemStack(ItemStack itemStack, int slotMin, int slotMax, boolean ascending)

    {

    boolean slotFound = false;

    int currentSlotIndex = ascending ? slotMax - 1 : slotMin;

    Slot slot;

    ItemStack stackInSlot;

    if (itemStack.isStackable())

    {

    while (itemStack.stackSize > 0 && (!ascending && currentSlotIndex < slotMax || ascending && currentSlotIndex >= slotMin))

    {

    slot = (Slot) this.inventorySlots.get(currentSlotIndex);

    stackInSlot = slot.getStack();

    if (slot.isItemValid(itemStack) && ItemHelper.equalsIgnoreStackSize(itemStack, stackInSlot))

    {

    int combinedStackSize = stackInSlot.stackSize + itemStack.stackSize;

    int slotStackSizeLimit = Math.min(stackInSlot.getMaxStackSize(), slot.getSlotStackLimit());

    if (combinedStackSize <= slotStackSizeLimit)

    {

    itemStack.stackSize = 0;

    stackInSlot.stackSize = combinedStackSize;

    slot.onSlotChanged();

    slotFound = true;

    }

    else if (stackInSlot.stackSize < slotStackSizeLimit)

    {

    itemStack.stackSize -= slotStackSizeLimit - stackInSlot.stackSize;

    stackInSlot.stackSize = slotStackSizeLimit;

    slot.onSlotChanged();

    slotFound = true;

    }

    }

    currentSlotIndex += ascending ? -1 : 1;

    }

    }

    if (itemStack.stackSize > 0)

    {

    currentSlotIndex = ascending ? slotMax - 1 : slotMin;

    while (!ascending && currentSlotIndex < slotMax || ascending && currentSlotIndex >= slotMin)

    {

    slot = (Slot) this.inventorySlots.get(currentSlotIndex);

    stackInSlot = slot.getStack();

    if (slot.isItemValid(itemStack) && stackInSlot == null)

    {

    slot.putStack(ItemHelper.cloneItemStack(itemStack, Math.min(itemStack.stackSize, slot.getSlotStackLimit())));

    slot.onSlotChanged();

    if (slot.getStack() != null)

    {

    itemStack.stackSize -= slot.getStack().stackSize;

    slotFound = true;

    }

    break;

    }

    currentSlotIndex += ascending ? -1 : 1;

    }

    }

    return slotFound;

    }

    @Override

    public ItemStack transferStackInSlot(EntityPlayer player, int slotIndex){

    ItemStack itemStack = null;

    Slot slot = (Slot) inventorySlots.get(slotIndex);

    if (slot != null && slot.getHasStack())

    {

    ItemStack slotItemStack = slot.getStack();

    itemStack = slotItemStack.copy();

    if (slotIndex < TileEntityInterChest.INVENTORY_SIZE - 1)

    {

    if (!this.mergeItemStack(slotItemStack, 1, inventorySlots.size(), true))

    {

    return null;

    }

    }

    else

    {

    if (!this.mergeItemStack(slotItemStack, 0, TileEntityInterChest.INVENTORY_SIZE - 1, false))

    {

    return null;

    }

    }

    if (slotItemStack.stackSize == 0)

    {

    slot.putStack(null);

    }

    else

    {

    slot.onSlotChanged();

    }

    }

    return itemStack;

    }

    @Override

    public void onContainerClosed(EntityPlayer player)

    {

    super.onContainerClosed(player);

    if (!this.worldObj.isRemote)

    {

    for (int i = 0; i < TileEntityMachine.INVENTORY_SIZE; ++i)

    {

    ItemStack itemstack = this.craftMatrix.getStackInSlotOnClosing(i);

    if (itemstack != null)

    {

    player.dropPlayerItemWithRandomChoice(itemstack, false);

    }

    }

    }

    }

    @Override

    public void onCraftMatrixChanged(IInventory p_75130_1_) {

    this.craftResult.setInventorySlotContents(0, MachineCraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj));

    }

    }

     

     

    This is my GuiMachine:

     

     

    package com.mega.bir.client.interfaces.machine;

    import com.mega.bir.block.tileentity.TileEntityMachine;

    import cpw.mods.fml.relauncher.Side;

    import cpw.mods.fml.relauncher.SideOnly;

    import net.minecraft.client.Minecraft;

    import net.minecraft.client.gui.inventory.GuiContainer;

    import net.minecraft.entity.player.InventoryPlayer;

    import net.minecraft.util.ResourceLocation;

    import net.minecraft.world.World;

    import org.lwjgl.opengl.GL11;

    /**

    * Created by Megabitus on 8/13/2014 and hour 19.

    */

    @SideOnly(Side.CLIENT)

    public class GuiMachine extends GuiContainer{

    private static final ResourceLocation texture = new ResourceLocation("bir", "textures/gui/machine.png");

    public GuiMachine(InventoryPlayer invPlayer, TileEntityMachine machine, World world){

    super(new ContainerMachine(invPlayer, machine, world));

    xSize = 176;

    ySize = 166;

    }

    @Override

    protected void drawGuiContainerBackgroundLayer(float f, int x, int y){

    GL11.glColor4f(1, 1, 1, 1);

    Minecraft.getMinecraft().getTextureManager().bindTexture(texture);

    drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);

    }

    @Override

    protected void drawGuiContainerForegroundLayer(int x, int y) {

    fontRendererObj.drawString("Machine", 7, 6, 0x404040);

    fontRendererObj.drawString("Inventory", 7, 74, 0x404040);

    }

    }

     

     

    This is my MachineComparator:

     

     

    package com.mega.bir.client.interfaces.machine;

    import net.minecraft.item.crafting.IRecipe;

    import java.util.Comparator;

    /**

    * Created by Megabitus on 8/20/2014.

    */

    public class MachineComparator implements Comparator {

    final MachineCraftingManager machineCraftingManager;

    public MachineComparator(MachineCraftingManager par1MachineCraftingManager)

    {

    this.machineCraftingManager = par1MachineCraftingManager;

    }

    public int compareRecipes(IRecipe par1IRecipe, IRecipe par2IRecipe)

    {

    return par1IRecipe instanceof MachineShapelessRecipes && par2IRecipe instanceof MachineShapedRecipes ? 1 : (par2IRecipe instanceof MachineShapelessRecipes && par1IRecipe instanceof MachineShapedRecipes ? -1 : (par2IRecipe.getRecipeSize() < par1IRecipe.getRecipeSize() ? -1 : (par2IRecipe.getRecipeSize() > par1IRecipe.getRecipeSize() ? 1 : 0)));

    }

    public int compare(Object par1Obj, Object par2Obj)

    {

    return this.compareRecipes((IRecipe)par1Obj, (IRecipe)par2Obj);

    }

    }

     

     

    This is my MachineCraftingManager:

     

     

    package com.mega.bir.client.interfaces.machine;

    import com.mega.bir.helping.LogHelper;

    import com.mega.bir.item.ItemsManager;

    import net.minecraft.block.Block;

    import net.minecraft.init.Items;

    import net.minecraft.inventory.InventoryCrafting;

    import net.minecraft.item.Item;

    import net.minecraft.item.ItemStack;

    import net.minecraft.item.crafting.IRecipe;

    import net.minecraft.world.World;

    import java.util.*;

    /**

    * Created by Megabitus on 8/20/2014.

    */

    public class MachineCraftingManager {

    private static final MachineCraftingManager instance = new MachineCraftingManager();

    private List recipes = new ArrayList();

    public static final MachineCraftingManager getInstance() {

    return instance;

    }

    private MachineCraftingManager() {

    /** Recipes!!! */

    this.addMachineShapelessRecipe(new ItemStack(Items.ender_pearl, 1), new ItemStack(ItemsManager.eye));

    Collections.sort(this.recipes, new MachineComparator(this));

    LogHelper.info(this.getRecipeList().size() + " recipes!");

    }

    public MachineShapedRecipes func_92051_a(ItemStack par1ItemStack, Object ... par2ArrayOfObj)

    {

    String var3 = "";

    int var4 = 0;

    int var5 = 0;

    int var6 = 0;

    if (par2ArrayOfObj[var4] instanceof String[])

    {

    String[] var7 = (String[])((String[])par2ArrayOfObj[var4++]);

    for (int var8 = 0; var8 < var7.length; ++var8)

    {

    String var9 = var7[var8];

    ++var6;

    var5 = var9.length();

    var3 = var3 + var9;

    }

    }

    else

    {

    while (par2ArrayOfObj[var4] instanceof String)

    {

    String var11 = (String)par2ArrayOfObj[var4++];

    ++var6;

    var5 = var11.length();

    var3 = var3 + var11;

    }

    }

    HashMap var12;

    for (var12 = new HashMap(); var4 < par2ArrayOfObj.length; var4 += 2)

    {

    Character var13 = (Character)par2ArrayOfObj[var4];

    ItemStack var14 = null;

    if (par2ArrayOfObj[var4 + 1] instanceof Item)

    {

    var14 = new ItemStack((Item)par2ArrayOfObj[var4 + 1]);

    }

    else if (par2ArrayOfObj[var4 + 1] instanceof Block)

    {

    var14 = new ItemStack((Block)par2ArrayOfObj[var4 + 1], 1, -1);

    }

    else if (par2ArrayOfObj[var4 + 1] instanceof ItemStack)

    {

    var14 = (ItemStack)par2ArrayOfObj[var4 + 1];

    }

    var12.put(var13, var14);

    }

    ItemStack[] var15 = new ItemStack[var5 * var6];

    for (int var16 = 0; var16 < var5 * var6; ++var16)

    {

    char var10 = var3.charAt(var16);

    if (var12.containsKey(Character.valueOf(var10)))

    {

    var15[var16] = ((ItemStack)var12.get(Character.valueOf(var10))).copy();

    }

    else

    {

    var15[var16] = null;

    }

    }

    MachineShapedRecipes var17 = new MachineShapedRecipes(var5, var6, var15, par1ItemStack);

    this.recipes.add(var17);

    return var17;

    }

    public void addMachineShapelessRecipe(ItemStack par1ItemStack, Object ... par2ArrayOfObj)

    {

    ArrayList var3 = new ArrayList();

    Object[] var4 = par2ArrayOfObj;

    int var5 = par2ArrayOfObj.length;

    for (int var6 = 0; var6 < var5; ++var6)

    {

    Object var7 = var4[var6];

    if (var7 instanceof ItemStack)

    {

    var3.add(((ItemStack)var7).copy());

    }

    else if (var7 instanceof Item)

    {

    var3.add(new ItemStack((Item)var7));

    }

    else

    {

    if (!(var7 instanceof Block))

    {

    throw new RuntimeException("Invalid shapeless recipy!");

    }

    var3.add(new ItemStack((Block)var7));

    }

    }

    this.recipes.add(new MachineShapelessRecipes(par1ItemStack, var3));

    }

    public ItemStack findMatchingRecipe(InventoryCrafting p_82787_1_, World p_82787_2_) {

    int i = 0;

    ItemStack itemstack = null;

    ItemStack itemstack1 = null;

    int j;

    for (j = 0; j < p_82787_1_.getSizeInventory(); ++j) {

    ItemStack itemstack2 = p_82787_1_.getStackInSlot(j);

    if (itemstack2 != null) {

    if (i == 0) {

    itemstack = itemstack2;

    }

    if (i == 1) {

    itemstack1 = itemstack2;

    }

    ++i;

    }

    }

    if (i == 2 && itemstack.getItem() == itemstack1.getItem() && itemstack.stackSize == 1 && itemstack1.stackSize == 1 && itemstack.getItem().isRepairable()) {

    Item item = itemstack.getItem();

    int j1 = item.getMaxDamage() - itemstack.getItemDamageForDisplay();

    int k = item.getMaxDamage() - itemstack1.getItemDamageForDisplay();

    int l = j1 + k + item.getMaxDamage() * 5 / 100;

    int i1 = item.getMaxDamage() - l;

    if (i1 < 0) {

    i1 = 0;

    }

    return new ItemStack(itemstack.getItem(), 1, i1);

    } else {

    for (j = 0; j < this.recipes.size(); ++j) {

    IRecipe irecipe = (IRecipe) this.recipes.get(j);

    if (irecipe.matches(p_82787_1_, p_82787_2_)) {

    return irecipe.getCraftingResult(p_82787_1_);

    }

    }

    return null;

    }

    }

    /**

    * returns the List<> of all recipes

    */

    public List getRecipeList() {

    return this.recipes;

    }

    }

     

     

    This is my MachineShapedRecipes:

     

     

    package com.mega.bir.client.interfaces.machine;

    import com.mega.bir.block.tileentity.TileEntityMachine;

    import net.minecraft.inventory.InventoryCrafting;

    import net.minecraft.item.ItemStack;

    import net.minecraft.item.crafting.IRecipe;

    import net.minecraft.nbt.NBTTagCompound;

    import net.minecraft.world.World;

    /**

    * Created by Nitu on 8/20/2014.

    */

    public class MachineShapedRecipes implements IRecipe{

    /** How many horizontal slots this recipe is wide. */

    public final int recipeWidth;

    /** How many vertical slots this recipe uses. */

    public final int recipeHeight;

    /** Is a array of ItemStack that composes the recipe. */

    public final ItemStack[] recipeItems;

    /** Is the ItemStack that you get when craft the recipe. */

    private ItemStack recipeOutput;

    /** Is the itemID of the output item that you get when craft the recipe. */

    public final int recipeOutputItemID;

    private boolean field_92101_f = false;

    public MachineShapedRecipes(int par1, int par2, ItemStack[] par3ArrayOfItemStack, ItemStack par4ItemStack)

    {

    this.recipeOutputItemID = par4ItemStack.getItemDamage();

    this.recipeWidth = par1;

    this.recipeHeight = par2;

    this.recipeItems = par3ArrayOfItemStack;

    this.recipeOutput = par4ItemStack;

    }

    public ItemStack getRecipeOutput()

    {

    return this.recipeOutput;

    }

    /**

    * Used to check if a recipe matches current crafting inventory

    */

    public boolean matches(InventoryCrafting par1InventoryCrafting, World par2World)

    {

    for (int i = 0; i <= TileEntityMachine.INVENTORY_SIZE - this.recipeWidth; ++i)

    {

    for (int j = 0; j <= 1 - this.recipeHeight; ++j)

    {

    if (this.checkMatch(par1InventoryCrafting, i, j, true))

    {

    return true;

    }

    if (this.checkMatch(par1InventoryCrafting, i, j, false))

    {

    return true;

    }

    }

    }

    return false;

    }

    /**

    * Checks if the region of a crafting inventory is match for the recipe.

    */

    private boolean checkMatch(InventoryCrafting par1InventoryCrafting, int par2, int par3, boolean par4)

    {

    for (int k = 0; k < TileEntityMachine.INVENTORY_SIZE; ++k)

    {

    for (int l = 0; l < 1; ++l)

    {

    int i1 = k - par2;

    int j1 = l - par3;

    ItemStack itemstack = null;

    if (i1 >= 0 && j1 >= 0 && i1 < this.recipeWidth && j1 < this.recipeHeight)

    {

    if (par4)

    {

    itemstack = this.recipeItems[this.recipeWidth - i1 - 1 + j1 * this.recipeWidth];

    }

    else

    {

    itemstack = this.recipeItems[i1 + j1 * this.recipeWidth];

    }

    }

    ItemStack itemstack1 = par1InventoryCrafting.getStackInRowAndColumn(k, l);

    if (itemstack1 != null || itemstack != null)

    {

    if (itemstack1 == null && itemstack != null || itemstack1 != null && itemstack == null)

    {

    return false;

    }

    if (itemstack1.getItem() != itemstack.getItem())

    {

    return false;

    }

    if (itemstack.getItemDamage() != 32767 && itemstack.getItemDamage() != itemstack1.getItemDamage())

    {

    return false;

    }

    }

    }

    }

    return true;

    }

    /**

    * Returns an Item that is the result of this recipe

    */

    public ItemStack getCraftingResult(InventoryCrafting par1InventoryCrafting)

    {

    ItemStack itemstack = this.getRecipeOutput().copy();

    if (this.field_92101_f)

    {

    for (int i = 0; i < par1InventoryCrafting.getSizeInventory(); ++i)

    {

    ItemStack itemstack1 = par1InventoryCrafting.getStackInSlot(i);

    if (itemstack1 != null && itemstack1.hasTagCompound())

    {

    itemstack.setTagCompound((NBTTagCompound)itemstack1.stackTagCompound.copy());

    }

    }

    }

    return itemstack;

    }

    /**

    * Returns the size of the recipe area

    */

    public int getRecipeSize()

    {

    return this.recipeWidth * this.recipeHeight;

    }

    public MachineShapedRecipes func_92100_c()

    {

    this.field_92101_f = true;

    return this;

    }

    }

     

     

    This my MachineShapelessRecipes:

     

     

    package com.mega.bir.client.interfaces.machine;

    import com.mega.bir.block.tileentity.TileEntityMachine;

    import net.minecraft.inventory.InventoryCrafting;

    import net.minecraft.item.ItemStack;

    import net.minecraft.item.crafting.IRecipe;

    import net.minecraft.world.World;

    import java.util.ArrayList;

    import java.util.Iterator;

    import java.util.List;

    /**

    * Created by Megabitus on 8/20/2014.

    */

    public class MachineShapelessRecipes implements IRecipe{

    private final ItemStack recipeOutput;

    public final List recipeItems;

    public MachineShapelessRecipes(ItemStack par1ItemStack, List par2List)

    {

    this.recipeOutput = par1ItemStack;

    this.recipeItems = par2List;

    }

    public ItemStack getRecipeOutput()

    {

    return this.recipeOutput;

    }

    public boolean matches(InventoryCrafting par1InventoryCrafting, World par2World)

    {

    ArrayList arraylist = new ArrayList(this.recipeItems);

    for (int i = 0; i < TileEntityMachine.INVENTORY_SIZE; ++i)

    {

    for (int j = 0; j < 1; ++j)

    {

    ItemStack itemstack = par1InventoryCrafting.getStackInRowAndColumn(j, i);

    if (itemstack != null)

    {

    boolean flag = false;

    Iterator iterator = arraylist.iterator();

    while (iterator.hasNext())

    {

    ItemStack itemstack1 = (ItemStack)iterator.next();

    if (itemstack.getItem() == itemstack1.getItem() && (itemstack1.getItemDamage() == 32767 || itemstack.getItemDamage() == itemstack1.getItemDamage()))

    {

    flag = true;

    arraylist.remove(itemstack1);

    break;

    }

    }

    if (!flag)

    {

    return false;

    }

    }

    }

    }

    return arraylist.isEmpty();

    }

    /**

    * Returns an Item that is the result of this recipe

    */

    public ItemStack getCraftingResult(InventoryCrafting par1InventoryCrafting)

    {

    return this.recipeOutput.copy();

    }

    /**

    * Returns the size of the recipe area

    */

    public int getRecipeSize()

    {

    return this.recipeItems.size();

    }

    }

     

     

    And here is my Github with the last commit: https://github.com/megabitus98/Blocks-Items-Revolution

  3. I've tried to do like this

    @Override
        public void onContainerClosed(EntityPlayer entityplayer)
        {
                super.onContainerClosed(entityplayer);
                for(int i = 0; i < TileEntityInterChest.INVENTORY_SIZE; i++)
                {
                    ItemStack itemstack = craftMatrix.getStackInSlot(i);
                    if(itemstack != null && worldObj.isRemote)
                    {
                        entityplayer.entityDropItem(itemstack, 0.05F);
                    }
                }
        }
    

    But it crashes now:

     

    [13:59:02] [server thread/ERROR]: Encountered an unexpected exception

    net.minecraft.util.ReportedException: Ticking memory connection

    at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:198) ~[NetworkSystem.class:?]

    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:736) ~[MinecraftServer.class:?]

    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:624) ~[MinecraftServer.class:?]

    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) ~[integratedServer.class:?]

    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:495) [MinecraftServer.class:?]

    at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:762) [MinecraftServer$2.class:?]

    Caused by: java.lang.NullPointerException

    at com.mega.bir.client.interfaces.machine.ContainerMachine.onContainerClosed(ContainerMachine.java:163) ~[ContainerMachine.class:?]

    at net.minecraft.entity.player.EntityPlayerMP.closeContainer(EntityPlayerMP.java:894) ~[EntityPlayerMP.class:?]

    at net.minecraft.network.NetHandlerPlayServer.processCloseWindow(NetHandlerPlayServer.java:936) ~[NetHandlerPlayServer.class:?]

    at net.minecraft.network.play.client.C0DPacketCloseWindow.processPacket(C0DPacketCloseWindow.java:29) ~[C0DPacketCloseWindow.class:?]

    at net.minecraft.network.play.client.C0DPacketCloseWindow.processPacket(C0DPacketCloseWindow.java:53) ~[C0DPacketCloseWindow.class:?]

    at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:247) ~[NetworkManager.class:?]

    at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) ~[NetworkSystem.class:?]

    ... 5 more

    [13:59:02] [server thread/ERROR]: This crash report has been saved to: F:\Dropbox\Codding, Modding\Moding\1.7\Blocks-Items-Revolution\run\.\crash-reports\crash-2014-08-20_13.59.02-server.txt

    [13:59:02] [server thread/INFO]: Stopping server

    [13:59:02] [server thread/INFO]: Saving players

    [13:59:02] [server thread/INFO]: Saving worlds

    [13:59:02] [server thread/INFO]: Saving chunks for level 'New World'/Overworld

    [13:59:02] [server thread/INFO]: Saving chunks for level 'New World'/Nether

    [13:59:02] [server thread/INFO]: Saving chunks for level 'New World'/The End

    [13:59:02] [server thread/INFO] [FML]: Unloading dimension 0

    [13:59:02] [server thread/INFO] [FML]: Unloading dimension -1

    [13:59:02] [server thread/INFO] [FML]: Unloading dimension 1

    [13:59:02] [server thread/INFO] [FML]: Applying holder lookups

    [13:59:02] [server thread/INFO] [FML]: Holder lookups applied

    [13:59:02] [server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded.

    [13:59:03] [Client thread/FATAL]: Reported exception thrown!

    net.minecraft.util.ReportedException: Updating screen events

    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1745) ~[Minecraft.class:?]

    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) ~[Minecraft.class:?]

    at net.minecraft.client.Minecraft.run(Minecraft.java:961) [Minecraft.class:?]

    at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]

    at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]

    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]

    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]

    at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]

    at GradleStart.bounce(GradleStart.java:107) [start/:?]

    at GradleStart.startClient(GradleStart.java:100) [start/:?]

    at GradleStart.main(GradleStart.java:65) [start/:?]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]

    at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]

    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) [idea_rt.jar:?]

    Caused by: java.lang.NullPointerException

    at com.mega.bir.client.interfaces.machine.ContainerMachine.onContainerClosed(ContainerMachine.java:163) ~[ContainerMachine.class:?]

    at net.minecraft.client.gui.inventory.GuiContainer.onGuiClosed(GuiContainer.java:733) ~[GuiContainer.class:?]

    at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:847) ~[Minecraft.class:?]

    at net.minecraft.client.entity.EntityPlayerSP.closeScreen(EntityPlayerSP.java:356) ~[EntityPlayerSP.class:?]

    at net.minecraft.client.entity.EntityClientPlayerMP.closeScreenNoPacket(EntityClientPlayerMP.java:265) ~[EntityClientPlayerMP.class:?]

    at net.minecraft.client.entity.EntityClientPlayerMP.closeScreen(EntityClientPlayerMP.java:256) ~[EntityClientPlayerMP.class:?]

    at net.minecraft.client.gui.inventory.GuiContainer.keyTyped(GuiContainer.java:688) ~[GuiContainer.class:?]

    at net.minecraft.client.gui.GuiScreen.handleKeyboardInput(GuiScreen.java:372) ~[GuiScreen.class:?]

    at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:323) ~[GuiScreen.class:?]

    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1731) ~[Minecraft.class:?]

    ... 21 more

    ---- Minecraft Crash Report ----

    // Uh... Did I do that?

     

    Time: 8/20/14 1:59 PM

    Description: Updating screen events

     

    java.lang.NullPointerException: Updating screen events

    at com.mega.bir.client.interfaces.machine.ContainerMachine.onContainerClosed(ContainerMachine.java:163)

    at net.minecraft.client.gui.inventory.GuiContainer.onGuiClosed(GuiContainer.java:733)

    at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:847)

    at net.minecraft.client.entity.EntityPlayerSP.closeScreen(EntityPlayerSP.java:356)

    at net.minecraft.client.entity.EntityClientPlayerMP.closeScreenNoPacket(EntityClientPlayerMP.java:265)

    at net.minecraft.client.entity.EntityClientPlayerMP.closeScreen(EntityClientPlayerMP.java:256)

    at net.minecraft.client.gui.inventory.GuiContainer.keyTyped(GuiContainer.java:688)

    at net.minecraft.client.gui.GuiScreen.handleKeyboardInput(GuiScreen.java:372)

    at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:323)

    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1731)

    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039)

    at net.minecraft.client.Minecraft.run(Minecraft.java:961)

    at net.minecraft.client.main.Main.main(Main.java:164)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:606)

    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)

    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:606)

    at GradleStart.bounce(GradleStart.java:107)

    at GradleStart.startClient(GradleStart.java:100)

    at GradleStart.main(GradleStart.java:65)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:606)

    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

     

     

    A detailed walkthrough of the error, its code path and all known details is as follows:

    ---------------------------------------------------------------------------------------

     

    -- Head --

    Stacktrace:

    at com.mega.bir.client.interfaces.machine.ContainerMachine.onContainerClosed(ContainerMachine.java:163)

    at net.minecraft.client.gui.inventory.GuiContainer.onGuiClosed(GuiContainer.java:733)

    at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:847)

    at net.minecraft.client.entity.EntityPlayerSP.closeScreen(EntityPlayerSP.java:356)

    at net.minecraft.client.entity.EntityClientPlayerMP.closeScreenNoPacket(EntityClientPlayerMP.java:265)

    at net.minecraft.client.entity.EntityClientPlayerMP.closeScreen(EntityClientPlayerMP.java:256)

    at net.minecraft.client.gui.inventory.GuiContainer.keyTyped(GuiContainer.java:688)

    at net.minecraft.client.gui.GuiScreen.handleKeyboardInput(GuiScreen.java:372)

    at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:323)

     

    -- Affected screen --

    Details:

    Screen name: com.mega.bir.client.interfaces.machine.GuiMachine

     

    -- Affected level --

    Details:

    Level name: MpServer

    All players: 1 total; [EntityClientPlayerMP['megabitus'/267, l='MpServer', x=186.68, y=70.62, z=131.87]]

    Chunk stats: MultiplayerChunkCache: 1085, 1085

    Level seed: 0

    Level generator: ID 00 - default, ver 1. Features enabled: false

    Level generator options:

    Level spawn location: World: (256,64,128), Chunk: (at 0,4,0 in 16,8; contains blocks 256,0,128 to 271,255,143), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)

    Level time: 90160 game time, 90160 day time

    Level dimension: 0

    Level storage version: 0x00000 - Unknown?

    Level weather: Rain time: 0 (now: true), thunder time: 0 (now: false)

    Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false

    Forced entities: 92 total; [EntitySquid['Squid'/136, l='MpServer', x=248.50, y=60.16, z=190.22], EntityCreeper['Creeper'/3, l='MpServer', x=125.50, y=21.00, z=198.50], EntityCreeper['Creeper'/4, l='MpServer', x=120.50, y=21.00, z=195.50], EntitySkeleton['Skeleton'/5, l='MpServer', x=119.50, y=21.00, z=192.50], EntitySkeleton['Skeleton'/8, l='MpServer', x=135.53, y=18.00, z=201.38], EntitySquid['Squid'/128, l='MpServer', x=244.50, y=58.38, z=160.03], EntitySquid['Squid'/9, l='MpServer', x=156.50, y=52.38, z=136.34], EntityCreeper['Creeper'/11, l='MpServer', x=170.50, y=28.00, z=56.50], EntitySquid['Squid'/130, l='MpServer', x=247.69, y=61.38, z=195.47], EntityBat['Bat'/12, l='MpServer', x=175.89, y=22.64, z=52.51], EntitySquid['Squid'/132, l='MpServer', x=247.91, y=60.28, z=177.97], EntitySquid['Squid'/13, l='MpServer', x=172.49, y=54.00, z=135.34], EntityBat['Bat'/14, l='MpServer', x=178.44, y=17.10, z=199.50], EntityCreeper['Creeper'/152, l='MpServer', x=257.34, y=68.00, z=82.94], EntitySkeleton['Skeleton'/153, l='MpServer', x=264.69, y=66.00, z=97.78], EntitySkeleton['Skeleton'/154, l='MpServer', x=264.59, y=65.00, z=103.50], EntityPig['Pig'/155, l='MpServer', x=259.50, y=71.00, z=104.69], EntityCreeper['Creeper'/156, l='MpServer', x=265.41, y=65.00, z=105.00], EntityPig['Pig'/157, l='MpServer', x=263.91, y=67.00, z=122.97], EntitySpider['Spider'/23, l='MpServer', x=180.57, y=65.00, z=118.22], EntityCreeper['Creeper'/22, l='MpServer', x=183.00, y=66.00, z=123.56], EntityZombie['Zombie'/25, l='MpServer', x=186.53, y=46.00, z=155.94], EntitySkeleton['Skeleton'/24, l='MpServer', x=183.74, y=67.00, z=136.75], EntitySquid['Squid'/27, l='MpServer', x=191.06, y=57.63, z=169.94], EntityItem['item.tile.bir:interChest'/26, l='MpServer', x=182.81, y=58.13, z=148.81], EntitySquid['Squid'/29, l='MpServer', x=189.41, y=56.03, z=182.31], EntitySquid['Squid'/28, l='MpServer', x=185.81, y=57.25, z=173.50], EntitySquid['Squid'/31, l='MpServer', x=185.47, y=55.00, z=172.38], EntitySquid['Squid'/30, l='MpServer', x=182.75, y=58.00, z=187.91], EntityCreeper['Creeper'/34, l='MpServer', x=188.69, y=14.00, z=211.31], EntityZombie['Zombie'/32, l='MpServer', x=186.50, y=14.00, z=203.97], EntitySlime['Slime'/33, l='MpServer', x=183.22, y=16.00, z=195.22], EntityZombie['Zombie'/38, l='MpServer', x=197.63, y=19.00, z=53.06], EntityBat['Bat'/39, l='MpServer', x=198.17, y=20.83, z=51.60], EntityZombie['Zombie'/173, l='MpServer', x=261.63, y=35.00, z=210.06], EntitySpider['Spider'/42, l='MpServer', x=198.28, y=63.00, z=84.88], EntitySquid['Squid'/43, l='MpServer', x=203.28, y=50.00, z=104.25], EntityWitch['Witch'/41, l='MpServer', x=196.66, y=64.00, z=79.13], EntitySquid['Squid'/44, l='MpServer', x=207.50, y=50.34, z=111.28], EntityBat['Bat'/45, l='MpServer', x=199.75, y=45.10, z=161.75], EntityBat['Bat'/51, l='MpServer', x=217.57, y=22.74, z=51.89], EntityCreeper['Creeper'/55, l='MpServer', x=217.47, y=64.00, z=61.69], EntitySpider['Spider'/54, l='MpServer', x=211.50, y=65.00, z=60.28], EntityClientPlayerMP['megabitus'/267, l='MpServer', x=186.68, y=70.62, z=131.87], EntitySkeleton['Skeleton'/189, l='MpServer', x=262.73, y=62.30, z=139.65], EntitySquid['Squid'/59, l='MpServer', x=220.50, y=49.00, z=89.50], EntitySquid['Squid'/58, l='MpServer', x=220.09, y=49.00, z=90.66], EntitySpider['Spider'/57, l='MpServer', x=210.22, y=14.00, z=86.34], EntitySkeleton['Skeleton'/56, l='MpServer', x=210.22, y=14.17, z=86.34], EntitySquid['Squid'/63, l='MpServer', x=216.19, y=58.06, z=183.34], EntitySquid['Squid'/62, l='MpServer', x=215.56, y=57.38, z=182.19], EntityZombie['Zombie'/61, l='MpServer', x=221.50, y=26.00, z=165.50], EntitySquid['Squid'/60, l='MpServer', x=218.50, y=49.09, z=94.19], EntitySquid['Squid'/68, l='MpServer', x=214.50, y=49.00, z=190.50], EntitySquid['Squid'/69, l='MpServer', x=217.25, y=51.28, z=192.28], EntitySquid['Squid'/70, l='MpServer', x=222.59, y=54.38, z=195.69], EntitySquid['Squid'/71, l='MpServer', x=215.25, y=58.31, z=188.41], EntitySquid['Squid'/64, l='MpServer', x=216.56, y=58.34, z=188.06], EntitySquid['Squid'/65, l='MpServer', x=214.63, y=55.34, z=182.03], EntitySquid['Squid'/66, l='MpServer', x=208.78, y=51.09, z=180.63], EntitySquid['Squid'/67, l='MpServer', x=224.25, y=51.03, z=193.75], EntitySquid['Squid'/72, l='MpServer', x=222.25, y=59.34, z=194.84], EntitySquid['Squid'/73, l='MpServer', x=220.19, y=57.84, z=194.44], EntitySkeleton['Skeleton'/87, l='MpServer', x=232.00, y=17.00, z=63.50], EntitySquid['Squid'/93, l='MpServer', x=230.09, y=60.34, z=162.59], EntityBat['Bat'/92, l='MpServer', x=227.11, y=36.97, z=161.45], EntitySquid['Squid'/95, l='MpServer', x=226.94, y=56.28, z=164.25], EntitySquid['Squid'/94, l='MpServer', x=232.50, y=60.00, z=163.88], EntitySquid['Squid'/89, l='MpServer', x=232.44, y=58.91, z=157.41], EntityBat['Bat'/88, l='MpServer', x=244.56, y=26.40, z=79.50], EntitySquid['Squid'/91, l='MpServer', x=232.81, y=51.00, z=159.63], EntitySquid['Squid'/90, l='MpServer', x=239.81, y=59.25, z=156.16], EntitySquid['Squid'/100, l='MpServer', x=226.56, y=50.06, z=190.66], EntitySquid['Squid'/98, l='MpServer', x=242.09, y=61.34, z=165.72], EntitySquid['Squid'/99, l='MpServer', x=234.53, y=56.34, z=158.81], EntitySquid['Squid'/96, l='MpServer', x=232.84, y=56.34, z=176.06], EntitySquid['Squid'/97, l='MpServer', x=238.84, y=54.38, z=164.34], EntityWitch['Witch'/119, l='MpServer', x=254.41, y=76.00, z=65.47], EntityPig['Pig'/118, l='MpServer', x=255.50, y=71.00, z=75.06], EntityBat['Bat'/117, l='MpServer', x=240.93, y=28.36, z=79.49], EntityBat['Bat'/116, l='MpServer', x=243.75, y=26.10, z=75.50], EntityZombie['Zombie'/115, l='MpServer', x=244.44, y=24.00, z=79.22], EntityZombie['Zombie'/114, l='MpServer', x=243.34, y=24.00, z=73.34], EntitySquid['Squid'/127, l='MpServer', x=238.25, y=56.25, z=161.03], EntityZombie['Zombie'/5687, l='MpServer', x=191.50, y=18.00, z=52.50], EntitySquid['Squid'/126, l='MpServer', x=241.25, y=55.88, z=160.50], EntitySquid['Squid'/125, l='MpServer', x=247.50, y=60.13, z=156.34], EntityItem['item.tile.ice'/124, l='MpServer', x=242.13, y=55.13, z=115.19], EntityZombie['Zombie'/123, l='MpServer', x=260.58, y=67.00, z=92.56], EntityCow['Cow'/122, l='MpServer', x=253.31, y=65.00, z=110.16], EntitySkeleton['Skeleton'/121, l='MpServer', x=252.69, y=68.00, z=89.00], EntityZombie['Zombie'/120, l='MpServer', x=242.75, y=24.00, z=77.84]]

    Retry entities: 0 total; []

    Server brand: fml,forge

    Server type: Integrated singleplayer server

    Stacktrace:

    at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:417)

    at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2568)

    at net.minecraft.client.Minecraft.run(Minecraft.java:982)

    at net.minecraft.client.main.Main.main(Main.java:164)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:606)

    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)

    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:606)

    at GradleStart.bounce(GradleStart.java:107)

    at GradleStart.startClient(GradleStart.java:100)

    at GradleStart.main(GradleStart.java:65)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:606)

    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

     

    -- System Details --

    Details:

    Minecraft Version: 1.7.10

    Operating System: Windows 8.1 (amd64) version 6.3

    Java Version: 1.7.0_67, Oracle Corporation

    Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

    Memory: 818458368 bytes (780 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)

    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

    AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

    IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94

    FML: MCP v9.05 FML v7.10.25.1207 Minecraft Forge 10.13.0.1207 4 mods loaded, 4 mods active

    mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

    FML{7.10.25.1207} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.0.1207.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

    Forge{10.13.0.1207} [Minecraft Forge] (forgeSrc-1.7.10-10.13.0.1207.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

    BiR{1.7.10-1.0} [blocks & Items Revolution] (Blocks-Items-Revolution) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

    Launched Version: 1.7.10

    LWJGL: 2.9.1

    OpenGL: AMD Radeon R7 200 Series GL version 4.4.12967 Compatibility Profile Context 14.200.1004.0, ATI Technologies Inc.

    GL Caps: Using GL 1.3 multitexturing.

    Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.

    Anisotropic filtering is supported and maximum anisotropy is 16.

    Shaders are available because OpenGL 2.1 is supported.

     

    Is Modded: Definitely; Client brand changed to 'fml,forge'

    Type: Client (map_client.txt)

    Resource Packs: []

    Current Language: English (US)

    Profiler Position: N/A (disabled)

    Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

    Anisotropic Filtering: On (16)

    #@!@# Game crashed! Crash report saved to: #@!@# F:\Dropbox\Codding, Modding\Moding\1.7\Blocks-Items-Revolution\run\.\crash-reports\crash-2014-08-20_13.59.03-client.txt

    AL lib: (EE) alc_cleanup: 1 device not closed

     

    Process finished with exit code -1

     

     

    And here is my entire class: https://github.com/megabitus98/Blocks-Items-Revolution/blob/master/src/main/java/com/mega/bir/client/interfaces/machine/ContainerMachine.java

  4. Posted

    Hi! I have a block that when I close the GUI I drop the items that are in slots, they drop but they leave ghost blocks, here is the code:

    @Override
    public void onContainerClosed(EntityPlayer entityplayer)
    {
    super.onContainerClosed(entityplayer);
    for(int i = 0; i < TileEntityInterChest.INVENTORY_SIZE; i++)
    {
    ItemStack itemstack = craftMatrix.getStackInSlot(i);
    if(itemstack != null)
    {
    entityplayer.entityDropItem(itemstack, 0.05F);
    }
    }
    }
    

    Can someone help me?

  5. Thanks!

    I've done it like this:

    @Override
        public void onBlockPlacedBy(World world, int par2, int par3, int par4, EntityLivingBase entity, ItemStack itemstack) {
            if(entity instanceof EntityPlayer){
                EntityPlayer player = (EntityPlayer) entity;
                PlayerName = player.getDisplayName();
            }
        }
    

  6. Now it crashes, that's a start and here is

    Block:

     

     

    package com.BI.Blocks.Classes;

     

    import net.minecraft.block.BlockContainer;

    import net.minecraft.block.material.Material;

    import net.minecraft.entity.item.EntityItem;

    import net.minecraft.entity.player.EntityPlayer;

    import net.minecraft.inventory.IInventory;

    import net.minecraft.item.ItemStack;

    import net.minecraft.tileentity.TileEntity;

    import net.minecraft.world.World;

     

    import com.BI.Blocks.TileEntitys.PowderingMachineTileEntity;

    import com.BI.Lib.Names;

    import com.BI.Main_Package.Main_Class;

     

    import cpw.mods.fml.common.network.internal.FMLNetworkHandler;

     

    public class PowderingMachineBlock extends BlockContainer {

     

    public PowderingMachineBlock(Material p_i45394_1_) {

    super(Material.rock);

    this.setCreativeTab(Main_Class.CMTab);

    this.setBlockName(Names.PowderingMachine);

    this.setBlockTextureName(Names.PowderingMachine);

    }

     

    @Override

    public TileEntity createNewTileEntity(World var1, int var2) {

    return new PowderingMachineTileEntity();

    }

    @Override

    public boolean onBlockActivated(World world,int x,int y, int z, EntityPlayer player,int side,float hitX,float hitY, float hitZ){

    if(!world.isRemote){

    FMLNetworkHandler.openGui(player, Main_Class.instance, 1, world, x, y, z);

    }

    return true;

    }

     

    }

     

     

    Game_Registry

     

     

    package com.BI.Registers;

     

    import net.minecraftforge.common.MinecraftForge;

     

    import com.BI.Blocks.Mod_Blocks;

    import com.BI.Blocks.TileEntitys.PowderingMachineTileEntity;

    import com.BI.Events.Drop_Event;

    import com.BI.Items.Mod_Items;

    import com.BI.Lib.Names;

    import com.BI.Lib.Reference;

    import com.BI.Main_Package.Main_Class;

     

    import cpw.mods.fml.common.FMLLog;

    import cpw.mods.fml.common.registry.GameRegistry;

    import cpw.mods.fml.common.registry.LanguageRegistry;

     

    public class Game_Registry {

    public static void RegistersInitItems(){

    LanguageRegistry.addName(Mod_Items.DagerOfSight, Names.DagerOfSight);

    GameRegistry.registerItem(Mod_Items.DagerOfSight, Names.DagerOfSight);

     

    LanguageRegistry.addName(Mod_Items.Eye, Names.Eye);

    GameRegistry.registerItem(Mod_Items.Eye, Names.Eye);

     

    FMLLog.info("Chaos Magic " + Reference.MOD_VERSION + ">> succesfully registrated the items!");

    }

    public static void RegistersInitBlocks(){

    LanguageRegistry.addName(Mod_Blocks.TelotriteOre, Names.TelotriteOre);

    GameRegistry.registerBlock(Mod_Blocks.TelotriteOre, Names.TelotriteOre);

     

    LanguageRegistry.addName(Mod_Blocks.PowderingMachine, Names.PowderingMachine);

    GameRegistry.registerBlock(Mod_Blocks.PowderingMachine, Names.PowderingMachine);

     

    FMLLog.info("Chaos Magic " + Reference.MOD_VERSION + ">> succesfully registrated the blocks!");

    }

    public static void RegistersEvents(){

    MinecraftForge.EVENT_BUS.register(new Drop_Event());

     

    FMLLog.info("Chaos Magic " + Reference.MOD_VERSION + ">> succesfully registrated the events!");

    }

    public static void RegistersTileEntitys(){

    GameRegistry.registerTileEntity(PowderingMachineTileEntity.class, Names.PowderingMachine);

     

    FMLLog.info("Chaos Magic " + Reference.MOD_VERSION + ">> succesfully registrated the TileEntitys!");

    }

    public static void RegistersWorldGenerator(){

    GameRegistry.registerWorldGenerator(Main_Class.TelotriteOreWG, 1);

     

    FMLLog.info("Chaos Magic " + Reference.MOD_VERSION + ">> succesfully registrated the World Generator!");

    }

     

    }

     

     

    And the crash:

     

     

    [15:11:36] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker

    [15:11:36] [main/INFO]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker

    [15:11:36] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker

    [15:11:36] [main/INFO]: Forge Mod Loader version 7.2.156.1056 for Minecraft 1.7.2 loading

    [15:11:36] [main/INFO]: Java is Java HotSpot 64-Bit Server VM, version 1.7.0_51, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7

    [15:11:36] [main/INFO]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation

    [15:11:36] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

    [15:11:36] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker

    [15:11:36] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

    [15:11:36] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

    [15:11:36] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper

    [15:11:36] [main/ERROR]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!

    [15:11:38] [main/ERROR]: The minecraft jar file:/C:/Users/Megabitus/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.0.1056/forgeBin-1.7.2-10.12.0.1056.jar!/net/minecraft/client/ClientBrandRetriever.class appears to be corrupt! There has been CRITICAL TAMPERING WITH MINECRAFT, it is highly unlikely minecraft will work! STOP NOW, get a clean copy and try again!

    [15:11:38] [main/ERROR]: FML has been ordered to ignore the invalid or missing minecraft certificate. This is very likely to cause a problem!

    [15:11:38] [main/ERROR]: Technical information: ClientBrandRetriever was at jar:file:/C:/Users/Megabitus/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.0.1056/forgeBin-1.7.2-10.12.0.1056.jar!/net/minecraft/client/ClientBrandRetriever.class, there were 0 certificates for it

    [15:11:38] [main/ERROR]: FML appears to be missing any signature data. This is not a good thing

    [15:11:38] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper

    [15:11:38] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker

    [15:11:38] [main/INFO]: Launching wrapped minecraft {net.minecraft.client.main.Main}

    [15:11:41] [main/INFO]: Setting user: Megabitus

    [15:11:42] [Client thread/INFO]: LWJGL Version: 2.9.0

    [15:11:42] [Client thread/INFO]: Attempting early MinecraftForge initialization

    [15:11:42] [Client thread/INFO]: MinecraftForge v10.12.0.1056 Initialized

    [15:11:42] [Client thread/INFO]: Replaced 141 ore recipies

    [15:11:42] [Client thread/INFO]: Completed early MinecraftForge initialization

    [15:11:43] [Client thread/INFO]: Searching C:\Users\Megabitus\Desktop\Making A Mod\forge-1.7.2-10.12.0.1056-src\eclipse\mods for mods

    [15:11:44] [Client thread/ERROR]: FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.FMLRenderAccessLibrary. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!

    [15:11:44] [Client thread/ERROR]: FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.Start. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!

    [15:11:46] [Client thread/INFO]: Forge Mod Loader has identified 4 mods to load

    [15:11:46] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Block and Items Reloaded

    [15:11:46] [Client thread/INFO]: Configured a dormant chunk cache size of 0

     

    Starting up SoundSystem...

    Initializing LWJGL OpenAL

        (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

    OpenAL initialized.

     

    [15:11:48] [sound Library Loader/INFO]: Sound engine started

    [15:11:48] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas

    [15:11:48] [Client thread/INFO]: Created: 256x256 textures/items-atlas

    [15:11:48] [Client thread/INFO]: Chaos Magic 0.1>> is initializating!

    [15:11:48] [Client thread/INFO]: Chaos Magic 0.1>> initialized succesfully the blocks!

    [15:11:48] [Client thread/INFO]: Chaos Magic 0.1>> initialized succesfully the items!

    [15:11:48] [Client thread/INFO]: Chaos Magic 0.1>> succesfully registrated the items!

    [15:11:48] [Client thread/INFO]: Chaos Magic 0.1>> succesfully registrated the blocks!

    [15:11:48] [Client thread/INFO]: Chaos Magic 0.1>> succesfully registrated the events!

    [15:11:48] [Client thread/INFO]: Chaos Magic 0.1>> succesfully registrated the TileEntitys!

    [15:11:48] [Client thread/INFO]: Chaos Magic 0.1>> succesfully registrated the World Generator!

    [15:11:48] [Client thread/INFO]: Chaos Magic 0.1>> has succesfully initialized all the modules!

    [15:11:48] [Client thread/INFO]: Forge Mod Loader has successfully loaded 4 mods

    [15:11:48] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Block and Items Reloaded

    [15:11:49] [Client thread/INFO]: Created: 256x256 textures/items-atlas

    [15:11:49] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/blocks/Powdering Machine.png

    java.io.FileNotFoundException: minecraft:textures/blocks/Powdering Machine.png

    at net.minecraft.client.resources.FallbackResourceManager.getResource(SourceFile:51) ~[FallbackResourceManager.class:?]

    at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SourceFile:55) ~[simpleReloadableResourceManager.class:?]

    at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:125) [TextureMap.class:?]

    at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:90) [TextureMap.class:?]

    at net.minecraft.client.renderer.texture.TextureManager.loadTexture(SourceFile:72) [TextureManager.class:?]

    at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(SourceFile:136) [TextureManager.class:?]

    at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SourceFile:104) [simpleReloadableResourceManager.class:?]

    at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SourceFile:92) [simpleReloadableResourceManager.class:?]

    at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:566) [Minecraft.class:?]

    at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:283) [FMLClientHandler.class:?]

    at net.minecraft.client.Minecraft.startGame(Minecraft.java:525) [Minecraft.class:?]

    at net.minecraft.client.Minecraft.run(Minecraft.java:813) [Minecraft.class:?]

    at net.minecraft.client.main.Main.main(SourceFile:103) [Main.class:?]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]

    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]

    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]

    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]

    [15:11:49] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas

     

    SoundSystem shutting down...

        Author: Paul Lamb, www.paulscode.com

     

     

    Starting up SoundSystem...

    Initializing LWJGL OpenAL

        (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

    OpenAL initialized.

     

    [15:11:50] [sound Library Loader/INFO]: Sound engine started

    [15:11:51] [MCO Availability Checker #1/ERROR]: Couldn't connect to Realms

    [15:11:54] [server thread/INFO]: Starting integrated minecraft server version 1.7.2

    [15:11:54] [server thread/INFO]: Generating keypair

    [15:11:54] [server thread/INFO]: Injecting existing block and item data into this server instance

    [15:11:54] [server thread/INFO]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@12b6d1b8)

    [15:11:54] [server thread/INFO]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@12b6d1b8)

    [15:11:54] [server thread/INFO]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@12b6d1b8)

    [15:11:54] [server thread/INFO]: Preparing start region for level 0

    [15:11:55] [server thread/INFO]: Preparing spawn area: 69%

    [15:11:56] [Netty Client IO #0/INFO]: Server protocol version 1

    [15:11:56] [Netty IO #1/INFO]: Client protocol version 1

    [15:11:56] [Netty IO #1/INFO]: Client attempting to join with 4 mods : [email protected],[email protected],[email protected],B&I [email protected]

    [15:11:56] [Netty IO #1/INFO]: Attempting connection with missing mods [] at CLIENT

    [15:11:56] [Netty Client IO #0/INFO]: Attempting connection with missing mods [] at SERVER

    [15:11:56] [Client thread/INFO]: [Client thread] Client side modded connection established

    [15:11:56] [server thread/INFO]: [server thread] Server side modded connection established

    [15:11:56] [server thread/INFO]: Megabitus[local:E:7b7f80d6] logged in with entity id 212 at (-12.885577026445276, 72.57402747461207, 195.51463887209667)

    [15:11:56] [server thread/INFO]: Megabitus joined the game

    [15:12:00] [Client thread/WARN]: Failed to load texture: minecraft:textures/gui/GuiPowderingMachine.jpg

    java.io.FileNotFoundException: minecraft:textures/gui/GuiPowderingMachine.jpg

    at net.minecraft.client.resources.FallbackResourceManager.getResource(SourceFile:51) ~[FallbackResourceManager.class:?]

    at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SourceFile:55) ~[simpleReloadableResourceManager.class:?]

    at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SourceFile:29) ~[simpleTexture.class:?]

    at net.minecraft.client.renderer.texture.TextureManager.loadTexture(SourceFile:72) [TextureManager.class:?]

    at net.minecraft.client.renderer.texture.TextureManager.bindTexture(SourceFile:40) [TextureManager.class:?]

    at com.BI.Interfaces.PowderingMachine.Gui_PowderingMachine.drawGuiContainerBackgroundLayer(Gui_PowderingMachine.java:29) [Gui_PowderingMachine.class:?]

    at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:78) [GuiContainer.class:?]

    at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1059) [EntityRenderer.class:?]

    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:942) [Minecraft.class:?]

    at net.minecraft.client.Minecraft.run(Minecraft.java:833) [Minecraft.class:?]

    at net.minecraft.client.main.Main.main(SourceFile:103) [Main.class:?]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]

    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]

    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]

    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]

    [15:12:00] [server thread/ERROR]: Encountered an unexpected exception

    net.minecraft.util.ReportedException: Ticking memory connection

    at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:181) ~[NetworkSystem.class:?]

    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:639) ~[MinecraftServer.class:?]

    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:527) ~[MinecraftServer.class:?]

    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:111) ~[integratedServer.class:?]

    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414) [MinecraftServer.class:?]

    at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:665) [MinecraftServer$2.class:?]

    Caused by: java.lang.ClassCastException: com.BI.Interfaces.PowderingMachine.Gui_PowderingMachine cannot be cast to net.minecraft.inventory.Container

    at cpw.mods.fml.common.network.NetworkRegistry.getRemoteGuiContainer(NetworkRegistry.java:241) ~[NetworkRegistry.class:?]

    at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:75) ~[FMLNetworkHandler.class:?]

    at com.BI.Blocks.Classes.PowderingMachineBlock.onBlockActivated(PowderingMachineBlock.java:34) ~[PowderingMachineBlock.class:?]

    at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:372) ~[itemInWorldManager.class:?]

    at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:551) ~[NetHandlerPlayServer.class:?]

    at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(SourceFile:60) ~[C08PacketPlayerBlockPlacement.class:?]

    at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(SourceFile:9) ~[C08PacketPlayerBlockPlacement.class:?]

    at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:197) ~[NetworkManager.class:?]

    at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:165) ~[NetworkSystem.class:?]

    ... 5 more

    [15:12:00] [server thread/ERROR]: This crash report has been saved to: C:\Users\Megabitus\Desktop\Making A Mod\forge-1.7.2-10.12.0.1056-src\eclipse\.\crash-reports\crash-2014-04-15_15.12.00-server.txt

    [15:12:00] [server thread/INFO]: Stopping server

    [15:12:00] [server thread/INFO]: Saving players

    [15:12:00] [server thread/INFO]: Saving worlds

    [15:12:00] [server thread/INFO]: Saving chunks for level 'New World'/Overworld

    ---- Minecraft Crash Report ----

    // Why is it breaking :(

     

    Time: 15.04.2014 15:12

    Description: Ticking memory connection

     

    java.lang.ClassCastException: com.BI.Interfaces.PowderingMachine.Gui_PowderingMachine cannot be cast to net.minecraft.inventory.Container

    at cpw.mods.fml.common.network.NetworkRegistry.getRemoteGuiContainer(NetworkRegistry.java:241)

    at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:75)

    at com.BI.Blocks.Classes.PowderingMachineBlock.onBlockActivated(PowderingMachineBlock.java:34)

    at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:372)

    at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:551)

    at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(SourceFile:60)

    at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(SourceFile:9)

    at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:197)

    at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:165)

    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:639)

    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:527)

    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:111)

    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414)

    at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:665)

     

     

    A detailed walkthrough of the error, its code path and all known details is as follows:

    ---------------------------------------------------------------------------------------

     

    -- Head --

    Stacktrace:

    at cpw.mods.fml.common.network.NetworkRegistry.getRemoteGuiContainer(NetworkRegistry.java:241)

    at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:75)

    at com.BI.Blocks.Classes.PowderingMachineBlock.onBlockActivated(PowderingMachineBlock.java:34)

    at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:372)

    at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:551)

    at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(SourceFile:60)

    at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(SourceFile:9)

    at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:197)

     

    -- Ticking connection --

    Details:

    Connection: net.minecraft.network.NetworkManager@7417ad58

    Stacktrace:

    at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:165)

    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:639)

    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:527)

    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:111)

    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414)

    at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:665)

     

    -- System Details --

    Details:

    Minecraft Version: 1.7.2

    Operating System: Windows 7 (amd64) version 6.1

    Java Version: 1.7.0_51, Oracle Corporation

    Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

    Memory: 826113632 bytes (787 MB) / 1056309248 bytes (1007 MB) up to 2130051072 bytes (2031 MB)

    JVM Flags: 3 total; -Xincgc -Xmx2048M -Xms1024M

    AABB Pool Size: 5169 (289464 bytes; 0 MB) allocated, 4970 (278320 bytes; 0 MB) used

    IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95

    FML: MCP v9.01-pre FML v7.2.156.1056 Minecraft Forge 10.12.0.1056 4 mods loaded, 4 mods active

    mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

    FML{7.2.156.1056} [Forge Mod Loader] (forgeBin-1.7.2-10.12.0.1056.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

    Forge{10.12.0.1056} [Minecraft Forge] (forgeBin-1.7.2-10.12.0.1056.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

    B&I Reloaded{0.1} [block and Items Reloaded] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

    Profiler Position: N/A (disabled)

    Vec3 Pool Size: 2167 (121352 bytes; 0 MB) allocated, 2132 (119392 bytes; 0 MB) used

    Player Count: 1 / 8; [EntityPlayerMP['Megabitus'/212, l='New World', x=-12,89, y=72,57, z=195,51]]

    Type: Integrated Server (map_client.txt)

    Is Modded: Definitely; Client brand changed to 'fml,forge'

    #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2014-04-15_15.12.00-server.txt

    AL lib: (EE) alc_cleanup: 1 device not closed

     

     

  7. Posted

    I want to make a GUI, I have the textures the code gives no error but it doesn't work.

    The main class:

     

     

    package com.BI.Main_Package;

     

    import net.minecraft.creativetab.CreativeTabs;

    import net.minecraft.item.Item;

    import net.minecraftforge.common.MinecraftForge;

    import net.minecraftforge.common.util.EnumHelper;

     

    import com.BI.Blocks.Mod_Blocks;

    import com.BI.Events.Drop_Event;

    import com.BI.Interfaces.Gui_Handeler;

    import com.BI.Items.Mod_Items;

    import com.BI.Lib.Reference;

    import com.BI.Registers.Game_Registry;

    import com.BI.WorldGen.TelotriteWG;

     

    import cpw.mods.fml.common.FMLCommonHandler;

    import cpw.mods.fml.common.FMLLog;

    import cpw.mods.fml.common.Mod;

    import cpw.mods.fml.common.Mod.EventHandler;

    import cpw.mods.fml.common.Mod.Instance;

    import cpw.mods.fml.common.event.FMLInitializationEvent;

    import cpw.mods.fml.common.network.NetworkRegistry;

     

    @Mod(modid = Reference.MOD_ID, version = Reference.MOD_VERSION, name = Reference.MOD_NAME)

    public class Main_Class

    {

    @Instance(Reference.MOD_ID)

    public static Main_Class instance;

    private Gui_Handeler guiHandler = new Gui_Handeler();

    public static CreativeTabs CMTab = new CMTab(CreativeTabs.getNextID(), "Chaos Magic");

    public static final Item.ToolMaterial DagerM = EnumHelper.addToolMaterial("DagerM", 3, 151, 12.0F, 3.5F, 22);

    public static TelotriteWG TelotriteOreWG = new TelotriteWG();

        @EventHandler

        public void init(FMLInitializationEvent event)

        {

        FMLLog.info("Chaos Magic " + Reference.MOD_VERSION + ">> is initializating!");

        NetworkRegistry.INSTANCE.registerGuiHandler(this, new Gui_Handeler());

    Mod_Blocks.BlocksInit();

    Mod_Items.ItemsInit();

    Game_Registry.RegistersInitItems();

    Game_Registry.RegistersInitBlocks();

    Game_Registry.RegistersEvents();

    Game_Registry.RegistersTileEntitys();

    Game_Registry.RegistersWorldGenerator();

    FMLLog.info("Chaos Magic " + Reference.MOD_VERSION + ">> has succesfully initialized all the modules!");

        }

    }

     

     

    The TileEntity:

     

     

    package com.BI.Blocks.TileEntitys;

     

    import net.minecraft.block.Block;

    import net.minecraft.entity.player.EntityPlayer;

    import net.minecraft.init.Blocks;

    import net.minecraft.inventory.IInventory;

    import net.minecraft.item.ItemStack;

    import net.minecraft.nbt.NBTBase;

    import net.minecraft.nbt.NBTTagCompound;

    import net.minecraft.nbt.NBTTagList;

    import net.minecraft.tileentity.TileEntity;

    import net.minecraft.world.World;

     

    public class PowderingMachineTileEntity extends TileEntity implements IInventory{

    private ItemStack[] items;

    int k;

    public PowderingMachineTileEntity(){

    items = new ItemStack[1];

    }

    public boolean search(World world, int x, int y, int z,Block block){

    boolean variabila = false;

    for (int i = x - 2; i <= x + 2; ++i)

    {

    for (int k = z - 2; k <= z + 2; ++k)

    {

    for (int j = y - 1; j <= y + 1; ++j)

    {

    if (i!=0 || k != 0 || j != 0)

    {

    if (world.getBlock(i, j, k) == block)

    {

    // System.out.println("The block has been detected!");

    variabila = true;

    }

    }

    }

    }

    }

    return variabila;

    }

    @Override

    public void updateEntity() {

    if(search(worldObj, xCoord, yCoord, zCoord, Blocks.water)){

    if(worldObj.isDaytime()){

    ///////////TO DO INCEREASE ITEM

    }

    }

    }

    @Override

    public void closeInventory() {}

    @Override

    public ItemStack decrStackSize(int i, int count) {

    ItemStack itemstack = getStackInSlot(i);

    if(itemstack != null){

    if(itemstack.stackSize <= count){

    setInventorySlotContents(i, null);

    }else{

    itemstack = itemstack.splitStack(count);

    markDirty();

    }

    }

    return itemstack;

    }

    @Override

    public String getInventoryName() {

    return "Powdering Machine";

    }

    @Override

    public int getInventoryStackLimit() {

    return 64;

    }

    @Override

    public int getSizeInventory() {

    return items.length;

    }

    @Override

    public ItemStack getStackInSlot(int i) {

    return items;

    }

    @Override

    public ItemStack getStackInSlotOnClosing(int i) {

    ItemStack item = getStackInSlot(i);

    setInventorySlotContents(i, null);

    return item;

    }

    @Override

    public boolean hasCustomInventoryName() {

    return false;

    }

    @Override

    public boolean isItemValidForSlot(int var1, ItemStack var2) {

    return true;

    }

    @Override

    public boolean isUseableByPlayer(EntityPlayer player) {

    return player.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) <= 64;

    }

    @Override

    public void openInventory() {}

    @Override

    public void setInventorySlotContents(int i, ItemStack itemstack) {

    items = itemstack;

    if(itemstack != null && itemstack.stackSize > getInventoryStackLimit()){

    itemstack.stackSize = getInventoryStackLimit();

    }

    markDirty();

    }

    @Override

    public void writeToNBT(NBTTagCompound compound) {

    super.writeToNBT(compound);

    NBTTagList items = new NBTTagList();

    for(int i = 0; i < getSizeInventory(); i++){

    ItemStack stack = getStackInSlot(i);

    if(stack != null){

    NBTTagCompound item = new NBTTagCompound();

    item.setByte("Slot", (byte)i);

    stack.writeToNBT(item);

    items.appendTag(item);

    }

    }

    compound.setTag("Items", items);

    }

    @Override

    public void readFromNBT(NBTTagCompound compound) {

    super.readFromNBT(compound);

    NBTTagList items = compound.getTagList("Items", compound.getId()); 

    for (int i = 0; i < items.tagCount(); ++i) {

    NBTTagCompound item = items.getCompoundTagAt(i);

    byte slot = item.getByte("Slot");

    if (slot >= 0 && slot < getSizeInventory()) {

    setInventorySlotContents(slot, ItemStack.loadItemStackFromNBT(item));

    }

    }

    }

    }

     

     

    Gui Handeler:

     

     

    package com.BI.Interfaces;

     

    import net.minecraft.entity.player.EntityPlayer;

    import net.minecraft.tileentity.TileEntity;

    import net.minecraft.world.World;

     

    import com.BI.Blocks.TileEntitys.PowderingMachineTileEntity;

    import com.BI.Interfaces.PowderingMachine.ContainerPowderingMachine;

     

    import cpw.mods.fml.common.network.IGuiHandler;

     

    public class Gui_Handeler implements IGuiHandler{

     

    @Override

    public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {

    TileEntity te = world.getTileEntity(x, y, z);

    switch(ID){

    case 1: if(te !=null && te instanceof PowderingMachineTileEntity){

    return new ContainerPowderingMachine(player.inventory, (PowderingMachineTileEntity)te);

    }

    }

    return null;

    }

     

    @Override

    public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {

    TileEntity te = world.getTileEntity(x, y, z);

    switch(ID){

    case 1: if(te !=null && te instanceof PowderingMachineTileEntity){

    return new ContainerPowderingMachine(player.inventory, (PowderingMachineTileEntity)te);

    }

    }

    return null;

    }

     

    }

     

     

    Container:

     

     

    package com.BI.Interfaces.PowderingMachine;

     

    import net.minecraft.entity.player.EntityPlayer;

    import net.minecraft.entity.player.InventoryPlayer;

    import net.minecraft.inventory.Container;

    import net.minecraft.inventory.Slot;

     

    import com.BI.Blocks.TileEntitys.PowderingMachineTileEntity;

     

    public class ContainerPowderingMachine extends Container{

     

    PowderingMachineTileEntity machine;

     

    public  ContainerPowderingMachine(InventoryPlayer invPlayer, PowderingMachineTileEntity machine){

    this.machine = machine;

    for(int x = 0; x<9; x++){

    addSlotToContainer(new Slot(invPlayer,x,8+18*x,142));

    }

    for(int y = 0;y<3;y++){

    for(int x = 0;x<9;x++){

    addSlotToContainer(new Slot(invPlayer,x + y * 9 + 9,8 + 18 * x,84 + y * 18));

    }

    }

    for(int x =0; x < 1; x++){

    addSlotToContainer(new Slot(machine,x,80 + 18 * x,33));

    }

    }

     

    @Override

    public boolean canInteractWith(EntityPlayer entityplayer) {

    return machine.isUseableByPlayer(entityplayer);

    }

     

    }

     

     

    Gui:

     

     

    package com.BI.Interfaces.PowderingMachine;

     

    import org.lwjgl.opengl.GL11;

     

    import com.BI.Blocks.TileEntitys.PowderingMachineTileEntity;

     

    import net.minecraft.client.Minecraft;

    import net.minecraft.client.gui.inventory.GuiContainer;

    import net.minecraft.entity.player.InventoryPlayer;

    import net.minecraft.inventory.Container;

    import net.minecraft.util.ResourceLocation;

    import cpw.mods.fml.relauncher.Side;

    import cpw.mods.fml.relauncher.SideOnly;

     

    @SideOnly(Side.CLIENT)

    public class Gui_PowderingMachine extends GuiContainer{

     

    public Gui_PowderingMachine(InventoryPlayer invPlayer, PowderingMachineTileEntity machine) {

    super(new ContainerPowderingMachine(invPlayer, machine));

    xSize = 176;

    ySize = 166;

    }

     

    // private static final ResourceLocation texture = new ResourceLocation("minecraft", "textures/gui/GuiEssenceReceiver.jpg");

     

    @Override

    protected void drawGuiContainerBackgroundLayer(float f, int i, int j) {

    GL11.glColor4f(1, 1, 1, 1);

    this.mc.renderEngine.bindTexture(new ResourceLocation("minecraft", "textures/gui/GuiPowderingMachine.jpg"));

    drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);

     

    }

     

    }

     

     

    Can someone help me?

  8. Posted

    Hi! My game crashes when this line EntityPlayer player = (EntityPlayer) event.entity; runs and I don't know why.

    Here is my class:

     

     

    package com.BI.Events;

     

    import net.minecraft.entity.player.EntityPlayer;

    import net.minecraft.item.ItemStack;

    import net.minecraftforge.event.entity.living.LivingDeathEvent;

    import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;

     

    import com.BI.Items.Mod_Items;

     

    import cpw.mods.fml.common.eventhandler.SubscribeEvent;

    import cpw.mods.fml.relauncher.Side;

    import cpw.mods.fml.relauncher.SideOnly;

     

    public class Drop_Event {

    @SubscribeEvent

    @SideOnly(Side.CLIENT)

    public void onPlayerKill(LivingDeathEvent event){

    if (event.source.getEntity() instanceof EntityPlayer)

    {

    event.entityLiving.dropItem(Mod_Items.Eye, 1);

    }

    }

    @SubscribeEvent

    public void onPlayerUpdate(LivingUpdateEvent event){

    EntityPlayer player = (EntityPlayer) event.entity;

    ItemStack heldItem = player.getHeldItem();

    if (heldItem != null && heldItem == new ItemStack(Mod_Items.DagerOfSight)){

    System.out.println("afgrsgrdhse");

    }

    }

    }

     

     

    And here is the crash:

     

     

    [19:57:02] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker

    [19:57:02] [main/INFO]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker

    [19:57:02] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker

    [19:57:02] [main/INFO]: Forge Mod Loader version 7.2.156.1056 for Minecraft 1.7.2 loading

    [19:57:02] [main/INFO]: Java is Java HotSpot 64-Bit Server VM, version 1.7.0_51, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7

    [19:57:02] [main/INFO]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation

    [19:57:02] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

    [19:57:02] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker

    [19:57:02] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

    [19:57:02] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

    [19:57:02] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper

    [19:57:02] [main/ERROR]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!

    [19:57:03] [main/ERROR]: The minecraft jar file:/C:/Users/Megabitus/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.0.1056/forgeBin-1.7.2-10.12.0.1056.jar!/net/minecraft/client/ClientBrandRetriever.class appears to be corrupt! There has been CRITICAL TAMPERING WITH MINECRAFT, it is highly unlikely minecraft will work! STOP NOW, get a clean copy and try again!

    [19:57:03] [main/ERROR]: FML has been ordered to ignore the invalid or missing minecraft certificate. This is very likely to cause a problem!

    [19:57:03] [main/ERROR]: Technical information: ClientBrandRetriever was at jar:file:/C:/Users/Megabitus/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.0.1056/forgeBin-1.7.2-10.12.0.1056.jar!/net/minecraft/client/ClientBrandRetriever.class, there were 0 certificates for it

    [19:57:03] [main/ERROR]: FML appears to be missing any signature data. This is not a good thing

    [19:57:03] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper

    [19:57:03] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker

    [19:57:04] [main/INFO]: Launching wrapped minecraft {net.minecraft.client.main.Main}

    [19:57:07] [main/INFO]: Setting user: Pahimar

    [19:57:09] [Client thread/INFO]: LWJGL Version: 2.9.0

    [19:57:10] [Client thread/INFO]: Attempting early MinecraftForge initialization

    [19:57:10] [Client thread/INFO]: MinecraftForge v10.12.0.1056 Initialized

    [19:57:10] [Client thread/INFO]: Replaced 141 ore recipies

    [19:57:10] [Client thread/INFO]: Completed early MinecraftForge initialization

    [19:57:10] [Client thread/INFO]: Searching C:\Users\Megabitus\Desktop\Making A Mod\forge-1.7.2-10.12.0.1056-src\eclipse\mods for mods

    [19:57:12] [Client thread/ERROR]: FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.FMLRenderAccessLibrary. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!

    [19:57:12] [Client thread/ERROR]: FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.Start. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!

    [19:57:14] [Client thread/INFO]: Forge Mod Loader has identified 4 mods to load

    [19:57:14] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Block and Items Reloaded

    [19:57:14] [Client thread/INFO]: Configured a dormant chunk cache size of 0

     

    Starting up SoundSystem...

    Initializing LWJGL OpenAL

        (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

    OpenAL initialized.

     

    [19:57:16] [sound Library Loader/INFO]: Sound engine started

    [19:57:16] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas

    [19:57:16] [Client thread/INFO]: Created: 256x256 textures/items-atlas

    Chaos Magic 0.1>> is initializating!

    Chaos Magic 0.1>> initialized succesfully the blocks!

    Chaos Magic 0.1>> initialized succesfully the items!

    Chaos Magic 0.1>> succesfully registrated the items!

    Chaos Magic 0.1>> succesfully registrated the blocks!

    Chaos Magic 0.1>> succesfully registrated the events!

    Chaos Magic 0.1>> has succesfully initialized all the modules!

    [19:57:16] [Client thread/INFO]: Forge Mod Loader has successfully loaded 4 mods

    [19:57:16] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Block and Items Reloaded

    [19:57:16] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/items/Dager of Sight.png

    java.io.FileNotFoundException: minecraft:textures/items/Dager of Sight.png

    at net.minecraft.client.resources.FallbackResourceManager.getResource(SourceFile:51) ~[FallbackResourceManager.class:?]

    at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SourceFile:55) ~[simpleReloadableResourceManager.class:?]

    at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:125) [TextureMap.class:?]

    at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:90) [TextureMap.class:?]

    at net.minecraft.client.renderer.texture.TextureManager.loadTexture(SourceFile:72) [TextureManager.class:?]

    at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(SourceFile:136) [TextureManager.class:?]

    at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SourceFile:104) [simpleReloadableResourceManager.class:?]

    at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SourceFile:92) [simpleReloadableResourceManager.class:?]

    at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:566) [Minecraft.class:?]

    at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:283) [FMLClientHandler.class:?]

    at net.minecraft.client.Minecraft.startGame(Minecraft.java:525) [Minecraft.class:?]

    at net.minecraft.client.Minecraft.run(Minecraft.java:813) [Minecraft.class:?]

    at net.minecraft.client.main.Main.main(SourceFile:103) [Main.class:?]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]

    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]

    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]

    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]

    [19:57:17] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/items/Eye.png

    java.io.FileNotFoundException: minecraft:textures/items/Eye.png

    at net.minecraft.client.resources.FallbackResourceManager.getResource(SourceFile:51) ~[FallbackResourceManager.class:?]

    at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SourceFile:55) ~[simpleReloadableResourceManager.class:?]

    at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:125) [TextureMap.class:?]

    at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:90) [TextureMap.class:?]

    at net.minecraft.client.renderer.texture.TextureManager.loadTexture(SourceFile:72) [TextureManager.class:?]

    at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(SourceFile:136) [TextureManager.class:?]

    at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SourceFile:104) [simpleReloadableResourceManager.class:?]

    at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SourceFile:92) [simpleReloadableResourceManager.class:?]

    at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:566) [Minecraft.class:?]

    at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:283) [FMLClientHandler.class:?]

    at net.minecraft.client.Minecraft.startGame(Minecraft.java:525) [Minecraft.class:?]

    at net.minecraft.client.Minecraft.run(Minecraft.java:813) [Minecraft.class:?]

    at net.minecraft.client.main.Main.main(SourceFile:103) [Main.class:?]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]

    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]

    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]

    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]

    [19:57:17] [Client thread/INFO]: Created: 256x256 textures/items-atlas

    [19:57:17] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas

     

    SoundSystem shutting down...

        Author: Paul Lamb, www.paulscode.com

     

     

    Starting up SoundSystem...

    Initializing LWJGL OpenAL

        (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

    OpenAL initialized.

     

    [19:57:18] [sound Library Loader/INFO]: Sound engine started

    [19:57:19] [MCO Availability Checker #1/ERROR]: Couldn't connect to Realms

    [19:57:23] [server thread/INFO]: Starting integrated minecraft server version 1.7.2

    [19:57:23] [server thread/INFO]: Generating keypair

    [19:57:23] [server thread/INFO]: Injecting existing block and item data into this server instance

    [19:57:23] [server thread/INFO]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@1f16c76c)

    [19:57:23] [server thread/INFO]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@1f16c76c)

    [19:57:23] [server thread/INFO]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@1f16c76c)

    [19:57:23] [server thread/INFO]: Preparing start region for level 0

    [19:57:24] [server thread/ERROR]: Encountered an unexpected exception

    net.minecraft.util.ReportedException: Ticking entity

    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:622) ~[MinecraftServer.class:?]

    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:527) ~[MinecraftServer.class:?]

    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:111) ~[integratedServer.class:?]

    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414) [MinecraftServer.class:?]

    at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:665) [MinecraftServer$2.class:?]

    Caused by: java.lang.ClassCastException: net.minecraft.entity.passive.EntityChicken cannot be cast to net.minecraft.entity.player.EntityPlayer

    at com.BI.Events.Drop_Event.onPlayerUpdate(Drop_Event.java:25) ~[Drop_Event.class:?]

    at cpw.mods.fml.common.eventhandler.ASMEventHandler_5_Drop_Event_onPlayerUpdate_LivingUpdateEvent.invoke(.dynamic) ~[?:?]

    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:51) ~[ASMEventHandler.class:?]

    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:122) ~[EventBus.class:?]

    at net.minecraftforge.common.ForgeHooks.onLivingUpdate(ForgeHooks.java:271) ~[ForgeHooks.class:?]

    at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1557) ~[EntityLivingBase.class:?]

    at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:206) ~[EntityLiving.class:?]

    at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2019) ~[World.class:?]

    at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:659) ~[WorldServer.class:?]

    at net.minecraft.world.World.updateEntity(World.java:1983) ~[World.class:?]

    at net.minecraft.world.World.updateEntities(World.java:1836) ~[World.class:?]

    at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:500) ~[WorldServer.class:?]

    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:616) ~[MinecraftServer.class:?]

    ... 4 more

    [19:57:24] [server thread/ERROR]: This crash report has been saved to: C:\Users\Megabitus\Desktop\Making A Mod\forge-1.7.2-10.12.0.1056-src\eclipse\.\crash-reports\crash-2014-04-14_19.57.24-server.txt

    [19:57:24] [server thread/INFO]: Stopping server

    [19:57:24] [server thread/INFO]: Saving players

    [19:57:24] [server thread/INFO]: Saving worlds

    [19:57:24] [server thread/INFO]: Saving chunks for level 'New World'/Overworld

    ---- Minecraft Crash Report ----

    // There are four lights!

     

    Time: 14.04.2014 19:57

    Description: Ticking entity

     

    java.lang.ClassCastException: net.minecraft.entity.passive.EntityChicken cannot be cast to net.minecraft.entity.player.EntityPlayer

    at com.BI.Events.Drop_Event.onPlayerUpdate(Drop_Event.java:25)

    at cpw.mods.fml.common.eventhandler.ASMEventHandler_5_Drop_Event_onPlayerUpdate_LivingUpdateEvent.invoke(.dynamic)

    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:51)

    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:122)

    at net.minecraftforge.common.ForgeHooks.onLivingUpdate(ForgeHooks.java:271)

    at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1557)

    at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:206)

    at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2019)

    at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:659)

    at net.minecraft.world.World.updateEntity(World.java:1983)

    at net.minecraft.world.World.updateEntities(World.java:1836)

    at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:500)

    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:616)

    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:527)

    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:111)

    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414)

    at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:665)

     

     

    A detailed walkthrough of the error, its code path and all known details is as follows:

    ---------------------------------------------------------------------------------------

     

    -- Head --

    Stacktrace:

    at com.BI.Events.Drop_Event.onPlayerUpdate(Drop_Event.java:25)

    at cpw.mods.fml.common.eventhandler.ASMEventHandler_5_Drop_Event_onPlayerUpdate_LivingUpdateEvent.invoke(.dynamic)

    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:51)

    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:122)

    at net.minecraftforge.common.ForgeHooks.onLivingUpdate(ForgeHooks.java:271)

    at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1557)

    at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:206)

    at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2019)

    at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:659)

    at net.minecraft.world.World.updateEntity(World.java:1983)

     

    -- Entity being ticked --

    Details:

    Entity Type: Chicken (net.minecraft.entity.passive.EntityChicken)

    Entity ID: 0

    Entity Name: Chicken

    Entity's Exact location: -1318,50, 4,00, -641,50

    Entity's Block location: World: (-1319,4,-642), Chunk: (at 9,0,14 in -83,-41; contains blocks -1328,0,-656 to -1313,255,-641), Region: (-3,-2; contains chunks -96,-64 to -65,-33, blocks -1536,0,-1024 to -1025,255,-513)

    Entity's Momentum: 0,00, 0,00, 0,00

    Stacktrace:

    at net.minecraft.world.World.updateEntities(World.java:1836)

    at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:500)

     

    -- Affected level --

    Details:

    Level name: New World

    All players: 0 total; []

    Chunk stats: ServerChunkCache: 625 Drop: 0

    Level seed: -7116471425880067642

    Level generator: ID 01 - flat, ver 0. Features enabled: true

    Level generator options:

    Level spawn location: World: (-1237,4,-535), Chunk: (at 11,0,9 in -78,-34; contains blocks -1248,0,-544 to -1233,255,-529), Region: (-3,-2; contains chunks -96,-64 to -65,-33, blocks -1536,0,-1024 to -1025,255,-513)

    Level time: 402 game time, 402 day time

    Level dimension: 0

    Level storage version: 0x04ABD - Anvil

    Level weather: Rain time: 12862 (now: false), thunder time: 143009 (now: false)

    Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true

    Stacktrace:

    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:616)

    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:527)

    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:111)

    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414)

    at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:665)

     

    -- System Details --

    Details:

    Minecraft Version: 1.7.2

    Operating System: Windows 7 (amd64) version 6.1

    Java Version: 1.7.0_51, Oracle Corporation

    Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

    Memory: 899256448 bytes (857 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)

    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

    AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

    FML: MCP v9.01-pre FML v7.2.156.1056 Minecraft Forge 10.12.0.1056 4 mods loaded, 4 mods active

    mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

    FML{7.2.156.1056} [Forge Mod Loader] (forgeBin-1.7.2-10.12.0.1056.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

    Forge{10.12.0.1056} [Minecraft Forge] (forgeBin-1.7.2-10.12.0.1056.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

    B&I Reloaded{0.1} [block and Items Reloaded] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

    Profiler Position: N/A (disabled)

    Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

    Player Count: 0 / 8; []

    Type: Integrated Server (map_client.txt)

    Is Modded: Definitely; Client brand changed to 'fml,forge'

    #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2014-04-14_19.57.24-server.txt

    AL lib: (EE) alc_cleanup: 1 device not closed

     

     

  9. I've tried to make it but it doesn't work.

    The event class:

     

     

    package com.BI.Events;

     

    import com.BI.Items.Mod_Items;

     

    import cpw.mods.fml.common.eventhandler.SubscribeEvent;

    import net.minecraft.entity.Entity;

    import net.minecraft.entity.passive.EntityPig;

    import net.minecraft.entity.passive.EntitySquid;

    import net.minecraft.entity.player.EntityPlayer;

    import net.minecraft.item.ItemStack;

    import net.minecraftforge.event.entity.living.LivingDeathEvent;

    public class Drop_Event {

    @SubscribeEvent

    public void onPlayerKill(LivingDeathEvent event){

    if (event.source.getEntity() instanceof EntityPlayer)

    {

    event.entityLiving.dropItem(Mod_Items.Eye, 1);

    }

    }

    }

     

     

     

    Main Class:

     

     

    package com.BI.Main_Package;

     

    import net.minecraft.creativetab.CreativeTabs;

    import net.minecraft.item.Item;

    import net.minecraftforge.common.MinecraftForge;

    import net.minecraftforge.common.util.EnumHelper;

     

    import com.BI.Blocks.Mod_Blocks;

    import com.BI.Events.Drop_Event;

    import com.BI.Items.Mod_Items;

    import com.BI.Lib.Reference;

    import com.BI.Registers.Game_Registry;

     

    import cpw.mods.fml.common.FMLCommonHandler;

    import cpw.mods.fml.common.Mod;

    import cpw.mods.fml.common.Mod.EventHandler;

    import cpw.mods.fml.common.event.FMLInitializationEvent;

     

    @Mod(modid = Reference.MOD_ID, version = Reference.MOD_VERSION, name = Reference.MOD_NAME)

    public class Main_Class

    {

    public static CreativeTabs CMTab = new CMTab(CreativeTabs.getNextID(), "Chaos Magic");

    public static final Item.ToolMaterial DagerM = EnumHelper.addToolMaterial("DagerM", 3, 151, 12.0F, 3.5F, 22);

        @EventHandler

        public void init(FMLInitializationEvent event)

        {

        System.out.println("Chaos Magic " + Reference.MOD_VERSION + ">> is initializating!");

    Mod_Blocks.BlocksInit();

    Mod_Items.ItemsInit();

    Game_Registry.RegistersInitItems();

    Game_Registry.RegistersInitBlocks();

    FMLCommonHandler.instance().bus().register(new Drop_Event());

    System.out.println("Chaos Magic " + Reference.MOD_VERSION + ">> has succesfully initialized all the modules!");

        }

    }

     

     

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.