public class PotionHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
blazePowderEffect |
private static java.util.Map<java.lang.Integer,java.lang.Integer> |
DATAVALUE_COLORS |
static java.lang.String |
fermentedSpiderEyeEffect |
static java.lang.String |
field_77924_a |
static java.lang.String |
ghastTearEffect |
static java.lang.String |
glowstoneEffect |
static java.lang.String |
goldenCarrotEffect |
static java.lang.String |
gunpowderEffect |
static java.lang.String |
magmaCreamEffect |
private static java.util.Map<java.lang.Integer,java.lang.String> |
potionAmplifiers |
private static java.lang.String[] |
potionPrefixes
An array of possible potion prefix names, as translation IDs.
|
private static java.util.Map<java.lang.Integer,java.lang.String> |
potionRequirements |
static java.lang.String |
pufferfishEffect |
static java.lang.String |
rabbitFootEffect |
static java.lang.String |
redstoneEffect |
static java.lang.String |
speckledMelonEffect |
static java.lang.String |
spiderEyeEffect |
static java.lang.String |
sugarEffect |
Constructor and Description |
---|
PotionHelper() |
Modifier and Type | Method and Description |
---|---|
static int |
applyIngredient(int p_77913_0_,
java.lang.String p_77913_1_)
Returns the new potion damage value after the specified ingredient info is applied to the specified potion.
|
private static int |
brewBitOperations(int p_77906_0_,
int p_77906_1_,
boolean p_77906_2_,
boolean p_77906_3_,
boolean p_77906_4_)
Manipulates the specified bit of the potion damage value according to the rules passed from applyIngredient.
|
static int |
calcPotionLiquidColor(java.util.Collection<PotionEffect> p_77911_0_)
Given a
Collection <PotionEffect > will return an Integer color. |
static boolean |
checkFlag(int p_77914_0_,
int p_77914_1_)
Checks if the bit at 1 << j is on in i.
|
private static int |
countSetFlags(int p_77907_0_)
Returns the number of 1 bits in the given integer.
|
private static int |
func_77904_a(boolean p_77904_0_,
boolean p_77904_1_,
boolean p_77904_2_,
int p_77904_3_,
int p_77904_4_,
int p_77904_5_,
int p_77904_6_) |
static int |
func_77908_a(int p_77908_0_,
int p_77908_1_,
int p_77908_2_,
int p_77908_3_,
int p_77908_4_,
int p_77908_5_) |
static boolean |
getAreAmbient(java.util.Collection<PotionEffect> potionEffects)
Check whether a
Collection <PotionEffect > are all ambient. |
static int |
getLiquidColor(int dataValue,
boolean bypassCache)
Given a potion data value, get the associated liquid color (optionally bypassing the cache)
|
static java.util.List<PotionEffect> |
getPotionEffects(int p_77917_0_,
boolean p_77917_1_) |
static java.lang.String |
getPotionPrefix(int dataValue)
Given a potion data value, get its prefix as a translation ID.
|
static int |
getPotionPrefixIndex(int dataValue)
Given a potion data value, get its prefix index number.
|
private static int |
isFlagSet(int p_77910_0_,
int p_77910_1_)
Returns 1 if the flag is set, 0 if it is not set.
|
private static int |
isFlagUnset(int p_77916_0_,
int p_77916_1_)
Returns 0 if the flag is set, 1 if it is not set.
|
private static int |
parsePotionEffects(java.lang.String p_77912_0_,
int p_77912_1_,
int p_77912_2_,
int p_77912_3_) |
public static final java.lang.String field_77924_a
public static final java.lang.String sugarEffect
public static final java.lang.String ghastTearEffect
public static final java.lang.String spiderEyeEffect
public static final java.lang.String fermentedSpiderEyeEffect
public static final java.lang.String speckledMelonEffect
public static final java.lang.String blazePowderEffect
public static final java.lang.String magmaCreamEffect
public static final java.lang.String redstoneEffect
public static final java.lang.String glowstoneEffect
public static final java.lang.String gunpowderEffect
public static final java.lang.String goldenCarrotEffect
public static final java.lang.String pufferfishEffect
public static final java.lang.String rabbitFootEffect
private static final java.util.Map<java.lang.Integer,java.lang.String> potionRequirements
private static final java.util.Map<java.lang.Integer,java.lang.String> potionAmplifiers
private static final java.util.Map<java.lang.Integer,java.lang.Integer> DATAVALUE_COLORS
private static final java.lang.String[] potionPrefixes
public static boolean checkFlag(int p_77914_0_, int p_77914_1_)
private static int isFlagSet(int p_77910_0_, int p_77910_1_)
private static int isFlagUnset(int p_77916_0_, int p_77916_1_)
public static int getPotionPrefixIndex(int dataValue)
public static int calcPotionLiquidColor(java.util.Collection<PotionEffect> p_77911_0_)
Collection
<PotionEffect
> will return an Integer color.public static boolean getAreAmbient(java.util.Collection<PotionEffect> potionEffects)
Collection
<PotionEffect
> are all ambient.public static int getLiquidColor(int dataValue, boolean bypassCache)
public static java.lang.String getPotionPrefix(int dataValue)
private static int func_77904_a(boolean p_77904_0_, boolean p_77904_1_, boolean p_77904_2_, int p_77904_3_, int p_77904_4_, int p_77904_5_, int p_77904_6_)
private static int countSetFlags(int p_77907_0_)
private static int parsePotionEffects(java.lang.String p_77912_0_, int p_77912_1_, int p_77912_2_, int p_77912_3_)
public static java.util.List<PotionEffect> getPotionEffects(int p_77917_0_, boolean p_77917_1_)
private static int brewBitOperations(int p_77906_0_, int p_77906_1_, boolean p_77906_2_, boolean p_77906_3_, boolean p_77906_4_)
public static int applyIngredient(int p_77913_0_, java.lang.String p_77913_1_)
public static int func_77908_a(int p_77908_0_, int p_77908_1_, int p_77908_2_, int p_77908_3_, int p_77908_4_, int p_77908_5_)