#Potion Swap

15 messages · Page 1 of 1 (latest)

rich wharf
#

Is it possible to swap a potion with a different potion nbt upon crafting/pickup/use?

#

I want to effectively ban the use of Cyclic's Potion of Flight

shadow void
#

Wouldn't it be easier to just disable the item in script? Then it wouldn't be generated/registered and can't be found or made in the first place?
Alternately just remove it from all loottables, remove it's recipes, and hide it in JEI/REI?

vocal lichen
#

I think its a potion effect

rich wharf
#

I tried. Doesn't seem to work for potions or I'm doing something wrong

vocal lichen
#

so you'd be banning all potions if you did that

clever heart
#

u could check on player.tick if they have an active effect with event.player.activeEffects and then cancel it out if all comes to worse

#

player.removeEffect('mod:effect') would then be used to remove the effect

#
PlayerEvents.tick( (event) => {
    const {player} = event
    if(player.hasEffect('mod:effect')) player.removeEffect('mod:effect')
})
silver fractal
#

Yep, Tazz is testing it for me rn :p

clever heart
#

monka yea... real life kicked me in the balls the last few days, im going back to work tomorrow

rich wharf
#

I'm trying out MoreJS and can't seem to get it to work. I tried
event.removeByPotion("minecraft:chorus_fruit", null, null); and event.removeByPotion(null, null, "cyclic:flight"); but am still able to brew the Potion of Flight. No errors though.

slender sleetBOT
#

MoreJS is a KubeJS addon with additional events for villager/wanderer trades, structures, the enchantment table, potion brewing and more.

cloud wharf
#

might be better to ask in morejs' discord