Added State system,logic and commands for debugging. For setting region values. Outside of dev tools I wrote the command that the purchasing entities will call for a region
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { log } from "./core/log.js";
|
||||
import { load } from "./save/state.js";
|
||||
import { getState } from "./save/state.js";
|
||||
import "./core/commands.js"
|
||||
import {world} from "@minecraft/server";
|
||||
log("main.js loaded)");
|
||||
|
||||
/*
|
||||
Dynamic properties have to exist post worldLoad
|
||||
|
||||
1.9 -> 2.0 scripts now load before world load
|
||||
Grabbed data will throw an exception
|
||||
if we don't do things after worldLoad
|
||||
You can't serve a pizza if you don't have a pizza
|
||||
|
||||
Players, entities, blocks
|
||||
Time of day, Gamemode, difficulty
|
||||
*/
|
||||
world.afterEvents.worldLoad.subscribe(() => {
|
||||
load();
|
||||
console.log(JSON.stringify(getState()));
|
||||
});
|
||||
|
||||
//good for debugging gate values
|
||||
//console.log(JSON.stringify(getState()));
|
||||
Reference in New Issue
Block a user