Skip to content

Commit b4fa68d

Browse files
committed
🐛 1.21.6 removes 22.5 rotations, not 1.21.4
1 parent 1f8e909 commit b4fa68d

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

src/formats/blueprint/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ export function projectTargetVersionIsAtLeast(version: string): boolean {
386386
export function shouldEnableRotationLock(): boolean {
387387
if (!activeProjectIsBlueprintFormat()) return false
388388

389-
if (projectTargetVersionIsAtLeast('1.21.4')) {
389+
if (projectTargetVersionIsAtLeast('1.21.6')) {
390390
return false
391391
}
392392

src/lang/en.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -708,15 +708,15 @@ animated_java.misc.failed_to_export.button: Ok
708708
animated_java.misc.failed_to_export.invalid_rotation.message: |-
709709
Some cubes in your model have an invalid rotations!
710710
711-
Cubes must have a rotation of -45, -22.5, 0, 22.5, or 45 degrees, and can only be rotated on a single axis at a time.
711+
Cubes must have a rotation of -45, -22.5, 0, 22.5, or 45 degrees, and can only be rotated on a single axis at a time when targeting Minecraft versions before 1.21.6.
712712
713713
If you want to rotate a cube more precisely, or on multiple axes, put it in a bone and rotate the bone instead.
714714
715715
All of the invalid cubes are outlined in red in the editor. Please fix them before exporting.
716-
animated_java.misc.failed_to_export.invalid_rotation.message_post_1_21_4: |-
716+
animated_java.misc.failed_to_export.invalid_rotation.message_post_1_21_6: |-
717717
Some cubes in your model have an invalid rotations!
718718
719-
Cubes can only be rotated on a single axis at a time.
719+
Cubes can only be rotated on a single axis at a time when targeting Minecraft 1.21.6 or later.
720720
721721
If you want to rotate a cube on multiple axes, put it in a bone and rotate the bone instead.
722722
@@ -735,10 +735,10 @@ animated_java.toast.invalid_rotations: |-
735735
736736
All cubes with invalid rotations are outlined in red.
737737
738-
animated_java.toast.invalid_rotations_post_1_21_4: |-
738+
animated_java.toast.invalid_rotations_post_1_21_6: |-
739739
Invalid Cube Rotations!
740740
741-
Cubes can only be rotated on a single axis at a time.
741+
Cubes can only be rotated on a single axis at a time when targeting Minecraft 1.21.6 or later.
742742
743743
All cubes with invalid rotations are outlined in red.
744744

src/mods/cube.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ function showToastNotification() {
3030
if (!toastNotification) {
3131
toastNotification = Blockbench.showToastNotification({
3232
text: translate(
33-
projectTargetVersionIsAtLeast('1.21.4')
34-
? 'toast.invalid_rotations_post_1_21_4'
33+
projectTargetVersionIsAtLeast('1.21.6')
34+
? 'toast.invalid_rotations_post_1_21_6'
3535
: 'toast.invalid_rotations'
3636
),
3737
color: 'var(--color-error)',
@@ -65,12 +65,12 @@ registerMod({
6565
updateCubeValidity(cube, true)
6666
break
6767
}
68-
case '1.21.4+': {
69-
if (projectTargetVersionIsAtLeast('1.21.4')) {
68+
case '1.21.6+': {
69+
if (projectTargetVersionIsAtLeast('1.21.6')) {
7070
updateCubeValidity(cube, true)
7171
break
7272
}
73-
// Fallthrough to invalid if the target version is below 1.21.4
73+
// Fallthrough to invalid if the target version is below 1.21.6
7474
}
7575
case 'invalid': {
7676
updateCubeValidity(cube, false)

src/systems/exporter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ export async function exportProject(options?: ExportProjectOptions): Promise<boo
211211
Blockbench.showMessageBox({
212212
title: translate('misc.failed_to_export.title'),
213213
message: translate(
214-
projectTargetVersionIsAtLeast('1.21.4')
215-
? 'misc.failed_to_export.invalid_rotation.message_post_1_21_4'
214+
projectTargetVersionIsAtLeast('1.21.6')
215+
? 'misc.failed_to_export.invalid_rotation.message_post_1_21_6'
216216
: 'misc.failed_to_export.invalid_rotation.message'
217217
),
218218
buttons: [translate('misc.failed_to_export.button')],

src/systems/util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export const unzip = (data: Uint8Array, options: AsyncUnzipOptions) => {
9292
})
9393
}
9494

95-
export function isCubeValid(cube: Cube): '1.21.4+' | 'valid' | 'invalid' {
95+
export function isCubeValid(cube: Cube): '1.21.6+' | 'valid' | 'invalid' {
9696
const totalRotation = cube.rotation[0] + cube.rotation[1] + cube.rotation[2]
9797

9898
if (totalRotation === 0) return 'valid'
@@ -102,7 +102,7 @@ export function isCubeValid(cube: Cube): '1.21.4+' | 'valid' | 'invalid' {
102102
totalRotation === cube.rotation[1] ||
103103
totalRotation === cube.rotation[2]
104104

105-
if (isSingleAxisRotation && projectTargetVersionIsAtLeast('1.21.4')) return '1.21.4+'
105+
if (isSingleAxisRotation && projectTargetVersionIsAtLeast('1.21.4')) return '1.21.6+'
106106

107107
const isRotationInAllowedSteps =
108108
totalRotation === -45 ||

0 commit comments

Comments
 (0)