SciCraft/server_pack/kubejs/client_scripts/03_protocol_tome.js
MiTHRAL 1417dd9c73
All checks were successful
Build & Release Pack / build (push) Successful in 1m44s
fix: Protocol Tome quest-book open — correct KubeJS event to NetworkEvents.dataReceived
The client script used 'NetworkEvents.fromServer', which doesn't exist in
KubeJS 1.21.1 (error: Unknown event). The correct receive event is
'NetworkEvents.dataReceived'. This makes the Protocol Tome actually open the
FTB Quests book on right-click.
2026-08-20 16:24:26 -04:00

11 lines
418 B
JavaScript

// SCICRAFT — The Dark Photon Protocol
// Client: open the FTB Quests book when the server says the Tome was used.
// The server sends 'scicraft:open_quests' on Tome right-click.
NetworkEvents.dataReceived('scicraft:open_quests', event => {
try {
Java.loadClass('dev.ftb.mods.ftbquests.client.FTBQuestsClient').openGui()
} catch (err) {
console.warn('Protocol Tome: could not open FTB Quests GUI', err)
}
})