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

Started by w7n on Sun, 04/18/2021 - 19:04

Topic category: Help with modding (Java Edition)

Last seen on 11:35, 6. May 2021
Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to edit a certain mob's loot table [Creeper w/ Custom Music Disc]
Sun, 04/18/2021 - 19:04

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

Last seen on 13:35, 3. May 2021
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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?…

Last seen on 13:35, 3. May 2021
Joined Apr 2021
Points:

User statistics:

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

"When custom entity dies" trigger

Last seen on 13:35, 3. May 2021
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 ;)

Last seen on 11:35, 6. May 2021
Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 

Last seen on 13:35, 3. May 2021
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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

Last seen on 11:35, 6. May 2021
Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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?

Last seen on 14:15, 12. May 2021
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Unless its a data pack, so…
Tue, 04/20/2021 - 13:52

Unless its a data pack, so no. impossible

Last seen on 13:35, 3. May 2021
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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!