diff --git a/Minecraft.Client/Common/Audio/SoundEngine.cpp b/Minecraft.Client/Common/Audio/SoundEngine.cpp index a3207af3..b384feba 100644 --- a/Minecraft.Client/Common/Audio/SoundEngine.cpp +++ b/Minecraft.Client/Common/Audio/SoundEngine.cpp @@ -239,14 +239,14 @@ void SoundEngine::updateMiniAudio() 0, m_ListenerA[i].vPosition.x, m_ListenerA[i].vPosition.y, - m_ListenerA[i].vPosition.z); + -m_ListenerA[i].vPosition.z); ma_engine_listener_set_direction( &m_engine, 0, m_ListenerA[i].vOrientFront.x, m_ListenerA[i].vOrientFront.y, - m_ListenerA[i].vOrientFront.z); + -m_ListenerA[i].vOrientFront.z); ma_engine_listener_set_world_up( &m_engine, @@ -323,7 +323,7 @@ void SoundEngine::updateMiniAudio() &s->sound, s->info.x, s->info.y, - s->info.z); + -s->info.z); } } @@ -604,7 +604,7 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume, floa ma_sound_set_volume(&s->sound, finalVolume); ma_sound_set_pitch(&s->sound, pitch); - ma_sound_set_position(&s->sound, x, y, z); + ma_sound_set_position(&s->sound, x, y, -z); ma_sound_start(&s->sound); @@ -1271,7 +1271,7 @@ void SoundEngine::playMusicUpdate() if (m_StreamingAudioInfo.bIs3D) { ma_sound_set_spatialization_enabled(&m_musicStream, MA_TRUE); - ma_sound_set_position(&m_musicStream, m_StreamingAudioInfo.x, m_StreamingAudioInfo.y, m_StreamingAudioInfo.z); + ma_sound_set_position(&m_musicStream, m_StreamingAudioInfo.x, m_StreamingAudioInfo.y, -m_StreamingAudioInfo.z); } else { diff --git a/Minecraft.Client/HumanoidModel.cpp b/Minecraft.Client/HumanoidModel.cpp index c6c6b9f4..06b796f5 100644 --- a/Minecraft.Client/HumanoidModel.cpp +++ b/Minecraft.Client/HumanoidModel.cpp @@ -241,7 +241,7 @@ void HumanoidModel::setupAnim(float time, float r, float bob, float yRot, float if (riding) { - if(uiBitmaskOverrideAnim&(1<xRot += -HALF_PI * 0.4f; arm1->xRot += -HALF_PI * 0.4f; @@ -256,6 +256,8 @@ void HumanoidModel::setupAnim(float time, float r, float bob, float yRot, float arm1->xRot += -HALF_PI * 0.4f; leg0->xRot = -HALF_PI * 0.4f; leg1->xRot = -HALF_PI * 0.4f; + leg0->yRot = HALF_PI * 0.2f; + leg1->yRot = -HALF_PI * 0.2f; } } else if(idle && !sneaking ) diff --git a/Minecraft.Client/LivingEntityRenderer.cpp b/Minecraft.Client/LivingEntityRenderer.cpp index b3478ba9..5309e664 100644 --- a/Minecraft.Client/LivingEntityRenderer.cpp +++ b/Minecraft.Client/LivingEntityRenderer.cpp @@ -501,7 +501,7 @@ void LivingEntityRenderer::renderNameTag(shared_ptr mob, const wst constexpr float s = 1 / 60.0f * size; glPushMatrix(); - glTranslatef(static_cast(x) + 0, static_cast(y) + mob->bbHeight + 0.5f, static_cast(z)); + glTranslatef(static_cast(x), static_cast(y) + mob->bbHeight + 0.5f, static_cast(z)); glNormal3f(0, 1, 0); glRotatef(-this->entityRenderDispatcher->playerRotY, 0, 1, 0); diff --git a/Minecraft.Client/Minecraft.cpp b/Minecraft.Client/Minecraft.cpp index 1ba432fd..56f84d98 100644 --- a/Minecraft.Client/Minecraft.cpp +++ b/Minecraft.Client/Minecraft.cpp @@ -3516,14 +3516,15 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) { *piUse=IDS_TOOLTIPS_UNLEASH; } - else if (heldItemId == Item::lead_Id) + // 4J: fix improper tooltips for TU20 + /*else if (heldItemId == Item::lead_Id) { if (!mob->isLeashed()) *piUse=IDS_TOOLTIPS_LEASH; } else if (heldItemId == Item::nameTag_Id) { *piUse=IDS_TOOLTIPS_NAME; - } + }*/ } *piAction=IDS_TOOLTIPS_HIT; break; diff --git a/Minecraft.Client/PlayerRenderer.cpp b/Minecraft.Client/PlayerRenderer.cpp index a9b94544..215b8c1f 100644 --- a/Minecraft.Client/PlayerRenderer.cpp +++ b/Minecraft.Client/PlayerRenderer.cpp @@ -470,7 +470,7 @@ void PlayerRenderer::additionalRendering(shared_ptr _mob, float a) } } -void PlayerRenderer::renderNameTags(shared_ptr player, double x, double y, double z, wstring msg, float scale, double dist) +void PlayerRenderer::renderNameTags(shared_ptr player, double x, double y, double z, const wstring &msg, float scale, double dist) { #if 0 if (dist < 10 * 10) @@ -496,7 +496,17 @@ void PlayerRenderer::renderNameTags(shared_ptr player, double x, d } #endif - LivingEntityRenderer::renderNameTags(player, x, y, z, msg, scale, dist); + shared_ptr pPlayer = dynamic_pointer_cast(player); + int color = getNametagColour(pPlayer->getPlayerIndex()); + + if (player->isSleeping()) + { + renderNameTag(player, msg, x, y - 1.5f, z, 64, color); + } + else + { + renderNameTag(player, msg, x, y, z, 64, color); + } } void PlayerRenderer::scale(shared_ptr player, float a) diff --git a/Minecraft.World/Animal.cpp b/Minecraft.World/Animal.cpp index 68278162..d789aa5d 100644 --- a/Minecraft.World/Animal.cpp +++ b/Minecraft.World/Animal.cpp @@ -221,6 +221,12 @@ void Animal::readAdditionalSaveData(CompoundTag *tag) setDespawnProtected(); } +void Animal::dropLeash(bool synch, bool createItemDrop) +{ + setDespawnProtected(); + Mob::dropLeash(synch, createItemDrop); +} + shared_ptr Animal::findAttackTarget() { if (fleeTime > 0) return nullptr; @@ -301,7 +307,7 @@ int Animal::getAmbientSoundInterval() bool Animal::removeWhenFarAway() { - return !isDespawnProtected(); // 4J changed - was false + return !hasCustomName() && !isLeashed() && !isDespawnProtected(); } int Animal::getExperienceReward(shared_ptr killedBy) diff --git a/Minecraft.World/Animal.h b/Minecraft.World/Animal.h index 85a20439..100f974e 100644 --- a/Minecraft.World/Animal.h +++ b/Minecraft.World/Animal.h @@ -38,6 +38,7 @@ public: virtual bool hurt(DamageSource *source, float dmg); virtual void addAdditonalSaveData(CompoundTag *tag); virtual void readAdditionalSaveData(CompoundTag *tag); + virtual void dropLeash(bool synch, bool createItemDrop); protected: virtual shared_ptr findAttackTarget(); diff --git a/Minecraft.World/AttributeModifier.cpp b/Minecraft.World/AttributeModifier.cpp index 17090289..f4a2d4f4 100644 --- a/Minecraft.World/AttributeModifier.cpp +++ b/Minecraft.World/AttributeModifier.cpp @@ -122,8 +122,15 @@ HtmlString AttributeModifier::getHoverText(eATTRIBUTE_ID attribute) assert(0); } - wchar_t formatted[256]; - swprintf(formatted, 256, L"%ls%d%ls %ls", (amount > 0 ? L"+" : L"-"), static_cast(displayAmount), (percentage ? L"%" : L""), app.GetString(Attribute::getName(attribute))); + wchar_t formatted[256]; + if (percentage) + { + swprintf(formatted, 256, L"%ls%d%ls %ls", (amount > 0 ? L"+" : L"-"), static_castdisplayAmount, L"%", app.GetString(Attribute::getName(attribute))); + } + else + { + swprintf(formatted, 256, L"%ls%.1g %ls", (amount > 0 ? L"+" : L"-"), displayAmount, app.GetString(Attribute::getName(attribute))); + } return HtmlString(formatted, color); } \ No newline at end of file diff --git a/Minecraft.World/Biome.cpp b/Minecraft.World/Biome.cpp index 66265765..9e3bc4c5 100644 --- a/Minecraft.World/Biome.cpp +++ b/Minecraft.World/Biome.cpp @@ -122,6 +122,7 @@ Biome::Biome(int id) : id(id) enemies.push_back(new MobSpawnerData(eTYPE_CREEPER, 10, 4, 4)); enemies.push_back(new MobSpawnerData(eTYPE_SLIME, 10, 4, 4)); enemies.push_back(new MobSpawnerData(eTYPE_ENDERMAN, 1, 1, 4)); + enemies.push_back(new MobSpawnerData(eTYPE_WITCH, 1, 1, 1)); // wolves are added to forests and taigas diff --git a/Minecraft.World/EatTileGoal.cpp b/Minecraft.World/EatTileGoal.cpp index c2cbd6bf..bfec2d6a 100644 --- a/Minecraft.World/EatTileGoal.cpp +++ b/Minecraft.World/EatTileGoal.cpp @@ -60,13 +60,21 @@ void EatTileGoal::tick() if (level->getTile(xx, yy, zz) == Tile::tallgrass_Id) { - level->destroyTile(xx, yy, zz, false); + if (level->getGameRules()->getBoolean(GameRules::RULE_MOBGRIEFING)) + { + level->destroyTile(xx, yy, zz, false); + } + mob->ate(); } else if (level->getTile(xx, yy - 1, zz) == Tile::grass_Id) { - level->levelEvent(LevelEvent::PARTICLES_DESTROY_BLOCK, xx, yy - 1, zz, Tile::grass_Id); - level->setTileAndData(xx, yy - 1, zz, Tile::dirt_Id, 0, Tile::UPDATE_CLIENTS); + if (level->getGameRules()->getBoolean(GameRules::RULE_MOBGRIEFING)) + { + level->levelEvent(LevelEvent::PARTICLES_DESTROY_BLOCK, xx, yy - 1, zz, Tile::grass_Id); + level->setTileAndData(xx, yy - 1, zz, Tile::dirt_Id, 0, Tile::UPDATE_CLIENTS); + } + mob->ate(); } } \ No newline at end of file diff --git a/Minecraft.World/Entity.cpp b/Minecraft.World/Entity.cpp index 924312e5..83f626e6 100644 --- a/Minecraft.World/Entity.cpp +++ b/Minecraft.World/Entity.cpp @@ -1609,8 +1609,13 @@ void Entity::rideTick() // jeb: This caused the crosshair to "drift" while riding horses. For now I've just disabled it, // because I can't figure out what it's needed for. Riding boats and minecarts seem unaffected... - // yRot += yra; - // xRot += xra; + // + // 3UR: re-enabled this for TU20 but only for rideable minecarts + if (riding->instanceof(eTYPE_MINECART_RIDEABLE)) + { + yRot += yra; + xRot += xra; + } } void Entity::positionRider() diff --git a/Minecraft.World/EntityHorse.cpp b/Minecraft.World/EntityHorse.cpp index 0bf5bc08..0c9c38ee 100644 --- a/Minecraft.World/EntityHorse.cpp +++ b/Minecraft.World/EntityHorse.cpp @@ -515,16 +515,6 @@ bool EntityHorse::canSpawn() return Animal::canSpawn(); } -bool EntityHorse::removeWhenFarAway() -{ - if (isTamed()) return false; - if (isSaddled()) return false; - if (isLeashed()) return false; - if (getArmorType() > 0) return false; - return Animal::removeWhenFarAway(); -} - - shared_ptr EntityHorse::getClosestMommy(shared_ptr baby, double searchRadius) { double closestDistance = Double::MAX_VALUE; @@ -1275,6 +1265,11 @@ bool EntityHorse::isReadyForParenting() return rider.lock() == nullptr && riding == nullptr && isTamed() && isAdult() && !isSterile() && getHealth() >= getMaxHealth(); } +bool EntityHorse::removeWhenFarAway() +{ + return Animal::removeWhenFarAway() && !isSaddled() && !isChestedHorse() && getArmorType() == ARMOR_NONE; +} + bool EntityHorse::renderName() { return hasCustomName() && rider.lock() == nullptr; diff --git a/Minecraft.World/EntityHorse.h b/Minecraft.World/EntityHorse.h index c91da172..6a71a3bc 100644 --- a/Minecraft.World/EntityHorse.h +++ b/Minecraft.World/EntityHorse.h @@ -192,7 +192,6 @@ private: public: virtual void containerChanged(); virtual bool canSpawn(); - virtual bool removeWhenFarAway() override; protected: virtual shared_ptr getClosestMommy(shared_ptr baby, double searchRadius); @@ -278,6 +277,9 @@ public: // 4J-JEV: Made public for tooltip code, doesn't change state anyway. virtual bool isReadyForParenting(); +protected: + virtual bool removeWhenFarAway(); + public: virtual bool renderName(); virtual bool rideableEntity(); diff --git a/Minecraft.World/HellBiome.cpp b/Minecraft.World/HellBiome.cpp index d023c01d..865b21d7 100644 --- a/Minecraft.World/HellBiome.cpp +++ b/Minecraft.World/HellBiome.cpp @@ -14,4 +14,5 @@ HellBiome::HellBiome(int id) : Biome(id) enemies.push_back(new MobSpawnerData(eTYPE_GHAST, 50, 4, 4)); enemies.push_back(new MobSpawnerData(eTYPE_PIGZOMBIE, 100, 4, 4)); enemies.push_back(new MobSpawnerData(eTYPE_LAVASLIME, 1, 4, 4)); + enemies.push_back(new MobSpawnerData(eTYPE_SKELETON, 1, 4, 4)); } \ No newline at end of file diff --git a/Minecraft.World/Item.cpp b/Minecraft.World/Item.cpp index ffb31070..970a29ee 100644 --- a/Minecraft.World/Item.cpp +++ b/Minecraft.World/Item.cpp @@ -473,7 +473,7 @@ void Item::staticCtor() Item::potatoBaked = (new FoodItem(137, 6, FoodConstants::FOOD_SATURATION_NORMAL, false)) ->setIconName(L"potatoBaked")->setDescriptionId(IDS_ITEM_POTATO_BAKED)->setUseDescriptionId(IDS_DESC_POTATO_BAKED); Item::potatoPoisonous = (new FoodItem(138, 2, FoodConstants::FOOD_SATURATION_LOW, false)) ->setEatEffect(MobEffect::poison->id, 5, 0, .6f)->setIconName(L"potatoPoisonous")->setDescriptionId(IDS_ITEM_POTATO_POISONOUS)->setUseDescriptionId(IDS_DESC_POTATO_POISONOUS); - Item::emptyMap = static_cast((new EmptyMapItem(139))->setIconName(L"map_empty")->setDescriptionId(IDS_ITEM_MAP_EMPTY)->setUseDescriptionId(IDS_DESC_MAP_EMPTY)); + Item::emptyMap = static_cast((new EmptyMapItem(139))->setIconName(L"map_empty")->setBaseItemTypeAndMaterial(eBaseItemType_pockettool, eMaterial_map)->setDescriptionId(IDS_ITEM_MAP_EMPTY)->setUseDescriptionId(IDS_DESC_MAP_EMPTY); Item::carrotGolden = (new FoodItem(140, 6, FoodConstants::FOOD_SATURATION_SUPERNATURAL, false)) ->setBaseItemTypeAndMaterial(eBaseItemType_giltFruit, eMaterial_carrot)->setIconName(L"carrotGolden")->setPotionBrewingFormula(PotionBrewing::MOD_GOLDENCARROT)->setDescriptionId(IDS_ITEM_CARROT_GOLDEN)->setUseDescriptionId(IDS_DESC_CARROT_GOLDEN); @@ -1126,11 +1126,11 @@ const int Item::record_04_Id ; const int Item::record_05_Id ; const int Item::record_06_Id ; const int Item::record_07_Id ; +const int Item::record_08_Id ; const int Item::record_09_Id ; const int Item::record_10_Id ; const int Item::record_11_Id ; const int Item::record_12_Id ; -const int Item::record_08_Id ; const int Item::fireball_Id ; const int Item::itemFrame_Id ; const int Item::netherbrick_Id ; diff --git a/Minecraft.World/Item.h b/Minecraft.World/Item.h index 22d0a9d1..eab64880 100644 --- a/Minecraft.World/Item.h +++ b/Minecraft.World/Item.h @@ -568,13 +568,11 @@ public: static const int record_05_Id = 2260; static const int record_06_Id = 2261; static const int record_07_Id = 2262; - static const int record_09_Id = 2263; - static const int record_10_Id = 2264; - static const int record_11_Id = 2265; - static const int record_12_Id = 2266; - - // 4J-PB - this one isn't playable in the PC game, but is fine in ours - static const int record_08_Id = 2267; + static const int record_08_Id = 2263; + static const int record_09_Id = 2264; + static const int record_10_Id = 2265; + static const int record_11_Id = 2266; + static const int record_12_Id = 2267; // TU9 static const int fireball_Id = 385; diff --git a/Minecraft.World/Level.h b/Minecraft.World/Level.h index 2be87472..b56aebf6 100644 --- a/Minecraft.World/Level.h +++ b/Minecraft.World/Level.h @@ -64,7 +64,7 @@ public: public: static const int MAX_XBOX_BOATS = 40; // Max number of boats - static const int MAX_CONSOLE_MINECARTS = 40; + static const int MAX_CONSOLE_MINECARTS = 250; static const int MAX_DISPENSABLE_FIREBALLS = 200; static const int MAX_DISPENSABLE_PROJECTILES = 300; diff --git a/Minecraft.World/LivingEntity.cpp b/Minecraft.World/LivingEntity.cpp index 3af9efe9..47f9edaa 100644 --- a/Minecraft.World/LivingEntity.cpp +++ b/Minecraft.World/LivingEntity.cpp @@ -259,9 +259,16 @@ void LivingEntity::baseTick() } // If lastHurtByMob is dead, remove it - if (lastHurtByMob != nullptr && !lastHurtByMob->isAlive()) + if (lastHurtByMob != nullptr) { - setLastHurtByMob(nullptr); + if (!lastHurtByMob->isAlive()) + { + setLastHurtByMob(nullptr); + } + else if (tickCount - lastHurtByMobTimestamp > 100) + { + setLastHurtByMob(nullptr); + } } // Update effects diff --git a/Minecraft.World/NoteBlockTile.cpp b/Minecraft.World/NoteBlockTile.cpp index cafa0c4d..12b2921a 100644 --- a/Minecraft.World/NoteBlockTile.cpp +++ b/Minecraft.World/NoteBlockTile.cpp @@ -79,7 +79,7 @@ bool NoteBlockTile::triggerEvent(Level *level, int x, int y, int z, int i, int n break; } app.DebugPrintf("NoteBlockTile::triggerEvent - playSound - pitch = %f\n",pitch); - level->playSound(x + 0.5, y + 0.5, z + 0.5, iSound, 3, pitch); + level->playSound(x + 0.5, y + 0.5, z + 0.5, iSound, 3, pitch, 64.0f); level->addParticle(eParticleType_note, x + 0.5, y + 1.2, z + 0.5, note / 24.0, 0, 0); return true; diff --git a/Minecraft.World/PanicGoal.cpp b/Minecraft.World/PanicGoal.cpp index cb9fc3f3..85dfcbc5 100644 --- a/Minecraft.World/PanicGoal.cpp +++ b/Minecraft.World/PanicGoal.cpp @@ -10,20 +10,15 @@ PanicGoal::PanicGoal(PathfinderMob *mob, double speedModifier) { this->mob = mob; this->speedModifier = speedModifier; - Goal::setRequiredControlFlags(Control::MoveControlFlag); + setRequiredControlFlags(Control::MoveControlFlag); } bool PanicGoal::canUse() { if (mob->getLastHurtByMob() == nullptr && !mob->isOnFire()) return false; - const int hurtTimeout = mob->getLastHurtByMobTimestamp(); - if (hurtTimeout == 0) return false; - static thread_local std::mt19937 rng(std::random_device{}()); - std::uniform_int_distribution dist(60, 100); - const int panicDuration = dist(rng); - if (mob->tickCount - hurtTimeout > panicDuration) return false; - const Vec3* pos = RandomPos::getPos(dynamic_pointer_cast(mob->shared_from_this()), 5, 4); + const Vec3 *pos = RandomPos::getPos(dynamic_pointer_cast(mob->shared_from_this()), 5, 4); if (pos == nullptr) return false; + posX = pos->x; posY = pos->y; posZ = pos->z; @@ -38,6 +33,5 @@ void PanicGoal::start() bool PanicGoal::canContinueToUse() { - if (mob->getLastHurtByMob() == nullptr && !mob->isOnFire()) return false; return !mob->getNavigation()->isDone(); } \ No newline at end of file diff --git a/Minecraft.World/PanicGoal.h b/Minecraft.World/PanicGoal.h index 65a4e6d8..2db64a75 100644 --- a/Minecraft.World/PanicGoal.h +++ b/Minecraft.World/PanicGoal.h @@ -1,7 +1,6 @@ #pragma once #include "Goal.h" -#include class PathfinderMob; diff --git a/Minecraft.World/Pig.cpp b/Minecraft.World/Pig.cpp index a99af826..b8c87dcb 100644 --- a/Minecraft.World/Pig.cpp +++ b/Minecraft.World/Pig.cpp @@ -47,6 +47,11 @@ bool Pig::useNewAi() return true; } +bool Pig::removeWhenFarAway() +{ + return Animal::removeWhenFarAway() && !hasSaddle(); +} + void Pig::registerAttributes() { Animal::registerAttributes(); diff --git a/Minecraft.World/Pig.h b/Minecraft.World/Pig.h index 9b7183da..0dfbf38c 100644 --- a/Minecraft.World/Pig.h +++ b/Minecraft.World/Pig.h @@ -23,6 +23,7 @@ public: virtual bool useNewAi(); protected: + virtual bool removeWhenFarAway(); virtual void registerAttributes(); virtual void newServerAiStep(); diff --git a/Minecraft.World/Recipes.cpp b/Minecraft.World/Recipes.cpp index 24faaebe..aea505eb 100644 --- a/Minecraft.World/Recipes.cpp +++ b/Minecraft.World/Recipes.cpp @@ -765,7 +765,7 @@ Recipes::Recipes() L'#', Item::ironIngot, L'X', Item::redStone, L'T'); - addShapedRecipy(new ItemInstance(Item::map, 1), // + addShapedRecipy(new ItemInstance((Item*)Item::emptyMap, 1), // L"ssscicig", L"###", // L"#X#", // diff --git a/Minecraft.World/ScatteredFeaturePieces.cpp b/Minecraft.World/ScatteredFeaturePieces.cpp index 07630ef7..fbe342f6 100644 --- a/Minecraft.World/ScatteredFeaturePieces.cpp +++ b/Minecraft.World/ScatteredFeaturePieces.cpp @@ -12,8 +12,8 @@ void ScatteredFeaturePieces::loadStatic() { StructureFeatureIO::setPieceId(eStructurePiece_DesertPyramidPiece, DesertPyramidPiece::Create, L"TeDP"); - StructureFeatureIO::setPieceId(eStructurePiece_JunglePyramidPiece, DesertPyramidPiece::Create, L"TeJP"); - StructureFeatureIO::setPieceId(eStructurePiece_SwamplandHut, DesertPyramidPiece::Create, L"TeSH"); + StructureFeatureIO::setPieceId(eStructurePiece_JunglePyramidPiece, JunglePyramidPiece::Create, L"TeJP"); + StructureFeatureIO::setPieceId(eStructurePiece_SwamplandHut, SwamplandHut::Create, L"TeSH"); } ScatteredFeaturePieces::ScatteredFeaturePiece::ScatteredFeaturePiece() diff --git a/Minecraft.World/Villager.cpp b/Minecraft.World/Villager.cpp index 4e57affe..0a4e6424 100644 --- a/Minecraft.World/Villager.cpp +++ b/Minecraft.World/Villager.cpp @@ -472,6 +472,7 @@ void Villager::addOffers(int addCount) addItemForPurchase(newOffers, Tile::glass_Id, random, getRecipeChance(.2f)); addItemForPurchase(newOffers, Item::compass_Id, random, getRecipeChance(.2f)); addItemForPurchase(newOffers, Item::clock_Id, random, getRecipeChance(.2f)); + addItemForPurchase(newOffers, Item::nameTag_Id, random, getRecipeChance(.2f)); if (random->nextFloat() < getRecipeChance(0.07f)) { diff --git a/Minecraft.World/Wolf.cpp b/Minecraft.World/Wolf.cpp index 7588a67b..5545138a 100644 --- a/Minecraft.World/Wolf.cpp +++ b/Minecraft.World/Wolf.cpp @@ -509,7 +509,7 @@ void Wolf::setCollarColor(int color) // 4J-PB added for tooltips int Wolf::GetSynchedHealth() { - return getEntityData()->getInteger(DATA_HEALTH_ID); + return getEntityData()->getFloat(DATA_HEALTH_ID); } shared_ptr Wolf::getBreedOffspring(shared_ptr target)