maruohon / litematica

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

When using easyPlaceMode and it has to switch between items it frequently thinks there's no item to place, while there still is an item in the inventory #113

Open viktor40 opened 4 years ago

viktor40 commented 4 years ago

I'm using litematica 1.15.1

I've been building a schematic which consist of about 25 different blocks. the blocks very frequently change, it's mostly a different block every block (i.e. not 2 of the same blocks next to each other).

When i'm building the schematic by running along the schematic just letting easy place, place blocks for me it very frequently says that the action isn't allowed by easy place (i.e. i don't have the block in my inventory).

When i log out and back in i can place a block again. What actually happens when you look in the inventory is that the block actually isn't there, but after logging out and back in the block is once again in the inventory. It didn't disappear, it just has the texture and name of another block in my inventory.

This doesn't happen when i'm not changing blocks very rapidly.

maruohon commented 4 years ago

This seems to happen quite often when the held item is switched very quickly after or possibly also right before using it. I have made some changes and improvements to the pick block behavior in the newer development code, but I need to check if those also currently apply to the Easy Place mode.

Does it currently switch hotbar slots at all in the Easy Place mode? I don't think it does? Cycling through multiple slots like it does with the regular pick block might help so that the held item doesn't need to be changed every time. But even so with many different blocks to build with I don't think there is an easy way to "predict and pre-load" items to the hotbar to avoid the quick switch + place action, which somehow messes up the vanilla inventory syncing.