EngineHub / WorldGuard

🛡️ Protect your Minecraft server and lets players claim areas
https://enginehub.org/worldguard/
Other
812 stars 528 forks source link

Put enchantment tables under same flag as other utility blocks. #1599

Open phemmer opened 4 years ago

phemmer commented 4 years ago

This issue seems like a cross between a bug and a feature request.

Is your feature request related to a problem? Please describe. Currently the "chest-access" region flag grants access to all the utility blocks (brewing stand, cartography table, stone cutter, loom, smithing table, furnace, & blast furnace) with the exception of the enchanting table.
Because this single block seems to be the exception, this feels like a bug, or accidental oversight when the list of blocks was defined for the "chest-access" flag. Anvils are also excluded from the list, but those make sense, as usage results in damage to the anvil. Enchantment tables have no such side effect, and seem similar to all the other utility blocks.

Currently access to the enchantment table is controlled via the "use" flag. This flag however also includes access to other things like doors.

Describe the solution you'd like Include enchantment tables in the same access flag as all the other utility blocks, "chest-access", and which does not include doors, buttons, etc.

Describe alternatives you've considered The alternative is to create separate region around the individual block so that other items (doors) are unaffected. However as there is a limited number of regions per player, this results in wasting some of those regions.

wizjany commented 4 years ago

pretty sure the cutoff here is "does the block have an inventory". i'm not terribly familiar with newer MC features but i don't think this is wrong?

phemmer commented 4 years ago

Yeah, enchantment table has as much of an inventory as the other mentioned utility blocks do. It's not a normal inventory like a chest, but it works just the same as the others utlity blocks which are in the list.

(so maybe the others shouldn't be under "chest-access", which would be disheartening, and not what I'm after, but at least it'd be consistent)

Joo200 commented 4 years ago

The enchantment table has a slot for lapis lazuli. That's the only inventory slot it has. Slots for the item are cleared every time the inventory is closed. It's not possible that the inventory is accessed by two or more people at the same time.

The cartography table, the stonecutter, the loom and the smithing table doesn't have a persistent inventory. Every time the inventory is closed the contents will be pasted back into the inventory of the player.

I don't chest-access should be applied on enchantment tables. enchantment tables are not there to store items, they enchant items. Like the other mentioned work stations. I would suggest to remove the chest-access flag for all those blocks and shift it to the "use" flag

wizjany commented 4 years ago

brewing tables and furnaces (both types) most certainly have concrete inventories (i.e. you can put an item in, close the screen, and someone else can take the item out). i'd have to double-check the other new 1.14 stuff tho. again not super up to date with MC mechanics these days.

edit: also would like to note that anvils are kinda weird cuz using them can break them. there's also lots of issues with rearranging this stuff because it can leave previously protected setups unprotected. :<