Disassemblers: Migrate from armor stand to item display#1273
Disassemblers: Migrate from armor stand to item display#1273runcows wants to merge 7 commits intoGamemode4Dev:update-26.1from
Conversation
misode
left a comment
There was a problem hiding this comment.
Mostly some stylistic comments.
I actually quite like the macro approach here. The macro will always be cached and it's not super complicated with bolt or jinja.
gm4_disassemblers/data/gm4_disassemblers/function/machine/place_rotated.mcfunction
Outdated
Show resolved
Hide resolved
| # run via upgrade paths util | ||
|
|
||
| execute as @e[type=armor_stand,tag=gm4_disassembler_stand] at @s positioned ~ ~0.4 ~ \ | ||
| run function gm4_disassemblers:upgrade_paths/2.6/item_display |
There was a problem hiding this comment.
I don't think we should start adding random line continuations like these. Mcfunctions always have had very long lines so your editor should already be wrapping lines imo.
There was a problem hiding this comment.
I have bad news for you. I've done this in many places that are already merged 😅
It's also not entirely random, I mainly use it to separate out the execute sub commands from the command that gets run at the end
|
|
||
| data modify storage gm4_disassemblers:temp Items set from block ~ ~ ~ Items | ||
| execute if data storage gm4_disassemblers:temp Items[0] unless data storage gm4_disassemblers:temp Items[1] positioned ~ ~-0.4 ~ as @e[type=armor_stand,tag=gm4_disassembler_stand,limit=1,distance=..0.01] positioned ~ ~0.4 ~ run function gm4_disassemblers:check_item | ||
| execute if data storage gm4_disassemblers:temp Items[0] unless data storage gm4_disassemblers:temp Items[1] as 344d47-4-4-4-f04ce104d run function gm4_disassemblers:check_item |
There was a problem hiding this comment.
I think it's unfortunate that we need to rely on the forceloaded chunk here (which I generally like to avoid, mostly because I hope in the future we'll be able to eliminate it) - but for this module it's not too bad because lib_machines already needs it.
Because we have the massive loot table to compute the disassebly items I'm not sure what alternatives we have though.
Replaces armor stands with item displays.
Resolves a visual bug with the resource pack, where the disassembler texture doesn't fit the block correctly.
Item display is located at the center of the disassembler. Entity version has been incremented.
The caller loot table now runs on the forceloaded armor stand.
Similar to #1272, this also included is a change to the placement function, moving from 6 functions, one for each cardinal direction, to one which uses macros to control the rotation changes.
There is an included upgrade path, I've tested it in game and it works as expected.
Due to the upgrade path, the minor version has been bumped. This is of note for #1256 where we want to bump all minor versions anyway.