Update to Minecraft 1.18-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-22 09:00:00 +11:00
parent a852b81a69
commit 43702a9e10
700 changed files with 10286 additions and 10098 deletions

View File

@@ -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) {

View File

@@ -95,7 +95,7 @@ public class CraftPotionEffectType extends PotionEffectType {
@Override
public boolean isInstant() {
return handle.isInstant();
return handle.isInstantenous();
}
@Override

View File

@@ -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);
}