Giants are now ponies

This commit is contained in:
Sollace 2018-04-12 16:21:19 +02:00
parent e93c4784ee
commit 694db391bb
4 changed files with 25 additions and 3 deletions

View file

@ -27,6 +27,7 @@ import net.minecraft.client.resources.data.MetadataSerializer;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.entity.Entity;
import net.minecraft.entity.monster.EntityEvoker;
import net.minecraft.entity.monster.EntityGiantZombie;
import net.minecraft.entity.monster.EntityHusk;
import net.minecraft.entity.monster.EntityIllusionIllager;
import net.minecraft.entity.monster.EntityPigZombie;
@ -108,6 +109,7 @@ public class MineLittlePony {
saveRenderer(rm, EntityZombieVillager.class);
// zombies
saveRenderer(rm, EntityZombie.class);
saveRenderer(rm, EntityGiantZombie.class);
saveRenderer(rm, EntityHusk.class);
// pig zombie
saveRenderer(rm, EntityPigZombie.class);
@ -147,10 +149,12 @@ public class MineLittlePony {
if (this.config.zombies) {
ModUtilities.addRenderer(EntityZombie.class, new RenderPonyZombie<>(rm));
ModUtilities.addRenderer(EntityHusk.class, new RenderPonyZombie.Husk(rm));
ModUtilities.addRenderer(EntityGiantZombie.class, new RenderPonyZombie.Giant(rm));
logger.info("Zombies are now ponies.");
} else {
ModUtilities.addRenderer(EntityZombie.class, getRenderer(EntityZombie.class));
ModUtilities.addRenderer(EntityHusk.class, getRenderer(EntityHusk.class));
ModUtilities.addRenderer(EntityGiantZombie.class, getRenderer(EntityGiantZombie.class));
}
if (this.config.pigzombies) {

View file

@ -113,7 +113,7 @@ public class PonyManager implements IResourceManagerReloadListener {
MineLittlePony.logger.error("Invalid bgponies.json in " + res.getResourcePackName(), e);
}
}
} catch (IOException e) {
} catch (IOException ignored) {
// this isn't the exception you're looking for.
}
MineLittlePony.logger.info("Detected {} background ponies installed.", getNumberOfPonies());

View file

@ -11,8 +11,7 @@ public enum PonyRace {
ZEBRA(false, false),
REFORMED_CHANGELING(true, true),
GRIFFIN(true, false),
HIPPOGRIFF(true, false),
;
HIPPOGRIFF(true, false);
private boolean wings;
private boolean horn;

View file

@ -1,8 +1,10 @@
package com.minelittlepony.renderer;
import com.minelittlepony.model.PMAPI;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.monster.EntityGiantZombie;
import net.minecraft.entity.monster.EntityHusk;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.util.ResourceLocation;
@ -39,5 +41,22 @@ public class RenderPonyZombie<Zombie extends EntityZombie> extends RenderPonyMob
}
}
public static class Giant extends RenderPonyMob<EntityGiantZombie> {
public Giant(RenderManager renderManager) {
super(renderManager, PMAPI.zombie);
}
@Override
protected void preRenderCallback(EntityGiantZombie entitylivingbaseIn, float partialTickTime) {
GlStateManager.scale(3, 3, 3);
super.preRenderCallback(entitylivingbaseIn, partialTickTime);
}
@Override
protected ResourceLocation getTexture(EntityGiantZombie zombie) {
return ZOMBIE;
}
}
}