Unable to remove Mod related Pool
JasonMcRay opened this issue ยท 9 comments
I am trying to remove a pool from Spawn Bonus Chest that has been added by a mod, but it just does not work.
Here is my script:
import loottweaker.vanilla.LootTables;
import loottweaker.vanilla.loot.LootTable;
import loottweaker.vanilla.loot.LootPool;
val bonusChest = LootTables.getTable("minecraft:chests/spawn_bonus_chest");
bonusChest.removePool("sgcraft0");
bonusChest.removePool("sgcraft1");
bonusChest.removePool("sgcraft2");
bonusChest.removePool("sgcraft3");
When I try bonusChest.removePool("main")
it works just fine. I dumped the LootTables so I can see the name of that pool I want to remove, so that is correct as well.
Also running bonusChest.clear();
to remove whole Table only removes "vanilla" based pools (those named "main" and "pool")
Please clarify "does not work". There are a million different things that could mean.
Log: https://gist.github.com/JasonMcRay/832d46134db29b0f968e7d4982269f25
I am trying to remove a pool from Spawn Bonus Chest that has been added by a mod, but it just does not work. => How else you want me to describe this. I told you what am I trying to do. And I told you that it does not work. The "sgcraft" pools are not getting removed from game. If I try to remove "main" or "poolX" in the same way, it removes those pools from game and the items are not getting generated in the Spawn Bonus Chest.
Nor any other mod pools if I try to use bonusChest.clear();
which should remove ALL pools from said Loot Table, but it removes only "main" and "poolX". So If mod adds some custom pool with its own name, it does not remove it.
I wanted anything more specific, such as "the pools do not get removed"
Anyway, I've been doing some testing and it looks like the problem may be on SGCraft's side. I've reproduced the issue with SGCraft. I tried removing pools added by EnderIO and Botania, which succeeded. I still need to find a suitable mod for doing one last test though.
I can say that forestry seems to have same problem
Can you please provide a copy of the script that produced that problem? I was able to successfully remove the "forestry_apiculture_bees" pool from the dungeon loot table.
Right, I did the last test using Tinker's Construct. The loot pool was removed just fine. Looks like this issue is on SGCraft's side. I'll try PRing a fix if I can make one.
Can you please provide a copy of the script that produced that problem? I was able to successfully remove the "forestry_apiculture_bees" pool from the dungeon loot table.
I was using the same script as I posted above, but used bonusChest.clear();
so
import loottweaker.vanilla.LootTables;
import loottweaker.vanilla.loot.LootTable;
import loottweaker.vanilla.loot.LootPool;
val bonusChest = LootTables.getTable("minecraft:chests/spawn_bonus_chest");
bonusChest.clear();