Update to Minecraft 1.17

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-06-11 15:00:00 +10:00
parent 75faba7fde
commit b3a8254758
619 changed files with 10708 additions and 8451 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/projectile/EntityFireball.java
+++ b/net/minecraft/world/entity/projectile/EntityFireball.java
@@ -15,11 +15,15 @@
@@ -14,11 +14,15 @@
import net.minecraft.world.phys.MovingObjectPosition;
import net.minecraft.world.phys.Vec3D;
@@ -8,28 +8,28 @@
+
public abstract class EntityFireball extends IProjectile {
public double dirX;
public double dirY;
public double dirZ;
public double xPower;
public double yPower;
public double zPower;
+ public float bukkitYield = 1; // CraftBukkit
+ public boolean isIncendiary = true; // CraftBukkit
protected EntityFireball(EntityTypes<? extends EntityFireball> entitytypes, World world) {
super(entitytypes, world);
@@ -29,6 +33,12 @@
@@ -28,6 +32,12 @@
this(entitytypes, world);
this.setPositionRotation(d0, d1, d2, this.yaw, this.pitch);
this.af();
this.setPositionRotation(d0, d1, d2, this.getYRot(), this.getXRot());
this.ah();
+ // CraftBukkit start - Added setDirection method
+ this.setDirection(d3, d4, d5);
+ }
+
+ public void setDirection(double d3, double d4, double d5) {
+ // CraftBukkit end
double d6 = (double) MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
double d6 = Math.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
if (d6 != 0.0D) {
@@ -63,7 +73,13 @@
@@ -74,7 +84,13 @@
MovingObjectPosition movingobjectposition = ProjectileHelper.a((Entity) this, this::a);
if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) {
@@ -37,14 +37,14 @@
+ this.preOnHit(movingobjectposition); // CraftBukkit - projectile hit event
+
+ // CraftBukkit start - Fire ProjectileHitEvent
+ if (this.dead) {
+ if (this.isRemoved()) {
+ CraftEventFactory.callProjectileHitEvent(this, movingobjectposition);
+ }
+ // CraftBukkit end
}
this.checkBlockCollisions();
@@ -148,6 +164,11 @@
@@ -159,6 +175,11 @@
Entity entity = damagesource.getEntity();
if (entity != null) {