Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class BaseEggItem extends BaseParasiteItem {
- public BaseEggItem(String name, int index) {
- super(name, index);
- }
- public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
- EntityItem egg = new EntityItem(world);
- if (!player.capabilities.isCreativeMode) {
- --stack.stackSize;
- }
- world.playSoundAtEntity(player, "random.pop", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
- if (!world.isRemote) {
- world.spawnEntityInWorld(new EntityParasiteEgg(world, player.posX, player.posY, player.posZ, new ItemStack(ItemRegistry.baseParasite, 1, stack.getItemDamage())));
- }
- return stack;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement