FastAsyncWorldEdit

FastAsyncWorldEdit

152k Downloads

Region Restrictions incorrectly protect regions

SimplyMerlin opened this issue ยท 0 comments

commented

Server Implementation

Paper

Server Version

1.21

Describe the bug

When creating a region restriction, if the y axis of your starting coordinate is 64, 32, 16, or 0, it makes your region bigger than intended. For example, if your region starts at y=64, users will be able to place blocks up to y=48. while i haven't completely tested this, it seemingly only happens when the y axis of the chunk coordinate is 0.

When using /wer to select the region you have access to, it doesn't select outside the intended region. But if you manually select outside of your region, it will let you place outside the intended area.

To Reproduce

  1. Create a FaweMask. Make sure it starts at the yAxis of 64. In my case, I'm using this simple code.
class MaskManager(plugin: Sandbox) : FaweMaskManager(plugin.name) {

    val yAxis = 64

    override fun getMask(player: Player?, type: MaskType?, isWhitelist: Boolean): FaweMask {
        val region = CuboidRegion(
            BlockVector3.at(20, yAxis, 20),
            BlockVector3.at(30, 100, 30)
        )
        return FaweMask(region)
    }

}
class Sandbox : JavaPlugin() {

    override fun onEnable() {
        FaweAPI.addMaskManager(MaskManager(this))
    }

}
  1. give yourself the permissions fawe.permpack.basic and fawe.[plugin name]
  2. run /wer to select your region.
  3. do //set stone and watch worldedit placing a cube with coordinates (20, 64, 20) (30, 100, 30)
  4. now run //expand vert and //set diamond_block and observe worledit placing a cube with coordinates (20, 48, 20) (30, 100, 30)
  5. you have now placed blocks outside of the intended region
  6. (optional) try the same thing while setting the yAxis variable to 65 or 63. the behavior i described will not happen and the region will be correct

Expected behaviour

I would expect my region to be 1:1 to what i coded!

Screenshots / Videos

I've sent a video in the IntellectualSites discord.
https://discord.com/channels/268444645527126017/344128526435221505/1277358741431390322

Error log (if applicable)

No response

Fawe Debugpaste

https://athion.net/ISPaster/paste/view/32d2c89b00ed4e24af46a83e80177658

Fawe Version

2.11.2-SNAPSHOT-886;3b4e849

Checklist

Anything else?

No response