CC: Tweaked

CC: Tweaked

59M Downloads

Add an ability to place pocket computers on lecterns

RainMew opened this issue ยท 6 comments

commented

Coming from create mod linked controller mechanic. Its would be nice to have this ability to use with the create contraptions and create: aeronautics ship controlls. So the idea is that you place PC on the lectern, and then if you press on it - it starts acting like normal PC in off-hand, but rendering screen on the lectern (accepting input from player, rendering on the lectern).

commented

Semi-related, but we should also allow placing printed books on lecterns. That should be a little easier to implement then pocket computers, and hopefully would set up a good foundation for later additions.

commented

Thanks for the suggestion!

I do really like this idea โ€” it's a fun and idiomatic way to integrate with vanilla mechanics. That said, I've been a little wary to add pocket-computers-on-lecterns in the past for a couple of reasons:

  1. It's a bit of a faff to implement, as pocket computers expect to be held by an entity, which would no longer be the case if they're in a lectern!
  2. I'm not entirely sure when they would be useful, compared to normal computers or monitors.

I think your suggestion of making them open the off-hand pocket UI would give them a pretty unique niche. I am a little worried about how intuitive that is โ€” it is a little different to standard lectern behaviour after all

We'd also need to have a way to remove the computer (normally you'd press "Take book" in the lectern, but that's no good if we open the off-hand UI). Could either punch the lectern to remove (like bedrock) or right click with an empty hand (like armour stands).

I guess an alternative approach would be to have right clicking open the normal computer UI, and shift-right-clicking with an empty hand would open the off-hand UI. That may be a little clunky though.

Thoughts welcome!

commented

In create picking linked controller from lectern is done by punching the lectern, so why not use same method.
So then it would work like this:
left click - take off the lectern
right click - open the off-hand UI

And to simplify rendering part it can just show PC on the lectern (make something like a book model), but without screen rendering, only off-hand UI

commented

Putting the pocket computer on a lectern would be useful if the lectern then acts like a modem. Then you could use it like a docking station to connect the pocket computer to a wired network.

commented

Sounds useful enough to me.

commented

It's a bit of a faff to implement, as pocket computers expect to be held by an entity, which would no longer be the case if they're in a lectern!

This is a bit more of a blocker than I'd originally thought. A lot of pocket upgrades (CC:T's included) assume the entity is present in order to get the level+position of the pocket computer, and so would crash if placed in a lectern. I've made changes to the API to remove this restriction (cbe075b), but to avoid breaking other mods, this probably means we have to wait until the next Minecraft version to actually implement this feature.