Lootr (Forge & NeoForge)

Lootr (Forge & NeoForge)

59M Downloads

[suggestion] Turn human placed normal chest in a specific area into loot chest

JiuyeAyan opened this issue ยท 5 comments

commented

Because I've alread built a map, with tons of buildings, and I've placed hundres or thousands of chest without loottable, then I add some new mods in my modpack, so I want to change all the chests I've placed before, then I found it's so tiring, and i'm so stupid for not using loottable.
I know that there is a command in minecraft that can turn chests in a specific area into loot chests :
/fill x1 y1 z1 x2 y2 z2 minecraft:chest{LootTable:"namespace:chests/your_loot_table"} replace minecraft:chest
but there is a limitation, It can't scan more than 32,768 blocks, and some bugs was attaching to this command: some of the chests were not correctly filled, they turned into emply and without loottable, it is still tiring.

I've no idea how to do it, is there any possibility for ur mod to turn unlimited area's normal, human placed chests into loot chests?

commented

I could potentially implement a command to do this that works like the /fill command within a specific range, but it would likely run into the same issues that Minecraft has with its limitations on block scanning. That might be by-passable by iterating over the block entities separately in the chunk and then determining their positions instead of checking every block, however.

I'll look into it.

commented

thanks! you're my hero!

commented

I've implemented this for the next release for 1.21. I can look at back-porting it to older versions if you aren't on 1.21, but that might take some time.

commented

The /lootr convert <startx> <starty> <startz> <stopx> <stopy> <stopz> command should now do what you're hoping in 1.21.

commented

Thanks for your efforts! you're so kind!
But now i'm playing on 1.20.1, forge client,
I can wait you whenever it takes!