Jump to content

Recommended Posts

Posted

I want to be able and have a tool when on right click places a torch using the normal torch mechanics. Getting the torch to face the right faces is very hard for me to understand. I may be over thinking this but I'm not sure. I used this simple method and return statement that will place a torch but the mechanics are messed up.

 

Here's what I tried:

public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10){

	return par3World.setBlock(par4, par5, par6, Blocks.torch);
}

 

I'm not sure If I'm being really dumb and not thinking right but I think this would be the way to do it but I need to incorporate the par4, par5, par6 (x, y, z) and with the world and entityplayer to do the torch mechanics. If anyone knows how to do this help would be much appreciated.

 

Thanks

~vandy22

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.