mojira.dev
MC-116279

Non-player entities going through Nether portal do not generate portal in Nether if none exists

The bug

Non-player entities going through a Nether portal do not generate a new portal in the Nether if none exists. Instead they are just placed at x / 8, y, z / 8, which could be in or above a lava lake as well.

How to reproduce

  1. Create a new world, or make sure there are no nearby portals in the Nether

  2. Create a Nether portal in the Overworld

  3. Throw for example an item through the portal

  4. Enter the portal
    → The item is very likely not at the position of the portal

Note: You can also summon an armor stand in the portal to see where it was teleported.

/summon armor_stand ~ ~-3 ~ {Invulnerable:1b,NoGravity:1b,Glowing:1b,Tags:[teleportMarker]}

Code analysis

Based on 1.11.2 decompiled using MCP 9.35 rc1

While for players the method net.minecraft.world.Teleporter.placeInPortal(Entity, float) is used which creates a portal if none exists, non-player entities only use net.minecraft.world.Teleporter.placeInExistingPortal(Entity, float) which assumes there is already a portal. It looks like they could use Teleporter.placeInPortal(Entity, float) instead as well without any downsites.

Related issues

Comments

marcono1234

I can confirm for 17w15a that they are not always teleported to the portal but sometimes appear multiple blocks offset from it. Can you make sure that the same happens for you as well, hightlight them for example by using the following command after going through the portal as well (if possible in a test world or a copy and not your Survival world).

/entitydata @e[type=item,r=100] {Glowing:1b}
migrated

Did this in a new world (17w16a now), and it's definitely disappeared....but not every single time. In the 10 tests from a new world that I did, it turned up twice...once it appeared from the floor about 15 seconds later, so I'm guessing it teleported to a lower level and item elevated it's way up, and the other time it turned up after the nether was properly responsive again (ie pigmen started moving and it wasn't so jerky to move) about 10 blocks away from the portal.

Steps to reproduce.

Start a new world
create a nether portal and light it.
throw an object through
go through the portal, and the item you threw won't be anywhere.

marcono1234

Changed the report to be about entities not generating portals. This is very likely what is causing items to disappear for you since they could be placed in or above lava lakes as well.

migrated

Confirmed for 1.13.1.

Jeuv

Confirmed for 20w10a. Possibly the cause of MC-151648

Sonicwave

I am not able to reproduce in 1.16.3 with the given repro steps, instead I get MC-151648 where entities don't travel through the portal at all. @@unknown how were you able to reproduce both issues in 20w10a?

ampolive

Cannot reproduce this in 1.17.1. This seems to be blocked by MC-151648.

migrated

Shugoh

Confirmed

Platform

Low

Chunk loading, Entities

entity, nether, nether_portal, position, teleport

Minecraft 1.11.2, Minecraft 17w15a, Minecraft 17w16a, Minecraft 1.13.1, 20w10a

24w21a

Retrieved