Fix jenkins compile issue

This commit is contained in:
fullwall 2020-05-08 10:54:25 +08:00
parent 3cf8c7c256
commit cf07a5a379

View File

@ -898,7 +898,7 @@ public class NMSImpl implements NMSBridge {
@Override @Override
public void openHorseScreen(Tameable horse, Player equipper) { public void openHorseScreen(Tameable horse, Player equipper) {
EntityLiving handle = NMSImpl.getHandle((LivingEntity) horse); EntityLiving handle = NMSImpl.getHandle(horse);
EntityHuman equipperHandle = (EntityHuman) NMSImpl.getHandle(equipper); EntityHuman equipperHandle = (EntityHuman) NMSImpl.getHandle(equipper);
if (handle == null || equipperHandle == null) if (handle == null || equipperHandle == null)
return; return;
@ -1142,14 +1142,15 @@ public class NMSImpl implements NMSBridge {
if (SET_POSE == null) if (SET_POSE == null)
return; return;
try { try {
SET_POSE.invoke(getHandle(ocelot), sitting ? EntityPose.CROUCHING : EntityPose.STANDING); EntityPose pose = sitting ? EntityPose.CROUCHING : EntityPose.STANDING;
SET_POSE.invoke(getHandle(ocelot), pose);
} catch (Throwable e) { } catch (Throwable e) {
} }
} }
@Override @Override
public void setSitting(Tameable tameable, boolean sitting) { public void setSitting(Tameable tameable, boolean sitting) {
((EntityTameableAnimal) NMSImpl.getHandle((LivingEntity) tameable)).setSitting(sitting); ((EntityTameableAnimal) NMSImpl.getHandle(tameable)).setSitting(sitting);
} }
@Override @Override