Skip to content

Disassemblers: Migrate from armor stand to item display#1273

Open
runcows wants to merge 7 commits intoGamemode4Dev:update-26.1from
runcows:disassemblers-item-displays
Open

Disassemblers: Migrate from armor stand to item display#1273
runcows wants to merge 7 commits intoGamemode4Dev:update-26.1from
runcows:disassemblers-item-displays

Conversation

@runcows
Copy link
Contributor

@runcows runcows commented Feb 23, 2026

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.

Copy link
Member

@misode misode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

# 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

@runcows runcows Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Bloo-dev Bloo-dev added the quality-update Improves efficiency or structure without affecting functionality of a module label Feb 28, 2026
@Bloo-dev Bloo-dev added the needs-testing Requires in-game testing label Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-testing Requires in-game testing quality-update Improves efficiency or structure without affecting functionality of a module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants