diff --git a/Minecraft.World/LadderTile.cpp b/Minecraft.World/LadderTile.cpp index 438d2bbf..c0c87162 100644 --- a/Minecraft.World/LadderTile.cpp +++ b/Minecraft.World/LadderTile.cpp @@ -27,7 +27,7 @@ void LadderTile::updateShape(LevelSource *level, int x, int y, int z, int forceD void LadderTile::setShape(int data) { int dir = data; - float r = 2 / 16.0f; + float r = 3 / 16.0f; if (dir == 2) setShape(0, 0, 1 - r, 1, 1, 1); if (dir == 3) setShape(0, 0, 0, 1, 1, r); diff --git a/Minecraft.World/LivingEntity.cpp b/Minecraft.World/LivingEntity.cpp index 161b723d..9d3e7f7b 100644 --- a/Minecraft.World/LivingEntity.cpp +++ b/Minecraft.World/LivingEntity.cpp @@ -993,9 +993,31 @@ bool LivingEntity::onLadder() int yt = Mth::floor(bb->y0); int zt = Mth::floor(z); - // 4J-PB - TU9 - add climbable vines int iTile = level->getTile(xt, yt, zt); - return (iTile== Tile::ladder_Id) || (iTile== Tile::vine_Id); + switch (iTile) + { + case Tile::ladder_Id: + case Tile::vine_Id: // 4J-PB - TU9 - add climbable vines + return true; + case Tile::trapdoor_Id: // hexagonny - add climbable (opened) trapdoors + { + if ((level->getData(xt, yt, zt) & 0x4) != 0) + { + switch (level->getTile(xt, yt + 1, zt)) + { + case Tile::ladder_Id: + case Tile::vine_Id: + return false; + default: + return level->getTile(xt, yt - 1, zt) == Tile::ladder_Id; + } + } + break; + } + default: + break; + } + return false; } bool LivingEntity::isShootable()