-
Notifications
You must be signed in to change notification settings - Fork 18
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
Possibility to explicitly allow players to interact with seats on Create contraptions #486
Comments
It could get annoying to try to implement something like this. I'd probably have to disable the general entity protection for trains and protect every individual train interaction type other than with seats. Which means I'll have to keep track of every new type of interaction added to Create in the future, and no longer support many modded interaction types by default. |
Thanks, a very comprehensive response. I guess we have to ask Create authors to add specific seat embarking packet (similar to train controls packet) to be able to seamlessly implement OPAC protection for this. |
What is interesting for me - is the mechanism of determining a tile entity inside a carriage contraption, and how create allows us to open chests and more on a moving train. At first, I thought it was a kind of entity -> tile-entity redirection of interacting actions. But looking through code with a glance - didn't help :( |
If I remember correctly, the contraptions are basically their own "worlds". When you interact with one, I think it converts your position and rotation into the contraption's "world's" space and raytraces for blocks the same way it would in a regular world. They could actually allow all blocks to work inside contraptions, I'm not too sure why only specific hard-coded interactions are allowed. It's most likely for performance reasons though. |
Maybe we can do something from another perspective? The only thing that is basically needed to be protected - is a conductor and its schedule. I tried conductor from Steam and rails, and somehow, it bypasses the strict chunk access to contraption. On the other side, the blaze burner conductor is protected by OPAC. Maybe it is possible to target only conductor entity? |
It seems that any entity sat as a conductor to train bypasses the chunk protection. I used parrot as train operator, and I can freely grant a train schedule to it, bypassing the OPAC. |
Are you sure you didn't disable the protection for those entities? I decided to take a look at the contraption protection code again and realized that Create is using a custom packet for that, not regular entity interaction. And the packet contains the local coordinates of the block inside the contraption. So it actually shouldn't be too difficult to separate protection for seats, surprisingly. |
As for interacting with conductors, I think I might have missed another custom packet there. |
To explain this a little further. I basically forgot that in-contraption block interactions don't work through normal entity interaction, so I don't have to disable protection for that, so none of the problems I was worried about matter. |
Great news! Will be patiently waiting for new builds. |
Just to keep you informed, new issue have been created: #487 |
Hi again! As long as conductor entity protection has been fixed for Arclight, Ive found some corresponding issue with train controls. When you allow access for players to interact with train contraption entity - the train controls are available for players, hence, any player may interrupt the programmed schedule. Is it possible to separate train controls operations, train replacement (and any other packet-based interaction) exclusively from the entity protection? To be exact, making a specific setting in the claim config. Thanks again for your input! |
Basically, that`s the only issue (I hope the are no more of them under the hood) that disrupts the idea of safe public train system on multiplayer servers. 😁 |
I think I can drop the entity protection altogether when right click interacting with the contraption. If all goes well you'll be able to add train controls and seats as block exceptions instead. |
That would be great! Looking forward to try that workaround |
Hi! Just asking if you managed to add the aforementioned functionality 😉 The train controls remain unprotected, while seats are available for interacton |
Hello! I`ve found, that it is impossible to explicitly allow players to interact ONLY with Create contraption seat (e.g Train from server-claimed metro system).
If I do allow to interact with create:carriage_contraption - players can now grief the trains` schedule or intercept train controls.
When the interaction with train entity is prohibited - train schedule is secured, but players can not embark onto the train, and may fall out due to server ping or whatever reasons. I think it is vital to Create trains to embark players in place in order to sync the movement of the player and train contraption.
Is it (technically) possible to allow to interact with specific part of contraptions like seats?
Thanks in advance.
The text was updated successfully, but these errors were encountered: