Skip to content

Instantly share code, notes, and snippets.

@BlockAfterBlock
Created April 24, 2011 03:49
Show Gist options
  • Select an option

  • Save BlockAfterBlock/939281 to your computer and use it in GitHub Desktop.

Select an option

Save BlockAfterBlock/939281 to your computer and use it in GitHub Desktop.
package net.minecraft.src;
public class LMHBison extends EntityAnimals
{
public LMHBison(World world)
{
super(world);
texture = "/LMH/Bison.png";
setSize(0.9F, 1.3F);
}
public void writeEntityToNBT(NBTTagCompound nbttagcompound)
{
super.writeEntityToNBT(nbttagcompound);
}
public void readEntityFromNBT(NBTTagCompound nbttagcompound)
{
super.readEntityFromNBT(nbttagcompound);
}
protected String getLivingSound()
{
return "mob.cow";
}
protected String getHurtSound()
{
return "mob.cowhurt";
}
protected String getDeathSound()
{
return "mob.cowhurt";
}
protected float getSoundVolume()
{
return 0.4F;
}
protected int getDropItemId()
{
return Item.leather.shiftedIndex;
}
public boolean interact(EntityPlayer entityplayer)
{
ItemStack itemstack = entityplayer.inventory.getCurrentItem();
if(itemstack != null && itemstack.itemID == Item.bucketEmpty.shiftedIndex)
{
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, new ItemStack(Item.bucketMilk));
return true;
} else
{
return false;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment