diff --git a/src/main/java/com/brohoof/minelittlepony/model/AbstractPonyModel.java b/src/main/java/com/brohoof/minelittlepony/model/AbstractPonyModel.java index 32219f65..2f39169e 100644 --- a/src/main/java/com/brohoof/minelittlepony/model/AbstractPonyModel.java +++ b/src/main/java/com/brohoof/minelittlepony/model/AbstractPonyModel.java @@ -5,6 +5,7 @@ import static net.minecraft.client.renderer.GlStateManager.scale; import static net.minecraft.client.renderer.GlStateManager.translate; import java.util.List; +import java.util.Random; import com.brohoof.minelittlepony.PonyData; import com.brohoof.minelittlepony.PonySize; @@ -326,4 +327,15 @@ public abstract class AbstractPonyModel extends ModelPlayer { this.isSleeping = pony.isSleeping; } } + + @Override + public ModelRenderer getRandomModelBox(Random rand) { + // empty lists cause problems + ModelRenderer mr = null; + do { + // try until it's not + mr = super.getRandomModelBox(rand); + } while (mr.cubeList.isEmpty()); + return mr; + } }