mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 12:37:59 +01:00
Ponify the piglin brutes
This commit is contained in:
parent
b3a6c95017
commit
a856ac8fce
4 changed files with 13 additions and 5 deletions
|
@ -1,9 +1,9 @@
|
|||
package com.minelittlepony.client.model.entity;
|
||||
|
||||
import net.minecraft.client.model.ModelPart;
|
||||
import net.minecraft.entity.mob.AbstractPiglinEntity;
|
||||
import net.minecraft.entity.mob.HostileEntity;
|
||||
import net.minecraft.entity.mob.PiglinActivity;
|
||||
import net.minecraft.entity.mob.PiglinEntity;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import com.minelittlepony.api.pony.IPony;
|
||||
|
@ -30,9 +30,8 @@ public class PiglinPonyModel extends ZomponyModel<HostileEntity> {
|
|||
leftArmPose = ArmPose.EMPTY;
|
||||
rightArmPose = entity.getMainHandStack().isEmpty() ? ArmPose.EMPTY : ArmPose.ITEM;
|
||||
|
||||
if (entity instanceof PiglinEntity) {
|
||||
PiglinEntity piglinEntity = (PiglinEntity)entity;
|
||||
activity = piglinEntity.getActivity();
|
||||
if (entity instanceof AbstractPiglinEntity) {
|
||||
activity = ((AbstractPiglinEntity)entity).getActivity();
|
||||
|
||||
if (activity == PiglinActivity.CROSSBOW_HOLD) {
|
||||
rightArmPose = ArmPose.CROSSBOW_HOLD;
|
||||
|
@ -73,6 +72,6 @@ public class PiglinPonyModel extends ZomponyModel<HostileEntity> {
|
|||
|
||||
@Override
|
||||
protected boolean isZombified(HostileEntity entity) {
|
||||
return !(entity instanceof PiglinEntity);
|
||||
return !(entity instanceof AbstractPiglinEntity);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.minelittlepony.client.render.entity;
|
||||
|
||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.mob.AbstractPiglinEntity;
|
||||
import net.minecraft.entity.mob.HostileEntity;
|
||||
|
@ -25,6 +26,14 @@ public class PonyPiglinRenderer extends PonyRenderer.Caster<HostileEntity, Pigli
|
|||
super(manager, ModelType.PIGLIN);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scale(HostileEntity entity, MatrixStack stack, float ticks) {
|
||||
super.scale(entity, stack, ticks);
|
||||
if (entity.getType() == EntityType.PIGLIN_BRUTE) {
|
||||
stack.scale(1.15F, 1.15F, 1.15F);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identifier findTexture(HostileEntity entity) {
|
||||
return TEXTURES.get(entity.getType());
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Loading…
Reference in a new issue