Skip to content

Climbable trapdoors if connected to a ladder.#1329

Open
hexagonny31 wants to merge 5 commits intosmartcmd:mainfrom
hexagonny31:main
Open

Climbable trapdoors if connected to a ladder.#1329
hexagonny31 wants to merge 5 commits intosmartcmd:mainfrom
hexagonny31:main

Conversation

@hexagonny31
Copy link
Contributor

@hexagonny31 hexagonny31 commented Mar 18, 2026

Description

A feature parity, when open trapdoors act as climbable ladders if they are placed directly above a ladder and against the wall.

Changes

Previous Behavior

Trapdoors still has collision even if opened, making it difficult to climb with.

2026-03-18.09-49-37.mp4

New Behavior

  • Added a new condition in LivingEntity::onLadder() in case it's a trapdoor, then return as true (as if its a ladder).
  • If there's a ladder under the (opened) trapdoor and is attached to a block, then its collision box reshapes as a ladder.
2026-03-23.15-23-03.mp4

Files:

  • LivingEntity.cpp
  • TrapDoorTile.cpp

Methods:

  • LivingEntity::onLadder()
  • TrapDoorTile::getAABB(Level *level, int x, int y, int z)

AI Use Disclosure

No AI

### Previous Behavior
Trapdoors still has collision even if opened, making it difficult to climb with.

### New Behavior
- Added a new condition in `LivingEntity::onLadder()` in case it's a trapdoor, then return as true (as if its a ladder).
- If there's a ladder under the (opened) trapdoor, then its collision box returns as a nullptr.

**Files:**
- `LivingEntity.cpp`
- `TrapDoorTile.cpp`
**Methods:**
- `LivingEntity::onLadder()`
- `TrapDoorTile::getAABB(Level *level, int x, int y, int z)`
Made so that it avoids alternating use of ladders (or vines) and trapdoors.
Just incase if neighborChanged is modified.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant