Roblox/Minecraft server link: Difference between revisions

From ihaveahax's Site
Jump to navigationJump to search
no edit summary
(Created page with "I once created a very simple link between a Roblox and Minecraft Java game server. It only reported positions from the Minecraft world to Roblox. Later I made something that c...")
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
I once created a very simple link between a Roblox and Minecraft Java game server. It only reported positions from the Minecraft world to Roblox. Later I made something that could return chunks from the world but the code for that is buried somewhere.
I once created a very simple link between a Roblox and Minecraft Java game server. It only reported positions from the Minecraft world to Roblox. Later I made something that could return chunks from the Minecraft world and recreate it in Roblox but the code for that is buried somewhere. (Maybe it would be more efficient these days due to parallel Luau!)


The Minecraft side uses the [https://methodscript.com/ CommandHelper] plugin, which uses the MethodScript language.
The Minecraft side uses the [https://methodscript.com/ CommandHelper] plugin, which uses the MethodScript language.


This does NOT work on a live Roblox server since it expects there to be little to no latency (it doesn't deal with this well). And Roblox may not like the high volume of HTTP requests going out.
This does NOT work on a live Roblox server since it expects there to be little to no latency (it doesn't deal with this well). And Roblox may not like the high volume of HTTP requests going out. It also does not filter Minecraft usernames, which would not work that well anyway.


* [https://www.youtube.com/watch?v=9LZulfFOEvA Video on YouTube]
* [https://gist.github.com/ihaveamac/489fe85276917a4ae7e364c4de3d25e9 Original gist]
* [https://gist.github.com/ihaveamac/489fe85276917a4ae7e364c4de3d25e9 Original gist]


Line 38: Line 39:
* Workspace
* Workspace
** MCCurrentPlayers (Folder)
** MCCurrentPlayers (Folder)
* ServerStorage
* ServerScriptService
** MCServerLink (Folder)
** MCServerLink (Folder)
*** HttpHandler (Script)
*** HttpHandler (Script)
*** PlayerHandler (Script)
*** PlayerHandler (Script)
* ServerStorage
** MCServerLink (Folder)
*** MakeRequest (BindableEvent)
*** MakeRequest (BindableEvent)
*** PlayerAdded (BindableEvent)
*** PlayerAdded (BindableEvent)
Line 49: Line 52:


=== ServerScriptService.MCServerLink.HttpHandler ===
=== ServerScriptService.MCServerLink.HttpHandler ===
Makes a request to the server roughly every 1/6th of a second, making up to 360 requests per minute.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
local HttpService = game:GetService('HttpService')
local HttpService = game:GetService('HttpService')

Navigation menu