the whole game

This commit is contained in:
Kolyah35
2026-03-02 22:04:18 +03:00
parent 816e9060b4
commit f0617a5d22
2069 changed files with 581500 additions and 0 deletions

91
src/world/entity/animal/Sheep.h Executable file
View File

@@ -0,0 +1,91 @@
#ifndef NET_MINECRAFT_WORLD_ENTITY_ANIMAL__Sheep_H__
#define NET_MINECRAFT_WORLD_ENTITY_ANIMAL__Sheep_H__
//package net.minecraft.world.entity.animal;
#include "Animal.h"
#include "../EntityEvent.h"
#include "../item/ItemEntity.h"
#include "../player/Player.h"
#include "../../item/ItemInstance.h"
#include "../../level/Level.h"
#include "../../../SharedConstants.h"
#include "../../../util/Mth.h"
#include "../../item/Item.h"
#include "../../../nbt/CompoundTag.h"
class Sheep: public Animal
{
typedef Animal super;
static const int EAT_ANIMATION_TICKS = SharedConstants::TicksPerSecond * 2;
static const int DATA_WOOL_ID = 16;
public:
static const float COLOR[][3];
static const int NumColors;
Sheep(Level* level);
/*@Override*/
int getMaxHealth();
/*@Override*/
void aiStep();
//*@Override*/
void handleEntityEvent(char id);
float getHeadEatPositionScale(float a);
float getHeadEatAngleScale(float a);
/*@Override*/
bool interact(Player* player);
void addAdditonalSaveData(CompoundTag* tag);
void readAdditionalSaveData(CompoundTag* tag);
int getColor() const;
void setColor(int color);
static int getSheepColor(Random* random);
bool isSheared() const;
void setSheared(bool value);
int getEntityTypeId() const;
protected:
/*@Override*/
void dropDeathLoot(/*bool wasKilledByPlayer, int playerBonusLevel*/);
/*@Override*/
int getDeathLoot();
/*@Override*/
void jumpFromGround();
/*@Override*/
void updateAi();
/*@Override*/
bool shouldHoldGround();
const char* getAmbientSound();
std::string getHurtSound();
std::string getDeathSound();
// /*@Override*/
// Animal getBreedOffspring(Animal target) {
// Sheep otherSheep = (Sheep) target;
// Sheep sheep = /*new*/ Sheep(level);
// if (random.nextBoolean()) sheep.setColor(getColor());
// else sheep.setColor(otherSheep.getColor());
// return sheep;
// }
private:
int eatAnimationTick;
};
#endif /*NET_MINECRAFT_WORLD_ENTITY_ANIMAL__Sheep_H__*/