mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-26 22:38:00 +01:00
Try not to break horribly when encountering an unexpected profession (can't assume new ones won't be added later on / by mods).
This commit is contained in:
parent
8118cff5b6
commit
b410b988a2
2 changed files with 2 additions and 2 deletions
|
@ -31,6 +31,6 @@ public class RenderPonyVillager extends RenderPonyMob<EntityVillager> {
|
|||
|
||||
@Override
|
||||
protected ResourceLocation getTexture(EntityVillager entity) {
|
||||
return PROFESSIONS[entity.getProfession()];
|
||||
return PROFESSIONS[entity.getProfession() % PROFESSIONS.length];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ public class RenderPonyZombieVillager extends RenderPonyMob<EntityZombieVillager
|
|||
|
||||
@Override
|
||||
protected ResourceLocation getTexture(EntityZombieVillager entity) {
|
||||
return PROFESSIONS[entity.getProfession()];
|
||||
return PROFESSIONS[entity.getProfession() % PROFESSIONS.length];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue