Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
Implemented LivingEntity.shootArrow().
Dieser Commit ist enthalten in:
Ursprung
55e9522955
Commit
65de896c15
@ -2,10 +2,12 @@
|
|||||||
package org.bukkit.craftbukkit;
|
package org.bukkit.craftbukkit;
|
||||||
|
|
||||||
import net.minecraft.server.Entity;
|
import net.minecraft.server.Entity;
|
||||||
|
import net.minecraft.server.EntityArrow;
|
||||||
import net.minecraft.server.EntityEgg;
|
import net.minecraft.server.EntityEgg;
|
||||||
import net.minecraft.server.EntityLiving;
|
import net.minecraft.server.EntityLiving;
|
||||||
import net.minecraft.server.EntitySnowball;
|
import net.minecraft.server.EntitySnowball;
|
||||||
|
|
||||||
|
import org.bukkit.Arrow;
|
||||||
import org.bukkit.Egg;
|
import org.bukkit.Egg;
|
||||||
import org.bukkit.LivingEntity;
|
import org.bukkit.LivingEntity;
|
||||||
import org.bukkit.Snowball;
|
import org.bukkit.Snowball;
|
||||||
@ -58,4 +60,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|||||||
world.a(snowball);
|
world.a(snowball);
|
||||||
return new CraftSnowball(server, 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren