lishid / OpenInv

Open anyone's inventory as a chest, real-time!
GNU General Public License v3.0
120 stars 97 forks source link

Allow using SilentChest to force loot generation #105

Closed ironik42 closed 5 years ago

ironik42 commented 5 years ago

I get this error every time I try to open a newly discovered and naturally generated chest. Cannot reproduce error in a vanilla world(no mods). Error occurs on latest release of Spigot [git-Spigot-01d0f04-b7fea42 (MC: 1.14.2)] and PaperMC [git-Paper-58 (MC: 1.14.2)]. The error is on screen only - nothing shows up in the log file. Adding a screenshot to show. *edit: removing the OpenInv.jar file fixes the issue but I would prefer to not have to delete it :) . 2019-05-31_23 57 01

RoboMWM commented 5 years ago

Well that makes sense. The loot generates when a player opens it. When "opening" silently you're bypassing this mechanism. Just exit silentchest mode if you wish for the chest to generate loot.

Jikoo commented 5 years ago

As Robo said, stop using SilentContainer to generate loot.

ironik42 commented 5 years ago

This never happened before 1.14.x. I used silenchest all through 1.12 and 1.13 and never had an issue using silentchest on unlooted chests. Your fix is more of a band-aid than a solution.

Jikoo commented 5 years ago

What? There's no config change to make. Turn off SilentContainer for yourself in game via command. This has been a thing since we swapped to using spectate after the issues due to tile entity changes between Spigot and Paper.

Jikoo commented 5 years ago

It's possible to force loot generation, so I'll add this as a feature, but it's definitely not the intended usage of OpenInv. SilentContainer is for checking up on existing stuff in conjunction with vanish plugins and the like, not for having constantly enabled while exploring.

RoboMWM commented 5 years ago

If anything I prefer it to not generate loot, so I assume this would come as another config option.

Jikoo commented 5 years ago

I agree, honestly. I think a better approach to this "problem" is to take a leaf out of GP's book in encouraging responsible admin behavior and not have SilentContainer/AnyContainer persist across logins.

Jikoo commented 5 years ago

After some thought, leaving silentcontainer on constantly is not the intended purpose of the plugin, and I will not be adding loot generation. I have included a more clear error message in 3faf41ef. I will eventually likely make silentcontainer status not persist across sessions to encourage responsible admin behavior.