| Type: | Bug | ||
| Reporter: | [Mod] markderickson | Assignee: | [Mojang] TommyWallberg |
| Resolution: | Fixed | Votes: | 133 |
| Labels: | effect, end_portal, overworld, potion-effect | ||
| Attachments: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CHK: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Confirmation Status: | Confirmed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Category: |
Player
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Mojang Priority: | Important | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Area: | Platform | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
The bugAfter killing the dragon and exiting the end portal, all status effects are removed. How to reproduce
AnalysisCode analysis by pr0cess can be found in this comment. |
| Comments |
| Comment by Jean Dubois [ 11/May/24 ] |
|
Can confirm in 24w19b |
| Comment by Bluebird [ 22/Apr/24 ] |
|
Affects 1.20.5 Release Candidate 2 |
| Comment by Jean Dubois [ 07/Apr/24 ] |
|
Can confirm in 24w14a |
| Comment by CaptainFlame54 [ 14/Feb/24 ] |
|
Can confirm in 24w06a |
| Comment by NULLYUKI [ 09/Dec/23 ] |
|
Can confirm in 1.20.4 |
| Comment by Kiz [ 29/May/23 ] |
|
Affects 1.20 Pre-release 7. |
| Comment by Kiz [ 25/May/23 ] |
|
Affects 1.20 Pre-release 6. |
| Comment by Kiz [ 23/May/23 ] |
|
Affects 1.20 Pre-release 5. |
| Comment by Kiz [ 19/May/23 ] |
|
Affects 1.20 Pre-release 4. |
| Comment by Kiz [ 16/May/23 ] |
|
Affects 1.20 Pre-release 2. |
| Comment by Kiz [ 10/May/23 ] |
|
Affects 1.20 Pre-release 1. |
| Comment by Kiz [ 03/May/23 ] |
|
Affects 23w18a. |
| Comment by Kiz [ 27/Apr/23 ] |
|
Affects 23w17a. |
| Comment by Kiz [ 20/Apr/23 ] |
|
Affects 23w16a. |
| Comment by Kiz [ 05/Apr/23 ] |
|
Affects 23w14a. |
| Comment by Kiz [ 29/Mar/23 ] |
|
Affects 23w13a. |
| Comment by Kiz [ 22/Mar/23 ] |
|
Affects 23w12a. |
| Comment by Kiz [ 13/Mar/23 ] |
|
Affects 1.19.4 Release Candidate 3. |
| Comment by Kiz [ 12/Mar/23 ] |
|
Affects 1.19.4 Release Candidate 2. |
| Comment by Kiz [ 10/Mar/23 ] |
|
Affects 1.19.4 Release Candidate 1. |
| Comment by Kiz [ 08/Mar/23 ] |
|
Affects 1.19.4 Pre-release 4. |
| Comment by Kiz [ 01/Mar/23 ] |
|
Affects 1.19.4 Pre-release 3. |
| Comment by Kiz [ 22/Feb/23 ] |
|
Affects 1.19.4 Pre-release 1. |
| Comment by Kiz [ 15/Feb/23 ] |
|
Affects 23w07a. |
| Comment by Kiz [ 08/Feb/23 ] |
|
Affects 23w06a. |
| Comment by Ray [ 04/Feb/23 ] |
| Comment by Kiz [ 04/Feb/23 ] |
|
Affects 23w05a. |
| Comment by [Mod] Avoma [ 07/Aug/22 ] |
|
Can confirm in 1.19.2. |
| Comment by Jean Dubois [ 17/Jul/22 ] |
|
Can someone check if this bug affects 1.19.1 pre releases ? |
| Comment by Toast_Cubed [ 21/Jun/22 ] |
|
Present in 1.19 full release. |
| Comment by [Mod] EVGENSYPERPRO [ 19/Jun/22 ] |
|
relates to |
| Comment by MacchuPicchu [ 03/Jun/22 ] |
|
Present in 1.19-rc2. |
| Comment by MacchuPicchu [ 02/Jun/22 ] |
|
Present in 1.19-rc1. |
| Comment by MacchuPicchu [ 01/Jun/22 ] |
|
Present in 1.19-pre5. |
| Comment by MacchuPicchu [ 30/May/22 ] |
|
Present in 1.19-pre4. |
| Comment by Shourin [ 26/May/22 ] |
|
affects 1.19 pre 3 |
| Comment by [Helper] clam lol [ 05/May/22 ] |
|
Affects 22w18a. |
| Comment by [Helper] clam lol [ 03/Apr/22 ] |
|
Affects 22w13a. |
| Comment by [Mod] Avoma [ 02/Mar/22 ] |
|
Can confirm in 1.18.2. |
| Comment by theGlotzerify [ 11/Feb/22 ] |
|
can confirm in 1.18.1 |
| Comment by FX - PR0CESS [ 30/Sep/21 ] |
|
Can confirm in 21w39a Time for a code analysis. I made a working fix for the bug using this analysis, so I can say 100% that this is the issue. Fix All Code Analysis is done in 1.17.1 using Mojang Mappings Explanation of the problem: public void restoreFrom(ServerPlayer oldPlayer, boolean alive) { ... if (alive) { this.getInventory().replaceWith(oldPlayer.getInventory()); this.setHealth(oldPlayer.getHealth()); this.foodData = oldPlayer.foodData; this.experienceLevel = oldPlayer.experienceLevel; this.totalExperience = oldPlayer.totalExperience; this.experienceProgress = oldPlayer.experienceProgress; this.setScore(oldPlayer.getScore()); this.portalEntrancePos = oldPlayer.portalEntrancePos; } else if (this.level.getGameRules().getBoolean(RULE_KEEPINVENTORY) || oldPlayer.isSpectator()) { this.getInventory().replaceWith(oldPlayer.getInventory()); this.experienceLevel = oldPlayer.experienceLevel; this.totalExperience = oldPlayer.totalExperience; this.experienceProgress = oldPlayer.experienceProgress; this.setScore(oldPlayer.getScore()); } ... } When you respawn using the end portal, it uses this function. Nothing else in the game uses restoreFrom(player,true) where alive is set to true. So I am sure that everything that happens here, only happens for the end portal.
this.activeEffects.putAll(oldPlayer.activeEffects);
After: this.portalEntrancePos = oldPlayer.portalEntrancePos; Although that's not all, after doing my testing there was another issue that happened. The effects do not instantly appear once you travel through, it takes a while. This is because like most other data, you need to tell the client about these changes. Here's where you can do that: net/minecraft/server/players/PlayerList.java - respawn(ServerPlayer, boolean) public ServerPlayer respawn(ServerPlayer oldPlayer, boolean ) { ... ServerPlayer newPlayer = new ServerPlayer(this.server, newLevel, oldPlayer.getGameProfile()); ... newPlayer.restoreFrom(oldPlayer, alive); //This is where the other function is called from ... LevelData levelData = lvt9.level.getLevelData(); newPlayer.connection.send(new ClientboundRespawnPacket(...)); newPlayer.connection.teleport(...); newPlayer.connection.send(new ClientboundSetDefaultSpawnPositionPacket(...)); newPlayer.connection.send(new ClientboundChangeDifficultyPacket(...)); newPlayer.connection.send(new ClientboundSetExperiencePacket(...)); ... return newPlayer; } What you can notice from this code is that there are multiple newPlayer.connection.send() happening here to update the client's information, what we need to do is add another one for the status effects. Unfortunately, the status effects packet has not been modified in a long time and still only transfers one status effect at a time, unlike many of the newly upgraded packets which send all their info at once. So we need to send a packet for each effect until that is changed. // player = newPlayer player.activeEffects.forEach((_,eff) -> { player.connection.send(new ClientboundUpdateMobEffectPacket(player.getId(), eff)); }); Right after the last connection.send, which in this case is: newPlayer.connection.send(new ClientboundSetExperiencePacket(...));
|
| Comment by [Mod] Avoma [ 21/Jul/21 ] |
|
Asher_Y, just to inform you, the 1.18 experimental snapshots are not supported on the bug tracker and this cannot be added as an affected version. |
| Comment by Asher [ 21/Jul/21 ] |
|
Can confirm in 1.18 experimental snapshot 2 |
| Comment by [Mod] Avoma [ 18/Jul/21 ] |
|
Can confirm in 1.17.1. |
| Comment by Ray [ 07/Jun/21 ] |
|
in 1.17 rc1 |
| Comment by Brevort [ 06/May/21 ] |
|
Can confirm in 21w18a. Further, testing discovered MC-225055. |
| Comment by [Mod] Avoma [ 30/Apr/21 ] |
|
Can confirm in 21w17a. |
| Comment by [Mod] Avoma [ 19/Apr/21 ] |
|
Can confirm in 21w15a. |
| Comment by [Mod] Avoma [ 18/Feb/21 ] |
|
Can confirm in 21w07a. |
| Comment by [Mod] Avoma [ 04/Feb/21 ] |
|
Can confirm in 21w05b. |
| Comment by Composters [ 20/Jan/21 ] |
|
confirmed 21w03a |
| Comment by [Mod] Avoma [ 25/Nov/20 ] |
|
Can confirm 20w48a. |
| Comment by Mantegaloka [ 08/Sep/20 ] |
|
Confirmed for 1.16.3-rc1 |
| Comment by Leo Xiang [ 27/Aug/20 ] |
|
Confirmed for 1.16.2 |
| Comment by bugsbugsbugs [ 22/Jun/20 ] |
|
Confirmed for 1.16-rc1 |
| Comment by Bogdan Fediushin [ 13/Jun/20 ] |
|
Confirmed for 1.16 Pre-release 5 |
| Comment by DatSansyBoi [ 11/Jun/20 ] |
|
Confirmed for 1.16 Pre-release 4 |
| Comment by Jake Spencer [ 29/Jan/20 ] |
|
Occurs in 1.15, 1.15.1, 1.15.2 also |
| Comment by KamiADN [ 10/Aug/19 ] |
|
Confirmed for 1.14.4 |
| Comment by Yanis [ 05/Mar/19 ] |
|
Confirmed for 19w09a |
| Comment by Kraif [ 30/Aug/18 ] |
|
Confirmed for 1.13.1. |
| Comment by user-a4a49 (Inactive) [ 05/Jul/18 ] |
|
Affects 1.13-pre6! |
| Comment by ilmango [ 11/Dec/16 ] |
|
confirmed for 1.11 |
| Comment by TheGamingCat [ 24/Oct/16 ] |
|
confirmed for 16w42a |
| Comment by TheGamingCat [ 17/Oct/16 ] |
|
confirmed for singleplayer |
| Comment by Ashley5478 [ 06/Mar/16 ] |
|
Confirmed for 1.9 Full realese |
| Comment by Marcono1234 [ 07/Jan/16 ] |
|
Confirmed for
The reason for this is that the player respawns when he leaves the end through the portal. Therefor a new player instance is created and most data is copied, however for example active potion effects are not. |
| Comment by Marcono1234 [ 05/Nov/15 ] |
|
Confirmed for
|
| Comment by [Mod] Sonicwave [ 27/Aug/14 ] |
|
Confirmed for 1.8-pre2. |
| Comment by qmagnet [ 19/Aug/14 ] |
|
Confirmed for 14w34b |
| Comment by 08Juan80 [ 27/Mar/13 ] |
|
It was already reopened by Kumasasa @Tails. |
| Comment by 08Juan80 [ 27/Mar/13 ] |
|
Added the 3 screenshots from |
| Comment by Kumasasa [ 27/Mar/13 ] |
|
Reopened, since not a duplicate of (but related to) |
| Comment by 08Juan80 [ 27/Mar/13 ] |
|
If a mod can reopen this issue if I'm right with my comment above... |
| Comment by 08Juan80 [ 27/Mar/13 ] |
|
I think this is not a duplicate of |
| Comment by Joseph Sirna` [ 06/Jan/13 ] |
|
I lost the indication of the effects and the effects themselves, I wasn't I'll look more closely for similar bugs next time. Joseph Sirna On Sun, Jan 6, 2013 at 12:04 PM, [Mod] Kumasasa (JIRA) < |
| Comment by Kumasasa [ 06/Jan/13 ] |
|
did you lose the effects or only the indication of the effects, see |