Skip to content

Commit

Permalink
Add zotzpyre
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmeow committed Nov 30, 2019
1 parent 47700a5 commit da1ac6e
Show file tree
Hide file tree
Showing 14 changed files with 855 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import its_meow.betteranimalsplus.client.renderer.entity.RenderTarantula;
import its_meow.betteranimalsplus.client.renderer.entity.RenderTarantulaHair;
import its_meow.betteranimalsplus.client.renderer.entity.RenderTurkey;
import its_meow.betteranimalsplus.client.renderer.entity.RenderZotzpyre;
import its_meow.betteranimalsplus.client.renderer.tileentity.RenderBlockHandOfFate;
import its_meow.betteranimalsplus.client.renderer.tileentity.RenderBlockTrillium;
import its_meow.betteranimalsplus.client.renderer.tileentity.RenderGenericHead;
Expand All @@ -53,6 +54,7 @@
import its_meow.betteranimalsplus.common.entity.EntitySquirrel;
import its_meow.betteranimalsplus.common.entity.EntityTarantula;
import its_meow.betteranimalsplus.common.entity.EntityTurkey;
import its_meow.betteranimalsplus.common.entity.EntityZotzpyre;
import its_meow.betteranimalsplus.common.entity.miniboss.hirschgeist.EntityHirschgeist;
import its_meow.betteranimalsplus.common.entity.projectile.EntityBadgerDirt;
import its_meow.betteranimalsplus.common.entity.projectile.EntityPheasantEgg;
Expand Down Expand Up @@ -171,6 +173,7 @@ public static void registerRenders(final ModelRegistryEvent event) {
RenderingRegistry.registerEntityRenderingHandler(EntityPheasantEgg.class, mgr -> new RenderSnowball<EntityPheasantEgg>(mgr, ModItems.PHEASANT_EGG, Minecraft.getMinecraft().getRenderItem()));
RenderingRegistry.registerEntityRenderingHandler(EntityTurkey.class, RenderTurkey::new);
RenderingRegistry.registerEntityRenderingHandler(EntityTurkeyEgg.class, mgr -> new RenderSnowball<EntityTurkeyEgg>(mgr, ModItems.TURKEY_EGG, Minecraft.getMinecraft().getRenderItem()));
RenderingRegistry.registerEntityRenderingHandler(EntityZotzpyre.class, RenderZotzpyre::new);
}

public static void initModel(Item item) {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package its_meow.betteranimalsplus.client.renderer.entity;

import its_meow.betteranimalsplus.client.model.ModelZotzpyre;
import its_meow.betteranimalsplus.client.renderer.entity.layers.LayerEyes;
import its_meow.betteranimalsplus.common.entity.EntityZotzpyre;
import its_meow.betteranimalsplus.init.ModTextures;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.util.ResourceLocation;

public class RenderZotzpyre extends RenderLiving<EntityZotzpyre> {

public RenderZotzpyre(RenderManager rendermanager) {
super(rendermanager, new ModelZotzpyre(), 0.4F);
this.addLayer(new LayerEyes<EntityZotzpyre>(this, ModTextures.zotzpyre_eyes));
}

@Override
protected ResourceLocation getEntityTexture(EntityZotzpyre entity) {
switch(entity.getTypeNumber()) {
case 1:
return ModTextures.zotzpyre_1;
case 2:
return ModTextures.zotzpyre_2;
case 3:
return ModTextures.zotzpyre_3;
case 4:
return ModTextures.zotzpyre_4;
case 5:
return ModTextures.zotzpyre_5;
default:
return ModTextures.zotzpyre_1;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ public void doRenderLayer(T entity, float limbSwing, float limbSwingAmount, floa
GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE);
GlStateManager.depthMask(false);

if (entity.isInvisible()) {
GlStateManager.depthMask(false);
} else {
GlStateManager.depthMask(true);
}

int i = 240;
int j = i % 65536;
int k = i / 65536;
Expand Down
Loading

0 comments on commit da1ac6e

Please sign in to comment.