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/IProjectile.java
+++ b/net/minecraft/world/entity/projectile/IProjectile.java
@@ -15,12 +15,20 @@
@@ -22,6 +22,10 @@
import net.minecraft.world.phys.MovingObjectPositionEntity;
import net.minecraft.world.phys.Vec3D;
@@ -10,9 +10,10 @@
+
public abstract class IProjectile extends Entity {
private UUID shooter;
private int c;
private boolean d;
@Nullable
@@ -31,6 +35,10 @@
private boolean leftOwner;
private boolean hasBeenShot;
+ // CraftBukkit start
+ private boolean hitCancelled = false;
@@ -21,15 +22,15 @@
IProjectile(EntityTypes<? extends IProjectile> entitytypes, World world) {
super(entitytypes, world);
}
@@ -30,6 +38,7 @@
this.shooter = entity.getUniqueID();
this.c = entity.getId();
@@ -40,6 +48,7 @@
this.ownerUUID = entity.getUniqueID();
this.cachedOwner = entity;
}
+ this.projectileSource = (entity != null && entity.getBukkitEntity() instanceof ProjectileSource) ? (ProjectileSource) entity.getBukkitEntity() : null; // CraftBukkit
}
@@ -111,6 +120,16 @@
@@ -143,6 +152,16 @@
this.setMot(this.getMot().add(vec3d.x, entity.isOnGround() ? 0.0D : vec3d.y, vec3d.z));
}
@@ -46,7 +47,7 @@
protected void a(MovingObjectPosition movingobjectposition) {
MovingObjectPosition.EnumMovingObjectType movingobjectposition_enummovingobjecttype = movingobjectposition.getType();
@@ -125,6 +144,11 @@
@@ -161,6 +180,11 @@
protected void a(MovingObjectPositionEntity movingobjectpositionentity) {}
protected void a(MovingObjectPositionBlock movingobjectpositionblock) {
@@ -55,6 +56,6 @@
+ return;
+ }
+ // CraftBukkit end
IBlockData iblockdata = this.world.getType(movingobjectpositionblock.getBlockPosition());
IBlockData iblockdata = this.level.getType(movingobjectpositionblock.getBlockPosition());
iblockdata.a(this.world, iblockdata, movingobjectpositionblock, this);
iblockdata.a(this.level, iblockdata, movingobjectpositionblock, this);