Posted August 19, 201312 yr i am trying to make a block do something when right clicked on. so i if i right click with a torch i cna then do something i know the code for that part and part of the code i need but i dont know how to get the item id or meta number or whatever defines and item when its in you hand so i can then go, if item id == 23 etc. does anyone know of this check? before you berate me for not trying i have looked at the beacon, flowerpot and chest blocks all of which use on block activated and the flowerpot seems to have something like this but from what i understand that only works for flower meta numbers? any help would be great, thanks for your time in advance Use examples, i have aspergers. Examples make sense to me.
August 19, 201312 yr when A block or when ALL block are right clicked ? EntityPlayer player; ItemStack itemInHand = player.inventory.getCurrentItem(); itemInHand.itemID == theId; itemInHand.getItemDamage() == theMeta; how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution-
August 19, 201312 yr Author a block so for example if block is right clicked then i change to other block or spawn an item or whatever. Use examples, i have aspergers. Examples make sense to me.
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.