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
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
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
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
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
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
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
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
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
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