Skip to content

Instantly share code, notes, and snippets.

@triphion
Created September 27, 2017 11:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save triphion/676bb9beaea7dc008530e9b8530182ce to your computer and use it in GitHub Desktop.
Save triphion/676bb9beaea7dc008530e9b8530182ce to your computer and use it in GitHub Desktop.
package com.triphion.ancient.entity;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.world.World;
public class EntityHarog extends EntityZombie{
public EntityHarog(World worldIn) {
super(worldIn);
}
@Override
protected void initEntityAI() {
super.initEntityAI();
}
public boolean isAIEnabled(){
return true;
}
@Override
protected void applyEntityAttributes() {
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(20D);
this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(5D);
}
}
package com.triphion.ancient.client.entity;
import com.triphion.ancient.Reference;
import com.triphion.ancient.client.model.ModelHarog;
import com.triphion.ancient.entity.EntityHarog;
import net.minecraft.client.model.ModelZombie;
import net.minecraft.client.renderer.entity.RenderBiped;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.entity.layers.LayerBipedArmor;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class RenderHarog extends RenderLiving<EntityHarog>
{
private static final ResourceLocation HAROG_TEXTURES = new ResourceLocation(Reference.MODID+":textures/entity/harog/harog.png");
public RenderHarog(RenderManager renderManagerIn) {
super(renderManagerIn, new ModelHarog(), 0.5F);
}
/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(EntityHarog entity)
{
return HAROG_TEXTURES;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment