LootTweaker

LootTweaker

17M Downloads

Adding 'empty' entry?

thorjelly opened this issue ยท 1 comments

commented

Maybe I am dense, but I cannot figure an obvious way to do something like this:

http://www.minecraftforum.net/forums/minecraft-java-edition/redstone-discussion-and/commands-command-blocks-and/2546347-1-12-custom-loot-tables#entryempty

Adding an 'empty' entry into a loot table with its own weight. For example, something like:

val vBlacksmith = LootTables.getTable("minecraft:chests/village_blacksmith");
val vBlacksmithPool = vBlacksmith.addPool("nicestuff", 10, 10, 1, 1);
vBlacksmithPool.addItemEntry(<toughasnails:lifeblood_crystal>, 1);
vBlacksmithPool.addItemEntry(<empty>, 2);

You can do something similar with conditions such as:

vBlacksmithPool.addItemEntryHelper(<toughasnails:lifeblood_crystal>, 1, 1, [], [Conditions.randomChance(0.33)]);

But I dislike the solution especially with long tables.

I assume I could add something like this:

vBlacksmithPool.addItemEntryHelper(<minecraft:apple>, 2, 1, [], [Conditions.randomChance(0.0)]);

As an entry that will always effectively be 'empty' but that doesn't seem like it should be a good or obvious solution..

Or am I just horribly missing something? If so, maybe this could be added to the documentation to make it more obvious? Unless it is and I am just blind.

commented

LootTweaker currently has no way to add empty entries. I didn't see any use for them, so I didn't implement support. Now that I can see the use, support is on the TODO list for LootTweaker.

I generally update the docs before uploading a new build or shortly after. If something isn't detailed somewhere in the docs, it highly likely it doesn't exist.