Welcome! This short guide will walk you through installing Jumbo in your Bloxd.io world step by step.
const e="3.0.0";const o=0;if(api.getBlock(thisPos)!=="Code Block"){api.sendMessage(myId,"[AI] Jumbo: This code is meant to go inside a Code Block and be run there, not in world code.",{color:"yellow"});while(true){}}api.sendMessage(myId,'Press this code block until you see a green "Success!" message below this, then go back to the Jumbo website and click continue.',{color:"yellow"});const c=`
var o="";for(let i=0;i<e.length;i++){let r=e.charCodeAt(i),n=255&r,l=r>>>8;o+=String.fromCharCode(l),o+=String.fromCharCode(n)}return o
`;const n=`
e=e.toLowerCase();let n=x.bestKey;const l=Object.entries(o);for(var s=r;s<l.length;s++){var d=l[s][0],c=d.toLowerCase();if(c===e)return{input:e,bestScore:i,bestKey:d,finished:!0,offset:s+1};const o=levenshteinDistance(e,c);if((o<i||null===i)&&o<=Math.max(1,Math.floor(d.length/2))&&(i=o,n=d),s>r)break}return{input:e,bestScore:i,bestKey:n,finished:s===l.length,offset:s+1}
`;const i=`
api[n.l](-399e3,2,-399e3,e),api[n.l](-399e3,2,-399e3,"Air")
`;const s=`
return getPromotedPlayers().find((a=>a.dbId===e))
`;const l=`
return getPromotedPlayers().find((a=>a.name===e))
`;const d=`
return Math.ceil((o-e+1)/s)*Math.ceil((r-i+1)/s)*Math.ceil((l-n+1)/(s*(5/3)))
`;const r=`
const e=[-399e3,-1,-399e3];if("Code Block"===api[n.k](e))return readJson(e).version
`;const k=`
const o=[-399e3,1,-399e3];api[n.k]([-399e3,1,-399e3]);if("Code Block"!==api[n.k](o)){if("Unloaded"===api[n.k](o))return void api[n.d]("[AI] Jumbo: Setup failed with code 100, please try again.",{color:"yellow"});api[n.l](o,"Code Block")}const i=readJson(o);if(i?.length&&"owner"in i[0])return void api[n.d]("[AI] Jumbo: Setup has already been completed. If you believe this is an error, reset the code blocks manually.",{color:"yellow"});writeStorage(o,\`[{"owner": "\${api[n.j](e)}"}]\`),api[n.d]("[AI] Jumbo: Setup Complete.",{color:"yellow"})
`;const p=`
api.kickPlayer(o,i?"You were kicked by an admin.":"An admin kicked all players."),api[n.e](e,\`[AI] Jumbo: Kicked \${api[n.h](o)}.\`,{color:"yellow"})
`;const B=`
const o=Array.from({length:a.length+1},(()=>Array(e.length+1).fill(0)));for(let e=0;e<=a.length;e++)o[e][0]=e;for(let i=0;i<=e.length;i++)o[0][i]=i;for(let i=1;i<=a.length;i++)for(let r=1;r<=e.length;r++)o[i][r]=a[i-1]===e[r-1]?o[i-1][r-1]:1+Math.min(o[i-1][r],o[i][r-1],o[i-1][r-1]);return o[a.length][e.length]
`;const g=`
const i=o.toLowerCase(),r=getAiPreference();if(i.startsWith("@jumbo")){if(!r)return void api[n.e](e,"[AI] Jumbo: The owner has AI mode disabled.",{color:"yellow"});const i=getTrainingCompletePercent();if(100===i){const e=getResponse(o.split(" ").slice(1).join(" "));e&&(I=\`[AI] Jumbo: \${e}\`)}else api[n.e](e,\`[AI] Jumbo: Training is not yet complete. (\${i}% complete)\`,{color:"yellow"});return}if(2===api[n.c]()&&!i.startsWith("!")&&!i.startsWith("/")){const r=getApprovedPlayers(),l=api[n.b]();r.includes(api[n.j](l[0]))&&r.includes(api[n.j](l[1]))&&(j?.playerId!==e?(j?.message&&train(j.message,o),j.message=o,j.playerId=e):j.message+=" "+i)}if("!jsetup"===i){return void(1===api[n.c]()?handleJSetupCommand(e):api[n.d]("[AI] Jumbo: Please do /kickall first!",{color:"yellow"}))}if("!jcredits"===i)return void api[n.d]("[AI] Jumbo: Made By: Aspect_SGK, TheCheeseEater, IgorYT, AeSoG, GlitchHunter, Monty Mole, and Nathan.",{color:"yellow"});if("!jprivate"===i)return void aiPrompt(e);const l=authorizePlayer(e);if("!jyes"===i&&A.length){const o=api[n.j](e);if(A.includes(e)){const i=[-399e3,3,-399e3];for(;"Unloaded"===api[n.k](i););"Code Block"!==api[n.k](i)&&api[n.l](i,"Code Block");let r=getApprovedPlayers();const l=[-399001,3,-399e3],s=getDeniedPlayers();return r.includes(o)?(r=r.filter((e=>e!==o)),writeJson(i,{approved:r}),api[n.e](e,"[AI] Jumbo: You are now opted out of your future chat messages being used for Jumbo training data in this world.",{color:"yellow"}),"Code Block"!==api[n.k](l)&&api[n.l](l,"Code Block"),void writeJson(l,{denied:[...s,o]})):(api[n.e](e,"[AI] Jumbo: You are now opted in to your future chat messages being used for Jumbo training data in this world.",{color:"yellow"}),writeJson(i,{approved:[...r,o]}),void writeJson(l,{denied:s.filter((e=>e!==o))}))}}if("!jno"!==i){if(l&&-1===l[0]){if(void 0!==w){const o=[-399e3,-2,-399e3];for(;"Unloaded"===api[n.k](o););return api[n.l](o,"Code Block"),writeJson(o,{explosivesEnabled:!0}),g=!0,w=void 0,void api[n.e](e,"[AI] Jumbo: Explosives are now enabled.",{color:"yellow"})}if(void 0!==v)return setRank(v,"dev",!1),void(v=void 0);if("!jno"===i)return v=void 0,void(w=void 0)}if(l){if("!jhelp"===i){const o=C.join("\\n");api[n.e](e,o,{color:"yellow"});const i=B.join("\\n");api[n.e](e,i,{color:"yellow"})}if(-1===l[0]){if(i.startsWith("!jadd ")){let i=o.match(/^!jadd\\s+(\\w+)\\s+(?:"([^"]+)"|(\\S+))\$/);if(!i)return void api[n.e](e,"[AI] Jumbo: Usage: !jadd <rank> username\\nAvailable ranks: dev, admin, builder",{color:"yellow"});let[r,l]=[i[1],i[2]||i[3]],s=api[n.i](l);if(s)if(s!==e){if("dev"===r.toLowerCase())return api[n.e](e,"[AI] Jumbo: WARNING! This rank gives a player owner-like access to your server and is extremely risky, are you sure you want to continue? (!jyes or !jno)",{color:"red"}),void(v=s);setRank(s,r.toLowerCase(),!1)}else api[n.e](e,"[AI] Jumbo: You cannot change your own rank!",{color:"yellow"});else api[n.e](e,"[AI] Jumbo: Player not found in lobby.",{color:"yellow"});return}if(i.startsWith("!jremove ")){let i=o.split(" ");if(3!==i.length)return void api[n.e](e,"[AI] Jumbo: Usage: !jremove <rank> username\\nAvailable ranks: dev, admin, builder",{color:"yellow"});let r=i[1],l=i[2];return void setRank(api[n.i](l),r,!0)}if("!jtoggledanger"===i)if(g){let o=[-399e3,-2,-399e3];for(;"Unloaded"===api[n.k](o););writeJson(o,{}),g=!1,api[n.e](e,"[AI] Jumbo: Explosives are now disabled.",{color:"yellow"})}else api[n.e](e,"[AI] Jumbo: WARNING! Enabling explosives gives other players the ability to grief your world, even in guarded areas. Are you sure you want to enable explosives? (!jyes or !jno)",{color:"red"}),w=!0;if("!jtoggleai"===i){const o=!r;return writeJson([-399002,3,-399e3],{allowed:o}),void api[n.e](e,\`[AI] Jumbo: AI mode is now \${o?"enabled":"disabled"}.\`,{color:"yellow"})}}if((-1===l[0]||l.includes(2)||l.includes(3))&&"!jstop"===i)return void(null!==c?(J=0,c=null,api[n.e](e,"[AI] Jumbo: Stopped task.",{color:"yellow"})):api[n.e](e,"[AI] Jumbo: No task running.",{color:"yellow"}));if(-1===l[0]||l.includes(2)){let r=o.split(" ");if(i.startsWith("!jtp")){if("all"===r[1]){if(-1===l[0]){let o=api[n.b]();for(let i of o)i!==e&&tp(i,e,!1);return}return void api[n.e](e,"[AI] Jumbo: You do not have permission to teleport all.",{color:"yellow"})}if(3!==r.length)return void api[n.e](e,"[AI] Jumbo: Usage: !jtp [here/to] username | !jtp all",{color:"yellow"});let o=api[n.i](r[2]);if(o){if(-1!==l[0]){let i=authorizePlayer(o);if(i&&i[0]<=2)return void api[n.e](e,"[AI] Jumbo: You cannot TP that person.",{color:"yellow"})}if("here"===r[1])return void tp(o,e,!1);if("to"===r[1])return void tp(e,o,!0)}api[n.e](e,"[AI] Jumbo: Usage: !jtp [here/to] username | !jtp all",{color:"yellow"})}if(i.startsWith("!jguard ")){let i=authorizePlayer(e);if(-1===i[0]||i.includes(2)){if(!s[e]||!d[e])return void api[n.e](e,"[AI] Jumbo: Error: pos1 and pos2 must be set first.",{color:"red"});const i=o.match(/^!jguard\\s+"(.+)"\$/);if(!i)return void api[n.e](e,'[AI] Jumbo: Usage: !jguard "Area Name"',{color:"yellow"});const r=i[1];addGuardedArea(e,s[e],d[e],r)}}if("!jguardedareas"===i&&prettyPrintGuardedAreas(e,-1===l[0]),i.startsWith("!jremoveguard")){const i=o.match(/^!jremoveguard\\s+"(.+)"\$/);if(!i)return void api[n.e](e,'[AI] Jumbo: Usage: !jremoveguard "Area Name"',{color:"yellow"});const r=i[1];removeGuardedArea(e,r,-1===l[0])}if(i.startsWith("!jkick ")){let o=api[n.i](r[1]);if(o){let i=authorizePlayer(o);return i&&-1===i[0]||-1!==l[0]&&i&&(i.includes(2)||i.length&&-1===i[0])?void api[n.e](e,"[AI] Jumbo: You cannot kick that person.",{color:"yellow"}):void kickPlayer(e,o,!1)}api[n.e](e,"[AI] Jumbo: Usage: !jkick username",{color:"yellow"})}if("!jkickall"===i)for(otherId of api[n.b]()){let o=authorizePlayer(otherId);if(-1===l[0]||!o||!(o.includes(2)||o.length&&-1===o[0]))return void kickPlayer(e,otherId,!0);if(otherId!==e)return void api[n.e](e,\`[AI] Jumbo: You cannot kick \${api[n.h](otherId)}.\`,{color:"yellow"})}}if(-1===l[0]||l.includes(3)){if("!jpos1"===i){let o=api[n.a](e);return-1===l[0]||isFreePosition(o,e)?d[e]&&-1!==l[0]&&isIntersecting(o,d[e],e)?void api[n.e](e,"[AI] Jumbo: You cannot set position 1 if there is an area guarded by another player between you and position 2.",{color:"yellow"}):(s[e]=o.map((e=>Math.floor(e))),void api[n.e](e,\`[AI] Jumbo: pos1 set to \${s[e].map((e=>Math.floor(e))).join(", ")}\`,{color:"yellow"})):void api[n.e](e,"[AI] Jumbo: You cannot set position 1 in an area guarded by another player.",{color:"yellow"})}if("!jpos2"===i){let o=api[n.a](e);return-1===l[0]||isFreePosition(o,e)?s[e]&&isIntersecting(s[e],o,e)&&-1!==l[0]?void api[n.e](e,"[AI] Jumbo: You cannot set position 2 if there is an area guarded by another player between you and position 1.",{color:"yellow"}):(d[e]=o.map((e=>Math.floor(e))),void api[n.e](e,\`[AI] Jumbo: pos2 set to \${d[e].map((e=>Math.floor(e))).join(", ")}\`,{color:"yellow"})):void api[n.e](e,"[AI] Jumbo: You cannot set position 2 in an area guarded by another player.",{color:"yellow"})}if(i.startsWith("!jset ")){const i=o.match(/^!jset\\s+"([^"]+)"\$/);if(!i)return void api[n.e](e,'[AI] Jumbo: Usage: !jset "Block Name"',{color:"yellow"});const r=i[1];return s[e]&&d[e]?(getBlockNameValidity(r),worldbuildersetblock(s[e],d[e],r,25),void api[n.e](e,\`[AI] Jumbo: Started building with "\${r}"\`,{color:"yellow"})):void api[n.e](e,"[AI] Jumbo: Error: pos1 and pos2 must be set first.",{color:"red"})}if("!jremote"===i||"!jwand"===i)return api.isMobile(e)?void api[n.e](e,"[AI] Jumbo: Jumbo Remote does not work on mobile because you cannot right-click.",{color:"yellow"}):api.hasItem(e,"Timed Spike Bomb")?void api[n.e](e,"[AI] Jumbo: You already have a Jumbo Remote.",{color:"yellow"}):(api.giveItem(e,"Timed Spike Bomb",1,{customDisplayName:"Jumbo Remote",customDescription:"Use to control Jumbo without chat",customAttributes:{enchantmentTier:"Tier 3"}}),void api[n.e](e,"[AI] Jumbo: Gave a Jumbo Remote! Left click to set pos1 and right click to set pos2.",{color:"yellow"}));if(i.startsWith("!jrandomize ")){if(!s[e]||!d[e])return void api[n.e](e,"[AI] Jumbo: Error: pos1 and pos2 must be set first.",{color:"yellow"});const i=[...o.matchAll(/"([^"]+)"\\s+([\\d.]+)%/g)];if(i.length<2)return void api[n.e](e,'[AI] Jumbo: Usage: !jrandomize "Block A" 70% "Block B" 30%',{color:"yellow"});const r=[];let l=0;for(const[,o,s]of i){getBlockNameValidity(o);const i=parseFloat(s);if(isNaN(i)||i<=0)return void api[n.e](e,\`[AI] Jumbo: Invalid percentage for "\${o}": \${s}\`,{color:"yellow"});l+=i,r.push({block:o,percent:i})}const p=r.map((e=>({block:e.block,weight:e.percent/l}))),randomBlock=()=>{const e=Math.random();let o=0;for(const i of p)if(o+=i.weight,e<=o)return i.block;return p[p.length-1].block};return worldbuildersetblock(s[e],d[e],"Air",1e3),c.randomBlock=randomBlock,void api[n.e](e,"[AI] Jumbo: Started randomized build.",{color:"yellow"})}if(i.startsWith("!jsphere")){const i=o.match(/^!jsphere\\s+"([^"]+)"(?:\\s+(hollow))?\$/i);if(!i)return void api[n.e](e,'[AI] Jumbo: Usage: !jsphere "Block Name" [hollow]',{color:"yellow"});const r=i[1];getBlockNameValidity(r);const l="hollow"===i[2]?.toLowerCase();if(!s[e]||!d[e])return void api[n.e](e,"[AI] Jumbo: Error: pos1 and pos2 must be set first.",{color:"red"});const[p,m,h]=s[e],[y,b,k]=d[e],g=Math.min(p,y),w=Math.max(p,y),v=Math.min(m,b),A=Math.max(m,b),J=Math.min(h,k),I=Math.max(h,k),j=(g+w)/2,x=(v+A)/2,P=(J+I)/2,M=(w-g)/2||1,C=(A-v)/2||1,B=(I-J)/2||1;return c={x:g,y:v,z:J,minX:g,minY:v,minZ:J,maxX:w,maxY:A,maxZ:I,chunkSizeX:3,chunkSizeY:3,chunkSizeZ:5,blockName:r,delay:200,lastTime:0,active:!0,totalChunks:getTotalChunks(g,w,v,A,J,I,3),chunksDone:0,sphereMode:!0,sphereCenter:[j,x,P],sphereRadiusX:M,sphereRadiusY:C,sphereRadiusZ:B,sphereHollow:l},void api[n.e](e,\`[AI] Jumbo: Started \${l?"hollow":"solid"} sphere with "\${r}"\`,{color:"yellow"})}if(i.startsWith("!jcylinder")){const i=o.match(/^!jcylinder\\s+([xyz])\\s+"([^"]+)"(?:\\s+(hollow))?\$/i);if(!i)return void api[n.e](e,'[AI] Jumbo: Usage: !jcylinder <x/y/z> "Block Name" [hollow]',{color:"yellow"});const r={x:1,y:2,z:3}[i[1]],l=i[2];getBlockNameValidity(l);const p="hollow"===i[3]?.toLowerCase();if(!s[e]||!d[e])return void api[n.e](e,"[AI] Jumbo: Error: pos1 and pos2 must be set first.",{color:"red"});const[m,h,y]=s[e],[b,k,g]=d[e],w=Math.min(m,b),v=Math.max(m,b),A=Math.min(h,k),J=Math.max(h,k),I=Math.min(y,g),j=Math.max(y,g),x=(w+v)/2,P=(A+J)/2,M=(I+j)/2,C=(v-w)/2||1,B=(J-A)/2||1,S=(j-I)/2||1;return c={x:w,y:A,z:I,minX:w,minY:A,minZ:I,maxX:v,maxY:J,maxZ:j,chunkSizeX:3,chunkSizeY:3,chunkSizeZ:5,blockName:l,delay:200,lastTime:0,active:!0,totalChunks:getTotalChunks(w,v,A,J,I,j,3),chunksDone:0,sphereMode:!1,sphereCenter:[x,P,M],sphereRadiusX:C,sphereRadiusY:B,sphereRadiusZ:S,sphereHollow:p,cylinderMode:r},void api[n.e](e,\`[AI] Jumbo: Started \${p?"hollow":"solid"} cylinder on the \${i[1]} axis with "\${l}"\`,{color:"yellow"})}if(i.startsWith("!jwalls")){const i=o.match(/^!jwalls\\s+"([^"]+)"\$/);if(!i)return void api[n.e](e,'[AI] Jumbo: Usage: !jwalls "Block Name"',{color:"yellow"});if(!s[e]||!d[e])return void api[n.e](e,"[AI] Jumbo: Error: pos1 and pos2 must be set first.",{color:"red"});const r=i[1];getBlockNameValidity(r);const[l,p,m]=s[e],[h,y,b]=d[e],k=Math.min(l,h),g=Math.max(l,h),w=Math.min(p,y),v=Math.max(p,y),A=Math.min(m,b),J=Math.max(m,b);c={x:k,y:w,z:A,minX:k,minY:w,minZ:A,maxX:g,maxY:v,maxZ:J,chunkSizeX:12,chunkSizeY:12,chunkSizeZ:20,delay:150,lastTime:0,active:!0,totalChunks:getTotalChunks(k,g,w,v,A,J,12),chunksDone:0,blockName:r,wallsMode:!0}}if(i.startsWith("!jtexturize")){const i=[...o.matchAll(/"([^"]+)"/g)].map((e=>e[1]));if(i.length<2)return void api[n.e](e,'[AI] Jumbo: Usage: !jtexturize "Target Block", "Alt1", "Alt2"...',{color:"yellow"});if(!s[e]||!d[e])return void api[n.e](e,"[AI] Jumbo: Error: pos1 and pos2 must be set first.",{color:"red"});for(let e=0;e<i.length;e++)getBlockNameValidity(i[e]);const[r,...l]=i,[p,m,h]=s[e],[y,b,k]=d[e],[g,w,v]=[Math.min(p,y),Math.min(m,b),Math.min(h,k)],[A,J,I]=[Math.max(p,y),Math.max(m,b),Math.max(h,k)];return c={x:g,y:w,z:v,minX:g,minY:w,minZ:v,maxX:A,maxY:J,maxZ:I,chunkSizeX:6,chunkSizeY:6,chunkSizeZ:10,delay:150,lastTime:0,active:!0,totalChunks:getTotalChunks(g,A,w,J,v,I,6),chunksDone:0,texturizeTask:!0,texturizeTarget:r,texturizeOptions:l},void api[n.e](e,\`[AI] Jumbo: Started texturizing "\${r}"\`,{color:"yellow"})}}}}else A=A.filter((o=>o!==e))
`;const h=[c,n,i,s,l,d,r,k,p,B,g];function write(e,o,c=0){api.setBlockData(e[0],e[1],e[2],{persisted:{shared:{text:String(o),textSize:c}}})}function spl(e,o){return e.slice(0,o)}for(let e=0;true;e++){let c=[-399e3,0,-399e3+e+1+o];while(api.getBlock(c)==="Unloaded"){}if(api.getBlock(c)!=="Code Block")break;for(let c=0;true;c++){let n=[-399e3+c,0,-399e3+e+1+o];while(api.getBlock(n)==="Unloaded"){}if(api.getBlock(n)!=="Code Block")break;api.setBlock(n,"Air")}}for(let e=0;e<h.length;e++){let c=h[e];let n=c;for(let a=0;a<Math.ceil(c.length/1850);a++){let c=[-399e3+a,0,-399e3+e+1+o];api.setBlock(c,"Code Block");write(c,spl(n,1850));n=n.slice(1850)}}const w=[-399e3,-1,-399e3];while(api.getBlock(w)==="Unloaded"){}if(api.getBlock(w)!=="Code Block"){api.setBlock(w,"Code Block")}api.setBlockData(w[0],w[1],w[2],{persisted:{shared:{text:JSON.stringify({version:e})}}});api.sendMessage(myId,"Success! (1/2)",{color:"Lime"});
// end of code
const e="3.0.0";const o=11;if(api.getBlock(thisPos)!=="Code Block"){api.sendMessage(myId,"[AI] Jumbo: This code is meant to go inside a Code Block and be run there, not in world code.",{color:"yellow"});while(true){}}api.sendMessage(myId,'Press this code block until you see a green "Success!" message below this, then go back to the Jumbo website and click continue.',{color:"yellow"});const c=`
let i=api.getHeldItem(e),r=i?.name,l=i?.amount;if(["Bouncy Bomb","Super RPG","Grenade Launcher","RPG","Moonstone Explosive","Fireball","Iceball","Moonstone Remote Explosive","Red Paintball Gun","Orange Paintball Gun","Yellow Paintball Gun","Green Paintball Gun","Blue Paintball Gun","Purple Paintball Gun","Red Heavy Paintball Gun","Orange Heavy Paintball Gun","Yellow Heavy Paintball Gun","Green Heavy Paintball Gun","Blue Heavy Paintball Gun","Purple Heavy Paintball Gun"].includes(r))if(g){if(!isFreePosition(api[n.a](e),e)){e in b||(b[e]=0);let o=authorizePlayer(e);o&&-1===o[0]||b[e]++,2===b[e]&&(api[n.p](e,r,l),b[e]=0)}}else{let o=authorizePlayer(e);o&&-1===o[0]||(api[n.p](e,r,l),api[n.e](e,"[AI] Jumbo: The owner has explosives disabled.",{color:"yellow"}))}if("Jumbo Remote"===i?.attributes?.customDisplayName){let i=authorizePlayer(e);if(!i||-1!==i[0]&&!i.includes(3))return void api[n.e](e,"[AI] Jumbo: You cannot use the Jumbo Remote unless you are the owner or have the builder rank.",{color:"yellow"});const r=api.getPlayerTargetInfo(e);if(!r)return;if(!o)return s[e]=r.position,void api[n.e](e,\`[AI] Jumbo: pos1 set to \${s[e].join(", ")}\`,{color:"yellow"});d[e]=r.position,api[n.e](e,\`[AI] Jumbo: pos2 set to \${d[e].join(", ")}\`,{color:"yellow"})}
`;const i=`
if(s in y){if(!(y[s][0]<api[n.n]()-1e4))return y[s][1];delete y[s]}const d=api.getPlayerIdFromDbId(s);if(isFreePosition([e,o,i],d))y[s]=[api[n.n](),null];else{let e=authorizePlayer(d);if(!e||-1!==e[0])return y[s]=[api[n.n](),"preventChange"],b[d]++,"preventChange";y[s]=[api[n.n](),null]}
`;const n=`
const i=getGuardedAreas(),r=api[n.j](e),l=Object.entries(i);if(!Array.isArray(l))return void api[n.e](e,"[AI] Jumbo: Oh no! An error occured (error 700). Please report this to the Jumbo devs on Discord.",{color:"Yellow"});let s="[AI] Jumbo: Guarded Areas:\\n";for(const[i,d]of l)if(r===i||o){let l;l=o&&r===i?api[n.h](e):getDataFromDbId(i)?.name,s+=l?\`\\n\${l}:\`:"\\nError loading owner name";for(const[e,o,i]of d){const[r,n,l]=o,[d,c,p]=i,m=Math.min(r,d),h=Math.max(r,d),y=Math.min(n,c),b=Math.max(n,c),k=Math.min(l,p),g=Math.max(l,p);s+=\`\\n> \${e}\`,s+=\`\\n- From: (\${m}, \${y}, \${k})\`,s+=\`\\n- To: (\${h}, \${b}, \${g})\`,s+=\`\\n- Size: \${h-m+1} x \${b-y+1} x \${g-k+1}\`}}api[n.e](e,s,{color:"Yellow"})
`;const s=`
const r={dev:1,admin:2,builder:3};if(!(o in r)&&!i)return void api[n.d]("Available ranks: dev, admin, builder",{color:"yellow"});const l=[-399e3,1,-399e3],s=api[n.k](l),d=api[n.h](e);if(i&&1===r[o]&&api[n.f](api[n.i](d),"canEditCode",!1),"Code Block"!==s){for(;"Unloaded"===api[n.k](l););return void api[n.d]("[AI] Jumbo: Looks like you haven't set up an owner, let's start setup. Please kick all players except yourself from the lobby, then say \\"!jsetup\\".",{color:"yellow"})}const c=getPromotedPlayers(),p=readJson(l)[0],m=api[n.j](e),h=c.findIndex((e=>e.dbId===m));if(-1===h)i||(c.push({dbId:m,name:d,rank:[r[o]]}),writeJson(l,[p,...c]),api[n.d](\`[AI] Jumbo: \${d} now has the \${o} rank\`,{color:"yellow"}),1===r[o]&&api[n.f](e,"canEditCode",!0));else{const s=c[h].rank;if(i)if(s.includes(r[o])){if(1===s.length)c.splice(h,1),writeJson(l,[p,...c]);else{const e=c[h];c[h].rank=e.rank.filter((e=>e!==r[o])),writeJson(l,[p,...c])}api[n.d](\`[AI] Jumbo: \${d} no longer has the \${o} rank\`,{color:"yellow"})}else api[n.d](\`[AI] Jumbo: Failed to demote: \${d} does not have the \${o} rank\`,{color:"yellow"});else if(s.includes(r[o]))api[n.d](\`[AI] Jumbo: \${d} already has the \${o} rank\`,{color:"yellow"});else{let i=c;i[h]={dbId:m,name:d,rank:[...s,r[o]]},writeJson(l,[p,...i]),api[n.d](\`[AI] Jumbo: \${d} now has the \${o} rank\`,{color:"yellow"}),1===r[o]&&api[n.f](e,"canEditCode",!0)}}
`;const l=`
api.setPosition(e,api[n.a](o)),i?api[n.e](e,\`[AI] Jumbo: Teleported to \${api[n.h](o)}.\`,{color:"yellow"}):api[n.e](o,\`[AI] Jumbo: Teleported \${api[n.h](e)} to you.\`,{color:"yellow"})
`;const d=`
const i=readAllTrainingData();e in i||(i[e]={responses:[]}),i[e].responses.includes(o)||i[e].responses.push(o),writeTrainingData(i)
`;const r=`
const[l,s,d]=e,[p,m,h]=o,y=Math.min(l,p),b=Math.max(l,p),k=Math.min(s,m),g=Math.max(s,m),w=Math.min(d,h),v=Math.max(d,h),A=getTotalChunks(y,b,k,g,w,v,6);(b-y+1)*(g-k+1)*(v-w+1)<=360?api[n.m]([y,k,w],[b,g,v],i):c={x:y,y:k,z:w,minX:y,minY:k,minZ:w,maxX:b,maxY:g,maxZ:v,chunkSizeX:6,chunkSizeY:6,chunkSizeZ:10,blockName:i,delay:r,lastTime:0,active:!0,totalChunks:A,chunksDone:0,randomBlock:null,sphereMode:!1,sphereCenter:null,sphereRadiusX:null,sphereRadiusY:null,sphereRadiusZ:null,sphereHollow:!1,cylinderMode:0,wallsMode:!1}
`;const k=`
let o=JSON.stringify(e),i=M[0]+1;for(;o.length>0;){const e=[i,M[1],M[2]];"Code Block"!==api[n.k](e)&&api[n.l](e,"Code Block");writeStorage(e,o.slice(0,1500)),o=o.slice(1500),i++}
`;const p=[c,i,n,s,l,d,r,k];function write(e,o,c=0){api.setBlockData(e[0],e[1],e[2],{persisted:{shared:{text:String(o),textSize:c}}})}function spl(e,o){return e.slice(0,o)}for(let e=0;true;e++){let c=[-399e3,0,-399e3+e+1+o];while(api.getBlock(c)==="Unloaded"){}if(api.getBlock(c)!=="Code Block")break;for(let c=0;true;c++){let i=[-399e3+c,0,-399e3+e+1+o];while(api.getBlock(i)==="Unloaded"){}if(api.getBlock(i)!=="Code Block")break;api.setBlock(i,"Air")}}for(let e=0;e<p.length;e++){let c=p[e];let i=c;for(let a=0;a<Math.ceil(c.length/1850);a++){let c=[-399e3+a,0,-399e3+e+1+o];api.setBlock(c,"Code Block");write(c,spl(i,1850));i=i.slice(1850)}}const B=[-399e3,-1,-399e3];while(api.getBlock(B)==="Unloaded"){}if(api.getBlock(B)!=="Code Block"){api.setBlock(B,"Code Block")}api.setBlockData(B[0],B[1],B[2],{persisted:{shared:{text:JSON.stringify({version:e})}}});api.sendMessage(myId,"Success! (2/2)",{color:"Lime"});
// end of code
const r={1:"asciiDecompress",2:"findClosestKey",3:"getBlockNameValidity",4:"getDataFromDbId",5:"getPromotedInfo",6:"getTotalChunks",7:"getVersion",8:"handleJSetupCommand",9:"kickPlayer",10:"levenshteinDistance",11:"onPlayerChat",12:"onPlayerClick",13:"onWorldChangeBlock",14:"prettyPrintGuardedAreas",15:"setRank",16:"tp",17:"train",18:"worldbuildersetblock",19:"writeTrainingData"};var n={a:"getPosition",b:"getPlayerIds",c:"getNumPlayers",d:"broadcastMessage",e:"sendMessage",f:"setClientOption",g:"setClientOptions",h:"getEntityName",i:"getPlayerId",j:"getPlayerDbId",k:"getBlock",l:"setBlock",m:"setBlockRect",n:"now",o:"setCantChangeBlockRect",p:"removeItemName"};const l="3.0.0";var s={},d={},c=null,p={},m=!1,h=0,y={},b={},k=0,g=!1,w=void 0,v=void 0,A=[],J=0,I="",j={message:"",playerId:null},x={input:"",bestKey:null,bestScore:1/0,finished:!0,offset:0};const P=[-399e3,-1,-399e3];var M=[-399e3,3,-399e3];if(api[n.k]([-399e3,1,-399e3]),"Code Block"===api[n.k](thisPos))for(api[n.d]("[AI] Jumbo: This code is meant to go in World Code, not in a code block. Please run the separate code intended for a code block first, then put this in world code.",{color:"yellow"});;);if("Code Block"!==api[n.k](P)&&api[n.l](P,"Code Block"),"Code Block"!==api[n.k](P)&&"Unloaded"!==api[n.k](P)||"Code Block"===api[n.k](P)&&readJson(P).version!==l)for(api[n.d]("[AI] Jumbo: It appears you did not update Jumbo correctly. Please update the Setup Data via the Code Block file in the latest update on Discord, then update World Code and rejoin.",{color:"yellow"});;);var C=["Jumbo commands:","\nOwner-only commands:",'- "!jsetup": Initializes Jumbo for the first time. Kick all players except yourself and say this command.','- "!jadd <rank> username": Gives a player a certain rank. Available ranks: dev, admin, builder.','- "!jremove <rank> username": Removes a certain rank from a player. Available ranks: dev, admin, builder.','- "!jtp all": Teleports all players to you.','- "!jtoggledanger": Enables or disables the use of explosives (explosives are disabled by default).','- "!jtoggleai": Enables or disables Jumbo responding to users\' prompts when they use "@jumbo" at the beginning of their message.',"\nOwner and admin commands:",'- \'!jguard "Area Name"\': Sets a "guarded area", within which other players cannot break blocks.',"- '!jremoveguard \"Area Name\"': Removes a guarded area, allowing other players to break blocks there again.",'- "!jguardedareas": Lists all guarded areas. For the owner, displays all guarded areas; for admins, displays only their own guarded areas.','- "!jtp <to, here> username": Teleports a player.','- "!jkick username": Kicks a player from the lobby.'],B=["Owner and builder commands:",'- "!jpos1": Sets the first position for world editing (x, y, z).','- "!jpos2": Sets the second position for world editing (x, y, z).',"- '!jset \"Block Name\"': Builds a filled cube between pos1 and pos2 with the specified block.","- '!jwalls \"Block Name\"': Builds walls around the perimeter of the area between pos1 and pos2 with the specified block.","- '!jsphere \"Block Name\" [hollow]': Builds a sphere between pos1 and pos2 with the specified block. Add 'hollow' for a hollow sphere.","- '!jcylinder <x/y/z> \"Block Name\" [hollow]': Builds a cylinder between pos1 and pos2 with the specified block along the specified axis. Add 'hollow' for a hollow cylinder.",'- \'!jtexturize "Target Block", "Alt1", "Alt2"...\': Replaces \'Target Block\' within pos1 and pos2 with alternative blocks (even chance for each).','- \'!jrandomize "Block A" 70% "Block B" 30%\': Builds a randomized cube between pos1 and pos2 with the specified blocks and percentages.',"- '!jremote': Gives a \"Jumbo Remote\" which sets pos1 when left-clicked and sets pos2 when right-clicked.","\nOwner, admin, and builder commands:",'- "!jstop": Stops the currently running Jumbo world builder task.',"\nOwner, admin, dev, and builder commands:",'- "!jhelp": Displays this list of commands and their descriptions.',"\nCommands for anyone:",'- "!jcredits": Displays credits for Jumbo creators.','- "!jprivate": Toggles your preferences for your messages being used as anonymous training data in this world.'];function addGuardedArea(e,o,i,r){const l=api[n.j](e);if(Object.entries(getGuardedAreas()).find((e=>e[1][0]===r)))api[n.e](e,"[AI] Jumbo: That area name is already in use.",{color:"Yellow"});else for(let s=0;;s++){let d=[-399001,0,-399e3+s];if("Code Block"!==api[n.k](d)){api[n.l](d,"Code Block"),o=[Math.floor(o[0]),Math.floor(o[1]),Math.floor(o[2])],i=[Math.floor(i[0]),Math.floor(i[1]),Math.floor(i[2])],writeJson(d,{dbId:l,areaName:r,pos1:o,pos2:i});const s=api[n.b]();for(modifyingPlayer of s){let r=authorizePlayer(modifyingPlayer);if(modifyingPlayer!==e&&(!r||-1!==r[0])){const e="This Area is Guarded By Jumbo.";api[n.o](modifyingPlayer,o,i),api[n.g](modifyingPlayer,{cantChangeError:e,cantBreakError:e,cantBuildError:e})}}api[n.e](e,`[AI] Jumbo: Successfully guarded area: ${r}`,{color:"Yellow"});break}}}function aiPrompt(e){getApprovedPlayers().includes(api[n.j](e))?api[n.e](e,"[AI] Jumbo: Do you wish to opt-out of having Jumbo train from your chats? (Your logs are anonymous and used to make Jumbo work. These chat logs are not intended to leave this world.) You can disable/enable this again later using !jprivate. (Respond with !jyes or !jno)",{color:"yellow"}):api[n.e](e,"[AI] Jumbo: Do you wish to have Jumbo train from your chats? (Your logs are anonymous and used to make Jumbo work. These chat logs are not intended to leave this world.) You can disable/enable this again later using !jprivate. (Respond with !jyes or !jno)",{color:"yellow"}),A.push(e)}function asciiDecompress(e){return jfunction(['e'], [e], 'asciiDecompress');}function authorizePlayer(e){const o=[-399e3,1,-399e3];for(;"Unloaded"===api[n.k](o););if("Code Block"===api[n.k](o)){const i=readJson(o),r=api[n.j](e);if(!i)return api[n.d]("[AI] Jumbo: No Jumbo owner found. Please setup owner first.",{color:"yellow"}),!1;if(i[0].owner===r)return[-1];const l=getPromotedPlayers(),s=l.findIndex((e=>e.dbId===r));if(-1===s)return;return l[s]?.rank}api[n.d]("[AI] Jumbo: Looks like you haven't set up an owner, let's start setup. Please kick all players except yourself from the lobby, then say \"!jsetup\".",{color:"yellow"})}function findClosestKey(e,o,i,r){return jfunction(['e', 'o', 'i', 'r'], [e, o, i, r], 'findClosestKey');}function getAiPreference(){const e=[-399002,3,-399e3];for(;"Unloaded"===api[n.k](e););return"Code Block"!==api[n.k](e)&&(api[n.l](e,"Code Block"),writeJson(e,{allowed:!0})),readJson(e).allowed}function getApprovedPlayers(){const e=[-399e3,3,-399e3];for(;"Unloaded"===api[n.k](e););const o=readJson(e)?.approved;return o||[]}function getBlockNameValidity(e){return jfunction(['e'], [e], 'getBlockNameValidity');}function getData(e){e in p||(p[e]=0,i="");for(let o=p[e];;o++,p[e]++){let r=[-399e3+o,0,-399e3+e];for(;"Unloaded"===api[n.k](r););if("Code Block"!==api[n.k](r))break;{const e=readStorage(r);i+=e}}return i}function getDataFromDbId(e){return jfunction(['e'], [e], 'getDataFromDbId');}function getDeniedPlayers(){const e=[-399001,3,-399e3];for(;"Unloaded"===api[n.k](e););const o=readJson(e)?.denied;return o||[]}function getGuardedAreas(){let e={};for(let o=0;;o++){let i=[-399001,0,-399e3+o];for(;"Unloaded"===api[n.k](i););if("Code Block"===api[n.k](i)){const o=readJson(i),r=o.dbId;r in e||(e[r]=[]),e[r].push([o.areaName,o.pos1,o.pos2])}else if("Invisible Solid"!==api[n.k](i))break}return e}function getPromotedInfo(e){return jfunction(['e'], [e], 'getPromotedInfo');}function getPromotedPlayers(){const e=readJson([-399e3,1,-399e3]);if(e){return e.slice(1)}return[]}function getResponse(e){const o=readAllTrainingData(),i=(x=findClosestKey(e,o,1/0,0)).bestKey;if(!i)return"I'm thinking...";{let e=o[i];if(e&&e.responses.length>0)return x={input:"",bestKey:null,bestScore:1/0,finished:!0,offset:0},e.responses[Math.floor(Math.random()*e.responses.length)]}return"Uh oh, looks like I dont have an answer to that."}function getTotalChunks(e,o,i,r,n,l,s){return jfunction(['e', 'o', 'i', 'r', 'n', 'l', 's'], [e, o, i, r, n, l, s], 'getTotalChunks');}function getTrainingCompletePercent(){const e=readAllTrainingData(),o=Object.keys(e).length;return o>=50?100:o/50*100}function getVersion(){return jfunction([], [], 'getVersion');}function handleJSetupCommand(e){return jfunction(['e'], [e], 'handleJSetupCommand');}function isFreePosition(e,o){const[i,r,l]=e;let s=Object.entries(getGuardedAreas());for(guardedArea of(s=s.filter((([a])=>a!==api[n.j](o))),s))for(let e=0;e<guardedArea[1].length;e++){const o=Math.min(guardedArea[1][e][1][0],guardedArea[1][e][2][0]),n=Math.min(guardedArea[1][e][1][1],guardedArea[1][e][2][1]),s=Math.min(guardedArea[1][e][1][2],guardedArea[1][e][2][2]),d=Math.max(guardedArea[1][e][1][0],guardedArea[1][e][2][0]),c=Math.max(guardedArea[1][e][1][1],guardedArea[1][e][2][1]),p=Math.max(guardedArea[1][e][1][2],guardedArea[1][e][2][2]);if(i>=o&&i<=d&&r>=n&&r<=c&&l>=s&&l<=p)return!1}return!0}function isIntersecting(e,o,i){const[r,l,s]=e,[d,c,p]=o,[m,h,y]=[Math.min(r,d),Math.min(l,c),Math.min(s,p)],[b,k,g]=[Math.max(r,d),Math.max(l,c),Math.max(s,p)];let w=Object.entries(getGuardedAreas());w=w.filter((([e])=>e!==api[n.j](i)));for(const[,e]of w)for(let o=0;o<e.length;o++){const[i,r,n]=e[o],l=Math.min(r[0],n[0]),s=Math.min(r[1],n[1]),d=Math.min(r[2],n[2]),c=Math.max(r[0],n[0]),p=Math.max(r[1],n[1]),w=Math.max(r[2],n[2]);if(m<=c&&b>=l&&h<=p&&k>=s&&y<=w&&g>=d)return!0}return!1}function jfunction(e,o,i){if(!i)return void api[n.d]("[AI] Jumbo: Setup is still in progress, please wait...",{color:"yellow"});const r=`const functionBlock = eval("${i}Str");const tempf = Function(${e.map((e=>"'"+e+"'")).join(",")}, functionBlock);tempf(${JSON.stringify(o).slice(1,-1)});`;return(0,eval)(r)}function kickPlayer(e,o,i){return jfunction(['e', 'o', 'i'], [e, o, i], 'kickPlayer');}function levenshteinDistance(a,e){return jfunction(['a', 'e'], [a, e], 'levenshteinDistance');}function onPlayerChat(e,o){return jfunction(['e', 'o'], [e, o], 'onPlayerChat');}function onPlayerClick(e,o){return jfunction(['e', 'o'], [e, o], 'onPlayerClick');}function onPlayerJoin(e){const o=[-399e3,1,-399e3],i=api[n.j](e);if(getApprovedPlayers().includes(i)||getDeniedPlayers().includes(i)||aiPrompt(e),"Code Block"===api[n.k](o)){const r=getPromotedPlayers(),l=r.findIndex((e=>e.dbId===i));let c=r[l];if(c){if(c.name=api[n.h](e),l){s[e]=null,d[e]=null;let i=api[n.k](o),p=r;if(p[l]={dbId:c.dbId,name:c.name,rank:c.rank},"Code Block"===i){writeJson(o,[readJson(o)[0],...p])}}c.rank.includes(1)&&api[n.f](e,"canEditCode",!0)}}let r=authorizePlayer(e);if(!r||-1!==r[0]){let o=Object.entries(getGuardedAreas());o=o.filter((([a])=>a!==api[n.j](e)));const i="This Area is Guarded By Jumbo.";for(guardedArea of(api[n.g](e,{cantChangeError:i,cantBreakError:i,cantBuildError:i}),o))for(let o=0;o<guardedArea[1].length;o++)api[n.o](e,guardedArea[1][o][1],guardedArea[1][o][2])}const l=[-399e3,-2,-399e3];"Code Block"===api[n.k](l)&&(g=readJson(l)?.explosivesEnabled)}function onPlayerLeave(e){getPromotedPlayers().find((o=>o.dbId===api[n.j](e)))&&(delete s[e],delete d[e]),A=A.filter((o=>o!==e))}function onWorldChangeBlock(e,o,i,r,l,s){return jfunction(['e', 'o', 'i', 'r', 'l', 's'], [e, o, i, r, l, s], 'onWorldChangeBlock');}function prettyPrintGuardedAreas(e,o){return jfunction(['e', 'o'], [e, o], 'prettyPrintGuardedAreas');}function readAllTrainingData(){let e="",o=M[0]+1;for(;"Unloaded"===api[n.k]([o,M[1],M[2]]););for(;"Code Block"===api[n.k]([o,M[1],M[2]]);){const i=readStorage([o,M[1],M[2]]);if(!i)break;e+=i,o++}return e?JSON.parse(e):{}}function readJson(e){return readStorage(e)?JSON.parse(readStorage(e)):void 0}function readStorage(e){api[n.k](e);const o=api.getBlockData(e[0],e[1],e[2])?.persisted?.shared?.text;return o}function removeGuardedArea(e,o,i){const r=api[n.j](e);for(let l=0;;l++){let s=[-399001,0,-399e3+l],d=api[n.k](s);if("Code Block"===d){const l=readJson(s);if((i||l.dbId===r)&&l.areaName===o){const i=api[n.b](),r=l.pos1,d=l.pos2;for(targetId of i)api.setCanChangeBlockRect(targetId,r,d);api[n.l](s,"Invisible Solid"),api[n.e](e,`[AI] Jumbo: Successfully un-guarded area: ${o}`,{color:"yellow"});break}}if("Code Block"!==d&&"Invisible Solid"!==d){api[n.e](e,`[AI] Jumbo: Guarded area "${o}" does not exist.`,{color:"yellow"});break}}}function setRank(e,o,i){return jfunction(['e', 'o', 'i'], [e, o, i], 'setRank');}function tick(){if(I&&(api[n.d](I,{color:"cyan"}),I=""),!x.finished){const o=readAllTrainingData();if(x=findClosestKey(x.input,o,x.bestScore,x.offset),x.finished){const i=x.bestKey;if(i){if(entry=o[i],entry&&entry.responses.length>0)var e=entry.responses[Math.floor(Math.random()*entry.responses.length)];api[n.d](`[AI] Jumbo: ${e}`,{color:"cyan"})}else api[n.d]("[AI] Jumbo: Uh oh, looks like I dont have an answer to that.",{color:"cyan"});x={input:"",bestKey:null,bestScore:1/0,finished:!0,offset:0}}}if(!m){eval(`${r[k]}Str = getData(${k})`);const e=[-399e3,-2,-399e3];for(;"Unloaded"===api[n.k](e););"Code Block"===api[n.k](e)&&(g=readJson(e)?.explosivesEnabled),k++,k>=Object.entries(r).length+1&&(m=!0)}if(h!==api[n.c]()){const e=getPromotedPlayers(),o=e.filter((e=>e.rank.includes(1)));for(let e=0;e<o.length;e++){let i=api[n.i](o[e].name);i&&api[n.f](i,"canEditCode",!0)}h=api[n.c]()}if(!c||!c.active)return;const o=Date.now(),t=c;if(o-t.lastTime<t.delay)return;if(t.y>t.maxY&&(t.y=t.minY,t.z+=t.chunkSizeZ),t.z>t.maxZ&&(t.z=t.minZ,t.x+=t.chunkSizeX),t.x>t.maxX)return t.active=!1,void(c=null);const i=Math.min(t.x+t.chunkSizeX-1,t.maxX),l=Math.min(t.y+t.chunkSizeY-1,t.maxY),s=Math.min(t.z+t.chunkSizeZ-1,t.maxZ);if(t.sphereMode){const[e,o,r]=t.sphereCenter,[d,c,p]=[t.sphereRadiusX,t.sphereRadiusY,t.sphereRadiusZ];getBlockNameValidity(t.blockName);for(let m=t.x;m<=i;m++)for(let i=t.y;i<=l;i++)for(let l=t.z;l<=s;l++){const s=(m-e)/d,h=(i-o)/c,y=(l-r)/p,b=s*s+h*h+y*y;b<=1&&(!t.sphereHollow||b>=.75)&&api[n.l](m,i,l,t.blockName)}}else if(t.cylinderMode){const[e,o,r]=t.sphereCenter,[d,c,p]=[t.sphereRadiusX,t.sphereRadiusY,t.sphereRadiusZ],m=t.cylinderMode;getBlockNameValidity(t.blockName);for(let h=t.x;h<=i;h++)for(let i=t.y;i<=l;i++)for(let l=t.z;l<=s;l++){const s=(h-e)/d,y=(i-o)/c,b=(l-r)/p;let k;1===m?k=y*y+b*b:2===m?k=s*s+b*b:3===m&&(k=s*s+y*y),k<=1&&(!t.sphereHollow||k>=.75)&&api[n.l](h,i,l,t.blockName)}}else if(t.wallsMode){const e=t.blockName;getBlockNameValidity(e);const[o,r]=[t.minX,t.minZ],[d,c]=[t.maxX,t.maxZ];for(let p=t.x;p<=i;p++)for(let i=t.y;i<=l;i++)for(let l=t.z;l<=s;l++)p!==o&&p!==d&&l!==r&&l!==c||api[n.l](p,i,l,e)}else if(t.randomBlock)for(let e=t.x;e<=i;e++)for(let o=t.y;o<=l;o++)for(let i=t.z;i<=s;i++)api[n.l](e,o,i,t.randomBlock());else if(t.texturizeTask){for(let e=t.x;e<=i;e++)for(let o=t.y;o<=l;o++)for(let i=t.z;i<=s;i++)if(api[n.k](e,o,i)===t.texturizeTarget&&Math.random()<.5){const r=t.texturizeOptions[Math.floor(Math.random()*t.texturizeOptions.length)];api[n.l](e,o,i,r)}}else api[n.m]([t.x,t.y,t.z],[i,l,s],t.blockName);t.lastTime=o,t.y+=t.chunkSizeY,t.chunksDone++;const d=Math.floor(t.chunksDone/t.totalChunks*100);d<J&&(J=0),d>J&&(J=d,100===d&&(J=0),api[n.d](`[AI] Jumbo: ${d}% complete`,{color:"yellow"}))}function tp(e,o,i){return jfunction(['e', 'o', 'i'], [e, o, i], 'tp');}function train(e,o){return jfunction(['e', 'o'], [e, o], 'train');}function worldbuildersetblock(e,o,i,r=300){return jfunction(['e', 'o', 'i', 'r=300'], [e, o, i, r=300], 'worldbuildersetblock');}function writeJson(e,o){o&&writeStorage(e,JSON.stringify(o))}function writeStorage(e,o){"Code Block"!==api[n.k](e)&&api[n.l](e,"Code Block"),api.setBlockData(e[0],e[1],e[2],{persisted:{shared:{text:o}}})}function writeTrainingData(e){return jfunction(['e'], [e], 'writeTrainingData');}
// end of code
!jadd <dev, admin, builder> playerName
!jremove <dev, admin, builder> playerName
!jtp all
!jtoggledanger
!jtp <to, here> name
!jkick name
!jkickall
!jguard "Area Name"
!jguardedareas
!jremoveguard
!jpos1 → sets pos1
!jpos2 → sets pos2
!jset "blockName"
!jrandomize "blockName" [number]% "blockName" [number]% "blockName" [number]%
!jtexturize "blockToTexturize" "blockToUse" "blockToUse" "blockToUse"
!jsphere "blockName" hollow (leave "hollow" blank for solid)
!jcylinder [axisOfCylinder: x, y, z] "blockName" hollow (leave "hollow" blank for solid)
!jwalls "blockName"
!jremote
!jstop
!jhelp
!jcredits