User Tools

Site Tools


tutorial:adding_to_loot_tables

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
tutorial:adding_to_loot_tables [2019/07/29 17:11] fudgetutorial:adding_to_loot_tables [2019/07/29 17:16] – small tweaks juuz
Line 3: Line 3:
 ===== Introduction ===== ===== Introduction =====
  
-Sometimes you want to add items to [[https://minecraft.gamepedia.com/Loot_table|loot tables]], for example adding your own drops to a vanilla block or entity. The simplest solution, replacing the loot table file can break other mods – what if they want to change them as well? We’ll take a look at how you can add items to loot tables without overriding them.+Sometimes you want to add items to [[https://minecraft.gamepedia.com/Loot_table|loot tables]], for example adding your own drops to a vanilla block or entity. The simplest solution, replacing the loot table filecan break other mods – what if they want to change them as well? We’ll take a look at how you can add items to loot tables without overriding the table.
  
 Our example will be adding eggs to the coal ore loot table. Our example will be adding eggs to the coal ore loot table.
  
-===== Listening to loot table events =====+===== Listening to loot table loading =====
  
 Fabric API has an event that’s fired when loot tables are loaded, ''%%LootTableLoadingCallback%%''. You can register an event listener for it in your initializer. Let’s also check that the current loot table is ''%%minecraft:blocks/coal_ore%%''. Fabric API has an event that’s fired when loot tables are loaded, ''%%LootTableLoadingCallback%%''. You can register an event listener for it in your initializer. Let’s also check that the current loot table is ''%%minecraft:blocks/coal_ore%%''.
tutorial/adding_to_loot_tables.txt · Last modified: 2024/02/05 16:08 by mschae23