Skip to content

Commit 339345e

Browse files
committed
🛠️ Fix #343
1 parent 9912d7c commit 339345e

File tree

3 files changed

+55
-7
lines changed

3 files changed

+55
-7
lines changed

src/lang/en.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,12 +584,18 @@ animated_java.misc.failed_to_export.custom_models.message: You have disabled res
584584
animated_java.misc.failed_to_export.blueprint_settings.message: There are errors in your blueprint settings! Please fix them before exporting.
585585
animated_java.misc.failed_to_export.blueprint_settings.error_item: 'Found an issue with {0}:'
586586
animated_java.misc.failed_to_export.button: Ok
587-
misc.failed_to_export.invalid_rotation.message: |-
587+
animated_java.misc.failed_to_export.invalid_rotation.message: |-
588588
Some cubes in your model have an invalid rotations.
589589
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.
590590
If you want to rotate a cube more precisely, or on multiple axes, you must put it into a bone and rotate the bone instead.
591591
All of the invalid cubes are outlined in red in the editor.
592592
Please fix these issues before exporting.
593+
animated_java.misc.failed_to_export.rig_has_textures_but_no_custom_models.message: |-
594+
You have textures applied to your model, but have no custom models (Cubes) to use them!
595+
Please create some Cubes to use these textures, or remove the textures before exporting.
596+
animated_java.misc.failed_to_export.rig_has_custom_models_but_no_textures.message: |-
597+
You have custom models (Cubes) in your model, but have no textures applied to them!
598+
Please apply textures to your Cubes, or remove the Cubes before exporting.
593599
594600
# Format Category
595601
animated_java.format_category.animated_java: Animated Java

src/systems/exporter.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,16 @@ async function actuallyExportProject(forceSave = true) {
105105
PROGRESS_DESCRIPTION.set('Rendering Rig...')
106106
const rig = renderRig(modelExportFolder, textureExportFolder)
107107

108+
if (!rig.includes_custom_models && Texture.all.length !== 0) {
109+
throw new IntentionalExportError(
110+
translate('misc.failed_to_export.rig_has_textures_but_no_custom_models.message')
111+
)
112+
} else if (rig.includes_custom_models && Texture.all.length === 0) {
113+
throw new IntentionalExportError(
114+
translate('misc.failed_to_export.rig_has_custom_models_but_no_textures.message')
115+
)
116+
}
117+
108118
if (
109119
Project!.animated_java.resource_pack_export_mode === 'none' &&
110120
rig.includes_custom_models

test_blueprints/block_display.ajblueprint

Lines changed: 38 additions & 6 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)