summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorsk89q <the.sk89q@gmail.com>2011-01-07 12:00:08 -0800
committersk89q <the.sk89q@gmail.com>2011-01-07 12:07:16 -0800
commit65de896c15b32fd939a1c6741454beea5ab7bbb9 (patch)
tree1687af2ed2941382ef7b45fc580ae6500357ed61 /src/main/java
parent55e9522955db65ff2a30b989b77efa407576517b (diff)
downloadcraftbukkit-65de896c15b32fd939a1c6741454beea5ab7bbb9.tar
craftbukkit-65de896c15b32fd939a1c6741454beea5ab7bbb9.tar.gz
craftbukkit-65de896c15b32fd939a1c6741454beea5ab7bbb9.tar.lz
craftbukkit-65de896c15b32fd939a1c6741454beea5ab7bbb9.tar.xz
craftbukkit-65de896c15b32fd939a1c6741454beea5ab7bbb9.zip
Implemented LivingEntity.shootArrow().
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftLivingEntity.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/CraftLivingEntity.java
index 369314de..50a297f6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftLivingEntity.java
@@ -2,10 +2,12 @@
package org.bukkit.craftbukkit;
import net.minecraft.server.Entity;
+import net.minecraft.server.EntityArrow;
import net.minecraft.server.EntityEgg;
import net.minecraft.server.EntityLiving;
import net.minecraft.server.EntitySnowball;
+import org.bukkit.Arrow;
import org.bukkit.Egg;
import org.bukkit.LivingEntity;
import org.bukkit.Snowball;
@@ -58,4 +60,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
world.a(snowball);
return new CraftSnowball(server, snowball);
}
+
+ @Override
+ public Arrow shootArrow() {
+ net.minecraft.server.World world = ((CraftWorld)getWorld()).getHandle();
+ EntityArrow snowball = new EntityArrow(world, entity);
+ world.a(snowball);
+ return new CraftArrow(server, snowball);
+ }
}