Changelog
Fixes
Client Side
- Fixed all screens loading when players join the server! or a locally running singleplayer world! Now properly loads screens in a set distance via client configurations Had to implement a custom HandleUpdateTag Function in the TileEntityScreen Class! which properly checks by distance and handles based on such to still allow screens to render when you get in distance of them along with proper unloading and loading again when going back and forth out of range now!
New Configurations
Server Side
- enable_node option which by default is false if you have a express server running on localhost:30000 then you can potentially ping its location and relay its location if you package it with cloudflare domain or tunnel to the mod itself to relay to your connected clients on the server the location and replaces the http://%SERVER_LOCATION% placeholder with this https://subdomain.try.cloudflare.com while keeping whatever /following locations so you can open the index page on this cloudflare site and potentially relay a streaming video player that serves in livestream manner to your users to recreate cinematic experiences a little easier!
Note
- This nodeJS express server you may have to make yourself or look up some designs one key concept is the usage of this style routing point for the mod to properly get its location!
- OpenAI Explaination and NodeJs Code Snippet
Example code for a nodeJS express server to properly correlate with this mod!
const express = require('express');
const fs = require('fs');
const path = require('path');
const sqlite3 = require('sqlite3').verbose();
const cors = require('cors');
const { tunnel } = require("cloudflared");
const app = express();
const PORT = 30000;
let tunnelLocation = `http://localhost:${PORT}`;
function getTunnelDomain(){
return tunnelLocation;
}
//This is the main function to start up the cloudflare tunnel to expose this server publicly through a random location!
//Over https!
async function main(){
//This will server over http as cloudflare tunnels will handle the upgrading properly!
const { url, connections, child, stop } = tunnel({ "--url": 'localhost:30000' });
// show the url
console.log("LINK:", await url);
tunnelLocation = await url;
// wait for the all 4 connections to be established
const conns = await Promise.all(connections);
// show the connections
console.log("Connections Ready!", conns);
// stop the tunnel after 15 seconds
//setTimeout(stop, 15_000);
child.on("exit", (code) => {
console.log("tunnel process exited with code", code);
});
}
main();
//This Ping endpoint is very important! as it needs to return a json in the style of { url: "yourServerLocation" }
// For the Mod to properly relay and overwrite the http://%SERVER_LOCATION% placeholder
app.get('/ping', (req, res) => {
res.send(JSON.stringify({ url: getTunnelDomain() }));
})
Dependencies
90% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Metadata
Release channel
ReleaseVersion number
2.0.1-1.20.1Loaders
ForgeNeoForge
Game versions
1.20.1–1.20.4Downloads
512Publication date
April 7, 2024 at 7:02 AMPublisher
DBlockbuster
Member