How do you prevent the use of a flint and steel?

Started by Barion on

Topic category: Help with modding (Java Edition)

Last seen on 11:39, 21. Apr 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do you prevent the use of a flint and steel?

How do you prevent the use of a flint and steel in a certain dimension? I've try it with the "when Item used" trigger, but it's not working.

Last seen on 23:57, 31. Aug 2022
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This solution gets what you…
Tue, 04/27/2021 - 10:30

This solution gets what you want, but it will reset the NBT tag (tracks how much durability the item has). https://imgur.com/a/edLGoJN

In this case, you will want to make an item that look exactly like the flint and steel to replace the item in someone's inventory. Keep in mind this makes a completely new item when you leave, but this is what I could come up with for you short term. Just remember to make it replace the replaced item when you leave said dimension. Hope this helps you!

Last seen on 11:39, 21. Apr 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Are you sure that it's not…
Tue, 04/27/2021 - 19:40

Are you sure that it's not possible with event canceling?

It should work with event…
Mon, 05/31/2021 - 16:30

It should work with event cancelling, but I'm not sure why you ask while knowing the answer. The procedure is quite simple:

*player right clicks block* trigger

  • if ID of dimension event/target entity is in = number_of_your_dimension AND if item in main-hand is flint & steel (you can add additional "OR" for off-hand, but I don't know if flint and steel works in off-hand):
    • cancel event
Last seen on 11:39, 21. Apr 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh, I tried it with when…
Wed, 06/02/2021 - 09:15

Oh, I tried it with when item used...
thanks