maruohon / litematica

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

Schematic spawns far away from the block its supposed to spawn on #448

Open mooneless opened 2 years ago

mooneless commented 2 years ago

Provide at least the following information

Minecraft Version 1.17.1

Mod versions: litematica-fabric-1.17.1-0.0.0-dev.20210906.183617 and malilib-fabric-1.17.1-0.10.0-dev.26

The problem: As you can see on the picture, i have made a schematic of my build. But when i place it down on the block in front of me, it spawns far away in the distance. But you can see on the picture that the schematic placement is the block in front of me. So i dont understand why it spawns so far away. This happends 80% of the time i make a schematic. I dont understand why it happends, and the 20% of time it dosent happend i dont really do anything different.

Have you seen this before? know a fix to this? tried google and youtube for hours, but could never find anyone with this problem.

2021-11-19_23 31 13 2021-11-19_23 31 19

maruohon commented 2 years ago

This is because you have enabled/defined a manual origin point while making the selection. The sub-regions of the schematic and thus everything it contains will have that same relative offset from the placement origin point as they had to the defined manual origin point in the selection.

So if you don't actually need to define a manual origin, but rather you are happy using the automatic origin point (which will be the primary/red corner in Simple mode), then just disable the Manual Origin option in the Area Editor menu.

And for this reason you probably want to put the primary/red corner as the lower corner of the selection, so that your placement origin will not be in the upper corner (in the air). If you use the Expand (instead of Corners) selection mode, then the primary corner will automatically always be the minimum coordinate corner of the selection box. (In the Expand mode you right click to reset/collapse the selection box, and you left click on points to expand the selection box around all the points you click.)

maruohon commented 2 years ago

Based on these screenshots it looks like you are going to the Area Editor menu via the Area Selection Browser, which means you are editing an area that is actually not currently active, since you are in the Simple mode. I'll add this to my todo list, seems like this needs some work in the mod, either via better warning messages or something else to prevent this confusion.

If you simply click on the Area Editor button in the Litematica main menu (or use the hotkey, by default numpad multiply), then you will enter the area editor of the currently active mode/area. You should have the Manual Origin option enabled currently, like so: image

So basically just turn that off. And to that earlier mentioned "editing the wrong area" point, I'd suggest either using the mentioned hotkey to open the Area Editor menu, or using the button that is directly in the Litematica main menu. And also if you use the Simple mode, then you don't need to do anything via the Area Selection Browser. That Area Selection Browser menu is basically a file browser for choosing or creating new storage files for the multi-box capable area selections in the "Normal" area selection mode. (I should probably rename that to Multi-Box instead of Normal).

If you want to talk in Discord, you can hop on either to the SciCraft Discord: https://discord.gg/scicraft (there is a channel #masa-mods which is often used for my client mods related stuff) or to my own discord: https://discord.gg/2FgywHj

mooneless commented 2 years ago

thanks a lot, i think i understand, i got it to work now :D again thanks a lot for the help and answers. Wanted the schematic to be perfect so i can upload it for others to use.