When the new saturation effect came out, I used command blocks to give me hunger points. It seemed like at amplifier 0 for 1 second I got 1 hunger point. When I put the same effect on a potion using NBT editors, even 1 second at amplifier 0 filled my entire hunger bar, when it should act the same as /effect. The issue is that when the command says the effect was applied for x seconds, it was actually applied for x ticks.
Related issues
is duplicated by
relates to
Attachments
Comments


The actual issue is that the potion is using ticks instead of the reported "seconds". Observe that a potion at 10 ticks will heal the same as an /effect with 10 "seconds". 1 second is 20 hunger points, while 1 tick is only 1 hunger point.
This issue is present for Instant Health, Instant Harm, and now, Saturation: the command will state that the effect was applied for X seconds, when in reality it was applied for X ticks (1/20 of a second).
Please update your ticket and title to make it clear that the issue is in the command for these effects - custom potions have consistent behavior for all effects, but the command does not.

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Confirmed for 1.6.2.

Confirmed.

Is this still a concern in the current Minecraft version 1.7.4 / Launcher version 1.3.8 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Confirmed for 1.7.4 and 14w04b.
I have a feeling it's intentionally per-tick to allow for fine-grained control (the effects are all "instantaneous", so even the minimum of 1 second would be 20 doses of Instant Health/Harm/Saturation). However, the message claims "seconds", and should be changed to "ticks" for these effects even if it is intentional that they are applied in ticks.

This is probably intended. I would label this as a feature and not a bug. Since these effects are instant, it probably makes sense that they go by the tick. Still true in 1.8

Confirmed in 15w36d
The following command does as expected. It states the effect is applied for 20 seconds and applies the effect for 20 seconds
/effect @a night_vision 20 0
The following command does not do as expected. It states that the command is applied for 20 seconds but actually applies the effect for 20 ticks (1 second)
/effect @a saturation 20 0
The effects should be consistent using either ticks or seconds preferably ticks because that allows more fine control but the actual bug here is that it states it is applying the effect for n seconds but is actually applying the effect for n ticks for certain potion effects

Confirmed for 15w43b.

Fixed for Saturation, so why not the others?

This problem still exists in 1.13 and 1.13.1. The tool tip says <Seconds> but it is actually in ticks.

IMO this should be for all effects.

Agreed. More specifically I think /effect should use the duration system used by /time and the like.

My suggested fix is to change the field from seconds to duration and adding a "t" or "s" after the inputted value determines whether its in ticks or seconds.
Not sure when exactly that was re-introduced, but it does apply to saturation again in at least 1.16.5 and 1.18.1

Um, what does the "and custom potions" refer to in the title?
Also, 100% sure it was never changed for saturation; it always applied in ticks.

Can confirm in 22w12a

Given the changes to the /weather and /title times commands in 23w03a, perhaps this should be reflected in the title of this bug?

That would make this requesting a change, rather than reporting a bug. This issue is about the value being treated differently based on the effect type, not the lack of t, s and d suffix usage.

relates to MC-139527, which needs to be updated.

Still affects modern minecraft up through 1.19.4-pre1.
effect give @s minecraft:saturation 1200 0 true
Will only give 60 seconds of saturation.