Update to Minecraft 1.18-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-22 09:00:00 +11:00
parent a852b81a69
commit 43702a9e10
700 changed files with 10286 additions and 10098 deletions

View File

@@ -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);