Posted September 3, 201411 yr Hello, Modder's! I have a custom furnace made. The GUI works perfectly but theres one bug.. I can't take the items or blocks that I have in my inventory. It puts them back to they slot! Do you know what the problem is? I will post the codes if i'll need too. - DaryBob EDIT: Now my MC crashes if I open the GUI...
September 3, 201411 yr Author Nvm fixed it. I forget the "!" at "if(!world.isRemote) {} " 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, DookieMod.instance, DookieMod.guiIDDookieFurnace, world, x, y, z); } return true; }
September 3, 201411 yr Author My error log: ---- Minecraft Crash Report ---- // Oops. Time: 03.09.14 13:51 Description: Exception in server tick loop java.lang.Error: Unresolved compilation problem: ContainerDookieFurnace cannot be resolved to a type at com.netcrafter.mod.handler.GuiHandler.getServerGuiElement(GuiHandler.java:22) 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.netcrafter.mod.blocks.DookieFurnace.onBlockActivated(DookieFurnace.java:94) at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:405) at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:588) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122) at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:232) at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:720) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:608) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:746) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.7.2 Operating System: Windows 7 (x86) version 6.1 Java Version: 1.8.0_05, Oracle Corporation Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation Memory: 893079800 bytes (851 MB) / 1060372480 bytes (1011 MB) up to 1060372480 bytes (1011 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 4725 (264600 bytes; 0 MB) allocated, 4061 (227416 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94 FML: MCP v9.03 FML v7.2.211.1121 Minecraft Forge 10.12.2.1121 4 mods loaded, 4 mods active mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available->Available->Available FML{7.2.211.1121} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available->Available->Available Forge{10.12.2.1121} [Minecraft Forge] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available->Available->Available DookieMod{Alpha v0.1} [DookieMod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available->Available->Available Profiler Position: N/A (disabled) Vec3 Pool Size: 1672 (93632 bytes; 0 MB) allocated, 1484 (83104 bytes; 0 MB) used Player Count: 1 / 8; [EntityPlayerMP['Player903'/666, l='DookieMod Test 02 [WorldGen]', x=125.75, y=68.00, z=252.71]] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge'
September 3, 201411 yr Author My container class because it say's it can't resolve it: package com.netcrafter.mod.container; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; import net.minecraft.inventory.SlotFurnace; import com.netcrafter.mod.tileentity.TileEntityDookieFurnace; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class ContainerDookieFurnace extends Container { private TileEntityDookieFurnace dookieFurnace; public int lastBurnTime; public int lastCurrentItemBurnTime; public int lastCookTime; public ContainerDookieFurnace(InventoryPlayer inventory, TileEntityDookieFurnace tileentity) { this.dookieFurnace = tileentity; this.addSlotToContainer(new Slot(tileentity, 0, 56, 35)); this.addSlotToContainer(new Slot(tileentity, 1, 8, 62)); this.addSlotToContainer(new SlotFurnace(inventory.player, tileentity, 2, 116, 35)); for(int i = 0; i < 3; i++) { for(int j = 0; j < 9; j++) { this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); } } for(int i = 0; i < 9; i++) { this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 142)); } } public void addCraftingToCrafters (ICrafting icrafting) { super.addCraftingToCrafters(icrafting); icrafting.sendProgressBarUpdate(this, 0, this.dookieFurnace.cookTime); icrafting.sendProgressBarUpdate(this, 1, this.dookieFurnace.burnTime); icrafting.sendProgressBarUpdate(this, 2, this.dookieFurnace.currentItemBurnTime); } public void detectAndSendChanges() { super.detectAndSendChanges(); for(int i = 0; i < this.crafters.size(); i++) { ICrafting icrafting = (ICrafting) this.crafters.get(i); if(this.lastCookTime != this.dookieFurnace.cookTime) { icrafting.sendProgressBarUpdate(this, 0, this.dookieFurnace.cookTime); } if(this.lastBurnTime != this.dookieFurnace.burnTime) { icrafting.sendProgressBarUpdate(this, 1, this.dookieFurnace.burnTime); } if(this.lastCurrentItemBurnTime != this.dookieFurnace.currentItemBurnTime) { icrafting.sendProgressBarUpdate(this, 2, this.dookieFurnace.currentItemBurnTime); } } this.lastCookTime = this.dookieFurnace.cookTime; this.lastBurnTime = this.dookieFurnace.burnTime; this.lastCurrentItemBurnTime = this.dookieFurnace.currentItemBurnTime; } @SideOnly(Side.CLIENT) public void updateProgressBar (int slot, int newValue) { } @Override public boolean canInteractWith(EntityPlayer var1) { return true; } }
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.