Class VanillaBrewingRecipe

  • All Implemented Interfaces:
    IBrewingRecipe

    public class VanillaBrewingRecipe
    extends java.lang.Object
    implements IBrewingRecipe
    Used in BrewingRecipeRegistry to maintain the vanilla behaviour. Most of the code was simply adapted from net.minecraft.tileentity.TileEntityBrewingStand
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ItemStack getOutput​(ItemStack input, ItemStack ingredient)
      Code copied from TileEntityBrewingStand.brewPotions() It brews the potion by doing the bit-shifting magic and then checking if the new PotionEffect list is different to the old one, or if the new potion is a splash potion when the old one wasn't.
      boolean isIngredient​(ItemStack stack)
      Code adapted from TileEntityBrewingStand.isItemValidForSlot(int index, ItemStack stack)
      boolean isInput​(ItemStack stack)
      Code adapted from TileEntityBrewingStand.isItemValidForSlot(int index, ItemStack stack)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VanillaBrewingRecipe

        public VanillaBrewingRecipe()
    • Method Detail

      • isInput

        public boolean isInput​(ItemStack stack)
        Code adapted from TileEntityBrewingStand.isItemValidForSlot(int index, ItemStack stack)
        Specified by:
        isInput in interface IBrewingRecipe
      • isIngredient

        public boolean isIngredient​(ItemStack stack)
        Code adapted from TileEntityBrewingStand.isItemValidForSlot(int index, ItemStack stack)
        Specified by:
        isIngredient in interface IBrewingRecipe
      • getOutput

        public ItemStack getOutput​(ItemStack input,
                                   ItemStack ingredient)
        Code copied from TileEntityBrewingStand.brewPotions() It brews the potion by doing the bit-shifting magic and then checking if the new PotionEffect list is different to the old one, or if the new potion is a splash potion when the old one wasn't.
        Specified by:
        getOutput in interface IBrewingRecipe