mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-20 23:46:57 +01:00
#373: Add trap related methods to SkeletonHorse
By: Matthew <stteg@hotmail.com>
This commit is contained in:
parent
751a5601b8
commit
179dbe9592
2 changed files with 36 additions and 0 deletions
|
@ -0,0 +1,11 @@
|
|||
--- a/net/minecraft/world/entity/animal/horse/EntityHorseSkeleton.java
|
||||
+++ b/net/minecraft/world/entity/animal/horse/EntityHorseSkeleton.java
|
||||
@@ -24,7 +24,7 @@
|
||||
private final PathfinderGoalHorseTrap skeletonTrapGoal = new PathfinderGoalHorseTrap(this);
|
||||
private static final int TRAP_MAX_LIFE = 18000;
|
||||
private boolean isTrap;
|
||||
- private int trapTime;
|
||||
+ public int trapTime; // PAIL
|
||||
|
||||
public EntityHorseSkeleton(EntityTypes<? extends EntityHorseSkeleton> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
|
@ -26,4 +26,29 @@ public class CraftSkeletonHorse extends CraftAbstractHorse implements SkeletonHo
|
|||
public Variant getVariant() {
|
||||
return Variant.SKELETON_HORSE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityHorseSkeleton getHandle() {
|
||||
return (EntityHorseSkeleton) entity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTrapped() {
|
||||
return getHandle().isTrap();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrapped(boolean trapped) {
|
||||
getHandle().setTrap(trapped);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTrapTime() {
|
||||
return getHandle().trapTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrapTime(int trapTime) {
|
||||
getHandle().trapTime = trapTime;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue