1.21.5
Co-authored-by: Bjarne Koll <git@lynxplay.dev> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Co-authored-by: MiniDigger | Martin <admin@minidigger.dev> Co-authored-by: Nassim Jahnke <nassim@njahnke.dev> Co-authored-by: Noah van der Aa <ndvdaa@gmail.com> Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Co-authored-by: Shane Freeder <theboyetronic@gmail.com> Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com> Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com> Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
--- a/net/minecraft/world/entity/AreaEffectCloud.java
|
||||
+++ b/net/minecraft/world/entity/AreaEffectCloud.java
|
||||
@@ -47,7 +_,7 @@
|
||||
public float radiusOnUse;
|
||||
public float radiusPerTick;
|
||||
@@ -59,7 +_,7 @@
|
||||
public float radiusOnUse = 0.0F;
|
||||
public float radiusPerTick = 0.0F;
|
||||
@Nullable
|
||||
- private LivingEntity owner;
|
||||
+ private net.minecraft.world.entity.LivingEntity owner;
|
||||
@Nullable
|
||||
public UUID ownerUUID;
|
||||
|
||||
@@ -177,7 +_,7 @@
|
||||
@@ -193,7 +_,7 @@
|
||||
|
||||
private void serverTick(ServerLevel level) {
|
||||
if (this.tickCount >= this.waitTime + this.duration) {
|
||||
if (this.duration != -1 && this.tickCount >= this.waitTime + this.duration) {
|
||||
- this.discard();
|
||||
+ this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
|
||||
} else {
|
||||
boolean isWaiting = this.isWaiting();
|
||||
boolean flag = this.tickCount < this.waitTime;
|
||||
@@ -190,7 +_,7 @@
|
||||
@@ -206,7 +_,7 @@
|
||||
if (this.radiusPerTick != 0.0F) {
|
||||
radius += this.radiusPerTick;
|
||||
if (radius < 0.5F) {
|
||||
@@ -27,15 +27,15 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -220,6 +_,7 @@
|
||||
list.addAll(this.potionContents.customEffects());
|
||||
@@ -222,6 +_,7 @@
|
||||
this.potionContents.forEachEffect(list::add, this.potionDurationScale);
|
||||
List<LivingEntity> entitiesOfClass = this.level().getEntitiesOfClass(LivingEntity.class, this.getBoundingBox());
|
||||
if (!entitiesOfClass.isEmpty()) {
|
||||
+ List<org.bukkit.entity.LivingEntity> entities = new java.util.ArrayList<>(); // CraftBukkit
|
||||
for (LivingEntity livingEntity : entitiesOfClass) {
|
||||
if (!this.victims.containsKey(livingEntity)
|
||||
&& livingEntity.isAffectedByPotions()
|
||||
@@ -228,6 +_,17 @@
|
||||
@@ -230,6 +_,17 @@
|
||||
double d1 = livingEntity.getZ() - this.getZ();
|
||||
double d2 = d * d + d1 * d1;
|
||||
if (d2 <= radius * radius) {
|
||||
@@ -52,13 +52,13 @@
|
||||
+ // CraftBukkit end
|
||||
this.victims.put(livingEntity, this.tickCount + this.reapplicationDelay);
|
||||
|
||||
for (MobEffectInstance mobEffectInstance1 : list) {
|
||||
@@ -236,14 +_,14 @@
|
||||
for (MobEffectInstance mobEffectInstance : list) {
|
||||
@@ -238,14 +_,14 @@
|
||||
.value()
|
||||
.applyInstantenousEffect(level, this, this.getOwner(), livingEntity, mobEffectInstance1.getAmplifier(), 0.5);
|
||||
.applyInstantenousEffect(level, this, this.getOwner(), livingEntity, mobEffectInstance.getAmplifier(), 0.5);
|
||||
} else {
|
||||
- livingEntity.addEffect(new MobEffectInstance(mobEffectInstance1), this);
|
||||
+ livingEntity.addEffect(new MobEffectInstance(mobEffectInstance1), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AREA_EFFECT_CLOUD); // CraftBukkit
|
||||
- livingEntity.addEffect(new MobEffectInstance(mobEffectInstance), this);
|
||||
+ livingEntity.addEffect(new MobEffectInstance(mobEffectInstance), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AREA_EFFECT_CLOUD); // CraftBukkit
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,8 +70,8 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -253,7 +_,7 @@
|
||||
if (this.durationOnUse != 0) {
|
||||
@@ -255,7 +_,7 @@
|
||||
if (this.durationOnUse != 0 && this.duration != -1) {
|
||||
this.duration = this.duration + this.durationOnUse;
|
||||
if (this.duration <= 0) {
|
||||
- this.discard();
|
||||
|
||||
Reference in New Issue
Block a user