Created
September 27, 2017 11:20
-
-
Save triphion/676bb9beaea7dc008530e9b8530182ce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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