public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer)
{
for(int a =-1; a<=1; a++)
{
for(int c =-1; c<=1; c++)
{
if(a==0)world.setBlockWithNotify(i+a, j, k+c, Block.dirt.blockID);
if(c==0)world.setBlockWithNotify(i+a, j, k+c, Block.dirt.blockID);
}
}
}
I know They aren't efficient but he's a noob, you can't expect him to know how loops work. He shoul learn the basics before going on to advanced stuff.
EDIT: jota your code requires a return true; at the bottom because its a boolean.
0
0
0
1
EDIT: That will conflict with the sword recipe so use something else.
0
If I helped feel free to press the over here -->
0
0
0
That should tell you most of what you need to know.
0
And use code tags :
0
0
1
0
0
I know They aren't efficient but he's a noob, you can't expect him to know how loops work. He shoul learn the basics before going on to advanced stuff.
EDIT: jota your code requires a return true; at the bottom because its a boolean.
3
i = x, j = y, and k = z.
That code will place dirt blocks like this:
If this helped don't forget to click the green over there -->