Skip to content

Commit 1de5e75

Browse files
Fixes and minor additions to the placeholder system (#3790)
1 parent 029fa24 commit 1de5e75

29 files changed

+762
-57
lines changed
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
{
2+
"variants": {
3+
"facing=down,upwards_facing=east": {
4+
"gtceu:z": 90,
5+
"model": "gtceu:block/machine/advanced_monitor",
6+
"x": 90
7+
},
8+
"facing=down,upwards_facing=north": {
9+
"model": "gtceu:block/machine/advanced_monitor",
10+
"x": 90
11+
},
12+
"facing=down,upwards_facing=south": {
13+
"gtceu:z": 180,
14+
"model": "gtceu:block/machine/advanced_monitor",
15+
"x": 90
16+
},
17+
"facing=down,upwards_facing=west": {
18+
"gtceu:z": 270,
19+
"model": "gtceu:block/machine/advanced_monitor",
20+
"x": 90
21+
},
22+
"facing=east,upwards_facing=east": {
23+
"gtceu:z": 270,
24+
"model": "gtceu:block/machine/advanced_monitor",
25+
"y": 90
26+
},
27+
"facing=east,upwards_facing=north": {
28+
"model": "gtceu:block/machine/advanced_monitor",
29+
"y": 90
30+
},
31+
"facing=east,upwards_facing=south": {
32+
"gtceu:z": 180,
33+
"model": "gtceu:block/machine/advanced_monitor",
34+
"y": 90
35+
},
36+
"facing=east,upwards_facing=west": {
37+
"gtceu:z": 90,
38+
"model": "gtceu:block/machine/advanced_monitor",
39+
"y": 90
40+
},
41+
"facing=north,upwards_facing=east": {
42+
"gtceu:z": 270,
43+
"model": "gtceu:block/machine/advanced_monitor"
44+
},
45+
"facing=north,upwards_facing=north": {
46+
"model": "gtceu:block/machine/advanced_monitor"
47+
},
48+
"facing=north,upwards_facing=south": {
49+
"gtceu:z": 180,
50+
"model": "gtceu:block/machine/advanced_monitor"
51+
},
52+
"facing=north,upwards_facing=west": {
53+
"gtceu:z": 90,
54+
"model": "gtceu:block/machine/advanced_monitor"
55+
},
56+
"facing=south,upwards_facing=east": {
57+
"gtceu:z": 270,
58+
"model": "gtceu:block/machine/advanced_monitor",
59+
"y": 180
60+
},
61+
"facing=south,upwards_facing=north": {
62+
"model": "gtceu:block/machine/advanced_monitor",
63+
"y": 180
64+
},
65+
"facing=south,upwards_facing=south": {
66+
"gtceu:z": 180,
67+
"model": "gtceu:block/machine/advanced_monitor",
68+
"y": 180
69+
},
70+
"facing=south,upwards_facing=west": {
71+
"gtceu:z": 90,
72+
"model": "gtceu:block/machine/advanced_monitor",
73+
"y": 180
74+
},
75+
"facing=up,upwards_facing=east": {
76+
"gtceu:z": 90,
77+
"model": "gtceu:block/machine/advanced_monitor",
78+
"x": 270
79+
},
80+
"facing=up,upwards_facing=north": {
81+
"gtceu:z": 180,
82+
"model": "gtceu:block/machine/advanced_monitor",
83+
"x": 270
84+
},
85+
"facing=up,upwards_facing=south": {
86+
"model": "gtceu:block/machine/advanced_monitor",
87+
"x": 270
88+
},
89+
"facing=up,upwards_facing=west": {
90+
"gtceu:z": 270,
91+
"model": "gtceu:block/machine/advanced_monitor",
92+
"x": 270
93+
},
94+
"facing=west,upwards_facing=east": {
95+
"gtceu:z": 270,
96+
"model": "gtceu:block/machine/advanced_monitor",
97+
"y": 270
98+
},
99+
"facing=west,upwards_facing=north": {
100+
"model": "gtceu:block/machine/advanced_monitor",
101+
"y": 270
102+
},
103+
"facing=west,upwards_facing=south": {
104+
"gtceu:z": 180,
105+
"model": "gtceu:block/machine/advanced_monitor",
106+
"y": 270
107+
},
108+
"facing=west,upwards_facing=west": {
109+
"gtceu:z": 90,
110+
"model": "gtceu:block/machine/advanced_monitor",
111+
"y": 270
112+
}
113+
}
114+
}

src/generated/resources/assets/gtceu/lang/en_ud.json

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
"block.gtceu.active_transformer": "ɹǝɯɹoɟsuɐɹ⟘ ǝʌıʇɔⱯ",
100100
"block.gtceu.advanced_computer_casing": "buısɐƆ ɹǝʇndɯoƆ pǝɔuɐʌpⱯ",
101101
"block.gtceu.advanced_data_access_hatch": "ɥɔʇɐH ssǝɔɔⱯ ɐʇɐᗡ pǝɔuɐʌpⱯ",
102+
"block.gtceu.advanced_monitor": "ɹoʇıuoW pǝɔuɐʌpⱯ",
102103
"block.gtceu.alloy_blast_smelter": "ɹǝʇןǝɯS ʇsɐןᗺ ʎoןןⱯ",
103104
"block.gtceu.aluminium_crate": "ǝʇɐɹƆ ɯnıuıɯnןⱯ",
104105
"block.gtceu.aluminium_drum": "ɯnɹᗡ ɯnıuıɯnןⱯ",
@@ -3524,6 +3525,11 @@
35243525
"gtceu.placeholder_info.calc.2": "buıɹʇs‾ʎuɐ >- }>buıɹʇs‾ʎuɐ< ɔןɐɔ{ ",
35253526
"gtceu.placeholder_info.calc.3": "uoıʇɐɹǝdo pǝıɟıɔǝds ǝɥʇ ɟo ʇןnsǝɹ ǝɥʇ >- }>bɹɐ< >~|ʇɹbs|ןıǝɔ|ɹooןɟ|punoɹ< ɔןɐɔ{ ",
35263527
"gtceu.placeholder_info.calc.4": "uoıʇɐɹǝdo pǝıɟıɔǝds ǝɥʇ ɟo ʇןnsǝɹ ǝɥʇ >- }>bɹɐ‾puoɔǝs< >%|<<|>>|//|/|*|-|+< >bɹɐ‾ʇsɹıɟ< ɔןɐɔ{ ",
3528+
"gtceu.placeholder_info.click.0": "ʞɔıʇ ʇuǝɹɹnɔ ǝɥʇ ǝɹoɟǝq pǝʞɔıןɔ sɐʍ ɹoʇıuoɯ pǝɔuɐʌpɐ pǝʇǝbɹɐʇ ǝɥʇ ɹǝɥʇǝɥʍ suɹnʇǝᴚ",
3529+
"gtceu.placeholder_info.click.1": ":ǝbɐs∩",
3530+
"gtceu.placeholder_info.click.2": "ǝsıʍɹǝɥʇo \"0\" 'pǝʞɔıןɔ sɐʍ ɹoʇıuoɯ pǝɔuɐʌpɐ pǝʇǝbɹɐʇ ǝɥʇ ɟı \"Ɩ\" >- }ʞɔıןɔ{ ",
3531+
"gtceu.placeholder_info.click.3": ")Ɩ puɐ 0 uǝǝʍʇǝq( ʞɔıןɔ ʇsɐן ǝɥʇ ɟo uoıʇısod x ǝɥʇ >- }x ʞɔıןɔ{ ",
3532+
"gtceu.placeholder_info.click.4": ")Ɩ puɐ 0 uǝǝʍʇǝq( ʞɔıןɔ ʇsɐן ǝɥʇ ɟo uoıʇısod ʎ ǝɥʇ >- }ʎ ʞɔıןɔ{ ",
35273533
"gtceu.placeholder_info.cmd.0": "˙ʇndʇno ɹıǝɥʇ suɹnʇǝɹ puɐ spuɐɯɯoɔ ʇɟɐɹɔǝuıW sǝʇnɔǝxƎ",
35283534
"gtceu.placeholder_info.cmd.1": "˙ʇı ɥʇıʍ buıʞɔıןɔ-ʇɥbıɹ ʎq ɟןǝsɹnoʎ oʇ ɯǝʇı ɐʇɐp ʎuɐ puıq 'ɹǝʎɐןd ɐ oʇ punoq ɯǝʇı ɐʇɐp ɐ sǝɹınbǝᴚ",
35293535
"gtceu.placeholder_info.cmd.2": ":ǝbɐs∩",
@@ -3555,12 +3561,15 @@
35553561
"gtceu.placeholder_info.displayTarget.2": ")00Ɩ-Ɩ sı ɹǝqɯnu ǝuıן( ǝuıן pǝıɟıɔǝds ǝɥʇ uo ʇxǝʇ ǝɥʇ >- }>ɹǝqɯnu‾ǝuıן< ʇǝbɹɐ⟘ʎɐןdsıp{ ",
35563562
"gtceu.placeholder_info.ender.0": "sɹǝʌoɔ ʞuıן ɹǝpuǝ ɥʇıʍ sʇɔɐɹǝʇuI",
35573563
"gtceu.placeholder_info.ender.1": "ɹǝʎɐןd ɐ oʇ punoq ɯǝʇı ɐʇɐp ɐ ɥʇıʍ pǝpıʌoɹd ɟı sןǝuuɐɥɔ ǝʇɐʌıɹd ɥʇıʍ ʇɔɐɹǝʇuı uɐƆ",
3564+
"gtceu.placeholder_info.ender.10": ")buıɹʇs ʎʇdɯǝ '0 ʇou( ʎʇdɯǝ ʇɟǝן ǝq ʎɐɯ ʇuǝɯnbɹɐ ʇoןs‾ɯǝʇı‾ɐʇɐp‾ɹǝʎɐןd ǝɥ⟘",
35583565
"gtceu.placeholder_info.ender.2": ":ǝbɐs∩",
35593566
"gtceu.placeholder_info.ender.3": "ʇunoɔ ɯǝʇı >- }]ʇoןs‾ɯǝʇı‾ɐʇɐp‾ɹǝʎɐןd[ >ןǝuuɐɥɔ< ɯǝʇı ɹǝpuǝ{ ",
3560-
"gtceu.placeholder_info.ender.4": "ʇunoɔ pınןɟ >- }]ʇoןs‾ɯǝʇı‾ɐʇɐp‾ɹǝʎɐןd[ >ןǝuuɐɥɔ< pınןɟ ɹǝpuǝ{ ",
3561-
"gtceu.placeholder_info.ender.5": "ןǝʌǝן ןɐubıs ǝuoʇspǝɹ >- ]ʇoןs‾ɯǝʇı‾ɐʇɐp‾ɹǝʎɐןd[ >ןǝuuɐɥɔ< ǝuoʇspǝɹ ɹǝpuǝ{ ",
3562-
"gtceu.placeholder_info.ender.6": "buıɹʇs ʎʇdɯǝ suɹnʇǝɹ 'ʞuıן ǝuoʇspǝɹ ɹǝpuǝ ǝɥʇ oʇ pǝʇndʇno ןɐubıs ǝuoʇspǝɹ ǝɥʇ sʇǝs >- >ןɐubıs< >ʇoןs‾ɯǝʇı‾ɐʇɐp‾ɹǝʎɐןd< >ןǝuuɐɥɔ< ǝuoʇspǝɹ ɹǝpuǝ{ ",
3563-
"gtceu.placeholder_info.ender.7": ")buıɹʇs ʎʇdɯǝ '0 ʇou( ʎʇdɯǝ ʇɟǝן ǝq ʎɐɯ ʇuǝɯnbɹɐ ʇoןs‾ɯǝʇı‾ɐʇɐp‾ɹǝʎɐןd ǝɥ⟘",
3567+
"gtceu.placeholder_info.ender.4": "ɹǝɟɟnq s,ʞuıן ɹǝpuǝ ǝɥʇ ɯoɹɟ ɯǝʇı Ɩ ןןnd >- }]ʇoןs‾ɯǝʇı‾ɐʇɐp‾ɹǝʎɐןd[ >ןǝuuɐɥɔ< ןןnԀɯǝʇı ɹǝpuǝ{ ",
3568+
"gtceu.placeholder_info.ender.5": "ɹǝɟɟnq s,ʞuıן ɹǝpuǝ ǝɥʇ oʇ ɯǝʇı Ɩ ɥsnd >- }]ʇoןs‾ɯǝʇı‾ɐʇɐp‾ɹǝʎɐןd[ >ןǝuuɐɥɔ< ɥsnԀɯǝʇı ɹǝpuǝ{ ",
3569+
"gtceu.placeholder_info.ender.6": ")\"ʇɹıp:ʇɟɐɹɔǝuıɯ 9ᄅ\" ˙xǝ( ɹǝɟɟnq s,ʞuıן ɹǝpuǝ ǝɥʇ uı ɯǝʇı ǝɥʇ ɟo pı ǝɥʇ >- }]ʇoןs‾ɯǝʇı‾ɐʇɐp‾ɹǝʎɐןd[ >ןǝuuɐɥɔ< pIɯǝʇı ɹǝpuǝ{ ",
3570+
"gtceu.placeholder_info.ender.7": "ʇunoɔ pınןɟ >- }]ʇoןs‾ɯǝʇı‾ɐʇɐp‾ɹǝʎɐןd[ >ןǝuuɐɥɔ< pınןɟ ɹǝpuǝ{ ",
3571+
"gtceu.placeholder_info.ender.8": "ןǝʌǝן ןɐubıs ǝuoʇspǝɹ >- ]ʇoןs‾ɯǝʇı‾ɐʇɐp‾ɹǝʎɐןd[ >ןǝuuɐɥɔ< ǝuoʇspǝɹ ɹǝpuǝ{ ",
3572+
"gtceu.placeholder_info.ender.9": "buıɹʇs ʎʇdɯǝ suɹnʇǝɹ 'ʞuıן ǝuoʇspǝɹ ɹǝpuǝ ǝɥʇ oʇ pǝʇndʇno ןɐubıs ǝuoʇspǝɹ ǝɥʇ sʇǝs >- >ןɐubıs< >ʇoןs‾ɯǝʇı‾ɐʇɐp‾ɹǝʎɐןd< >ןǝuuɐɥɔ< ǝuoʇspǝɹ ɹǝpuǝ{ ",
35643573
"gtceu.placeholder_info.energy.0": "˙pǝɹoʇs ʎbɹǝuǝ ɟo ʇunoɯɐ ǝɥʇ suɹnʇǝᴚ",
35653574
"gtceu.placeholder_info.energy.1": ":ǝbɐs∩",
35663575
"gtceu.placeholder_info.energy.2": "pǝɹoʇs ʎbɹǝuǝ ɟo ʇunoɯɐ ǝɥʇ >- }ʎbɹǝuǝ{ ",
@@ -3595,7 +3604,7 @@
35953604
"gtceu.placeholder_info.maxProgress.3": "ǝdıɔǝɹ buıuunɹ ʎןʇuǝɹɹnɔ ǝɥʇ ɟo ssǝɹboɹd xɐɯ ǝɥʇ >- }ssǝɹboɹԀxɐɯ{ ",
35963605
"gtceu.placeholder_info.nbt.0": "ʇoןs pǝıɟıɔǝds ǝɥʇ uı ɯǝʇı ǝɥʇ ɟo ɐʇɐp ʇqu ǝɥʇ suɹnʇǝᴚ",
35973606
"gtceu.placeholder_info.nbt.1": ":ǝbɐs∩",
3598-
"gtceu.placeholder_info.nbt.2": "ɐʇɐp ʇqu >- }>ʇoןs< ʇqu{ ",
3607+
"gtceu.placeholder_info.nbt.2": "]˙˙˙[]Ɛʎǝʞ[]ᄅʎǝʞ[]Ɩʎǝʞ[ʇqu‾ɯǝʇı >- }˙˙˙ ]Ɛʎǝʞ[ ]ᄅʎǝʞ[ ]Ɩʎǝʞ[ >ʇoןs< ʇqu{ ",
35993608
"gtceu.placeholder_info.obf.0": "˙pǝʇɐɔsnɟqo 'ʇuǝɯnbɹɐ ʇsɹıɟ ǝɥʇ ɯoɹɟ ʇxǝʇ ǝɥʇ suɹnʇǝᴚ",
36003609
"gtceu.placeholder_info.obf.1": ":ǝbɐs∩",
36013610
"gtceu.placeholder_info.obf.2": "ʇxǝʇ pǝʇɐɔsnɟqo >- }>ʇxǝʇ< ɟqo{ ",
@@ -3793,7 +3802,7 @@
37933802
"gtceu.tooltip.status.trinary.true": "ǝnɹ⟘",
37943803
"gtceu.tooltip.status.trinary.unknown": "uʍouʞu∩",
37953804
"gtceu.tooltip.tool_fluid_hold_shift": "oɟuI ןoo⟘ puɐ ʇuǝɯuıɐʇuoƆ pınןℲ ʍoɥs oʇ ⟘ℲIHS pןoHㄥ§",
3796-
"gtceu.tooltip.wireless_transmitter_bind": "%s buıɔɐɟ %s %s %s ʇɐ ɹǝʌoɔ ɹǝʇʇıɯsuɐɹʇ ɐ oʇ buıpuıᗺ",
3805+
"gtceu.tooltip.wireless_transmitter_bind": "%s uı %s buıɔɐɟ %s %s %s ʇɐ ɹǝʌoɔ ɹǝʇʇıɯsuɐɹʇ ɐ oʇ buıpuıᗺ",
37973806
"gtceu.top.allow_output_input": "ʇnduI ʍoןןⱯ",
37983807
"gtceu.top.auto_output": "ʇndʇnO oʇnⱯ",
37993808
"gtceu.top.buffer_bound_pos": "%s :Z '%s :ʎ '%s :X - o⟘ punoᗺ",

src/generated/resources/assets/gtceu/lang/en_us.json

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
"block.gtceu.active_transformer": "Active Transformer",
100100
"block.gtceu.advanced_computer_casing": "Advanced Computer Casing",
101101
"block.gtceu.advanced_data_access_hatch": "Advanced Data Access Hatch",
102+
"block.gtceu.advanced_monitor": "Advanced Monitor",
102103
"block.gtceu.alloy_blast_smelter": "Alloy Blast Smelter",
103104
"block.gtceu.aluminium_crate": "Aluminium Crate",
104105
"block.gtceu.aluminium_drum": "Aluminium Drum",
@@ -3524,6 +3525,11 @@
35243525
"gtceu.placeholder_info.calc.2": " {calc <any_string>} -> any_string",
35253526
"gtceu.placeholder_info.calc.3": " {calc <round|floor|ceil|sqrt|~> <arg>} -> the result of the specified operation",
35263527
"gtceu.placeholder_info.calc.4": " {calc <first_arg> <+|-|*|/|//|>>|<<|%> <second_arg>} -> the result of the specified operation",
3528+
"gtceu.placeholder_info.click.0": "Returns whether the targeted advanced monitor was clicked before the current tick",
3529+
"gtceu.placeholder_info.click.1": "Usage:",
3530+
"gtceu.placeholder_info.click.2": " {click} -> \"1\" if the targeted advanced monitor was clicked, \"0\" otherwise",
3531+
"gtceu.placeholder_info.click.3": " {click x} -> the x position of the last click (between 0 and 1)",
3532+
"gtceu.placeholder_info.click.4": " {click y} -> the y position of the last click (between 0 and 1)",
35273533
"gtceu.placeholder_info.cmd.0": "Executes Minecraft commands and returns their output.",
35283534
"gtceu.placeholder_info.cmd.1": "Requires a data item bound to a player, bind any data item to yourself by right-clicking with it.",
35293535
"gtceu.placeholder_info.cmd.2": "Usage:",
@@ -3555,12 +3561,15 @@
35553561
"gtceu.placeholder_info.displayTarget.2": " {displayTarget <line_number>} -> the text on the specified line (line number is 1-100)",
35563562
"gtceu.placeholder_info.ender.0": "Interacts with ender link covers",
35573563
"gtceu.placeholder_info.ender.1": "Can interact with private channels if provided with a data item bound to a player",
3564+
"gtceu.placeholder_info.ender.10": "The player_data_item_slot argument may be left empty (not 0, empty string)",
35583565
"gtceu.placeholder_info.ender.2": "Usage:",
35593566
"gtceu.placeholder_info.ender.3": " {ender item <channel> [player_data_item_slot]} -> item count",
3560-
"gtceu.placeholder_info.ender.4": " {ender fluid <channel> [player_data_item_slot]} -> fluid count",
3561-
"gtceu.placeholder_info.ender.5": " {ender redstone <channel> [player_data_item_slot] -> redstone signal level",
3562-
"gtceu.placeholder_info.ender.6": " {ender redstone <channel> <player_data_item_slot> <signal> -> sets the redstone signal outputed to the ender redstone link, returns empty string",
3563-
"gtceu.placeholder_info.ender.7": "The player_data_item_slot argument may be left empty (not 0, empty string)",
3567+
"gtceu.placeholder_info.ender.4": " {ender itemPull <channel> [player_data_item_slot]} -> pull 1 item from the ender link's buffer",
3568+
"gtceu.placeholder_info.ender.5": " {ender itemPush <channel> [player_data_item_slot]} -> push 1 item to the ender link's buffer",
3569+
"gtceu.placeholder_info.ender.6": " {ender itemId <channel> [player_data_item_slot]} -> the id of the item in the ender link's buffer (ex. \"26 minecraft:dirt\")",
3570+
"gtceu.placeholder_info.ender.7": " {ender fluid <channel> [player_data_item_slot]} -> fluid count",
3571+
"gtceu.placeholder_info.ender.8": " {ender redstone <channel> [player_data_item_slot] -> redstone signal level",
3572+
"gtceu.placeholder_info.ender.9": " {ender redstone <channel> <player_data_item_slot> <signal> -> sets the redstone signal outputed to the ender redstone link, returns empty string",
35643573
"gtceu.placeholder_info.energy.0": "Returns the amount of energy stored.",
35653574
"gtceu.placeholder_info.energy.1": "Usage:",
35663575
"gtceu.placeholder_info.energy.2": " {energy} -> the amount of energy stored",
@@ -3595,7 +3604,7 @@
35953604
"gtceu.placeholder_info.maxProgress.3": " {maxProgress} -> the max progress of the currently running recipe",
35963605
"gtceu.placeholder_info.nbt.0": "Returns the nbt data of the item in the specified slot",
35973606
"gtceu.placeholder_info.nbt.1": "Usage:",
3598-
"gtceu.placeholder_info.nbt.2": " {nbt <slot>} -> nbt data",
3607+
"gtceu.placeholder_info.nbt.2": " {nbt <slot> [key1] [key2] [key3] ...} -> item_nbt[key1][key2][key3][...]",
35993608
"gtceu.placeholder_info.obf.0": "Returns the text from the first argument, obfuscated.",
36003609
"gtceu.placeholder_info.obf.1": "Usage:",
36013610
"gtceu.placeholder_info.obf.2": " {obf <text>} -> obfuscated text",
@@ -3793,7 +3802,7 @@
37933802
"gtceu.tooltip.status.trinary.true": "True",
37943803
"gtceu.tooltip.status.trinary.unknown": "Unknown",
37953804
"gtceu.tooltip.tool_fluid_hold_shift": "§7Hold SHIFT to show Fluid Containment and Tool Info",
3796-
"gtceu.tooltip.wireless_transmitter_bind": "Binding to a transmitter cover at %s %s %s facing %s",
3805+
"gtceu.tooltip.wireless_transmitter_bind": "Binding to a transmitter cover at %s %s %s facing %s in %s",
37973806
"gtceu.top.allow_output_input": "Allow Input",
37983807
"gtceu.top.auto_output": "Auto Output",
37993808
"gtceu.top.buffer_bound_pos": "Bound To - X: %s, Y: %s, Z: %s",
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"parent": "minecraft:block/block",
3+
"loader": "gtceu:machine",
4+
"machine": "gtceu:advanced_monitor",
5+
"replaceable_textures": [
6+
"all"
7+
],
8+
"variants": {
9+
"": {
10+
"model": {
11+
"parent": "gtceu:block/machine/part/computer_monitor",
12+
"textures": {
13+
"all": "gtceu:block/casings/solid/machine_casing_clean_stainless_steel"
14+
}
15+
}
16+
}
17+
}
18+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"parent": "gtceu:block/machine/advanced_monitor"
3+
}

