Update Paper to 1.13 proper - THIS IS STILL HIGHLY UNSTABLE
DO NOT RUN ON PRODUCTION SERVERS!!! Use Backups!!
This commit is contained in:
@@ -6,29 +6,33 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API
|
||||
How long an entity has raised hands to charge an attack or use an item
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 7cacbaffe..5f3ccee2e 100644
|
||||
index 4455dc489..8be1ba526 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
}
|
||||
|
||||
+ public ItemStack getActiveItem() { return cV(); } // Paper - OBFHELPER
|
||||
public ItemStack cV() {
|
||||
private float bI;
|
||||
private int bJ;
|
||||
private float bK;
|
||||
- protected ItemStack activeItem;
|
||||
+ public ItemStack activeItem; // Paper - public
|
||||
protected int bu;
|
||||
protected int bv;
|
||||
private BlockPosition bL;
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
return this.activeItem;
|
||||
}
|
||||
|
||||
+ public int getItemUseRemainingTime() { return cW(); } // Paper - OBFHELPER
|
||||
public int cW() {
|
||||
+ public int getItemUseRemainingTime() { return cX(); } // Paper - OBFHELPER
|
||||
public int cX() {
|
||||
return this.bu;
|
||||
}
|
||||
|
||||
+ public int getHandRaisedTime() { return cX(); } // Paper - OBFHELPER
|
||||
public int cX() {
|
||||
return this.isHandRaised() ? this.activeItem.k() - this.cW() : 0;
|
||||
+ public int getHandRaisedTime() { return cY(); } // Paper - OBFHELPER
|
||||
public int cY() {
|
||||
return this.isHandRaised() ? this.activeItem.k() - this.cX() : 0;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 35ba95e0f..0975181e0 100644
|
||||
index a6f847e31..768bce141 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -38,7 +42,7 @@ index 35ba95e0f..0975181e0 100644
|
||||
+
|
||||
+ @Override
|
||||
+ public ItemStack getActiveItem() {
|
||||
+ return getHandle().getActiveItem().asBukkitMirror();
|
||||
+ return getHandle().activeItem.asBukkitMirror();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
|
||||
Reference in New Issue
Block a user