Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.src;
- public class Entityrim extends EntityLiving
- {
- public Entityrim(World world)
- {
- super(world);
- //Set the texture
- texture = "/mob/Mob.png";
- //Set the size of the hitbox
- setSize(1F,1F);
- //Set the speed of the mob
- //NOTE: 0 = 0% speed, 1 = 100%, 0.75 = 75%
- moveSpeed = 20F;
- //Set how much health the mob has
- health = 10;
- }
- public void writeEntityToNBT(NBTTagCompound nbttagcompound)
- {
- super.writeEntityToNBT(nbttagcompound);
- }
- public void readEntityFromNBT(NBTTagCompound nbttagcompound)
- {
- super.readEntityFromNBT(nbttagcompound);
- }
- //Need audiomod for the next 3. Remove them if you want a silent mob (except for the sound of foot steps)
- //You can also use sounds from default mobs by going into their respective entity files (like I did in the video)
- //Here's where you change the volume of the mob's sounds
- protected float getSoundVolume()
- {
- return 0.4F;
- }
- //Here you define what items/blocks you want the mob to drop when killed
- protected void dropFewItems()
- {
- dropItem(Item.coal.shiftedIndex, 10);
- dropItem(Item.stick.shiftedIndex, 10);
- dropItem(Item.swordDiamond.shiftedIndex, 1);
- }
- public boolean interact(EntityPlayer entityplayer, int i, int j, int k) {
- if((entityplayer instanceof EntityPlayerSP)) {
- ((EntityPlayerSP)entityplayer).displayWorkbenchGUI(i, j, k);
- return true;
- } else {
- return false;
- }
- }
Add Comment
Please, Sign In to add comment