Skip to content

Commit 704c374

Browse files
authored
🔀 Merge 🩹 Field tints is in the wrong location (#387)
2 parents e03048a + 452eb56 commit 704c374

File tree

3 files changed

+11
-23
lines changed

3 files changed

+11
-23
lines changed

src/systems/minecraft/itemDefinitions.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,18 @@ type TintSource =
3434
default: [number, number, number]
3535
}
3636

37-
type ItemModel = {
38-
tints?: TintSource[]
39-
} & (
37+
type ItemModel =
4038
| {
4139
type: 'minecraft:model'
4240
model: string
41+
tints?: TintSource[]
4342
}
4443
| {
4544
type: 'minecraft:composite'
4645
models: ItemModel[]
4746
}
4847
| ConditionModel
4948
| SelectModel
50-
)
5149
// 'minecraft:select': SelectModel
5250
// 'minecraft:range_dispatch': {}
5351
// 'minecraft:bundle/selected_item': {}

src/systems/resourcepackCompiler/1.21.4.ts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { MAX_PROGRESS, PROGRESS, PROGRESS_DESCRIPTION } from '../../interface/dialog/exportProgress'
22
import { isResourcePackPath, toSafeFuntionName } from '../../util/minecraftUtil'
33
import { Variant } from '../../variants'
4-
import { IntentionalExportError } from '../exporter'
54
import { IItemDefinition } from '../minecraft/itemDefinitions'
65
import { type ITextureAtlas } from '../minecraft/textureAtlas'
76
import { IRenderedNodes, IRenderedRig, IRenderedVariantModel } from '../rigRenderer'
@@ -219,12 +218,7 @@ function createSingleVariantItemDefinition(model: IRenderedVariantModel): IItemD
219218
model: {
220219
type: 'minecraft:model',
221220
model: model.resource_location,
222-
tints: [
223-
{
224-
type: 'minecraft:dye',
225-
default: [1, 1, 1],
226-
},
227-
],
221+
tints: [new oneLiner({ type: 'minecraft:dye', default: [1, 1, 1] })],
228222
},
229223
}
230224
}
@@ -244,13 +238,8 @@ function createMultiVariantItemDefinition(
244238
fallback: {
245239
type: 'minecraft:model',
246240
model: model.resource_location,
241+
tints: [new oneLiner({ type: 'minecraft:dye', default: [1, 1, 1] })],
247242
},
248-
tints: [
249-
{
250-
type: 'minecraft:dye',
251-
default: [1, 1, 1],
252-
},
253-
],
254243
},
255244
}
256245

@@ -262,6 +251,7 @@ function createMultiVariantItemDefinition(
262251
model: {
263252
type: 'minecraft:model',
264253
model: variantModel.resource_location,
254+
tints: [new oneLiner({ type: 'minecraft:dye', default: [1, 1, 1] })],
265255
},
266256
} as (typeof itemDefinition.model.cases)[0])
267257
}

test_blueprints/armor_stand.ajblueprint

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
"display_item": "minecraft:white_dye",
1919
"custom_model_data_offset": 0,
2020
"enable_advanced_resource_pack_settings": false,
21-
"resource_pack": "C:\\Users\\SnaveSutit\\AppData\\Roaming\\.modrinth\\profiles\\Animated Java Dev\\resourcepacks\\resourcepack",
21+
"resource_pack": "C:\\Users\\SnaveSutit\\AppData\\Roaming\\ModrinthApp\\profiles\\Animated Java Dev\\resourcepacks\\resourcepack",
2222
"enable_advanced_data_pack_settings": false,
23-
"data_pack": "C:\\Users\\SnaveSutit\\AppData\\Roaming\\.modrinth\\profiles\\Animated Java Dev\\saves\\Animated Java Dev\\datapacks\\datapack",
23+
"data_pack": "C:\\Users\\SnaveSutit\\AppData\\Roaming\\ModrinthApp\\profiles\\Animated Java Dev\\saves\\Animated Java Dev\\datapacks\\datapack",
2424
"summon_commands": "",
2525
"ticking_commands": "",
2626
"interpolation_duration": 1,
@@ -882,7 +882,7 @@
882882
"config": {},
883883
"item": "minecraft:diamond",
884884
"item_display": "none",
885-
"text": "{\n\t\"text\": \"Hello, World!\",\n\t\"color\": \"green\",\n\t\"shadow_color\":\"red\"\n}\n",
885+
"text": "{\n\t\"text\": \"Hello, World!\",\n\t\"color\": \"green\"\n}\n",
886886
"lineWidth": 200,
887887
"backgroundColor": "#ffffff",
888888
"backgroundAlpha": 0.25098,
@@ -1515,10 +1515,10 @@
15151515
},
15161516
{
15171517
"path": "",
1518-
"name": "transparent",
1518+
"name": "transparent.png",
15191519
"folder": "",
15201520
"namespace": "",
1521-
"id": "0",
1521+
"id": "3",
15221522
"group": "",
15231523
"width": 16,
15241524
"height": 16,
@@ -3154,7 +3154,7 @@
31543154
"override": false,
31553155
"length": 0.8,
31563156
"snapping": 20,
3157-
"selected": false,
3157+
"selected": true,
31583158
"saved": false,
31593159
"path": "",
31603160
"anim_time_update": "",

0 commit comments

Comments
 (0)