Skip to content

Commit 3f99c28

Browse files
committed
✨ Replace animated_java:empty with vanilla empty model in MC 1.21.4+
1 parent b4fa68d commit 3f99c28

File tree

13 files changed

+5208
-19
lines changed

13 files changed

+5208
-19
lines changed

src/systems/minecraft/itemDefinitions.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ type TintSource =
3535
}
3636

3737
type ItemModel =
38+
| {
39+
type: 'minecraft:empty'
40+
}
3841
| {
3942
type: 'minecraft:model'
4043
model: string
@@ -49,7 +52,6 @@ type ItemModel =
4952
// 'minecraft:select': SelectModel
5053
// 'minecraft:range_dispatch': {}
5154
// 'minecraft:bundle/selected_item': {}
52-
// 'minecraft:empty': {}
5355
// 'minecraft:special': {}
5456

5557
type ConditionModel = {

src/systems/resourcepackCompiler/1.21.4.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ const compileResourcePack: ResourcePackCompiler = async ({
2222
modelExportFolder,
2323
})
2424

25-
const globalModelsFolder = PathModule.join('assets/animated_java/models/')
2625
const itemModelDefinitionsFolder = PathModule.join(
2726
'assets/animated_java/items/blueprint/',
2827
aj.export_namespace
@@ -59,17 +58,6 @@ const compileResourcePack: ResourcePackCompiler = async ({
5958
content: autoStringify(blockAtlas),
6059
})
6160

62-
// Empty
63-
versionedFiles.set(PathModule.join(globalModelsFolder, 'empty.json'), { content: '{}' })
64-
versionedFiles.set(PathModule.join('assets/animated_java/items', 'empty.json'), {
65-
content: autoStringify({
66-
model: {
67-
type: 'minecraft:model',
68-
model: 'animated_java:empty',
69-
},
70-
}),
71-
})
72-
7361
// Textures
7462
for (const texture of Object.values(rig.textures)) {
7563
let image: Buffer | undefined
@@ -171,10 +159,7 @@ function createMultiVariantItemDefinition(
171159
cases: [
172160
{
173161
when: 'AJ_INTERNAL_EMPTY',
174-
model: {
175-
type: 'minecraft:model',
176-
model: 'animated_java:empty',
177-
},
162+
model: { type: 'minecraft:empty' },
178163
},
179164
],
180165
fallback: {
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"pack": {
33
"pack_format": 71,
4-
"description": "AJ Testing DP"
4+
"description": "AJ Testing DP",
5+
"supported_formats": {
6+
"min_inclusive": 71,
7+
"max_inclusive": 79
8+
}
59
}
610
}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"pack": {
33
"pack_format": 55,
4-
"description": "AJ Testing RP"
4+
"description": "AJ Testing RP",
5+
"supported_formats": {
6+
"min_inclusive": 55,
7+
"max_inclusive": 62
8+
}
59
}
610
}

0 commit comments

Comments
 (0)