@Deprecated
public class Potion
extends java.lang.Object
| 构造器和说明 |
|---|
Potion(int name)
已过时。
|
Potion(PotionType type)
已过时。
Construct a new potion of the given type.
|
Potion(PotionType type,
int level)
已过时。
Create a new potion of the given type and level.
|
Potion(PotionType type,
int level,
boolean splash)
已过时。
In favour of using
Potion(PotionType) with splash(). |
Potion(PotionType type,
int level,
boolean splash,
boolean extended)
已过时。
In favour of using
Potion(PotionType) with extend() and possibly splash(). |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
apply(ItemStack to)
已过时。
Applies the effects of this potion to the given
ItemStack. |
void |
apply(LivingEntity to)
已过时。
Applies the effects that would be applied by this potion to the given
LivingEntity. |
boolean |
equals(java.lang.Object obj)
已过时。
|
Potion |
extend()
已过时。
Chain this to the constructor to extend the potion's duration.
|
static Potion |
fromDamage(int damage)
已过时。
|
static Potion |
fromItemStack(ItemStack item)
已过时。
|
static PotionBrewer |
getBrewer()
已过时。
Returns an instance of
PotionBrewer. |
java.util.Collection<PotionEffect> |
getEffects()
已过时。
|
int |
getLevel()
已过时。
Returns the level of this potion.
|
int |
getNameId()
已过时。
Non-functional
|
PotionType |
getType()
已过时。
Returns the
PotionType of this potion. |
boolean |
hasExtendedDuration()
已过时。
Returns whether this potion has an extended duration.
|
int |
hashCode()
已过时。
|
boolean |
isSplash()
已过时。
Returns whether this potion is a splash potion.
|
void |
setHasExtendedDuration(boolean isExtended)
已过时。
Set whether this potion has extended duration.
|
void |
setLevel(int level)
已过时。
Sets the level of this potion.
|
static void |
setPotionBrewer(PotionBrewer other)
已过时。
Sets the current instance of
PotionBrewer. |
void |
setSplash(boolean isSplash)
已过时。
Sets whether this potion is a splash potion.
|
void |
setType(PotionType type)
已过时。
Sets the
PotionType of this potion. |
Potion |
splash()
已过时。
Chain this to the constructor to make the potion a splash potion.
|
short |
toDamageValue()
已过时。
Non-functional
|
ItemStack |
toItemStack(int amount)
已过时。
Converts this potion to an
ItemStack with the specified amount
and a correct damage value. |
public Potion(PotionType type)
PotionType.WATER, it will be level one, without extended duration.
Don't use this constructor to create a no-effect potion other than
water bottle.type - The potion typePotion(int)public Potion(PotionType type, int level)
type - The type of potion.level - The potion's level.@Deprecated public Potion(PotionType type, int level, boolean splash)
Potion(PotionType) with splash().type - The type of potion.level - The potion's level.splash - Whether it is a splash potion.@Deprecated public Potion(PotionType type, int level, boolean splash, boolean extended)
Potion(PotionType) with extend() and possibly splash().type - The type of potion.level - The potion's level.splash - Whether it is a splash potion.extended - Whether it has an extended duration.@Deprecated public Potion(int name)
public Potion splash()
public Potion extend()
public void apply(ItemStack to)
ItemStack. The
ItemStack must be a potion.to - The itemstack to apply topublic void apply(LivingEntity to)
LivingEntity.to - The entity to apply the effects toLivingEntity.addPotionEffects(Collection)public boolean equals(java.lang.Object obj)
equals 在类中 java.lang.Objectpublic java.util.Collection<PotionEffect> getEffects()
PotionBrewer.getEffectsFromDamage(int),
toDamageValue()public int getLevel()
public PotionType getType()
PotionType of this potion.public boolean hasExtendedDuration()
public int hashCode()
hashCode 在类中 java.lang.Objectpublic boolean isSplash()
public void setHasExtendedDuration(boolean isExtended)
isExtended - Whether the potion should have extended durationpublic void setSplash(boolean isSplash)
isSplash - Whether this is a splash potionpublic void setType(PotionType type)
PotionType of this potion.type - The new type of this potionpublic void setLevel(int level)
level - The new level of this potion@Deprecated public short toDamageValue()
public ItemStack toItemStack(int amount)
ItemStack with the specified amount
and a correct damage value.amount - The amount of the ItemStackpublic static Potion fromDamage(int damage)
damage - the damage valuepublic static PotionBrewer getBrewer()
PotionBrewer.public static void setPotionBrewer(PotionBrewer other)
PotionBrewer. Generally not to be
used from within a plugin.other - The new PotionBrewer@Deprecated public int getNameId()