#Help Avoiding the block permutation limit

1 messages · Page 1 of 1 (latest)

normal crescent
#

So, Im making a block that is a 4x4x4 cube that can be placed in 9 positions, and when interacted with, extends a side of it by adding on a 6x4x4 portion of the block onto the face you tapped. The issue is that to implement this functionality, the state limit is getting pushed up on, heavily. But; 1, idk why and 2; how I should fix it

"states": {
"cmd:relative_cube_position": [
"top_left",
"top_middle",
"top_right",
"middle_left",
"middle",
"middle_right",
"bottom_left",
"bottom_middle",
"bottom_right",
"dead_center"
],
"cmd:up_bit": [
0,
1,
2
],
"cmd:down_bit": [
0,
1,
2
],
"cmd:west_bit": [
0,
1,
2
],
"cmd:east_bit": [
0,
1,
2
],
"cmd:north_bit": [
0,
1,
2
],
"cmd:south_bit": [
0,
1,
2
]
}
There is also a "minecraft:block_face" component at play, just so that is known.

Multiplying all of these up, you'd get 10 * 3^6 = 7,290, which is nowhere near 2^16, factoring in the "minecraft:block_face" another x6 you'd get 43,740. Aka still not 2^16.

Now telling what all these states actually do, "cmd:relative cube position" and "minecraft:cube_position" are the ones that affect where the original 4x4 cube is placed, and there are 27 different cubes, I can send the models if need be. The "cmd:east_bit" and all the others affect how the bones connected to the cubes are shown, if its 0, its inactive, if its 1 one of the auxiliary bones are shown, if its 2 both of the auxiliary bones for that face, for that cube are shown. each of the 27 cubes have their own 6 auxiliary bones spread across each available face.

continued in comments

wraith cedar
#

You'll have to reuse states. It won't look the best in the code, but it will work great

normal crescent
#

So one of the potential solutions i've had for this problem is make all of the directional bit states boolean. This would take the states used from 10 * 3^6 = 7,290 * 6 = 43740, to a paltry 10 * 2^6 = 640 * 6 = 3,840, The only issue ive had with this is one specific configuration (upside down L shape mimicking a sink) would be impossible. I could make that its own block but that seems like unessesary clutter i dont want to do if i dont have to

normal crescent
#

because then id have to link a specific set of active bones to a value if im reading this right

#

which sounds like hell

wraith cedar
#

Is hell, yes

#

But reciclying is the only way to "have more states"

#

Block states limit is not counted per block, too

#

All blocks your add-on adds sums to the block states limit

#

So in order to avoid reaching the limit, you have to use less states, and to do what you want with less states you have to recycle

normal crescent
#

Is it too much states, not the amount of permutations possible from them?

wraith cedar
#

Probably because of the block + other blocks you have added

#

that single block is using around 65% of the state limit

normal crescent
#

that block is the only block ive added in that world

wraith cedar
#

can i see your states and traits?

normal crescent
#

they are in the post

#

thats all of them

wraith cedar
#

i just see the states

normal crescent
#

i do say im using "minecraft:block_face" as well directly below those

wraith cedar
#

Maybe vanilla blocks count towards the limiy

worldly ingot
#

yes, there's over 50000 vanilla permutations

normal crescent
#

I literally rewrite everything for this shit come on

normal crescent
#

.

frigid oar
normal crescent
frigid oar
#

With multiple bones per part if that makes sense

#

It's not up-to-date with this one I'm on my phone rn

normal crescent
#

Let me show you the block json

normal crescent
wraith cedar
normal crescent
#

Im literally looking at the bone in the geometry file

frigid oar
#

Hmm id have to check it out after work

#

Holy hell that's alot

normal crescent
#

No other permutations involved

#

[UI][error]-UI Control: debug_screen | UI Control: variables_button_mappings_and_controls | UI Control: safezone_screen_matrix | UI Control: inner_matrix | UI Control: safezone_screen_panel | UI Control: root_screen_panel | ----------------------------------------------------
Unknown properties found in def[special_render] from namespace[debug_screen]

  • Unknown property [renderer]

[Json][warning]- -> components -> minecraft:material_instances -> * -> texture: Missing referenced asset white_concrete

[Scripting][warning]-Component 'cmd:cubit' was not registered in script but used on a block

[Scripting][warning]-Component 'cmd:cubit_placement' was not registered in script but used on a block

[UI][error]-UI Control: debug_screen | UI Control: variables_button_mappings_and_controls | UI Control: safezone_screen_matrix | UI Control: inner_matrix | UI Control: safezone_screen_panel | UI Control: root_screen_panel | ----------------------------------------------------
Unknown properties found in def[special_render] from namespace[debug_screen]

  • Unknown property [renderer]

[Blocks][error]-Block name = 'cmd:white_concrete_cubit' | Geometry Component bone_visibilities bone BottomNorthwest is invalid, in block cmd:white_concrete_cubit

#

Isolating one bone

#

And it's still borked

#

It's because they are all capital letters isn't it

#

Nopr

#

Actually maybe let me get rid of all of them

#

Yep it's thw capital letters

#

God dammit i did all this shit for practically nothing

#

Tbf I do still have the older versions of this addon on my phone

frigid oar
#

Yeah i found that out the hard way too

normal crescent