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

@@ -20,21 +20,21 @@
+ // CraftBukkit start accessor methods
+ public void refreshEffects() {
+ if (!this.fixedColor) {
+ this.getDataWatcher().set(EntityAreaEffectCloud.DATA_COLOR, PotionUtil.a((Collection) PotionUtil.a(this.potion, (Collection) this.effects))); // PAIL: rename
+ this.getEntityData().set(EntityAreaEffectCloud.DATA_COLOR, PotionUtil.getColor((Collection) PotionUtil.getAllEffects(this.potion, this.effects)));
+ }
+ }
+
+ public String getType() {
+ public String getPotionType() {
+ return ((MinecraftKey) IRegistry.POTION.getKey(this.potion)).toString();
+ }
+
+ public void setType(String string) {
+ a(IRegistry.POTION.get(new MinecraftKey(string)));
+ public void setPotionType(String string) {
+ setPotion(IRegistry.POTION.get(new MinecraftKey(string)));
+ }
+ // CraftBukkit end
+
public int getColor() {
return (Integer) this.getDataWatcher().get(EntityAreaEffectCloud.DATA_COLOR);
return (Integer) this.getEntityData().get(EntityAreaEffectCloud.DATA_COLOR);
}
@@ -259,6 +281,7 @@
if (!list1.isEmpty()) {
@@ -63,8 +63,8 @@
Iterator iterator2 = list.iterator();
@@ -277,7 +311,7 @@
if (mobeffect1.getMobEffect().isInstant()) {
mobeffect1.getMobEffect().applyInstantEffect(this, this.getSource(), entityliving, mobeffect1.getAmplifier(), 0.5D);
if (mobeffect1.getEffect().isInstantenous()) {
mobeffect1.getEffect().applyInstantenousEffect(this, this.getOwner(), entityliving, mobeffect1.getAmplifier(), 0.5D);
} else {
- entityliving.addEffect(new MobEffect(mobeffect1), this);
+ entityliving.addEffect(new MobEffect(mobeffect1), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AREA_EFFECT_CLOUD); // CraftBukkit