maruohon / litematica

A modern client-side schematic mod for Minecraft
GNU Lesser General Public License v3.0
730 stars 220 forks source link

EasyPlace issues #774

Open end-user opened 1 year ago

end-user commented 1 year ago

Lately I've been having trouble with EasyPlace not placing blocks when it should or rejecting attempts when it's not applicable. (currently MC 1.21.1; litematica 0.15.3; malilib 0.16.3)

In the case of full blocks, it works as expected: farthest first, blocks get placed. However, in some instances (for example stairs) the placement is rejected. Here's a brief video demonstrating the issue - note that the item is removed from inventory on the client side, but still exist if the slot is selected again. In other cases, the placement of blocks is rejected despite not targeting a schematic block (in this case placing scaffold on already placed blocks). Worse, this behavior extends to rejecting "using" blocks even when outside the schematic.

maruohon commented 1 year ago

Are you on a server, and what type of server? I assume it's at least not running Fabric and CarpetExtra with the accurateBlockPlacement rule enabled? What is your easyPlaceProtocolVersion config set to?

On servers without accurateBlockPlacement support, you can only use None or Slabs Only and Auto should choose Slabs Only as long as it doesn't see Carpet mod on the server. Note however that the mod can't detect CarpetExtra specifically, so a server with FabricCarpet installed, but no CarpetExtra installed, or the accurateBlockPlacement rule disabled, would incorrectly choose to use protocol Version 2, as it assumes CarpetExtra is then probably also installed. And in cases where you use either Version 2 or Version 3 on a server that doesn't support it, will end up placing just client side ghost blocks. This is because the "accurate placement protocol" modifies the item use packet in a way that is now rejected by the vanilla server since MC 1.18.2, resulting in client side ghost blocks and an inventory desync (until updated by picking up the stack or opening the inventory or some other non-player inventory).

Also the Easy Place mode currently always clicks on the target position's air block, even when next to existing blocks. So if the server prevents clicking on air blocks (like many Spigot/Paper servers do), then that would prevent the Easy Place mode from placing any blocks. (The newer Easy Place implementation in 1.12.2 has an option to only click on existing adjacent blocks.)

As for the "action prevented" outside the schematic areas... that's just due to poor Easy Place code in the original implementation (that is still used in the 1.13+ mod versions). Actually I don't even remember if the newer implementation in 1.12.2 currently handles that better either... but it should be fixed as it's not intended to work like that.

end-user commented 1 year ago

Ok, the server has Carpet but not CarpetExtra. So, since my protocol is auto, it's attempting version 2 based on the assumption of the supported protocol, correct? I think it says the placementRotationFix from Carpet is applied, but I guess it would be missing accurateBlockPlacement from CarpetExtra. I'll go try with the slabs only setting and report findings.

end-user commented 1 year ago

Ok, yes, the slabs only restores expected behavior because the server is running Carpet without CarpetExtra.

So, I guess just waiting for improvements so I can open containers with EasyPlace on.

lonelycloud3 commented 11 months ago

Also the Easy Place mode currently always clicks on the target position's air block, even when next to existing blocks. So if the server prevents clicking on air blocks (like many Spigot/Paper servers do), then that would prevent the Easy Place mode from placing any blocks. (The newer Easy Place implementation in 1.12.2 has an option to only click on existing adjacent blocks.)

@maruohon Is it possible to add same feature to fabric 1.20? Easy Place saves a lot of time but unfortunately doesn't work on some servers because they prevent from placing blocks on air.