@@ -18,8 +18,8 @@
|
||||
super(entitytypes, world);
|
||||
@@ -28,6 +32,12 @@
|
||||
this(entitytypes, world);
|
||||
this.setPositionRotation(d0, d1, d2, this.getYRot(), this.getXRot());
|
||||
this.ah();
|
||||
this.moveTo(d0, d1, d2, this.getYRot(), this.getXRot());
|
||||
this.reapplyPosition();
|
||||
+ // CraftBukkit start - Added setDirection method
|
||||
+ this.setDirection(d3, d4, d5);
|
||||
+ }
|
||||
@@ -30,10 +30,10 @@
|
||||
|
||||
if (d6 != 0.0D) {
|
||||
@@ -74,7 +84,13 @@
|
||||
MovingObjectPosition movingobjectposition = ProjectileHelper.a((Entity) this, this::a);
|
||||
MovingObjectPosition movingobjectposition = ProjectileHelper.getHitResult(this, this::canHitEntity);
|
||||
|
||||
if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) {
|
||||
- this.a(movingobjectposition);
|
||||
- this.onHit(movingobjectposition);
|
||||
+ this.preOnHit(movingobjectposition); // CraftBukkit - projectile hit event
|
||||
+
|
||||
+ // CraftBukkit start - Fire ProjectileHitEvent
|
||||
@@ -43,7 +43,7 @@
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
this.checkBlockCollisions();
|
||||
this.checkInsideBlocks();
|
||||
@@ -159,6 +175,11 @@
|
||||
Entity entity = damagesource.getEntity();
|
||||
|
||||
@@ -53,6 +53,6 @@
|
||||
+ return false;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
Vec3D vec3d = entity.getLookDirection();
|
||||
Vec3D vec3d = entity.getLookAngle();
|
||||
|
||||
this.setMot(vec3d);
|
||||
this.setDeltaMovement(vec3d);
|
||||
|
||||
Reference in New Issue
Block a user