Search in sources :

Example 1 with EntityHorseAbstract

use of net.minecraft.server.v1_12_R1.EntityHorseAbstract in project Citizens2 by CitizensDev.

the class NMSImpl method openHorseScreen.

@Override
public void openHorseScreen(Tameable horse, Player equipper) {
    EntityLiving handle = NMSImpl.getHandle((LivingEntity) horse);
    EntityLiving equipperHandle = NMSImpl.getHandle(equipper);
    if (handle == null || equipperHandle == null)
        return;
    boolean wasTamed = horse.isTamed();
    horse.setTamed(true);
    ((EntityHorseAbstract) handle).f((EntityHuman) equipperHandle);
    horse.setTamed(wasTamed);
}
Also used : EntityLiving(net.minecraft.server.v1_11_R1.EntityLiving) EntityHorseAbstract(net.minecraft.server.v1_11_R1.EntityHorseAbstract)

Example 2 with EntityHorseAbstract

use of net.minecraft.server.v1_12_R1.EntityHorseAbstract in project Citizens2 by CitizensDev.

the class NMSImpl method openHorseScreen.

@Override
public void openHorseScreen(Tameable horse, Player equipper) {
    EntityLiving handle = NMSImpl.getHandle((LivingEntity) horse);
    EntityLiving equipperHandle = NMSImpl.getHandle(equipper);
    if (handle == null || equipperHandle == null)
        return;
    boolean wasTamed = horse.isTamed();
    horse.setTamed(true);
    ((EntityHorseAbstract) handle).c((EntityHuman) equipperHandle);
    horse.setTamed(wasTamed);
}
Also used : EntityLiving(net.minecraft.server.v1_12_R1.EntityLiving) EntityHorseAbstract(net.minecraft.server.v1_12_R1.EntityHorseAbstract)

Aggregations

EntityHorseAbstract (net.minecraft.server.v1_11_R1.EntityHorseAbstract)1 EntityLiving (net.minecraft.server.v1_11_R1.EntityLiving)1 EntityHorseAbstract (net.minecraft.server.v1_12_R1.EntityHorseAbstract)1 EntityLiving (net.minecraft.server.v1_12_R1.EntityLiving)1