[Tutorial] Making more complex Loot Tables

Started by Mindthemoods on

Topic category: User side tutorials

Last seen on 02:14, 20. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Tutorial] Making more complex Loot Tables

This is something which I wish I knew a LOT earlier into starting with Mcreator; while you normally have certain limitations with loot tables, there's a couple simple tricks you can use to make loot a bit more complex; including adding potions, item names and descriptions, enchanted books, randomly enchanted/damaged items, etc; to any loot table. (Blocks, entities, you name it.) 

First, you'll want to make a new loot table and add whatever things to it don't need custom changes, and the base items that you're going to tweak. Then, Lock the code- this allows you to modify the code directly. Then, you can add various functions to items that support them. (For example- make a loot table with an iron sword, lock the code, then modify the 'functions' section of the code.) 

The modification itself requires a bit of technical knowhow, but if I can figure it out, I'm confident pretty much anyone can. (A fair warning, the syntax needs to be perfect for the loot table to actually function. You'll know it's working when a new section appears in the code, and by the fact that the loot table should then appear as an auto-fill option when using the /loot command.)

This is basically just me reposting a really helpful series of tutorials from Microsoft- if you want an introduction to loot tables, look here; for a more in-depth look at different loot functions, check here.

Last seen on 16:38, 5. Aug 2022
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I specify the potion…
Wed, 07/13/2022 - 15:12

How can I specify the potion type of a tipped arrow? (Loot table) 

Last seen on 02:14, 20. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I was looking into this too-…
Wed, 07/13/2022 - 22:02

I was looking into this too- and I should mention, (fair disclaimer), that the provided tutorial is for bedrock edition; most of the functions are identical, but potions are one of the things that's different. 

Make the loot table you want, putting blank potions, splash potions, or tipped arrows in place of specific ones. Then lock the code, and go into the editor. Add this function to the blank potion items you want to edit, replacing 'weakness' with the effect you want.

 

   {
              "function": "set_nbt",
              "tag": "{Potion:\"minecraft:weakness\"}"
            }

Alternatively, I found a loot table generator that will let you modify aspects of things and download .json files- which you can then copy and paste into code as necessary.

 

Last seen on 16:38, 5. Aug 2022
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you very much 
Thu, 07/14/2022 - 21:32

Thank you very much