mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
2365b308c8
Upstream has released updates that appears to apply and compile correctly. This update has been tested to ensure that World Conversion still occurs correctly. Bukkit Changes: 0812ce2c SPIGOT-4397: isChunkGenerated API CraftBukkit Changes:4824655c
SPIGOT-4398: Upgrade to ASM 6.2.1 for better Java 11 supporteea43870
MC-134115: Fix issues converting tile entities1a7f2d10
SPIGOT-4397: isChunkGenerated API40aed54d
SPIGOT-4396: Improve vehicle movement Spigot Changes: f6a273b1 Rebuild patches
76 lines
3.0 KiB
Diff
76 lines
3.0 KiB
Diff
From f131c3e9f7448f2ce5b058b39f4250e6a3fc270e Mon Sep 17 00:00:00 2001
|
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
|
Date: Fri, 27 Jul 2018 22:36:31 -0500
|
|
Subject: [PATCH] SkeletonHorse Additions
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java
|
|
index e3690db471..ba6c0e96a3 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java
|
|
@@ -5,7 +5,7 @@ import javax.annotation.Nullable;
|
|
public class EntityHorseSkeleton extends EntityHorseAbstract {
|
|
private final PathfinderGoalHorseTrap bM = new PathfinderGoalHorseTrap(this);
|
|
private boolean bN;
|
|
- private int bO;
|
|
+ private int bO; public int getTrapTime() { return this.bO; } // Paper - OBFHELPER
|
|
|
|
public EntityHorseSkeleton(World world) {
|
|
super(EntityTypes.SKELETON_HORSE, world);
|
|
@@ -114,10 +114,12 @@ public class EntityHorseSkeleton extends EntityHorseAbstract {
|
|
return 0.96F;
|
|
}
|
|
|
|
+ public boolean isTrap() { return this.dy(); } // Paper - OBFHELPER
|
|
public boolean dy() {
|
|
return this.bN;
|
|
}
|
|
|
|
+ public void setTrap(boolean trap) { this.s(trap); } // Paper - OBFHELPER
|
|
public void s(boolean flag) {
|
|
if (flag != this.bN) {
|
|
this.bN = flag;
|
|
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java b/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java
|
|
index a6979fe859..d4fdcbdfd6 100644
|
|
--- a/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java
|
|
+++ b/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java
|
|
@@ -13,6 +13,7 @@ public class PathfinderGoalHorseTrap extends PathfinderGoal {
|
|
}
|
|
|
|
public void e() {
|
|
+ if (!new com.destroystokyo.paper.event.entity.SkeletonHorseTrapEvent((org.bukkit.entity.SkeletonHorse) this.a.getBukkitEntity()).callEvent()) return; // Paper
|
|
DifficultyDamageScaler difficultydamagescaler = this.a.world.getDamageScaler(new BlockPosition(this.a));
|
|
|
|
this.a.s(false);
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeletonHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeletonHorse.java
|
|
index e822c2200d..496d0c0cac 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeletonHorse.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeletonHorse.java
|
|
@@ -26,4 +26,23 @@ public class CraftSkeletonHorse extends CraftAbstractHorse implements SkeletonHo
|
|
public Variant getVariant() {
|
|
return Variant.SKELETON_HORSE;
|
|
}
|
|
+
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public EntityHorseSkeleton getHandle() {
|
|
+ return (EntityHorseSkeleton) super.getHandle();
|
|
+ }
|
|
+
|
|
+ public int getTrapTime() {
|
|
+ return getHandle().getTrapTime();
|
|
+ }
|
|
+
|
|
+ public boolean isTrap() {
|
|
+ return getHandle().isTrap();
|
|
+ }
|
|
+
|
|
+ public void setTrap(boolean trap) {
|
|
+ getHandle().setTrap(trap);
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
--
|
|
2.19.0
|
|
|