Started by
vanilla
on
Topic category: Help with Minecraft modding (Java Edition)
I've been making a music disk mod for fun and adding more in, and i cant figure out how to get the new music disks to drop from the traditional ways of creepers being killed. any suggestions?
When entity dies: if entity = creeper then spawn gem or random spawn gem
Loot table is a better method. Create a loot table, set it to entity, then for the ID, "entity/creeper"
Then set whatever items you want the mob to drop in there, be it gunpowder, records, etc.
I think the Loot table method straight away removes the original loot drops, so if you do that i think you need to set ALL the vanilla drops for the Creeper again, and then add your disks. Correct me if i'm not right, but i think this will happen if you replace the table, same as with the Chest loot
Yeah, Mariano is right. Although I found vanilla loot table overwritten by two mods, both of them working together (even if being separately made), so I assume there's a workaround for that.
But if you are doing just standard loot table, it should be done like that. Or just by procedure mimicking vanilla one (just remember - creeper needs to be shot by skeleton, not by anything else).
minecraft itself uses a tag for determining what music discs can be dropped by creepers called minecraft/creeper_drop_music_discs. simply create a new tag, put all the other discs (bar pigstep and otherside) as well as your disc into that tag, and save it. it'll overwrite minecraft's original tag and let your new disc drop alongside all the old ones. worked perfectly for me
an image of the tag if you need one:
Oh dang, that's an awesome thing to know even on my side. Thank you for helping us all out, Oreli!
Oreli, Im new to modding. Would you put the tag .json file under "src/main/resources/data/[modid]/tags/items/creeper_drop_music_discs.json ? or no? also, would you be able to send a screen shot of your tag after you edited/added it? thanks!
also what website was that screen shot?
OH! its at "src/main/resources/data/minecraft/tags/items/[creeper_drop_music_discs.json]" thank you so much