mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-26 22:38:00 +01:00
Sssecrets
This commit is contained in:
parent
b84a38f465
commit
f4395e286a
6 changed files with 26 additions and 10 deletions
|
@ -16,6 +16,8 @@ public class ModelVillagerPony extends ModelAlicorn {
|
|||
|
||||
private int profession;
|
||||
|
||||
private boolean special;
|
||||
|
||||
public ModelVillagerPony() {
|
||||
super(false);
|
||||
}
|
||||
|
@ -30,23 +32,26 @@ public class ModelVillagerPony extends ModelAlicorn {
|
|||
@Override
|
||||
public void setLivingAnimations(EntityLivingBase entity, float limbSwing, float limbSwingAmount, float partialTickTime) {
|
||||
profession = getProfession(entity);
|
||||
special = "Derpy".equals(entity.getCustomNameTag());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderBody(Entity entity, float move, float swing, float ticks, float headYaw, float headPitch, float scale) {
|
||||
super.renderBody(entity, move, swing, ticks, headYaw, headPitch, scale);
|
||||
|
||||
if (!special) {
|
||||
if (profession == 2) {
|
||||
trinket.render(scale);
|
||||
} else if (profession > 2) {
|
||||
apron.render(scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWearing(PonyWearable wearable) {
|
||||
if (wearable == PonyWearable.SADDLE_BAGS) {
|
||||
return profession > -1 && profession < 2;
|
||||
return !special && profession > -1 && profession < 2;
|
||||
}
|
||||
|
||||
return super.isWearing(wearable);
|
||||
|
|
|
@ -30,6 +30,9 @@ public class ModelWitchPony extends ModelZebra {
|
|||
super.updateLivingState(entity, pony);
|
||||
EntityWitch witch = ((EntityWitch) entity);
|
||||
|
||||
if ("Filly".equals(entity.getCustomNameTag())) {
|
||||
isChild = true;
|
||||
}
|
||||
leftArmPose = ArmPose.EMPTY;
|
||||
rightArmPose = witch.getHeldItemMainhand().isEmpty() ? ArmPose.EMPTY : ArmPose.ITEM;
|
||||
}
|
||||
|
|
|
@ -18,6 +18,8 @@ public class RenderPonyVillager extends RenderPonyMob<EntityVillager> {
|
|||
new ResourceLocation("minelittlepony", "textures/entity/villager/butcher_pony.png"),
|
||||
new ResourceLocation("minelittlepony", "textures/entity/villager/villager_pony.png")
|
||||
};
|
||||
private static final ResourceLocation EGG = new ResourceLocation("minelittlepony", "textures/entity/villager/silly_pony.png");
|
||||
private static final ResourceLocation EGG_2 = new ResourceLocation("minelittlepony", "textures/entity/villager/tiny_silly_pony.png");
|
||||
|
||||
public RenderPonyVillager(RenderManager manager) {
|
||||
super(manager, PMAPI.villager);
|
||||
|
@ -31,6 +33,12 @@ public class RenderPonyVillager extends RenderPonyMob<EntityVillager> {
|
|||
|
||||
@Override
|
||||
protected ResourceLocation getTexture(EntityVillager entity) {
|
||||
if ("Derpy".equals(entity.getCustomNameTag())) {
|
||||
if (entity.isChild()) {
|
||||
return EGG_2;
|
||||
}
|
||||
return EGG;
|
||||
}
|
||||
return PROFESSIONS[entity.getProfession() % PROFESSIONS.length];
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 521 B |
Loading…
Reference in a new issue