mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-23 04:57:58 +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 int profession;
|
||||||
|
|
||||||
|
private boolean special;
|
||||||
|
|
||||||
public ModelVillagerPony() {
|
public ModelVillagerPony() {
|
||||||
super(false);
|
super(false);
|
||||||
}
|
}
|
||||||
|
@ -30,23 +32,26 @@ public class ModelVillagerPony extends ModelAlicorn {
|
||||||
@Override
|
@Override
|
||||||
public void setLivingAnimations(EntityLivingBase entity, float limbSwing, float limbSwingAmount, float partialTickTime) {
|
public void setLivingAnimations(EntityLivingBase entity, float limbSwing, float limbSwingAmount, float partialTickTime) {
|
||||||
profession = getProfession(entity);
|
profession = getProfession(entity);
|
||||||
|
special = "Derpy".equals(entity.getCustomNameTag());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderBody(Entity entity, float move, float swing, float ticks, float headYaw, float headPitch, float scale) {
|
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);
|
super.renderBody(entity, move, swing, ticks, headYaw, headPitch, scale);
|
||||||
|
|
||||||
|
if (!special) {
|
||||||
if (profession == 2) {
|
if (profession == 2) {
|
||||||
trinket.render(scale);
|
trinket.render(scale);
|
||||||
} else if (profession > 2) {
|
} else if (profession > 2) {
|
||||||
apron.render(scale);
|
apron.render(scale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isWearing(PonyWearable wearable) {
|
public boolean isWearing(PonyWearable wearable) {
|
||||||
if (wearable == PonyWearable.SADDLE_BAGS) {
|
if (wearable == PonyWearable.SADDLE_BAGS) {
|
||||||
return profession > -1 && profession < 2;
|
return !special && profession > -1 && profession < 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.isWearing(wearable);
|
return super.isWearing(wearable);
|
||||||
|
|
|
@ -30,6 +30,9 @@ public class ModelWitchPony extends ModelZebra {
|
||||||
super.updateLivingState(entity, pony);
|
super.updateLivingState(entity, pony);
|
||||||
EntityWitch witch = ((EntityWitch) entity);
|
EntityWitch witch = ((EntityWitch) entity);
|
||||||
|
|
||||||
|
if ("Filly".equals(entity.getCustomNameTag())) {
|
||||||
|
isChild = true;
|
||||||
|
}
|
||||||
leftArmPose = ArmPose.EMPTY;
|
leftArmPose = ArmPose.EMPTY;
|
||||||
rightArmPose = witch.getHeldItemMainhand().isEmpty() ? ArmPose.EMPTY : ArmPose.ITEM;
|
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/butcher_pony.png"),
|
||||||
new ResourceLocation("minelittlepony", "textures/entity/villager/villager_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) {
|
public RenderPonyVillager(RenderManager manager) {
|
||||||
super(manager, PMAPI.villager);
|
super(manager, PMAPI.villager);
|
||||||
|
@ -31,6 +33,12 @@ public class RenderPonyVillager extends RenderPonyMob<EntityVillager> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ResourceLocation getTexture(EntityVillager entity) {
|
protected ResourceLocation getTexture(EntityVillager entity) {
|
||||||
|
if ("Derpy".equals(entity.getCustomNameTag())) {
|
||||||
|
if (entity.isChild()) {
|
||||||
|
return EGG_2;
|
||||||
|
}
|
||||||
|
return EGG;
|
||||||
|
}
|
||||||
return PROFESSIONS[entity.getProfession() % PROFESSIONS.length];
|
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