i'm trying to make a way to extract potion effects from entities back into potion using an item for the extraction which stores the entity type and the ActiveStatusEffects and then a block which takes that item to extract the StatusEffects from it. Problem is that i'm having a lot of trouble storing the ActiveStatusEffects into nbt and into the block for the extraction. right now it just gives me an uncraftable potion every single time
#Need help with potion effect shenanigans
1 messages · Page 1 of 1 (latest)
So you need someone to guide you through or make it for you?
i just need some help with the code
here's what i've got so far
its a bit of a mess but it should give an idea of what i'm going for
Uncraftable potion is correct, but you need to attach the potion data to the stack
See DataComponentTypes
so initializing the effects and applying them to the potion like what im doing isnt enough
noted
so where is that exactly?
im in 1.20.1 btw
You’re actually not applying them to the potion
Ah, so in 1.20.1 data component types don’t exist so you have to use nbt
I don’t know how potion nbt is applied in 1.20.1
then what am i doing?
i thought that the setCustomPotionEffect function would do it but its still not working
You’re not putting that stack in the slot though