From 65de896c15b32fd939a1c6741454beea5ab7bbb9 Mon Sep 17 00:00:00 2001 From: sk89q Date: Fri, 7 Jan 2011 12:00:08 -0800 Subject: [PATCH] Implemented LivingEntity.shootArrow(). --- .../java/org/bukkit/craftbukkit/CraftLivingEntity.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/CraftLivingEntity.java index 369314deea..50a297f618 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); + } }