aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/Animal.h
diff options
context:
space:
mode:
authorvoid_17 <heroerror3@gmail.com>2026-03-02 15:58:20 +0700
committervoid_17 <heroerror3@gmail.com>2026-03-02 15:58:20 +0700
commit7074f35e4ba831e358117842b99ee35b87f85ae5 (patch)
tree7d440d23473196af3056bf2ff4c59d9e740a06f5 /Minecraft.World/Animal.h
parentd63f79325f85e014361eb8cf1e41eaebedb1ae71 (diff)
shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
Diffstat (limited to 'Minecraft.World/Animal.h')
-rw-r--r--Minecraft.World/Animal.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/Minecraft.World/Animal.h b/Minecraft.World/Animal.h
index 8c0cda8e..987b360e 100644
--- a/Minecraft.World/Animal.h
+++ b/Minecraft.World/Animal.h
@@ -26,10 +26,10 @@ public:
virtual void aiStep();
protected:
- virtual void checkHurtTarget(shared_ptr<Entity> target, float d);
+ virtual void checkHurtTarget(std::shared_ptr<Entity> target, float d);
private:
- virtual void breedWith(shared_ptr<Animal> target);
+ virtual void breedWith(std::shared_ptr<Animal> target);
public:
virtual float getWalkTargetValue(int x, int y, int z);
@@ -40,7 +40,7 @@ public:
virtual void readAdditionalSaveData(CompoundTag *tag);
protected:
- virtual shared_ptr<Entity> findAttackTarget();
+ virtual std::shared_ptr<Entity> findAttackTarget();
public:
virtual bool canSpawn();
@@ -48,22 +48,22 @@ public:
protected:
virtual bool removeWhenFarAway();
- virtual int getExperienceReward(shared_ptr<Player> killedBy);
+ virtual int getExperienceReward(std::shared_ptr<Player> killedBy);
public:
- virtual bool isFood(shared_ptr<ItemInstance> itemInstance);
- virtual bool interact(shared_ptr<Player> player);
+ virtual bool isFood(std::shared_ptr<ItemInstance> itemInstance);
+ virtual bool interact(std::shared_ptr<Player> player);
protected:
int getInLoveValue(); // 4J added
public:
void setInLoveValue(int value); // 4J added
- void setInLove(shared_ptr<Player> player); // 4J added, then modified to match latest Java for XboxOne achievements
- shared_ptr<Player> getLoveCause();
+ void setInLove(std::shared_ptr<Player> player); // 4J added, then modified to match latest Java for XboxOne achievements
+ std::shared_ptr<Player> getLoveCause();
bool isInLove();
void resetLove();
- virtual bool canMate(shared_ptr<Animal> partner);
+ virtual bool canMate(std::shared_ptr<Animal> partner);
// 4J added for determining whether animals are enclosed or not
private: