diff --git a/Minecraft.World/AI/Goals/AvoidPlayerGoal.cpp b/Minecraft.World/AI/Goals/AvoidPlayerGoal.cpp index a14c7f478..123710e97 100644 --- a/Minecraft.World/AI/Goals/AvoidPlayerGoal.cpp +++ b/Minecraft.World/AI/Goals/AvoidPlayerGoal.cpp @@ -10,7 +10,7 @@ #include "../../Headers/net.minecraft.world.phys.h" #include "AvoidPlayerGoal.h" -AvoidPlayerGoal::AvoidPlayerGoal(PathfinderMob *mob, const type_info& avoidType, float maxDist, float walkSpeed, float sprintSpeed) : avoidType(avoidType) +AvoidPlayerGoal::AvoidPlayerGoal(PathfinderMob *mob, const std::type_info& avoidType, float maxDist, float walkSpeed, float sprintSpeed) : avoidType(avoidType) { this->mob = mob; //this->avoidType = avoidType; diff --git a/Minecraft.World/AI/Goals/AvoidPlayerGoal.h b/Minecraft.World/AI/Goals/AvoidPlayerGoal.h index 0b17ee4ff..664d16e7c 100644 --- a/Minecraft.World/AI/Goals/AvoidPlayerGoal.h +++ b/Minecraft.World/AI/Goals/AvoidPlayerGoal.h @@ -15,10 +15,10 @@ private: float maxDist; Path *path; PathNavigation *pathNav; - const type_info& avoidType; + const std::type_info& avoidType; public: - AvoidPlayerGoal(PathfinderMob *mob, const type_info& avoidType, float maxDist, float walkSpeed, float sprintSpeed); + AvoidPlayerGoal(PathfinderMob *mob, const std::type_info& avoidType, float maxDist, float walkSpeed, float sprintSpeed); ~AvoidPlayerGoal(); virtual bool canUse(); diff --git a/Minecraft.World/AI/Goals/InteractGoal.cpp b/Minecraft.World/AI/Goals/InteractGoal.cpp index 37aaa2339..493005a6b 100644 --- a/Minecraft.World/AI/Goals/InteractGoal.cpp +++ b/Minecraft.World/AI/Goals/InteractGoal.cpp @@ -2,12 +2,12 @@ #include "../../Headers/net.minecraft.world.entity.ai.control.h" #include "InteractGoal.h" -InteractGoal::InteractGoal(Mob *mob, const type_info& lookAtType, float lookDistance) : LookAtPlayerGoal(mob, lookAtType, lookDistance) +InteractGoal::InteractGoal(Mob *mob, const std::type_info& lookAtType, float lookDistance) : LookAtPlayerGoal(mob, lookAtType, lookDistance) { setRequiredControlFlags(Control::LookControlFlag | Control::MoveControlFlag); } -InteractGoal::InteractGoal(Mob *mob, const type_info& lookAtType, float lookDistance, float probability) : LookAtPlayerGoal(mob, lookAtType, lookDistance, probability) +InteractGoal::InteractGoal(Mob *mob, const std::type_info& lookAtType, float lookDistance, float probability) : LookAtPlayerGoal(mob, lookAtType, lookDistance, probability) { setRequiredControlFlags(Control::LookControlFlag | Control::MoveControlFlag); } \ No newline at end of file diff --git a/Minecraft.World/AI/Goals/InteractGoal.h b/Minecraft.World/AI/Goals/InteractGoal.h index d05b57b2b..2d7f3ea5e 100644 --- a/Minecraft.World/AI/Goals/InteractGoal.h +++ b/Minecraft.World/AI/Goals/InteractGoal.h @@ -5,6 +5,6 @@ class InteractGoal : public LookAtPlayerGoal { public: - InteractGoal(Mob *mob, const type_info& lookAtType, float lookDistance); - InteractGoal(Mob *mob, const type_info& lookAtType, float lookDistance, float probability); + InteractGoal(Mob *mob, const std::type_info& lookAtType, float lookDistance); + InteractGoal(Mob *mob, const std::type_info& lookAtType, float lookDistance, float probability); }; \ No newline at end of file diff --git a/Minecraft.World/AI/Goals/LookAtPlayerGoal.cpp b/Minecraft.World/AI/Goals/LookAtPlayerGoal.cpp index ebbf0879f..343651030 100644 --- a/Minecraft.World/AI/Goals/LookAtPlayerGoal.cpp +++ b/Minecraft.World/AI/Goals/LookAtPlayerGoal.cpp @@ -5,7 +5,7 @@ #include "../../Headers/net.minecraft.world.phys.h" #include "LookAtPlayerGoal.h" -LookAtPlayerGoal::LookAtPlayerGoal(Mob *mob, const type_info& lookAtType, float lookDistance) : lookAtType(lookAtType) +LookAtPlayerGoal::LookAtPlayerGoal(Mob *mob, const std::type_info& lookAtType, float lookDistance) : lookAtType(lookAtType) { this->mob = mob; this->lookDistance = lookDistance; @@ -15,7 +15,7 @@ LookAtPlayerGoal::LookAtPlayerGoal(Mob *mob, const type_info& lookAtType, float lookTime = 0; } -LookAtPlayerGoal::LookAtPlayerGoal(Mob *mob, const type_info& lookAtType, float lookDistance, float probability) : lookAtType(lookAtType) +LookAtPlayerGoal::LookAtPlayerGoal(Mob *mob, const std::type_info& lookAtType, float lookDistance, float probability) : lookAtType(lookAtType) { this->mob = mob; this->lookDistance = lookDistance; diff --git a/Minecraft.World/AI/Goals/LookAtPlayerGoal.h b/Minecraft.World/AI/Goals/LookAtPlayerGoal.h index bfc524c86..5c05c9d4b 100644 --- a/Minecraft.World/AI/Goals/LookAtPlayerGoal.h +++ b/Minecraft.World/AI/Goals/LookAtPlayerGoal.h @@ -17,11 +17,11 @@ private: float lookDistance; int lookTime; float probability; - const type_info& lookAtType; + const std::type_info& lookAtType; public: - LookAtPlayerGoal(Mob *mob, const type_info& lookAtType, float lookDistance); - LookAtPlayerGoal(Mob *mob, const type_info& lookAtType, float lookDistance, float probability); + LookAtPlayerGoal(Mob *mob, const std::type_info& lookAtType, float lookDistance); + LookAtPlayerGoal(Mob *mob, const std::type_info& lookAtType, float lookDistance, float probability); virtual ~LookAtPlayerGoal() {} virtual bool canUse(); diff --git a/Minecraft.World/AI/Goals/NearestAttackableTargetGoal.cpp b/Minecraft.World/AI/Goals/NearestAttackableTargetGoal.cpp index c1a3325ea..ed1b78785 100644 --- a/Minecraft.World/AI/Goals/NearestAttackableTargetGoal.cpp +++ b/Minecraft.World/AI/Goals/NearestAttackableTargetGoal.cpp @@ -19,7 +19,7 @@ bool NearestAttackableTargetGoal::DistComp::operator() (std::shared_ptr return true; } -NearestAttackableTargetGoal::NearestAttackableTargetGoal(Mob *mob, const type_info& targetType, float within, int randomInterval, bool mustSee, bool mustReach /*= false*/) : TargetGoal(mob, within, mustSee, mustReach), targetType(targetType) +NearestAttackableTargetGoal::NearestAttackableTargetGoal(Mob *mob, const std::type_info& targetType, float within, int randomInterval, bool mustSee, bool mustReach /*= false*/) : TargetGoal(mob, within, mustSee, mustReach), targetType(targetType) { //this->targetType = targetType; this->within = within; diff --git a/Minecraft.World/AI/Goals/NearestAttackableTargetGoal.h b/Minecraft.World/AI/Goals/NearestAttackableTargetGoal.h index af7968407..9715b3d5f 100644 --- a/Minecraft.World/AI/Goals/NearestAttackableTargetGoal.h +++ b/Minecraft.World/AI/Goals/NearestAttackableTargetGoal.h @@ -18,17 +18,17 @@ public: private: weak_ptr target; - const type_info& targetType; + const std::type_info& targetType; int randomInterval; DistComp *distComp; public: - //public NearestAttackableTargetGoal(Mob mob, const type_info& targetType, float within, int randomInterval, bool mustSee) + //public NearestAttackableTargetGoal(Mob mob, const std::type_info& targetType, float within, int randomInterval, bool mustSee) //{ // this(mob, targetType, within, randomInterval, mustSee, false); //} - NearestAttackableTargetGoal(Mob *mob, const type_info& targetType, float within, int randomInterval, bool mustSee, bool mustReach = false); + NearestAttackableTargetGoal(Mob *mob, const std::type_info& targetType, float within, int randomInterval, bool mustSee, bool mustReach = false); virtual ~NearestAttackableTargetGoal(); virtual bool canUse(); diff --git a/Minecraft.World/AI/Goals/NonTameRandomTargetGoal.cpp b/Minecraft.World/AI/Goals/NonTameRandomTargetGoal.cpp index 84fae86f9..7986ea54a 100644 --- a/Minecraft.World/AI/Goals/NonTameRandomTargetGoal.cpp +++ b/Minecraft.World/AI/Goals/NonTameRandomTargetGoal.cpp @@ -2,7 +2,7 @@ #include "../../Headers/net.minecraft.world.entity.animal.h" #include "NonTameRandomTargetGoal.h" -NonTameRandomTargetGoal::NonTameRandomTargetGoal(TamableAnimal *mob, const type_info& targetType, float within, int randomInterval, bool mustSee) : NearestAttackableTargetGoal(mob, targetType, within, randomInterval, mustSee) +NonTameRandomTargetGoal::NonTameRandomTargetGoal(TamableAnimal *mob, const std::type_info& targetType, float within, int randomInterval, bool mustSee) : NearestAttackableTargetGoal(mob, targetType, within, randomInterval, mustSee) { this->tamableMob = mob; } diff --git a/Minecraft.World/AI/Goals/NonTameRandomTargetGoal.h b/Minecraft.World/AI/Goals/NonTameRandomTargetGoal.h index 8adba7df7..4c2f57755 100644 --- a/Minecraft.World/AI/Goals/NonTameRandomTargetGoal.h +++ b/Minecraft.World/AI/Goals/NonTameRandomTargetGoal.h @@ -10,7 +10,7 @@ private: TamableAnimal *tamableMob; // Owner of this goal public: - NonTameRandomTargetGoal(TamableAnimal *mob, const type_info& targetType, float within, int randomInterval, bool mustSee); + NonTameRandomTargetGoal(TamableAnimal *mob, const std::type_info& targetType, float within, int randomInterval, bool mustSee); bool canUse(); }; \ No newline at end of file diff --git a/Minecraft.World/Entities/MobCategory.h b/Minecraft.World/Entities/MobCategory.h index a978c40e2..b2f70f862 100644 --- a/Minecraft.World/Entities/MobCategory.h +++ b/Minecraft.World/Entities/MobCategory.h @@ -70,7 +70,7 @@ private: MobCategory(int maxVar, Material *spawnPositionMaterial, bool isFriendly, eINSTANCEOF eBase, bool isSingleType, int maxPerLevel); public: - const type_info getBaseClass(); + const std::type_info getBaseClass(); const eINSTANCEOF getEnumBaseClass(); // 4J added int getMaxInstancesPerChunk(); int getMaxInstancesPerLevel(); // 4J added diff --git a/Minecraft.World/Level/EmptyLevelChunk.cpp b/Minecraft.World/Level/EmptyLevelChunk.cpp index 0bb9a7f9a..207f8bdb9 100644 --- a/Minecraft.World/Level/EmptyLevelChunk.cpp +++ b/Minecraft.World/Level/EmptyLevelChunk.cpp @@ -148,7 +148,7 @@ void EmptyLevelChunk::getEntities(std::shared_ptr except, AABB bb, std:: { } -void EmptyLevelChunk::getEntitiesOfClass(const type_info& ec, AABB bb, std::vector > &es) +void EmptyLevelChunk::getEntitiesOfClass(const std::type_info& ec, AABB bb, std::vector > &es) { } diff --git a/Minecraft.World/Level/EmptyLevelChunk.h b/Minecraft.World/Level/EmptyLevelChunk.h index 070d3a58c..4c5d2657a 100644 --- a/Minecraft.World/Level/EmptyLevelChunk.h +++ b/Minecraft.World/Level/EmptyLevelChunk.h @@ -41,7 +41,7 @@ public: void unload(bool unloadTileEntities) ; // 4J - added parameter void markUnsaved(); void getEntities(std::shared_ptr except, AABB bb, std::vector > &es); - void getEntitiesOfClass(const type_info& ec, AABB bb, std::vector > &es); + void getEntitiesOfClass(const std::type_info& ec, AABB bb, std::vector > &es); int countEntities(); bool shouldSave(bool force); void setBlocks(byteArray newBlocks, int sub); diff --git a/Minecraft.World/Level/Level.cpp b/Minecraft.World/Level/Level.cpp index 15dea192f..87ea01a44 100644 --- a/Minecraft.World/Level/Level.cpp +++ b/Minecraft.World/Level/Level.cpp @@ -3768,7 +3768,7 @@ std::vector > *Level::getEntities(std::shared_ptr > *Level::getEntitiesOfClass(const type_info& baseClass, AABB *bb) +std::vector > *Level::getEntitiesOfClass(const std::type_info& baseClass, AABB *bb) { int xc0 = Mth::floor((bb->x0 - 2) / 16); int xc1 = Mth::floor((bb->x1 + 2) / 16); @@ -3805,7 +3805,7 @@ std::vector > *Level::getEntitiesOfClass(const type_info return es; } -std::shared_ptr Level::getClosestEntityOfClass(const type_info& baseClass, AABB *bb, std::shared_ptr source) +std::shared_ptr Level::getClosestEntityOfClass(const std::type_info& baseClass, AABB *bb, std::shared_ptr source) { std::vector > *entities = getEntitiesOfClass(baseClass, bb); std::shared_ptr closest = nullptr; @@ -4512,7 +4512,7 @@ void Level::setSavedData(const std::wstring& id, std::shared_ptr data } -std::shared_ptr Level::getSavedData(const type_info& clazz, const std::wstring& id) +std::shared_ptr Level::getSavedData(const std::type_info& clazz, const std::wstring& id) { return savedDataStorage->get(clazz, id); } diff --git a/Minecraft.World/Level/Level.h b/Minecraft.World/Level/Level.h index 19be720a6..0d3e2a935 100644 --- a/Minecraft.World/Level/Level.h +++ b/Minecraft.World/Level/Level.h @@ -419,8 +419,8 @@ public: bool isClientSide; std::vector > *getEntities(std::shared_ptr except, AABB *bb); - std::vector > *getEntitiesOfClass(const type_info& baseClass, AABB *bb); - std::shared_ptr getClosestEntityOfClass(const type_info& baseClass, AABB *bb, std::shared_ptr source); + std::vector > *getEntitiesOfClass(const std::type_info& baseClass, AABB *bb); + std::shared_ptr getClosestEntityOfClass(const std::type_info& baseClass, AABB *bb, std::shared_ptr source); std::vector > getAllEntities(); void tileEntityChanged(int x, int y, int z, std::shared_ptr te); // unsigned int countInstanceOf(BaseObject::Class *clas); @@ -477,7 +477,7 @@ public: bool isRainingAt(int x, int y, int z); bool isHumidAt(int x, int y, int z); void setSavedData(const std::wstring& id, std::shared_ptr data); - std::shared_ptr getSavedData(const type_info& clazz, const std::wstring& id); + std::shared_ptr getSavedData(const std::type_info& clazz, const std::wstring& id); int getFreeAuxValueFor(const std::wstring& id); void levelEvent(int type, int x, int y, int z, int data); void levelEvent(std::shared_ptr source, int type, int x, int y, int z, int data); diff --git a/Minecraft.World/Level/LevelChunk.cpp b/Minecraft.World/Level/LevelChunk.cpp index 11b447c6e..879fd6b86 100644 --- a/Minecraft.World/Level/LevelChunk.cpp +++ b/Minecraft.World/Level/LevelChunk.cpp @@ -1602,7 +1602,7 @@ void LevelChunk::getEntities(std::shared_ptr except, AABB *bb, std::vect #endif } -void LevelChunk::getEntitiesOfClass(const type_info& ec, AABB *bb, std::vector > &es) +void LevelChunk::getEntitiesOfClass(const std::type_info& ec, AABB *bb, std::vector > &es) { int yc0 = Mth::floor((bb->y0 - 2) / 16); int yc1 = Mth::floor((bb->y1 + 2) / 16); @@ -1638,7 +1638,7 @@ void LevelChunk::getEntitiesOfClass(const type_info& ec, AABB *bb, std::vector e = *it; //entities->at(i); bool isAssignableFrom = false; - // Some special cases where the base class is a general type that our class may be derived from, otherwise do a direct comparison of type_info + // Some special cases where the base class is a general type that our class may be derived from, otherwise do a direct comparison of std::type_info if( ec == typeid(Player) ) { if( dynamic_pointer_cast(e) != NULL ) isAssignableFrom = true; } else if ( ec == typeid(Mob) ) { if( dynamic_pointer_cast(e) != NULL ) isAssignableFrom = true; } else if ( ec == typeid(Monster) ) { if( dynamic_pointer_cast(e) != NULL ) isAssignableFrom = true; } diff --git a/Minecraft.World/Level/LevelChunk.h b/Minecraft.World/Level/LevelChunk.h index 4dd2809e7..8512ade5d 100644 --- a/Minecraft.World/Level/LevelChunk.h +++ b/Minecraft.World/Level/LevelChunk.h @@ -204,7 +204,7 @@ public: #endif virtual void markUnsaved(); virtual void getEntities(std::shared_ptr except, AABB *bb, std::vector > &es); - virtual void getEntitiesOfClass(const type_info& ec, AABB *bb, std::vector > &es); + virtual void getEntitiesOfClass(const std::type_info& ec, AABB *bb, std::vector > &es); virtual int countEntities(); virtual bool shouldSave(bool force); virtual int getBlocksAndData(byteArray *data, int x0, int y0, int z0, int x1, int y1, int z1, int p, bool includeLighting = true); // 4J - added includeLighting parameter diff --git a/Minecraft.World/Level/Storage/SavedDataStorage.cpp b/Minecraft.World/Level/Storage/SavedDataStorage.cpp index 75d8d97a6..6b313cd38 100644 --- a/Minecraft.World/Level/Storage/SavedDataStorage.cpp +++ b/Minecraft.World/Level/Storage/SavedDataStorage.cpp @@ -20,7 +20,7 @@ SavedDataStorage::SavedDataStorage(LevelStorage *levelStorage) loadAuxValues(); } -std::shared_ptr SavedDataStorage::get(const type_info& clazz, const std::wstring& id) +std::shared_ptr SavedDataStorage::get(const std::type_info& clazz, const std::wstring& id) { AUTO_VAR(it, cache.find( id )); if (it != cache.end()) return (*it).second; diff --git a/Minecraft.World/Level/Storage/SavedDataStorage.h b/Minecraft.World/Level/Storage/SavedDataStorage.h index 30a44b1ba..240bee892 100644 --- a/Minecraft.World/Level/Storage/SavedDataStorage.h +++ b/Minecraft.World/Level/Storage/SavedDataStorage.h @@ -19,7 +19,7 @@ private: public: SavedDataStorage(LevelStorage *); - std::shared_ptr get(const type_info& clazz, const std::wstring& id); + std::shared_ptr get(const std::type_info& clazz, const std::wstring& id); void set(const std::wstring& id, std::shared_ptr data); void save(); diff --git a/Minecraft.World/Level/WaterLevelChunk.cpp b/Minecraft.World/Level/WaterLevelChunk.cpp index e1cb08ffe..0c8f93505 100644 --- a/Minecraft.World/Level/WaterLevelChunk.cpp +++ b/Minecraft.World/Level/WaterLevelChunk.cpp @@ -102,7 +102,7 @@ void WaterLevelChunk::getEntities(std::shared_ptr except, AABB bb, std:: { } -void WaterLevelChunk::getEntitiesOfClass(const type_info& ec, AABB bb, std::vector > &es) +void WaterLevelChunk::getEntitiesOfClass(const std::type_info& ec, AABB bb, std::vector > &es) { } diff --git a/Minecraft.World/Level/WaterLevelChunk.h b/Minecraft.World/Level/WaterLevelChunk.h index 95ce6f0fa..23bd5eedd 100644 --- a/Minecraft.World/Level/WaterLevelChunk.h +++ b/Minecraft.World/Level/WaterLevelChunk.h @@ -33,7 +33,7 @@ public: void unload(bool unloadTileEntities) ; // 4J - added parameter void markUnsaved(); void getEntities(std::shared_ptr except, AABB bb, std::vector > &es); - void getEntitiesOfClass(const type_info& ec, AABB bb, std::vector > &es); + void getEntitiesOfClass(const std::type_info& ec, AABB bb, std::vector > &es); int countEntities(); bool shouldSave(bool force); void setBlocks(byteArray newBlocks, int sub); diff --git a/Minecraft.World/Network/Packets/Packet.cpp b/Minecraft.World/Network/Packets/Packet.cpp index 0ff351a9c..3717abf60 100644 --- a/Minecraft.World/Network/Packets/Packet.cpp +++ b/Minecraft.World/Network/Packets/Packet.cpp @@ -175,7 +175,7 @@ std::vector Packet::renderableStats = std::vector 0) throw new IllegalArgumentException(std::wstring(L"Duplicate packet id:") + _toString(id)); diff --git a/Minecraft.World/Network/Packets/Packet.h b/Minecraft.World/Network/Packets/Packet.h index 41f3a5e0b..616802277 100644 --- a/Minecraft.World/Network/Packets/Packet.h +++ b/Minecraft.World/Network/Packets/Packet.h @@ -55,7 +55,7 @@ public: // 4J Stu - Added the sendToAnyClient param so we can limit some packets to be only sent to one player on a system // 4J Stu - Added renderStats param for use in debugging - static void map(int id, bool receiveOnClient, bool receiveOnServer, bool sendToAnyClient, bool renderStats, const type_info& clazz, packetCreateFn ); + static void map(int id, bool receiveOnClient, bool receiveOnServer, bool sendToAnyClient, bool renderStats, const std::type_info& clazz, packetCreateFn ); public: const __int64 createTime;