With the block manipulation tutorial, the hitbox is included with the shape. Stairs are tricky because it's basically two blocks with two different sizes in one. I might deal with that eventually.
but fences they are a certain shape and the hit bow is not the same
OH! I forgot I never did a tutorial on this type of block manipulation. I'll tell you how now, but the full tutorial will come later.
Add this to BlockWhatever to make a block a fence.
in 'return 11;', That's a number for premade blocks, 11 being fences. You'll still have to add the code to make the fences connect when placed by eachother, but you can look into the fence code to find that.
public int getRenderType()
{
return 11;
}
public boolean renderAsNormalBlock()
{
return false;
}
public boolean isOpaqueCube()
{
return false;
}
I keep getting an error on the AddSmelting line. here's the code that I have.
public void addSmelting()
{
ModLoader.AddSmelting(mod_dnditems.glowgoldchunk, new ItemStack(mod_dnditems.glowgold, 1));
}
I keep getting a massive error though. I've tried it without the "mod_dnd..." prefix, I've tried with other items, I've tried almost everything. If I knew how to find the error log, I would post it here, but I don't know how...
I compared it to my smelting recipes, and the only difference I see, is the block you put in. With the block/item you put in, you need to add shiftedIndex/blockID, even if it's a custom item. With the block you receive, you don't need either.
I compared it to my smelting recipes, and the only difference I see, is the block you put in. With the block/item you put in, you need to add shiftedIndex/blockID, even if it's a custom item. With the block you receive, you don't need either.
-Muserae
I'm sorry for sounding stupid, but what does that mean? :tongue.gif: Do i put in the block ID instead of the name?
If it wouldn't be too much of a hassle, could you make a tutorial about how to make an item into a weapon? And how do you set an item to be unbreakable?
package net.minecraft.src;
import java.util.Random;
public class BlockCrystallite extends Block
{
public BlockCrystallite(int i, int j)
{
super(i, j, Material.ground);
}
public int idDropped(int i, Random random)
{
return mod_dnditems.crystallite.150;
}
public int quantityDropped(Random random)
{
return 1;
}
}
The error points to line 14, but there is a semi-colon there.
With the block manipulation tutorial, the hitbox is included with the shape. Stairs are tricky because it's basically two blocks with two different sizes in one. I might deal with that eventually.
-Muserae
OH! I forgot I never did a tutorial on this type of block manipulation. I'll tell you how now, but the full tutorial will come later.
Add this to BlockWhatever to make a block a fence.
in 'return 11;', That's a number for premade blocks, 11 being fences. You'll still have to add the code to make the fences connect when placed by eachother, but you can look into the fence code to find that.
-Muserae
I keep getting a massive error though. I've tried it without the "mod_dnd..." prefix, I've tried with other items, I've tried almost everything. If I knew how to find the error log, I would post it here, but I don't know how...
Save what you have and open recompile.bat and it'll give you the errors.
Right click and you'll get the option to copy, and paste that into this, and I'll do my best to help :smile.gif:
-Muserae
Aight, here's what it says
I compared it to my smelting recipes, and the only difference I see, is the block you put in. With the block/item you put in, you need to add shiftedIndex/blockID, even if it's a custom item. With the block you receive, you don't need either.
-Muserae
I'm sorry for sounding stupid, but what does that mean? :tongue.gif: Do i put in the block ID instead of the name?
If you add a block, you put this
Block.dirt.blockID
if it's custom
mod_hello.emeraldore.blockID
If you add an item, you put this
Item.stick.shiftedIndex
if it's custom
mod_hello.emerald.shiftedIndex
-Muserae
The coding part will, but the MCP and Eclipse might now. I don't think Eclipse is for mac.
-Muserae
you're missing a ";" on line 14 of BlockCrystallite
It should be right at the end of the line.
like ModLoader.AddName(hi, "Hello");
the ";" tells the game where the end of that specific code is.
Code, please.
The error points to line 14, but there is a semi-colon there.
mod_dnditems.crystallite.150
to
mod_dnditems.crystallite.shiftedIndex
if Item
mod_dnditems.crystallite.blockID
if Block
see if that works