Posted February 28, 20223 yr Hello! Right now, I've created a potion called "Red Wine" that simply gives the player nausea, here is the code : Quote public class RegistryHandler { public static final DeferredRegister<Potion> POTIONS = DeferredRegister.create(ForgeRegistries.POTION_TYPES, OfWineAndCheese.MODID); //Init function public static final RegistryObject<Potion> RED_WINE = POTIONS.register("red_wine", () -> new Potion(new EffectInstance(Effects.CONFUSION.getEffect(), 600, 0))); } My potion appears correctly in the ItemGroup.TAB_BREWING with it's name (json and all that). Now, I would like for this potion to use a texture other than the "default" one. How could I achieve that? I searched the internet, but I only found tutorial on how to create effects. I also looked at the Potion class (obviously) and I did not see anything relating to texture or whatnot. Thanks in advance.
February 28, 20223 yr i'm not sure if this will work but, vanilla calculates the Potion Color in PotionUtils.getColor this way is registered in ItemColors the idea is now you subscribe to ColorHandlerEvent.Item and remove there the ItemColor for the PotionItem, SplashPotionItem and the LingeringPotionItem then add a custom ItemColor for the these Items Note: you need Reflection or an AT to remove the ItemColors for the Items
March 3, 20223 yr To start, if I'm not utterly wrong, this is how I register my custom model : https://wtools.io/paste-code/b9LW For the tintidex, I precise it in the .json I guess ? Also, I'm going to appear dumb, but when you speak of overriding both methods, what methods are you speaking about ? Here's my code : https://wtools.io/paste-code/b9LY Thanks.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.