Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improper pasting of schematics (Problems Centering) #766

Closed
yzz17 opened this issue Nov 15, 2023 · 9 comments
Closed

Improper pasting of schematics (Problems Centering) #766

yzz17 opened this issue Nov 15, 2023 · 9 comments
Assignees
Labels
bug Something isn't working unconfirmed An issue that needs further investigation

Comments

@yzz17
Copy link

yzz17 commented Nov 15, 2023

Describe the bug

the schematics are created with extra offset to the north and west, instead the
south and east is the reverse, I attach photos, I already tried to modify the size
of the parcel to an even and odd number it happens the same, as a comment:
I think the nature of the world border is "a even number" by default in mojang,
But I also think it's possible to adjust it

To Reproduce
Steps to reproduce the behavior:

1.Create islands of X size In this example use 101 and 100
2.Create land of the same theoretical size as the parcel
3.Wasting more than two hours trying to center the land hehe.

Expected behavior

properly centered at the time of creating a parcel

Server and Plugin Version
purpur 2091
plugin: Version 4.0.8

Screenshots
1
2

Logs

Well I'm experiencing this, but I'm not sure if it's related, it's been happening since I install the plugin, i thing is that it came out when I changed the name of the world, even though I'm not sure about this

https://mclo.gs/wgRHkOc

Additional context

Thank you for creating this plugin ! , reporting I hope to help improve it, cheers !, (It was because a server user told me that the center of an island was wrong, that's why I did this with debug reasons)

@yzz17 yzz17 added bug Something isn't working unconfirmed An issue that needs further investigation labels Nov 15, 2023
@PeachesMLG
Copy link
Member

Just to confirm, have you added any air blocks in your schematic? when you created the schematic, did you set the positions to be the exact size?

@yzz17
Copy link
Author

yzz17 commented Nov 16, 2023

Just to confirm, have you added any air blocks in your schematic? when you created the schematic, did you set the positions to be the exact size?

It has air, yes, but not on the sides, just on the top , I tried everything, to make it exact, I even made a schematic on the space already generated, I even tried removing and adding blocks on some sides, I put a color for each one so it guided me, thinking that it changed the rotation etc, I checked with the count command if it really had a box etc, if I am afraid that for some reason it moves

@yzz17
Copy link
Author

yzz17 commented Nov 16, 2023

It doesn't hurt, I think the plugin has an option so that it doesn't leave air when pasting, something like //paste -a, I'm going to try and check again

@yzz17
Copy link
Author

yzz17 commented Nov 16, 2023

Well, before I move anything to the settings, I'm going to try this:

I'll create an airless one, a cube, over the space that's generated
a

b

Now I'm going to stand in the exact center marked with glass

c

Let's upload the schematic...

restart server, delete.. create a new island

d
e

same result, I'll try that option now

f

changed it to false... I was already in True :/, restart server ,delete.. create a new island

x1
x2

Everything seems, at least on my server, to be unrelated to air blocks

@yzz17
Copy link
Author

yzz17 commented Nov 16, 2023

interesting......... in empty space does the biome change ? Does it mean it's a World Border problem?

@yzz17
Copy link
Author

yzz17 commented Nov 20, 2023

I see you're adjusting the placement before pasting the schematic: iridiumskyblock/schematics/worldedit.class:

int width = clipboard.getDimensions().getBlockX();
int height = clipboard.getDimensions().getBlockY();
int length = clipboard.getDimensions().getBlockZ();
location.subtract(width / 2.0D, height / 2.0D, length / 2.0D);

This seems to be meant to paste the schematic into the center of the given location. However, if the dimensions of your schematic are odd, this could cause an offset because you're dividing by 2.0D (a decimal number), which could result in a location with fractional coordinates???

You could try rounding these coordinates to the nearest whole number before pasting the schematic. This can be done using Math.round() in Java. myb:

location.subtract(Math.round(width / 2.0D), Math.round(height / 2.0D), Math.round(length / 2.0D));

If the dimensions of the schematics are odd, it could cause them to shift off center. This is because you're dividing the dimensions by 2 to get the center, which can result in a decimal (fractional) number if the dimensions are odd ???

When you try to paste the schematic into a location with fractional coordinates, Minecraft will round these coordinates to the nearest block, which could cause the offset you're observing??

On the other hand, if they are even numbers, could it explain the behavior ?

@yzz17
Copy link
Author

yzz17 commented Mar 27, 2024

bump

@sh0inx
Copy link
Contributor

sh0inx commented Mar 27, 2024

dont

@sh0inx
Copy link
Contributor

sh0inx commented May 10, 2024

The reason that your schematic is "off-centered" is likely a result of your current island size being set as an even number - the default for the first size level is 50 blocks, which would render the center of the schematic a 2x2 square instead of a singular block, and this is why it appears off-centered. Change it to an odd number.

@sh0inx sh0inx closed this as completed May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed An issue that needs further investigation
Projects
None yet
Development

No branches or pull requests

5 participants