This commit is contained in:
vemacs 2016-04-01 20:52:20 -06:00
parent 8fe002f820
commit 60548e4523

View file

@ -30,8 +30,10 @@ public class BasePotionDataProvider extends PotionMetaProvider {
@Override
public ItemStack createPotionItem(Material initial, int effectId) throws IllegalArgumentException {
ItemStack potion = new ItemStack(initial, 1);
if (effectId == 0) {
return new ItemStack(Material.POTION, 1);
return potion;
}
int damageValue = getBit(effectId, 0) +
@ -48,12 +50,8 @@ public class BasePotionDataProvider extends PotionMetaProvider {
boolean upgraded = getBit(effectId, 5) == 1;
boolean splash = getBit(effectId, 14) == 1;
ItemStack potion;
if (splash && initial == Material.POTION) {
potion = new ItemStack(Material.SPLASH_POTION, 1);
} else {
potion = new ItemStack(initial, 1);
}
PotionMeta meta = (PotionMeta) potion.getItemMeta();