summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityPotion.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-05-10 21:47:39 +1000
committermd_5 <git@md-5.net>2016-05-10 21:47:39 +1000
commitc5e9a169fa564f3b8119b6666f8df59d5a9b45c3 (patch)
tree9f3b1ce732f0082b71512b1dddb7abb35526226e /nms-patches/EntityPotion.patch
parent4cb32587ac1ff543b2efa9498f8d0d358cb90c12 (diff)
downloadcraftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.tar
craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.tar.gz
craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.tar.lz
craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.tar.xz
craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.zip
Minecraft 1.9.4
Diffstat (limited to 'nms-patches/EntityPotion.patch')
-rw-r--r--nms-patches/EntityPotion.patch19
1 files changed, 8 insertions, 11 deletions
diff --git a/nms-patches/EntityPotion.patch b/nms-patches/EntityPotion.patch
index 471800d4..07c28cea 100644
--- a/nms-patches/EntityPotion.patch
+++ b/nms-patches/EntityPotion.patch
@@ -1,6 +1,6 @@
--- a/net/minecraft/server/EntityPotion.java
+++ b/net/minecraft/server/EntityPotion.java
-@@ -6,6 +6,13 @@
+@@ -7,6 +7,13 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -14,20 +14,20 @@
public class EntityPotion extends EntityProjectile {
private static final DataWatcherObject<Optional<ItemStack>> d = DataWatcher.a(EntityItem.class, DataWatcherRegistry.f);
-@@ -77,10 +84,11 @@
+@@ -78,10 +85,11 @@
this.world.triggerEffect(2002, new BlockPosition(this), PotionRegistry.a(potionregistry));
this.die();
} else {
- if (!list.isEmpty()) {
+ if (true || !list.isEmpty()) { // CraftBukkit - Call event even if no effects to apply
- if (this.n()) {
+ if (this.isLingering()) {
EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.world, this.locX, this.locY, this.locZ);
+ entityareaeffectcloud.projectileSource = this.projectileSource; // CraftBukkit
- entityareaeffectcloud.a(this.getShooter());
+ entityareaeffectcloud.setSource(this.getShooter());
entityareaeffectcloud.setRadius(3.0F);
entityareaeffectcloud.setRadiusOnUse(-0.5F);
-@@ -95,11 +103,21 @@
+@@ -96,11 +104,21 @@
entityareaeffectcloud.a(new MobEffect(mobeffect.getMobEffect(), mobeffect.getDuration(), mobeffect.getAmplifier()));
}
@@ -50,7 +50,7 @@
if (!list1.isEmpty()) {
Iterator iterator1 = list1.iterator();
-@@ -116,21 +134,45 @@
+@@ -117,21 +135,45 @@
d1 = 1.0D;
}
@@ -110,7 +110,7 @@
}
}
}
-@@ -138,19 +180,20 @@
+@@ -139,10 +181,10 @@
}
}
}
@@ -124,10 +124,7 @@
}
}
-- private boolean n() {
-+ public boolean n() { // PAIL: rename, access
- return this.getItem().getItem() == Items.LINGERING_POTION;
- }
+@@ -152,6 +194,7 @@
private void a(BlockPosition blockposition) {
if (this.world.getType(blockposition).getBlock() == Blocks.FIRE) {