geforkt von Mirrors/Paper
bf92f3e4db
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 9153f77e PR-841: Remove incorrect ClickType.CONTROL_DROP from ClickType#isShiftClick bceda6ab PR-840: Adjust annotations in Display entity interface a6b85ac3 PR-835: Add Jukebox#hasRecord() and #startPlaying(), clarify #setRecord() CraftBukkit Changes: e142fb9fd SPIGOT-7188: ChunkSnapshot biome y coordinate doesn't match chunk biome y coord eff1743b9 SPIGOT-7313: More accurately edit data on Jukeboxes
52 Zeilen
2.3 KiB
Diff
52 Zeilen
2.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: TreyRuffy <TreyRuffy@users.noreply.github.com>
|
|
Date: Fri, 27 May 2022 02:26:08 -0600
|
|
Subject: [PATCH] Flying Fall Damage
|
|
|
|
|
|
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 5b772b3caeafe98aa45a01bffe215a5dd33323b6..0629c471d38a77c44fc1c86ccdfcb0690f61ca17 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
|
@@ -184,6 +184,7 @@ public abstract class Player extends LivingEntity {
|
|
public float hurtDir; // Paper - protected -> public
|
|
// Paper start
|
|
public boolean affectsSpawning = true;
|
|
+ public net.kyori.adventure.util.TriState flyingFallDamage = net.kyori.adventure.util.TriState.NOT_SET;
|
|
// Paper end
|
|
|
|
// CraftBukkit start
|
|
@@ -1754,7 +1755,7 @@ public abstract class Player extends LivingEntity {
|
|
|
|
@Override
|
|
public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) {
|
|
- if (this.abilities.mayfly) {
|
|
+ if (this.abilities.mayfly && !this.flyingFallDamage.toBooleanOrElse(false)) { // Paper - flying fall damage
|
|
return false;
|
|
} else {
|
|
if (fallDistance >= 2.0F) {
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
index 63f8a92cadfecc2d0e5256c5de822fe86d5ed91b..cdb1e5d82ff1e18e3f27c816df57bd9eeebbe80b 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
@@ -2291,6 +2291,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|
this.getHandle().onUpdateAbilities();
|
|
}
|
|
|
|
+ // Paper start - flying fall damage
|
|
+ @Override
|
|
+ public void setFlyingFallDamage(@NotNull net.kyori.adventure.util.TriState flyingFallDamage) {
|
|
+ getHandle().flyingFallDamage = flyingFallDamage;
|
|
+ }
|
|
+
|
|
+ @NotNull
|
|
+ @Override
|
|
+ public net.kyori.adventure.util.TriState hasFlyingFallDamage() {
|
|
+ return getHandle().flyingFallDamage;
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
@Override
|
|
public int getNoDamageTicks() {
|
|
if (this.getHandle().spawnInvulnerableTime > 0) {
|