How to edit a certain mob's loot table [Creeper w/ Custom Music Disc]

Started by w7n on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to edit a certain mob's loot table [Creeper w/ Custom Music Disc]

I've created a custom music disc, and I was wondering how you would edit a Creeper's loot table so that it also has a chance to drop music discs when killed by a skeleton. I'm assuming that the loot table of droppable music discs is somehow accessible, though I have no idea how the loot table system works in MCreator.

- thanks, w7n

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You don't necessarily need a…
Mon, 04/19/2021 - 10:04

You don't necessarily need a loot table to do this, but if you want the loot to be random, try binding the code below to a variable, which chooses random number, and depending on what the number is, you're mob will drop:

https://drive.google.com/file/d/18725JO6_q3JeOVnrMvVtnORPeT__4jfR/view?…

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
"When custom entity dies"…
Mon, 04/19/2021 - 10:25

"When custom entity dies" trigger

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you want to make already…
Mon, 04/19/2021 - 10:27

If you want to make already existing mobs, like pigs drop custom loot, tell me!

I can dive you some code ;)

Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
lol i cant view the file…
Mon, 04/19/2021 - 11:36

lol i cant view the file because i dont have permission 

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Bruh, I just realised that…
Mon, 04/19/2021 - 18:18

Bruh, I just realised that you want creepers drop music discs from skeletons...

I think it would be even better, if it would drop when killed by a ghast.

Heres the code: https://ibb.co/yQq8CmJ

Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Just an FYI, I want to edit…
Tue, 04/20/2021 - 12:16

Just an FYI, I want to edit the loot table of discs that the Creeper has for getting killed by a skeleton, and I don't want a creeper dropping two discs after getting killed. Is there any way to edit an existing loot table, or is it not possible?

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
============================…
Tue, 04/20/2021 - 15:20

====================================================

The command:

Do when the disk dropped execute this command: /execute at @e[distance=..3,nbt={Item:{id:"YOURE-ID:YOURE-DISK-NAME"}},limit=1] run kill @e[type=item,distance=..3,nbt={Item:{id:"minecraft:music_disc_NAME-HERE"}}]

---------------------------------------------------------------

Execute this command for every 13 disks (minecraft:music_disc_11; minecraft:music_disc_13; minecraft:music_disc_cat; ect.)

====================================================

Much mere simple command here (works almost the same):

/kill @e[type=item,distance=..3,nbt={Item:{id:"minecraft:music_disc_NAME-HERE"}}]

---------------------------------------------------------------

Execute this command for every 13 disks (minecraft:music_disc_11; minecraft:music_disc_13; minecraft:music_disc_cat; ect.)

====================================================

It should work!

Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi! So im trying to do the…
Tue, 11/02/2021 - 15:32

Hi! So im trying to do the same, i have imported the songs and want to creepers to drop it when they get killed by a skeleton, by doing it the method you show in the screenshots i get every music disc everytime it gets killed by a skeleton, is there a way to make it random? 
My procedure looks like this: https://ibb.co/znc9W1v

(Also dont pay attention to the images of the discs, they are just memes)