Hello everyone, I'm working on my first (serious) mod using MCP and ModLoader. In making this mod I have made a furnace-type block. On first recompile I had a few dozen errors, but now I'm down to just one and I'll be darned if I can figure out what the problem actually is.
Here's the error code:
== ERRORS FOUND ==
src/minecraft/net/minecraft/src/BlockBrewBarrel.java:129: cannot find symbol
symbol : method OpenGui(net.minecraft.src.EntityPlayer,net.minecraft.src.GuiBrewBarrel)
location: class net.minecraft.src.ModLoader
ModLoader.OpenGui(entityplayer, new GuiBrewBarrel(entityplayer.inventory, tileentitybrewbarrel));
^
1 error
==================
Here's the piece of code it's referencing:
public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer)
{
if(world.multiplayerWorld)
{
return true;
}
TileEntityBrewBarrel tileentitybrewbarrel = (TileEntityBrewBarrel)world.getBlockTileEntity(i, j, k);
ModLoader.OpenGui(entityplayer, new GuiBrewBarrel(entityplayer.inventory, tileentitybrewbarrel));
return true;
}
Anyone got any ideas? I can provide more code if need be. And before anyone asks, yes I've made the necessary Slot, Container, TileEntity, etc files.
Hope to have an answer soon! It's driving me up the wall!
Could you maybe post the rest of your code for the block and i can compare it with mineCould you post the rest of your block code so I can compare it with mine
ModLoader.OpenGui(entityplayer, new GuiBrewBarrel(entityplayer.inventory, tileentitybrewbarrel));
That line is calling a function (OpenGui). Functions are usually named with the first letter being lowercase.
Check the ModLoader.java file and find openGui().
I'm guessing that the function name is openGui, with a lowercase.
In general you'd be right, but ModLoader's functions don't follow normal form. However, just for kicks I tried this and got nearly the same error which was in and of itself a bit perplexing. Here's the error:
== ERRORS FOUND ==
src/minecraft/net/minecraft/src/BlockBrewBarrel.java:128: cannot find symbol
symbol : method openGui(net.minecraft.src.EntityPlayer,net.minecraft.src.GuiBrewBarrel)
location: class net.minecraft.src.ModLoader
ModLoader.openGui(entityplayer, new GuiBrewBarrel(entityplayer.inventory, tileentitybrewbarrel));
^
Here's the error code:
src/minecraft/net/minecraft/src/BlockBrewBarrel.java:129: cannot find symbol
symbol : method OpenGui(net.minecraft.src.EntityPlayer,net.minecraft.src.GuiBrewBarrel)
location: class net.minecraft.src.ModLoader
ModLoader.OpenGui(entityplayer, new GuiBrewBarrel(entityplayer.inventory, tileentitybrewbarrel));
^
1 error
==================
Here's the piece of code it's referencing:
{
if(world.multiplayerWorld)
{
return true;
}
TileEntityBrewBarrel tileentitybrewbarrel = (TileEntityBrewBarrel)world.getBlockTileEntity(i, j, k);
ModLoader.OpenGui(entityplayer, new GuiBrewBarrel(entityplayer.inventory, tileentitybrewbarrel));
return true;
}
Anyone got any ideas? I can provide more code if need be. And before anyone asks, yes I've made the necessary Slot, Container, TileEntity, etc files.
Hope to have an answer soon! It's driving me up the wall!
birchwoodstudios.tumblr.com
That line is calling a function (OpenGui). Functions are usually named with the first letter being lowercase.
Check the ModLoader.java file and find openGui().
I'm guessing that the function name is openGui, with a lowercase.
I dont think that's the case with modloader:
Sure thing, here's the full code for the block:
code removed as it's not necessary to understanding what the problem was
In general you'd be right, but ModLoader's functions don't follow normal form. However, just for kicks I tried this and got nearly the same error which was in and of itself a bit perplexing. Here's the error:
== ERRORS FOUND ==
src/minecraft/net/minecraft/src/BlockBrewBarrel.java:128: cannot find symbol
symbol : method openGui(net.minecraft.src.EntityPlayer,net.minecraft.src.GuiBrewBarrel)
location: class net.minecraft.src.ModLoader
ModLoader.openGui(entityplayer, new GuiBrewBarrel(entityplayer.inventory, tileentitybrewbarrel));
^
1 error
==================
birchwoodstudios.tumblr.com
If this helped feel free to press the little green
Oh man, now I feel silly! Thanks this fixed it.
birchwoodstudios.tumblr.com