Lootr (Fabric)

Lootr (Fabric)

12M Downloads

Question about the config file

dylanparry opened this issue ยท 3 comments

commented

Hi,

First off, I love this mod and how it finally enables me to explore without the knowledge that my wife has already looted everything without 5000 maps of world spawn before I even start playing on a new server ๐Ÿ˜‚ Thanks for creating it!

I'm playing Minecraft 1.21.1 on version 1.16.10 of Fabric, and am currently using version 1.10.34.88 of this mod.

I'm having a little trouble understanding the config file, specifically this section:

"breaking": {
    "disable_break": false, <-- this
    "enable_break": false, <-- and this
    "enable_fake_player_break": false,
    "power_comparators": true,
    "blast_resistant": false,
    "blast_immune": false,
    "trapped_custom": false,
    "should_drop_player_loot": false
  },

I've highlighted the two lines that I'm confused by as they appear to contradict each other. I don't think I changed this from the default settings, but it's possible that I did, however I'm not getting any warning when attempting to break a Lootr container and don't have to crouch to do so.

First question: what's do each of those two settings actually do? Second question: what should I set in my config so that players can't destroy Lootr chests without crouching and will get a warning telling them that's the case?

Thanks for your help ๐Ÿ‘

commented

Yes, these are contradictory settings. Unfortunately, Cloth Config doesn't allow you to add comments to the configuration files, unlike NeoForge.

There is actually a slight oversight on my part as to how these are implemented.

Generally speaking ,enable_break overrides disable_break and causes Lootr to ignore the value of disable_break (except on Fabric, where if both are true, you can theoretically break any block without encountering the warning message, but you won't be able to begin breaking blocks).

By default, once you "break" a block, you are given a warning message telling you that you shouldn't break blocks, but giving you the option to sneak to do so.

With disable_break, you shouldn't be able to begin breaking blocks at all.

With enable_break (which should override everything else), you can break blocks without being prompted.

The exception to this is enable_fake_player_break, which, in the cases of a "fake player" (such as a quarry, a remote miner, a turtle, computercraft, etc), will allow those players to break blocks regardless of the other settings.

That answers question 1 and hopefully question 2! As to your actual issue, it's also possible that there's a bug in the mod or an error in your configuration. If you can confirm that both values are set to false (on your server), I can dig into it deeper, but in my testing environment I'm always presented with the confirmation message when not sneaking.

One thing to be aware of (at least for NeoForge, I'm not sure how it is for Fabric) is that some implementations of Bukkit/Spigot/Paper/Sponge fire the normal block events which are used by this mod, then simply ignore the results and continue as normal. If you have any plug-ins frameworks installed, this may be the issue.

commented

Thanks for the explanation! I've managed to figure out what was happening, and it's working as expected now. I think my config was a little wonky ๐Ÿ˜ฌ

commented

Awesome, glad you've got it working!