All checks were successful
Build & Release Pack / build (push) Successful in 1m44s
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.
11 lines
418 B
JavaScript
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)
|
|
}
|
|
})
|