new block and better additivity #24

Merged
Adrien1106 merged 6 commits from dev into master 2024-07-01 23:32:01 +02:00
Showing only changes of commit d7ae1f646f - Show all commits

View File

@ -48,8 +48,9 @@ public abstract class CornerDoubleReFramedBlock extends WaterloggableReFramedDou
public BlockState rotate(BlockState state, BlockRotation rotation) { public BlockState rotate(BlockState state, BlockRotation rotation) {
Corner corner = state.get(CORNER); Corner corner = state.get(CORNER);
Direction face = corner.getDirection(state.get(CORNER_FACE)); Direction face = corner.getDirection(state.get(CORNER_FACE));
corner = corner.rotate(rotation);
return state return state
.with(CORNER, corner.rotate(rotation)) .with(CORNER, corner)
.with(CORNER_FACE, corner.getDirectionIndex(rotation.rotate(face))); .with(CORNER_FACE, corner.getDirectionIndex(rotation.rotate(face)));
} }
@ -58,8 +59,9 @@ public abstract class CornerDoubleReFramedBlock extends WaterloggableReFramedDou
public BlockState mirror(BlockState state, BlockMirror mirror) { public BlockState mirror(BlockState state, BlockMirror mirror) {
Corner corner = state.get(CORNER); Corner corner = state.get(CORNER);
Direction face = corner.getDirection(state.get(CORNER_FACE)); Direction face = corner.getDirection(state.get(CORNER_FACE));
corner = corner.mirror(mirror);
return state return state
.with(CORNER, corner.mirror(mirror)) .with(CORNER, corner)
.with(CORNER_FACE, corner.getDirectionIndex(mirror.apply(face))); .with(CORNER_FACE, corner.getDirectionIndex(mirror.apply(face)));
} }