Help with NBT

Started by Frost_200 on

Topic category: Help with MCreator software

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with NBT

I would like to know how to make that when an entity is right-clicked when you have an item in your hand, it gives you another item, but only the first time you click on it, that is, if you click on it for the second or third once will not give you anything.

I use much simpler method…
Wed, 04/28/2021 - 22:20

I use much simpler method for that, using that NBT tags are by default giving value of 0.

Simply make something like this:

If ENBT_Test_Tag < 555:
*here you give player what you want*
*after that, set ENBT_Test_Tag to 556, for example*

Therefore you will use it only once, as default value MUST be lower than 555, but after this specific event of giving item, value will be changed to not work again.
ENBT means, of course, entity NBT. You can use itemstack NBT if you want to make it dependent on specific item and not a player.

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Does this work in 2020.5 ?,…
Wed, 04/28/2021 - 23:58

Does this work in 2020.5 ?, what happens is that I can not find several of the procedures

Yeah, it works fine for 2020…
Thu, 04/29/2021 - 06:51

Yeah, it works fine for 2020.5, these procedure blocks are one of MCreator basics. Though I forgot that with your specific need there's different type of entities (entity and source_entity). So you will need source_entity everywhere, because it's the one who do right-clicking.

Here you are an example, just made that on 2020.5:

[x]