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.

Related issues

Attachments

Comments

migrated
[media]
migrated

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.

muzikbike

Is this not due to it being applied in ticks?

migrated

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}]}

 

migrated

Confirmed in 1.16 Release Candidate 1.

Avoma

Can confirm in 20w51a.

Avoma

Can confirm in 21w03a.

Avoma

Can confirm in 21w05b.

Avoma

Can confirm in 21w06a.

Avoma

Can confirm in 1.16.5 and 21w08b.

Avoma

Can confirm in 21w10a. Video attached.

migrated

Can confirm in 21w20a.

Avoma

Can confirm in 1.17.

Avoma

Can confirm in 1.17.1.

migrated

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. 

evanultra01

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

Sotuanduso

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.

migrated

(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