BG-Software-LLC / WildLoaders

Very optimized and highly configureable chunk-loaders plugin!
https://bg-software.com/wildloaders/
GNU General Public License v3.0
29 stars 17 forks source link

Chunk-already-loaded check fails if chunks-spread is set to true without a valid claim #36

Closed wigster101 closed 2 years ago

wigster101 commented 2 years ago

Minecraft's Version

Minecraft Version 1.18.1 Java Paper version 152

Plugin's Version

1.0.3-b34

Describe the bug

Usually if a chunk is already being loaded by another chunkloading block, it will deny any place attempts. However, if chunks-spread is set to true but there is no claim present, this check does not occur and multiple chunk loading blocks can be placed within the same chunk. Chunk loaders without chunk-spread in the config will still correctly block placement of newly placed chunk loaders with chunk-spread=true, but existing loaders with chunk-spread=true will not stop placement chunk loaders

To Reproduce

  1. Set chunk-spread to true for a chunk loading block config
  2. Enter World and place the chunk loader down in location outside of claim region
  3. Subsequent Chunk loaders can be placed within the same chunk loading radius (unexpected behaviour)
  4. Place down a second seperate chunk loader block without chunk-spread in the same chunk loading radius
  5. No more chunk loaders can be placed in already-loaded chunks & message is sent to chat(expected behavious)

Additional Information

Capture3 This image shows multiple chunk loaders within the same chunk. The block type was changed to gold for radius 0 & chunk-spread=true, emerald for radius 2 & chunk-spread=false. As soon as the emerald one was placed, no more could be placed within the chunk.

wigster101 commented 2 years ago

I updated to version release 1.0.4 and the behavior is still present, release 1.0.4b37 also still has this bug. I am unsure if you are aware of this, so apologies if this is unnecessary information. I looked into the database, the glitched loaders from 1.0.3 were still present in the database (the ones in the screenshot), but the ones from 1.0.4 get correctly removed/do not get added.

One other aspect to this bug, unsure if it was present in 1.0.3, placing a chunk loader directly beside one with speading set to true on the -X/-Z sides & corner creates issues with removing the chunk loader. However placing a loader on any side which has at least one positive direction does not result in the second loader immediately getting removed after placement but does not create this issue with removing the spreading loader. If a second loader is placed adjacent to the first on the negative sides, breaking the chunk-spreading loader is wonky. You get the chat notification but the floating text does not get removed & no blocks can be placed in the same spot. This issue is resolved after a server restart. Otherwise, placing and breaking a chunk loader works without any issue.

  1. Set chunks-spread to true for a chunk loader without running a plugin providing this feature
  2. Place the spreading chunkloader
  3. Place a new chunk loader directly beside the already placed loader on the -X, -Z, or -X-Z side. It will get removed immediately after placement.
  4. The second chunk loader will not be placed, however breaking the first chunk loader results in the aforementioned issues (block occupied, text remains) until the server is restarted.
OmerBenGera commented 2 years ago

Sorry for the long waiting time. It should be fixed in latest dev build, let me know if it works.