mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-04 19:36:43 +03:00
* Add Pig
This commit is contained in:
65
source/world/entity/Pig.cpp
Normal file
65
source/world/entity/Pig.cpp
Normal file
@@ -0,0 +1,65 @@
|
||||
/********************************************************************
|
||||
Minecraft: Pocket Edition - Decompilation Project
|
||||
Copyright (C) 2023 iProgramInCpp
|
||||
|
||||
The following code is licensed under the BSD 1 clause license.
|
||||
SPDX-License-Identifier: BSD-1-Clause
|
||||
********************************************************************/
|
||||
#include "Pig.hpp"
|
||||
|
||||
Pig::Pig(Level* pLevel) : Animal(pLevel)
|
||||
{
|
||||
field_C8 = RENDER_PIG;
|
||||
m_texture = "mob/pig.png";
|
||||
setSize(0.9f, 0.9f);
|
||||
// some dataitem stuff
|
||||
}
|
||||
|
||||
std::string Pig::getAmbientSound()
|
||||
{
|
||||
return "mob.pig";
|
||||
}
|
||||
|
||||
std::string Pig::getDeathSound()
|
||||
{
|
||||
return "mob.pigdeath";
|
||||
}
|
||||
|
||||
std::string Pig::getHurtSound()
|
||||
{
|
||||
return "mob.pig";
|
||||
}
|
||||
|
||||
int Pig::getEntityTypeId()
|
||||
{
|
||||
return TYPE_PIG;
|
||||
}
|
||||
|
||||
int Pig::getMaxHealth()
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
||||
bool Pig::interact(Player* pPlayer)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int Pig::getDeathLoot()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool Pig::hasSaddle()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void Pig::setSaddle(bool b)
|
||||
{
|
||||
}
|
||||
|
||||
Entity* Pig::getBreedOffspring(Animal* pOther)
|
||||
{
|
||||
return new Pig(m_pLevel);
|
||||
}
|
||||
Reference in New Issue
Block a user