Update to Minecraft 1.20.5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-04-24 01:15:00 +10:00
parent 4deda9501f
commit 65bc2541a3
524 changed files with 7788 additions and 6181 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/projectile/EntityLlamaSpit.java
+++ b/net/minecraft/world/entity/projectile/EntityLlamaSpit.java
@@ -14,6 +14,10 @@
@@ -15,6 +15,10 @@
import net.minecraft.world.phys.MovingObjectPositionEntity;
import net.minecraft.world.phys.Vec3D;
@@ -11,17 +11,17 @@
public class EntityLlamaSpit extends IProjectile {
public EntityLlamaSpit(EntityTypes<? extends EntityLlamaSpit> entitytypes, World world) {
@@ -32,7 +36,7 @@
@@ -38,7 +42,7 @@
Vec3D vec3d = this.getDeltaMovement();
MovingObjectPosition movingobjectposition = ProjectileHelper.getHitResultOnMoveVector(this, this::canHitEntity);
- this.onHit(movingobjectposition);
+ this.preOnHit(movingobjectposition); // CraftBukkit - projectile hit event
- this.hitTargetOrDeflectSelf(movingobjectposition);
+ this.preHitTargetOrDeflectSelf(movingobjectposition); // CraftBukkit - projectile hit event
double d0 = this.getX() + vec3d.x;
double d1 = this.getY() + vec3d.y;
double d2 = this.getZ() + vec3d.z;
@@ -42,9 +46,9 @@
float f1 = 0.06F;
@@ -47,9 +51,9 @@
float f = 0.99F;
if (this.level().getBlockStates(this.getBoundingBox()).noneMatch(BlockBase.BlockData::isAir)) {
- this.discard();
@@ -31,7 +31,7 @@
+ this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
} else {
this.setDeltaMovement(vec3d.scale(0.9900000095367432D));
if (!this.isNoGravity()) {
this.applyGravity();
@@ -72,7 +76,7 @@
protected void onHitBlock(MovingObjectPositionBlock movingobjectpositionblock) {
super.onHitBlock(movingobjectpositionblock);