fix: singleplayer join crash (mekanismcovers sodium mixin) + KubeJS/LootJS API migration
All checks were successful
Build & Release Pack / build (push) Successful in 1m40s
All checks were successful
Build & Release Pack / build (push) Successful in 1m40s
FATAL fix — mekanismcovers Sodium mixin crash: - mekanismcovers 1.3-BETA targets an old Sodium BlockRenderer API that doesn't exist in Sodium 0.8.13 → 'No refMap loaded' InjectionError. - Add config/mekanismcovers.json with disableAdvancedCoverRendering=true (the mod's documented workaround for Sodium/Iris/Embeddium crashes). Also set enableShaderCompatibleRendering=true. KubeJS 2101.x API migration (global assignment no longer allowed): - Remove 00_lore.js (it only set global.SCICRAFT, which is now forbidden) - Inline the config object into 01_corruption_tide/02_events/03_recipes (global.SCICRAFT → local const SC per script) - Remove unused 'const SC = global.SCICRAFT' from registry_blocks.js LootJS 3.x API migration: - addEntityLootModifier → addEntityModifier (04_loot.js, 7 call sites) Pack validates: client 140 / server 118 mods, 57 story keys.
This commit is contained in:
parent
bc83e93d05
commit
2fdd487786
13 changed files with 88 additions and 90 deletions
4
client_pack/config/mekanismcovers.json
Normal file
4
client_pack/config/mekanismcovers.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"disableAdvancedCoverRendering": true,
|
||||
"enableShaderCompatibleRendering": true
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
// SCICRAFT — The Dark Photon Protocol
|
||||
// CONFIG OBJECT. Text lives in STORY/*.md (generated into en_us.json) —
|
||||
// never hardcode story strings here. /reload after editing.
|
||||
|
||||
global.SCICRAFT = {
|
||||
items: {
|
||||
photon_core: 'scicraft:photon_core',
|
||||
photon_fragment: 'scicraft:photon_fragment',
|
||||
void_stabilizer: 'scicraft:void_stabilizer',
|
||||
quantum_lattice: 'scicraft:quantum_lattice',
|
||||
renegade_glass: 'scicraft:renegade_glass'
|
||||
},
|
||||
|
||||
tide: {
|
||||
// Global corruption level, shared by all players.
|
||||
// Rises while Doors go unsealed; falls when the Lattice is fed.
|
||||
key: 'scicraft_corruption',
|
||||
min: 0,
|
||||
max: 100,
|
||||
rise_per_tick: 1200, // +1 every 60s of neglect
|
||||
seal_reduction: 15, // -15 per Lattice seal
|
||||
darkness_threshold: 30, // darkness effect starts here
|
||||
darker_threshold: 60, // hostile spawns ramp here
|
||||
message_at: [30, 60, 85] // warning messages at these levels
|
||||
},
|
||||
|
||||
dimensions: {
|
||||
// Where the Darker pour through.
|
||||
void_dim: 'thevoiddimension:overworld',
|
||||
darker_dim: 'deeperdarker:otherside',
|
||||
dimensional_doors: 'dimensionaldoors:limbo'
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,22 @@
|
|||
// GLOBAL CORRUPTION TIDE. Shared by all players via server persistent data.
|
||||
// Rises while the Doors stay unsealed. Re-seal them at the Lattice to push it back.
|
||||
|
||||
const SC = global.SCICRAFT
|
||||
const SC = {
|
||||
items: { quantum_lattice: 'scicraft:quantum_lattice' },
|
||||
tide: {
|
||||
key: 'scicraft_corruption',
|
||||
min: 0,
|
||||
max: 100,
|
||||
rise_per_tick: 1200,
|
||||
seal_reduction: 15,
|
||||
darkness_threshold: 30,
|
||||
darker_threshold: 60
|
||||
},
|
||||
dimensions: {
|
||||
void_dim: 'thevoiddimension:overworld',
|
||||
darker_dim: 'deeperdarker:otherside'
|
||||
}
|
||||
}
|
||||
const T = SC.tide
|
||||
|
||||
function getTide(server) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,16 @@
|
|||
// SCICRAFT — The Dark Photon Protocol
|
||||
// Player-side lore events: the Resonance, void exposure, and held-item powers.
|
||||
|
||||
const SC = global.SCICRAFT
|
||||
const SC = {
|
||||
items: {
|
||||
photon_core: 'scicraft:photon_core',
|
||||
void_stabilizer: 'scicraft:void_stabilizer'
|
||||
},
|
||||
dimensions: {
|
||||
void_dim: 'thevoiddimension:overworld',
|
||||
darker_dim: 'deeperdarker:otherside'
|
||||
}
|
||||
}
|
||||
|
||||
// Proto-Time-Lord: holding a Photon Core or Stabilizer lets you feel the seals.
|
||||
PlayerEvents.tick(event => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,15 @@
|
|||
// SCICRAFT — The Dark Photon Protocol
|
||||
// The Protocol's crafting chain. Soft-gates the story items behind mod content.
|
||||
|
||||
const SC = global.SCICRAFT
|
||||
const SC = {
|
||||
items: {
|
||||
photon_fragment: 'scicraft:photon_fragment',
|
||||
photon_core: 'scicraft:photon_core',
|
||||
void_stabilizer: 'scicraft:void_stabilizer',
|
||||
quantum_lattice: 'scicraft:quantum_lattice',
|
||||
renegade_glass: 'scicraft:renegade_glass'
|
||||
}
|
||||
}
|
||||
|
||||
ServerEvents.recipes(event => {
|
||||
// --- Photon Fragment: harvested from the Darker's own remains.
|
||||
|
|
|
|||
|
|
@ -4,22 +4,22 @@
|
|||
|
||||
LootJS.modifiers(event => {
|
||||
// The Warden — a creature of the Deep Dark, now answering the signal.
|
||||
event.addEntityLootModifier('minecraft:warden')
|
||||
event.addEntityModifier('minecraft:warden')
|
||||
.addLoot(LootEntry.of('scicraft:photon_fragment').setCount([1, 3]))
|
||||
|
||||
// Mutant Monsters — the corrupted remnants of the Flight's containment.
|
||||
event.addEntityLootModifier('mutantmonsters:mutant_zombie')
|
||||
event.addEntityModifier('mutantmonsters:mutant_zombie')
|
||||
.addLoot(LootEntry.of('scicraft:photon_fragment').setCount([1, 2]))
|
||||
event.addEntityLootModifier('mutantmonsters:mutant_skeleton')
|
||||
event.addEntityModifier('mutantmonsters:mutant_skeleton')
|
||||
.addLoot(LootEntry.of('scicraft:photon_fragment').setCount([1, 2]))
|
||||
event.addEntityLootModifier('mutantmonsters:mutant_enderman')
|
||||
event.addEntityModifier('mutantmonsters:mutant_enderman')
|
||||
.addLoot(LootEntry.of('scicraft:photon_fragment').setCount([2, 4]))
|
||||
|
||||
// Born in Chaos — the Darker's forward scouts.
|
||||
event.addEntityLootModifier('born_in_chaos_v1:dark_vortex')
|
||||
event.addEntityModifier('born_in_chaos_v1:dark_vortex')
|
||||
.addLoot(LootEntry.of('scicraft:photon_fragment').setCount(1))
|
||||
event.addEntityLootModifier('born_in_chaos_v1:dread_hound')
|
||||
event.addEntityModifier('born_in_chaos_v1:dread_hound')
|
||||
.addLoot(LootEntry.of('scicraft:photon_fragment').setCount(1))
|
||||
event.addEntityLootModifier('born_in_chaos_v1:nightmare_stalker')
|
||||
event.addEntityModifier('born_in_chaos_v1:nightmare_stalker')
|
||||
.addLoot(LootEntry.of('scicraft:photon_fragment').setCount([2, 3]))
|
||||
})
|
||||
|
|
@ -3,8 +3,6 @@
|
|||
// Names + tooltips come from the lang file (STORY/*.md → en_us.json).
|
||||
// Startup scripts: requires a full restart to apply.
|
||||
|
||||
const SC = global.SCICRAFT
|
||||
|
||||
StartupEvents.registry('item', event => {
|
||||
// Photon Core — the raw fifth-force crystal. Lattice fuel.
|
||||
event.create('scicraft:photon_core')
|
||||
|
|
|
|||
|
|
@ -1,33 +0,0 @@
|
|||
// SCICRAFT — The Dark Photon Protocol
|
||||
// CONFIG OBJECT. Text lives in STORY/*.md (generated into en_us.json) —
|
||||
// never hardcode story strings here. /reload after editing.
|
||||
|
||||
global.SCICRAFT = {
|
||||
items: {
|
||||
photon_core: 'scicraft:photon_core',
|
||||
photon_fragment: 'scicraft:photon_fragment',
|
||||
void_stabilizer: 'scicraft:void_stabilizer',
|
||||
quantum_lattice: 'scicraft:quantum_lattice',
|
||||
renegade_glass: 'scicraft:renegade_glass'
|
||||
},
|
||||
|
||||
tide: {
|
||||
// Global corruption level, shared by all players.
|
||||
// Rises while Doors go unsealed; falls when the Lattice is fed.
|
||||
key: 'scicraft_corruption',
|
||||
min: 0,
|
||||
max: 100,
|
||||
rise_per_tick: 1200, // +1 every 60s of neglect
|
||||
seal_reduction: 15, // -15 per Lattice seal
|
||||
darkness_threshold: 30, // darkness effect starts here
|
||||
darker_threshold: 60, // hostile spawns ramp here
|
||||
message_at: [30, 60, 85] // warning messages at these levels
|
||||
},
|
||||
|
||||
dimensions: {
|
||||
// Where the Darker pour through.
|
||||
void_dim: 'thevoiddimension:overworld',
|
||||
darker_dim: 'deeperdarker:otherside',
|
||||
dimensional_doors: 'dimensionaldoors:limbo'
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,22 @@
|
|||
// GLOBAL CORRUPTION TIDE. Shared by all players via server persistent data.
|
||||
// Rises while the Doors stay unsealed. Re-seal them at the Lattice to push it back.
|
||||
|
||||
const SC = global.SCICRAFT
|
||||
const SC = {
|
||||
items: { quantum_lattice: 'scicraft:quantum_lattice' },
|
||||
tide: {
|
||||
key: 'scicraft_corruption',
|
||||
min: 0,
|
||||
max: 100,
|
||||
rise_per_tick: 1200,
|
||||
seal_reduction: 15,
|
||||
darkness_threshold: 30,
|
||||
darker_threshold: 60
|
||||
},
|
||||
dimensions: {
|
||||
void_dim: 'thevoiddimension:overworld',
|
||||
darker_dim: 'deeperdarker:otherside'
|
||||
}
|
||||
}
|
||||
const T = SC.tide
|
||||
|
||||
function getTide(server) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,16 @@
|
|||
// SCICRAFT — The Dark Photon Protocol
|
||||
// Player-side lore events: the Resonance, void exposure, and held-item powers.
|
||||
|
||||
const SC = global.SCICRAFT
|
||||
const SC = {
|
||||
items: {
|
||||
photon_core: 'scicraft:photon_core',
|
||||
void_stabilizer: 'scicraft:void_stabilizer'
|
||||
},
|
||||
dimensions: {
|
||||
void_dim: 'thevoiddimension:overworld',
|
||||
darker_dim: 'deeperdarker:otherside'
|
||||
}
|
||||
}
|
||||
|
||||
// Proto-Time-Lord: holding a Photon Core or Stabilizer lets you feel the seals.
|
||||
PlayerEvents.tick(event => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,15 @@
|
|||
// SCICRAFT — The Dark Photon Protocol
|
||||
// The Protocol's crafting chain. Soft-gates the story items behind mod content.
|
||||
|
||||
const SC = global.SCICRAFT
|
||||
const SC = {
|
||||
items: {
|
||||
photon_fragment: 'scicraft:photon_fragment',
|
||||
photon_core: 'scicraft:photon_core',
|
||||
void_stabilizer: 'scicraft:void_stabilizer',
|
||||
quantum_lattice: 'scicraft:quantum_lattice',
|
||||
renegade_glass: 'scicraft:renegade_glass'
|
||||
}
|
||||
}
|
||||
|
||||
ServerEvents.recipes(event => {
|
||||
// --- Photon Fragment: harvested from the Darker's own remains.
|
||||
|
|
|
|||
|
|
@ -4,22 +4,22 @@
|
|||
|
||||
LootJS.modifiers(event => {
|
||||
// The Warden — a creature of the Deep Dark, now answering the signal.
|
||||
event.addEntityLootModifier('minecraft:warden')
|
||||
event.addEntityModifier('minecraft:warden')
|
||||
.addLoot(LootEntry.of('scicraft:photon_fragment').setCount([1, 3]))
|
||||
|
||||
// Mutant Monsters — the corrupted remnants of the Flight's containment.
|
||||
event.addEntityLootModifier('mutantmonsters:mutant_zombie')
|
||||
event.addEntityModifier('mutantmonsters:mutant_zombie')
|
||||
.addLoot(LootEntry.of('scicraft:photon_fragment').setCount([1, 2]))
|
||||
event.addEntityLootModifier('mutantmonsters:mutant_skeleton')
|
||||
event.addEntityModifier('mutantmonsters:mutant_skeleton')
|
||||
.addLoot(LootEntry.of('scicraft:photon_fragment').setCount([1, 2]))
|
||||
event.addEntityLootModifier('mutantmonsters:mutant_enderman')
|
||||
event.addEntityModifier('mutantmonsters:mutant_enderman')
|
||||
.addLoot(LootEntry.of('scicraft:photon_fragment').setCount([2, 4]))
|
||||
|
||||
// Born in Chaos — the Darker's forward scouts.
|
||||
event.addEntityLootModifier('born_in_chaos_v1:dark_vortex')
|
||||
event.addEntityModifier('born_in_chaos_v1:dark_vortex')
|
||||
.addLoot(LootEntry.of('scicraft:photon_fragment').setCount(1))
|
||||
event.addEntityLootModifier('born_in_chaos_v1:dread_hound')
|
||||
event.addEntityModifier('born_in_chaos_v1:dread_hound')
|
||||
.addLoot(LootEntry.of('scicraft:photon_fragment').setCount(1))
|
||||
event.addEntityLootModifier('born_in_chaos_v1:nightmare_stalker')
|
||||
event.addEntityModifier('born_in_chaos_v1:nightmare_stalker')
|
||||
.addLoot(LootEntry.of('scicraft:photon_fragment').setCount([2, 3]))
|
||||
})
|
||||
|
|
@ -3,8 +3,6 @@
|
|||
// Names + tooltips come from the lang file (STORY/*.md → en_us.json).
|
||||
// Startup scripts: requires a full restart to apply.
|
||||
|
||||
const SC = global.SCICRAFT
|
||||
|
||||
StartupEvents.registry('item', event => {
|
||||
// Photon Core — the raw fifth-force crystal. Lattice fuel.
|
||||
event.create('scicraft:photon_core')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue