Entities that tick in nether portal for one gametick don't get sent to the nether
The bug
In the linked video, I showed that an entity that gets moved into a portal does not get sent to the nether, even if it ends up in a portal at the end of its movement. The entity only gets sent to the nether if it ends up in a portal on its next gametick.
I summoned a pig with
/summon pig 1002.39 5.44 962.00 {Motion:[0.0,0.0,-3.5]}
and had a portal one block from the edge of a chunk border. The pig movement ended with it in a portal, but did not get sent to the nether.
Any entity that is in a nether portal even for one gametick should be sent to the nether.
A fix for this should be to tick the portal after the entities movement has been processed.
Video
https://www.youtube.com/watch?v=oK1fkszTrZA
Code analysis
Created Issue:
Entities that tick in nether portal for one gametick don't get sent to the nether
Video: https://www.youtube.com/watch?v=oK1fkszTrZA&feature=youtu.be
In the linked video, I showed that an entity that gets moved into a portal does not get sent to the nether, even if it ends up in a portal at the end of its movement. The entity only gets sent to the nether if it ends up in a portal on its next gametick.
I summoned a pig with /summon pig 1002.39 5.44 962.00 {Motion:[0.0,0.0,-3.5]}, and had a portal one block from the edge of a chunk border. The pig movement ended with it in a portal, but did not get sent to the nether.
Obviously, any entity that is in a nether portal even for one gametick should be sent to the nether.
A fix for this should be to tick the portal after the entities movement has been processed.
Environment
Windows 10, Java 8, 1.16.1
Video: https://www.youtube.com/watch?v=oK1fkszTrZA&feature=youtu.be
In the linked video, I showed that an entity that gets moved into a portal does not get sent to the nether, even if it ends up in a portal at the end of its movement. The entity only gets sent to the nether if it ends up in a portal on its next gametick.
I summoned a pig with /summon pig 1002.39 5.44 962.00 {Motion:[0.0,0.0,-3.5]}, and had a portal one block from the edge of a chunk border. The pig movement ended with it in a portal, but did not get sent to the nether.
Obviously, any entity that is in a nether portal even for one gametick should be sent to the nether.A fix for this should be to tick the portal after the entities movement has been processed.
Video: https://www.youtube.com/watch?v=oK1fkszTrZA&feature=youtu.be
In the linked video, I showed that an entity that gets moved into a portal does not get sent to the nether, even if it ends up in a portal at the end of its movement. The entity only gets sent to the nether if it ends up in a portal on its next gametick.
I summoned a pig with /summon pig 1002.39 5.44 962.00
{Motion:[0.0,0.0,-3.5]}, and had a portal one block from the edge of a chunk border. The pig movement ended with it in a portal, but did not get sent to the nether.
Any entity that is in a nether portal even for one gametick should be sent to the nether.
A fix for this should be to tick the portal after the entities movement has been processed.
Video: https://www.youtube.com/watch?v=oK1fkszTrZA&feature=youtu.be
In the linked video, I showed that an entity that gets moved into a portal does not get sent to the nether, even if it ends up in a portal at the end of its movement. The entity only gets sent to the nether if it ends up in a portal on its next gametick.
I summoned a pig with /summon pig 1002.39 5.44 962.00
{Motion:[0.0,0.0,-3.5]}, and had a portal one block from the edge of a chunk border. The pig movement ended with it in a portal, but did not get sent to the nether.
Any entity that is in a nether portal even for one gametick should be sent to the nether.
A fix for this should be to tick the portal after the entities movement has been processed.
Video: https://www.youtube.com/watch?v=oK1fkszTrZA&feature=youtu.be
In the linked video, I showed that an entity that gets moved into a portal does not get sent to the nether, even if it ends up in a portal at the end of its movement. The entity only gets sent to the nether if it ends up in a portal on its next gametick.
I summoned a pig with /summon pig 1002.39 5.44 962.00 {Motion:[0.0,0.0,-3.5]} and had a portal one block from the edge of a chunk border. The pig movement ended with it in a portal, but did not get sent to the nether.
Any entity that is in a nether portal even for one gametick should be sent to the nether.
A fix for this should be to tick the portal after the entities movement has been processed.
Please fix this is very annoying.
Video: https://www.youtube.com/watch?v=oK1fkszTrZA&feature=youtu.be
In the linked video, I showed that an entity that gets moved into a portal does not get sent to the nether, even if it ends up in a portal at the end of its movement. The entity only gets sent to the nether if it ends up in a portal on its next gametick.
I summoned a pig with /summon pig 1002.39 5.44 962.00 {Motion:[0.0,0.0,-3.5]} and had a portal one block from the edge of a chunk border. The pig movement ended with it in a portal, but did not get sent to the nether.
Any entity that is in a nether portal even for one gametick should be sent to the nether.
A fix for this should be to tick the portal after the entities movement has been processed.
Video: https://www.youtube.com/watch?v=oK1fkszTrZA&feature=youtu.be
In the linked video, I showed that an entity that gets moved into a portal does not get sent to the nether, even if it ends up in a portal at the end of its movement. The entity only gets sent to the nether if it ends up in a portal on its next gametick.
I summoned a pig with /summon pig 1002.39 5.44 962.00
{Motion:[0.0,0.0,-3.5]}and had a portal one block from the edge of a chunk border. The pig movement ended with it in a portal, but did not get sent to the nether.
Any entity that is in a nether portal even for one gametick should be sent to the nether.
A fix for this should be to tick the portal after the entities movement has been processed.
Video: https://www.youtube.com/watch?v=oK1fkszTrZA&feature=youtu.be
In the linked video, I showed that an entity that gets moved into a portal does not get sent to the nether, even if it ends up in a portal at the end of its movement. The entity only gets sent to the nether if it ends up in a portal on its next gametick.
I summoned a pig with /summon pig 1002.39 5.44 962.00
{Motion:[0.0,0.0,-3.5]}and had a portal one block from the edge of a chunk border. The pig movement ended with it in a portal, but did not get sent to the nether.
Any entity that is in a nether portal even for one gametick should be sent to the nether.
A fix for this should be to tick the portal after the entities movement has been processed.
Video: https://www.youtube.com/watch?v=oK1fkszTrZA&feature=youtu.be
In the linked video, I showed that an entity that gets moved into a portal does not get sent to the nether, even if it ends up in a portal at the end of its movement. The entity only gets sent to the nether if it ends up in a portal on its next gametick.
I summoned a pig with /summon pig 1002.39 5.44 962.00 {Motion:[0.0,0.0,-3.5]} and had a portal one block from the edge of a chunk border. The pig movement ended with it in a portal, but did not get sent to the nether.
Any entity that is in a nether portal even for one gametick should be sent to the nether.
A fix for this should be to tick the portal after the entities movement has been processed.
Code exploration/analysis:
Video: https://www.youtube.com/watch?v=oK1fkszTrZA&feature=youtu.be
In the linked video, I showed that an entity that gets moved into a portal does not get sent to the nether, even if it ends up in a portal at the end of its movement. The entity only gets sent to the nether if it ends up in a portal on its next gametick.
I summoned a pig with /summon pig 1002.39 5.44 962.00 {Motion:[0.0,0.0,-3.5]} and had a portal one block from the edge of a chunk border. The pig movement ended with it in a portal, but did not get sent to the nether.
Any entity that is in a nether portal even for one gametick should be sent to the nether.
A fix for this should be to tick the portal after the entities movement has been processed.
Code exploration/analysis:
Video: https://www.youtube.com/watch?v=oK1fkszTrZA&feature=youtu.be
In the linked video, I showed that an entity that gets moved into a portal does not get sent to the nether, even if it ends up in a portal at the end of its movement. The entity only gets sent to the nether if it ends up in a portal on its next gametick.
I summoned a pig with /summon pig 1002.39 5.44 962.00
{Motion:[0.0,0.0,-3.5]}and had a portal one block from the edge of a chunk border. The pig movement ended with it in a portal, but did not get sent to the nether.
Any entity that is in a nether portal even for one gametick should be sent to the nether.
A fix for this should be to tick the portal after the entities movement has been processed.
Code exploration/analysis: here
Video: https://www.youtube.com/watch?v=oK1fkszTrZA&feature=youtu.be
In the linked video, I showed that an entity that gets moved into a portal does not get sent to the nether, even if it ends up in a portal at the end of its movement. The entity only gets sent to the nether if it ends up in a portal on its next gametick.
I summoned a pig with
{Motion:[0.0,0.0,-3.5]}/summon pig 1002.39 5.44 962.00and had a portal one block from the edge of a chunk border. The pig movement ended with it in a portal, but did not get sent to the nether.
Any entity that is in a nether portal even for one gametick should be sent to the nether.
A fix for this should be to tick the portal after the entities movement has been processed.
Code exploration/analysis: here
The bug
In the linked video, I showed that an entity that gets moved into a portal does not get sent to the nether, even if it ends up in a portal at the end of its movement. The entity only gets sent to the nether if it ends up in a portal on its next gametick.
I summoned a pig with
/summon pig 1002.39 5.44 962.00 {Motion:[0.0,0.0,-3.5]}and had a portal one block from the edge of a chunk border. The pig movement ended with it in a portal, but did not get sent to the nether.
Any entity that is in a nether portal even for one gametick should be sent to the nether.
A fix for this should be to tick the portal after the entities movement has been processed.
Video
https://www.youtube.com/watch?v=oK1fkszTrZA
Code analysis
Windows 10, Java 8, 1.16.1
relates to
Hi there!
Does MC-191947 describe the issue? I can confirm the report but only with projectiles fired at a certain speed.
Hi there!
Does MC-191947 describe the issue?
As Matthew Gatland suggested in MC-191947, this was made into a separate issue.
The Bug:
An entity that is capable of being sent to the nether that ends its velocity based movement inside a nether portal cannot be sent to the nether unless it is ticked again. This prevents a capable entity from being sent to the nether in the same gametick that its movement ended.
This is noticeable when the entity's end position is in a nether portal in a non-entity processing chunk as it moved into it right before the tick ended, but after the nether portal tick happened and it will not go through the portal on its next gametick as it is now in a non-entity processing chunk and won't tick.
How to reproduce:
- Create a flat world and teleport to 1000, 10 1000 via /tp 1000 10 1000
- Build a nether portal @ the cords 1009 4 1000 to 1009 4 997
- Light the portal and go thru to load and link the other side.
- Build a wall behind the portal on the east side.
- Wait 15 seconds so that the portal no longer loads the chunk as you came through it.
- Turn your render distance down to 2 and your entity distance up to max
- Go to the coords 989 5 1000 to make the portal chunk non-entity processing
- /summon pig 1007.00 5.67 999.45 {Motion:[4.0,0.0,0.0]}
- Observe that the pig is still there.
- Video for the steps: https://youtu.be/2dg7jUIGeho
Code analysis:
A code analysis was done in a previous issue closely related to this one. I will link the old one as the code is more or less the same with one variable charge that is mentioned at the top.
Solution:
A solution is simple: move the nether portal ticking after the move method.


Please fix this is very annoying.
I can say the bug is still there for snapshot 20w27a. Can anyone else confirm it as I am the bug poster.
(Disclaimer: 20w28a reduces the time by 1 more gt than previous versions as int I (this.netherPortalTime) is equal to 0)
The problem:
This code analysis is using Yarn mappings for 1.16.1.
This is very dry and a long explanation so that most people who aren't that code savy can understand it.
Below is the reason why the current game can't send an entity into the nether in one gametick via a portal.
For this example, I will only be using LivingEntities (a pig).
When the pig is ticked for the gametick, it calls the LivingEntity tick().
As shown, it will first preform the super.tick() then the this.tickMovement() which contains the movement of the pig in the entity class after a few more method calls. This movement is needed to do block collisions in order to say it is in a portal.
So let's explore the super.tick()
From the tick(), it calls the this.basetick() method which will contain some important code involving portals, so let's now look at the base tick.
In the base tick, it calls the this.tickNetherPortal() method, which is a very important method in this exploration.
The first important thing to look at here is the this.inNetherPortal(). For this statement to be true, it must first collide with a portal via some move method/block collision.
As the move method of entities (velocity), that is called in the LivingEntity, is after the super.tick() (aka the tickNetherPortal()), the pig can't pass this first statement, thus can't end up in the nether on the same tick it moves.
However, it gets worse....
Let's now look at this.netherPortalTime. This.netherPortalTime can only increase via an entering into the
if statement, which means it first needs to be in a nether portal. So in most cases, the pig's movement will have to collide with a portal first, then wait another tick just to be able to hit that if statement.
Now, once that if statement is called once, it will need to be called again as the first time it is called, this.netherPortalTime is equal to 0 and thus fails the check as i is 1. After the first calling of the if, the value is now 1 due to the this.netherPortalTime++, which means it can complete the if statement once it ticks again.
So, by looking at the code, it takes 3 ticks for a pig to enter the nether via normal means.
A potential fix to make it enter in the same tick it moves:
So, a potential fix would be to first move the this.tickNetherPortal() out of the super.tick() and place it after the movement of the different entities types. Once that is done, the this.netherPortalTime is not needed for most none player entities so it can be zero for most. This means that the entity would move, collide with a portal, and then tick the portal and get sent to the nether all in the same tick.
I have been waiting for this bug to be fixed since 1.12! Amen
Still not working in 20w28a; however, the ticking has been reduced by 1 gt as of testing. I will add the new code changed when the mappings come out.
Seems to not work in 20w29a. Still same as 20w28a.
Seems to not work in 20w30a. Still same as 20w28/29a.
I have marked this issue as fixed because:
I believe this issue was originally about a problem where an entity had to be touching a portal for more than one tick to be teleported. That bug is fixed.
There are still some issues that could be raised separately, with more specific repro steps:
1. If an entity is in a portal in a non-entity processing chunk, it will not teleport.
2. If an entity is moving fast, it can pass right through a portal without ever touching it and will not teleport (
MC-196556)3. Entities teleport though portals at the start of a tick (before they move) instead of at the end of a tick (after they move)
This bug report was to address a few issues that caused an entity to not be sent to the nether in one gametick. That is why I was going for this title "Entities that tick in nether portal for one gametick don't get sent to the nether".
The reproducing steps of this bug report also work with "Entities teleport though portals at the start of a tick (before they move) instead of at the end of a tick (after they move)" suggestion as the original bug report covered both of the issues that made one action not possible.
If you think that "Entities teleport though portals at the start of a tick (before they move) instead of at the end of a tick (after they move)" should be a separate ticket after this address I will do so.
Edit: I created a bug report based on your third suggestion
MC-196897why did you create a different bug report, not the one suggested?