Commit Graph

  • e1b6fc2618 Add JEI plugin to tell it about the sidebars in our computer/robot UIs. Florian Nücke 2022-02-07 17:44:47 +01:00
  • 684c27baee Update JEI. Florian Nücke 2022-02-07 17:23:47 +01:00
  • 2794002324 Moved lock leading to waits on main thread for encoding worker thread. Florian Nücke 2022-02-07 13:11:47 +01:00
  • 917a37999e Only copy depth when will render projector. Flush other render layers that may write to depth when we do. Florian Nücke 2022-02-07 12:06:07 +01:00
  • 34d82e39d3 Make projector not break when some other mod enables stencil for the main render target. Florian Nücke 2022-02-07 09:57:20 +01:00
  • 95eb8997cb Got rid of a mixin. Florian Nücke 2022-02-06 23:41:31 +01:00
  • cb21c17b52 Update Forge. Florian Nücke 2022-02-06 23:03:31 +01:00
  • ba3d42fbea Fix mixin setup. Florian Nücke 2022-02-06 22:51:20 +01:00
  • b0156b6e5f Update mockito. Florian Nücke 2022-02-06 22:33:52 +01:00
  • 6980acac74 Update sedna-buildroot for evdev. Florian Nücke 2022-02-06 22:32:50 +01:00
  • bf4425902d Don't inject names when there's no other devices. Florian Nücke 2022-02-06 21:38:25 +01:00
  • d8dc608e89 Fix potential (silent) NRE when no data is available after all. Florian Nücke 2022-02-06 21:38:10 +01:00
  • 7a4037eb61 Remove listener tracker when last listener is removed. Florian Nücke 2022-02-06 21:37:43 +01:00
  • 961f04a54c Fixed ghost loading bug in projector. Florian Nücke 2022-02-06 21:37:19 +01:00
  • e1f51118cd Fixed chunk load/unload listeners only firing once. Florian Nücke 2022-02-06 20:48:08 +01:00
  • fb8b9d4c9f Fix projector watcher caching. Florian Nücke 2022-02-06 20:33:57 +01:00
  • 6d726de6ae Fix updating boot error to clients. Florian Nücke 2022-02-06 19:02:26 +01:00
  • b9f64e5de4 Fix computers adding their own devices without attached interface. Florian Nücke 2022-02-06 19:01:13 +01:00
  • 01c28eb6ad Default new projectors to not be lit. Florian Nücke 2022-02-06 19:00:53 +01:00
  • c926c3cd37 Only mark chunks as unsaved for tracked bus elements, not their neighbors. Florian Nücke 2022-02-06 14:35:45 +01:00
  • 94f41f925a Have bus interfaces track their neighbor chunks, if necessary. Florian Nücke 2022-02-06 14:00:52 +01:00
  • a40899d748 Block device queries have optional result now, empty indicating unloaded area. Florian Nücke 2022-02-06 13:59:24 +01:00
  • 4f3ffe7a82 Small rename. Florian Nücke 2022-02-06 13:34:01 +01:00
  • 47904385c2 Fixed removing cable part not directly triggering bus scan. Florian Nücke 2022-02-06 13:33:14 +01:00
  • 7698ee5bde Small legacy naming fix. Florian Nücke 2022-02-06 13:30:29 +01:00
  • 0736cdc9a0 Remove unneeded call. Keep it out after all... Florian Nücke 2022-02-06 01:46:35 +01:00
  • 6fbc455c2f Add util record for describing chunk pos in a level. Adjust block pos one to match (also use a weak level ref). Florian Nücke 2022-02-06 01:45:38 +01:00
  • 6ad13b9c02 Ignore removal if block entity was already unloaded. Fixes computers losing their memory and such... Florian Nücke 2022-02-05 17:49:10 +01:00
  • ce0c99b6e4 Guess we have to do it like this. Florian Nücke 2022-02-05 15:46:23 +01:00
  • ad8082e056 Actually, that won't solve anything, so keep it out of the API for now. Florian Nücke 2022-02-05 15:35:48 +01:00
  • 814f9d37dd Split up vm and rpc device packages. Florian Nücke 2022-02-05 15:09:33 +01:00
  • 6f7f0fa048 Similar to how it is for blocks now, allow providing devices as capabilities from items. Florian Nücke 2022-02-05 14:40:16 +01:00
  • 5ecafeba16 Make some devices properly tell their container they changed. Item devices for computer/robot, so not strictly necessary, but for clarity. Florian Nücke 2022-02-05 14:16:10 +01:00
  • 2b3858bd14 Make computer not detecting devices explicit. Florian Nücke 2022-02-05 14:06:45 +01:00
  • 581994327d Make item bus element update logic read a bit more similar to block one. Florian Nücke 2022-02-05 13:58:10 +01:00
  • 73d43ee254 Add API to give devices a reference to their context, to flag stuff as dirty e.g. Florian Nücke 2022-02-05 13:21:19 +01:00
  • 3719e01447 Cleaned up bus element implementations a little, to straighten the logical flow. Florian Nücke 2022-02-05 13:14:48 +01:00
  • 364f5ff83f Util method for no-op runnable. Florian Nücke 2022-02-05 13:09:16 +01:00
  • 83023715a1 Use nice names for samplers. Florian Nücke 2022-02-05 01:28:54 +01:00
  • 3351b036d6 Return device as capability for disk drive and projector. Florian Nücke 2022-02-04 21:15:21 +01:00
  • 12de59d5d5 Small cleanup. Florian Nücke 2022-02-04 19:47:55 +01:00
  • 0d62751110 Always use relative pos to main camera to reduce precision errors. Florian Nücke 2022-02-04 19:35:04 +01:00
  • 68d6dc85f6 Fix numeric key evdev mapping. Florian Nücke 2022-02-04 16:42:08 +01:00
  • 2b9b2399f5 Add overlay for keyboard screen, hide hotbar. Improve input handling. Florian Nücke 2022-02-04 16:41:31 +01:00
  • 5e605c3400 First draft for the keyboard block. Florian Nücke 2022-02-04 13:19:29 +01:00
  • c0268cb6e1 Check bus block entity validity while screen is open. Florian Nücke 2022-02-04 10:23:58 +01:00
  • 1d825aa28d Updated blockstate.json for projector. Florian Nücke 2022-02-04 10:23:26 +01:00
  • 1c7da6835b Sorted some things. Florian Nücke 2022-02-04 10:23:09 +01:00
  • 781670b47c Fix keyboard deserialization. Florian Nücke 2022-02-04 09:30:41 +01:00
  • 04ee0bc582 Fix not sending frame to client when they start observing a projector that's not changing. Florian Nücke 2022-02-03 21:58:26 +01:00
  • c1679223bd Add SPDX header. Florian Nücke 2022-02-03 21:42:17 +01:00
  • 5e9dd1a4e5 Organize imports. Florian Nücke 2022-02-03 21:33:04 +01:00
  • e28370ae1c Make projector emit some light while projecting something. Florian Nücke 2022-02-03 21:24:20 +01:00
  • 2b368cab05 Don't render projection if there's no way player can see it (too far in front of projector). Florian Nücke 2022-02-03 20:22:03 +01:00
  • 85363b8835 Add recipe for projector block. Adjusted a few other recipes. Florian Nücke 2022-02-03 19:55:56 +01:00
  • 29b1d4eb08 Fix data generator breaking because apparently that's CLIENT side. Florian Nücke 2022-02-03 19:37:24 +01:00
  • 9af06ea459 Ensure client-side event listeners are only added on client. Florian Nücke 2022-02-03 19:27:33 +01:00
  • 8ba0a93144 Small rewording. Florian Nücke 2022-02-03 19:14:48 +01:00
  • fe2fdc9391 Make sides and front of projector non "solid" to avoid torch placement and such. Florian Nücke 2022-02-03 19:11:44 +01:00
  • 0f2c34f287 Don't do stuff with the VM in computers on client side. Florian Nücke 2022-02-03 17:32:55 +01:00
  • 4c4385f0ec Don't do stuff with the VM in robots on client side. Florian Nücke 2022-02-03 17:31:33 +01:00
  • 94318dceee Run all sending of framebuffer data through a load balancer, so we have more control over bandwidth use. Penalize projectors that a) send to multiple clients, b) are far away from players. Florian Nücke 2022-02-03 17:31:14 +01:00
  • ced5a0b5b4 Catch buffer overflow exceptions in encode, since apparently these can happen. Only seen this when flooding with random, which is... esoteric. So silently swallow this to avoid users deliberately spamming server logs. Florian Nücke 2022-02-02 02:08:01 +01:00
  • ee232dc049 Disable projection when occluded. Florian Nücke 2022-02-02 01:33:16 +01:00
  • 05c2f43abd Use frustum matrix for projector depth rendering, to allow flat projection onto surfaces while still offsetting upwards. Ensure render bounds for projectors always work. Render weather into projector depth so that rain casts shadows. Florian Nücke 2022-02-02 01:06:09 +01:00
  • 6c6bcadee5 Tighter fit on projection. Florian Nücke 2022-02-02 00:56:58 +01:00
  • 2361a84b8e Use actual projection rendering for projectors. Florian Nücke 2022-02-01 20:18:55 +01:00
  • 59a3a2b127 Trying to render level for projector depth. Florian Nücke 2022-01-30 14:31:08 +01:00
  • 3e2914ba9e Use annotations to register event listeners. Florian Nücke 2022-01-28 19:08:25 +01:00
  • 539beb4e0f Being reasonable is boring. Florian Nücke 2022-01-25 18:20:13 +01:00
  • 2f7b044b00 Fixed facing check. Florian Nücke 2022-01-25 17:44:22 +01:00
  • c61c9f4b6b Small rename. Florian Nücke 2022-01-25 17:43:24 +01:00
  • a1a1f3e887 Render no border without wonky GL settings. Florian Nücke 2022-01-25 17:42:48 +01:00
  • 8f89d318d4 Projector block. Florian Nücke 2022-01-23 23:25:12 +01:00
  • d6a93605a8 Fix devices not being released when computer is destroyed while running. Florian Nücke 2022-01-30 15:10:21 +01:00
  • ab69c6977a Fixed disk drives being read-only. Fixes #103. Florian Nücke 2022-01-30 14:44:47 +01:00
  • f8899d361e Update Forge and simplify mixin stuff. Florian Nücke 2022-01-28 18:33:20 +01:00
  • 7be40b02e2 Can be an assert. Florian Nücke 2022-01-28 13:26:33 +01:00
  • dc6089d347 Made block entity ticking a little nicer. Florian Nücke 2022-01-28 13:26:01 +01:00
  • 4793aee54a Update docs. Florian Nücke 2022-01-28 10:07:29 +01:00
  • b4dc58edbd Fix computer running sound not stopping when stopped before initial delay expired. Florian Nücke 2022-01-28 02:40:24 +01:00
  • a1217ba819 Various cleanup. Removed pointless VMLifeCycleEvent. Initialize block devices asynchronously. Florian Nücke 2022-01-28 02:28:10 +01:00
  • cbb19eff70 Small rename. Florian Nücke 2022-01-28 00:58:59 +01:00
  • b75f5cbca2 Simplify network device run state switching. Can't remember why all the events were needed before. Joining worker thread should be enough, since when unmounting one, we unmount all. So there should be no way to read/write from network device after vm devices were unmounted (and memory closed). Florian Nücke 2022-01-28 00:56:32 +01:00
  • ae13fca2e9 Rework VMDevice to be more intuitive for typical cases. unmount() is now called in addition to when suspend() was called before. dispose() is called after unmount() if cleanup is required (machine stopped, device removed). Florian Nücke 2022-01-28 00:55:16 +01:00
  • 82a6702b33 Rework RPCDevice to be more intuitive for typical cases. unmount() is now called in addition to when suspend() was called before. dispose() is called after unmount() if cleanup is required (machine stopped, device removed). Florian Nücke 2022-01-27 20:10:41 +01:00
  • bd1b46882e Mark chunk lazy dirty when charger charged something, so its stored energy changed. Florian Nücke 2022-01-27 11:16:39 +01:00
  • a5cf919f23 Mark chunk dirty when bus interface name changes. Florian Nücke 2022-01-27 11:15:58 +01:00
  • 28304b1a28 Make some more block entities use custom base class for consistency. Florian Nücke 2022-01-27 11:15:38 +01:00
  • 1ab2b8ea24 Run firmware check first, as quasi-early exit, before checking vm devices. Florian Nücke 2022-01-27 11:15:14 +01:00
  • d9c86cbca5 Add system to mark chunks as "lazy unsaved". Avoids serialization of chunks with computers in them every single tick. Since computers state changes every tick they're running, flagging the chunk unsaved every chunk would be necessary. However, this is undesirable, because it triggers an NBT serialization ever tick. Which is slow. To avoid this, we now track a "lazy unsaved" flag for chunks, which computers can set. This flag is applied to the real unsaved flag during explicit saves, right before the unsaved flag is checked. Explicit saves include chunk unloads, pausing in single-player, server stopping and the save command, for example. Florian Nücke 2022-01-27 11:13:22 +01:00
  • 9410781c25 [BREAKING] Reworked RPC method API to be more flexible. RPCDevices now return a list of RPCMethodGroups instead of RPCMethods directly. RPCMethodGroups can be queried for a method based on an invocation. They can also optionally provide a list of all overloads, for documentation purposes (queried by VM). Overloads are the old RPCMethods, now taking the same invocation information the lookup method takes. For convenience, RPCMethods are also singleton RPCMethodGroups. Florian Nücke 2022-01-26 03:13:30 +01:00
  • 557a1b1dc1 Make types optional in documentation generators. Florian Nücke 2022-01-26 02:40:47 +01:00
  • 0126c6e5f6 Fix use of deprecated method. Florian Nücke 2022-01-26 00:22:08 +01:00
  • f2d69c1cd2 Add missing forwards in AbstractItemRPCDevice. Florian Nücke 2022-01-26 00:18:52 +01:00
  • ba3bc7776c Add never called overrides with exception for clarity. Florian Nücke 2022-01-26 00:16:07 +01:00
  • ded98fc652 Fixed synthetic devices being collected from sides that should not collect devices. No real effect (ignored in method gathering because empty), but still unnecessary clutter. Florian Nücke 2022-01-26 00:14:46 +01:00
  • 5f892f2341 Fixed no bus scan being triggered when bus cable is placed after bus interface. Florian Nücke 2022-01-26 00:13:59 +01:00
  • 79ab0f08e0 Fix missing space in documentation. Florian Nücke 2022-01-26 00:12:37 +01:00
  • 929f13d240 fixup! Add option to clean up stuff (via unmount) when devices go missing. For block devices, this can happen when the block is broken while the computer is unloaded, for example. For items this is more esoteric, but it theoretically means items disappear while the container managing the item as a device is unloaded. Florian Nücke 2022-01-25 20:29:17 +01:00