Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package papy.biere;
- import net.minecraft.entity.Entity;
- import net.minecraft.entity.EnumCreatureAttribute;
- import net.minecraft.entity.ai.EntityAIAttackOnCollide;
- import net.minecraft.entity.ai.EntityAIBreakDoor;
- import net.minecraft.entity.ai.EntityAIHurtByTarget;
- import net.minecraft.entity.ai.EntityAILookIdle;
- import net.minecraft.entity.ai.EntityAIMoveThroughVillage;
- import net.minecraft.entity.ai.EntityAIMoveTwardsRestriction;
- import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
- import net.minecraft.entity.ai.EntityAISwimming;
- import net.minecraft.entity.ai.EntityAIWander;
- import net.minecraft.entity.ai.EntityAIWatchClosest;
- import net.minecraft.entity.monster.EntityZombie;
- import net.minecraft.entity.passive.EntityVillager;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemStack;
- import net.minecraft.world.World;
- public class EntityOgre extends EntityZombie{
- public EntityOgre(World par1World) {
- super(par1World);
- this.moveSpeed = 0.80F;
- this.texture = "/mob/ogre.png";
- }
- public int getAttackStrength(Entity par1Entity)
- {
- return 50;
- }
- public String getTexture()
- {
- return "/mob/ogre.png";
- }
- public int getMaxHealth()
- {
- return 100;
- }
- public boolean isVillager()
- {
- return false;
- }
- protected int getDropItemId()
- {
- return Item.emerald.itemID;
- }
- protected void dropRareDrop(int par1)
- {
- switch (this.rand.nextInt(3))
- {
- case 0:
- this.dropItem(Item.blazeRod.itemID, 1);
- break;
- case 1:
- this.dropItem(Item.ghastTear.itemID, 1);
- break;
- case 2:
- this.dropItem(Item.diamond.itemID, 1);
- }
- }
- /**
- * Makes entity wear random armor based on difficulty
- */
- protected void addRandomArmor()
- {
- super.addRandomArmor();
- this.setCurrentItemOrArmor(0, new ItemStack(Item.bow));
- this.setCurrentItemOrArmor(3, new ItemStack(Item.plateDiamond));
- }
- public EnumCreatureAttribute getCreatureAttribute()
- {
- return EnumCreatureAttribute.UNDEAD;
- }
- public int getTotalArmorValue()
- {
- return 20;
- }
- protected void dropFewItems(boolean par1, int par2)
- {
- int j = this.getDropItemId();
- if (j > 0)
- {
- int k = this.rand.nextInt(3);
- if (par2 > 0)
- {
- k += this.rand.nextInt(par2 + 1);
- }
- for (int l = 0; l < k; ++l)
- {
- if(!this.worldObj.isDaytime()){
- this.dropItem(j, 1);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement