So I’m having issues creating potions. I can’t find anything regarding splash potions. The current test code I have throws an error regarding the display name. if I comment out the custom display name no error, but the potion itself has no effect. So where have I gone wrong?
ItemStack stack = WarpedLiterature.getGame().getRegistry().createItemBuilder().itemType(ItemTypes.POTION).quantity(1).build();
stack.offer(Keys.DISPLAY_NAME, Texts.of("Test Potion"));
List<PotionEffect> effects = new ArrayList<PotionEffect>();
effects.add(WarpedLiterature.getGame().getRegistry().createPotionEffectBuilder().potionType(PotionEffectTypes.SLOWNESS).duration(200).build());
stack.offer(Keys.POTION_EFFECTS, effects);
List<Text> lore = new ArrayList<Text>();
lore.add(Texts.of("Blank"));
stack.offer(Keys.ITEM_LORE, lore);