#How do you modify the fishing loot table in 1.21. Any help is appreciated.

11 messages · Page 1 of 1 (latest)

neat solstice
#

I have searched the entire web and delve into many githubs to see anyone modifying the fishing loot table in 1.21 if anyone could help I would greatly appreciate it so I can add more fish in my mod.

neat solstice
#
            if (LootTables.FISHING_FISH_GAMEPLAY == key && source. isBuiltin()) {
                LootPool. Builder pool = LootPool. builder()
                        .with(ItemEntry. builder(Items. DIAMOND));
                tableBuilder. pool(pool);     } });

#

this almost works

#

But its giving a diamond everytime I fish

#

Not adding to the loot table but adding with the already given loot

neat solstice
#
            if(LootTables.FISHING_FISH_GAMEPLAY.equals(key)) {



                LootPool.Builder pool = LootPool.builder()
                        .with(ItemEntry. builder(DOUBLOON)).with(ItemEntry. builder(AQUAMARINE));
                return LootTable.builder().pool(pool).build();
            }

            return null;
        });```
#

Interesting this will replace the fish only part which isnt too bad, you could then go in and add all the tradtional fish back into the game

#

however If anyone could help with adding weights or a cleaner way to add more items that would be so helpful

#

But this is a working way to replace the pool

#

This is a very amatuer way to do this but I'm hoping if anyone who knows what theyre doing more so than I do this will provide useful information because the documentation has not been changed for loot tables yet (It still takes 5 arguements instead of 3)

neat solstice
#
LootPool.Builder pool = LootPool.builder()
                        .with(ItemEntry. builder(DOUBLOON).weight(10))
                        .with(ItemEntry. builder(AQUAMARINE).weight(90));
                return LootTable.builder().pool(pool).build();