diff options
author | sk89q <the.sk89q@gmail.com> | 2011-04-22 01:25:55 -0700 |
---|---|---|
committer | sk89q <the.sk89q@gmail.com> | 2011-04-22 01:25:55 -0700 |
commit | 6739d6d75c34f0309302a9dd00e9d065bcf69e07 (patch) | |
tree | f8ddc50c4576e3dd3ec7dba11ba3f859209f496e /src/main/java/org | |
parent | 628fec752ba816f3ff8e3170cbcb21e35d8e66a1 (diff) | |
download | craftbukkit-6739d6d75c34f0309302a9dd00e9d065bcf69e07.tar craftbukkit-6739d6d75c34f0309302a9dd00e9d065bcf69e07.tar.gz craftbukkit-6739d6d75c34f0309302a9dd00e9d065bcf69e07.tar.lz craftbukkit-6739d6d75c34f0309302a9dd00e9d065bcf69e07.tar.xz craftbukkit-6739d6d75c34f0309302a9dd00e9d065bcf69e07.zip |
Added World.strikeLightning(). Also renamed WeatherStorm -> LightningStrike.
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 7 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java | 2 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java (renamed from src/main/java/org/bukkit/craftbukkit/entity/CraftWeatherStorm.java) | 6 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index def940e4..c316bc21 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -363,6 +363,13 @@ public class CraftWorld implements World { return creature; } + @Override + public LightningStrike strikeLightning(Location loc) { + EntityWeatherStorm lightning = new EntityWeatherStorm(world, loc.getX(), loc.getY(), loc.getZ()); + world.a(lightning); + return new CraftLightningStrike(server, lightning); + } + public boolean generateTree(Location loc, TreeType type) { return generateTree(loc, type, world); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index 058ea054..841e4c19 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -78,7 +78,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { else if (entity instanceof EntityItem) { return new CraftItem( server, (EntityItem) entity); } else if (entity instanceof EntityWeather) { if (entity instanceof EntityWeatherStorm) { - return new CraftWeatherStorm(server, (EntityWeatherStorm)entity); + return new CraftLightningStrike(server, (EntityWeatherStorm)entity); } else { return new CraftWeather(server, (EntityWeather)entity); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWeatherStorm.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java index aacbb3da..d081b7f8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWeatherStorm.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java @@ -3,10 +3,10 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityWeatherStorm; import org.bukkit.craftbukkit.CraftServer; -import org.bukkit.entity.WeatherStorm; +import org.bukkit.entity.LightningStrike; -public class CraftWeatherStorm extends CraftEntity implements WeatherStorm { - public CraftWeatherStorm(final CraftServer server, final EntityWeatherStorm entity) { +public class CraftLightningStrike extends CraftEntity implements LightningStrike { + public CraftLightningStrike(final CraftServer server, final EntityWeatherStorm entity) { super(server, entity); } |