Update to Minecraft 1.17.1 (#6097)

This commit is contained in:
Nassim Jahnke 2021-07-07 08:52:40 +02:00 committed by GitHub
parent a831634d44
commit 56fd1a2f84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
266 changed files with 1415 additions and 1491 deletions

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Implement EntityKnockbackByEntityEvent
This event is called when an entity receives knockback by another entity.
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 08c29388621bf460e1704f6edba59d08a12e75d0..7bb2ce6b378547d593f8487626b5a4d4b3361397 100644
index 848a000d7a959e161011b21012e5d9c438b55455..ab34cf7d603ba0fd8624db821b2c0e9e22286c63 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1437,7 +1437,7 @@ public abstract class LivingEntity extends Entity {
@ -27,7 +27,7 @@ index 08c29388621bf460e1704f6edba59d08a12e75d0..7bb2ce6b378547d593f8487626b5a4d4
}
private boolean checkTotemDeathProtection(DamageSource source) {
@@ -1733,6 +1733,11 @@ public abstract class LivingEntity extends Entity {
@@ -1737,6 +1737,11 @@ public abstract class LivingEntity extends Entity {
}
public void knockback(double strength, double x, double z) {
@ -39,7 +39,7 @@ index 08c29388621bf460e1704f6edba59d08a12e75d0..7bb2ce6b378547d593f8487626b5a4d4
strength *= 1.0D - this.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE);
if (strength > 0.0D) {
this.hasImpulse = true;
@@ -1740,6 +1745,15 @@ public abstract class LivingEntity extends Entity {
@@ -1744,6 +1749,15 @@ public abstract class LivingEntity extends Entity {
Vec3 vec3d1 = (new Vec3(x, 0.0D, z)).normalize().scale(strength);
this.setDeltaMovement(vec3d.x / 2.0D - vec3d1.x, this.onGround ? Math.min(0.4D, vec3d.y / 2.0D + strength) : vec3d.y, vec3d.z / 2.0D - vec3d1.z);
@ -56,10 +56,10 @@ index 08c29388621bf460e1704f6edba59d08a12e75d0..7bb2ce6b378547d593f8487626b5a4d4
}
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 85633cd1718783cffe03f750da1c17270eeb4cdd..5595150b0da580fce4d5d23993d77314e225ad58 100644
index 6b18d4dd869b442f06a7e9ae690edd5ff5227cbb..e9e89608c4b77868fed92717c837db76d6bb5a54 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -1532,7 +1532,7 @@ public abstract class Mob extends LivingEntity {
@@ -1533,7 +1533,7 @@ public abstract class Mob extends LivingEntity {
if (flag) {
if (f1 > 0.0F && target instanceof LivingEntity) {
@ -69,10 +69,10 @@ index 85633cd1718783cffe03f750da1c17270eeb4cdd..5595150b0da580fce4d5d23993d77314
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 543a1c9bc5aa97262424758c69cb28127fa0ee75..022bff6ac8ed5f2da438929c5ac455505bb16da7 100644
index ce8b5394f418583608bb8965c058660264ddf66c..3db5b3adb9fe4a1682b0a4e75ae3e1f6febb7822 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1234,7 +1234,7 @@ public abstract class Player extends LivingEntity {
@@ -1230,7 +1230,7 @@ public abstract class Player extends LivingEntity {
if (flag5) {
if (i > 0) {
if (target instanceof LivingEntity) {
@ -81,7 +81,7 @@ index 543a1c9bc5aa97262424758c69cb28127fa0ee75..022bff6ac8ed5f2da438929c5ac45550
} else {
target.push((double) (-Mth.sin(this.getYRot() * 0.017453292F) * (float) i * 0.5F), 0.1D, (double) (Mth.cos(this.getYRot() * 0.017453292F) * (float) i * 0.5F));
}
@@ -1258,7 +1258,7 @@ public abstract class Player extends LivingEntity {
@@ -1254,7 +1254,7 @@ public abstract class Player extends LivingEntity {
if (entityliving != this && entityliving != target && !this.isAlliedTo(entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) {
// CraftBukkit start - Only apply knockback if the damage hits
if (entityliving.hurt(DamageSource.playerAttack(this).sweep(), f4)) {