Entity activation Nether portal issues #82

Closed
opened 2023-06-01 17:08:29 +02:00 by MineSunshineone · 2 comments
MineSunshineone commented 2023-06-01 17:08:29 +02:00 (Migrated from github.com)

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

### 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 commented 2023-06-13 03:28:37 +02:00 (Migrated from github.com)

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

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](https://github.com/PaperMC/Folia/assets/107391209/f0bd382c-873d-4d46-8326-32ad9dd52f73) Observed/Actual behavior entities active neither portal and in neither
Spottedleaf commented 2023-07-10 06:15:44 +02:00 (Migrated from github.com)

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.

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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Minecraft/Folia#82
No description provided.