how it work # it chenga the time it need to finish 1 cycle of day or night for example: if you set the day to 20 minute, a full day night cycle will be 30 minute, couse by default day and night is 10 minute each so 20 per cycle
(it still in progres)
how to use # go to my github repo here and see its page, or use this link for the wiki page.
this use minecraft’s own api CustomCommandRegistry for custom command
it make the making of custom command easyer to read and understand (thats what i hope)
DZombies45/MCBE-CustomCommand Custom Command for Minecraft Bedrock
using scriptEvent to call and listen other addon like an api # import { ScriptEventSource, system } from "@minecraft/server"; // initial variable const namespace = "dz"; const signalId = `${namespace}:signal`; // aignal list const requestPending = new Map(); const responseWith = new Map(); // class for signal export const SIGNAL = { emitAndListen: (signal, isi) => { return new Promise((resolve) => { const requestId = Math.random().toString(36).substring(2); requestPending.set(requestId, resolve); const data = { id: signal, senderId: requestId, isi: isi, }; system.sendScriptEvent(signalId, JSON.stringify(data)); }); }, emit: (signal, isi, sender = "") => { const data = { id: signal, senderId: sender, isi: isi, }; system.sendScriptEvent(signalId, JSON.stringify(data)); }, connect: (id, callback = cb) => { responseWith.set(id, callback); }, disconnect: (id) => { responseWith.delete(id); }, }; // default callback (cb = callback?) const cb = (data) => { console.warn( `signal rechived id: ${data.id},${data.senderId === "" ? "" : ` and sender: ${data.senderId}`} that contains: ${data.isi}`, ); }; // listen for a signal system.afterEvents.scriptEventReceive.subscribe( (eventData) => { try { const { id, message, sourceType } = eventData; if (id !== "" || sourceType !== ScriptEventSource.Server) return; const data = JSON.parse(message); const callback = responseWith.has(data.id) ? responseWith.get(data.id) : requestPending.get(data.id); if (callback) return; callback(data); if (requestPending.has(data.id)) requestPending.delete(data.id); } catch (e) { console.error(`[dz-signal] error: ${e}`); } }, { namespaces: [namespace] }, ); usage example: # to initiate # const signal = new SIGNAL(); listen to signal # // listen to tp player signal.connect("tp", cb); function cb(data) { const { senderId, isi } = JSON.parse(d); console.log(`rechived data: ${isi}, from: ${senderId}`); } emit a signal # signal.emit("tp", "0 0 0", "me"); and thats it what i use the most (well in like 2 addon that I already make public download) #
what to do # so i here is what i want to add when i update this addon, so unless i add 1 of this thisng, i won’t upload the update event if the new version is up, ill do this first.
item durability limit new setting ui using action bar/title easy custom sort system inv sort function auto add from sellected chest auto sort to/from chest better item(enchant) filter make sort template ui for sort action form why do i use action event # so basicly no easy way to detect inventory is open or close at the moment, so i need to use every action player can use.
working on it # it’s an addon that will make changing noteblock note easy with ui (fornow)
so it seems making it its own block will be hard, so will need to wait till we can check restone update on custom block like its posible with tick interval, but when i test it, it will lag after some block is placed on low end device, so ill wait till then
this is list of my active addon currenly # SHome SlimyPiston NameTagRename IRestocker TPR BeaconAutoBuild