This repository was archived by the owner on Jun 18, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Logical Sides and Ping Limitations
hammy3502 edited this page Mar 7, 2023
·
4 revisions
The API and all functions in it are fully capable of running on both sides. All data is synced from the client to the server and any actions you want to perform can be told to the client by the server without having to setup networking for it yourself!
However, since a server may be separate from a player in VR (this is any instance when a player either isn't in singleplayer or is joining a LAN world other than their own), any performed actions/data lookups may not be instant. With that in mind:
- It's recommended you do controller rumbles/haptics purely on the client side. This way, haptics sync up with whatever else your mod is doing, rather than hoping the packet that tells the controller to rumble syncs up with any other packets your mod may be sending.
- It's HEAVILY recommended to run most VR-code on the logical side. For example, if you're checking to see if a controller is inside of a block, run it only on the client side or the server side, not both.
- You should check
apiActive()to ensure that a player is running on both sides before executing code.
Logical Sides and Ping Limitations
VRPlayerTickEvent (Removed as of 2.0.0 Pre-Release 1)