diff options
author | sk89q <the.sk89q@gmail.com> | 2011-05-06 19:25:44 -0700 |
---|---|---|
committer | sk89q <the.sk89q@gmail.com> | 2011-05-06 19:25:44 -0700 |
commit | 6cbd4cdf9e3e6367756e31225af2d8a18ad82e8d (patch) | |
tree | 734b17d0ab1efcafa38844e63f656f19d3611014 /src/main/java/net/minecraft/server/EntityWeatherStorm.java | |
parent | c05cc33f7a70080429ac7c34614c47420d46e86f (diff) | |
download | craftbukkit-6cbd4cdf9e3e6367756e31225af2d8a18ad82e8d.tar craftbukkit-6cbd4cdf9e3e6367756e31225af2d8a18ad82e8d.tar.gz craftbukkit-6cbd4cdf9e3e6367756e31225af2d8a18ad82e8d.tar.lz craftbukkit-6cbd4cdf9e3e6367756e31225af2d8a18ad82e8d.tar.xz craftbukkit-6cbd4cdf9e3e6367756e31225af2d8a18ad82e8d.zip |
Added World.strikeLightningEffect() that does no damage.
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityWeatherStorm.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityWeatherStorm.java | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/main/java/net/minecraft/server/EntityWeatherStorm.java b/src/main/java/net/minecraft/server/EntityWeatherStorm.java index 0faf59bb..cacb06ea 100644 --- a/src/main/java/net/minecraft/server/EntityWeatherStorm.java +++ b/src/main/java/net/minecraft/server/EntityWeatherStorm.java @@ -18,13 +18,19 @@ public class EntityWeatherStorm extends EntityWeather { // CraftBukkit start private CraftWorld cworld; private CraftServer server; - // CraftBukkit end + public boolean isEffect = false; public EntityWeatherStorm(World world, double d0, double d1, double d2) { + this(world, d0, d1, d2, false); + } + + public EntityWeatherStorm(World world, double d0, double d1, double d2, boolean isEffect) { + // CraftBukkit end super(world); // CraftBukkit start + this.isEffect = isEffect; cworld = ((WorldServer) world).getWorld(); server = ((WorldServer) world).getServer(); // CraftBukkit end @@ -33,7 +39,9 @@ public class EntityWeatherStorm extends EntityWeather { this.b = 2; this.a = this.random.nextLong(); this.c = this.random.nextInt(3) + 1; - if (world.spawnMonsters >= 2 && world.a(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2), 10)) { + // CraftBukkit start + if (!isEffect && world.spawnMonsters >= 2 && world.a(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2), 10)) { + // CraftBukkit end int i = MathHelper.floor(d0); int j = MathHelper.floor(d1); int k = MathHelper.floor(d2); @@ -83,7 +91,9 @@ public class EntityWeatherStorm extends EntityWeather { --this.c; this.b = 1; this.a = this.random.nextLong(); - if (this.world.a(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ), 10)) { + // CraftBukkit start + if (!isEffect && this.world.a(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ), 10)) { + // CraftBukkit end int i = MathHelper.floor(this.locX); int j = MathHelper.floor(this.locY); int k = MathHelper.floor(this.locZ); @@ -102,7 +112,9 @@ public class EntityWeatherStorm extends EntityWeather { } } - if (this.b >= 0) { + // CraftBukkit start + if (!isEffect && this.b >= 0) { + // CraftBukkit end double d0 = 3.0D; List list = this.world.b((Entity) this, AxisAlignedBB.b(this.locX - d0, this.locY - d0, this.locZ - d0, this.locX + d0, this.locY + 6.0D + d0, this.locZ + d0)); |