mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-26 22:38:00 +01:00
Zombie villagers will render with saddlebags and all the other stuff normal villagers do
This commit is contained in:
parent
9f705df9c5
commit
3f32e2b19a
2 changed files with 13 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
package com.minelittlepony.model.ponies;
|
package com.minelittlepony.model.ponies;
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.monster.EntityZombieVillager;
|
||||||
import net.minecraft.entity.passive.EntityVillager;
|
import net.minecraft.entity.passive.EntityVillager;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import static com.minelittlepony.model.PonyModelConstants.*;
|
import static com.minelittlepony.model.PonyModelConstants.*;
|
||||||
|
@ -33,9 +34,9 @@ public class ModelVillagerPony extends ModelAlicorn {
|
||||||
protected void renderBody(Entity entity, float move, float swing, float age, float headYaw, float headPitch, float scale) {
|
protected void renderBody(Entity entity, float move, float swing, float age, float headYaw, float headPitch, float scale) {
|
||||||
super.renderBody(entity, move, swing, age, headYaw, headPitch, scale);
|
super.renderBody(entity, move, swing, age, headYaw, headPitch, scale);
|
||||||
|
|
||||||
if (entity instanceof EntityVillager) {
|
int profession = getProfession(entity);
|
||||||
|
if (profession > -1) {
|
||||||
bipedBody.postRender(this.scale);
|
bipedBody.postRender(this.scale);
|
||||||
int profession = ((EntityVillager) entity).getProfession();
|
|
||||||
if (profession < 2) {
|
if (profession < 2) {
|
||||||
bag.render(scale);
|
bag.render(scale);
|
||||||
} else if (profession == 2) {
|
} else if (profession == 2) {
|
||||||
|
@ -46,6 +47,16 @@ public class ModelVillagerPony extends ModelAlicorn {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected int getProfession(Entity entity) {
|
||||||
|
if (entity instanceof EntityVillager) {
|
||||||
|
return ((EntityVillager) entity).getProfession();
|
||||||
|
}
|
||||||
|
if (entity instanceof EntityZombieVillager) {
|
||||||
|
return ((EntityZombieVillager) entity).getProfession();
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initTextures() {
|
protected void initTextures() {
|
||||||
super.initTextures();
|
super.initTextures();
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.4 KiB |
Loading…
Reference in a new issue