Started by
_celestialstars9_
on
Topic category: Help with Minecraft modding (Java Edition)
I'm changing the way experience is obtained so I don't want experience orbs to be dropped. How would I make it so that they aren't spawned in the first place?
You could just delete every experience orb in a tick procedure but ig that would be a unprofessional approach.
I am pretty sure you cannot overwrite this part of Minecrafts code without custom code.
I never tested it but the most interesting code section could look something like this:
Basically, when an entity drops anything, you cancel the trigger which negates it.
What that means is, that will not drop anything. As I am not a good programmer myself, I have no clue how to implement a filter for xp orbs. Maybe AI can help out...
Also you would have to find a way to cancel the trigger for xp drops from ovens and stuff like that.
Edit:
I just discovered that there is a trigger for an entity dropping experience in the blockly editor and it is cancellable...
Soooooo just create a procedure with the trigger "Entity drops experience" and then search in the Advanced tab for the cancel block. That should be it for entities.
Anyways, unfortunately there is no trigger for "Block drops experience" so ig that would have to be custom made. Maybe there is a similar approach like the one shown above but for blocks...
I still hope I could help ya :D