axilirate Posted March 15, 2020 Posted March 15, 2020 (edited) Subclasses of EntityLiving automatically support drawing from a loot table upon death. This is done by overriding the getLootTable method to return a ResourceLocation to the desired table. This serves as the mob’s default table; the tables of both your and other mods’ mobs can be overridden for a single entity by setting the deathLootTable field of the entity. Example code would be welcome. Edited March 15, 2020 by axilirate Quote
Draco18s Posted March 15, 2020 Posted March 15, 2020 On 3/15/2020 at 12:30 PM, axilirate said: Example code would be welcome. Expand Example code of what? You never asked a question. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
axilirate Posted March 15, 2020 Author Posted March 15, 2020 On 3/15/2020 at 1:22 PM, Draco18s said: Example code of what? You never asked a question. Expand Sorry I'll be more clear, I wonder how to change Vanilla mobs item drop and that's what they say in the documentation. I wanted to see an example of how to modify or remove vanilla mobs loot table. Quote
Cyborgmas Posted March 15, 2020 Posted March 15, 2020 You do that with data packs which you can read about on the official minecraft wiki. Also are your really on 1.15 ? EntityLiving is 1.12... Quote
axilirate Posted March 15, 2020 Author Posted March 15, 2020 On 3/15/2020 at 2:41 PM, Cyborgmas said: You do that with data packs which you can read about on the official minecraft wiki. Also are your really on 1.15 ? EntityLiving is 1.12... Expand Will I be able to add my own item to the drop and if so, how do I do that? Also it was on the documentation of 1.15.x version. Quote
Cyborgmas Posted March 15, 2020 Posted March 15, 2020 Ah yes it is outdated, and do tell people when you are copy pasting documentation. And yes data packs allow you to completely override vanilla loot table. Here is the info on the wiki: https://minecraft.gamepedia.com/Data_pack In a dev environment you place your json in resources/data/minecraft/loot_tables 1 Quote
axilirate Posted March 15, 2020 Author Posted March 15, 2020 (edited) On 3/15/2020 at 2:57 PM, Cyborgmas said: Ah yes it is outdated, and do tell people when you are copy pasting documentation. And yes data packs allow you to completely override vanilla loot table. Here is the info on the wiki: https://minecraft.gamepedia.com/Data_pack In a dev environment you place your json in resources/data/minecraft/loot_tables Expand Thank you so much. It worked! Edited March 15, 2020 by axilirate Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.