Commit Graph

839 Commits

Author SHA1 Message Date
Kilobyte22
8dc69011aa Add switch to item list 2022-02-18 00:20:31 +01:00
Kilobyte22
10ab82095f Re-Implement the switch for 1.18 2022-02-16 01:37:41 +01:00
Florian Nücke
14210c538f Add support for custom block devices via data packs. 2022-02-14 00:04:43 +01:00
Florian Nücke
e5256f3ada Accept long for size formatting. 2022-02-14 00:03:49 +01:00
Florian Nücke
777b9f529d Change label of default hard drive and firmware to "Sedna Linux" to be less generic. 2022-02-13 23:59:02 +01:00
Florian Nücke
8fcaa81037 Add matching getter to firmware registry. 2022-02-13 23:58:25 +01:00
Florian Nücke
85c0452372 Also list all extra custom hard drives in the creative tab. 2022-02-13 23:54:00 +01:00
Florian Nücke
6148eff484 Return empty stack if data is invalid, instead of returning default one. 2022-02-13 23:38:42 +01:00
Florian Nücke
df60bd8f50 Ditto for firmwares. 2022-02-13 23:38:32 +01:00
Florian Nücke
b958aeefd8 Renamed class, abstract away registry. 2022-02-13 23:35:52 +01:00
Florian Nücke
db0675370b Small rename to match mappings. 2022-02-13 23:34:16 +01:00
Florian Nücke
3685c195fd Renamed internal item names for buildroot hard disk and flash to be more generic. 2022-02-13 22:03:38 +01:00
Florian Nücke
516bd6ca73 Add config for default ethernet frame TLL. Closes #101. 2022-02-13 21:11:23 +01:00
Florian Nücke
f0a06c8929 Send raw error message to client and add extra method to resolve error message.
Avoids powered-off computers showing "bus incomplete" after load.
2022-02-13 19:11:45 +01:00
Florian Nücke
a92ac07548 Pass a scan reason for scheduling bus scan, so we can immediately retry when errors may be fixed, but avoid ping-pong while errors persist. 2022-02-13 18:28:00 +01:00
Florian Nücke
b92152c593 Fix devices in unloaded chunks not being removed from element device list. 2022-02-13 17:36:16 +01:00
Florian Nücke
356cf1f5c0 Always store data, even if empty, to know device existed. 2022-02-13 17:26:06 +01:00
Florian Nücke
782217aa23 Another returned set to readonly and fix potential infinite recursion. 2022-02-13 17:12:43 +01:00
Florian Nücke
5f15146676 Handle edge case where devices get removed while element is unloaded, so we call dispose on the provider in that case.
Since dispose is only called through element now, delay this to after the device update, so adapters can call unmount first.
Also, assign a new ID to groups when they structurally change.
2022-02-13 17:01:36 +01:00
Florian Nücke
c0b35cd4f8 Trigger device update in controller when some devices may be unloaded now. 2022-02-13 16:57:34 +01:00
Florian Nücke
f98d457774 Paranoia: when removing cable/interface, ensure previously known devices are disposed via controller, even if they're currently in unloaded chunks. 2022-02-13 16:56:08 +01:00
Florian Nücke
3fdf49f3af Make getter return readonly collection. 2022-02-13 16:54:49 +01:00
Florian Nücke
fad198e9d1 Split up controller scan logic into methods for readability, reduced number of add/removeController calls.
Also, extra paranoia, checking previously known elements for other controllers, too.
2022-02-13 16:54:31 +01:00
Florian Nücke
5f284bab15 Avoid controller scan scheduling ping-pong. 2022-02-13 16:42:22 +01:00
Florian Nücke
3615fd1f0c Have adapters only unmount, not dispose devices. 2022-02-13 16:13:32 +01:00
Florian Nücke
61323fae80 Missed two isRemoved() -> isInvalid() conversions. 2022-02-13 16:12:47 +01:00
Florian Nücke
352af7d37a Move dispose method to parent interface. 2022-02-13 16:12:32 +01:00
Florian Nücke
d84a674cb4 Renamed event for clarity, inlined public methods only used in event, anyway. 2022-02-13 16:09:47 +01:00
Florian Nücke
927f7f425a Add utility method that also checks unloaded, not just removed for block entities. 2022-02-13 16:07:22 +01:00
Florian Nücke
0564ce614e Consistency. 2022-02-13 16:05:33 +01:00
Florian Nücke
4688106a6d Made capability access test-friendly. 2022-02-13 15:58:17 +01:00
Florian Nücke
07429bf39c Made provider registry access test-friendly. 2022-02-13 15:57:21 +01:00
Florian Nücke
6094a275a4 Don't add synthetic devices (type names) when there are no other devices. 2022-02-09 17:35:40 +01:00
Florian Nücke
88c044203f Fix block device entries not equaling. 2022-02-09 17:35:17 +01:00
Florian Nücke
479af156c5 Make Invalidatable properly implement equals and hashCode. 2022-02-09 17:34:49 +01:00
Florian Nücke
03f9216014 Use interface for mocking in tests. 2022-02-09 17:34:29 +01:00
Florian Nücke
24e837192a One level of indirection for capabilities for tests. 2022-02-09 17:33:04 +01:00
Florian Nücke
024ee5881b Add JEI provider for differently configured items.
Includes computers, robots, hard drives, flash memory.
2022-02-08 13:55:19 +01:00
Florian Nücke
d235669ff6 Allow breaking robots by attacking when in creative mode. 2022-02-08 13:34:21 +01:00
Florian Nücke
df62a63d60 Remove the double escape thing to close keyboard screen. Doesn't feel right. 2022-02-08 13:34:09 +01:00
Florian Nücke
3e6d62ec81 Upload textures for projectors immediately to avoid GL error before first frame arrives. 2022-02-07 22:55:20 +01:00
Florian Nücke
3056d55d10 Fix GL errors due to disposed textures still being bound after rendering multiple projectors at once. 2022-02-07 22:55:00 +01:00
Florian Nücke
9a8b278aa0 Send detailed projector state to client, show red lens when not powered. 2022-02-07 22:26:25 +01:00
Florian Nücke
96a3366031 Show projector energy consumption in tooltip.
Also show base energy consumption of computers in tooltip.
2022-02-07 20:36:09 +01:00
Florian Nücke
e1b6fc2618 Add JEI plugin to tell it about the sidebars in our computer/robot UIs. 2022-02-07 17:44:47 +01:00
Florian Nücke
2794002324 Moved lock leading to waits on main thread for encoding worker thread. 2022-02-07 13:34:06 +01:00
Florian Nücke
917a37999e Only copy depth when will render projector. Flush other render layers that may write to depth when we do. 2022-02-07 12:06:07 +01:00
Florian Nücke
34d82e39d3 Make projector not break when some other mod enables stencil for the main render target. 2022-02-07 09:57:20 +01:00
Florian Nücke
95eb8997cb Got rid of a mixin. 2022-02-06 23:41:31 +01:00
Florian Nücke
bf4425902d Don't inject names when there's no other devices. 2022-02-06 21:38:25 +01:00