Added World.strikeLightningEffect() that does no damage.
By: sk89q <the.sk89q@gmail.com>
This commit is contained in:
parent
4023a32a54
commit
bf5e68b18b
2 changed files with 10 additions and 0 deletions
|
@ -371,6 +371,12 @@ public class CraftWorld implements World {
|
||||||
return new CraftLightningStrike(server, lightning);
|
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) {
|
public boolean generateTree(Location loc, TreeType type) {
|
||||||
return generateTree(loc, type, world);
|
return generateTree(loc, type, world);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,4 +14,8 @@ public class CraftLightningStrike extends CraftEntity implements LightningStrike
|
||||||
public EntityWeatherStorm getHandle() {
|
public EntityWeatherStorm getHandle() {
|
||||||
return (EntityWeatherStorm)super.getHandle();
|
return (EntityWeatherStorm)super.getHandle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isEffect() {
|
||||||
|
return ((EntityWeatherStorm) super.getHandle()).isEffect;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue