net.minecraft.entity.mob.ZombieVillagerEntity Java Examples

The following examples show how to use net.minecraft.entity.mob.ZombieVillagerEntity. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ZombieVillagerEntityMixin_RealTime.java    From Galaxy with GNU Affero General Public License v3.0 5 votes vote down vote up
@Redirect(
    method = "tick",
    at = @At(
        value = "INVOKE",
        target = "Lnet/minecraft/entity/mob/ZombieVillagerEntity;getConversionRate()I",
        ordinal = 0
    )
)
private int realTimeImpl$adjustForRealTimeConversionTimeBoost(final ZombieVillagerEntity self) {
    final int ticks = (int) ((RealTimeTrackingBridge) self.getEntityWorld()).realTimeBridge$getRealTimeTicks();
    return this.getConversionRate() * ticks;
}
 
Example #2
Source File: ZomponyVillagerRenderer.java    From MineLittlePony with MIT License 5 votes vote down vote up
@Override
protected void setupTransforms(ZombieVillagerEntity entity, MatrixStack stack, float move, float rotationYaw, float ticks) {
    if (entity.isConverting()) {
        rotationYaw += (float) (Math.cos(entity.age * 3.25D) * (Math.PI / 4));
    }

    super.setupTransforms(entity, stack, move, rotationYaw, ticks);
}
 
Example #3
Source File: ZomponyVillagerModel.java    From MineLittlePony with MIT License 5 votes vote down vote up
@Override
protected void rotateLegs(float move, float swing, float ticks, ZombieVillagerEntity entity) {
    super.rotateLegs(move, swing, ticks, entity);

    if (rightArmPose == ArmPose.EMPTY) {
        if (islookAngleRight(move)) {
            rotateArmHolding(rightArm, 1, getSwingAmount(), ticks);
            ((MsonPart)rightArm).shift(0.5F, 1.5F, 3);
        } else {
            rotateArmHolding(leftArm, -1, getSwingAmount(), ticks);
            ((MsonPart)leftArm).shift(-0.5F, 1.5F, 3);
        }
    }
}