Lootr (Forge & NeoForge)

Lootr (Forge & NeoForge)

59M Downloads

Locked Chests no longer locked

WenXin20 opened this issue ยท 5 comments

commented
Minecraft v1.20.1
Lootr v0.7.34.85

Loot chests that are locked using vanilla Minecraft's locked chest feature is not saved when Lootr replaces the chest, meaning the chest does not need a key to open it. This is a feature that I am using for the structure in my Warp Pipes mod.

https://minecraft.wiki/w/Chest#Block_data

commented

Looking into this, it appears that two areas are lacking:

  • The lock code, as you said, is not copied over when the chest is replaced.
  • Additionally, the menu creation that would normally check the lock happens in a completely different location that Lootr currently bypasses.

I'm not sure where best to re-inject the lock check, I'll keep digging through the code.

commented

Sounds good, thanks!

commented

I've pushed a build to CurseForge which should support this functionality now.

commented

I've got some code that does fix this, but I'm not 100% happy about where it is... unfortunately, putting it anywhere else requires a bit of hardcoding and adjusting of my standard interface for Lootr block entities. I'll play around with it some more and get back to you.

commented

Thanks!