-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic NFC Modem functionality for Pocket Computer #1689
base: mc-1.20.x
Are you sure you want to change the base?
Conversation
Feedback
Does it really need to implement as separate logic? I mean if this was just a normal wireless modem it would work with all already written code (and rednet).
We could achieve same effect just by not allowing messages from this modem to be heard on range over 1 block. Not sure how feasible that would be to invert this bit of message networking logic but it might be less complicated then creating completely new system. SuggestionI would suggest increasing range to 1 block to allow near range communication |
setLocation(access); | ||
|
||
var state = getModemState(); | ||
if (state.pollChanged()) access.setLight(state.isOpen() ? 0xf39d20 : -1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Traditionally only main peripherals set light status. This might look odd if this one and back peripheral will both try to set different colours.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, not sure how to address it though. Color blending? Blinking between the two colors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5c67b6c is my attempt at addressing this, the light slowly cycles between the two active colors
This is true, in that case I won't implement list entries 1, and 3.
IMO, the objective here is strictly to have a means to transmit messages contained within the player's inventory. If it's desired to have out-of-inventory communication, then that's when you'd attach a wireless modem. |
Personally I'd say 2 blocks. Depending on where the range is checked from, you may end up in situations like the following: (assuming it checks from the feet) Where gray is range of 1, purple is range of 2. If it checks from the feet, a computer at head-height beside the player would be out of range with a range of 1, even if you stood right beside it. Having a 2 block range would fix that. (Please ignore my great drawing skills, not at a PC at the moment so all I have is my phone's notes app) |
I see your point. And in the end if someone really wanted long range modem communication they could just carry a wireless pocket that would repeat messages between wireless modem and this inner modem. I just think that combining this with short range (1-block) mode from #1688 would provide more wide game play possibilities. Like sneakernet or pokemon style pocket gaming.
If i remember right CC modems transmit from eyes of player. |
I agree, I just don't think it's in the scope of this PR, and more-so something that should be added onto wireless modems like proposed in the referenced issue. |
tested as functional in multiplayer
Latest commit isolates networks on a per-entity basis, preventing sniffing from ender modems. |
Slowly cycles between the orange NFC modem color, and the color set by the back peripheral if both are active.
Demonstration of the light cycle effect: 2024-01-19.23-44-33-00.00.09.437-00.00.28.044.mp4This is a bit extreme, but I thought it would be interesting to see what it looks like and field discussion from there. |
Attaches a 0-block radius "NFC" wireless modem to the top of the pocket computer. This is done to address the core issue presented in both #1406 and #1688.
TODO:
Rename peripheral type to "nfc"Rename transmission events to "nfc_message"Feedback would be greatly appreciated on this to do list, specifically whether any/all of the items should actually be done.