PaperMC/paper-server/nms-patches/EntitySpider.patch
CraftBukkit/Spigot 0e142c7f03 Update to Minecraft 1.15
By: md_5 <git@md-5.net>
2019-12-11 09:00:00 +11:00

20 lines
1 KiB
Diff

--- a/net/minecraft/server/EntitySpider.java
+++ b/net/minecraft/server/EntitySpider.java
@@ -125,7 +125,7 @@
entityskeleton.setPositionRotation(this.locX(), this.locY(), this.locZ(), this.yaw, 0.0F);
entityskeleton.prepare(generatoraccess, difficultydamagescaler, enummobspawn, (GroupDataEntity) null, (NBTTagCompound) null);
- generatoraccess.addEntity(entityskeleton);
+ generatoraccess.addEntity(entityskeleton, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.JOCKEY); // CraftBukkit - add SpawnReason
entityskeleton.startRiding(this);
}
@@ -140,7 +140,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
}
}