const _0x1d2bc3=_0x55e9;function _0x55e9(_0x4cef3e,_0xab0eb5){const _0x169366=_0x1693();return _0x55e9=function(_0x55e9b4,_0xc96847){_0x55e9b4=_0x55e9b4-0x1e9;let _0x377a63=_0x169366[_0x55e9b4];return _0x377a63;},_0x55e9(_0x4cef3e,_0xab0eb5);}(function(_0x1aad5b,_0x4a771a){const _0xb7fbd9=_0x55e9,_0x40c010=_0x1aad5b();while(!![]){try{const _0x165c8e=parseInt(_0xb7fbd9(0x1f4))/0x1*(-parseInt(_0xb7fbd9(0x1ea))/0x2)+-parseInt(_0xb7fbd9(0x1f9))/0x3+parseInt(_0xb7fbd9(0x1fe))/0x4*(parseInt(_0xb7fbd9(0x1fa))/0x5)+-parseInt(_0xb7fbd9(0x1f1))/0x6+parseInt(_0xb7fbd9(0x1ee))/0x7*(-parseInt(_0xb7fbd9(0x1fb))/0x8)+-parseInt(_0xb7fbd9(0x201))/0x9*(parseInt(_0xb7fbd9(0x1ed))/0xa)+parseInt(_0xb7fbd9(0x1ef))/0xb;if(_0x165c8e===_0x4a771a)break;else _0x40c010['push'](_0x40c010['shift']());}catch(_0x2759f4){_0x40c010['push'](_0x40c010['shift']());}}}(_0x1693,0x86c5e));import{system}from'@minecraft/server';import{overworld}from'../../flmjhjr/cnpvemo/hajwetl';import{runNamedInterval}from'../../flmjhjr/cnpvemo/zsqytqy';import{Vector}from'../../flmjhjr/cnpvemo/obxnfun';const PROCESS_TIMEOUT=0x5*0x14,potentiallyLoadedChunks=[],lastChunksWithPlayers=[];let lastChunkCallback=0x0,gettingLoadedChunks=![];runNamedInterval(_0x1d2bc3(0x202),()=>{const _0x15b007=_0x1d2bc3;if(lastChunkCallback+PROCESS_TIMEOUT<system['currentTick'])return;const _0x10d3d5=[];for(const _0x216d3e of overworld[_0x15b007(0x1f0)]()){const _0x5cc669=getChunkCoordinates(_0x216d3e[_0x15b007(0x1e9)]);if(!_0x10d3d5[_0x15b007(0x1fc)](_0x189c91=>_0x5cc669[_0x15b007(0x200)](_0x189c91)))_0x10d3d5[_0x15b007(0x1f3)](_0x5cc669);}const _0x42d23f=lastChunksWithPlayers[_0x15b007(0x1f7)]!==_0x10d3d5[_0x15b007(0x1f7)]||!_0x10d3d5[_0x15b007(0x1f6)](_0xfae6a8=>lastChunksWithPlayers[_0x15b007(0x1fc)](_0x7da59f=>_0x7da59f[_0x15b007(0x200)](_0xfae6a8)));_0x42d23f&&!gettingLoadedChunks&&(lastChunksWithPlayers['length']=0x0,lastChunksWithPlayers[_0x15b007(0x1f3)](..._0x10d3d5),system[_0x15b007(0x1fd)](getLoadedChunks()),gettingLoadedChunks=!![]);});export function forEachLoadedChunk(_0x429d45){const _0x63563a=_0x1d2bc3;lastChunkCallback=system[_0x63563a(0x1ff)];for(const _0x4d5fa5 of potentiallyLoadedChunks){if(!overworld[_0x63563a(0x1eb)](_0x4d5fa5)){potentiallyLoadedChunks[_0x63563a(0x1f2)](_0x4d5fa5);continue;}_0x429d45(_0x4d5fa5);}}function _0x1693(){const _0x2621be=['2608070KjohhP','33656yBiLxo','26891029MgYbXr','getPlayers','3351198hJFBOl','remove','push','941846QAODTT','mul','every','length','add','103326waDSdR','1414255aynCAS','632ihAmiW','find','runJob','4apQLwO','currentTick','equals','9KuZmll','bgfyavb/nqmfoor','location','2ExJIwB','getBlock','floor'];_0x1693=function(){return _0x2621be;};return _0x1693();}function getChunkCoordinates(_0x23450c){const _0x251424=_0x1d2bc3;return new Vector(Math[_0x251424(0x1ec)](_0x23450c['x']/0x10)*0x10,0x0,Math[_0x251424(0x1ec)](_0x23450c['z']/0x10)*0x10);}function*getLoadedChunks(){const _0x26fe44=_0x1d2bc3,_0x5f3912=[];for(const _0x3e6f1c of overworld[_0x26fe44(0x1f0)]()){for(let _0x21a078=-0xc;_0x21a078<=0xc;_0x21a078++){for(let _0x2514eb=-0xc;_0x2514eb<=0xc;_0x2514eb++){const _0x452cce=getChunkCoordinates(new Vector(_0x21a078,0x0,_0x2514eb)[_0x26fe44(0x1f5)](0x10)[_0x26fe44(0x1f8)](_0x3e6f1c[_0x26fe44(0x1e9)]));if(!_0x5f3912['find'](_0x184524=>_0x452cce['equals'](_0x184524))&&overworld[_0x26fe44(0x1eb)](_0x452cce))_0x5f3912[_0x26fe44(0x1f3)](_0x452cce);yield;}}}potentiallyLoadedChunks['length']=0x0,potentiallyLoadedChunks[_0x26fe44(0x1f3)](..._0x5f3912),gettingLoadedChunks=![];}