Jump to content

[1.12.2] addPotionEffect help


PCDCreeper

Recommended Posts

I am trying to set a potion after a delay. basically when a block is right-clicked then timers start before said effects start. Im using

				Minecraft.getMinecraft().player.addPotionEffect(new PotionEffect(ModPotions.MUNCHIES, 1200, 10, false, false));

and this makes the effect start, but then weird things happen

 

Gui displays the potion effect, but the actual effect (a hunger copy) doesnt happen, and upon reaching the potion effect end, it just sits, making me believe im missing a step.

 

When i use

	public static final Item EDIBLE_COOKIE = new FoodEffectBase("edible_cookie", 2, 0.1f, false, new PotionEffect(ModPotions.MUNCHIES, 10000, 0, false, false), "This should be fun!");

It works just fine. Effect works as normal. using /effect also works perfectly

 

So what is it that im missing? I feel like somewhere im missing something obvious...

Edited by PCDCreeper
Link to comment
Share on other sites

2 minutes ago, PCDCreeper said:

So what is it that im missing? I feel like somewhere im missing something obvious...

1.12.2 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. For more information read the LTS at the top of the page.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.