Advertisement
kman2010

EntityDragon.java

Jun 4th, 2011
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.98 KB | None | 0 0
  1. package net.minecraft.src;
  2. import java.util.Random;
  3.  
  4. //Referenced classes of package net.minecraft.src:
  5. //         EntityMob, World, Item, MathHelper
  6.  
  7. public class EntityDragon extends EntityMob
  8. {
  9.  
  10.  public EntityDragon(World world)
  11.  {
  12.      super(world);
  13.      texture = "/mob/Dragon.png";   //This is the texture of the mob, It is in the "Temp" Folder
  14.      moveSpeed = 1.0F;//This is how fast it moves
  15.      setSize(2F, 2F);
  16.      
  17.  }
  18.  
  19.  protected String getLivingSound()
  20.  {
  21.      return "mob.zombie";
  22.  }
  23.  
  24.  protected String getHurtSound()
  25.  {
  26.      return "mob.zombiehurt";
  27.  }
  28.  
  29.  protected String getDeathSound()
  30.  {
  31.      return "mob.zombiedeath";
  32.  }
  33.  
  34.  protected int getDropItemId()
  35.  {
  36.    
  37.      return 352; //This is what the Monster will drop
  38.  }
  39.  public boolean getCanSpawnHere()
  40.  {
  41.      return rand.nextInt(20) == 0 && super.getCanSpawnHere() && worldObj.difficultySetting > 0;
  42.  }
  43.  public int getMaxSpawnedInChunk()
  44.  {
  45.      return 1;
  46.  }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement