mojira.dev
MC-19648

The "/effect" command sets time for instant effects to ticks and not to seconds

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.

Linked issues

MC-28366 /effect Duration Problems/Inconsistency Resolved MC-52422 Saturation effect command incorrect seconds Resolved MC-62742 /effect command doesn't work well Resolved MC-91165 The 'seconds' parameter of /effect is using game-ticks instead of seconds Resolved MC-101483 When using /effect, the time of the effect given to a player doesn't match the time it the chat says Resolved

Attachments

Comments 21

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.

11 more comments

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.

Krishna Kokatay

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.

Avstar98

(Unassigned)

Confirmed

Platform

Low

Commands

Minecraft 1.6.1, Minecraft 1.6.2, Minecraft 1.7.4, Minecraft 14w02c, Minecraft 14w03b, ..., 1.20.5 Pre-Release 3, 1.20.6, 1.21 Pre-Release 4, 1.21.1, 24w35a

Retrieved