9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-29 20:09:13 +00:00

feat(block): 添加瓜藤相关的方块行为并且修复判断方块问题

This commit is contained in:
jhqwqmc
2025-09-23 11:28:58 +08:00
parent bde8ce5d7d
commit d787f0bdfa
15 changed files with 399 additions and 91 deletions

View File

@@ -184,6 +184,12 @@ public abstract class BlockBehavior {
superMethod.call();
}
// 1.20.1~1.21.1 BlockState state, BlockGetter level, BlockPos pos
// 1.21.2+ BlockState state
public boolean propagatesSkylightDown(Object thisBlock, Object[] args, Callable<Object> superMethod) throws Exception {
return (boolean) superMethod.call();
}
public ImmutableBlockState updateStateForPlacement(BlockPlaceContext context, ImmutableBlockState state) {
return state;
}
@@ -217,4 +223,4 @@ public abstract class BlockBehavior {
}
public abstract CustomBlock block();
}
}