Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/movements.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ class Movements {
this.fences = new Set()
this.carpets = new Set()
this.openable = new Set()
registry.blocksArray.map(x => Block.fromStateId(x.minStateId, 0)).forEach(block => {
// Java blocks carry a static minStateId; Bedrock uses runtime block-state palettes and exposes defaultState instead
// (minStateId is undefined), so fall back to it - otherwise fromStateId yields empty shapes and fences/carpets/
// emptyBlocks are never classified on Bedrock.
registry.blocksArray.map(x => Block.fromStateId(x.minStateId ?? x.defaultState, 0)).forEach(block => {
if (block.shapes.length > 0) {
// Fences or any block taller than 1, they will be considered as non-physical to avoid
// trying to walk on them
Expand Down
Loading