-
-
Notifications
You must be signed in to change notification settings - Fork 68
Disassemblers: Migrate from armor stand to item display #1273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
56b0ceb
caafe12
60f540b
f288cb9
91de033
b6caab2
2fb665b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # places the disassembler down based on rotation | ||
| # @s = player who placed the disassembler | ||
| # located at the center of the placed block | ||
| # with {facing, rotation, model} | ||
| # run from gm4_disassemblers:machine/create | ||
|
|
||
| # place dropper | ||
| $setblock ~ ~ ~ dropper[facing=$(facing)] | ||
| data merge block ~ ~ ~ {CustomName:{"translate":"gm4.second","fallback":"%1$s","with":[{"translate":"container.gm4.disassembler","fallback":"Disassembler"},[{"text":" ","font":"gm4:half_invert"},{"translate":"container.gm4.disassembler","fallback":"Disassembler","font":"gm4:half_invert"},{"translate":"container.gm4.disassembler","fallback":"Disassembler","font":"gm4:offscreen"},{"translate":"gui.gm4.disassembler","fallback":"","font":"gm4:container_gui","color":"white"},{"text":" ","font":"gm4:half_invert"},{"translate":"container.gm4.disassembler","fallback":"Disassembler","font":"gm4:half_invert"},{"translate":"container.gm4.disassembler","fallback":"Disassembler","font":"gm4:default","color":"#404040"}]]}} | ||
|
|
||
| # summon display and marker entity | ||
| $summon item_display ~ ~ ~ {\ | ||
| CustomName:"gm4_disassembler_display",\ | ||
| Tags:["gm4_no_edit","gm4_disassembler_display","gm4_machine_display","smithed.entity","smithed.strict","gm4_new_machine"],\ | ||
| item:{id:"minecraft:tnt",count:1,components:{"minecraft:custom_model_data":{"strings":["$(model)"]}}},\ | ||
| item_display:head,\ | ||
| brightness:{sky:15,block:15},\ | ||
| Rotation:$(rotation),\ | ||
| transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0.501f,0f],scale:[0.438,0.438,0.438]}\ | ||
| } | ||
|
|
||
| $summon marker ~ ~ ~ {Tags:["gm4_disassembler","gm4_machine_marker","smithed.block","smithed.entity","smithed.strict","gm4_new_machine"],CustomName:"gm4_disassembler",Rotation:$(rotation)} |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # @s = player | ||
| # at @s | ||
| # 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 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # @s = gm4_disassembler_stand armor stand | ||
| # at center of disassembler | ||
| # run from upgrade_paths/2.6 | ||
|
|
||
| summon item_display ~ ~ ~ {\ | ||
| CustomName:"gm4_disassembler_display",\ | ||
| Tags:["gm4_no_edit","gm4_disassembler_display","gm4_machine_display","smithed.entity","smithed.strict"],\ | ||
| item:{id:"minecraft:tnt",count:1,components:{"minecraft:custom_model_data":{"strings":["gm4_disassemblers:block/disassembler_down"]}}},\ | ||
| item_display:head,\ | ||
| brightness:{sky:15,block:15},\ | ||
| Rotation:[0.0f,0.0f],\ | ||
| transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0.501f,0f],scale:[0.438,0.438,0.438]}\ | ||
| } | ||
| # transfer data, increment entity version number | ||
| data modify entity @e[type=item_display,tag=gm4_disassembler_display,limit=1,distance=..0.01] item.components."minecraft:custom_model_data" set from entity @s equipment.head.components."minecraft:custom_model_data" | ||
| data modify entity @e[type=item_display,tag=gm4_disassembler_display,limit=1,distance=..0.01] Rotation set from entity @s Rotation | ||
| scoreboard players set @e[type=item_display,tag=gm4_disassembler_display,limit=1,distance=..0.01] gm4_entity_version 2 | ||
| scoreboard players set @e[type=marker,tag=gm4_disassembler,limit=1,distance=..0.01] gm4_entity_version 2 | ||
|
|
||
| kill @s |
Uh oh!
There was an error while loading. Please reload this page.