Skip to content

Commit ce20aca

Browse files
committed
🛠️ Fix Left-Over excludedBones References.
1 parent 14ccb5a commit ce20aca

File tree

7 files changed

+17
-16
lines changed

7 files changed

+17
-16
lines changed

src/components/animationProperties.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
export let animationName: Valuable<string>
1515
export let loopMode: Valuable<string>
1616
export let loopDelay: Valuable<number>
17-
export let excludedBones: Valuable<Array<{ name: string; value: string }>>
17+
export let excludedNodes: Valuable<Array<{ name: string; value: string }>>
1818
19-
const availableBones = getAvailableNodes(excludedBones.get())
19+
const availableBones = getAvailableNodes(excludedNodes.get())
2020
2121
function animationNameValueChecker(value: string): { type: string; message: string } {
2222
if (value.trim().length === 0) {
@@ -78,7 +78,7 @@
7878
'dialog.animation_properties.swap_columns_button.tooltip',
7979
)}
8080
availableItems={availableBones}
81-
bind:includedItems={excludedBones}
81+
bind:includedItems={excludedNodes}
8282
/>
8383
</div>
8484

src/components/variantConfigDialog.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
export let uuid: Valuable<string>
1818
export let textureMap: TextureMap
1919
export let generateNameFromDisplayName: Valuable<boolean>
20-
export let excludedBones: Valuable<Array<CollectionItem>>
20+
export let excludedNodes: Valuable<Array<CollectionItem>>
2121
2222
const availableTextures = [...Texture.all, TRANSPARENT_TEXTURE]
2323
const primaryTextures = [...Texture.all]
2424
const secondaryTextures = availableTextures
2525
26-
const availableBones = getAvailableNodes(excludedBones.get(), {
26+
const availableBones = getAvailableNodes(excludedNodes.get(), {
2727
groupsOnly: true,
2828
excludeEmptyGroups: true,
2929
})
@@ -223,7 +223,7 @@
223223
'dialog.variant_config.swap_columns_button.tooltip',
224224
)}
225225
availableItems={availableBones}
226-
bind:includedItems={excludedBones}
226+
bind:includedItems={excludedNodes}
227227
/>
228228
{/if}
229229
</div>

src/interface/animationPropertiesDialog.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function openAnimationPropertiesDialog(animation: _Animation) {
88
const animationName = new Valuable(animation.name)
99
const loopMode = new Valuable(animation.loop)
1010
const loopDelay = new Valuable(Number(animation.loop_delay) || 0)
11-
const excludedBones = new Valuable(animation.excluded_nodes)
11+
const excludedNodes = new Valuable(animation.excluded_nodes)
1212

1313
new SvelteDialog({
1414
id: `${PACKAGE.name}:animationPropertiesDialog`,
@@ -19,15 +19,15 @@ export function openAnimationPropertiesDialog(animation: _Animation) {
1919
animationName,
2020
loopMode,
2121
loopDelay,
22-
excludedBones,
22+
excludedNodes,
2323
},
2424
preventKeybinds: true,
2525
onConfirm() {
2626
animation.name = animationName.get()
2727
animation.createUniqueName(Blockbench.Animation.all)
2828
animation.loop = loopMode.get()
2929
animation.loop_delay = loopDelay.get().toString()
30-
animation.excluded_nodes = excludedBones.get()
30+
animation.excluded_nodes = excludedNodes.get()
3131
},
3232
}).show()
3333
}

src/interface/textDisplayElementPanel.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ TEXT_DISPLAY_BACKGROUND_COLOR_PICKER.set = function (this: ColorPicker, color: s
6868
}
6969
TEXT_DISPLAY_BACKGROUND_COLOR_PICKER.change = function (
7070
this: ColorPicker,
71+
// @ts-ignore
7172
color: tinycolor.Instance
7273
) {
7374
const selected = TextDisplay.selected[0]

src/interface/variantConfigDialog.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function openVariantConfigDialog(variant: Variant) {
1212
const uuid = new Valuable(variant.uuid)
1313
const textureMap = variant.textureMap.copy()
1414
const generateNameFromDisplayName = new Valuable(variant.generateNameFromDisplayName)
15-
const excludedBones = new Valuable(variant.excludedNodes)
15+
const excludedNodes = new Valuable(variant.excludedNodes)
1616

1717
new SvelteDialog({
1818
id: `${PACKAGE.name}:variantConfig`,
@@ -26,7 +26,7 @@ export function openVariantConfigDialog(variant: Variant) {
2626
uuid,
2727
textureMap,
2828
generateNameFromDisplayName,
29-
excludedBones,
29+
excludedNodes,
3030
},
3131
preventKeybinds: true,
3232
onConfirm() {
@@ -35,7 +35,7 @@ export function openVariantConfigDialog(variant: Variant) {
3535
variant.uuid = uuid.get()
3636
variant.textureMap = textureMap
3737
variant.generateNameFromDisplayName = generateNameFromDisplayName.get()
38-
variant.excludedNodes = excludedBones.get()
38+
variant.excludedNodes = excludedNodes.get()
3939
events.UPDATE_VARIANT.dispatch(variant)
4040
variant.select()
4141
},

src/mods/animationPropertiesMod.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ createBlockbenchMod(
5555
createBlockbenchMod(
5656
`${PACKAGE.name}:animationPropertiesMod`,
5757
{
58-
excludedBonesProperty: undefined as ContextProperty<'array'>,
58+
excludedNodesProperty: undefined as ContextProperty<'array'>,
5959
},
6060
context => {
61-
context.excludedBonesProperty = new Property(
61+
context.excludedNodesProperty = new Property(
6262
Blockbench.Animation,
6363
'array',
6464
'excluded_nodes',
@@ -71,6 +71,6 @@ createBlockbenchMod(
7171
return context
7272
},
7373
context => {
74-
context.excludedBonesProperty?.delete()
74+
context.excludedNodesProperty?.delete()
7575
}
7676
)

src/systems/animated_java.mcb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ dir <%export_namespace%> {
659659
function *global/errors/function_not_executed_as_root_entity \
660660
{'function_path': 'animated_java:<%export_namespace%>/variants/<%variant.name%>/apply'}
661661
REPEAT (Object.values(rig.nodeMap)) as node {
662-
IF (node.type === 'bone' && !Object.values(variant.excludedBones).find(v => v.value === node.node.uuid) && (rig.variantModels[variant.name][node.node.uuid] !== undefined || node.configs.variants[variant.uuid])) {
662+
IF (node.type === 'bone' && !Object.values(variant.excludedNodes).find(v => v.value === node.node.uuid) && (rig.variantModels[variant.name][node.node.uuid] !== undefined || node.configs.variants[variant.uuid])) {
663663
execute on passengers if entity @s[tag=aj.<%export_namespace%>.bone.<%node.name%>] run {
664664
IF (rig.variantModels[variant.name][node.node.uuid] !== undefined) {
665665
data modify entity @s item.components.minecraft:custom_model_data set value <%rig.variantModels[variant.name][node.node.uuid].customModelData%>

0 commit comments

Comments
 (0)