Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-22 06:20:06 +01:00
34 Zeilen
1.5 KiB
Diff
34 Zeilen
1.5 KiB
Diff
--- /home/matt/mc-dev-private//net/minecraft/server/EntityProjectile.java 2015-02-26 22:40:22.667608139 +0000
|
|
+++ src/main/java/net/minecraft/server/EntityProjectile.java 2015-02-26 22:40:22.667608139 +0000
|
|
@@ -11,8 +11,8 @@
|
|
private Block inBlockId;
|
|
protected boolean inGround;
|
|
public int shake;
|
|
- private EntityLiving shooter;
|
|
- private String shooterName;
|
|
+ public EntityLiving shooter; // CraftBukkit - public
|
|
+ public String shooterName; // CraftBukkit - public
|
|
private int i;
|
|
private int ar;
|
|
|
|
@@ -26,6 +26,7 @@
|
|
public EntityProjectile(World world, EntityLiving entityliving) {
|
|
super(world);
|
|
this.shooter = entityliving;
|
|
+ this.projectileSource = (org.bukkit.entity.LivingEntity) entityliving.getBukkitEntity(); // CraftBukkit
|
|
this.setSize(0.25F, 0.25F);
|
|
this.setPositionRotation(entityliving.locX, entityliving.locY + (double) entityliving.getHeadHeight(), entityliving.locZ, entityliving.yaw, entityliving.pitch);
|
|
this.locX -= (double) (MathHelper.cos(this.yaw / 180.0F * 3.1415927F) * 0.16F);
|
|
@@ -151,6 +152,11 @@
|
|
this.d(movingobjectposition.a());
|
|
} else {
|
|
this.a(movingobjectposition);
|
|
+ // CraftBukkit start
|
|
+ if (this.dead) {
|
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this);
|
|
+ }
|
|
+ // CraftBukkit end
|
|
}
|
|
}
|
|
|