I will start looking into this. I love the backpack mod as well and having something like this could come in handy for players who don't really want to settle down with a base.
Does anyone know where to find a good up to date tutorial on tree generation? I've run through a couple but none of them seem to be working out for me...
I was having problems with this before and fixed it... the topic here should hopefully help you... if not then youtube or google search for a tutorial.
Ok thank you guys. Texture won't work, i don't know why. It's registered in the common proxy and client. But i could fix the crash when braking the block while burning. Look at TileEntityExtruder var10
Original code:
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
{
if (par1World.isRemote)
{
return true;
}
else if (!par5EntityPlayer.isSneaking())
{
TileEntityExtruder var10 = (TileEntityExtruder) par1World.getBlockTileEntity(par2, par3, par4);
if (var10 != null)
{
par5EntityPlayer.openGui(Trees.instance, 0, par1World, par2, par3, par4);
}
return true;
}
else
{
return false;
}
}
New code:
public boolean onBlockActivated(World par1World, int par2, int par3,
int par4, EntityPlayer par5EntityPlayer, int par6, float par7,
float par8, float par9) {
if (par1World.isRemote) {
return true;
} else if (!par5EntityPlayer.isSneaking()) {
TileEntity var10 = (TileEntity) par1World
.getBlockTileEntity(par2, par3, par4);
if (var10 != null) {
par5EntityPlayer.openGui(Trees.instance, 0, par1World, par2,
par3, par4);
}
return true;
} else {
return false;
}
}
Now I will try fixing smelting recipies.
For anyone who comes across this problem in the future here's the fix (block file):
public static void updateFurnaceBlockState(boolean par0, World par1World,
int par2, int par3, int par4) {
int var5 = par1World.getBlockMetadata(par2, par3, par4);
TileEntity var6 = par1World.getBlockTileEntity(par2, par3, par4);
keepFurnaceInventory = true;
if (par0) {
par1World.setBlockWithNotify(par2, par3, par4,
YourMod.YourActiveFurnaceBlock.blockID);
} else {
par1World.setBlockWithNotify(par2, par3, par4,
YourMod.YourIdleFurnaceBlock.blockID);
}
Finally fixed it... After I added the proxy's I was still having the problem so I started going though and compairing the tutorial vs. my code and in the furnace block file in the onBlockActivated I had
{
if (!par1World.isRemote)
{
return true;
}
I removed the ! and PRESTO I can move items around in my new gui.
So I was able to finally get everything working, furnace is textured correctly, gui opens up and stays open, haven't had any problems except that I can't move items in my inventory while my gui is open. If you have an idea as to why this is but need to see my code let me know...
Thanks for the help, between adding in the breaks and messing around with some more code I finally got my ores to gen in the world. For anyone who ends up coming to this post later the code I ended up having in my generation class that worked is:
@Override
public void generate(Random random, int chunkX, int chunkZ, World world,
IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
switch (world.provider.dimensionId)
{
case -1: generateNether();break;
case 0: generateSurface(world, random, chunkX*16, chunkZ*16);break;
case 1: generateEnd();
}
}
private void generateEnd() {}
private void generateNether() {}
private void generateSurface(World world, Random random, int chunkX, int chunkZ) {
for(int i = 0; i<50; i++){
int xCoord = chunkX+random.nextInt(16);
int yCoord = random.nextInt(65);
int zCoord = chunkZ=random.nextInt(16);
(new WorldGenMinable(MY_BASE_CLASS.MY_ORE.blockID, 16)).generate(world, random, xCoord, yCoord, zCoord);
}
}
0
0
0
Leaf Class:
The texture is stuck on the fast graphics. This isn't the top of my priority list but I'd like to figure out how to fix this.
0
0
0
Suggestions?
0
In your main mod class, under you other game registries add the
Then create a new class with the name of whatever you substitute in as ORE_GEN_CLASS. That is where you'll put the rest of the generation code:
set i< the number of veins you want in the chunk
set the 65 = to the layer you want your ore to start spawning at
and lastly
set the 16 = to the number of ore you want to have in each vein
0
0
This mod currently has:
Version 0.2.0
Version 0.1.0
Things I'd like to add:
Requires Forge http://www.minecraft...pic,4804.0.html
Downloads:
Primary: http://adf.ly/IBKZu
Please only use this download if adf.ly is down: http://www.mediafire.com/?mu5ojj6f3toptst
Version 0.1.0
Primary: http://adf.ly/I079B
Please only use this download if adf.ly is down: http://www.mediafire...i4yt7qv8xv6d74q
Looking for any and all feedback!
0
For anyone who comes across this problem in the future here's the fix (block file):
0
I removed the ! and PRESTO I can move items around in my new gui.
Thanks for all the help
0
0
As far as I can see I have all the code referenced correctly...
Here's my code, maybe I missed something.
Container:
GUI:
0
0