Are the loot tables hardcoded (which they are)? Are the experience orb drops hardcoded (which they are)? Are you saying that they should not be hardcoded? Are you saying that experience orbs should be part of loot tables? I think the last question is correct. I will base this comment on it.
Loot tables are arrays of items. It would be impossible to add entities to a list of items.
In java, you can modify the loot tables using data packs.
"Loot tables are arrays of items. It would be impossible to add entities to a list of items."
That's exactly what this suggestion is about. To add a "type": "experience" to loot tables. There's currently a "type": "loot_table", "type": "empty" and "type": "item" right now.
It's not impossible. No idea what you're talking about there. They code stuff, it's possible.
This is a basic example of code put in the onDeath() function, which is called when an entity dies. This would drop 3 xp orbs, 3 iron ingots, 2 gold ingots, and 1 diamond. Now, if you were to do this:
I don't recall saying to drop it as an item though.
The loot table should be made if the "type" is "experience", it drops the amount of experience orb entities that you specify. Not "type": "item", which I've already explained.
So the loot table is an array of items and entities combined, and it detects whether it is an item or an entity, and if it is an item, it drops an item, and if it is an entity, it drops an entity.
I forgot to clarify that type(experience) is entity.
This would be greatly beneficial for a multitude of reasons.
Block loot tables would of course give the experience when mining the block, like Coal Ore, Redstone Ore, Lapis Lazuli Ore, Diamond Ore, Emerald Ore, and Nether Quartz Ore.
Entity loot tables would of course give the experience on killing the entity.
Fishing loot tables would of course give the experience upon reeling the rod in.
Chest loot tables would give the experience upon opening the chest for the first time, when the loot is generated.
The Piglin Bartering, Cat Morning Gift, and Hero of the Village loot table would give the experience along with the resulting item(s).
If it is added, I can make an addon for java edition where there is a ore that drops a bunch of xp! I am currently having an issue that the feature to have the block drop a different amount of xp doesn't exist.
7 Comments