Spectral arrow doesn't show duration in the item's lore
The Bug
Unlike any potion, splash potion, lingering potion or tipped arrow (outside of the ones with instant effects), the spectral arrow shows no duration of the potion effect, nor that it gives an effect.
Steps to Reproduce
- Give yourself a spectral arrow.
/give @s minecraft:spectral_arrow
- Open your inventory and hold your mouse cursor over it to display the item's tooltip.
- Look at the item's lore closely.
Observed Behavior
Spectral arrows do not display their potion effect along with its duration in its item's lore.
Expected Behavior
Spectral arrows would display their potion effect along with its duration in its item's lore.
Code Analysis
Code analysis by [Mod] bemoty can be found in this comment.
- Unresolved
[Mod] Urielsalis
user-f2760- 21
- 8
- Confirmed
Normal
- Gameplay
- UI
- arrow duration effect spectral-arrow
1.10.2 - 1.21.3
1.10.2 16w32a 16w32b 16w33a 1.11-pre1 1.11.2 17w06a 17w14a 1.12 1.12.1-pre1 1.12.1 1.12.2 18w02a 18w19b 1.13.1 1.13.2 18w47a 18w47b 18w48a 18w48b 18w49a 18w50a 1.14.4 19w46b 1.15.2 20w06a 1.16 1.16.2-rc2 1.16.2 1.16.3-rc1 1.16.3 1.16.4-pre1 1.16.4-pre2 1.16.4 20w45a 20w46a 20w48a 20w49a 20w51a 21w03a 1.16.5 21w05a 21w05b 21w06a 21w07a 21w08b 21w14a 21w15a 21w16a 21w17a 21w18a 21w19a 21w20a 1.17-pre1 1.17-pre4 1.17 1.17.1-pre1 1.17.1 21w37a 21w38a 21w39a 21w40a 21w41a 21w42a 21w43a 1.18-pre7 1.18.1 1.18.2 1.19 22w24a 1.19.2 1.19.3 23w03a 23w04a 23w05a 23w06a 23w07a 1.19.4-pre3 1.19.4 23w13a 23w14a 1.20-pre1 1.20-pre2 1.20-pre4 1.20.1 23w31a 23w32a 23w33a 23w35a 1.20.2-pre1 1.20.2-pre2 1.20.2 23w40a 23w41a 23w42a 23w44a 1.20.4 24w03b 24w04a 24w05a 24w09a 24w11a 24w12a 1.20.6 1.21 1.21.3
Created Issue:
Spectral arrow doesn't show duration in the lore
Unlike any potion, splash potion, lingering potion or tipped arrow (outside of the ones with instant effects), the spectral arrow shows no duration of the potion effect, nor that it gives an effect.
Spectral arrow doesn't show duration in the item's lore
Still no duration in 16w33a.
Unlike any potion, splash potion, lingering potion or tipped arrow (outside of the ones with instant effects), the spectral arrow shows no duration of the potion effect, nor that it gives an effect.
Code analysis by [Mod] bemoty can be found in this comment .
Unlike any potion, splash potion, lingering potion or tipped arrow (outside of the ones with instant effects), the spectral arrow shows no duration of the potion effect, nor that it gives an effect.
Code analysis by [Mod] bemoty can be found in this comment.
The bug
Unlike any potion, splash potion, lingering potion or tipped arrow (outside of the ones with instant effects), the spectral arrow shows no duration of the potion effect, nor that it gives an effect.
Code analysis
Code analysis by [Mod] bemoty can be found in this comment.
relates to
The
bugUnlike any potion, splash potion, lingering potion or tipped arrow (outside of the ones with instant effects), the spectral arrow shows no duration of the potion effect, nor that it gives an effect.
Code
analysisCode analysis by [Mod] bemoty can be found in this comment.
The Bug
Unlike any potion, splash potion, lingering potion or tipped arrow (outside of the ones with instant effects), the spectral arrow shows no duration of the potion effect, nor that it gives an effect.
Steps to Reproduce
- Give yourself a spectral arrow.
/give @s minecraft:spectral_arrow- Open your inventory and hold your mouse cursor over it to display the item's tooltip.
- Look at the item's lore closely.
Observed Behavior
Spectral arrows do not display their potion effect along with its duration in its item's lore.
Expected Behavior
Spectral arrows would display their potion effect along with its duration in its item's lore.
Code Analysis
Code analysis by [Mod] bemoty can be found in this comment.
relates to



