Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows placing pocket computers on lecterns. The terminal is rendered to all nearby players, and right clicking opens the off-hand pocket GUI. Fixes #1912.
I'd originally marked this as 1.21.4 only, as it requires some API changes (
getEntity
is now always nullable. This was always the case, but some mods relied on it being non-null when an upgrade's peripheral is created). I've changed my mind, and we're going to do it on 1.20.1 and deal with the consequences.Currently marking as draft for a couple of reasons:
It looks bad. There's no pixel consistency, and it's so flat!!!!! I don't know what to do about this — the correct thing would be to have a custom model (like we do for printouts), but we'd also need the model to be resizeable, and I'm not sure how feasible that is.
We should only render the terminal when the player is close (16 blocks?, maybe make this configurable?). OC did a nice thing where it faded in the terminal, to avoid pop-in.
We could also avoid broadcasting the terminal to distant players. However, this makes the player tracking in the pocket computer significantly more complicated, so I think we should skip for now, and deal with it if it becomes an issue.