Hi everyone. I would just like to start by saying this is a great tutorial and has been bookmarked. :smile.gif:
However I've followed your furnace tutorial and it all works great except the gui image isn't loading. :/ All the slots are there and it even smelts but it just says missing where the gui should be. I've checked my code to the final versions you posted and it seems to be the same.
Also after its smelted one it says saving chucks and crashes.
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT b236f726 --------
Generated 26/09/11 13:24
Minecraft: Minecraft Beta 1.8.1
OS: Windows 7 (amd64) version 6.1
Java: 1.6.0_24, Sun Microsystems Inc.
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: ATI Mobility Radeon HD 5650 version 4.0.9901 Compatibility Profile Context, ATI Technologies Inc.
java.lang.ClassCastException: net.minecraft.src.TileEntityForge cannot be cast to net.minecraft.src.TileEntityFurnace
at net.minecraft.src.BlockFurnace.blockActivated(BlockFurnace.java:150)
at net.minecraft.src.PlayerControllerSP.sendPlaceBlock(PlayerControllerSP.java:169)
at net.minecraft.client.Minecraft.clickMouse(Minecraft.java:828)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1118)
at net.minecraft.client.Minecraft.run(Minecraft.java:483)
at java.lang.Thread.run(Thread.java:662)
--- END ERROR REPORT 5b61695d ----------
Any ideas?
This has nothing to do with your TileEntityForge. Can you post your block file?
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
package net.minecraft.src;
import java.util.Random;
// Referenced classes of package net.minecraft.src:
// BlockContainer, Material, Block, World,
// IBlockAccess, TileEntityForge, EntityPlayer, TileEntity,
// EntityLiving, MathHelper, IInventory, ItemStack,
// EntityItem
public class BlockForge extends BlockContainer
{
protected BlockForge(int i, boolean flag)
{
super(i, Material.rock);
ForgeRand = new Random();
isActive = flag;
blockIndexInTexture = 45;
}
public int idDropped(int i, Random random)
{
return mod_Forge.Forge.blockID;
}
public void onBlockAdded(World world, int i, int j, int k)
{
super.onBlockAdded(world, i, j, k);
setDefaultDirection(world, i, j, k);
}
private void setDefaultDirection(World world, int i, int j, int k)
{
if(world.multiplayerWorld)
{
return;
}
int l = world.getBlockId(i, j, k - 1);
int i1 = world.getBlockId(i, j, k + 1);
int j1 = world.getBlockId(i - 1, j, k);
int k1 = world.getBlockId(i + 1, j, k);
byte byte0 = 3;
if(Block.opaqueCubeLookup[l] && !Block.opaqueCubeLookup[i1])
{
byte0 = 3;
}
if(Block.opaqueCubeLookup[i1] && !Block.opaqueCubeLookup[l])
{
byte0 = 2;
}
if(Block.opaqueCubeLookup[j1] && !Block.opaqueCubeLookup[k1])
{
byte0 = 5;
}
if(Block.opaqueCubeLookup[k1] && !Block.opaqueCubeLookup[j1])
{
byte0 = 4;
}
world.setBlockMetadataWithNotify(i, j, k, byte0);
}
public int getBlockTexture(IBlockAccess iblockaccess, int i, int j, int k, int l)
{
if(l == 1)
{
return mod_Forge.ForgeSide;
}
if(l == 0)
{
return mod_Forge.ForgeSide;
}
int i1 = iblockaccess.getBlockMetadata(i, j, k);
if(l != i1)
{
return mod_Forge.ForgeSide;
}
if(isActive)
{
return mod_Forge.ForgeFront;
} else
{
return mod_Forge.ForgeFront;
}
}
public void randomDisplayTick(World world, int i, int j, int k, Random random)
{
if(!isActive)
{
return;
}
int l = world.getBlockMetadata(i, j, k);
float f = (float)i + 0.5F;
float f1 = (float)j + 0.0F + (random.nextFloat() * 6F) / 16F;
float f2 = (float)k + 0.5F;
float f3 = 0.52F;
float f4 = random.nextFloat() * 0.6F - 0.3F;
if(l == 4)
{
world.spawnParticle("smoke", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
world.spawnParticle("flame", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
} else
if(l == 5)
{
world.spawnParticle("smoke", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
world.spawnParticle("flame", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
} else
if(l == 2)
{
world.spawnParticle("smoke", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D);
world.spawnParticle("flame", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D);
} else
if(l == 3)
{
world.spawnParticle("smoke", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D);
world.spawnParticle("flame", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D);
}
}
public int getBlockTextureFromSide(int i)
{
if(i == 1)
{
return mod_Forge.ForgeSide;
}
if(i == 0)
{
return mod_Forge.ForgeSide;
}
if(i == 3)
{
return mod_Forge.ForgeSide;
} else
{
return mod_Forge.ForgeSide;
}
}
public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer)
{
if(world.multiplayerWorld)
{
return true;
}
TileEntityForge tileentityforge = (TileEntityForge)world.getBlockTileEntity(i, j, k);
if(tileentityforge != null)
{
ModLoader.OpenGUI(entityplayer, new GuiForge(entityplayer.inventory, tileentityforge));
}
return true;
}
public static void updateForgeBlockState(boolean flag, World world, int i, int j, int k)
{
int l = world.getBlockMetadata(i, j, k);
TileEntity tileentity = world.getBlockTileEntity(i, j, k);
keepForgeInventory = true;
if(flag)
{
world.setBlockWithNotify(i, j, k, mod_Forge.Forge.blockID);
} else
{
world.setBlockWithNotify(i, j, k, mod_Forge.Forge.blockID);
}
keepForgeInventory = false;
world.setBlockMetadataWithNotify(i, j, k, l);
if(tileentity != null)
{
tileentity.validate();
world.setBlockTileEntity(i, j, k, tileentity);
}
}
public TileEntity getBlockEntity()
{
return new TileEntityForge();
}
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving)
{
int l = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 0.5D) & 3;
if(l == 0)
{
world.setBlockMetadataWithNotify(i, j, k, 2);
}
if(l == 1)
{
world.setBlockMetadataWithNotify(i, j, k, 5);
}
if(l == 2)
{
world.setBlockMetadataWithNotify(i, j, k, 3);
}
if(l == 3)
{
world.setBlockMetadataWithNotify(i, j, k, 4);
}
}
public void onBlockRemoval(World world, int i, int j, int k)
{
if(!keepForgeInventory)
{
TileEntityForge tileentityForge = (TileEntityForge)world.getBlockTileEntity(i, j, k);
if(tileentityForge != null)
{
label0:
for(int l = 0; l < tileentityForge.getSizeInventory(); l++)
{
ItemStack itemstack = tileentityForge.getStackInSlot(l);
if(itemstack == null)
{
continue;
}
float f = ForgeRand.nextFloat() * 0.8F + 0.1F;
float f1 = ForgeRand.nextFloat() * 0.8F + 0.1F;
float f2 = ForgeRand.nextFloat() * 0.8F + 0.1F;
do
{
if(itemstack.stackSize <= 0)
{
continue label0;
}
int i1 = ForgeRand.nextInt(21) + 10;
if(i1 > itemstack.stackSize)
{
i1 = itemstack.stackSize;
}
itemstack.stackSize -= i1;
EntityItem entityitem = new EntityItem(world, (float)i + f, (float)j + f1, (float)k + f2, new ItemStack(itemstack.itemID, i1, itemstack.getItemDamage()));
float f3 = 0.05F;
entityitem.motionX = (float)ForgeRand.nextGaussian() * f3;
entityitem.motionY = (float)ForgeRand.nextGaussian() * f3 + 0.2F;
entityitem.motionZ = (float)ForgeRand.nextGaussian() * f3;
world.entityJoinedWorld(entityitem);
} while(true);
}
}
}
super.onBlockRemoval(world, i, j, k);
}
private Random ForgeRand;
private final boolean isActive;
private static boolean keepForgeInventory = false;
}
Did you, maybe change something in BlockFurnace from TileEntityFurnace to TileEntityForge or something like that? Also, I suggest using Eclipse because it tells you exactly where the error is while you're coding.
src\minecraft\net\minecraft\src\TileEntitySmelter.java:3: net.minecraft.src.Tile
EntitySmelter is not abstract and does not override abstract method func_35141_y
_() in net.minecraft.src.IInventory
public class TileEntitySmelter extends TileEntity implements IInventory
^
I'm starting that tutorial today, actually, but I'm not positive when I'll have it fully working.
Again, the tutorial was wonderful. But now, through experimentation and some various other tutorials (if you really want to know, here's the link), I have a furnace that accepts two inputs. What I want to do is have one item stay in one of the input slots and have it slowly get damaged and then disappear instead of disappearing when the item is smelted. Do you think you could help me there?
I really want a tutorial on how to make body parts and stuff fall of entities when attack a certain amount of times. If your confused by what I mean look at the Mo' Creeps Army Man.
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT 46fc6a20 --------
Generated 9/28/11 9:51 PM
Minecraft: Minecraft Beta 1.8.1
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0, Oracle Corporation
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 4300/4500 Series version 3.3.10524 Compatibility Profile Context, ATI Technologies Inc.
java.lang.ClassCastException: net.minecraft.src.TileEntityFurnace cannot be cast to net.minecraft.src.TileEntityBurgerM
at net.minecraft.src.BlockBurgerM.blockActivated(BlockBurgerM.java:105)
at net.minecraft.src.PlayerControllerSP.sendPlaceBlock(PlayerControllerSP.java:169)
at net.minecraft.client.Minecraft.clickMouse(Minecraft.java:828)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1118)
at net.minecraft.client.Minecraft.run(Minecraft.java:483)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 404d4b19 ----------
I Keep Getting It!!!
Here is the code BlockBurgerM:
public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer)
{
if(world.multiplayerWorld)
{
return true;
} else
{
TileEntityBurgerM tileentityburgerm = (TileEntityBurgerM)world.getBlockTileEntity(i, j, k);
ModLoader.OpenGUI(entityplayer, new GuiBurgerM(entityplayer.inventory, tileentityburgerm));
return true;
}
}
public TileEntity getBlockEntity()
{
return new TileEntityBurgerM();
}
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT 46fc6a20 --------
Generated 9/28/11 9:51 PM
Minecraft: Minecraft Beta 1.8.1
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0, Oracle Corporation
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 4300/4500 Series version 3.3.10524 Compatibility Profile Context, ATI Technologies Inc.
java.lang.ClassCastException: net.minecraft.src.TileEntityFurnace cannot be cast to net.minecraft.src.TileEntityBurgerM
at net.minecraft.src.BlockBurgerM.blockActivated(BlockBurgerM.java:105)
at net.minecraft.src.PlayerControllerSP.sendPlaceBlock(PlayerControllerSP.java:169)
at net.minecraft.client.Minecraft.clickMouse(Minecraft.java:828)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1118)
at net.minecraft.client.Minecraft.run(Minecraft.java:483)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 404d4b19 ----------
I Keep Getting It!!!
Here is the code BlockBurgerM:
public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer)
{
if(world.multiplayerWorld)
{
return true;
} else
{
TileEntityBurgerM tileentityburgerm = (TileEntityBurgerM)world.getBlockTileEntity(i, j, k);
ModLoader.OpenGUI(entityplayer, new GuiBurgerM(entityplayer.inventory, tileentityburgerm));
return true;
}
}
public TileEntity getBlockEntity()
{
return new TileEntityBurgerM();
}
This is exactly the same error as pattym got, just look at the post above yours and try what he did and see if it works for you.
I didn't change anything in TileEntityFurnace. Also I do use eclipse and it found no errors. :/ However I decided to clear MCP and redo the tutorial and it now seems to work lol. Strange.
Thanks for the help though. :smile.gif: Time to try the extra slot tutorial.
Again, the tutorial was wonderful. But now, through experimentation and some various other tutorials (if you really want to know, here's the link), I have a furnace that accepts two inputs. What I want to do is have one item stay in one of the input slots and have it slowly get damaged and then disappear instead of disappearing when the item is smelted. Do you think you could help me there?
You mean it gets 1 damage point every time the other item smelts?
I didn't change anything in TileEntityFurnace. Also I do use eclipse and it found no errors. :/ However I decided to clear MCP and redo the tutorial and it now seems to work lol. Strange.
Thanks for the help though. :smile.gif: Time to try the extra slot tutorial.
Thanx So Much, For Some Reason I Am Going To Give You A Shout And I Will Give Joshua A Shout Thanx Alot!!!
Well, that could work if I can set the maximum damage points.
You could check how the damage points are taken or added in ItemSword and then implement that in your TileEntityYOURFURNACE by checking if the item in the furnace is your item and then, instead of making it disappear when the item is smelted, make it gain a damage point.
- New Liquid
- New Mushroom Like Plants
- Ruins
Sorry, I think in explaining them I understand them better and see the solution
This has nothing to do with your TileEntityForge. Can you post your block file?
Also, check out my YouTube channel: www.YouTube.com/StrongJoshua
That's happened to me too, but now I can usually solve the errors without help :smile.gif:
Also, check out my YouTube channel: www.YouTube.com/StrongJoshua
It says that the method "mergeItemStack" does not exists... All I did was copy your exact code for ContainerFreezer and change the names...
You probably have to use updateMCP.bat and updateNames.bat.
Also, check out my YouTube channel: www.YouTube.com/StrongJoshua
Did you, maybe change something in BlockFurnace from TileEntityFurnace to TileEntityForge or something like that? Also, I suggest using Eclipse because it tells you exactly where the error is while you're coding.
Also, check out my YouTube channel: www.YouTube.com/StrongJoshua
Alright, fixed that error. Here is the last one:
Fixed that as well.
Again, the tutorial was wonderful. But now, through experimentation and some various other tutorials (if you really want to know, here's the link), I have a furnace that accepts two inputs. What I want to do is have one item stay in one of the input slots and have it slowly get damaged and then disappear instead of disappearing when the item is smelted. Do you think you could help me there?
Message me for custom mod/plugin requests
ModLoader Beta 1.8.1
net.minecraft.src.mod_Mcdonalds 0.7
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT 46fc6a20 --------
Generated 9/28/11 9:51 PM
Minecraft: Minecraft Beta 1.8.1
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0, Oracle Corporation
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 4300/4500 Series version 3.3.10524 Compatibility Profile Context, ATI Technologies Inc.
java.lang.ClassCastException: net.minecraft.src.TileEntityFurnace cannot be cast to net.minecraft.src.TileEntityBurgerM
at net.minecraft.src.BlockBurgerM.blockActivated(BlockBurgerM.java:105)
at net.minecraft.src.PlayerControllerSP.sendPlaceBlock(PlayerControllerSP.java:169)
at net.minecraft.client.Minecraft.clickMouse(Minecraft.java:828)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1118)
at net.minecraft.client.Minecraft.run(Minecraft.java:483)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 404d4b19 ----------
Here is the code BlockBurgerM:
public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer)
{
if(world.multiplayerWorld)
{
return true;
} else
{
TileEntityBurgerM tileentityburgerm = (TileEntityBurgerM)world.getBlockTileEntity(i, j, k);
ModLoader.OpenGUI(entityplayer, new GuiBurgerM(entityplayer.inventory, tileentityburgerm));
return true;
}
}
public TileEntity getBlockEntity()
{
return new TileEntityBurgerM();
}
This is exactly the same error as pattym got, just look at the post above yours and try what he did and see if it works for you.
Also, check out my YouTube channel: www.YouTube.com/StrongJoshua
That's strange. Hope the tutorial works for you!
Also, check out my YouTube channel: www.YouTube.com/StrongJoshua
You mean it gets 1 damage point every time the other item smelts?
Also, check out my YouTube channel: www.YouTube.com/StrongJoshua
Well, that could work if I can set the maximum damage points.
Message me for custom mod/plugin requests
Thanx So Much, For Some Reason I Am Going To Give You A Shout And I Will Give Joshua A Shout Thanx Alot!!!
Thanks! And where would you give the shoutout?
Also, check out my YouTube channel: www.YouTube.com/StrongJoshua
You could check how the damage points are taken or added in ItemSword and then implement that in your TileEntityYOURFURNACE by checking if the item in the furnace is your item and then, instead of making it disappear when the item is smelted, make it gain a damage point.
Also, check out my YouTube channel: www.YouTube.com/StrongJoshua