Guest User

Untitled

a guest
Jan 23rd, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. package net.minecraft.src;
  2.  
  3. public class Entityrim extends EntityLiving
  4. {
  5.  
  6. public Entityrim(World world)
  7. {
  8. super(world);
  9.  
  10. //Set the texture
  11. texture = "/mob/Mob.png";
  12.  
  13. //Set the size of the hitbox
  14. setSize(1F,1F);
  15.  
  16. //Set the speed of the mob
  17. //NOTE: 0 = 0% speed, 1 = 100%, 0.75 = 75%
  18. moveSpeed = 20F;
  19.  
  20. //Set how much health the mob has
  21. health = 10;
  22.  
  23. }
  24.  
  25. public void writeEntityToNBT(NBTTagCompound nbttagcompound)
  26. {
  27. super.writeEntityToNBT(nbttagcompound);
  28. }
  29.  
  30. public void readEntityFromNBT(NBTTagCompound nbttagcompound)
  31. {
  32. super.readEntityFromNBT(nbttagcompound);
  33. }
  34.  
  35. //Need audiomod for the next 3. Remove them if you want a silent mob (except for the sound of foot steps)
  36. //You can also use sounds from default mobs by going into their respective entity files (like I did in the video)
  37.  
  38. //Here's where you change the volume of the mob's sounds
  39. protected float getSoundVolume()
  40. {
  41. return 0.4F;
  42. }
  43.  
  44. //Here you define what items/blocks you want the mob to drop when killed
  45. protected void dropFewItems()
  46. {
  47. dropItem(Item.coal.shiftedIndex, 10);
  48. dropItem(Item.stick.shiftedIndex, 10);
  49. dropItem(Item.swordDiamond.shiftedIndex, 1);
  50. }
  51. public boolean interact(EntityPlayer entityplayer, int i, int j, int k) {
  52. if((entityplayer instanceof EntityPlayerSP)) {
  53. ((EntityPlayerSP)entityplayer).displayWorkbenchGUI(i, j, k);
  54. return true;
  55. } else {
  56. return false;
  57. }
  58. }
Add Comment
Please, Sign In to add comment