fix: magma block damage still taking effect when the player has frost walker

This commit is contained in:
Fireblade
2026-07-24 17:44:59 -04:00
parent 306d1c9fb7
commit 09c305e970
+2 -1
View File
@@ -213,7 +213,8 @@ void LivingEntity::baseTick()
if (!level->isClientSide && isAlive() && onGround && !isSneaking() && tickCount % 10 == 0)
{
int tileBelow = level->getTile(Mth::floor(x), Mth::floor(bb->y0) - 1, Mth::floor(z));
if (tileBelow == Tile::magma_block_Id)
bool hasFrostWalker = EnchantmentHelper::getEnchantmentLevel(Enchantment::frostWalker->id, getEquipmentSlots()) > 0;
if (tileBelow == Tile::magma_block_Id && !hasFrostWalker)
{
hurt(DamageSource::hotFloor, 1);
}