@@ -22,7 +22,7 @@ public class CraftPotionBrewer implements PotionBrewer {
|
||||
if (cache.containsKey(damage))
|
||||
return cache.get(damage);
|
||||
|
||||
List<MobEffect> mcEffects = PotionRegistry.a(CraftPotionUtil.fromBukkit(new PotionData(damage, extended, upgraded))).a();
|
||||
List<MobEffect> mcEffects = PotionRegistry.byName(CraftPotionUtil.fromBukkit(new PotionData(damage, extended, upgraded))).getEffects();
|
||||
|
||||
ImmutableList.Builder<PotionEffect> builder = new ImmutableList.Builder<PotionEffect>();
|
||||
for (MobEffect effect : mcEffects) {
|
||||
|
||||
@@ -95,7 +95,7 @@ public class CraftPotionEffectType extends PotionEffectType {
|
||||
|
||||
@Override
|
||||
public boolean isInstant() {
|
||||
return handle.isInstant();
|
||||
return handle.isInstantenous();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -100,16 +100,16 @@ public class CraftPotionUtil {
|
||||
}
|
||||
|
||||
public static MobEffect fromBukkit(PotionEffect effect) {
|
||||
MobEffectList type = MobEffectList.fromId(effect.getType().getId());
|
||||
MobEffectList type = MobEffectList.byId(effect.getType().getId());
|
||||
return new MobEffect(type, effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles());
|
||||
}
|
||||
|
||||
public static PotionEffect toBukkit(MobEffect effect) {
|
||||
PotionEffectType type = PotionEffectType.getById(MobEffectList.getId(effect.getMobEffect()));
|
||||
PotionEffectType type = PotionEffectType.getById(MobEffectList.getId(effect.getEffect()));
|
||||
int amp = effect.getAmplifier();
|
||||
int duration = effect.getDuration();
|
||||
boolean ambient = effect.isAmbient();
|
||||
boolean particles = effect.isShowParticles();
|
||||
boolean particles = effect.isVisible();
|
||||
return new PotionEffect(type, duration, amp, ambient, particles);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user