fix: magma block damage still taking effect when the player has frost walker
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user