Skip to content

Commit

Permalink
some minor model optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
IchHabeHunger54 committed Dec 27, 2023
1 parent a13b890 commit 7f2ca46
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,10 @@
@SuppressWarnings("deprecation")
public class SwordPedestalBlock extends BCInteractibleBlock {
private static final VoxelShape Z_SHAPE = ShapeUtil.combine(
Shapes.box(0.9375, 0, 0.25, 1, 0.0625, 0.75),
Shapes.box(0.875, 0, 0.25, 0.9375, 0.0625, 0.75),
Shapes.box(0.8125, 0, 0.25, 0.875, 0.125, 0.75),
Shapes.box(0.875, 0.0625, 0.25, 0.9375, 0.125, 0.75),
Shapes.box(0.8125, 0.125, 0.25, 0.875, 0.1875, 0.75),
Shapes.box(0.125, 0, 0.25, 0.1875, 0.125, 0.75),
Shapes.box(0.0625, 0, 0.25, 0.125, 0.0625, 0.75),
Shapes.box(0, 0, 0.25, 0.0625, 0.0625, 0.75),
Shapes.box(0.0625, 0.0625, 0.25, 0.125, 0.125, 0.75),
Shapes.box(0.125, 0.125, 0.25, 0.1875, 0.1875, 0.75),
Shapes.box(0.75, 0, 0.25, 0.8125, 0.1875, 0.75),
Shapes.box(0.75, 0.1875, 0.25, 0.8125, 0.25, 0.75),
Shapes.box(0.1875, 0.1875, 0.25, 0.25, 0.25, 0.75),
Shapes.box(0.1875, 0, 0.25, 0.25, 0.1875, 0.75),
Shapes.box(0.25, 0, 0.25, 0.75, 0.25, 0.75),
Shapes.box(0.25, 0, 0.25, 0.75, 0.25, 0.75));
Shapes.box(0, 0, 0.25, 1, 0.0625, 0.75),
Shapes.box(0.0625, 0.0625, 0.25, 0.9375, 0.125, 0.75),
Shapes.box(0.125, 0.125, 0.25, 0.875, 0.1875, 0.75),
Shapes.box(0.1875, 0.1875, 0.25, 0.8125, 0.25, 0.75));
private static final VoxelShape X_SHAPE = ShapeUtil.rotate(Z_SHAPE, Rotation.CLOCKWISE_90);

public SwordPedestalBlock(Properties properties) {
Expand Down Expand Up @@ -75,11 +63,6 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
return new SwordPedestalBlockEntity(pos, state);
}

@Override
protected MapCodec<SwordPedestalBlock> codec() {
return simpleCodec(SwordPedestalBlock::new);
}

@Override
public ItemStack getCloneItemStack(BlockState state, HitResult target, LevelReader level, BlockPos pos, Player player) {
ItemStack stack = super.getCloneItemStack(state, target, level, pos, player);
Expand All @@ -88,4 +71,9 @@ public ItemStack getCloneItemStack(BlockState state, HitResult target, LevelRead
}
return stack;
}

@Override
protected MapCodec<SwordPedestalBlock> codec() {
return simpleCodec(SwordPedestalBlock::new);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,28 @@
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [75, -45, 0],
"translation": [0, 1, 2],
"scale": [0.375, 0.375, 0.375]
},
"thirdperson_lefthand": {
"rotation": [75, -45, 0],
"translation": [0, 1, 2],
"scale": [0.375, 0.375, 0.375]
},
"firstperson_righthand": {
"rotation": [0, -45, 0],
"translation": [0, 2.5, 0],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_lefthand": {
"rotation": [0, -45, 0],
"translation": [0, 2.5, 0],
"scale": [0.4, 0.4, 0.4]
}
},
"groups": [
0,
1,
Expand Down
Loading

0 comments on commit 7f2ca46

Please sign in to comment.