Add getHandRaised to LivingEntity (#5752)
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Entity Jump API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
index 02d3b792cc9769b5daa6fcac57f5cda320a2a29e..86c6a8fd4511dfe426cc1651d289f38b467d3029 100644
|
||||
index ffb4072f46456b3a2b2daa55947787cee774d26d..571e6bced3cfaacbd40378e67b01cdfda550feb7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
@@ -2876,8 +2876,10 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -34,12 +34,12 @@ index f755607872920caae1410d38c431c16b5238c00f..711b322007a0973ff0aebf3c25efbae8
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index ff586b8366a6298f1906551b068e8abb26fcabc7..b18292ef2e00b4ef8a0b2da5f63a596dbd04b1fd 100644
|
||||
index db5d9a8107babd42200f911d2b8ebdc15b4d7c8b..468dca6d8c2ec77c3c77c93d04fb9dc329b1befa 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -799,5 +799,20 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
public boolean isHandRaised() {
|
||||
return getHandle().isHandRaised();
|
||||
@@ -804,5 +804,19 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
public org.bukkit.inventory.EquipmentSlot getHandRaised() {
|
||||
return getHandle().getRaisedHand() == net.minecraft.world.EnumHand.MAIN_HAND ? org.bukkit.inventory.EquipmentSlot.HAND : org.bukkit.inventory.EquipmentSlot.OFF_HAND;
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
@@ -55,6 +55,5 @@ index ff586b8366a6298f1906551b068e8abb26fcabc7..b18292ef2e00b4ef8a0b2da5f63a596d
|
||||
+ ((EntityInsentient) getHandle()).getControllerJump().jump();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
// Paper end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user