mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
Left handed API (#6775)
This commit is contained in:
parent
89b449e9e6
commit
2969d4224f
2 changed files with 57 additions and 0 deletions
31
patches/api/Left-handed-API.patch
Normal file
31
patches/api/Left-handed-API.patch
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||||
|
Date: Thu, 14 Oct 2021 12:36:46 -0500
|
||||||
|
Subject: [PATCH] Left handed API
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/org/bukkit/entity/Mob.java
|
||||||
|
+++ b/src/main/java/org/bukkit/entity/Mob.java
|
||||||
|
@@ -0,0 +0,0 @@ public interface Mob extends LivingEntity, Lootable {
|
||||||
|
* @return whether the mob is aware
|
||||||
|
*/
|
||||||
|
public boolean isAware();
|
||||||
|
+
|
||||||
|
+ // Paper start
|
||||||
|
+ /**
|
||||||
|
+ * Check if Mob is left-handed
|
||||||
|
+ *
|
||||||
|
+ * @return True if left-handed
|
||||||
|
+ */
|
||||||
|
+ public boolean isLeftHanded();
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Set if Mob is left-handed
|
||||||
|
+ *
|
||||||
|
+ * @param leftHanded True if left-handed
|
||||||
|
+ */
|
||||||
|
+ public void setLeftHanded(boolean leftHanded);
|
||||||
|
+ // Paper end
|
||||||
|
}
|
26
patches/server/Left-handed-API.patch
Normal file
26
patches/server/Left-handed-API.patch
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||||
|
Date: Thu, 14 Oct 2021 12:36:58 -0500
|
||||||
|
Subject: [PATCH] Left handed API
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||||
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||||
|
@@ -0,0 +0,0 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
|
||||||
|
public int getMaxHeadPitch() {
|
||||||
|
return getHandle().getMaxHeadXRot();
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public boolean isLeftHanded() {
|
||||||
|
+ return getHandle().isLeftHanded();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void setLeftHanded(boolean leftHanded) {
|
||||||
|
+ getHandle().setLeftHanded(leftHanded);
|
||||||
|
+ }
|
||||||
|
// Paper end
|
||||||
|
}
|
Loading…
Reference in a new issue