Litematica (Forge)

Litematica (Forge)

336k Downloads

Easy Place arbitrarily restricts placement of blocks

OscarVanL opened this issue ยท 5 comments

commented

This bug is seen randomly when using Easy Place. Blocks that should be able to be placed are restricted, then after some time passes these same blocks can be placed again. The issue usually happens to a group of blocks in close proximity.

ezgif-1-1ca2c48c7e16

In the GIF shown above, a repeating pattern of blocks is shown. Most are placed with Easy Place successfully, but arbitrarily groups of blocks in close proximity cannot be placed as Easy Pace restricts the placement.
Approx 5 minutes after recording that GIF the blocks could be placed.

I do not believe this to be a duplicate of #49 as the issue occurs even when there are blocks to 'click against'.

To Reproduce

  1. Load a schematic
  2. Enable Easy Place and start building the schematic
  3. Easy Place will arbitrarily restrict block placement

Additional context
Minecraft Version: 1.15.2
Fabric Loader Version: fabric-loader-0.8.4+build.198-1.15.2
Fabric API: fabric-api-0.10.8+build.310-1.15.jar
malilib version: malilib-fabric-1.15.2-0.10.0-dev.21+arne.2.jar
litematica: litematica-fabric-1.15.2-0.0.0-dev.20200515.184506.jar
Other mods: fabricmod_VoxelMap-1.9.18b_for_1.15.2.jar, LightOverlay-4.6.1.jar, preview_OptiFine_1.15.2_HD_U_G1_pre18.jar, optifabric-1.0.0-beta8.jar, worldedit-fabric-mc1.15.2-7.1.0.jar

Server details
Survival, running Tuinity (a fork of Paper)
Plugins of interest: AAC (Advanced Anti Cheat).
Note: I do not believe AAC to be the cause of the problem because I am a moderator on the server, so get chat messages when cheat violations are detected, including those caused by my own player.

Note: This bug has also occurred on older versions of litematica, it is not exclusive to this version.

commented

had that problem too so to fix it you need to go in youre configuration menu,generic,search easyplaceswapinterval and set it to 0
hope this will help ppl

commented

It is already set to 0 for me but still the same issue, any more tipps?

commented

I'm not sure why the first place attempt failed in this case, but the easy place code purposefully has a cooldown time limit of a couple of seconds for each position that it thinks a block was placed in. So if you just keep spam clicking after a failed placement, that cooldown will just get refreshed and you will never be able to place the block like that.

This cooldown exists because of the server -> client sync delays, to try to prevent a case where the block was placed on the server side but not on the client, and then the block would try to be placed again in the same position, which would cause it to then get placed against and thus adjacent to the target position. Granted this wouldn't matter for aesthetic builds, but it can be extremely important for certain redstone builds to prevent accidentally triggering something. Maybe I should make that cooldown a config option...

The Easy Place code was also entirely rewritten recently in the main development version in 1.12.2, it's possible that the cooldown also triggered when it shouldn't have before, I can't remember for sure.

commented

Thanks for the reply.

It's good to know more about how easy place works.

I'll wait for the update with the new easy place code and let you know if it makes and difference.

What's peculiar about this bug is that it seems to be region based. Rather than placing X blocks and then after that more blocks can't be placed, it solely affects a small region (maybe contained within a single chunk. Next time I will turn on chunk borders and see if it stops at the next chunk).

So in the GIF, I could place some logs at the beginning of the gif, then couldn't place a few in a row, and then could place logs again further along.

The ability to place these blocks again after being restricted is purely related to time elapsing. Even if I disconnect and reconnect to the server I still can't place them immediately. But waiting 10 minutes usually means I can then place them.

commented

That sounds very weird. The timeout in the easy place code itself should only be two seconds per position from the last click, I think.

In the past I've heard that the Easy Place mode wouldn't work at all on Spigot and possibly Paper, because they wouldn't allow clicking on air blocks, and the Easy Place mode clicks on the target air block, not actually on the adjacent block like you would in vanilla. This might be a configurable cheat prevention either in Spigot/Paper itself or in one of the common anti-cheat plugins, I have no idea where exactly it is. The rewritten version in 1.12.2 also has a new option to only click on adjacent blocks, to try to fix this issue on some of the above mentioned servers/cases.