Built a deck on a Sable ship with fences and trapdoors on top? Walk along it and you hop up and down about a third of a block, over and over, and your movement fights you the whole way. Mobs do it too. This mod stops that.
Why it happens
A fence post's collision box is 1.5 blocks tall. Put a closed trapdoor on it and the post sticks up 0.3125 blocks through the trapdoor, into the feet of whoever is standing there.
On normal ground that is fine. Vanilla never pushes you out of a block you already overlap, so you just stand on the trapdoor.
Sable moves its ships with a physics engine, and it handles collision differently. It works out the shortest push that gets you out of the box. When you are off centre that push is sideways, Sable treats it as walking into a wall, tries to step you up onto the post, and then gravity drops you back down. That cycle runs eight times per tick.
What the mod does
When a block sits flat on top of a fence or wall and covers the post, the post's collision box is cut at the top of its own block. That is all. Nothing else about collision changes.
A fence with nothing on it still has its full 1.5-block post. A chain hanging over a fence does not cover the post, so it is left alone too. Anything off a ship uses vanilla collision and is not touched.
Works with fences, walls, trapdoors, carpets and slabs, and with any Sable ship, not only Dungeon Train.
Install
Put the jar in mods/ next to Sable. It has to be on the client and the server, because Sable resolves the player on the client and mobs on the server. Needs Sable 2.0.5 or later.
No config, no commands. You can add it to or remove it from an existing world.
Modpacks
Go ahead and include it. Sable itself is not bundled, so list Sable as a dependency in your pack.
If it seems to do nothing
Search latest.log for SableFenceTrapdoorFix. After you first touch a ship you should see a line ending in mixin applied: SubLevelEntityCollisionShapeClipMixin. If that line never shows up the mod did not load, and the log will say why.
Source
Extracted from Dungeon Train so it can be used on its own. Code and issues: https://github.com/bh679/sable-fence-trapdoor-fix-mc
