Commit Graph

  • 8c7c314403 Allow getRedstoneOutput to be called from worker thread directly. Florian Nücke 2020-12-29 18:06:52 +01:00
  • d5e6afcaf7 Properly mark chunk dirty if computer inventory changes. Also update neighbors if this happens (batched, next frame), in case added/removed devices would affect neighbors. Florian Nücke 2020-12-29 18:06:30 +01:00
  • 381dc041fe Support RedstoneEmitter capability in computer. Florian Nücke 2020-12-29 17:33:45 +01:00
  • 5847a64aca Fix variable name. Florian Nücke 2020-12-29 17:33:25 +01:00
  • ba5dedaa2f Added capability for redstone output, inline registration. Florian Nücke 2020-12-29 17:33:04 +01:00
  • 4ab4da29e1 Return something even for exceptions with no message (e.g. NPEs). Florian Nücke 2020-12-29 17:32:32 +01:00
  • b7d03b911f Fix rpc devices getting lost after scan if devices did not change. Florian Nücke 2020-12-29 17:32:12 +01:00
  • d25301230a Custom serializer for Direction enum to support IStringSerializable names. Florian Nücke 2020-12-29 17:31:11 +01:00
  • ff8d2c8da6 Package shuffle. Rename base class for clarity, remove unnecessary intermediate class. Florian Nücke 2020-12-29 17:30:37 +01:00
  • 96c1b6ca25 Small rename. Florian Nücke 2020-12-29 17:27:39 +01:00
  • ced1fa4835 Proper transforms for cable and interface items. Florian Nücke 2020-12-29 17:27:24 +01:00
  • bb3c59d8a2 Removed unused capability. Florian Nücke 2020-12-29 12:54:30 +01:00
  • ab640cf3b9 Provide access to container tile entity/entity in item device queries part 2. Florian Nücke 2020-12-29 12:35:30 +01:00
  • cb74441946 Make local/global conversion return input instead of erroring if block state is not rotatable. Florian Nücke 2020-12-29 12:32:15 +01:00
  • 40e547ef4d Provide access to container tile entity/entity in item device queries. Florian Nücke 2020-12-29 12:31:36 +01:00
  • eaedaec727 Some documentation. Florian Nücke 2020-12-29 10:54:19 +01:00
  • 658f5a6d96 Added flash memory item. Moved firmware initialization to device. Added registries for firmwares and base block devices. Florian Nücke 2020-12-29 02:38:11 +01:00
  • 4c050e7a72 Added device type slot icon graphics. Florian Nücke 2020-12-28 17:54:18 +01:00
  • e2610e148f UI to toggle off computer, toggle full input capturing. Florian Nücke 2020-12-28 17:53:45 +01:00
  • ff08e2fb9b Added concept of slot types for item devices. Made slots in computer types. Florian Nücke 2020-12-28 15:04:20 +01:00
  • 35b67744cd Allow sneak-wrenching any block in the mod to break it. Move playSound for block break/place/etc to util method. Florian Nücke 2020-12-27 16:36:03 +01:00
  • c6d95fc55f Cleanup. Florian Nücke 2020-12-27 06:02:45 +01:00
  • 84a18383ca Fixed distance culling. Florian Nücke 2020-12-27 06:02:29 +01:00
  • 2f99ef3b84 Implemented rendering background. Florian Nücke 2020-12-27 05:58:54 +01:00
  • 5c7b4bcf99 Fixed time quota potentially growing over tick limit. Florian Nücke 2020-12-27 05:58:35 +01:00
  • adfda67edd Use real time RTC as main RTC to avoid issues with timeouts and such. Make available MC time via secondary RTC. Florian Nücke 2020-12-27 04:59:24 +01:00
  • b40dcd4669 Nicer computer inventory tooltip. Florian Nücke 2020-12-27 02:28:59 +01:00
  • f9dc54b32a Fixed computer starting. Florian Nücke 2020-12-27 02:28:48 +01:00
  • 08530a7258 Automatically close gui when computer stops. Florian Nücke 2020-12-27 02:28:31 +01:00
  • ffbf1f049c Avoid start/stop doing anything on client. Florian Nücke 2020-12-27 02:01:01 +01:00
  • 4084880916 Remove needing to sneak to start a computer. Florian Nücke 2020-12-27 01:59:15 +01:00
  • 39d7625d34 Un-invert if. Florian Nücke 2020-12-27 01:57:09 +01:00
  • 1e46b77091 Documentation. Florian Nücke 2020-12-27 01:53:57 +01:00
  • 15d85b2e66 Allow devices to provide an error message if they failed loading. Florian Nücke 2020-12-27 01:50:47 +01:00
  • 535e9cef79 Add tracking of and display of boot error messages. Florian Nücke 2020-12-27 01:43:32 +01:00
  • 3c6e9da0e4 Sneak right click for wrench to break computers. Florian Nücke 2020-12-26 23:25:19 +01:00
  • a21f70d0ff Removed check in tile entities. Florian Nücke 2020-12-26 23:24:48 +01:00
  • a072717b28 Pulled out common tile enity bus controller logic (checking for loaded/unloaded chunks to trigger scan). Florian Nücke 2020-12-25 20:17:00 +01:00
  • a3bd9445ff Changed method name for clarity and added missing callback on connection type change. Fixed bus connectivity check for bus scan traversal. Florian Nücke 2020-12-25 20:16:38 +01:00
  • 606add570d Add interface to allow bus elements to provide their location. Allows controller to centrally track chunk load/unload for scheduling scans. Florian Nücke 2020-12-25 20:15:48 +01:00
  • cc6572aecb Small rename. Florian Nücke 2020-12-25 20:15:14 +01:00
  • 054101d5ea Added chunk load scheduling/listening. Made chunk load/unload listening based on world+pos instead of chunk instance. Florian Nücke 2020-12-25 20:14:18 +01:00
  • 9d1e53bd48 Added vm subclass for computer tile entity, moved local default devices into that. Florian Nücke 2020-12-25 20:11:46 +01:00
  • 77fe8c9ab3 Hard cache capabilities returned from base tile entity. Otherwise they may get cleaned up even though they have registered listeners. Florian Nücke 2020-12-25 20:10:30 +01:00
  • db319fa933 Moved all of TE lifecycle management into base class. Added simplified way of subclasses to offer capabilities. Florian Nücke 2020-12-25 16:19:52 +01:00
  • be68df4f8c Fixed test. Florian Nücke 2020-12-25 08:06:40 +01:00
  • 2a3878b0a9 Improve cable item transforms. Florian Nücke 2020-12-25 07:57:49 +01:00
  • 5f85d5d9bc Split reading documentation into separate request to speed up device detection. Florian Nücke 2020-12-25 07:57:33 +01:00
  • 8943a437b8 Fixed cable connectivity/scanning. Florian Nücke 2020-12-25 07:56:49 +01:00
  • 6e5cb5efe9 When loading any device fails, also release resources of already successful devices. Avoids still-loading devices blocking resources, potentially leading to such devices blocking each other from loading. Florian Nücke 2020-12-25 05:53:50 +01:00
  • a51e434dde Generalize. Florian Nücke 2020-12-25 05:52:23 +01:00
  • b7b1dd9b3d Allow providing an override for device default addresses. Allows assigning fixed addresses to guarantee order. Florian Nücke 2020-12-25 05:51:58 +01:00
  • c9025ccd66 Container logic for computer block. Different ram and hdd sizes. Florian Nücke 2020-12-25 04:17:10 +01:00
  • 52df43811f Cleanup and constant shuffling. Florian Nücke 2020-12-25 00:44:07 +01:00
  • 9c3bbcde05 Make stuff drop stuff. Florian Nücke 2020-12-25 00:31:49 +01:00
  • 9f76383313 Add item for bus interfaces and wrench. Florian Nücke 2020-12-25 00:31:01 +01:00
  • c557a009df Don't scan neighbors if face should not be connectable. Florian Nücke 2020-12-21 23:23:25 +01:00
  • c94d6b1529 Call super method for consistency. Florian Nücke 2020-12-21 23:22:15 +01:00
  • 4f5c9673a1 Somehow the generated stuff sneaked in. Florian Nücke 2020-12-21 23:22:01 +01:00
  • a5054736ac Make unload of computers only suspend devices, only unload in destroy. Avoids persisted data getting killed when it shouldn't. Florian Nücke 2020-12-20 21:36:50 +01:00
  • 4ba5009aae Added missing package info. Florian Nücke 2020-12-20 20:59:21 +01:00
  • 40e1f98a71 Cleaned up chunk init in computer, avoid potential NRE in netcode when being unloaded again very quickly. Florian Nücke 2020-12-20 20:19:31 +01:00
  • e7892efca8 Computer tiles now also get cleaned up properly on world unload. Needed to properly unload all devices, always. Avoids warnings of leaked allocation on shutdown, but more importantly avoids memory leaking when running a multi-world game where worlds may repeatedly be loaded and unloaded. Florian Nücke 2020-12-20 20:18:53 +01:00
  • f641b7b60c Split up providers by context/query type after all. Added logic to allow item devices to store data to their stack and load it back when first initialized. Florian Nücke 2020-12-20 04:51:38 +01:00
  • 556ae0cf6e Use provider registry name as serialization key. Florian Nücke 2020-12-19 12:54:46 +01:00
  • 41d06e84e1 Update Forge. Florian Nücke 2020-12-19 12:54:15 +01:00
  • 9a887c1159 Fixed allocation stacktrace logging. Florian Nücke 2020-12-19 12:53:32 +01:00
  • 591323f091 Javadoc fix. Florian Nücke 2020-12-19 12:45:46 +01:00
  • d634897dbd Move memory device class to own file. Florian Nücke 2020-12-19 12:14:17 +01:00
  • fd926531a7 Just use mod id as top level item tag container. Florian Nücke 2020-12-19 12:14:04 +01:00
  • 6379bf9f62 Added custom registry for providers, removed IMC. Florian Nücke 2020-12-19 12:10:12 +01:00
  • 907f4fea9a Moved initialization and storage of registry objects to separate classes. Florian Nücke 2020-12-19 12:06:28 +01:00
  • 32d3d3ada3 Expose memory allocation sandboxing through VMContext. Florian Nücke 2020-12-19 03:23:48 +01:00
  • e035aa6971 Apply deletes in blob storage immediately. We can already go out of sync with world saves anyway, because we need to write persistent data to disk when unloading devices due to computers shutting down, so just go all in here. Makes it much less likely to have zombie blobs, too. Florian Nücke 2020-12-19 03:02:28 +01:00
  • 8cafbfc49f Add support for NBT-based custom HDD items. In particular, add ones with a named "base" block device, for now just one with the linux root fs. Using this to replace the hardcoded always present one. Florian Nücke 2020-12-19 03:01:16 +01:00
  • 64d9939f82 Small rename. Florian Nücke 2020-12-19 02:59:58 +01:00
  • 5fcd5a6a3c Moved some utilities to Sedna. Florian Nücke 2020-12-18 19:36:42 +01:00
  • 7ce0eccd43 Support nested arrays in serialization. Florian Nücke 2020-12-18 19:35:24 +01:00
  • 17e54fdbb9 Added block device as hard drive item. Florian Nücke 2020-12-16 10:22:18 +01:00
  • 461aa86bb6 Report inner interrupt controller as identity for managed one. Florian Nücke 2020-12-16 10:22:00 +01:00
  • 01bdb6dda0 Cleanup. Florian Nücke 2020-12-16 10:21:01 +01:00
  • c1a2217013 Add utility input and output streams wrapping byte buffers. Florian Nücke 2020-12-15 23:30:38 +01:00
  • 3da9c8c073 Use a global context for registering "hardwired" devices for consistency. Florian Nücke 2020-12-15 23:30:19 +01:00
  • ec3cacd57e Fixed allocation limiter. Florian Nücke 2020-12-15 09:04:25 +01:00
  • 9fc02d0bc2 Organize imports. Florian Nücke 2020-12-15 04:39:28 +01:00
  • 6cc23bf569 Made unload a lifecycle event. Florian Nücke 2020-12-15 04:39:05 +01:00
  • 5a57938cb5 Switch from hardcoded ram to item ram and add support for lifecycle events in computer tile entity. Florian Nücke 2020-12-15 04:27:27 +01:00
  • 4f24813bea Added ram item device. Florian Nücke 2020-12-15 04:26:50 +01:00
  • 0c8fa36de9 Simple interface for some VM lifecycle hooks. Florian Nücke 2020-12-15 04:26:30 +01:00
  • 61f02834f1 Moved device unload call to vm reset. Florian Nücke 2020-12-15 04:25:23 +01:00
  • 20c74e7592 Base class for item driver providers. Florian Nücke 2020-12-15 04:24:14 +01:00
  • 3dfaa8f4aa Moved facing translation to utility class. Florian Nücke 2020-12-15 04:23:20 +01:00
  • 61ed1857da Fixed grouped device tracking. Florian Nücke 2020-12-15 04:22:47 +01:00
  • a26f639e5f Serialize to fresh tag to avoid old data leaking over. Florian Nücke 2020-12-15 04:22:24 +01:00
  • e6d3316ae1 Fixed method name. Florian Nücke 2020-12-15 04:21:39 +01:00
  • abe7f928fb Make item stack accessible in item query. Florian Nücke 2020-12-15 04:21:06 +01:00
  • 3523425066 Fixed potential NPE. Florian Nücke 2020-12-15 04:20:32 +01:00
  • 99eecb3ddc Try harder to clean up deleted blob storage entries. Florian Nücke 2020-12-15 04:19:35 +01:00
  • dd6e60a675 Compress blob storage entries. Florian Nücke 2020-12-15 04:19:14 +01:00
  • a29015324e Adjust status blinking, include incomplete/scanning bus status. Florian Nücke 2020-12-14 16:31:58 +01:00