How can I detect the action of switching items?

Started by ddaisan on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I detect the action of switching items?

How can I detect the action of switching items?

You can store current in…
Sat, 10/28/2023 - 11:00

You can store current in-hand item in a player variable (or maybe even NBT tag if you don't need client-server sync) and compare the current to the new one. Just make sure you don't do that every tick I would say as it could impact the performance