Giter Club home page Giter Club logo

Comments (21)

bergerkiller avatar bergerkiller commented on June 24, 2024 1

I found the problem. Thanks for testing btw!

Its doing RegionHandler.INSTANCE.getMinHeight(world), which is calling it on the selector not the actual implementation. There is no getMiNheight and geTMaxHeight impl in the selector, so they stay the default 0.

from traincarts.

bergerkiller avatar bergerkiller commented on June 24, 2024

Im wondering, can you place rails below y=-65? Do minecarts continue driving down the rails beyond this point or do they derail / error ?

from traincarts.

Boy0000 avatar Boy0000 commented on June 24, 2024

Rails can be placed below
Minecart is killed ones it enters -65

Jdk21.0.2_13.2024.03.02.-.12.37.19.05.mp4

from traincarts.

bergerkiller avatar bergerkiller commented on June 24, 2024

Weird, this killing logic is set to be < worldBorderKillDistance (config.yml) which is set to 64 by default. This happens when the minecart is 64 blocks outside the world border (or height limits). This would mean it thinks the height limit is at y=0.

If you edit config.yml worldBorderKillDistance and set it to something high like 1000, does the minecart still get killed?

from traincarts.

Boy0000 avatar Boy0000 commented on June 24, 2024

Changing this setting does indeed fix both issues of placing minecarts and riding them πŸ‘

from traincarts.

bergerkiller avatar bergerkiller commented on June 24, 2024

Id call it more a workaround than a fix, but good to know. That means this function is wrong.

https://github.com/bergerhealer/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/internal/logic/RegionHandler_Vanilla_1_17.java#L14

https://github.com/bergerhealer/BKCommonLib/blob/master/src/main/templates/com/bergerkiller/templates/org/bukkit/world.txt#L20

Which is just a Bukkit method (World getMinHeight()). It might be a bug in the server itself?

from traincarts.

bergerkiller avatar bergerkiller commented on June 24, 2024

Can you share this datapack? Maybe its a configuration in the pack that is wrong, causing bukkit to misreport the minimum build height

from traincarts.

Boy0000 avatar Boy0000 commented on June 24, 2024

Shared in the original post
From debugging the function that tracks this and kills it
Im wondering if the logic for the worldborder stuff is wrong
Bukkit should report it correctly as it seems to work in some of our own plugins, but ill ensure that it does

y: -62.895493668068866 | distSqr: 3955.843123750091
y: -63.04736968706467 | distSqr: 3974.9708244574012
y: -63.20660257800347 | distSqr: 3995.074609453675
y: -63.37317027026947 | distSqr: 4016.158710104566
y: -63.54705075945867 | distSqr: 4038.227660225217
y: -63.7282221071803 | distSqr: 4061.286292942104
y: -63.91666244085877 | distSqr: 4085.3397375786863
y: -64.11234995353621 | distSqr: 4110.393416564694
y: -64.3152629036756 | distSqr: 4136.453042368911
y: -64.52537961496458 | distSqr: 4163.524614455287
y: -64.74267847611969 | distSqr: 4191.614416262212
y: -64.96713794069137 | distSqr: 4220.729012204821
y: -65.19873652686931 | distSqr: 4250.8752447001225
y: -65.43745281728872 | distSqr: 4282.060231214887
y: -65.68326545883684 | distSqr: 4314.291361336029
y: -65.93615316246033 | distSqr: 4347.576293863427
y: -66.19609470297297 | distSqr: 4381.922953924966
y: -66.46306891886405 | distSqr: 4417.3395301136725
y: -66.73705471210747 | distSqr: 4453.8344716468255
y: -67.01803104797116 | distSqr: 4491.416485546827

from traincarts.

bergerkiller avatar bergerkiller commented on June 24, 2024

You can also try restarting the server, as it does cache the world border information. Idk if you did?

from traincarts.

Boy0000 avatar Boy0000 commented on June 24, 2024

worldHeightRange: -256..256
Worldheight is returned correctly from entity.getWorld().getMin/maxHeight() for the minecart

from traincarts.

Boy0000 avatar Boy0000 commented on June 24, 2024

You can also try restarting the server, as it does cache the world border information. Idk if you did?

Restarting returns the same result. Been an issue for a few weeks

from traincarts.

bergerkiller avatar bergerkiller commented on June 24, 2024

worldHeightRange: -256..256 Worldheight is returned correctly from entity.getWorld().getMin/maxHeight() for the minecart

Can you also print WorldUtil.getBlockBorder(world)? When printing it shows the min/max bounds of the total space, where the y coordinate is interesting.

Im thinking maybe the min y changes after the world initializes, but that a cached version remains in memory.

from traincarts.

Boy0000 avatar Boy0000 commented on June 24, 2024

{min={-29999984, 0, -29999984}, max={29999985, 256, 29999985}}

from traincarts.

Boy0000 avatar Boy0000 commented on June 24, 2024

so worldBorderKillDistance: 64 works purely because it happens to just cover this, which returns old pre 1.18 worldheight change to -64

from traincarts.

bergerkiller avatar bergerkiller commented on June 24, 2024

Just in case, do you see any errors at startup? This could be explained by the region handler failing to initialize, as y=0 is a default. It might help to print the value of RegionHandler.INSTANCE to know what implementation its using, which should be vanilla_1_17

from traincarts.

Boy0000 avatar Boy0000 commented on June 24, 2024

https://mclo.gs/ITCmpHn log seems to not contain any errors no
RegionHandler.INSTANCE.getMinWorldHeight returns 0

from traincarts.

bergerkiller avatar bergerkiller commented on June 24, 2024

And the instance type?

from traincarts.

Boy0000 avatar Boy0000 commented on June 24, 2024

new RegionHandlerSelector().getHandler(getWorld()); returns com.bergerkiller.bukkit.common.internal.logic.RegionHandler_Vanilla_1_17@7f960c3f

from traincarts.

Boy0000 avatar Boy0000 commented on June 24, 2024

new RegionHandlerSelector().getHandler(getWorld()).getMinHeight(getWorld());
returns -256

so im guessing it caches the worldborder before it makes RegionInstance use 1.17 impl? thus no override applied

from traincarts.

bergerkiller avatar bergerkiller commented on June 24, 2024

https://ci.mg-dev.eu/job/BKCommonLib/1680/ that should do it

from traincarts.

Boy0000 avatar Boy0000 commented on June 24, 2024

can confirm it is fixed. thanks for the help πŸ‘

from traincarts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.