src/main/java/com/gregtechceu/gtceu/api/blockentity/MetaMachineBlockEntity.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,14 @@ public static <T> LazyOptional<T> getCapability(MetaMachine machine, @NotNull Ca
272272
if (!list.isEmpty()) {
273273
return GTCapability.CAPABILITY_MONITOR_COMPONENT.orEmpty(cap, LazyOptional.of(() -> list.get(0)));
274274
}
275+
} else if (cap == GTCapability.CAPABILITY_CENTRAL_MONITOR) {
276+
if (machine instanceof ICentralMonitor centralMonitor) {
277+
return GTCapability.CAPABILITY_CENTRAL_MONITOR.orEmpty(cap, LazyOptional.of(() -> centralMonitor));
278+
}
279+
var list = getCapabilitiesFromTraits(machine.getTraits(), side, ICentralMonitor.class);
280+
if (!list.isEmpty()) {
281+
return GTCapability.CAPABILITY_CENTRAL_MONITOR.orEmpty(cap, LazyOptional.of(() -> list.get(0)));
282+
}
275283
}
276284
if (GTCEu.Mods.isAE2Loaded()) {
277285
LazyOptional<?> opt = AE2CallWrapper.getGridNodeHostCapability(cap, machine, side);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.gregtechceu.gtceu.api.capability;
2+
3+
import com.gregtechceu.gtceu.common.machine.multiblock.electric.monitor.MonitorGroup;
4+
5+
import java.util.List;
6+
7+
public interface ICentralMonitor {
8+
9+
List<MonitorGroup> getMonitorGroups();
10+
}

src/main/java/com/gregtechceu/gtceu/api/capability/forge/GTCapability.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public class GTCapability {
4040
.get(new CapabilityToken<>() {});
4141
public static final Capability<IMonitorComponent> CAPABILITY_MONITOR_COMPONENT = CapabilityManager
4242
.get(new CapabilityToken<>() {});
43+
public static final Capability<ICentralMonitor> CAPABILITY_CENTRAL_MONITOR = CapabilityManager
44+
.get(new CapabilityToken<>() {});
4345

4446
public static final Capability<IMedicalConditionTracker> CAPABILITY_MEDICAL_CONDITION_TRACKER = CapabilityManager
4547
.get(new CapabilityToken<>() {});
@@ -61,5 +63,7 @@ public static void register(RegisterCapabilitiesEvent event) {
6163
event.register(IDataAccessHatch.class);
6264
event.register(IMedicalConditionTracker.class);
6365
event.register(IHazardParticleContainer.class);
66+
event.register(IMonitorComponent.class);
67+
event.register(ICentralMonitor.class);
6468
}
6569
}

src/main/java/com/gregtechceu/gtceu/api/item/component/IMonitorModuleItem.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,8 @@ default void tick(ItemStack stack, CentralMonitorMachine machine, MonitorGroup g
1515
IMonitorRenderer getRenderer(ItemStack stack, CentralMonitorMachine machine, MonitorGroup group);
1616

1717
Widget createUIWidget(ItemStack stack, CentralMonitorMachine machine, MonitorGroup group);
18+
19+
default String getType() {
20+
return "unknown";
21+
}
1822
}

src/main/java/com/gregtechceu/gtceu/api/placeholder/MultiLineComponent.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import net.minecraft.nbt.Tag;
99
import net.minecraft.network.chat.*;
1010

11+
import lombok.Getter;
12+
import lombok.Setter;
1113
import org.jetbrains.annotations.Nullable;
1214

1315
import java.util.ArrayList;
@@ -16,6 +18,10 @@
1618

1719
public class MultiLineComponent extends ArrayList<MutableComponent> {
1820

21+
@Getter
22+
@Setter
23+
private boolean ignoreSpaces = false;
24+
1925
public MultiLineComponent(List<MutableComponent> components) {
2026
super();
2127
this.addAll(components);
@@ -104,6 +110,7 @@ public MultiLineComponent withStyle(Style style) {
104110
out.append(MultiLineComponent.of(c.withStyle(style)));
105111
out.appendNewline();
106112
}
113+
if (!out.isEmpty()) out.remove(out.size() - 1);
107114
return out;
108115
}
109116

@@ -113,6 +120,7 @@ public MultiLineComponent withStyle(ChatFormatting... style) {
113120
out.append(MultiLineComponent.of(c.withStyle(style)));
114121
out.appendNewline();
115122
}
123+
if (!out.isEmpty()) out.remove(out.size() - 1);
116124
return out;
117125
}
118126

0 commit comments

Comments
 (0)