summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntitySpider.patch
blob: 1820e8dfd80eae12b479834aff5c85aaa5f082a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- a/net/minecraft/server/EntitySpider.java
+++ b/net/minecraft/server/EntitySpider.java
@@ -115,7 +115,7 @@
 
             entityskeleton.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
             entityskeleton.prepare(difficultydamagescaler, (GroupDataEntity) null, (NBTTagCompound) null);
-            this.world.addEntity(entityskeleton);
+            this.world.addEntity(entityskeleton, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.JOCKEY); // CraftBukkit - add SpawnReason
             entityskeleton.startRiding(this);
         }
 
@@ -130,7 +130,7 @@
             MobEffectList mobeffectlist = ((EntitySpider.GroupDataSpider) object).a;
 
             if (mobeffectlist != null) {
-                this.addEffect(new MobEffect(mobeffectlist, Integer.MAX_VALUE));
+                this.addEffect(new MobEffect(mobeffectlist, Integer.MAX_VALUE), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.SPIDER_SPAWN); // CraftBukkit
             }
         }