Sensing Block ID on Right Click [HELP!]

Started by SethKid on Mon, 05/09/2016 - 21:54

Topic category: Advanced modding

Last seen on 21:02, 8. Sep 2017
Joined May 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Sensing Block ID on Right Click [HELP!]
Mon, 05/09/2016 - 21:54

I want to create a mod where you may use an item to change the Meta Data of a block by one by right clicking with that item. This has been done in multiple cases, all of which will not work for me. Many use the arrow glitch from pre 1.8, and the main one is a plugin only.

Here was my plan:

 - Make a variable called "blockid" (Block ID)

 -Make the item with the right click on block events as following:

(Somehow set the "blockid" variable to the id of this block +1)

  1. Remove Block
  2. Add Block (The block of the variable number.

Simple enough even for someone with no coding experience, it's just algebra and a little logical thinking but... I don't know how to detect block id's or to set a block to a variable's value. There's not really a way to logic that one out as I believe it's just a matter of knowing the right method or string of code.

THANKS for any help! Alternatively but less preferably, if you know of a 1.9x mod which at least changes the Meta Data of a block somehow, please tell me. :)