Started by
Bo-Katan22
on
Topic category: Help with Minecraft modding (Java Edition)
So I've asked how to get rid of the Vanilla crafting recipes, but I forgot about something... Loot tables.
For my mod, I'm completely overhauling Vanilla, and I need to remove some items (cough tools and weapons cough) But I need some help: Can anyone help me completely remove and item from Vanilla? Thanks!
It's hard to do this, since you can't directly alter vanilla code. But there are workarounds.
If you've overridden loot tables and stuff, you can theoretically make it impossible to obtain an item. But if you want to be more thorough, you can also make a procedure that automatically attempts to despawn and delete dropped items of your type. (You can make an 'on entity spawned' procedure that immedieately despawns the target entity if it's an item entity of the desired type, or a 'on block right clicked' procedure that checks each slot of a chest's inventory and removes it if it's the matching item, if you want to replace a vanilla item with your own without actually changing the loot table.)
There are methods, but it's tricky. What specifically are you getting stuck on/trying to delete?
Vanilla wooden swords and tools, and other than that its mostly editing crafting recipes. I tried using the Minecraft namespace in a recipe, but it didn't work override it?
Sometimes recipe overrides are weird, MCreator sometimes doesn't put them in the right files, which is important for recipe data. If it's not working but you're sure you've got the namespace right, you can open up your mod's workspace file, go to the src file, and find the 'data' section, then move the recipe to the correct file. (If you're having the same problem, then MCreator will have likely put the recipe file in the main recipe data file, instead of the specific section it's supposed to go in.) You can also do this using MCreator's built in file manager, (at least to locate stuff), by pulling out the left hand tab of the screen, which I only discovered quite recently.
But yes, recipe overrides are way easier than literally replacing items. And for wooden tools you don't really have to worry about loot tables since they're exclusive to crafting. (As far as I know.)