Folia icon indicating copy to clipboard operation
Folia copied to clipboard

Entity activation Nether portal issues

Open MineSunshineone opened this issue 1 year ago • 1 comments

Expected behavior

according to the wiki https://minecraft.fandom.com/zh/wiki/%E4%B8%8B%E7%95%8C%E4%BC%A0%E9%80%81%E9%97%A8?so=search

Most entities can teleport through Nether Portals, including various creatures (except Withers and Ender Dragons), ships, minecarts, projectiles, and item entities, but if one creature rides the other, neither creature can pass through the portal. Since only the player can make a portal spawn in another dimension, none of the entities mentioned above can pass through a portal that does not have an activated door in the corresponding dimension.

Observed/Actual behavior

when the entity passes through a nether portal in the world, a nether protal will be generated in the nether

Steps/models to reproduce

1.Create Nether portal 2.throw entity or let mobs go through it

Plugin and Datapack List

plugins [23:08:07 INFO]: Server Plugins (24): [23:08:07 INFO]: Bukkit Plugins: [23:08:07 INFO]: - AnCDK, AnvilColor, ArmorStandEditor, Chunky, CoreProtect, CreeperConfetti, DeathMessage, Essentials, EssentialsChat, FastAsyncWorldEdit [23:08:07 INFO]: FreedomChat, GSit, InvSeePlusPlus, LuckPerms, MiraiMC, NoFlightInEnd, PistonMOTD, PlasmoVoice, pv-addon-groups [23:08:07 INFO]: SkullPlugin, TAB, Vault, Whitelist4QQ

Folia version

version [23:07:44 INFO]: Checking version, please wait... [23:07:45 INFO]: This server is running Folia version git-Folia-"a1572f1" (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT) (Git: a1572f1) Error obtaining version information

Other

No response

MineSunshineone avatar Jun 01 '23 15:06 MineSunshineone

could reproduce in 1.20 Laster ver

version [09:19:54 INFO]: Checking version, please wait... [09:19:55 INFO]: This server is running Folia version git-Folia-"02c651d" (MC: 1.20) (Implementing API version 1.20-R0.1-SNAPSHOT) (Git: 02c651d on dev/1.20)

reproduce step 1.create a none-activated neither portal 2.throw entities or let entity go through it

Expected behavior like paper

2023-06-13_09 26 01

Observed/Actual behavior entities active neither portal and in neither

MineSunshineone avatar Jun 13 '23 01:06 MineSunshineone

The entity teleportation logic requires the entity to be removed from the current world. The portal logic requires that the portal search occurs asynchronously as the target region is not owned by the current thread. The end result is that in order to maintain the behavior that once an entity contacts a portal it is teleported, that the entity is first removed and then the portal search occurs. There isn't a sensible fallback to "the portal doesn't exist" other than to create it, as it does for players.

I understand that this isn't Vanilla, but that is the price to pay here for region threading.

Spottedleaf avatar Jul 10 '23 04:07 Spottedleaf