1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-11-05 09:36:19 +00:00
CC-Tweaked/projects
Jonathan Coates 2c59b9122b
Set location when creating a pocket modem
We now call getLevel() when attaching the peripheral, so need the
position to be available immediately. Fixes #1274.

I /think/ the entity should always be present, as peripherals are
only created on startup or when calling pocket.equipBack, both of which
require a player.[^1]

I suspect this was a little broken before (the level wouldn't be
available if a modem received a message before the position had
been set), but that would be much rarer.

I'm not 100% convinced about the thread-safety of this code (the writes
to level may not be immediately visible on other threads), so may need
to think about that.

[^1]: Note that when peripherals come to be /attached/ they may no
longer have a player (as there's a gap between turning a computer on and
it actually starting). However, the level/position will have been
initialised by then, so this isn't a problem.
2022-12-29 08:52:28 +00:00
..
common Set location when creating a pocket modem 2022-12-29 08:52:28 +00:00
common-api Some refactoring of mounts 2022-12-09 22:02:31 +00:00
core Prepare for 1.102.0 2022-12-24 10:51:54 +00:00
core-api Don't round trip values in executeMainThreadTask 2022-12-15 20:19:28 +00:00
fabric Fix crash on Fabric when attempting to use a non-fuel item as fuel. (#1275) 2022-12-29 08:22:09 +00:00
fabric-api Initial pass of the API breaking changes for 1.19.3 (#1232) 2022-12-03 15:02:00 +00:00
forge Update to latest Forge 2022-12-15 17:53:50 +00:00
forge-api Resolve a few TODOs 2022-12-03 15:55:48 +00:00
lints Add a couple of errorprone plugins 2022-11-10 08:54:09 +00:00
web Update project paths in our utility build scripts 2022-11-10 09:12:28 +00:00
ARCHITECTURE.md Fix some typos in ARCHITECTURE.md 2022-12-14 18:49:06 +00:00