@Deprecated public class Potion extends Object
Constructor and Description |
---|
Potion(int name)
Deprecated.
|
Potion(PotionType type)
Deprecated.
Construct a new potion of the given type.
|
Potion(PotionType type,
int level)
Deprecated.
Create a new potion of the given type and level.
|
Potion(PotionType type,
int level,
boolean splash)
Deprecated.
In favour of using
Potion(PotionType) with splash() . |
Potion(PotionType type,
int level,
boolean splash,
boolean extended)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(ItemStack to)
Deprecated.
Applies the effects of this potion to the given
ItemStack . |
void |
apply(LivingEntity to)
Deprecated.
Applies the effects that would be applied by this potion to the given
LivingEntity . |
boolean |
equals(Object obj)
Deprecated.
|
Potion |
extend()
Deprecated.
Chain this to the constructor to extend the potion's duration.
|
static Potion |
fromDamage(int damage)
Deprecated.
|
static Potion |
fromItemStack(ItemStack item)
Deprecated.
|
static PotionBrewer |
getBrewer()
Deprecated.
Returns an instance of
PotionBrewer . |
Collection<PotionEffect> |
getEffects()
Deprecated.
|
int |
getLevel()
Deprecated.
Returns the level of this potion.
|
int |
getNameId()
Deprecated.
Non-functional
|
PotionType |
getType()
Deprecated.
Returns the
PotionType of this potion. |
boolean |
hasExtendedDuration()
Deprecated.
Returns whether this potion has an extended duration.
|
int |
hashCode()
Deprecated.
|
boolean |
isSplash()
Deprecated.
Returns whether this potion is a splash potion.
|
void |
setHasExtendedDuration(boolean isExtended)
Deprecated.
Set whether this potion has extended duration.
|
void |
setLevel(int level)
Deprecated.
Sets the level of this potion.
|
static void |
setPotionBrewer(PotionBrewer other)
Deprecated.
Sets the current instance of
PotionBrewer . |
void |
setSplash(boolean isSplash)
Deprecated.
Sets whether this potion is a splash potion.
|
void |
setType(PotionType type)
Deprecated.
Sets the
PotionType of this potion. |
Potion |
splash()
Deprecated.
Chain this to the constructor to make the potion a splash potion.
|
short |
toDamageValue()
Deprecated.
Non-functional
|
ItemStack |
toItemStack(int amount)
Deprecated.
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)
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)
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 Collection<PotionEffect> getEffects()
PotionBrewer.getEffectsFromDamage(int)
,
toDamageValue()
public int getLevel()
public PotionType getType()
PotionType
of this potion.public boolean hasExtendedDuration()
public 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()
Copyright © 2017. All rights reserved.