9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-31 04:46:37 +00:00

添加红石源API

This commit is contained in:
XiaoMoMi
2025-06-22 01:21:11 +08:00
parent 06d576b009
commit e5b959957c
18 changed files with 717 additions and 256 deletions

View File

@@ -114,6 +114,30 @@ public abstract class BlockBehavior {
return superMethod.call();
}
// 1.20-1.21.4 BlockState state, Level level, BlockPos pos, Entity entity
// 1.21.5+ BlockState state, Level level, BlockPos pos, Entity entity, InsideBlockEffectApplier effectApplier
public void entityInside(Object thisBlock, Object[] args, Callable<Object> superMethod) throws Exception {
}
// 1.21.5+ BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston
public void affectNeighborsAfterRemoval(Object thisBlock, Object[] args, Callable<Object> superMethod) throws Exception {
}
// BlockState blockState, BlockGetter blockAccess, BlockPos pos, Direction side
public int getSignal(Object thisBlock, Object[] args, Callable<Object> superMethod) {
return 0;
}
// BlockState blockState, BlockGetter blockAccess, BlockPos pos, Direction side
public int getDirectSignal(Object thisBlock, Object[] args, Callable<Object> superMethod) {
return 0;
}
// BlockState blockState
public boolean isSignalSource(Object thisBlock, Object[] args, Callable<Object> superMethod) {
return false;
}
public ImmutableBlockState updateStateForPlacement(BlockPlaceContext context, ImmutableBlockState state) {
return state;
}