mirror of
https://github.com/PaperMC/Paper.git
synced 2025-09-02 05:13:51 -07:00
@@ -370,6 +370,11 @@ public class Potion {
|
||||
private static final int TIER_SHIFT = 5;
|
||||
private static final int NAME_BIT = 0x3F;
|
||||
|
||||
/**
|
||||
*
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public static Potion fromDamage(int damage) {
|
||||
PotionType type = PotionType.getByDamageValue(damage & POTION_BIT);
|
||||
Potion potion;
|
||||
@@ -417,6 +422,11 @@ public class Potion {
|
||||
brewer = other;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public int getNameId() {
|
||||
return name;
|
||||
}
|
||||
|
@@ -23,6 +23,8 @@ public interface PotionBrewer {
|
||||
*
|
||||
* @param damage The data value of the potion
|
||||
* @return The list of effects
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public Collection<PotionEffect> getEffectsFromDamage(int damage);
|
||||
}
|
||||
|
@@ -154,7 +154,9 @@ public abstract class PotionEffectType {
|
||||
* Returns the unique ID of this type.
|
||||
*
|
||||
* @return Unique ID
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
@@ -208,7 +210,9 @@ public abstract class PotionEffectType {
|
||||
*
|
||||
* @param id Unique ID to fetch
|
||||
* @return Resulting type, or null if not found.
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public static PotionEffectType getById(int id) {
|
||||
if (id >= byId.length || id < 0)
|
||||
return null;
|
||||
|
@@ -28,6 +28,11 @@ public enum PotionType {
|
||||
return effect;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public int getDamageValue() {
|
||||
return damageValue;
|
||||
}
|
||||
@@ -40,6 +45,11 @@ public enum PotionType {
|
||||
return effect == null ? true : effect.isInstant();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public static PotionType getByDamageValue(int damage) {
|
||||
for (PotionType type : PotionType.values()) {
|
||||
if (type.damageValue == damage)
|
||||
@@ -48,6 +58,11 @@ public enum PotionType {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public static PotionType getByEffect(PotionEffectType effectType) {
|
||||
if (effectType == null)
|
||||
return WATER;
|
||||
|
Reference in New Issue
Block a user