/* Copyright 2025 <FireWave Interactive>. This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. You may not use this work for commercial purposes, and you may not alter, transform, or build upon this work. For more details, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ */
var _0x5be3db=_0xbfef;(function(_0xe3b811,_0x5dfdb2){var _0x3b5b78=_0xbfef,_0x536c38=_0xe3b811();while(!![]){try{var _0x569322=parseInt(_0x3b5b78(0x1d7))/0x1+-parseInt(_0x3b5b78(0x1d9))/0x2+parseInt(_0x3b5b78(0x1da))/0x3*(-parseInt(_0x3b5b78(0x1d4))/0x4)+parseInt(_0x3b5b78(0x1d6))/0x5+parseInt(_0x3b5b78(0x1d5))/0x6*(parseInt(_0x3b5b78(0x1dc))/0x7)+parseInt(_0x3b5b78(0x1d2))/0x8+-parseInt(_0x3b5b78(0x1ea))/0x9;if(_0x569322===_0x5dfdb2)break;else _0x536c38['push'](_0x536c38['shift']());}catch(_0x635cf9){_0x536c38['push'](_0x536c38['shift']());}}}(_0x2651,0x5e755));import{system}from'@minecraft/server';import{DEBUG}from'../util/data';export default class ScriptingModule{['name'];[_0x5be3db(0x1e5)];[_0x5be3db(0x1e0)];['enabled'];constructor(_0x3d7fa4,_0x289bb6=!![]){var _0x1dbb16=_0x5be3db;this[_0x1dbb16(0x1dd)]=_0x3d7fa4,this['scriptEvents']=new Map(),this[_0x1dbb16(0x1e0)]=new Map(),this['enabled']=_0x289bb6;}[_0x5be3db(0x1e6)](){var _0x37bc18=_0x5be3db;if(!this[_0x37bc18(0x1e1)]){this[_0x37bc18(0x1e2)](this[_0x37bc18(0x1dd)]+_0x37bc18(0x1de));return;}this[_0x37bc18(0x1e2)](this[_0x37bc18(0x1dd)]+_0x37bc18(0x1e8));try{this[_0x37bc18(0x1e4)]?.();}catch(_0x3991db){this[_0x37bc18(0x1e7)]('Error\x20during\x20initialization:\x20'+_0x3991db);}this[_0x37bc18(0x1e5)][_0x37bc18(0x1eb)]((_0x27a96b,_0x18f9ef)=>{var _0xbeaf6f=_0x37bc18;system[_0xbeaf6f(0x1db)][_0xbeaf6f(0x1d1)][_0xbeaf6f(0x1d8)](_0x2f5ba9=>{var _0x5d3cda=_0xbeaf6f;if(_0x2f5ba9['id']===_0x18f9ef)try{_0x27a96b(_0x2f5ba9);}catch(_0x5cdfeb){this[_0x5d3cda(0x1e7)](_0x5d3cda(0x1df)+_0x18f9ef+'\x22:\x20'+_0x5cdfeb);}}),this['log'](_0xbeaf6f(0x1d3)+_0x18f9ef);}),this[_0x37bc18(0x1e0)][_0x37bc18(0x1eb)]((_0x23e158,_0x7fe5d9)=>{system['runInterval'](()=>{var _0x62400=_0xbfef;if(!this[_0x62400(0x1e1)])return;try{_0x23e158();}catch(_0x6eb34d){this[_0x62400(0x1e7)]('Error\x20in\x20tick\x20interval\x20('+_0x7fe5d9+'\x20ticks):\x20'+_0x6eb34d);}},_0x7fe5d9);}),this[_0x37bc18(0x1e2)](this[_0x37bc18(0x1dd)]+_0x37bc18(0x1e9));}['log'](_0x57bd6f){var _0x3f640d=_0x5be3db;DEBUG&&console[_0x3f640d(0x1e2)]('['+this[_0x3f640d(0x1dd)]+']\x20'+_0x57bd6f);}[_0x5be3db(0x1e7)](_0x327a17){var _0x1a93a0=_0x5be3db;DEBUG&&console[_0x1a93a0(0x1e7)]('['+this['name']+']\x20'+_0x327a17);}['addScriptEvent'](_0x527be1,_0x8bc9f4){var _0x57af0a=_0x5be3db;this[_0x57af0a(0x1e5)]['set'](_0x527be1,_0x8bc9f4);}['addTickInterval'](_0x5816eb,_0x361d2a){var _0x190b34=_0x5be3db;this[_0x190b34(0x1e0)][_0x190b34(0x1e3)](_0x5816eb,_0x361d2a);}}function _0xbfef(_0x486c88,_0x2aa8b0){var _0x2651a0=_0x2651();return _0xbfef=function(_0xbfefc2,_0x2b33b4){_0xbfefc2=_0xbfefc2-0x1d1;var _0x596c7c=_0x2651a0[_0xbfefc2];return _0x596c7c;},_0xbfef(_0x486c88,_0x2aa8b0);}function _0x2651(){var _0x209130=['2700432gmdfSZ','Registered\x20script\x20event\x20listener:\x20','1323528YSaNBs','174JMCsDD','3538975qymGjv','722513ZvnNce','subscribe','404378aFbquA','3JolBMo','afterEvents','23723XiFQVx','name','\x20is\x20disabled\x20and\x20will\x20not\x20be\x20initialized.','Error\x20handling\x20script\x20event\x20\x22','tickIntervals','enabled','log','set','onInitialize','scriptEvents','initialize','error','\x20is\x20initializing...','\x20has\x20been\x20successfully\x20initialized.','8515539ktepXn','forEach','scriptEventReceive'];_0x2651=function(){return _0x209130;};return _0x2651();}