This is where you actually make a loottable (this is an explanation for a block loottable). If you have multiple blocks with similar loottables, making a general method could be a good idea. The Method should return a LootTable.Builder. This builder can be made by using the LootPool.lootPool() method, but you still need to add attributes. You need a name for the pool, the amount you get and also "what" you get. The "what" can modified using functions or conditions (see https://minecraft.fandom.com/wiki/Loot_table for possible vanilla funtions and conditions). After having made the builder, you return LootTable.lootTable().withPool(builder). A example of a "shulkerbox-like" block, copying its name, inventory and "energy" data to the block and restoring its contents.
+
This is where you actually make a loottable (this is an explanation for a block loottable). If you have multiple blocks with similar loottables, making a general method could be a good idea. The Method should return a <code>LootTable.Builder</code>. This builder can be made by using the <code>LootPool.lootPool()</code> method, but you still need to add attributes. You need a name for the pool, the amount you get and also "what" you get. The "what" can modified using functions or conditions (see https://minecraft.fandom.com/wiki/Loot_table for possible vanilla funtions and conditions). After having made the builder, you return <code>LootTable.lootTable().withPool(builder)</code>. A example of a "shulkerbox-like" block, copying its name, inventory and "energy" data to the block and restoring its contents.