Class VanillaBrewingRecipe
java.lang.Object
net.minecraftforge.common.brewing.VanillaBrewingRecipe
- All Implemented Interfaces:
IBrewingRecipe
Used in BrewingRecipeRegistry to maintain the vanilla behaviour.
Most of the code was simply adapted from net.minecraft.tileentity.TileEntityBrewingStand
-
Field Summary
Modifier and TypeFieldDescriptionprivate final PotionBrewing
private final BiFunction
<ItemStack, ItemStack, ItemStack> -
Constructor Summary
ConstructorDescriptionVanillaBrewingRecipe
(PotionBrewing vanilla, BiFunction<ItemStack, ItemStack, ItemStack> vanillaMix) -
Method Summary
Modifier and TypeMethodDescriptionCode 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
Code adapted from TileEntityBrewingStand.isItemValidForSlot(int index, ItemStack stack)
-
Field Details
-
vanilla
-
vanillaMix
-
-
Constructor Details
-
VanillaBrewingRecipe
public VanillaBrewingRecipe(PotionBrewing vanilla, BiFunction<ItemStack, ItemStack, ItemStack> vanillaMix)
-
-
Method Details
-
isInput
Code adapted from TileEntityBrewingStand.isItemValidForSlot(int index, ItemStack stack)- Specified by:
isInput
in interfaceIBrewingRecipe
-
isIngredient
Code adapted from TileEntityBrewingStand.isItemValidForSlot(int index, ItemStack stack)- Specified by:
isIngredient
in interfaceIBrewingRecipe
-
getOutput
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 interfaceIBrewingRecipe
-