mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 01:17:42 +01:00
remove LivingEntity#safeFallDistance API
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sun, 5 May 2019 12:58:45 -0500
|
||||
Subject: [PATCH] LivingEntity safeFallDistance
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index aa351df679f300018367244c7ccb3e5a59e9276f..39c2a9f732b8e2452fd2dca07193a173d0c2ba1c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -1173,4 +1173,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
this.getHandle().setYBodyRot(bodyYaw);
|
||||
}
|
||||
// Paper end - body yaw API
|
||||
+
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ public float getSafeFallDistance() {
|
||||
+ return (float) getHandle().getAttributeValue(Attributes.SAFE_FALL_DISTANCE);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setSafeFallDistance(float safeFallDistance) {
|
||||
+ getHandle().getAttribute(Attributes.SAFE_FALL_DISTANCE).setBaseValue(safeFallDistance);
|
||||
+ }
|
||||
+ // Purpur end
|
||||
}
|
||||
@@ -18,7 +18,7 @@ index a207a31d80a302dbdfe80f8727222542d3a78da2..7ca70e9ddda24e2fe661c7b13fa439a6
|
||||
if (entry != null) {
|
||||
ItemStack itemstack = (ItemStack) entry.getValue();
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 36e3415b9312d3a80c9f5e1c36b42b7ea30c31c5..9df30e61d97d7c403adede631df2a6825b986496 100644
|
||||
index a45389d64c04cd4c2a35fbc511595be0535a8665..e51bbab02b816a431f18c520fc67eeb1880fbfa0 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -636,6 +636,16 @@ public final class ItemStack implements DataComponentHolder {
|
||||
@@ -46,7 +46,7 @@ index 218f2f085309f04438f8b07bc41cf242583db2dc..ea8e49b42b9dde74784189430be66ed6
|
||||
itemStack.shrink(1);
|
||||
} else ((net.minecraft.server.level.ServerPlayer) user).getBukkitEntity().updateInventory();
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 9df30e61d97d7c403adede631df2a6825b986496..a1bf3368450386015c64b711c01471dad8dc5ccd 100644
|
||||
index e51bbab02b816a431f18c520fc67eeb1880fbfa0..b2c5581b126ceb9e47a13f6eda8cc132d11bfb09 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -663,7 +663,7 @@ public final class ItemStack implements DataComponentHolder {
|
||||
@@ -5,18 +5,19 @@ Subject: [PATCH] LivingEntity#broadcastItemBreak
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 39c2a9f732b8e2452fd2dca07193a173d0c2ba1c..4fd98b8c39c3a989e5bf5682b936cade78a8c404 100644
|
||||
index aa351df679f300018367244c7ccb3e5a59e9276f..11bd76d79bbfff68734d8ee1095f21c5c50e7bde 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -1184,5 +1184,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
public void setSafeFallDistance(float safeFallDistance) {
|
||||
getHandle().getAttribute(Attributes.SAFE_FALL_DISTANCE).setBaseValue(safeFallDistance);
|
||||
@@ -1173,4 +1173,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
this.getHandle().setYBodyRot(bodyYaw);
|
||||
}
|
||||
// Paper end - body yaw API
|
||||
+
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ public void broadcastItemBreak(org.bukkit.inventory.EquipmentSlot slot) {
|
||||
+ if (slot == null) return;
|
||||
+ getHandle().broadcastBreakEvent(org.bukkit.craftbukkit.CraftEquipmentSlot.getNMS(slot));
|
||||
+ }
|
||||
// Purpur end
|
||||
+ // Purpur end
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user