Florian Nücke
47904385c2
Fixed removing cable part not directly triggering bus scan.
...
Not *strictly* necessary, since for multiple connected cables, neighbors will trigger a scan, and for single cable on computer, computer will trigger a scan. But this is more robust in case these assumptions change in the future.
2022-02-06 13:33:14 +01:00
Florian Nücke
7698ee5bde
Small legacy naming fix.
2022-02-06 13:30:29 +01:00
Florian Nücke
0736cdc9a0
Remove unneeded call.
...
Keep it out after all...
2022-02-06 01:46:35 +01:00
Florian Nücke
6fbc455c2f
Add util record for describing chunk pos in a level.
...
Adjust block pos one to match (also use a weak level ref).
2022-02-06 01:45:38 +01:00
Florian Nücke
6ad13b9c02
Ignore removal if block entity was already unloaded.
...
Fixes computers losing their memory and such...
2022-02-05 17:49:10 +01:00
Florian Nücke
ce0c99b6e4
Guess we have to do it like this.
...
Since VM can trigger state change in VMDevices that's not observable, just flag everything dirty that's touched by the VM. Sure, theoretically VMDevices could be adjusted to have events when they change, but that would then also need to get synced back to main thread, yada yada. This seems... reasonable enough.
2022-02-05 15:46:23 +01:00
Florian Nücke
ad8082e056
Actually, that won't solve anything, so keep it out of the API for now.
2022-02-05 15:35:54 +01:00
Florian Nücke
814f9d37dd
Split up vm and rpc device packages.
2022-02-05 15:09:33 +01:00
Florian Nücke
6f7f0fa048
Similar to how it is for blocks now, allow providing devices as capabilities from items.
2022-02-05 14:40:16 +01:00
Florian Nücke
5ecafeba16
Make some devices properly tell their container they changed.
...
Item devices for computer/robot, so not strictly necessary, but for clarity.
2022-02-05 14:16:10 +01:00
Florian Nücke
2b3858bd14
Make computer not detecting devices explicit.
2022-02-05 14:06:45 +01:00
Florian Nücke
581994327d
Make item bus element update logic read a bit more similar to block one.
2022-02-05 13:58:10 +01:00
Florian Nücke
73d43ee254
Add API to give devices a reference to their context, to flag stuff as dirty e.g.
2022-02-05 13:21:19 +01:00
Florian Nücke
3719e01447
Cleaned up bus element implementations a little, to straighten the logical flow.
2022-02-05 13:14:48 +01:00
Florian Nücke
364f5ff83f
Util method for no-op runnable.
2022-02-05 13:09:16 +01:00
Florian Nücke
83023715a1
Use nice names for samplers.
2022-02-05 11:16:26 +01:00
Florian Nücke
3351b036d6
Return device as capability for disk drive and projector.
2022-02-04 21:15:21 +01:00
Florian Nücke
0d62751110
Always use relative pos to main camera to reduce precision errors.
2022-02-04 19:35:04 +01:00
Florian Nücke
68d6dc85f6
Fix numeric key evdev mapping.
2022-02-04 16:42:08 +01:00
Florian Nücke
2b9b2399f5
Add overlay for keyboard screen, hide hotbar. Improve input handling.
2022-02-04 16:41:31 +01:00
Florian Nücke
5e605c3400
First draft for the keyboard block.
2022-02-04 13:19:36 +01:00
Florian Nücke
c0268cb6e1
Check bus block entity validity while screen is open.
2022-02-04 10:23:58 +01:00
Florian Nücke
1c7da6835b
Sorted some things.
2022-02-04 10:23:09 +01:00
Florian Nücke
781670b47c
Fix keyboard deserialization.
2022-02-04 09:30:41 +01:00
Florian Nücke
04ee0bc582
Fix not sending frame to client when they start observing a projector that's not changing.
2022-02-03 21:58:26 +01:00
Florian Nücke
c1679223bd
Add SPDX header.
2022-02-03 21:42:17 +01:00
Florian Nücke
5e9dd1a4e5
Organize imports.
2022-02-03 21:33:04 +01:00
Florian Nücke
e28370ae1c
Make projector emit some light while projecting something.
2022-02-03 21:24:20 +01:00
Florian Nücke
2b368cab05
Don't render projection if there's no way player can see it (too far in front of projector).
2022-02-03 20:22:03 +01:00
Florian Nücke
85363b8835
Add recipe for projector block.
...
Adjusted a few other recipes.
2022-02-03 19:55:56 +01:00
Florian Nücke
29b1d4eb08
Fix data generator breaking because apparently that's CLIENT side.
2022-02-03 19:37:24 +01:00
Florian Nücke
9af06ea459
Ensure client-side event listeners are only added on client.
2022-02-03 19:27:33 +01:00
Florian Nücke
fe2fdc9391
Make sides and front of projector non "solid" to avoid torch placement and such.
2022-02-03 19:11:44 +01:00
Florian Nücke
0f2c34f287
Don't do stuff with the VM in computers on client side.
2022-02-03 17:32:55 +01:00
Florian Nücke
4c4385f0ec
Don't do stuff with the VM in robots on client side.
2022-02-03 17:31:33 +01:00
Florian Nücke
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.
2022-02-03 17:31:14 +01:00
Florian Nücke
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.
2022-02-02 02:08:01 +01:00
Florian Nücke
ee232dc049
Disable projection when occluded.
2022-02-02 01:33:16 +01:00
Florian Nücke
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.
2022-02-02 01:06:09 +01:00
Florian Nücke
2361a84b8e
Use actual projection rendering for projectors.
2022-02-01 20:18:55 +01:00
Florian Nücke
59a3a2b127
Trying to render level for projector depth.
2022-01-30 15:19:40 +01:00
Florian Nücke
3e2914ba9e
Use annotations to register event listeners.
2022-01-30 15:19:40 +01:00
Florian Nücke
539beb4e0f
Being reasonable is boring.
2022-01-30 15:19:40 +01:00
Florian Nücke
2f7b044b00
Fixed facing check.
2022-01-30 15:19:39 +01:00
Florian Nücke
c61c9f4b6b
Small rename.
2022-01-30 15:19:39 +01:00
Florian Nücke
a1a1f3e887
Render no border without wonky GL settings.
2022-01-30 15:19:39 +01:00
Florian Nücke
8f89d318d4
Projector block.
2022-01-30 15:19:39 +01:00
Florian Nücke
d6a93605a8
Fix devices not being released when computer is destroyed while running.
2022-01-30 15:10:21 +01:00
Florian Nücke
ab69c6977a
Fixed disk drives being read-only. Fixes #103 .
2022-01-30 14:44:47 +01:00
Florian Nücke
f8899d361e
Update Forge and simplify mixin stuff.
2022-01-28 18:33:20 +01:00