Shooting, summoning or editing an arrow and reloading the world gives potion particles
The bug
I shot a regular arrow on the ground and reloaded my world, the arrow now has particles as if it's a tipped arrow, yet when I pick up the arrow it gives a regular arrow.
Code analysis
Based on 1.11.2 decompiled using MCP 9.35 rc1
The Color tag is only written if the arrow has a custom color. The problem is that the game calls the method net.minecraft.entity.projectile.EntityTippedArrow.refreshColor() when an arrow without Color tag is loaded. This method sets the color to the water color.
This could be fixed by always writing the Color tag to make sure tipped water arrows keep their particles as well. Additionally the check if the Color tag exists when reading the NBT data can be removed then.
Linked Issues
is duplicated by41
relates to4
- Fixed
JohnStar128
[Mojang] Grum (Erik Broes)- 57
- 27
- Confirmed
- (Unassigned)
- arrow potion relog water
16w39b - 1.14.4
16w39b 16w39c 16w50a 1.11.2 17w06a 17w17a 17w17b 17w18a 17w18b 1.12-pre1 1.12-pre4 1.12-pre5 1.12-pre6 1.12-pre7 1.12 17w31a 1.12.1-pre1 1.12.1 1.12.2-pre1 1.12.2-pre2 1.12.2 17w43a 17w43b 17w45a 17w46a 17w47b 17w48a 18w01a 18w03b 18w07b 18w07c 18w09a 18w11a 18w14b 18w15a 18w16a 18w21b 18w22c 1.13-pre1 1.13-pre2 1.13-pre3 1.13-pre6 1.13-pre7 1.13-pre10 1.13 18w30b 18w31a 1.13.1 1.13.2 18w43c 18w47a 18w47b 19w02a 19w03a 19w03b 19w12b 19w13b 19w14a 19w14b 1.14.4- 16w40a 19w35a
Created Issue:
Shooting an arrow and reloading the world gives potion particles.
I shot a regular arrow on the ground and reloaded my world, the arrow now has particles as if it's a tipped arrow, yet when I pick up the arrow it gives a regular arrow.
Environment
Windows 10, Java 1.8.0_25 64 bit
is duplicated by
relates to
is duplicated by
is duplicated by
is duplicated by
is duplicated by
The bug
I shot a regular arrow on the ground and reloaded my world, the arrow now has particles as if it's a tipped arrow, yet when I pick up the arrow it gives a regular arrow.
Code analysis
Based on 1.11.2 decompiled using MCP 9.35 rc1
The Color tag is only written if the arrow has a custom color. The problem is that the game calls the method net.minecraft.entity.projectile.EntityTippedArrow.refreshColor() when an arrow without Color tag is loaded. This method sets the color to the water color.
This could be fixed by always writing the Color tag to make sure tipped water arrows keep their particles as well.
The bug
I shot a regular arrow on the ground and reloaded my world, the arrow now has particles as if it's a tipped arrow, yet when I pick up the arrow it gives a regular arrow.
Code analysis
Based on 1.11.2 decompiled using MCP 9.35 rc1
The Color tag is only written if the arrow has a custom color. The problem is that the game calls the method net.minecraft.entity.projectile.EntityTippedArrow.refreshColor() when an arrow without Color tag is loaded. This method sets the color to the water color.
This could be fixed by always writing the Color tag to make sure tipped water arrows keep their particles as well. Additionally the check if the Color tag exists when reading the NBT data can be removed then.
is duplicated by
is duplicated by
is duplicated by
is duplicated by
Windows 10, Java 1.8.0_25 64 bit
is duplicated by
Shooting or summoning an arrow and reloading the world gives potion particles.
Shootingorsummoning an arrow and reloading the world gives potion particles.Shooting, summoning or editing an arrow and reloading the world gives potion particles.
is duplicated by
relates to
Shooting, summoning or editing an arrow and reloading the world gives potion particles.
is duplicated by
is duplicated by
relates to
relates to
relates to
relates to
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
relates to
Looks like a duplicate of MC-107941.
Duplicate of MC-107941, if you have not, please use the search function in the future.
Duplicates MC-107941
Thank you for your report!
However, this issue has been closed as a Duplicate of MC-107941.
It has been linked to this report. If you have additional information, please add it to the duplicated report.
Please search before reporting, as it's likely that one exists already.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki
Thank you for your report!
However, this issue has been closed as a Duplicate of MC-107941.
It has been linked to this report. If you have additional information, please add it to the duplicated report.
Please search before reporting, as it's likely that one exists already.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki
Duplicate of MC-107941
Duplicate of MC-107941
Duplicate of MC-107941
Duplicate of MC-107941
This issue duplicates MC-107941.
If you have not already, please use the search function to see if your issue has already been reported.
May relate to MC-107941.


Simply summoning an arrow also gives it particules, and without having to reload the world.
Back in 16w50a. Possibly related to
MC-108943.Confirmed for 17w06a
Confirmed for 17w17a.
Editing the NBTdata of an arrow using /entitydata also triggeres this bug. (1.11.2)
NOPEname, you are talking about
MC-111533.Confirmed for 1.12-pre4.
confirmed for 1.12 pre7
Confirmed for 1.12.
Agent Agrimar, it was already marked as affected.
Can confirm for 17w47b
Confirm for 18w03b
confirmed in 18w07b. Using /data get entity @e[type=arrow,limit=1,sort=nearest] does not show anything unusual, not even a potion related tag when the bug is active.
Merged
MC-111533into this one, as it's the same cause: reading from NBT will create the particles:Affects 18w11a
Affects 18w21b
Confirmed for 18w22c
Can confirm for 1.13-pre1
Easy fix to summon arrow with no particles!!!
summon arrow ~ ~ ~ {Color:-1}
If you set the color value to -1 the particles are invisible, no worries anymore
They can fix this bug by giving it that value as default
Can confirm for 1.13.2 release and 1.14 snapshot 18w43c.
Affects all 1.14 snapshots even without exiting the world first.
There's a more specific bit of code at the root of this bug. (Basing this off the source of 1.12.2.) When writing an arrow entity to NBT (i.e. on save or when modifying the data), it only writes the color tag if its fixedColor property is true. This property is only set in the setFixedColor and refreshColor methods, the latter of which sets the color to the default blue. This means that for normal arrows, it's false by default, and will never be written to NBT data; so when it reloads, the color tag isn't there, and it's refreshed to blue.
The fix to this is quite simple, and requires only two small changes. In the tipped arrow entity's setPotionEffect method, instead of setting the color directly on the data manager, it should call setFixedColor to do this, which will then set the boolean flag properly and allow -1 to be written with the arrow's NBT, fixing the issue for bow-fired arrows.
The second change is to fix the issue for dispenser-fired arrows. In the registerDispenserBehaviors method of the Bootstrap class, when it registers the arrow behaviors for normal arrows, it just needs to call entitytippedarrow.setFixedColor(-1) somewhere between creating the entity and returning it. (The method is currently private, as is the flag, so this would need to actually call a new setter or just make the setFixedColor method public.)
Those small changes should fix this long-standing bug for good
Can confirm for all versions 1.14