Can confirm.
Can confirm for 16w32b.
How does one get the title of Moderator or Helper?
I think the bug is not a bug, but simply how it's made. Spectral arrows are their own special arrow type (they're not tipped arrows), so you can't change the duration, nor can you change the effect (without commands).
And SLScool, is a bug report really the best place to ask that question?
Hobbit2469, I would say the same thing, except that I've been on the wiki, and I've seen many updates fix many bugs I never thought were issues, and I'll say the same thing about this one.
Also, do you know any better place to ask?
SLScool: see this reddit post.
I reported this as an issue, since it can be considered an inconsistency; all other arrows that give potion effects that are not instant have a duration mentioned, while this one doesn't.
Confirmed for 1.11.2
Confirmed for 17w14a
The following is based on a decompiled version of Minecraft 1.12 using MCP 9.40-pre1.
So, I've been trying to find out what exactly is causing this and after playing around a bit with the code of spectral arrows in Minecraft, I found out that the answer is pretty simple: Unlike tipped arrows, spectral arrows don't have a potion effect applied to them directly, so the game doesn't know that it should display the effects which the spectral arrow is causing and their duration in the item lore. (Glowing; ID: 24)
While this might not be the best solution, I found a way to fix this issue. Eventually, the item lore of spectral arrows will look like this:
First, I registered "glowing" as a new PotionType in the net.minecraft.potion.PotionType.registerPotionTypes() method because it wasn't registered there already for some reason. To do that, I added the following line somewhere in the method body before the invocation of REGISTRY.validateKey().
I think most of this line should be self-explanatory. However, I'm a bit unsure about the second argument in the constructor call of net.minecraft.potion.PotionEffect, a signed integer. The argument name says "durationIn", I don't exactly know what the default duration of a spectral arrow's glowing effect is though. In the class net.minecraft.entity.projectile.EntitySpectralArrow there is a private integer called "duration" with the default duration value of the potion effect applied to every entity hit by a spectral arrow. In the method declaration of arrowHit(...) in the same class the potion effect is indeed applied for the duration saved in this variable. However, if I use 200 instead of 1800 as the "durationIn" in the constructor call of net.minecraft.potion.PotionEffect, I get a duration of "0:01", which is—of course—not correct. So after a few tests 1800 just seemed like the most appropriate value for me.
The second thing I did was to copy the addInformation(...) method declaration in the net.minecraft.item.ItemTippedArrow class and paste it into the net.minecraft.item.ItemSpectralArrow class. I then added another line of code which adds the "glowing" potion effect to the ItemStack.
Since the spectral arrow is an extra item and can only have one potion effect, I think it's completely fine to add the potion effect in this "hotfix style". But, welp, very likely there is much more to consider than I know about. ^^ I hope this short code analysis helps though.
Can confirm for MC 1.12.1.
Can confirm in 21w05b.
Video attached.
Can confirm in 21w07a.
Can confirm in 21w16a.
Can confirm this behavior in 21w40a. Here are some extra details regarding this problem.
The Bug:
Spectral arrows do not display their potion effect along with its duration in its item's lore.
Steps to Reproduce:
Observed Behavior:
Spectral arrows do not display their potion effect along with its duration in its item's lore.
Expected Behavior:
Spectral arrows would display their potion effect along with its duration in its item's lore.
Can confirm in 1.18.1.
Can confirm in 1.18.2.
Can confirm in 1.19 and 22w24a.
Can confirm in 1.19.2.