9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2026-01-04 15:41:38 +00:00

feat(core): 添加监听spawnAfterBreak内部事件

This commit is contained in:
jhqwqmc
2025-07-13 12:56:43 +08:00
parent 022e401b89
commit b893e3bc6c
4 changed files with 36 additions and 1 deletions

View File

@@ -143,6 +143,11 @@ public abstract class BlockBehavior {
return superMethod.call();
}
// BlockState state, ServerLevel level, BlockPos pos, ItemStack stack, boolean dropExperience
public void spawnAfterBreak(Object thisBlock, Object[] args, Callable<Object> superMethod) throws Exception {
superMethod.call();
}
public ImmutableBlockState updateStateForPlacement(BlockPlaceContext context, ImmutableBlockState state) {
return state;
}