Update to Minecraft 1.21

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-06-14 01:05:00 +10:00
parent 7c6204e1a9
commit eed041d629
255 changed files with 3585 additions and 3261 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/projectile/IProjectile.java
+++ b/net/minecraft/world/entity/projectile/IProjectile.java
@@ -26,6 +26,10 @@
@@ -30,6 +30,10 @@
import net.minecraft.world.phys.MovingObjectPositionEntity;
import net.minecraft.world.phys.Vec3D;
@@ -11,9 +11,9 @@
public abstract class IProjectile extends Entity implements TraceableEntity {
@Nullable
@@ -35,6 +39,10 @@
private boolean leftOwner;
private boolean hasBeenShot;
@@ -41,6 +45,10 @@
@Nullable
private Entity lastDeflectedBy;
+ // CraftBukkit start
+ private boolean hitCancelled = false;
@@ -22,7 +22,7 @@
IProjectile(EntityTypes<? extends IProjectile> entitytypes, World world) {
super(entitytypes, world);
}
@@ -44,6 +52,7 @@
@@ -50,6 +58,7 @@
this.ownerUUID = entity.getUUID();
this.cachedOwner = entity;
}
@@ -30,7 +30,7 @@
}
@@ -170,6 +179,17 @@
@@ -177,6 +186,17 @@
this.setDeltaMovement(this.getDeltaMovement().add(vec3d.x, entity.onGround() ? 0.0D : vec3d.y, vec3d.z));
}
@@ -48,7 +48,7 @@
protected ProjectileDeflection hitTargetOrDeflectSelf(MovingObjectPosition movingobjectposition) {
if (movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY) {
MovingObjectPositionEntity movingobjectpositionentity = (MovingObjectPositionEntity) movingobjectposition;
@@ -225,6 +245,11 @@
@@ -237,6 +257,11 @@
protected void onHitEntity(MovingObjectPositionEntity movingobjectpositionentity) {}
protected void onHitBlock(MovingObjectPositionBlock movingobjectpositionblock) {