9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-26 18:39:20 +00:00

更新mod

This commit is contained in:
XiaoMoMi
2025-05-26 17:56:50 +08:00
parent d4086101cf
commit 4951f37e8f
3 changed files with 60 additions and 0 deletions

View File

@@ -67,6 +67,26 @@ public class CraftEngineBlock extends Block
}
}
@Override
public @NotNull VoxelShape getCollisionShape(@NotNull BlockState state, @NotNull BlockGetter level, @NotNull BlockPos pos, @NotNull CollisionContext context) {
try {
return (VoxelShape) this.shapeHolder.value().getCollisionShape(this, new Object[]{state, level, pos, context});
} catch (Exception e) {
LOGGER.error(e);
return super.getCollisionShape(state, level, pos, context);
}
}
@Override
public @NotNull VoxelShape getBlockSupportShape(@NotNull BlockState state, @NotNull BlockGetter level, @NotNull BlockPos pos) {
try {
return (VoxelShape) this.shapeHolder.value().getSupportShape(this, new Object[]{state, level, pos});
} catch (Exception e) {
LOGGER.error(e);
return super.getBlockSupportShape(state, level, pos);
}
}
@Override
public @NotNull BlockState rotate(@NotNull BlockState state, @NotNull Rotation rotation) {
try {

View File

@@ -68,6 +68,26 @@ public class CraftEngineBlock extends Block
}
}
@Override
public @NotNull VoxelShape getCollisionShape(@NotNull BlockState state, @NotNull BlockGetter level, @NotNull BlockPos pos, @NotNull CollisionContext context) {
try {
return (VoxelShape) this.shapeHolder.value().getCollisionShape(this, new Object[]{state, level, pos, context});
} catch (Exception e) {
LOGGER.error(e);
return super.getCollisionShape(state, level, pos, context);
}
}
@Override
public @NotNull VoxelShape getBlockSupportShape(@NotNull BlockState state, @NotNull BlockGetter level, @NotNull BlockPos pos) {
try {
return (VoxelShape) this.shapeHolder.value().getSupportShape(this, new Object[]{state, level, pos});
} catch (Exception e) {
LOGGER.error(e);
return super.getBlockSupportShape(state, level, pos);
}
}
@Override
protected @NotNull BlockState rotate(@NotNull BlockState state, @NotNull Rotation rotation) {
try {

View File

@@ -68,6 +68,26 @@ public class CraftEngineBlock extends Block
}
}
@Override
public @NotNull VoxelShape getCollisionShape(@NotNull BlockState state, @NotNull BlockGetter level, @NotNull BlockPos pos, @NotNull CollisionContext context) {
try {
return (VoxelShape) this.shapeHolder.value().getCollisionShape(this, new Object[]{state, level, pos, context});
} catch (Exception e) {
LOGGER.error(e);
return super.getCollisionShape(state, level, pos, context);
}
}
@Override
public @NotNull VoxelShape getBlockSupportShape(@NotNull BlockState state, @NotNull BlockGetter level, @NotNull BlockPos pos) {
try {
return (VoxelShape) this.shapeHolder.value().getSupportShape(this, new Object[]{state, level, pos});
} catch (Exception e) {
LOGGER.error(e);
return super.getBlockSupportShape(state, level, pos);
}
}
@Override
protected @NotNull BlockState rotate(@NotNull BlockState state, @NotNull Rotation rotation) {
try {