Added World.strikeLightningEffect() that does no damage.

This commit is contained in:
sk89q
2011-05-06 19:25:44 -07:00
parent c05cc33f7a
commit 6cbd4cdf9e
3 changed files with 26 additions and 4 deletions

View File

@@ -371,6 +371,12 @@ public class CraftWorld implements World {
return new CraftLightningStrike(server, lightning);
}
public LightningStrike strikeLightningEffect(Location loc) {
EntityWeatherStorm lightning = new EntityWeatherStorm(world, loc.getX(), loc.getY(), loc.getZ(), true);
world.a(lightning);
return new CraftLightningStrike(server, lightning);
}
public boolean generateTree(Location loc, TreeType type) {
return generateTree(loc, type, world);
}

View File

@@ -14,4 +14,8 @@ public class CraftLightningStrike extends CraftEntity implements LightningStrike
public EntityWeatherStorm getHandle() {
return (EntityWeatherStorm)super.getHandle();
}
public boolean isEffect() {
return ((EntityWeatherStorm) super.getHandle()).isEffect;
}
}