mojira.dev
MC-142061

Saturation effect can't have duration applied to a potion, but can using /effect

So i was trying to make a potion that had saturation 4 for 6000 ticks.  So that i could make items they could buy to keep their hunger full for a set amount of time. But when i tried.

What i did:

/give @p minecraft:potion{CustomPotionEffects:[{Id:23b,Amplifier:4b,Duration:6000}]} 1

What should of happened:

Have gotten a potion when drank, refills your hunger completely for 5 minutes.

What actually happened:

Just filled my hunger for a second.

How to make it work:

/effect give {name} minecraft:saturation 600 4

 

I dont see why the saturation effect shouldnt be allowed to have a duration tag attached to it when its in potion form but can in a base command. Please add it.

Linked issues

Attachments

Comments 16

This is not a duplicate post. That post is purely talking about the 

/effect Command.

I am talking about the 

Potion Effect. Two very different things.

Is this not due to it being applied in ticks?

No, this is not. 6000 ticks is five minutes.

 

This is a reversion of MC-112389.

This custom potion effect hasn't worked since 1.11, even though the ticket was marked as resolved. Try it in 1.7.10, you'll see it works just fine.

/give @p minecraft:potion 1 0 {CustomPotionEffects:[{Id:23,Duration:3600}]}

 

Confirmed in 1.16 Release Candidate 1.

Can confirm in 20w51a.

6 more comments

Can confirm in 1.17.

Can confirm in 1.17.1.

Krishna Kokatay

Confirmed in 1.18,1, 1.18,2, 1.19, 1.19.2, 1.19.3, and 1.19.4-pre1.

Is this ever going to be resolved? Since 

execute as @a[nbt={ActiveEffects:[{Id:23}]}] run say I have saturation.

doesn't trigger on any ticks, I'm currently using a work around by using an amplified luck potion to trigger the effect command. 

Sort of a workaround but you can now make food items that have a 100% chance to give effects, even Saturation/Instant Health/Instant Damage that have more than 1 tick

Tipped arrows do trigger the proper duration, as do custom food components, but neither splash nor lingering potions do.

Testing in a modded server environment seems to indicate (though I can’t be 100% sure that they’re not quirky too) that the effect is never applied in the first place, it just does the healing/hurting/hunger refilling one tick would do and then leaves.

Ghostly

(Unassigned)

Confirmed

Items

item

Minecraft 1.13.2, 1.15.1, 1.16 Release Candidate 1, 1.16, 20w51a, ..., 1.19.4 Pre-release 1, 1.19.4, 1.21 Pre-Release 4, 1.21.4, 25w08a

Retrieved