mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-26 18:03:51 -07:00
@@ -33,33 +33,6 @@ public class Potion {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated In favour of {@link #Potion(PotionType, int)}
|
||||
*/
|
||||
@Deprecated
|
||||
public Potion(PotionType type, Tier tier) {
|
||||
this(type, tier == Tier.TWO ? 2 : 1);
|
||||
Validate.notNull(type, "Type cannot be null");
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated In favour of {@link #Potion(PotionType, int, boolean)}
|
||||
*/
|
||||
@Deprecated
|
||||
public Potion(PotionType type, Tier tier, boolean splash) {
|
||||
this(type, tier == Tier.TWO ? 2 : 1, splash);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated In favour of {@link #Potion(PotionType, int, boolean,
|
||||
* boolean)}
|
||||
*/
|
||||
@Deprecated
|
||||
public Potion(PotionType type, Tier tier, boolean splash, boolean extended) {
|
||||
this(type, tier, splash);
|
||||
this.extended = extended;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new potion of the given type and level.
|
||||
*
|
||||
@@ -192,17 +165,6 @@ public class Potion {
|
||||
return level;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the {@link Tier} of this potion.
|
||||
*
|
||||
* @return The tier of this potion
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public Tier getTier() {
|
||||
return level == 2 ? Tier.TWO : Tier.ONE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the {@link PotionType} of this potion.
|
||||
*
|
||||
@@ -261,18 +223,6 @@ public class Potion {
|
||||
splash = isSplash;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@link Tier} of this potion.
|
||||
*
|
||||
* @param tier The new tier of this potion
|
||||
* @deprecated In favour of {@link #setLevel(int)}
|
||||
*/
|
||||
@Deprecated
|
||||
public void setTier(Tier tier) {
|
||||
Validate.notNull(tier, "tier cannot be null");
|
||||
this.level = (tier == Tier.TWO ? 2 : 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@link PotionType} of this potion.
|
||||
*
|
||||
@@ -326,30 +276,6 @@ public class Potion {
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public enum Tier {
|
||||
ONE(0),
|
||||
TWO(0x20);
|
||||
|
||||
private int damageBit;
|
||||
|
||||
Tier(int bit) {
|
||||
damageBit = bit;
|
||||
}
|
||||
|
||||
public int getDamageBit() {
|
||||
return damageBit;
|
||||
}
|
||||
|
||||
public static Tier getByDamageBit(int damageBit) {
|
||||
for (Tier tier : Tier.values()) {
|
||||
if (tier.damageBit == damageBit)
|
||||
return tier;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static PotionBrewer brewer;
|
||||
|
||||
private static final int EXTENDED_BIT = 0x40;
|
||||
|
Reference in New Issue
Block a user