const _0x576b3d=_0x9f30;(function(_0x2c968e,_0x4e9e3a){const _0x3fa90e=_0x9f30,_0xbf0a5d=_0x2c968e();while(!![]){try{const _0x7b68dd=-parseInt(_0x3fa90e(0xc5))/0x1*(-parseInt(_0x3fa90e(0xb2))/0x2)+parseInt(_0x3fa90e(0xb5))/0x3+parseInt(_0x3fa90e(0xc6))/0x4*(-parseInt(_0x3fa90e(0xc1))/0x5)+-parseInt(_0x3fa90e(0xc9))/0x6*(parseInt(_0x3fa90e(0xbc))/0x7)+parseInt(_0x3fa90e(0xb1))/0x8*(parseInt(_0x3fa90e(0xcb))/0x9)+-parseInt(_0x3fa90e(0xbe))/0xa*(-parseInt(_0x3fa90e(0xb8))/0xb)+-parseInt(_0x3fa90e(0xbd))/0xc*(parseInt(_0x3fa90e(0xca))/0xd);if(_0x7b68dd===_0x4e9e3a)break;else _0xbf0a5d['push'](_0xbf0a5d['shift']());}catch(_0xbf1f61){_0xbf0a5d['push'](_0xbf0a5d['shift']());}}}(_0x391b,0xcde9e));import{system}from'@minecraft/server';function _0x9f30(_0x3f4d7f,_0x586dc0){const _0x391b8d=_0x391b();return _0x9f30=function(_0x9f3048,_0xe3ec99){_0x9f3048=_0x9f3048-0xb1;let _0x4d222a=_0x391b8d[_0x9f3048];return _0x4d222a;},_0x9f30(_0x3f4d7f,_0x586dc0);}import{overworld}from'../../flmjhjr/cnpvemo/hajwetl';import{runNamedInterval}from'../../flmjhjr/cnpvemo/zsqytqy';import{isNamedJobActive,runNamedJob}from'../../flmjhjr/cnpvemo/djrojhf';import{Vector}from'../../flmjhjr/cnpvemo/obxnfun';const PROCESS_TIMEOUT=0x5*0x14,potentiallyLoadedChunks=[],lastChunksWithPlayers=[];function _0x391b(){const _0x12f854=['4020419RzqNNH','9EMeRJl','9936736ybiSQG','2owDgOw','push','length','2208543nxgvNH','currentTick','getBlock','7601yejZZu','add','getPlayers','location','273476cwxjgj','48ftEUWk','12370EPNePI','equals','every','1790785WPMOsQ','bgfyavb/nqmfoor','mul','remove','1246447orhZHv','4AyVDQM','floor','find','252KCRtOP'];_0x391b=function(){return _0x12f854;};return _0x391b();}let lastChunkCallback=0x0,gettingLoadedChunks=![];runNamedInterval(_0x576b3d(0xc2),()=>{const _0x196fac=_0x576b3d;if(lastChunkCallback+PROCESS_TIMEOUT<system[_0x196fac(0xb6)])return;const _0x45d212=[];for(const _0x1d1bd9 of overworld[_0x196fac(0xba)]()){const _0x313354=getChunkCoordinates(_0x1d1bd9[_0x196fac(0xbb)]);if(!_0x45d212[_0x196fac(0xc8)](_0x4f8f24=>_0x313354[_0x196fac(0xbf)](_0x4f8f24)))_0x45d212['push'](_0x313354);}const _0xbcdc41=lastChunksWithPlayers[_0x196fac(0xb4)]!==_0x45d212[_0x196fac(0xb4)]||!_0x45d212[_0x196fac(0xc0)](_0x2c3c79=>lastChunksWithPlayers[_0x196fac(0xc8)](_0x361ce6=>_0x361ce6[_0x196fac(0xbf)](_0x2c3c79)));_0xbcdc41&&!gettingLoadedChunks&&(lastChunksWithPlayers[_0x196fac(0xb4)]=0x0,lastChunksWithPlayers[_0x196fac(0xb3)](..._0x45d212),runNamedJob('weather/chunks',getLoadedChunks),gettingLoadedChunks=!![]);});export function forEachLoadedChunk(_0x3f5223,_0x4f095a){if(isNamedJobActive(_0x3f5223))return;runNamedJob(_0x3f5223,function*(){const _0xc30715=_0x9f30;lastChunkCallback=system['currentTick'];for(const _0x577aea of potentiallyLoadedChunks){if(!overworld[_0xc30715(0xb7)](_0x577aea)){potentiallyLoadedChunks[_0xc30715(0xc4)](_0x577aea);continue;}_0x4f095a(_0x577aea),yield;}});}function getChunkCoordinates(_0x4536c0){const _0x4007fd=_0x576b3d;return new Vector(Math['floor'](_0x4536c0['x']/0x10)*0x10,0x0,Math[_0x4007fd(0xc7)](_0x4536c0['z']/0x10)*0x10);}function*getLoadedChunks(){const _0xf0fa53=_0x576b3d,_0x5b0872=[];for(const _0xcbd246 of overworld[_0xf0fa53(0xba)]()){for(let _0x149336=-0xc;_0x149336<=0xc;_0x149336++){for(let _0x237655=-0xc;_0x237655<=0xc;_0x237655++){const _0x4aa8fd=getChunkCoordinates(new Vector(_0x149336,0x0,_0x237655)[_0xf0fa53(0xc3)](0x10)[_0xf0fa53(0xb9)](_0xcbd246[_0xf0fa53(0xbb)]));if(!_0x5b0872[_0xf0fa53(0xc8)](_0x3fa643=>_0x4aa8fd[_0xf0fa53(0xbf)](_0x3fa643))&&overworld['getBlock'](_0x4aa8fd))_0x5b0872['push'](_0x4aa8fd);yield;}}}potentiallyLoadedChunks[_0xf0fa53(0xb4)]=0x0,potentiallyLoadedChunks['push'](..._0x5b0872),gettingLoadedChunks=![];}