Tweakeroo

Tweakeroo

2M Downloads

pickBeforePlace tweak with litematica schema

obfuscoder opened this issue ยท 2 comments

commented

When building large projects with lots of different materials, I fill up my inventory with the material and then load up a schematic overlay with litematica in my survival world. At every block I middle-click to pick the block, then place it with right click. With trhe litematica overlay shown, it does pick up the block of the schema instead of the block the cursor is looking at. This makes building those projects really fast. However, I would like to optimize further by using the tweakeroo pickBeforePlace tweak. This tweak, does not seem to work together with the pick feature hooked into by litematica as when activating the tweak, it picks up the already placed block under the cursor instead of the one shown by the schematic overlay. I would like to have the the tweak work in combination with litematica if possible. I have no idea if litematica mod needs to be updated to make this tweak compatible with it though.

commented

There is a separate pick block hotkey in Litematica that is intended for "auto pick block". Bind the pickBlockLast key to right click (assuming you place blocks with right click like by default).

The difference between pickBlockFirst and pickBlockLast is which schematic block position it will use, if you look through multiple schematic blocks. The "first" variant is meant for "normal manual pick block" with middle click, and it will use the first block encountered (along a ray trace starting from the player's eyes). The "last" variant ray traces to the last/furthest schematic block the ray trace goes through, that is basically against an existing real block, so basically the block you will place when you right click.

Integrating the pickBeforePlace feature would need the mods to kind of know about each other. There is actually such a feature in the main development code, where there is a small additional thing in malilib that facilitates this "knowing about each other". But in there it's currently just used for Litematica's pickBlockAuto (which is currently still only in 1.12.2) to know what position to use if you use Tweakeroo's flexible placement offset mode. But with the already existing auto pick block features in Litematica, I don't see any real need to make pickBeforePlace work with schematics. Now I'm not saying I'm not going to add it... as that integration might still make sense in a more generic sense for other features. But it's not needed specifically for this tweak alone.

commented

(I just noticed that you are the author of my 3 most used mods. Your mods are awesome!)

Binding the pickBlockLast function to right click within litematica works exactly as I want it. Thanks for the answer. It would be great if you could advertise this feature a bit better in the litematica documentation, as I could not find it there and hoped to find the solution within tweakeroo. I think we can close this issue here as my main problem is basically solved. As you hinted at other options where the "knowing about sister mods" might be helpful, I leave it up to you to close it.