Moob Loot Table Help

Started by AgentCPU0 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Moob Loot Table Help

I'm trying to make a mod that adds a new loot table to all mobs, but I'm having trouble getting it to work. It's my first time using the app. What do I need to do?

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Are you making 1 item drop…
Thu, 07/28/2022 - 22:31

Are you making 1 item drop or multiple? Multiple requires multiple loot pools, and a selection of multiple items to drop that only drops one requires multiple pool entries. Sorry if this is confusing, I'm not really good at explaining things.

 

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I only want it to drop 1…
Fri, 07/29/2022 - 01:25

I only want it to drop 1 item, on top of vanilla loot

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use a "Entity dies" trigger…
Fri, 07/29/2022 - 05:51

Use a "Entity dies" trigger and then use a World Management procedure block to "Spawn Item at X Y Z".

 

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't see the "entity dies…
Fri, 07/29/2022 - 15:19

I don't see the "entity dies" trigger

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay, I got it working, but…
Fri, 07/29/2022 - 23:23

Okay, I got it working, but it overwrote the vanilla mob loot. Can that be fixed?

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Nevermind, I'm really…
Fri, 07/29/2022 - 23:37

Nevermind, I'm really confused. I have no clue what I'm doing at all. It's my first mod. What do I even do, from start to finish, to drop a single modded item?

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Not sure what you have going…
Fri, 07/29/2022 - 23:46

Not sure what you have going wrong.  I just made a quick test procedure, just the trigger and the item spawn block.  Works perfectly.  Spawned some zombies.  Upon death they always dropped my bonus item and also their normal drops (some dropped nothing, some dropped rotten flesh).

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a new Procedure, call…
Sat, 07/30/2022 - 00:12

Make a new Procedure, call it whatever you like.

Set the trigger and add the spawn command block, selecting whatever item you want to drop in the red square thing.

extra drop

https://imgur.com/a/ez9ueSw

Save and run a test game.  Any time any mob dies, it should always drop the above item as well as its normal drops.  You can then get more advanced and add checks for mob type, or additional drop choices, etc...

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That's great, but I need…
Sat, 07/30/2022 - 02:08

That's great, but I need spectific entities to drop specific items, not all entities

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
When modding, particularly…
Sat, 07/30/2022 - 05:05

When modding, particularly when just starting out, it's important to take things one step at a time.  If you try to tackle every nuance of your idea all at once you're destined to fail. You'll have so many possible things that can be going wrong you won't be able to recognize what parts are even working.

Start with the most basic step.  Verify that it is working as you intend, then add the next bit of complexity.  If something goes wrong, you'll know what it was that caused the problem and can work on a solution.

In your case, you want to give certain mobs certain extra drops, right?  Well, first you need to make sure you can can an item to drop at all.  Don't try to run before you can walk.

 

Anyway, once you get your procedure working so that items are dropping, you can work on adding a check for certain mob types.  For this you will use a basic If/Do statement, found under Flow Control.  Attach to the "If" connection an "Is [Event/target entity]  (sub)type of <your mob>" block, found under Logic.  Put the Spawn item block in the "Do" section. Bam, now your item only drops from the selected mob type.

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you, I got it working…
Sat, 07/30/2022 - 14:22

Thank you, I got it working. Just one last thing. How do I get Looting to affect my new drop? 

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Since this doesn't use the…
Sat, 07/30/2022 - 18:29

Since this doesn't use the base loot system you'll need to simulate the Looting effect manually.  There are ways to add drops to vanilla system, but it isn't particularly easy and straightforward.

 

So, to simulate Looting you'll need to do a few things.  First you need to detect if Looting is in effect.  You can do a check for the enchantment level of Looting of the item in the player's main hand.

It can be hard to find the right command blocks, even if you know exactly what you're looking for.  Make use of the [search procedure blocks] function at the top of the procedure window to hunt for keywords.  For example, type "enchant" and it will pop a list of any relevant blocks.

Once you can detect Looting, you'll need to do something with it, what exactly is up to you.  You can add a flat bonus to the number of drops or random chance for bonus drops all based on the Looting level you detected. Look up a tutorial on how to use random.