Started by
CouLdN
on
Topic category: Help with Minecraft modding (Java Edition)
In the title i mean, how can i restringe dropping an specific item with the "Q"? When you "Q" it cames back or you can't drop it. Please help.
Topic category: Help with Minecraft modding (Java Edition)
In the title i mean, how can i restringe dropping an specific item with the "Q"? When you "Q" it cames back or you can't drop it. Please help.
MCreator has a "hidden" built-in event system that can stop an item from dropping. All you need to do is create a procedure, open the dropdown menu at the top block ("no additional trigger") and select "Gem dropped". Then make an "if" block that detects if "provided item" = the item you want to stop from dropping. In that block, I think you should be able to cancel the event by getting a custom code snippet from the Advanced section and writing exactly this:
event.setCanceled(true);
Include the semicolon.
Tell me if it works because this would actually be pretty useful information for me to know as well.
It made the item disappear which was exactly what I needed!
is there a way to make this work on MCreator 2020.2