Folia-Inquisitors / MoreFoWorld

A (temporary) world manager for Folia
MIT License
10 stars 4 forks source link

Fix Link Portal #2

Closed Euphillya closed 1 week ago

Euphillya commented 3 months ago

The portals on Folia are disabled, that's a fact. However, we can know when a player will arrive in a portal with this event: https://jd.papermc.io/paper/1.20/io/papermc/paper/event/entity/EntityInsideBlockEvent.html This works very well as a solution, because I experimented with it on my Skyblock plugin for Folia.

Example with my code : https://github.com/Euphillya/Skyllia/commit/f4646b13555483d25d0424a2d9c740f57ea371b7#diff-c59f1510ca874602d06e351e9b35637a7f553f9ad9eb1e07eff0687aa048ce02

Euphillya commented 3 months ago

Furthermore, to make it even better, since 1.20.3, Mojang has added in gamerule: PLAYERS_NETHER_PORTAL_CREATIVE_DELAY and PLAYERS_NETHER_PORTAL_DEFAULT_DELAY, it would be enough to change its value to a very high value, and put a teleportation delay like in Vanilla. We could definitely resimulate the teleportation of disabled portals.