SPIGOT-4372: LightningStrikeEvent cause API

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-09-15 19:16:42 +10:00
parent 7611585b2e
commit 50c4571708
4 changed files with 48 additions and 13 deletions

View File

@@ -1,7 +1,11 @@
--- a/net/minecraft/server/PathfinderGoalHorseTrap.java
+++ b/net/minecraft/server/PathfinderGoalHorseTrap.java
@@ -21,13 +21,14 @@
this.a.world.strikeLightning(new EntityLightning(this.a.world, this.a.locX, this.a.locY, this.a.locZ, true));
@@ -18,16 +18,17 @@
this.a.s(false);
this.a.setTamed(true);
this.a.setAgeRaw(0);
- this.a.world.strikeLightning(new EntityLightning(this.a.world, this.a.locX, this.a.locY, this.a.locZ, true));
+ ((WorldServer) this.a.world).strikeLightning(new EntityLightning(this.a.world, this.a.locX, this.a.locY, this.a.locZ, true), org.bukkit.event.weather.LightningStrikeEvent.Cause.TRAP); // CraftBukkit
EntitySkeleton entityskeleton = this.a(difficultydamagescaler, this.a);
- entityskeleton.startRiding(this.a);