minecraft-renderer 0.1.20 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mesher.js +1 -1
- package/dist/mesher.js.map +2 -2
- package/dist/mesherWasm.js +56 -52
- package/dist/minecraft-renderer.js +53 -53
- package/dist/threeWorker.js +397 -397
- package/package.json +7 -2
- package/src/graphicsBackend/config.ts +3 -3
- package/src/graphicsBackend/types.ts +2 -2
- package/src/lib/worldrendererCommon.ts +12 -7
- package/src/mesher/mesher.ts +2 -2
- package/src/mesher/mesherWasm.ts +2 -2
- package/src/mesher/shared.ts +1 -1
- package/src/playground/allEntitiesDebug.ts +6 -4
- package/src/playground/scenes/allEntities.ts +1 -1
- package/src/playground/scenes/floorRandom.ts +1 -1
- package/src/three/appShared.ts +2 -2
- package/src/three/documentRenderer.ts +2 -2
- package/src/three/graphicsBackendBase.ts +2 -0
- package/src/three/holdingBlock.ts +1 -1
- package/src/three/modules/index.ts +2 -0
- package/src/three/modules/rain.ts +181 -0
- package/src/three/modules/sciFiWorldReveal.ts +9 -0
- package/src/three/modules/starfield.ts +9 -0
- package/src/three/renderSlot.ts +9 -9
- package/src/three/rendererModuleSystem.ts +3 -0
- package/src/three/worldRendererThree.ts +54 -19
- package/src/wasm-lib/render-from-wasm.ts +161 -161
- package/src/worldView/worldView.ts +1 -1
- package/wasm/wasm_mesher.d.ts +46 -0
- package/wasm/wasm_mesher.js +486 -0
- /package/{public → wasm}/wasm_mesher_bg.wasm +0 -0
package/dist/mesher.js
CHANGED
|
@@ -223,7 +223,7 @@ return ${t.callType("value",e)}
|
|
|
223
223
|
`).map(k=>JSON.stringify({text:k})));else if(Array.isArray(v))for(let k of v)k.toJSON?w.push(JSON.stringify(k.toJSON())):typeof k=="object"?w.push(JSON.stringify(k)):w.push(JSON.stringify({text:k}));return w},h=function(v,w){for(let[k,x]of Object.entries(w)){if(!(k in v)){v[k]=x;continue}typeof x=="object"&&!Array.isArray(x)&&h(v[k],w[k])}},m=function(v,w,k){let x=d(k);v.entity||(v.entity=ft.comp({id:ft.string(t.version[">="]("1.11")?"minecraft:sign":"Sign")})),h(v.entity,ft.comp({isWaxed:ft.byte(0),back_text:ft.comp({has_glowing_text:ft.byte(0),color:ft.string("black"),messages:ft.list(ft.string(['{"text":""}']))}),front_text:ft.comp({has_glowing_text:ft.byte(0),color:ft.string("black"),messages:ft.list(ft.string(['{"text":""}']))})})),v.entity.value[w].value.messages.value.value=x},p=function(v,w){return v.entity?v.entity?.value?.[w]?.value?.messages?.value?.value?.map(k=>typeof JSON.parse(k)=="string"?JSON.parse(k):new c(JSON.parse(k)).toString()).join(`
|
|
224
224
|
`)??"":""},y=function(v,w){let k=d(w);v.entity||(v.entity=ft.comp({id:ft.string(t.version[">="]("1.11")?"minecraft:sign":"Sign")})),Object.assign(v.entity.value,{Text1:ft.string(k[0]||'""'),Text2:ft.string(k[1]||'""'),Text3:ft.string(k[2]||'""'),Text4:ft.string(k[3]||'""')})},g=function(v){return v.entity?[v.entity.value.Text1.value,v.entity.value.Text2.value,v.entity.value.Text3.value,v.entity.value.Text4.value].map(k=>k||'"').map(k=>typeof JSON.parse(k)=="string"?JSON.parse(k):new c(JSON.parse(k)).toString()).join(`
|
|
225
225
|
`).trimEnd():""};var e=d,r=h,i=m,n=p,u=y,l=g;let c=VW()(t.version.minecraftVersion);return{sign:{setSignText(v,w){if(t.supportFeature("multiSidedSigns"))v!==void 0&&m(this,"front_text",v),w!==void 0&&m(this,"back_text",w);else if(v!==void 0&&y(this,v),w!==void 0)throw new Error(`Cannot set the back text of a sign on a version before 1.20 : ${t.version.minecraftVersion}`)},getSignText(){return t.supportFeature("multiSidedSigns")?[p(this,"front_text"),p(this,"back_text")]:[g(this)]},get signText(){return this.getSignText()[0]},set signText(v){this.setSignText(v)}}}}if(t.version.type==="bedrock")return{sign:{getSignText(){return this.entity?[this.entity.Text.value]:[""]},setSignText(c){this.entity||(this.entity=ft.comp({id:ft.string("Sign")})),Object.assign(this.entity.value,{Text:ft.string(Array.isArray(c)?c.join(`
|
|
226
|
-
`):c)})},get signText(){return this.getSignText()[0]},set signText(c){this.setSignText(c)}}}}});var Ut=f((fwt,ty)=>{a();o();s();ty.exports=nce;ty.exports.testedVersions=["1.8.8","1.9.4","1.10.2","1.11.2","1.12.2","1.13.2","1.14.4","1.15.2","1.16.4","1.17.1","1.18.1","bedrock_1.17.10","bedrock_1.18.0","1.20"];var vd=vr(),BW=pd(),tce=Object.entries(BW.legacy.pc.blocks).reduce((t,[e,r])=>{let i=r.replace("minecraft:","").split("[")[0],n=r.split("[")[1]?.replace("]","")??"";return(t[i]=t[i]||{})[n]=e,t},{}),kd=Object.entries(BW.legacy.pc.blocks).reduce((t,[e,r])=>{let i=r.split("[")[1]?.replace("]","");return t[e]=i?Object.fromEntries(i.split(",").map(n=>{let[u,l]=n.split("=");return isNaN(parseInt(l))||(l=parseInt(l)),[u,l]})):{},t},{});function rce(t){if(typeof t=="object")return t;let e={};for(let r of t.split(",")){let[i,n]=r.split("=");e[i]=n}return e}function ey(t,e){if(!e)return!0;e=rce(e);let r=t.getProperties();if(e.OR)return e.OR.some(i=>ey(t,i));for(let i in r){if(e[i]===void 0)continue;if(!(typeof e[i]!="string"?String(e[i]):e[i]).split("|").some(u=>u===String(r[i])))return!1}return!0}function nce(t){let e=typeof t=="string"?el()(t):t,r=e.version;return ace(e,{Biome:tl()(r.minecraftVersion),version:r})}var ice=[[0,0,0,1,1,1]];function ace(t,{Biome:e,version:r}){let i=IW()(t),n=r.type==="pc"&&t.supportFeature("blockStateId")||r.type==="bedrock",u=t.blockCollisionShapes;if(u)for(let y in t.blocks){let g=t.blocks[y],v=u.blocks[g.name];if(g.shapes=v instanceof Array?u.shapes[v[0]]:u.shapes[v],g.shapes||(console.error("No shape found for block "+g.name),g.shapes=[]),g.states||r.type==="bedrock"){if(v instanceof Array){g.stateShapes=[];for(let w in v)g.stateShapes.push(u.shapes[v[w]])}}else if("variations"in g)for(let w in g.variations){let k=g.variations[w].metadata;v instanceof Array?g.variations[w].shapes=u.shapes[v[k]]:g.variations[w].shapes=u.shapes[v]}!g.shapes&&r.type==="bedrock"&&(g.shapes=u.shapes[u.blocks.stone[0]],g.stateShapes=g.shapes)}function l(y,g){let v=t.effectsByName[y];if(!v)return 0;let w=g[v.id];return w?w.amplifier+1:0}function c(y,g){let v=t.enchantmentsByName[y];if(!v)return 0;for(let w of g)if(typeof w.name=="string"){if(w.name.includes(y))return w.lvl}else if(w.name===v.name)return w.lvl;return 0}function d(y){switch(y){case 0:return 1;case 1:return .3;case 2:return .09;case 3:return .0027;default:return 81e-5}}return class Sn{get interactionShapes(){let v=(()=>{let w=globalThis.interactionShapes?.[this.name];if(!w)return this.shapes?.length===0?ice[0].map(k=>k*16):[];if(!Array.isArray(w)){if(w.combine){let x=[];return Object.entries(w.combine).forEach(([S,V])=>{ey(this,S)&&x.push(V)}),x}let k;for(let[x,S]of Object.entries(w))if(ey(this,x)){k=S;break}return k??[]}return w})();return typeof v[0]=="number"?[v.map(w=>w/16)]:v.map(w=>w.map(k=>k/16))??[]}set interactionShapes(g){}constructor(g,v,w,k){if(this.type=g,this.metadata=w??0,this.light=0,this.skyLight=0,this.biome=new e(v),this.position=null,this.entity=void 0,this.stateId=k,this.computedStates={},k===void 0&&g!==void 0){let S=t.blocks[g];this.stateId=S===void 0?null:Math.min(S.minStateId+w,S.maxStateId)}let x=t.blocksByStateId[this.stateId];if(x){if(this.metadata=this.stateId-x.minStateId,this.type=x.id,this.name=x.name,this.hardness=x.hardness,this.displayName=x.displayName,this.shapes=x.shapes,this.interactionShapes=x.interactionShapes,x.stateShapes)x.stateShapes[this.metadata]!==void 0?this.shapes=x.stateShapes[this.metadata]:(this.shapes=x.stateShapes[0],this.missingStateShape=!0);else if(x.variations){let S=x.variations;for(let V in S)S[V].metadata===w&&(this.displayName=S[V].displayName,this.shapes=S[V].shapes)}this.boundingBox=x.boundingBox,this.transparent=x.transparent,this.diggable=x.diggable,this.material=x.material,this.harvestTools=x.harvestTools,this.drops=x.drops}else this.name="",this.displayName="",this.shapes=[],this.hardness=0,this.boundingBox="empty",this.transparent=!0,this.diggable=!1;if(this._properties={},r.type==="pc")if(n){let S=t.blocksByStateId[this.stateId];if(S&&S.states){let V=this.metadata;for(let E=S.states.length-1;E>=0;E--){let I=S.states[E];this._properties[I.name]=p(I,V%I.num_values),V=Math.floor(V/I.num_values)}}}else{if(this._properties=kd[this.type+":"+this.metadata]||kd[this.type+":0"]||{},!this._properties)for(let S=0;S<15&&(this._properties=kd[this.type+":"+S],!this._properties);S++);this._properties??={}}else if(r.type==="bedrock"){let S=t.blockStates?.[this.stateId]?.states||{};for(let V in S)this._properties[V]=S[V].value}else throw new Error("Unknown registry type: "+r.type);this.isWaterlogged=this._properties.waterlogged,this.name.includes("sign")&&sce(this,i.sign),x&&t.supportFeature("blockHashes")&&(this.hash=Sn.getHash(this.name,this._properties))}static fromStateId(g,v){return n?new Sn(void 0,v,0,g):new Sn(g>>4,v,g&15,g)}static fromProperties(g,v,w){let k=typeof g=="string"?t.blocksByName[g]:t.blocks[g];if(!k)throw new Error("No matching block id found for "+g+" with properties "+JSON.stringify(v));if(r.type==="pc")if(k.states){let x=0;for(let[S,V]of Object.entries(v))x+=m(k.states,S,V);return new Sn(void 0,w,0,k.minStateId+x)}else{let x=tce[k.name];for(let S in x){let V;for(let[E,I]of Object.entries(v)){let N=E+"="+I;if(!S.includes(N)){V=!0;break}}if(!V){let[E,I]=x[S].split(":").map(Number);return new Sn(E,w,I)}}throw new Error("No matching block state found for "+k.name+" with properties "+JSON.stringify(v))}else if(r.type==="bedrock"){for(let x=k.minStateId;x<=k.maxStateId;x++){let S=t.blockStates[x].states;if(!Object.entries(v).find(([V,E])=>S[V]?.value!==E))return new Sn(void 0,w,0,x)}return k}}static fromString(g,v){g.startsWith("minecraft:")&&(g=g.substring(10));let w=g.split("[",1)[0],k=g.slice(w.length+1,-1).split(",");return g.includes('["')?Sn.fromProperties(w,Object.fromEntries(k.map(x=>{let[S,V]=x.split(":");return[S.slice(1,-1),V.startsWith('"')?V.slice(1,-1):{true:1,false:0}[V]??parseInt(V)]})),v):Sn.fromProperties(w,Object.fromEntries(k.map(x=>x.split("="))),v)}get blockEntity(){return this.entity?vd.simplify(this.entity):void 0}getProperties(){return Object.assign(this._properties,this.computedStates)}changeProperties(g){if(n)throw new Error("Not implemented");{let v=Object.assign({},this._properties,Object.fromEntries(Object.entries(g).map(([V,E])=>typeof E=="boolean"?[V,`${E}`]:[V,E]))),w=V=>Object.entries(V).map(([E,I])=>E+"="+I).join(","),k=w(v),x,S=Object.entries(kd).find(([V,E])=>{if(+V.split(":")[0]===this.type)x=E;else return!1;return w(E)===k});if(!S)throw new Error("No matching block state found for "+this.name+" with properties "+JSON.stringify(g)+" last found state: "+JSON.stringify(x));return+S[0].split(":")[1]}}static getHash(g,v){if(t.supportFeature("blockHashes")){let w={};for(let S of Object.keys(v).sort())w[S]=v[S];let k=vd.comp({name:{type:"string",value:g.includes(":")?g:`minecraft:${g}`},states:vd.comp(w)}),x=vd.writeUncompressed(k,"little");return oce(x)}}canHarvest(g){return this.harvestTools?g&&this.harvestTools&&this.harvestTools[g]:!0}digTime(g,v,w,k,x=[],S={}){if(v)return 0;let V=t.materials[this.material],E=g&&V&&V[g],I=1;E&&(I=V[g]);let N=c("efficiency",x);N>0&&I>1&&(I+=N*N+1);let O=Math.max(l("Haste",S),l("ConduitPower",S));O>0&&(I*=1+.2*O);let T=l("MiningFatigue",S);T>0&&(I*=d(T));let R=c("aqua_affinity",x);w&&R===0&&(I/=5),k&&(I/=5);let J=this.hardness,re=this.canHarvest(g)?30:100,se=I/J/re;return J===-1&&(se=0),se===0?1/0:se>=1?0:Math.ceil(1/se)*50}};function h(y,g){if(g.type==="enum")return g.values.indexOf(y);if(g.type==="bool"){if(y===!0||y==="true")return 0;if(y===!1||y==="false")return 1}return g.type==="int"?y:g.values?.indexOf(y.toString())??0}function m(y,g,v){let w=1;for(let k=y.length-1;k>=0;k--){let x=y[k];if(x.name===g)return w*h(v,x);w*=x.num_values}return 0}function p(y,g){return y.type==="enum"||y.values?y.values[g]:y.type==="bool"?!g:g}}function sce(t,e){Object.defineProperties(t,Object.getOwnPropertyDescriptors(e))}function oce(t){let r=2166136261;for(let i=0;i<t.length;i++)r^=t[i]&255,r+=(r<<1)+(r<<4)+(r<<7)+(r<<8)+(r<<24);return r&4294967295}});var AW=f((gwt,jW)=>{a();o();s();var uce=sn(),Gi=Dw(),lce=wa().Vec3,NW=256,ry=256,{w:gt,l:bt,sh:Wt}=Gi,Ht=ry>>4;jW.exports=t=>{let e=Ut()(t);return class LW extends uce{static get section(){return Gi}static get w(){return gt}static get l(){return bt}static get h(){return ry}static get version(){return t.version}constructor(){super(t),this.skyLightSent=!0,this.minY=0,this.worldHeight=ry,this.sections=new Array(Ht);for(let i=0;i<Ht;i++)this.sections[i]=new Gi;this.biome=Buffer.alloc(NW)}toJson(){return JSON.stringify({skyLightSent:this.skyLightSent,biome:this.biome.toJSON(),blockEntities:this.blockEntities,sections:this.sections.map(i=>i.toJson())})}static fromJson(i){let n=JSON.parse(i),u=new LW;return u.skyLightSent=n.skyLightSent,u.biome=Buffer.from(n.biome),u.blockEntities=n.blockEntities,u.sections=n.sections.map(l=>Gi.fromJson(l)),u}initialize(i){let n=0;for(let u=0;u<Ht;u++)this.sections[u].initialize((l,c,d,h)=>{let m=i(l,c%Wt,d,h);if(m!=null)return c===0&&Ht===0&&(this.biome.writeUInt8(m.biome.id||0,n),n++),m})}getBlock(i){let n=new e(this.getBlockType(i),this.getBiome(i),this.getBlockData(i));return n.light=this.getBlockLight(i),n.skyLight=this.getSkyLight(i),n.entity=this.getBlockEntity(i),n}setBlock(i,n){il(n.type)&&this.setBlockType(i,n.type),il(n.metadata)&&this.setBlockData(i,n.metadata),il(n.biome)&&this.setBiome(i,n.biome.id),il(n.skyLight)&&this.skyLightSent&&this.setSkyLight(i,n.skyLight),il(n.light)&&this.setBlockLight(i,n.light),n.entity?this.setBlockEntity(i,n.entity):this.removeBlockEntity(i)}_getSection(i){return this.sections[i.y>>4]}getBlockStateId(i){let n=this._getSection(i);return n?n.getBlockStateId(si(i)):0}getBlockType(i){let n=this._getSection(i);return n?n.getBlockType(si(i)):0}getBlockData(i){let n=this._getSection(i);return n?n.getBlockData(si(i)):0}getBlockLight(i){let n=this._getSection(i);return n?n.getBlockLight(si(i)):0}getSkyLight(i){if(!this.skyLightSent)return 0;let n=this._getSection(i);return n?n.getSkyLight(si(i)):15}getBiome(i){let n=PW(i);return this.biome.readUInt8(n)}setBlockStateId(i,n){let u=this._getSection(i);return u&&u.setBlockStateId(si(i),n)}setBlockType(i,n){let u=this.getBlockData(i);this.setBlockStateId(i,n<<4|u)}setBlockData(i,n){let u=this.getBlockType(i);this.setBlockStateId(i,u<<4|n)}setBlockLight(i,n){let u=this._getSection(i);return u&&u.setBlockLight(si(i),n)}setSkyLight(i,n){let u=this._getSection(i);return u&&u.setSkyLight(si(i),n)}setBiome(i,n){let u=PW(i);this.biome.writeUInt8(n,u)}dumpBiomes(){}dumpLight(){}loadLight(){}dumpLightNew(){return{sections:this.sections.map(i=>i.toJson())}}loadLightNew(i){this.sections=i.sections.map(n=>Gi.fromJson(n))}loadBiomes(){}dump(i=65535,n=!0){let u=Gi.sectionSize(this.skyLightSent&&n),{chunkIncluded:l,chunkCount:c}=TW(i),d=c*u+NW,h=Buffer.alloc(d),m=0,p=gt*bt*Ht*c*2,y=this.skyLightSent&&n?gt*bt*Ht*c/2*5:void 0;for(let g=0;g<Ht;g++)l[g]&&(m+=this.sections[g].dump().copy(h,m,0,gt*bt*Wt*2),p+=this.sections[g].dump().copy(h,p,gt*bt*Wt*2,gt*bt*Wt*2+gt*bt*Wt/2),this.skyLightSent&&n&&(y+=this.sections[g].dump().copy(h,y,gt*bt*Wt/2*5,gt*bt*Wt/2*5+gt*bt*Wt/2)));return this.biome.copy(h,gt*bt*Ht*c*(this.skyLightSent&&n?3:5/2)),h}load(i,n=65535,u=!0,l=!0){if(!Buffer.isBuffer(i))throw new Error("Data must be a buffer");this.skyLightSent=u;let c=Gi.sectionSize(u),{chunkIncluded:d,chunkCount:h}=TW(n),m=0,p=gt*bt*Ht*h*2,y=this.skyLightSent?gt*bt*Ht*h/2*5:void 0;for(let v=0;v<Ht;v++)if(d[v]){let w=Buffer.alloc(c);m+=i.copy(w,0,m,m+gt*bt*Wt*2),p+=i.copy(w,gt*bt*Wt*2,p,p+gt*bt*Wt/2),this.skyLightSent&&(y+=i.copy(w,gt*bt*Wt*5/2,y,y+gt*bt*Wt/2)),this.sections[v].load(w,u)}l&&i.copy(this.biome,0,gt*bt*Ht*h*(u?3:5/2));let g=c*h+(l?gt*bt:0);if(i.length!==g)throw new Error(`Data buffer not correct size (was ${i.length}, expected ${g})`)}getMask(){return 65535}}};var il=function(t){return t!==void 0},PW=function(t){return t.z*gt+t.x};function si(t){return t.modulus(new lce(gt,bt,Wt))}function TW(t){let e=new Array(Ht),r=0;for(let i=0;i<Ht;++i)e[i]=t&1<<i,e[i]&&r++;return{chunkIncluded:e,chunkCount:r}}});var qt=f((bwt,OW)=>{a();o();s();OW.exports={CHUNK_HEIGHT:256,CHUNK_WIDTH:16,SECTION_HEIGHT:16,SECTION_WIDTH:16,BLOCK_SECTION_VOLUME:4096,NUM_SECTIONS:16,MIN_BITS_PER_BLOCK:4,MAX_BITS_PER_BLOCK:8,GLOBAL_BITS_PER_BLOCK:16,BIOME_SECTION_VOLUME:64,MIN_BITS_PER_BIOME:1,MAX_BITS_PER_BIOME:3,GLOBAL_BITS_PER_BIOME:6}});var RW=f(qn=>{"use strict";a();o();s();Object.defineProperty(qn,"__esModule",{value:!0});var CW=(_r(),Bt(Ar)),Yi={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};qn.ERRORS=Yi;function cce(t){if(!CW.Buffer.isEncoding(t))throw new Error(Yi.INVALID_ENCODING)}qn.checkEncoding=cce;function MW(t){return typeof t=="number"&&isFinite(t)&&pce(t)}qn.isFiniteInteger=MW;function $W(t,e){if(typeof t=="number"){if(!MW(t)||t<0)throw new Error(e?Yi.INVALID_OFFSET:Yi.INVALID_LENGTH)}else throw new Error(e?Yi.INVALID_OFFSET_NON_NUMBER:Yi.INVALID_LENGTH_NON_NUMBER)}function fce(t){$W(t,!1)}qn.checkLengthValue=fce;function dce(t){$W(t,!0)}qn.checkOffsetValue=dce;function hce(t,e){if(t<0||t>e.length)throw new Error(Yi.INVALID_TARGET_OFFSET)}qn.checkTargetOffset=hce;function pce(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}function gce(t){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof CW.Buffer.prototype[t]>"u")throw new Error(`Platform does not support Buffer.prototype.${t}.`)}qn.bigIntAndBufferInt64Check=gce});var oi=f(iy=>{"use strict";a();o();s();Object.defineProperty(iy,"__esModule",{value:!0});var Be=RW(),zW=4096,mce="utf8",ny=class t{constructor(e){if(this.length=0,this._encoding=mce,this._writeOffset=0,this._readOffset=0,t.isSmartBufferOptions(e))if(e.encoding&&(Be.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(Be.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(Be.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(e.buff)if(Buffer.isBuffer(e.buff))this._buff=e.buff,this.length=e.buff.length;else throw new Error(Be.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(zW);else{if(typeof e<"u")throw new Error(Be.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(zW)}}static fromSize(e,r){return new this({size:e,encoding:r})}static fromBuffer(e,r){return new this({buff:e,encoding:r})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let r=e;return r&&(r.encoding!==void 0||r.size!==void 0||r.buff!==void 0)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffer.prototype.readInt32BE,4,e)}readInt32LE(e){return this._readNumberValue(Buffer.prototype.readInt32LE,4,e)}readBigInt64BE(e){return Be.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){return Be.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,e)}writeInt8(e,r){return this._writeNumberValue(Buffer.prototype.writeInt8,1,e,r),this}insertInt8(e,r){return this._insertNumberValue(Buffer.prototype.writeInt8,1,e,r)}writeInt16BE(e,r){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,e,r)}insertInt16BE(e,r){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,e,r)}writeInt16LE(e,r){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,e,r)}insertInt16LE(e,r){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,e,r)}writeInt32BE(e,r){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,e,r)}insertInt32BE(e,r){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,e,r)}writeInt32LE(e,r){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,e,r)}insertInt32LE(e,r){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,e,r)}writeBigInt64BE(e,r){return Be.bigIntAndBufferInt64Check("writeBigInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,e,r)}insertBigInt64BE(e,r){return Be.bigIntAndBufferInt64Check("writeBigInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,e,r)}writeBigInt64LE(e,r){return Be.bigIntAndBufferInt64Check("writeBigInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,e,r)}insertBigInt64LE(e,r){return Be.bigIntAndBufferInt64Check("writeBigInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,e,r)}readUInt8(e){return this._readNumberValue(Buffer.prototype.readUInt8,1,e)}readUInt16BE(e){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,e)}readUInt16LE(e){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,e)}readUInt32BE(e){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,e)}readUInt32LE(e){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,e)}readBigUInt64BE(e){return Be.bigIntAndBufferInt64Check("readBigUInt64BE"),this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,e)}readBigUInt64LE(e){return Be.bigIntAndBufferInt64Check("readBigUInt64LE"),this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,e)}writeUInt8(e,r){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,e,r)}insertUInt8(e,r){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,e,r)}writeUInt16BE(e,r){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,e,r)}insertUInt16BE(e,r){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,e,r)}writeUInt16LE(e,r){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,e,r)}insertUInt16LE(e,r){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,e,r)}writeUInt32BE(e,r){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,e,r)}insertUInt32BE(e,r){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,e,r)}writeUInt32LE(e,r){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,e,r)}insertUInt32LE(e,r){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,e,r)}writeBigUInt64BE(e,r){return Be.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,r)}insertBigUInt64BE(e,r){return Be.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,r)}writeBigUInt64LE(e,r){return Be.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,r)}insertBigUInt64LE(e,r){return Be.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,r)}readFloatBE(e){return this._readNumberValue(Buffer.prototype.readFloatBE,4,e)}readFloatLE(e){return this._readNumberValue(Buffer.prototype.readFloatLE,4,e)}writeFloatBE(e,r){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,e,r)}insertFloatBE(e,r){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,e,r)}writeFloatLE(e,r){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,e,r)}insertFloatLE(e,r){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,e,r)}readDoubleBE(e){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,e)}readDoubleLE(e){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,e)}writeDoubleBE(e,r){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,e,r)}insertDoubleBE(e,r){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,e,r)}writeDoubleLE(e,r){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,e,r)}insertDoubleLE(e,r){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,e,r)}readString(e,r){let i;typeof e=="number"?(Be.checkLengthValue(e),i=Math.min(e,this.length-this._readOffset)):(r=e,i=this.length-this._readOffset),typeof r<"u"&&Be.checkEncoding(r);let n=this._buff.slice(this._readOffset,this._readOffset+i).toString(r||this._encoding);return this._readOffset+=i,n}insertString(e,r,i){return Be.checkOffsetValue(r),this._handleString(e,!0,r,i)}writeString(e,r,i){return this._handleString(e,!1,r,i)}readStringNT(e){typeof e<"u"&&Be.checkEncoding(e);let r=this.length;for(let n=this._readOffset;n<this.length;n++)if(this._buff[n]===0){r=n;break}let i=this._buff.slice(this._readOffset,r);return this._readOffset=r+1,i.toString(e||this._encoding)}insertStringNT(e,r,i){return Be.checkOffsetValue(r),this.insertString(e,r,i),this.insertUInt8(0,r+e.length),this}writeStringNT(e,r,i){return this.writeString(e,r,i),this.writeUInt8(0,typeof r=="number"?r+e.length:this.writeOffset),this}readBuffer(e){typeof e<"u"&&Be.checkLengthValue(e);let r=typeof e=="number"?e:this.length,i=Math.min(this.length,this._readOffset+r),n=this._buff.slice(this._readOffset,i);return this._readOffset=i,n}insertBuffer(e,r){return Be.checkOffsetValue(r),this._handleBuffer(e,!0,r)}writeBuffer(e,r){return this._handleBuffer(e,!1,r)}readBufferNT(){let e=this.length;for(let i=this._readOffset;i<this.length;i++)if(this._buff[i]===0){e=i;break}let r=this._buff.slice(this._readOffset,e);return this._readOffset=e+1,r}insertBufferNT(e,r){return Be.checkOffsetValue(r),this.insertBuffer(e,r),this.insertUInt8(0,r+e.length),this}writeBufferNT(e,r){return typeof r<"u"&&Be.checkOffsetValue(r),this.writeBuffer(e,r),this.writeUInt8(0,typeof r=="number"?r+e.length:this._writeOffset),this}clear(){return this._writeOffset=0,this._readOffset=0,this.length=0,this}remaining(){return this.length-this._readOffset}get readOffset(){return this._readOffset}set readOffset(e){Be.checkOffsetValue(e),Be.checkTargetOffset(e,this),this._readOffset=e}get writeOffset(){return this._writeOffset}set writeOffset(e){Be.checkOffsetValue(e),Be.checkTargetOffset(e,this),this._writeOffset=e}get encoding(){return this._encoding}set encoding(e){Be.checkEncoding(e),this._encoding=e}get internalBuffer(){return this._buff}toBuffer(){return this._buff.slice(0,this.length)}toString(e){let r=typeof e=="string"?e:this._encoding;return Be.checkEncoding(r),this._buff.toString(r,0,this.length)}destroy(){return this.clear(),this}_handleString(e,r,i,n){let u=this._writeOffset,l=this._encoding;typeof i=="number"?u=i:typeof i=="string"&&(Be.checkEncoding(i),l=i),typeof n=="string"&&(Be.checkEncoding(n),l=n);let c=Buffer.byteLength(e,l);return r?this.ensureInsertable(c,u):this._ensureWriteable(c,u),this._buff.write(e,u,c,l),r?this._writeOffset+=c:typeof i=="number"?this._writeOffset=Math.max(this._writeOffset,u+c):this._writeOffset+=c,this}_handleBuffer(e,r,i){let n=typeof i=="number"?i:this._writeOffset;return r?this.ensureInsertable(e.length,n):this._ensureWriteable(e.length,n),e.copy(this._buff,n),r?this._writeOffset+=e.length:typeof i=="number"?this._writeOffset=Math.max(this._writeOffset,n+e.length):this._writeOffset+=e.length,this}ensureReadable(e,r){let i=this._readOffset;if(typeof r<"u"&&(Be.checkOffsetValue(r),i=r),i<0||i+e>this.length)throw new Error(Be.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(e,r){Be.checkOffsetValue(r),this._ensureCapacity(this.length+e),r<this.length&&this._buff.copy(this._buff,r+e,r,this._buff.length),r+e>this.length?this.length=r+e:this.length+=e}_ensureWriteable(e,r){let i=typeof r=="number"?r:this._writeOffset;this._ensureCapacity(i+e),i+e>this.length&&(this.length=i+e)}_ensureCapacity(e){let r=this._buff.length;if(e>r){let i=this._buff,n=r*3/2+1;n<e&&(n=e),this._buff=Buffer.allocUnsafe(n),i.copy(this._buff,0,0,r)}}_readNumberValue(e,r,i){this.ensureReadable(r,i);let n=e.call(this._buff,typeof i=="number"?i:this._readOffset);return typeof i>"u"&&(this._readOffset+=r),n}_insertNumberValue(e,r,i,n){return Be.checkOffsetValue(n),this.ensureInsertable(r,n),e.call(this._buff,i,n),this._writeOffset+=r,this}_writeNumberValue(e,r,i,n){if(typeof n=="number"){if(n<0)throw new Error(Be.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);Be.checkOffsetValue(n)}let u=typeof n=="number"?n:this._writeOffset;return this._ensureWriteable(r,u),e.call(this._buff,i,u),typeof n=="number"?this._writeOffset=Math.max(this._writeOffset,u+r):this._writeOffset+=r,this}};iy.SmartBuffer=ny});var Ct=f((Pwt,DW)=>{a();o();s();function _ce(t){return 32-Math.clz32(t)}DW.exports=_ce});var Ki=f((Awt,FW)=>{a();o();s();var yce=Ct(),ay=class t{constructor(e){if(e===null)return;e.data||(e.data=new Uint32Array(Math.ceil(e.capacity*e.bitsPerValue/64)*2));let r=(1<<e.bitsPerValue)-1;this.data=e.data.buffer?new Uint32Array(e.data.buffer):Uint32Array.from(e.data),this.capacity=e.capacity,this.bitsPerValue=e.bitsPerValue,this.valueMask=r}toJson(){return JSON.stringify({data:Array.from(this.data),capacity:this.capacity,bitsPerValue:this.bitsPerValue,valueMask:this.valueMask})}static fromJson(e){return new t(JSON.parse(e))}toArray(){let e=[];for(let r=0;r<this.capacity;r++)e.push(this.get(r));return e}static fromArray(e,r){let i=[],n=0,u=0,l=0;for(;n<e.length;)u|=e[n]<<l,l+=r,l>32&&(i.push(u&4294967295),l-=32,u=e[n]>>>r-l),n++;l>0&&i.push(u);let c=new t(null);return c.data=i,c.capacity=e.length,c.bitsPerValue=r,c.valueMask=(1<<r)-1,c}get(e){let r=e*this.bitsPerValue,i=r>>>5,n=this.data[i],u=r&31,l=n>>>u;if(u+this.bitsPerValue>32){let d=this.data[i+1];l|=d<<32-u}return l&this.valueMask}set(e,r){let i=e*this.bitsPerValue,n=i>>>5,u=i&31;this.data[n]=(this.data[n]&~(this.valueMask<<u)|(r&this.valueMask)<<u)>>>0;let l=u+this.bitsPerValue;l>32&&(this.data[n+1]=(this.data[n+1]&~((1<<l-32)-1)|r>>32-u)>>>0)}resizeTo(e){let r=new t({bitsPerValue:e,capacity:this.capacity});for(let i=0;i<this.capacity;++i){let n=this.get(i);if(yce(n)>e)throw new Error("existing value in BitArray can't fit in new bits per value");r.set(i,n)}return r}length(){return this.data.length/2}readBuffer(e,r=this.data.length){if(r!==this.data.length){this.data=new Uint32Array(r),this.readOffset=r*4;return}for(let i=0;i<this.data.length;i+=2)this.data[i+1]=e.readUInt32BE(),this.data[i]=e.readUInt32BE();return this}writeBuffer(e){for(let r=0;r<this.data.length;r+=2)e.writeUInt32BE(this.data[r+1]),e.writeUInt32BE(this.data[r]);return this}getBitsPerValue(){return this.bitsPerValue}};FW.exports=ay});var ar=f(sy=>{a();o();s();sy.write=(t,e)=>{do{let r=e&127;e>>>=7,e!==0&&(r|=128),t.writeUInt8(r)}while(e!==0)};sy.read=t=>{let e=0,r=0,i;do{i=t.readUInt8();let n=i&127;if(r|=n<<7*e,e++,e>5)throw new Error("varint is too big")}while(i&128);return r}});var JW=f((Fwt,UW)=>{a();o();s();var Qi=Ki(),bce=Ct(),Zi=qt(),xd=ar(),wce=13;function Gs(t){return t.y<<8|t.z<<4|t.x}var oy=class t{constructor(e={}){if(e!==null){if(typeof e.solidBlockCount>"u"&&(e.solidBlockCount=0,e.data))for(let r=0;r<Zi.BLOCK_SECTION_VOLUME;r++)e.data.get(r)!==0&&(e.solidBlockCount+=1);e.data||(e.data=new Qi({bitsPerValue:4,capacity:Zi.BLOCK_SECTION_VOLUME})),e.palette===void 0&&(e.palette=[0]),e.blockLight||(e.blockLight=new Qi({bitsPerValue:4,capacity:Zi.BLOCK_SECTION_VOLUME})),e.skyLight===void 0&&(e.skyLight=new Qi({bitsPerValue:4,capacity:Zi.BLOCK_SECTION_VOLUME})),this.data=e.data,this.palette=e.palette,this.isDirty=!1,this.blockLight=e.blockLight,this.skyLight=e.skyLight,this.solidBlockCount=e.solidBlockCount,this.maxBitsPerBlock=e.maxBitsPerBlock||wce}}toJson(){return JSON.stringify({data:this.data.toJson(),palette:this.palette,isDirty:this.isDirty,blockLight:this.blockLight.toJson(),skyLight:this.skyLight?this.skyLight.toJson():this.skyLight,solidBlockCount:this.solidBlockCount})}static fromJson(e){let r=JSON.parse(e);return new t({data:Qi.fromJson(r.data),palette:r.palette,blockLight:Qi.fromJson(r.blockLight),skyLight:r.skyLight?Qi.fromJson(r.skyLight):r.skyLight,solidBlockCount:r.solidBlockCount})}getBlock(e){let r=this.data.get(Gs(e));return this.palette!==null&&(r=this.palette[r]),r}setBlock(e,r){let i=Gs(e),n;if(this.palette!==null){let l=this.palette.indexOf(r);if(l>=0)n=l;else{this.palette.push(r),n=this.palette.length-1;let c=bce(n);if(c>this.data.getBitsPerValue())if(c<=Zi.MAX_BITS_PER_BLOCK)this.data=this.data.resizeTo(c);else{let d=new Qi({bitsPerValue:this.maxBitsPerBlock,capacity:Zi.BLOCK_SECTION_VOLUME});for(let h=0;h<Zi.BLOCK_SECTION_VOLUME;h++){let m=this.palette[this.data.get(h)];d.set(h,m)}this.palette=null,n=r,this.data=d}}}else n=r;let u=this.getBlock(e);r===0&&u!==0?this.solidBlockCount-=1:r!==0&&u===0&&(this.solidBlockCount+=1),this.data.set(i,n)}getBlockLight(e){return this.blockLight.get(Gs(e))}getSkyLight(e){return this.skyLight?this.skyLight.get(Gs(e)):0}setBlockLight(e,r){return this.blockLight.set(Gs(e),r)}setSkyLight(e,r){return this.skyLight?this.skyLight.set(Gs(e),r):0}isEmpty(){return this.solidBlockCount===0}write(e){e.writeUInt8(this.data.getBitsPerValue()),this.palette!==null?(xd.write(e,this.palette.length),this.palette.forEach(r=>{xd.write(e,r)})):xd.write(e,0),xd.write(e,this.data.length()),this.data.writeBuffer(e),this.blockLight.writeBuffer(e),this.skyLight!==null&&this.skyLight.writeBuffer(e)}};UW.exports=oy});var KW=f((Hwt,YW)=>{a();o();s();var WW=oi().SmartBuffer,Sd=JW(),Ir=qt(),al=Ki(),qd=ar(),vce=sn(),kce=Ct(),sl=t=>t!==void 0;YW.exports=(t,e)=>class GW extends vce{static get section(){return Sd}constructor(){super(e),this.sectionMask=0,this.skyLightSent=!0,this.sections=Array(Ir.NUM_SECTIONS).fill(null),this.biomes=Array(Ir.SECTION_WIDTH*Ir.SECTION_WIDTH).fill(1),this.maxBitsPerBlock=kce(Object.values(e.blocks).reduce((i,n)=>Math.max(i,n.maxStateId),0))}toJson(){return JSON.stringify({biomes:this.biomes,blockEntities:this.blockEntities,sectionMask:this.sectionMask,sections:this.sections.map(i=>i===null?null:i.toJson())})}static fromJson(i){let n=JSON.parse(i),u=new GW;return u.biomes=n.biomes,u.blockEntities=n.blockEntities,u.sectionMask=n.sectionMask,u.sections=n.sections.map(l=>l===null?null:Sd.fromJson(l)),u}initialize(i){let n={x:0,y:0,z:0};for(n.y=0;n.y<Ir.CHUNK_HEIGHT;n.y++)for(n.z=0;n.z<Ir.SECTION_WIDTH;n.z++)for(n.x=0;n.x<Ir.SECTION_WIDTH;n.x++){let u=i(n.x,n.y,n.z);u!==null&&this.setBlock(n,u)}}getBlock(i){let n=new t(this.getBlockType(i),this.getBiome(i),this.getBlockData(i));return n.light=this.getBlockLight(i),n.skyLight=this.getSkyLight(i),n.entity=this.getBlockEntity(i),n}setBlock(i,n){sl(n.type)&&this.setBlockType(i,n.type),sl(n.metadata)&&this.setBlockData(i,n.metadata),sl(n.biome)&&this.setBiome(i,n.biome.id),sl(n.skyLight)&&this.skyLightSent&&this.setSkyLight(i,n.skyLight),sl(n.light)&&this.setBlockLight(i,n.light),n.entity?this.setBlockEntity(i,n.entity):this.removeBlockEntity(i)}getBlockType(i){return this.getBlockStateId(i)>>4}getBlockData(i){return this.getBlockStateId(i)&15}getBlockStateId(i){let n=this.sections[i.y>>4];return n?n.getBlock(Ys(i)):0}getBlockLight(i){let n=this.sections[i.y>>4];return n?n.getBlockLight(Ys(i)):15}getSkyLight(i){let n=this.sections[i.y>>4];return n?n.getSkyLight(Ys(i)):15}getBiome(i){return this.biomes[HW(i)]}setBlockType(i,n){let u=this.getBlockData(i);this.setBlockStateId(i,n<<4|u)}setBlockData(i,n){let u=this.getBlockType(i);this.setBlockStateId(i,u<<4|n)}setBlockStateId(i,n){let u=i.y>>4;if(u<0||u>=16)return;let l=this.sections[u];if(!l){if(n===0)return;l=new Sd({maxBitsPerBlock:this.maxBitsPerBlock}),this.sectionMask|=1<<u,this.sections[u]=l}l.setBlock(Ys(i),n)}setBlockLight(i,n){let u=this.sections[i.y>>4];return u&&u.setBlockLight(Ys(i),n)}setSkyLight(i,n){let u=this.sections[i.y>>4];return u&&u.setSkyLight(Ys(i),n)}setBiome(i,n){this.biomes[HW(i)]=n}getMask(){return this.sectionMask}dumpBiomes(){}dumpLight(){}loadLight(){}dumpLightNew(){return{skyLightSections:this.sections.map(i=>i===null?null:i.skyLight.toJson()),blockLightSections:this.sections.map(i=>i===null?null:i.blockLight.toJson()),skyLightMask:0,blockLightMask:0,emptySkyLightMask:0,emptyBlockLightMask:0}}loadLightNew(i){let{skyLightSections:n,blockLightSections:u}=i;n.forEach((l,c)=>{this.sections[c]!==null&&(this.sections[c].skyLight=al.fromJson(l))}),u.forEach((l,c)=>{this.sections[c]!==null&&(this.sections[c].blockLight=al.fromJson(l))})}loadBiomes(){}dump(){let i=new WW;return this.sections.forEach((n,u)=>{n!==null&&!n.isEmpty()&&n.write(i)}),this.biomes.forEach(n=>{i.writeUInt8(n)}),i.length?i.toBuffer():Buffer.alloc(4096)}load(i,n=65535,u=!0,l=!0){let c=WW.fromBuffer(i);this.skyLightSent=u,this.sectionMask|=n;for(let d=0;d<Ir.NUM_SECTIONS;++d){if(!(n>>d&1))continue;let h,m,p=c.readUInt8();if(p<=Ir.MAX_BITS_PER_BLOCK){h=[];let w=qd.read(c);for(let k=0;k<w;++k)h.push(qd.read(c))}else qd.read(c),h=null;let y=new al({bitsPerValue:p>Ir.MAX_BITS_PER_BLOCK?this.maxBitsPerBlock:p,capacity:4096}).readBuffer(c,qd.read(c)*2),g=new al({bitsPerValue:4,capacity:4096}).readBuffer(c);u&&(m=new al({bitsPerValue:4,capacity:4096}).readBuffer(c));let v=new Sd({data:y,palette:h,blockLight:g,...u?{skyLight:m}:{skyLight:null},maxBitsPerBlock:this.maxBitsPerBlock});this.sections[d]=v}if(l){let d={x:0,y:0,z:0};for(d.z=0;d.z<Ir.SECTION_WIDTH;d.z++)for(d.x=0;d.x<Ir.SECTION_WIDTH;d.x++)this.setBiome(d,c.readUInt8())}}};function HW(t){return t.z*16|t.x}function Ys(t){return{x:t.x,y:t.y&15,z:t.z}}});var ol=f((Qwt,QW)=>{a();o();s();var xce=qt();function Sce(t){let e=Ut()(t),r=KW()(e,t);return r.h=xce.CHUNK_HEIGHT,r.version=t.version,r}QW.exports=Sce});var XW=f((t0t,ZW)=>{a();o();s();var Xi=Ki(),qce=Ct(),ea=qt(),uy=ar(),Vce=13;function Ks(t){return t.y*16*16+t.z*16+t.x}var ly=class t{constructor(e={}){if(e!==null){if(typeof e.solidBlockCount>"u"&&(e.solidBlockCount=0,e.data))for(let r=0;r<ea.BLOCK_SECTION_VOLUME;r++)e.data.get(r)!==0&&(e.solidBlockCount+=1);e.data||(e.data=new Xi({bitsPerValue:4,capacity:ea.BLOCK_SECTION_VOLUME})),e.palette===void 0&&(e.palette=[0]),e.blockLight||(e.blockLight=new Xi({bitsPerValue:4,capacity:ea.BLOCK_SECTION_VOLUME})),e.skyLight===void 0&&(e.skyLight=new Xi({bitsPerValue:4,capacity:ea.BLOCK_SECTION_VOLUME})),this.data=e.data,this.palette=e.palette,this.isDirty=!1,this.blockLight=e.blockLight,this.skyLight=e.skyLight,this.solidBlockCount=e.solidBlockCount,this.maxBitsPerBlock=e.maxBitsPerBlock||Vce}}toJson(){return JSON.stringify({data:this.data.toJson(),palette:this.palette,isDirty:this.isDirty,blockLight:this.blockLight.toJson(),skyLight:this.skyLight?this.skyLight.toJson():this.skyLight,solidBlockCount:this.solidBlockCount})}static fromJson(e){let r=JSON.parse(e);return new t({data:Xi.fromJson(r.data),palette:r.palette,blockLight:Xi.fromJson(r.blockLight),skyLight:r.skyLight?Xi.fromJson(r.skyLight):r.skyLight,solidBlockCount:r.solidBlockCount})}getBlock(e){let r=this.data.get(Ks(e));return this.palette!==null&&(r=this.palette[r]),r}setBlock(e,r){let i=Ks(e),n;if(this.palette!==null){let l=this.palette.indexOf(r);if(l>=0)n=l;else{this.palette.push(r),n=this.palette.length-1;let c=qce(n);if(c>this.data.getBitsPerValue())if(c<=ea.MAX_BITS_PER_BLOCK)this.data=this.data.resizeTo(c);else{let d=new Xi({bitsPerValue:this.maxBitsPerBlock,capacity:ea.BLOCK_SECTION_VOLUME});for(let h=0;h<ea.BLOCK_SECTION_VOLUME;h++){let m=this.palette[this.data.get(h)];d.set(h,m)}this.palette=null,n=r,this.data=d}}}else n=r;let u=this.getBlock(e);r===0&&u!==0?this.solidBlockCount-=1:r!==0&&u===0&&(this.solidBlockCount+=1),this.data.set(i,n)}getBlockLight(e){return this.blockLight.get(Ks(e))}getSkyLight(e){return this.skyLight?this.skyLight.get(Ks(e)):0}setBlockLight(e,r){return this.blockLight.set(Ks(e),r)}setSkyLight(e,r){return this.skyLight?this.skyLight.set(Ks(e),r):0}isEmpty(){return this.solidBlockCount===0}write(e){e.writeUInt8(this.data.getBitsPerValue()),this.palette!==null&&(uy.write(e,this.palette.length),this.palette.forEach(r=>{uy.write(e,r)})),uy.write(e,this.data.length()),this.data.writeBuffer(e),this.blockLight.writeBuffer(e),this.skyLight!==null&&this.skyLight.writeBuffer(e)}};ZW.exports=ly});var iH=f((a0t,nH)=>{a();o();s();var eH=oi().SmartBuffer,Vd=XW(),Br=qt(),ul=Ki(),cy=ar(),Ece=sn(),Ice=Ct();nH.exports=(t,e)=>class rH extends Ece{static get section(){return Vd}constructor(){super(e),this.sectionMask=0,this.skyLightSent=!0,this.sections=Array(Br.NUM_SECTIONS).fill(null),this.biomes=Array(Br.SECTION_WIDTH*Br.SECTION_WIDTH).fill(1),this.maxBitsPerBlock=Ice(Object.values(e.blocks).reduce((i,n)=>Math.max(i,n.maxStateId),0))}toJson(){return JSON.stringify({biomes:this.biomes,blockEntities:this.blockEntities,sectionMask:this.sectionMask,sections:this.sections.map(i=>i===null?null:i.toJson())})}static fromJson(i){let n=JSON.parse(i),u=new rH;return u.biomes=n.biomes,u.blockEntities=n.blockEntities,u.sectionMask=n.sectionMask,u.sections=n.sections.map(l=>l===null?null:Vd.fromJson(l)),u}initialize(i){let n={x:0,y:0,z:0};for(n.y=0;n.y<Br.CHUNK_HEIGHT;n.y++)for(n.z=0;n.z<Br.SECTION_WIDTH;n.z++)for(n.x=0;n.x<Br.SECTION_WIDTH;n.x++){let u=i(n.x,n.y,n.z);u!==null&&this.setBlock(n,u)}}getBlock(i){let n=this.sections[i.y>>4],u=this.getBiome(i);if(!n)return t.fromStateId(0,u);let l=n.getBlock(ta(i)),c=t.fromStateId(l,u);return c.light=this.getBlockLight(i),c.skyLight=this.getSkyLight(i),c.entity=this.getBlockEntity(i),c}setBlock(i,n){typeof n.stateId<"u"&&this.setBlockStateId(i,n.stateId),typeof n.biome<"u"&&this.setBiome(i,n.biome.id),typeof n.skyLight<"u"&&this.skyLightSent&&this.setSkyLight(i,n.skyLight),typeof n.light<"u"&&this.setBlockLight(i,n.light),n.entity?this.setBlockEntity(i,n.entity):this.removeBlockEntity(i)}getBlockType(i){let n=this.getBlockStateId(i);return e.blocksByStateId[n].id}getBlockData(i){let n=this.getBlockStateId(i);return e.blocksByStateId[n].metadata}getBlockStateId(i){let n=this.sections[i.y>>4];return n?n.getBlock(ta(i)):0}getBlockLight(i){let n=this.sections[i.y>>4];if(!n)return 15;let u=ta(i);return n.getBlockLight(u)}getSkyLight(i){let n=this.sections[i.y>>4];if(!n)return 15;let u=ta(i);return n.getSkyLight(u)}getBiome(i){return this.biomes[tH(i)]}getBiomeColor(i){return{r:0,g:0,b:0}}setBlockType(i,n){this.setBlockStateId(i,e.blocks[n].minStateId)}setBlockData(i,n){this.setBlockStateId(i,e.blocksByStateId[this.getBlockStateId(i)].minStateId+n)}setBlockStateId(i,n){let u=i.y>>4;if(u<0||u>=16)return;let l=this.sections[u];if(!l){if(n===0)return;l=new Vd({maxBitsPerBlock:this.maxBitsPerBlock}),this.sectionMask|=1<<u,this.sections[u]=l}l.setBlock(ta(i),n)}setBlockLight(i,n){let u=this.sections[i.y>>4];return u&&u.setBlockLight(ta(i),n)}setSkyLight(i,n){let u=this.sections[i.y>>4];return u&&u.setSkyLight(ta(i),n)}setBiome(i,n){this.biomes[tH(i)]=n}getMask(){return this.sectionMask}dumpBiomes(){}dumpLight(){}loadLight(){}dumpLightNew(){return{skyLightSections:this.sections.map(i=>i===null?null:i.skyLight.toJson()),blockLightSections:this.sections.map(i=>i===null?null:i.blockLight.toJson()),skyLightMask:0,blockLightMask:0,emptySkyLightMask:0,emptyBlockLightMask:0}}loadLightNew(i){let{skyLightSections:n,blockLightSections:u}=i;n.forEach((l,c)=>{this.sections[c]!==null&&(this.sections[c].skyLight=ul.fromJson(l))}),u.forEach((l,c)=>{this.sections[c]!==null&&(this.sections[c].blockLight=ul.fromJson(l))})}loadBiomes(){}dump(){let i=new eH;return this.sections.forEach((n,u)=>{n!==null&&!n.isEmpty()&&n.write(i)}),this.biomes.forEach(n=>{i.writeInt32BE(n)}),i.length?i.toBuffer():Buffer.alloc(4096)}load(i,n=65535,u=!0,l=!0){let c=eH.fromBuffer(i);this.skyLightSent=u,this.sectionMask|=n;for(let d=0;d<Br.NUM_SECTIONS;++d){if(!(n>>d&1))continue;let h,m,p=c.readUInt8();if(p<=Br.MAX_BITS_PER_BLOCK){h=[];let k=cy.read(c);for(let x=0;x<k;++x)h.push(cy.read(c))}else h=null;let y=new ul({bitsPerValue:p>Br.MAX_BITS_PER_BLOCK?this.maxBitsPerBlock:p,capacity:4096}).readBuffer(c,cy.read(c)*2),g=new ul({bitsPerValue:4,capacity:4096}),v=new Uint8Array(2048);for(let k=0;k<2048;k++)v[k]=c.readUInt8();for(let k=0;k<2048;k++){let x=v[k],S=k*2,V=k*2+1,E=x&15,I=x>>4&15,N=S%16,O=Math.floor(S/16%16),T=Math.floor(S/256),R=V%16,J=Math.floor(V/16%16),re=Math.floor(V/256),se=T*16*16+O*16+N,G=re*16*16+J*16+R;g.set(se,E),V<4096&&g.set(G,I)}if(u){m=new ul({bitsPerValue:4,capacity:4096});let k=new Uint8Array(2048);for(let x=0;x<2048;x++)k[x]=c.readUInt8();for(let x=0;x<2048;x++){let S=k[x],V=x*2,E=x*2+1,I=S&15,N=S>>4&15,O=V%16,T=Math.floor(V/16%16),R=Math.floor(V/256),J=E%16,re=Math.floor(E/16%16),se=Math.floor(E/256),G=R*16*16+T*16+O,ne=se*16*16+re*16+J;m.set(G,I),E<4096&&m.set(ne,N)}}let w=new Vd({data:y,palette:h,blockLight:g,maxBitsPerBlock:this.maxBitsPerBlock,...u?{skyLight:m}:{skyLight:null}});this.sections[d]=w}if(l){let d={x:0,y:0,z:0};for(d.z=0;d.z<Br.SECTION_WIDTH;d.z++)for(d.x=0;d.x<Br.SECTION_WIDTH;d.x++)this.setBiome(d,c.readInt32BE())}}};function tH(t){return t.z*16|t.x}function ta(t){return{x:t.x,y:t.y&15,z:t.z}}});var sH=f((l0t,aH)=>{a();o();s();var Bce=qt();function Nce(t){let e=Ut()(t),r=iH()(e,t);return r.h=Bce.CHUNK_HEIGHT,r.version=t.version,r}aH.exports=Nce});var ll=f((h0t,uH)=>{a();o();s();var Pce=Ct(),Qs=qt(),fy=ar();function oH(t){return t.y<<8|t.z<<4|t.x}uH.exports=t=>{class e{constructor(i={}){if(i!==null){if(typeof i.solidBlockCount>"u"&&(i.solidBlockCount=0,i.data))for(let n=0;n<Qs.BLOCK_SECTION_VOLUME;n++)i.data.get(n)!==0&&(i.solidBlockCount+=1);i.data||(i.data=new t({bitsPerValue:4,capacity:Qs.BLOCK_SECTION_VOLUME})),i.palette===void 0&&(i.palette=[0]),this.data=i.data,this.palette=i.palette,this.isDirty=!1,this.solidBlockCount=i.solidBlockCount,this.maxBitsPerBlock=i.maxBitsPerBlock??Qs.GLOBAL_BITS_PER_BLOCK}}toJson(){return JSON.stringify({data:this.data.toJson(),palette:this.palette,isDirty:this.isDirty,solidBlockCount:this.solidBlockCount})}static fromJson(i){let n=JSON.parse(i);return new e({data:t.fromJson(n.data),palette:n.palette,solidBlockCount:n.solidBlockCount})}getBlock(i){let n=this.data.get(oH(i));return this.palette!==null&&(n=this.palette[n]),n}setBlock(i,n){let u=oH(i),l;if(this.palette!==null){let d=this.palette.indexOf(n);if(d>=0)l=d;else{this.palette.push(n),l=this.palette.length-1;let h=Pce(l);if(h>this.data.getBitsPerValue())if(h<=Qs.MAX_BITS_PER_BLOCK)this.data=this.data.resizeTo(h);else{let m=new t({bitsPerValue:this.maxBitsPerBlock,capacity:Qs.BLOCK_SECTION_VOLUME});for(let p=0;p<Qs.BLOCK_SECTION_VOLUME;p++){let y=this.palette[this.data.get(p)];m.set(p,y)}this.palette=null,l=n,this.data=m}}}else l=n;let c=this.getBlock(i);n===0&&c!==0?this.solidBlockCount-=1:n!==0&&c===0&&(this.solidBlockCount+=1),this.data.set(u,l)}isEmpty(){return this.solidBlockCount===0}write(i){i.writeInt16BE(this.solidBlockCount),i.writeUInt8(this.data.getBitsPerValue()),this.palette!==null&&(fy.write(i,this.palette.length),this.palette.forEach(n=>{fy.write(i,n)})),fy.write(i,this.data.length()),this.data.writeBuffer(i)}}return e}});var dH=f((_0t,fH)=>{a();o();s();var Ed=oi().SmartBuffer,Gr=Ki(),Id=ll()(Gr),Tce=sn(),Dt=qt(),ra=ar(),Lce=Ct();fH.exports=(t,e)=>class cH extends Tce{static get section(){return Id}constructor(){super(e),this.sectionMask=0,this.sections=Array(Dt.NUM_SECTIONS).fill(null),this.biomes=Array(Dt.SECTION_WIDTH*Dt.SECTION_WIDTH).fill(1),this.skyLightMask=0,this.blockLightMask=0,this.skyLightSections=Array(Dt.NUM_SECTIONS+2).fill(null),this.blockLightSections=Array(Dt.NUM_SECTIONS+2).fill(null),this.maxBitsPerBlock=Lce(Object.values(e.blocks).reduce((i,n)=>Math.max(i,n.maxStateId),0))}toJson(){return JSON.stringify({biomes:this.biomes,blockEntities:this.blockEntities,sectionMask:this.sectionMask,sections:this.sections.map(i=>i===null?null:i.toJson()),skyLightMask:this.skyLightMask,blockLightMask:this.blockLightMask,skyLightSections:this.skyLightSections.map(i=>i===null?null:i.toJson()),blockLightSections:this.blockLightSections.map(i=>i===null?null:i.toJson())})}static fromJson(i){let n=JSON.parse(i),u=new cH;return u.biomes=n.biomes,u.blockEntities=n.blockEntities,u.sectionMask=n.sectionMask,u.sections=n.sections.map(l=>l===null?null:Id.fromJson(l)),u.skyLightMask=n.skyLightMask,u.blockLightMask=n.blockLightMask,u.skyLightSections=n.skyLightSections.map(l=>l===null?null:Gr.fromJson(l)),u.blockLightSections=n.blockLightSections.map(l=>l===null?null:Gr.fromJson(l)),u}initialize(i){let n={x:0,y:0,z:0};for(n.y=0;n.y<Dt.CHUNK_HEIGHT;n.y++)for(n.z=0;n.z<Dt.SECTION_WIDTH;n.z++)for(n.x=0;n.x<Dt.SECTION_WIDTH;n.x++){let u=i(n.x,n.y,n.z);u!==null&&this.setBlock(n,u)}}getBlock(i){let n=this.sections[i.y>>4],u=this.getBiome(i);if(!n)return t.fromStateId(0,u);let l=n.getBlock(dy(i)),c=t.fromStateId(l,u);return c.light=this.getBlockLight(i),c.skyLight=this.getSkyLight(i),c.entity=this.getBlockEntity(i),c}setBlock(i,n){typeof n.stateId<"u"&&this.setBlockStateId(i,n.stateId),typeof n.biome<"u"&&this.setBiome(i,n.biome.id),typeof n.skyLight<"u"&&this.setSkyLight(i,n.skyLight),typeof n.light<"u"&&this.setBlockLight(i,n.light),n.entity?this.setBlockEntity(i,n.entity):this.removeBlockEntity(i)}getBlockType(i){let n=this.getBlockStateId(i);return e.blocksByStateId[n].id}getBlockData(i){let n=this.getBlockStateId(i);return e.blocksByStateId[n].metadata}getBlockStateId(i){let n=this.sections[i.y>>4];return n?n.getBlock(dy(i)):0}getBlockLight(i){let n=this.blockLightSections[Bd(i)];if(!n)return 0;let l=i.y%16*16*16+i.z*16+i.x;return n.get(l)}getSkyLight(i){let n=this.skyLightSections[Bd(i)];if(!n)return 0;let l=i.y%16*16*16+i.z*16+i.x;return n.get(l)}getBiome(i){return this.biomes[lH(i)]}getBiomeColor(i){return{r:0,g:0,b:0}}setBlockType(i,n){this.setBlockStateId(i,e.blocks[n].minStateId)}setBlockData(i,n){this.setBlockStateId(i,e.blocksByStateId[this.getBlockStateId(i)].minStateId+n)}setBlockStateId(i,n){let u=i.y>>4;if(u<0||u>=16)return;let l=this.sections[u];if(!l){if(n===0)return;l=new Id({maxBitsPerBlock:this.maxBitsPerBlock}),this.sectionMask|=1<<u,this.sections[u]=l}l.setBlock(dy(i),n)}setBlockLight(i,n){let u=Bd(i),l=this.blockLightSections[u];if(l===null){if(n===0)return;l=new Gr({bitsPerValue:4,capacity:4096}),this.blockLightMask|=1<<u,this.blockLightSections[u]=l}let d=i.y%16*16*16+i.z*16+i.x;l.set(d,n)}setSkyLight(i,n){let u=Bd(i),l=this.skyLightSections[u];if(l===null){if(n===0)return;l=new Gr({bitsPerValue:4,capacity:4096}),this.skyLightMask|=1<<u,this.skyLightSections[u]=l}let d=i.y%16*16*16+i.z*16+i.x;l.set(d,n)}setBiome(i,n){this.biomes[lH(i)]=n}getMask(){return this.sectionMask}dump(){let i=new Ed;return this.sections.forEach((n,u)=>{n!==null&&!n.isEmpty()&&n.write(i)}),this.biomes.forEach(n=>{i.writeInt32BE(n)}),i.length?i.toBuffer():Buffer.alloc(4096)}load(i,n=65535,u=!0,l=!0){let c=Ed.fromBuffer(i);this.sectionMask|=n;for(let d=0;d<Dt.NUM_SECTIONS;++d){if(!(n>>d&1))continue;let h,m=c.readInt16BE(),p=c.readUInt8();if(p<=Dt.MAX_BITS_PER_BLOCK){h=[];let v=ra.read(c);for(let w=0;w<v;++w)h.push(ra.read(c))}else h=null;let y=new Gr({bitsPerValue:p>Dt.MAX_BITS_PER_BLOCK?this.maxBitsPerBlock:p,capacity:4096}).readBuffer(c,ra.read(c)*2),g=new Id({data:y,palette:h,solidBlockCount:m,maxBitsPerBlock:this.maxBitsPerBlock});this.sections[d]=g}if(l){let d={x:0,y:0,z:0};for(d.z=0;d.z<Dt.SECTION_WIDTH;d.z++)for(d.x=0;d.x<Dt.SECTION_WIDTH;d.x++)this.setBiome(d,c.readInt32BE())}}loadLight(i,n,u,l=0,c=0){let d=Ed.fromBuffer(i);this.skyLightMask|=n;for(let h=0;h<Dt.NUM_SECTIONS+2;h++){if(!(n>>h&1))continue;let m=ra.read(d),p=new Gr({bitsPerValue:4,capacity:4096}),y=new Uint8Array(m);for(let g=0;g<m;g++)y[g]=d.readUInt8();for(let g=0;g<m;g++){let v=y[g],w=g*2,k=g*2+1,x=v&15,S=v>>4&15,V=w%16,E=Math.floor(w/16)%16,I=Math.floor(w/256),N=k%16,O=Math.floor(k/16)%16,T=Math.floor(k/256),R=I*16*16+E*16+V,J=T*16*16+O*16+N;p.set(R,x),k<4096&&p.set(J,S)}this.skyLightSections[h]=p}this.blockLightMask|=u;for(let h=0;h<Dt.NUM_SECTIONS+2;h++){if(!(u>>h&1))continue;let m=ra.read(d),p=new Gr({bitsPerValue:4,capacity:4096}),y=new Uint8Array(m);for(let g=0;g<m;g++)y[g]=d.readUInt8();for(let g=0;g<m;g++){let v=y[g],w=g*2,k=g*2+1,x=v&15,S=v>>4&15,V=w%16,E=Math.floor(w/16)%16,I=Math.floor(w/256),N=k%16,O=Math.floor(k/16)%16,T=Math.floor(k/256),R=I*16*16+E*16+V,J=T*16*16+O*16+N;p.set(R,x),k<4096&&p.set(J,S)}this.blockLightSections[h]=p}}dumpBiomes(){}loadBiomes(){}dumpLight(){let i=new Ed;return this.skyLightSections.forEach((n,u)=>{n!==null&&(ra.write(i,2048),n.writeBuffer(i))}),this.blockLightSections.forEach((n,u)=>{n!==null&&(ra.write(i,2048),n.writeBuffer(i))}),i.toBuffer()}dumpLightNew(){return{skyLightSections:this.skyLightSections.map(i=>i===null?null:i.toJson()),blockLightSections:this.blockLightSections.map(i=>i===null?null:i.toJson()),skyLightMask:this.skyLightMask,blockLightMask:this.blockLightMask,emptySkyLightMask:0,emptyBlockLightMask:0}}loadLightNew(i){let{skyLightSections:n,blockLightSections:u,skyLightMask:l,blockLightMask:c}=i;this.skyLightMask=l,this.skyLightSections=n.map(d=>d===null?null:Gr.fromJson(d)),this.blockLightMask=c,this.blockLightSections=u.map(d=>d===null?null:Gr.fromJson(d))}};function Bd(t){return Math.floor(t.y/16)+1}function lH(t){return t.z*16|t.x}function dy(t){return{x:t.x,y:t.y&15,z:t.z}}});var pH=f((v0t,hH)=>{a();o();s();var jce=qt();function Ace(t){let e=Ut()(t),r=dH()(e,t);return r.h=jce.CHUNK_HEIGHT,r.version=t.version,r}hH.exports=Ace});var yH=f((q0t,_H)=>{a();o();s();var Nd=oi().SmartBuffer,Yr=Ki(),Pd=ll()(Yr),Oce=sn(),Nr=qt(),na=ar(),Cce=Ct();_H.exports=(t,e)=>class mH extends Oce{static get section(){return Pd}constructor(){super(e),this.sectionMask=0,this.sections=Array(Nr.NUM_SECTIONS).fill(null),this.biomes=Array(4*4*64).fill(127),this.skyLightMask=0,this.blockLightMask=0,this.skyLightSections=Array(Nr.NUM_SECTIONS+2).fill(null),this.blockLightSections=Array(Nr.NUM_SECTIONS+2).fill(null),this.maxBitsPerBlock=Cce(Object.values(e.blocks).reduce((i,n)=>Math.max(i,n.maxStateId),0))}toJson(){return JSON.stringify({biomes:this.biomes,blockEntities:this.blockEntities,sectionMask:this.sectionMask,sections:this.sections.map(i=>i===null?null:i.toJson()),skyLightMask:this.skyLightMask,blockLightMask:this.blockLightMask,skyLightSections:this.skyLightSections.map(i=>i===null?null:i.toJson()),blockLightSections:this.blockLightSections.map(i=>i===null?null:i.toJson())})}static fromJson(i){let n=JSON.parse(i),u=new mH;return u.biomes=n.biomes,u.blockEntities=n.blockEntities,u.sectionMask=n.sectionMask,u.sections=n.sections.map(l=>l===null?null:Pd.fromJson(l)),u.skyLightMask=n.skyLightMask,u.blockLightMask=n.blockLightMask,u.skyLightSections=n.skyLightSections.map(l=>l===null?null:Yr.fromJson(l)),u.blockLightSections=n.blockLightSections.map(l=>l===null?null:Yr.fromJson(l)),u}initialize(i){let n={x:0,y:0,z:0};for(n.y=0;n.y<Nr.CHUNK_HEIGHT;n.y++)for(n.z=0;n.z<Nr.SECTION_WIDTH;n.z++)for(n.x=0;n.x<Nr.SECTION_WIDTH;n.x++){let u=i(n.x,n.y,n.z);u!==null&&this.setBlock(n,u)}}getBlock(i){let n=this.sections[i.y>>4],u=this.getBiome(i);if(!n)return t.fromStateId(0,u);let l=n.getBlock(hy(i)),c=t.fromStateId(l,u);return c.light=this.getBlockLight(i),c.skyLight=this.getSkyLight(i),c.entity=this.getBlockEntity(i),c}setBlock(i,n){typeof n.stateId<"u"&&this.setBlockStateId(i,n.stateId),typeof n.biome<"u"&&this.setBiome(i,n.biome.id),typeof n.skyLight<"u"&&this.setSkyLight(i,n.skyLight),typeof n.light<"u"&&this.setBlockLight(i,n.light),n.entity?this.setBlockEntity(i,n.entity):this.removeBlockEntity(i)}getBlockType(i){let n=this.getBlockStateId(i);return e.blocksByStateId[n].id}getBlockData(i){let n=this.getBlockStateId(i);return e.blocksByStateId[n].metadata}getBlockStateId(i){let n=this.sections[i.y>>4];return n?n.getBlock(hy(i)):0}getBlockLight(i){let n=this.blockLightSections[Td(i)];if(!n)return 0;let l=i.y%16*16*16+i.z*16+i.x;return n.get(l)}getSkyLight(i){let n=this.skyLightSections[Td(i)];if(!n)return 0;let l=i.y%16*16*16+i.z*16+i.x;return n.get(l)}getBiome(i){return i.y<0||i.y>=256?0:this.biomes[gH(i)]}setBlockType(i,n){this.setBlockStateId(i,e.blocks[n].minStateId)}setBlockData(i,n){this.setBlockStateId(i,e.blocksByStateId[this.getBlockStateId(i)].minStateId+n)}setBlockStateId(i,n){let u=i.y>>4;if(u<0||u>=16)return;let l=this.sections[u];if(!l){if(n===0)return;l=new Pd({maxBitsPerBlock:this.maxBitsPerBlock}),this.sectionMask|=1<<u,this.sections[u]=l}l.setBlock(hy(i),n)}setBlockLight(i,n){let u=Td(i),l=this.blockLightSections[u];if(l===null){if(n===0)return;l=new Yr({bitsPerValue:4,capacity:4096}),this.blockLightMask|=1<<u,this.blockLightSections[u]=l}let d=i.y%16*16*16+i.z*16+i.x;l.set(d,n)}setSkyLight(i,n){let u=Td(i),l=this.skyLightSections[u];if(l===null){if(n===0)return;l=new Yr({bitsPerValue:4,capacity:4096}),this.skyLightMask|=1<<u,this.skyLightSections[u]=l}let d=i.y%16*16*16+i.z*16+i.x;l.set(d,n)}setBiome(i,n){i.y<0||i.y>=256||(this.biomes[gH(i)]=n)}getMask(){return this.sectionMask}dump(){let i=new Nd;return this.sections.forEach((n,u)=>{n!==null&&!n.isEmpty()&&n.write(i)}),i.length?i.toBuffer():Buffer.alloc(4096)}loadBiomes(i){this.biomes=i}dumpBiomes(i){return this.biomes}load(i,n=65535){let u=Nd.fromBuffer(i);this.sectionMask|=n;for(let l=0;l<Nr.NUM_SECTIONS;++l){if(!(n>>l&1))continue;let c,d=u.readInt16BE(),h=u.readUInt8();if(h<=Nr.MAX_BITS_PER_BLOCK){c=[];let y=na.read(u);for(let g=0;g<y;++g)c.push(na.read(u))}else c=null;let m=new Yr({bitsPerValue:h>Nr.MAX_BITS_PER_BLOCK?this.maxBitsPerBlock:h,capacity:4096}).readBuffer(u,na.read(u)*2),p=new Pd({data:m,palette:c,solidBlockCount:d,maxBitsPerBlock:this.maxBitsPerBlock});this.sections[l]=p}}loadLight(i,n,u,l=0,c=0){let d=Nd.fromBuffer(i);this.skyLightMask|=n;for(let h=0;h<Nr.NUM_SECTIONS+2;h++){if(!(n>>h&1))continue;let m=na.read(d),p=new Yr({bitsPerValue:4,capacity:4096}),y=new Uint8Array(m);for(let g=0;g<m;g++)y[g]=d.readUInt8();for(let g=0;g<m;g++){let v=y[g],w=g*2,k=g*2+1,x=v&15,S=v>>4&15,V=w%16,E=Math.floor(w/16)%16,I=Math.floor(w/256),N=k%16,O=Math.floor(k/16)%16,T=Math.floor(k/256),R=I*16*16+E*16+V,J=T*16*16+O*16+N;p.set(R,x),k<4096&&p.set(J,S)}this.skyLightSections[h]=p}this.blockLightMask|=u;for(let h=0;h<Nr.NUM_SECTIONS+2;h++){if(!(u>>h&1))continue;let m=na.read(d),p=new Yr({bitsPerValue:4,capacity:4096}),y=new Uint8Array(m);for(let g=0;g<m;g++)y[g]=d.readUInt8();for(let g=0;g<m;g++){let v=y[g],w=g*2,k=g*2+1,x=v&15,S=v>>4&15,V=w%16,E=Math.floor(w/16)%16,I=Math.floor(w/256),N=k%16,O=Math.floor(k/16)%16,T=Math.floor(k/256),R=I*16*16+E*16+V,J=T*16*16+O*16+N;p.set(R,x),k<4096&&p.set(J,S)}this.blockLightSections[h]=p}}dumpLight(){let i=new Nd;return this.skyLightSections.forEach((n,u)=>{n!==null&&(na.write(i,2048),n.writeBuffer(i))}),this.blockLightSections.forEach((n,u)=>{n!==null&&(na.write(i,2048),n.writeBuffer(i))}),i.toBuffer()}dumpLightNew(){return{skyLightSections:this.skyLightSections.map(i=>i===null?null:i.toJson()),blockLightSections:this.blockLightSections.map(i=>i===null?null:i.toJson()),skyLightMask:this.skyLightMask,blockLightMask:this.blockLightMask,emptySkyLightMask:0,emptyBlockLightMask:0}}loadLightNew(i){let{skyLightSections:n,blockLightSections:u,skyLightMask:l,blockLightMask:c}=i;this.skyLightMask=l,this.skyLightSections=n.map(d=>d===null?null:Yr.fromJson(d)),this.blockLightMask=c,this.blockLightSections=u.map(d=>d===null?null:Yr.fromJson(d))}};function Td(t){return Math.floor(t.y/16)+1}function gH(t){return(t.y>>2&63)<<4|(t.z>>2&3)<<2|t.x>>2&3}function hy(t){return{x:t.x,y:t.y&15,z:t.z}}});var wH=f((B0t,bH)=>{a();o();s();var Mce=qt();function $ce(t){let e=Ut()(t),r=yH()(e,t);return r.h=Mce.CHUNK_HEIGHT,r.version=t.version,r}bH.exports=$ce});var cl=f((L0t,vH)=>{a();o();s();var Rce=Ct(),py=class t{constructor(e){if(e===null)return;let r=Math.floor(64/e.bitsPerValue),i=Math.ceil(e.capacity/r)*2,n=(1<<e.bitsPerValue)-1;this.data=new Uint32Array(e?.data??i),this.capacity=e.capacity,this.bitsPerValue=e.bitsPerValue,this.valuesPerLong=r,this.valueMask=n}toJson(){return JSON.stringify({data:Array.from(this.data),capacity:this.capacity,bitsPerValue:this.bitsPerValue,valuesPerLong:this.valuesPerLong,valueMask:this.valueMask})}static fromJson(e){return new t(JSON.parse(e))}toArray(){let e=[];for(let r=0;r<this.capacity;r++)e.push(this.get(r));return e}static fromArray(e,r){let i=new t({capacity:e.length,bitsPerValue:r});for(let n=0;n<e.length;n++)i.set(n,e[n]);return i}toLongArray(){let e=[];for(let r=0;r<this.data.length;r+=2)e.push([this.data[r+1]<<32>>32,this.data[r]<<32>>32]);return e}static fromLongArray(e,r){let i=new t({capacity:Math.floor(64/r)*e.length,bitsPerValue:r});for(let n=0;n<e.length;n++){let u=n*2;i.data[u+1]=e[n][0],i.data[u]=e[n][1]}return i}static or(e,r){let i=e.data.length>r.data.length?e.data:r.data,n=e.data.length>r.data.length?r.data:e.data,u=new Uint32Array(i.length);u.set(i);for(let l=0;l<n.length;l++)u[l]|=n[l];return new t({data:u.buffer,bitsPerValue:Math.max(e.bitsPerValue,r.bitsPerValue)})}get(e){let r=Math.floor(e/this.valuesPerLong),i=(e-r*this.valuesPerLong)*this.bitsPerValue;if(i>=32){let d=i-32;return this.data[r*2+1]>>>d&this.valueMask}let n=this.data[r*2],u=i,l=n>>>u;if(u+this.bitsPerValue>32){let d=this.data[r*2+1];l|=d<<32-u}return l&this.valueMask}set(e,r){let i=Math.floor(e/this.valuesPerLong),n=(e-i*this.valuesPerLong)*this.bitsPerValue;if(n>=32){let c=n-32;this.data[i*2+1]=(this.data[i*2+1]&~(this.valueMask<<c)|(r&this.valueMask)<<c)>>>0;return}let u=n;this.data[i*2]=(this.data[i*2]&~(this.valueMask<<u)|(r&this.valueMask)<<u)>>>0;let l=u+this.bitsPerValue;l>32&&(this.data[i*2+1]=(this.data[i*2+1]&~((1<<l-32)-1)|r>>32-u)>>>0)}resize(e){let r=new t({bitsPerValue:this.bitsPerValue,capacity:e});for(let i=0;i<Math.min(e,this.capacity);++i)r.set(i,this.get(i));return r}resizeTo(e){let r=new t({bitsPerValue:e,capacity:this.capacity});for(let i=0;i<this.capacity;++i){let n=this.get(i);if(Rce(n)>e)throw new Error("existing value in BitArray can't fit in new bits per value");r.set(i,n)}return r}length(){return this.data.length/2}readBuffer(e,r=this.data.length){if((!Number.isFinite(r)||r<0||r>1e6)&&(console.warn(`Invalid size in BitArray.readBuffer: ${r}, using default size`),r=this.data.length),r!==this.data.length){this.data=new Uint32Array(r);for(let i=0;i<r;i+=2)this.data[i+1]=e.readUInt32BE(),this.data[i]=e.readUInt32BE();return}for(let i=0;i<this.data.length;i+=2)this.data[i+1]=e.readUInt32BE(),this.data[i]=e.readUInt32BE();return this}writeBuffer(e){for(let r=0;r<this.data.length;r+=2)e.writeUInt32BE(this.data[r+1]),e.writeUInt32BE(this.data[r]);return this}getBitsPerValue(){return this.bitsPerValue}};vH.exports=py});var qH=f((C0t,SH)=>{a();o();s();var Ld=oi().SmartBuffer,Kr=cl(),jd=ll()(Kr),zce=sn(),Pr=qt(),ia=ar(),Dce=Ct();SH.exports=(t,e)=>class xH extends zce{static get section(){return jd}constructor(){super(e),this.sectionMask=0,this.sections=Array(Pr.NUM_SECTIONS).fill(null),this.biomes=Array(4*4*64).fill(127),this.skyLightMask=0,this.blockLightMask=0,this.skyLightSections=Array(Pr.NUM_SECTIONS+2).fill(null),this.blockLightSections=Array(Pr.NUM_SECTIONS+2).fill(null),this.maxBitsPerBlock=Dce(Object.values(e.blocks).reduce((i,n)=>Math.max(i,n.maxStateId),0))}toJson(){return JSON.stringify({biomes:this.biomes,blockEntities:this.blockEntities,sectionMask:this.sectionMask,sections:this.sections.map(i=>i===null?null:i.toJson()),skyLightMask:this.skyLightMask,blockLightMask:this.blockLightMask,skyLightSections:this.skyLightSections.map(i=>i===null?null:i.toJson()),blockLightSections:this.blockLightSections.map(i=>i===null?null:i.toJson())})}static fromJson(i){let n=JSON.parse(i),u=new xH;return u.biomes=n.biomes,u.blockEntities=n.blockEntities,u.sectionMask=n.sectionMask,u.sections=n.sections.map(l=>l===null?null:jd.fromJson(l)),u.skyLightMask=n.skyLightMask,u.blockLightMask=n.blockLightMask,u.skyLightSections=n.skyLightSections.map(l=>l===null?null:Kr.fromJson(l)),u.blockLightSections=n.blockLightSections.map(l=>l===null?null:Kr.fromJson(l)),u}initialize(i){let n={x:0,y:0,z:0};for(n.y=0;n.y<Pr.CHUNK_HEIGHT;n.y++)for(n.z=0;n.z<Pr.SECTION_WIDTH;n.z++)for(n.x=0;n.x<Pr.SECTION_WIDTH;n.x++){let u=i(n.x,n.y,n.z);u!==null&&this.setBlock(n,u)}}getBlock(i){let n=this.sections[i.y>>4],u=this.getBiome(i);if(!n)return t.fromStateId(0,u);let l=n.getBlock(gy(i)),c=t.fromStateId(l,u);return c.light=this.getBlockLight(i),c.skyLight=this.getSkyLight(i),c.entity=this.getBlockEntity(i),c}setBlock(i,n){typeof n.stateId<"u"&&this.setBlockStateId(i,n.stateId),typeof n.biome<"u"&&this.setBiome(i,n.biome.id),typeof n.skyLight<"u"&&this.setSkyLight(i,n.skyLight),typeof n.light<"u"&&this.setBlockLight(i,n.light),n.entity?this.setBlockEntity(i,n.entity):this.removeBlockEntity(i)}getBlockType(i){let n=this.getBlockStateId(i);return e.blocksByStateId[n].id}getBlockData(i){let n=this.getBlockStateId(i);return e.blocksByStateId[n].metadata}getBlockStateId(i){let n=this.sections[i.y>>4];return n?n.getBlock(gy(i)):0}getBlockLight(i){let n=this.blockLightSections[Ad(i)];if(!n)return 0;let l=i.y%16*16*16+i.z*16+i.x;return n.get(l)}getSkyLight(i){let n=this.skyLightSections[Ad(i)];if(!n)return 0;let l=i.y%16*16*16+i.z*16+i.x;return n.get(l)}getBiome(i){return i.y<0||i.y>=256?0:this.biomes[kH(i)]}setBlockType(i,n){this.setBlockStateId(i,e.blocks[n].minStateId)}setBlockData(i,n){this.setBlockStateId(i,e.blocksByStateId[this.getBlockStateId(i)].minStateId+n)}setBlockStateId(i,n){let u=i.y>>4;if(u<0||u>=16)return;let l=this.sections[u];if(!l){if(n===0)return;l=new jd({maxBitsPerBlock:this.maxBitsPerBlock}),this.sectionMask|=1<<u,this.sections[u]=l}l.setBlock(gy(i),n)}setBlockLight(i,n){let u=Ad(i),l=this.blockLightSections[u];if(l===null){if(n===0)return;l=new Kr({bitsPerValue:4,capacity:4096}),this.blockLightMask|=1<<u,this.blockLightSections[u]=l}let d=i.y%16*16*16+i.z*16+i.x;l.set(d,n)}setSkyLight(i,n){let u=Ad(i),l=this.skyLightSections[u];if(l===null){if(n===0)return;l=new Kr({bitsPerValue:4,capacity:4096}),this.skyLightMask|=1<<u,this.skyLightSections[u]=l}let d=i.y%16*16*16+i.z*16+i.x;l.set(d,n)}setBiome(i,n){i.y<0||i.y>=256||(this.biomes[kH(i)]=n)}getMask(){return this.sectionMask}dump(){let i=new Ld;return this.sections.forEach((n,u)=>{n!==null&&!n.isEmpty()&&n.write(i)}),i.length?i.toBuffer():Buffer.alloc(4096)}loadBiomes(i){this.biomes=i}dumpBiomes(i){return this.biomes}load(i,n=65535){let u=Ld.fromBuffer(i);this.sectionMask|=n;for(let l=0;l<Pr.NUM_SECTIONS;++l){if(!(n>>l&1))continue;let c,d=u.readInt16BE(),h=u.readUInt8();if(h<=Pr.MAX_BITS_PER_BLOCK){c=[];let y=ia.read(u);for(let g=0;g<y;++g)c.push(ia.read(u))}else c=null;let m=new Kr({bitsPerValue:h>Pr.MAX_BITS_PER_BLOCK?this.maxBitsPerBlock:h,capacity:4096}).readBuffer(u,ia.read(u)*2),p=new jd({data:m,palette:c,solidBlockCount:d,maxBitsPerBlock:this.maxBitsPerBlock});this.sections[l]=p}}loadLight(i,n,u,l=0,c=0){let d=Ld.fromBuffer(i);this.skyLightMask|=n;for(let h=0;h<Pr.NUM_SECTIONS+2;h++){if(!(n>>h&1))continue;let m=ia.read(d),p=new Kr({bitsPerValue:4,capacity:4096}),y=new Uint8Array(m);for(let g=0;g<m;g++)y[g]=d.readUInt8();for(let g=0;g<m;g++){let v=y[g],w=g*2,k=g*2+1,x=v&15,S=v>>4&15,V=w%16,E=Math.floor(w/16)%16,I=Math.floor(w/256),N=k%16,O=Math.floor(k/16)%16,T=Math.floor(k/256),R=I*16*16+E*16+V,J=T*16*16+O*16+N;p.set(R,x),k<4096&&p.set(J,S)}this.skyLightSections[h]=p}this.blockLightMask|=u;for(let h=0;h<Pr.NUM_SECTIONS+2;h++){if(!(u>>h&1))continue;let m=ia.read(d),p=new Kr({bitsPerValue:4,capacity:4096}),y=new Uint8Array(m);for(let g=0;g<m;g++)y[g]=d.readUInt8();for(let g=0;g<m;g++){let v=y[g],w=g*2,k=g*2+1,x=v&15,S=v>>4&15,V=w%16,E=Math.floor(w/16)%16,I=Math.floor(w/256),N=k%16,O=Math.floor(k/16)%16,T=Math.floor(k/256),R=I*16*16+E*16+V,J=T*16*16+O*16+N;p.set(R,x),k<4096&&p.set(J,S)}this.blockLightSections[h]=p}}dumpLight(){let i=new Ld;return this.skyLightSections.forEach((n,u)=>{n!==null&&(ia.write(i,2048),n.writeBuffer(i))}),this.blockLightSections.forEach((n,u)=>{n!==null&&(ia.write(i,2048),n.writeBuffer(i))}),i.toBuffer()}dumpLightNew(){return{skyLightSections:this.skyLightSections.map(i=>i===null?null:i.toJson()),blockLightSections:this.blockLightSections.map(i=>i===null?null:i.toJson()),skyLightMask:this.skyLightMask,blockLightMask:this.blockLightMask,emptySkyLightMask:0,emptyBlockLightMask:0}}loadLightNew(i){let{skyLightSections:n,blockLightSections:u,skyLightMask:l,blockLightMask:c}=i;this.skyLightMask=l,this.skyLightSections=n.map(d=>d===null?null:Kr.fromJson(d)),this.blockLightMask=c,this.blockLightSections=u.map(d=>d===null?null:Kr.fromJson(d))}};function Ad(t){return Math.floor(t.y/16)+1}function kH(t){return(t.y>>2&63)<<4|(t.z>>2&3)<<2|t.x>>2&3}function gy(t){return{x:t.x,y:t.y&15,z:t.z}}});var EH=f((z0t,VH)=>{a();o();s();var Fce=qt();function Uce(t){let e=Ut()(t),r=qH()(e,t);return r.h=Fce.CHUNK_HEIGHT,r.version=t.version,r}VH.exports=Uce});var TH=f((J0t,PH)=>{a();o();s();var Od=oi().SmartBuffer,Ke=cl(),Cd=ll()(Ke),Jce=sn(),fl=qt(),my=ar(),Wce=Ct();PH.exports=(t,e)=>class NH extends Jce{static get section(){return Cd}constructor(i){super(e),this.minY=i?.minY??0,this.worldHeight=i?.worldHeight??fl.CHUNK_HEIGHT,this.numSections=this.worldHeight>>4,this.maxBitsPerBlock=Wce(Object.values(e.blocks).reduce((n,u)=>Math.max(n,u.maxStateId),0)),this.sectionMask=new Ke({bitsPerValue:1,capacity:this.numSections}),this.sections=Array(this.numSections).fill(null),this.biomes=Array(4*4*(this.worldHeight>>2)).fill(0),this.skyLightMask=new Ke({bitsPerValue:1,capacity:this.numSections+2}),this.emptySkyLightMask=new Ke({bitsPerValue:1,capacity:this.numSections+2}),this.skyLightSections=Array(this.numSections+2).fill(null),this.blockLightMask=new Ke({bitsPerValue:1,capacity:this.numSections+2}),this.emptyBlockLightMask=new Ke({bitsPerValue:1,capacity:this.numSections+2}),this.blockLightSections=Array(this.numSections+2).fill(null)}toJson(){return JSON.stringify({biomes:this.biomes,blockEntities:this.blockEntities,sectionMask:this.sectionMask.toLongArray(),sections:this.sections.map(i=>i===null?null:i.toJson()),skyLightMask:this.skyLightMask.toLongArray(),blockLightMask:this.blockLightMask.toLongArray(),skyLightSections:this.skyLightSections.map(i=>i===null?null:i.toJson()),blockLightSections:this.blockLightSections.map(i=>i===null?null:i.toJson()),emptyBlockLightMask:this.emptyBlockLightMask.toLongArray(),emptySkyLightMask:this.emptySkyLightMask.toLongArray()})}static fromJson(i){let n=JSON.parse(i),u=new NH;return u.biomes=n.biomes,u.blockEntities=n.blockEntities,u.sectionMask=Ke.fromLongArray(n.sectionMask,1),u.sections=n.sections.map(l=>l===null?null:Cd.fromJson(l)),u.skyLightMask=Ke.fromLongArray(n.skyLightMask,1),u.blockLightMask=Ke.fromLongArray(n.blockLightMask,1),u.skyLightSections=n.skyLightSections.map(l=>l===null?null:Ke.fromJson(l)),u.blockLightSections=n.blockLightSections.map(l=>l===null?null:Ke.fromJson(l)),u.emptySkyLightMask=Ke.fromLongArray(n.emptyBlockLightMask,1),u.emptyBlockLightMask=Ke.fromLongArray(n.emptySkyLightMask,1),u}initialize(i){let n={x:0,y:0,z:0};for(n.y=0;n.y<this.worldHeight;n.y++)for(n.z=0;n.z<fl.SECTION_WIDTH;n.z++)for(n.x=0;n.x<fl.SECTION_WIDTH;n.x++){let u=i(n.x,n.y,n.z);u!==null&&this.setBlock(n,u)}}getBlock(i){let n=this.sections[i.y-this.minY>>4],u=this.getBiome(i);if(!n)return t.fromStateId(0,u);let l=n.getBlock(_y(i,this.minY)),c=t.fromStateId(l,u);return c.light=this.getBlockLight(i),c.skyLight=this.getSkyLight(i),c.entity=this.getBlockEntity(i),c}setBlock(i,n){typeof n.stateId<"u"&&this.setBlockStateId(i,n.stateId),typeof n.biome<"u"&&this.setBiome(i,n.biome.id),typeof n.skyLight<"u"&&this.setSkyLight(i,n.skyLight),typeof n.light<"u"&&this.setBlockLight(i,n.light),n.entity?this.setBlockEntity(i,n.entity):this.removeBlockEntity(i)}getBlockType(i){let n=this.getBlockStateId(i);return e.blocksByStateId[n].id}getBlockData(i){let n=this.getBlockStateId(i);return e.blocksByStateId[n].metadata}getBlockStateId(i){let n=this.sections[i.y-this.minY>>4];return n?n.getBlock(_y(i,this.minY)):0}getBlockLight(i){let n=this.blockLightSections[Md(i,this.minY)];if(!n)return 0;let l=(i.y-this.minY)%16*16*16+i.z*16+i.x;return n.get(l)}getSkyLight(i){let n=this.skyLightSections[Md(i,this.minY)];if(!n)return 0;let l=(i.y-this.minY)%16*16*16+i.z*16+i.x;return n.get(l)}getBiome(i){return i.y<this.minY||i.y>=this.minY+this.worldHeight?0:this.biomes[IH(i,this.minY)]}setBlockType(i,n){this.setBlockStateId(i,e.blocks[n].minStateId)}setBlockData(i,n){this.setBlockStateId(i,e.blocksByStateId[this.getBlockStateId(i)].minStateId+n)}setBlockStateId(i,n){let u=i.y-this.minY>>4;if(u<0||u>=this.numSections)return;let l=this.sections[u];if(!l){if(n===0)return;l=new Cd({maxBitsPerBlock:this.maxBitsPerBlock}),u>this.sectionMask.capacity&&(this.sectionMask=this.sectionMask.resize(u)),this.sectionMask.set(u,1),this.sections[u]=l}l.setBlock(_y(i,this.minY),n)}setBlockLight(i,n){let u=Md(i,this.minY),l=this.blockLightSections[u];if(l===null){if(n===0)return;l=new Ke({bitsPerValue:4,capacity:4096}),u>this.blockLightMask.capacity&&(this.blockLightMask=this.blockLightMask.resize(u)),this.blockLightMask.set(u,1),this.blockLightSections[u]=l}l.set(BH(i,this.minY),n)}setSkyLight(i,n){let u=Md(i,this.minY),l=this.skyLightSections[u];if(l===null){if(n===0)return;l=new Ke({bitsPerValue:4,capacity:4096}),this.skyLightMask.set(u,1),this.skyLightSections[u]=l}l.set(BH(i,this.minY),n)}setBiome(i,n){i.y<this.minY||i.y>=this.minY+this.worldHeight||(this.biomes[IH(i,this.minY)]=n)}getMask(){return this.sectionMask.toLongArray()}dump(){let i=new Od;return this.sections.forEach(n=>{n!==null&&!n.isEmpty()&&n.write(i)}),i.length?i.toBuffer():Buffer.alloc(4096)}loadBiomes(i){this.biomes=i}dumpBiomes(i){return this.biomes}load(i,n=[[0,65535]]){let u=Od.fromBuffer(i);n=Ke.fromLongArray(n,1),this.sectionMask=Ke.or(this.sectionMask,n);for(let l=0;l<this.numSections;++l){if(!n.get(l))continue;let c,d=u.readInt16BE(),h=u.readUInt8();if(h<=fl.MAX_BITS_PER_BLOCK){c=[];let p=my.read(u);for(let y=0;y<p;++y)c.push(my.read(u))}else c=null;let m=new Ke({bitsPerValue:h>fl.MAX_BITS_PER_BLOCK?this.maxBitsPerBlock:h,capacity:4096}).readBuffer(u,my.read(u)*2);this.sections[l]=new Cd({data:m,palette:c,solidBlockCount:d,maxBitsPerBlock:this.maxBitsPerBlock})}}loadParsedLight(i,n,u,l,c,d){function h(m,p,y,g,v,w){let k=0,x=Ke.fromLongArray(g,1),S=Ke.fromLongArray(w,1);for(let V=0;V<m.length;V++){let E=S.get(V);if(!x.get(V)&&!E)continue;v.set(V,E),y.set(V,1-E);let I=new Ke({bitsPerValue:4,capacity:4096});if(m[V]=I,!E){let N=p[k++];for(let O=0;O<N.length;O++){let T=N[O],R=O*2,J=O*2+1,re=T&15,se=T>>4&15,G=R%16,ne=Math.floor(R/16)%16,ue=Math.floor(R/256),me=J%16,fe=Math.floor(J/16)%16,le=Math.floor(J/256),ce=ue*16*16+ne*16+G,U=le*16*16+fe*16+me;I.set(ce,re),J<4096&&I.set(U,se)}}}}h(this.skyLightSections,i,this.skyLightMask,u,this.emptySkyLightMask,c),h(this.blockLightSections,n,this.blockLightMask,l,this.emptyBlockLightMask,d)}dumpLight(){let i=[],n=[];return this.skyLightSections.forEach((u,l)=>{if(u!==null&&this.skyLightMask.get(l)){let c=new Od;u.writeBuffer(c),i.push(Uint8Array.from(c.toBuffer()))}}),this.blockLightSections.forEach((u,l)=>{if(u!==null&&this.blockLightMask.get(l)){let c=new Od;u.writeBuffer(c),n.push(Uint8Array.from(c.toBuffer()))}}),{skyLight:i,blockLight:n,skyLightMask:this.skyLightMask.toLongArray(),blockLightMask:this.blockLightMask.toLongArray(),emptySkyLightMask:this.emptySkyLightMask.toLongArray(),emptyBlockLightMask:this.emptyBlockLightMask.toLongArray()}}dumpLightNew(){return{skyLightMask:this.skyLightMask.toLongArray(),emptySkyLightMask:this.emptySkyLightMask.toLongArray(),skyLightSections:this.skyLightSections.map(i=>i===null?null:i.toJson()),blockLightMask:this.blockLightMask.toLongArray(),emptyBlockLightMask:this.emptyBlockLightMask.toLongArray(),blockLightSections:this.blockLightSections.map(i=>i===null?null:i.toJson())}}loadLightNew(i){let{skyLightSections:n,blockLightSections:u,skyLightMask:l,blockLightMask:c,emptySkyLightMask:d,emptyBlockLightMask:h}=i;this.skyLightMask=Ke.fromLongArray(l,1),this.emptySkyLightMask=Ke.fromLongArray(d,1),this.skyLightSections=n.map(m=>m===null?null:Ke.fromJson(m)),this.blockLightMask=Ke.fromLongArray(c,1),this.emptyBlockLightMask=Ke.fromLongArray(h,1),this.blockLightSections=u.map(m=>m===null?null:Ke.fromJson(m))}};function Md(t,e){return Math.floor((t.y-e)/16)+1}function IH(t,e){return(t.y-e>>2&63)<<4|(t.z>>2&3)<<2|t.x>>2&3}function _y(t,e){return{x:t.x,y:t.y-e&15,z:t.z}}function BH(t,e){return(t.y-e&15)<<8|t.z<<4|t.x}});var jH=f((Y0t,LH)=>{a();o();s();function Hce(t){let e=Ut()(t);return TH()(e,t)}LH.exports=Hce});var yy=f((X0t,AH)=>{a();o();s();var sa=cl(),Tr=qt(),Gce=Ct(),aa=ar(),dl=class t{constructor(e){this.noSizePrefix=e?.noSizePrefix,this.data=new sa({bitsPerValue:e?.bitsPerValue??Tr.GLOBAL_BITS_PER_BLOCK,capacity:e?.capacity??Tr.BLOCK_SECTION_VOLUME})}get(e){return this.data.get(e)}set(e,r){return this.data.set(e,r),this}write(e){e.writeUInt8(this.data.bitsPerValue),this.noSizePrefix||aa.write(e,this.data.length()),this.data.writeBuffer(e)}readBuffer(e,r){let i=this.noSizePrefix?Math.ceil(this.data.capacity/Math.floor(64/r)):aa.read(e);return this.data.readBuffer(e,i*2),this}toJson(){return JSON.stringify({type:"direct",data:this.data.toJson()})}static fromJson(e){let r=JSON.parse(e);return new t({noSizePrefix:r.noSizePrefix,data:sa.fromJson(r.data),bitsPerValue:r.bitsPerValue})}},hl=class t{constructor(e){this.noSizePrefix=e?.noSizePrefix,this.data=e?.data??new sa({bitsPerValue:e?.bitsPerValue??Tr.MIN_BITS_PER_BLOCK,capacity:e?.capacity??Tr.BLOCK_SECTION_VOLUME}),this.palette=e?.palette??[0],this.maxBits=e?.maxBits??Tr.MAX_BITS_PER_BLOCK,this.maxBitsPerBlock=e?.maxBitsPerBlock??Tr.MAX_BITS_PER_BLOCK}get(e){return this.palette[this.data.get(e)]}set(e,r){let i=this.palette.indexOf(r);if(i<0){i=this.palette.length,this.palette.push(r);let n=Gce(i);if(n>this.data.bitsPerValue)if(n<=this.maxBits)this.data=this.data.resizeTo(n);else return this.convertToDirect(this.maxBitsPerBlock).set(e,r)}return this.data.set(e,i),this}convertToDirect(e){let r=new dl({noSizePrefix:this.noSizePrefix,bitsPerValue:e??Tr.GLOBAL_BITS_PER_BLOCK,capacity:this.data.capacity});for(let i=0;i<this.data.capacity;++i)r.data.set(i,this.get(i));return r}write(e){e.writeUInt8(this.data.bitsPerValue),aa.write(e,this.palette.length);for(let r of this.palette)aa.write(e,r);this.noSizePrefix||aa.write(e,this.data.length()),this.data.writeBuffer(e)}readBuffer(e,r){let i=this.noSizePrefix?Math.ceil(this.data.capacity/Math.floor(64/r)):aa.read(e);return this.data.readBuffer(e,i*2),this}toJson(){return JSON.stringify({type:"indirect",palette:this.palette,maxBits:this.maxBits,maxBitsPerBlock:this.maxBitsPerBlock,data:this.data.toJson()})}static fromJson(e){let r=JSON.parse(e);return new t({noSizePrefix:r.noSizePrefix,palette:r.palette,maxBits:r.maxBits,maxBitsPerBlock:r.maxBitsPerBlock,data:sa.fromJson(r.data)})}},$d=class t{constructor(e){this.noSizePrefix=e?.noSizePrefix,this.value=e?.value??0,this.bitsPerValue=e?.bitsPerValue??Tr.MIN_BITS_PER_BLOCK,this.capacity=e?.capacity??Tr.BLOCK_SECTION_VOLUME,this.maxBits=e?.maxBits??Tr.MAX_BITS_PER_BLOCK,this.maxBitsPerBlock=e?.maxBitsPerBlock??Tr.MAX_BITS_PER_BLOCK}get(e){return this.value}set(e,r){if(r===this.value)return this;let i=new sa({bitsPerValue:this.bitsPerValue,capacity:this.capacity});return i.set(e,1),new hl({noSizePrefix:this.noSizePrefix,data:i,palette:[this.value,r],capacity:this.capacity,bitsPerValue:this.bitsPerValue,maxBits:this.maxBits,maxBitsPerBlock:this.maxBitsPerBlock})}write(e){e.writeUInt8(0),aa.write(e,this.value),this.noSizePrefix||e.writeUInt8(0)}toJson(){return JSON.stringify({type:"single",value:this.value,bitsPerValue:this.bitsPerValue,capacity:this.capacity,maxBits:this.maxBits,maxBitsPerBlock:this.maxBitsPerBlock})}static fromJson(e){let r=JSON.parse(e);return new t({noSizePrefix:r.noSizePrefix,value:r.value,bitsPerValue:r.bitsPerValue,capacity:r.capacity,maxBits:r.maxBits,maxBitsPerBlock:r.maxBitsPerBlock})}};function Yce(t){let e=JSON.parse(t);if(e.type==="direct")return new dl({noSizePrefix:e.noSizePrefix,data:sa.fromJson(e.data)});if(e.type==="indirect")return new hl({noSizePrefix:e.noSizePrefix,palette:e.palette,maxBits:e.maxBits,data:sa.fromJson(e.data),maxBitsPerBlock:e.maxBitsPerBlock});if(e.type==="single")return new $d({noSizePrefix:e.noSizePrefix,value:e.value,bitsPerValue:e.bitsPerValue,capacity:e.capacity,maxBits:e.maxBits,maxBitsPerBlock:e.maxBitsPerBlock})}AH.exports={SingleValueContainer:$d,IndirectPaletteContainer:hl,DirectPaletteContainer:dl,fromJson:Yce}});var RH=f((n2t,$H)=>{a();o();s();var Gt=qt(),Rd=yy(),by=ar(),OH=Rd.SingleValueContainer,CH=Rd.IndirectPaletteContainer,Kce=Rd.DirectPaletteContainer;function MH(t){return t.y<<8|t.z<<4|t.x}var wy=class t{constructor(e){if(this.noSizePrefix=e?.noSizePrefix,this.data=e?.data,this.data){if(this.solidBlockCount=e?.solidBlockCount??0,e?.solidBlockCount==null)for(let r=0;r<Gt.BLOCK_SECTION_VOLUME;++r)this.data.get(r)&&this.solidBlockCount++}else{let r=e?.singleValue??0;this.data=new OH({value:r,bitsPerValue:Gt.MIN_BITS_PER_BLOCK,capacity:Gt.BLOCK_SECTION_VOLUME,maxBits:Gt.MAX_BITS_PER_BLOCK,maxBitsPerBlock:e?.maxBitsPerBlock??Gt.GLOBAL_BITS_PER_BLOCK,noSizePrefix:this.noSizePrefix}),this.solidBlockCount=r?Gt.BLOCK_SECTION_VOLUME:0}this.palette=this.data.palette}toJson(){return JSON.stringify({data:this.data.toJson(),solidBlockCount:this.solidBlockCount})}static fromJson(e){let r=JSON.parse(e);return new t({data:Rd.fromJson(r.data),solidBlockCount:r.solidBlockCount})}get(e){return this.data.get(MH(e))}set(e,r){let i=MH(e),n=this.get(e);r===0&&n!==0?this.solidBlockCount-=1:r!==0&&n===0&&(this.solidBlockCount+=1),this.data=this.data.set(i,r),this.palette=this.data.palette}isEmpty(){return this.solidBlockCount===0}write(e){e.writeInt16BE(this.solidBlockCount),this.data.write(e)}static fromLocalPalette({data:e,palette:r,noSizePrefix:i}){return new t({noSizePrefix:i,data:r.length===1?new OH({noSizePrefix:i,value:r[0],bitsPerValue:Gt.MIN_BITS_PER_BLOCK,capacity:Gt.BIOME_SECTION_VOLUME,maxBits:Gt.MAX_BITS_PER_BLOCK}):new CH({noSizePrefix:i,data:e,palette:r})})}static read(e,r=Gt.GLOBAL_BITS_PER_BLOCK,i){let n=e.readInt16BE(),u=e.readUInt8();if(u>16)throw new Error(`Bits per block is too big: ${u}`);if(u===0){let d=new t({noSizePrefix:i,solidBlockCount:n,singleValue:by.read(e),maxBitsPerBlock:r});return i||e.readUInt8(),d}if(u>Gt.MAX_BITS_PER_BLOCK)return new t({noSizePrefix:i,solidBlockCount:n,data:new Kce({noSizePrefix:i,bitsPerValue:r,capacity:Gt.BLOCK_SECTION_VOLUME}).readBuffer(e,u)});let l=[],c=by.read(e);for(let d=0;d<c;++d)l.push(by.read(e));return new t({noSizePrefix:i,solidBlockCount:n,data:new CH({noSizePrefix:i,bitsPerValue:u,capacity:Gt.BLOCK_SECTION_VOLUME,maxBits:Gt.MAX_BITS_PER_BLOCK,maxBitsPerBlock:r,palette:l}).readBuffer(e,u)})}};$H.exports=wy});var JH=f((o2t,UH)=>{a();o();s();var Lr=qt(),zd=yy(),vy=ar(),zH=zd.SingleValueContainer,DH=zd.IndirectPaletteContainer,Qce=zd.DirectPaletteContainer;function FH(t){return t.y<<4|t.z<<2|t.x}var ky=class t{constructor(e){this.noSizePrefix=e?.noSizePrefix,this.data=e?.data??new zH({noSizePrefix:this.noSizePrefix,value:e?.singleValue??0,bitsPerValue:Lr.MIN_BITS_PER_BIOME,capacity:Lr.BIOME_SECTION_VOLUME,maxBits:Lr.MAX_BITS_PER_BIOME})}toJson(){return this.data.toJson()}static fromJson(e){return new t({data:zd.fromJson(e)})}get(e){return this.data.get(FH(e))}set(e,r){this.data=this.data.set(FH(e),r)}static fromLocalPalette({palette:e,data:r,noSizePrefix:i}){return new t({noSizePrefix:i,data:e.length===1?new zH({noSizePrefix:i,value:e[0],bitsPerValue:Lr.MIN_BITS_PER_BIOME,capacity:Lr.BIOME_SECTION_VOLUME,maxBits:Lr.MAX_BITS_PER_BIOME}):new DH({noSizePrefix:i,palette:e,data:r})})}write(e){this.data.write(e)}static read(e,r=Lr.GLOBAL_BITS_PER_BIOME,i){let n=e.readUInt8();if(n>8)throw new Error(`Bits per biome is too big: ${n}`);if(n===0){let c=new t({noSizePrefix:i,singleValue:vy.read(e)});return i||e.readUInt8(),c}if(n>Lr.MAX_BITS_PER_BIOME)return new t({noSizePrefix:i,data:new Qce({noSizePrefix:i,bitsPerValue:r,capacity:Lr.BIOME_SECTION_VOLUME}).readBuffer(e,n)});let u=[],l=vy.read(e);for(let c=0;c<l;++c)u.push(vy.read(e));return new t({data:new DH({noSizePrefix:i,bitsPerValue:n,capacity:Lr.BIOME_SECTION_VOLUME,maxBits:Lr.MAX_BITS_PER_BIOME,palette:u}).readBuffer(e,n)})}};UH.exports=ky});var XH=f((f2t,ZH)=>{a();o();s();var Dd=oi().SmartBuffer,rt=cl(),pl=RH(),Fd=JH(),Zce=sn(),WH=qt(),HH=Ct(),Xce=-64,efe=384;ZH.exports=(t,e)=>{let r=e.version[">="]("1.21.5");return class QH extends Zce{static get section(){return pl}constructor(n){super(e),this.minY=n?.minY??Xce,this.worldHeight=n?.worldHeight??efe,this.numSections=this.worldHeight>>4,this.maxBitsPerBlock=HH(Object.values(e.blocks).reduce((u,l)=>Math.max(u,l.maxStateId),0)),this.maxBitsPerBiome=HH(Object.values(e.biomes).length),this.sections=n?.sections??Array.from({length:this.numSections},u=>new pl({noSizePrefix:r,maxBitsPerBlock:this.maxBitsPerBlock})),this.biomes=n?.biomes??Array.from({length:this.numSections},u=>new Fd({noSizePrefix:r})),this.skyLightMask=n?.skyLightMask??new rt({bitsPerValue:1,capacity:this.numSections+2}),this.emptySkyLightMask=n?.emptySkyLightMask??new rt({bitsPerValue:1,capacity:this.numSections+2}),this.skyLightSections=n?.skyLightSections??Array(this.numSections+2).fill(null),this.blockLightMask=n?.blockLightMask??new rt({bitsPerValue:1,capacity:this.numSections+2}),this.emptyBlockLightMask=n?.emptyBlockLightMask??new rt({bitsPerValue:1,capacity:this.numSections+2}),this.blockLightSections=n?.blockLightSections??Array(this.numSections+2).fill(null),this.blockEntities=n?.blockEntities??{}}toJson(){return JSON.stringify({worldHeight:this.worldHeight,minY:this.minY,sections:this.sections.map(n=>n.toJson()),biomes:this.biomes.map(n=>n.toJson()),skyLightMask:this.skyLightMask.toLongArray(),emptySkyLightMask:this.emptySkyLightMask.toLongArray(),skyLightSections:this.skyLightSections.map(n=>n===null?null:n.toJson()),blockLightMask:this.blockLightMask.toLongArray(),emptyBlockLightMask:this.emptyBlockLightMask.toLongArray(),blockLightSections:this.blockLightSections.map(n=>n===null?null:n.toJson()),blockEntities:this.blockEntities})}static fromJson(n){let u=JSON.parse(n);return new QH({worldHeight:u.worldHeight,minY:u.minY,sections:u.sections.map(l=>pl.fromJson(l)),biomes:u.biomes.map(l=>Fd.fromJson(l)),blockEntities:u.blockEntities,skyLightMask:rt.fromLongArray(u.skyLightMask,1),emptySkyLightMask:rt.fromLongArray(u.emptyBlockLightMask,1),skyLightSections:u.skyLightSections.map(l=>l===null?null:rt.fromJson(l)),blockLightMask:rt.fromLongArray(u.blockLightMask,1),emptyBlockLightMask:rt.fromLongArray(u.emptySkyLightMask,1),blockLightSections:u.blockLightSections.map(l=>l===null?null:rt.fromJson(l))})}initialize(n){let u={x:0,y:0,z:0},l=this.worldHeight+this.minY;for(u.y=this.minY;u.y<l;u.y++)for(u.z=0;u.z<WH.SECTION_WIDTH;u.z++)for(u.x=0;u.x<WH.SECTION_WIDTH;u.x++){let c=n(u.x,u.y,u.z);c!==null&&this.setBlock(u,c)}}getBlock(n){let u=this.getBlockStateId(n),l=this.getBiome(n),c=t.fromStateId(u,l);return c.light=this.getBlockLight(n),c.skyLight=this.getSkyLight(n),c.entity=this.getBlockEntity(n),c}setBlock(n,u){typeof u.stateId<"u"&&this.setBlockStateId(n,u.stateId),typeof u.biome<"u"&&this.setBiome(n,u.biome.id),typeof u.skyLight<"u"&&this.setSkyLight(n,u.skyLight),typeof u.light<"u"&&this.setBlockLight(n,u.light),u.entity?this.setBlockEntity(n,u.entity):this.removeBlockEntity(n)}getBlockType(n){let u=this.getBlockStateId(n);return e.blocksByStateId[u].id}getBlockData(n){let u=this.getBlockStateId(n);return e.blocksByStateId[u].metadata}getBlockStateId(n){let u=this.sections[n.y-this.minY>>4];return u?u.get(YH(n,this.minY)):0}getBlockLight(n){let u=this.blockLightSections[Ud(n,this.minY)];if(!u)return 0;let c=(n.y-this.minY)%16*16*16+n.z*16+n.x;return u.get(c)}getSkyLight(n){let u=this.skyLightSections[Ud(n,this.minY)];if(!u)return 0;let c=(n.y-this.minY)%16*16*16+n.z*16+n.x;return u.get(c)}getBiome(n){let u=this.biomes[n.y-this.minY>>4];return u?u.get(GH(n,this.minY)):0}setBlockType(n,u){this.setBlockStateId(n,e.blocks[u].minStateId)}setBlockData(n,u){this.setBlockStateId(n,e.blocksByStateId[this.getBlockStateId(n)].minStateId+u)}setBlockStateId(n,u){let l=this.sections[n.y-this.minY>>4];l&&l.set(YH(n,this.minY),u)}setBlockLight(n,u){let l=Ud(n,this.minY),c=this.blockLightSections[l];if(c===null){if(u===0)return;c=new rt({bitsPerValue:4,capacity:4096}),l>this.blockLightMask.capacity&&(this.blockLightMask=this.blockLightMask.resize(l)),this.blockLightMask.set(l,1),this.blockLightSections[l]=c}c.set(KH(n,this.minY),u)}setSkyLight(n,u){let l=Ud(n,this.minY),c=this.skyLightSections[l];if(c===null){if(u===0)return;c=new rt({bitsPerValue:4,capacity:4096}),this.skyLightMask.set(l,1),this.skyLightSections[l]=c}c.set(KH(n,this.minY),u)}setBiome(n,u){let l=this.biomes[n.y-this.minY>>4];l&&l.set(GH(n,this.minY),u)}getMask(){}dump(){let n=new Dd;for(let u=0;u<this.numSections;++u)this.sections[u].write(n),this.biomes[u].write(n);return n.length?n.toBuffer():Buffer.alloc(4096)}loadBiomes(n){}dumpBiomes(n){}load(n){let u=Dd.fromBuffer(n);for(let l=0;l<this.numSections;++l)this.sections[l]=pl.read(u,this.maxBitsPerBlock,r),this.biomes[l]=Fd.read(u,this.maxBitsPerBiome,r)}loadParsedLight(n,u,l,c,d,h){function m(p,y,g,v,w,k){let x=0,S=rt.fromLongArray(v,1),V=rt.fromLongArray(k,1);for(let E=0;E<p.length;E++){let I=V.get(E);if(!S.get(E)&&!I)continue;w.set(E,I),g.set(E,1-I);let N=new rt({bitsPerValue:4,capacity:4096});if(p[E]=N,!I){let O=y[x++];for(let T=0;T<O.length;T++){let R=O[T],J=T*2,re=T*2+1,se=R&15,G=R>>4&15,ne=J%16,ue=Math.floor(J/16)%16,me=Math.floor(J/256),fe=re%16,le=Math.floor(re/16)%16,ce=Math.floor(re/256),U=me*16*16+ue*16+ne,Y=ce*16*16+le*16+fe;N.set(U,se),re<4096&&N.set(Y,G)}}}}m(this.skyLightSections,n,this.skyLightMask,l,this.emptySkyLightMask,d),m(this.blockLightSections,u,this.blockLightMask,c,this.emptyBlockLightMask,h)}_loadBlockLightNibbles(n,u){if(u.length!==2048)throw new Error("Invalid light nibble buffer length "+u.length);let l=Math.abs(this.minY>>4)+1;this.blockLightMask.set(n+l,1);let c=new rt({bitsPerValue:4,capacity:4096});for(let d=0;d<u.length;d++){let h=u[d],m=d*2,p=d*2+1,y=h&15,g=h>>4&15,v=m%16,w=Math.floor(m/16)%16,k=Math.floor(m/256),x=p%16,S=Math.floor(p/16)%16,V=Math.floor(p/256),E=k*16*16+w*16+v,I=V*16*16+S*16+x;c.set(E,y),p<4096&&c.set(I,g)}this.blockLightSections[n+l]=c}_loadSkyLightNibbles(n,u){if(u.length!==2048)throw new Error("Invalid light nibble buffer length: "+u.length);let l=Math.abs(this.minY>>4)+1;this.skyLightMask.set(n+l,1);let c=new rt({bitsPerValue:4,capacity:4096});for(let d=0;d<u.length;d++){let h=u[d],m=d*2,p=d*2+1,y=h&15,g=h>>4&15,v=m%16,w=Math.floor(m/16)%16,k=Math.floor(m/256),x=p%16,S=Math.floor(p/16)%16,V=Math.floor(p/256),E=k*16*16+w*16+v,I=V*16*16+S*16+x;c.set(E,y),p<4096&&c.set(I,g)}this.skyLightSections[n+l]=c}loadSection(n,u,l,c,d){let h=Math.abs(this.minY>>4),m=y=>{throw new Error(`Failed to map ${JSON.stringify(y)} to a block state ID`)},p=y=>{throw new Error(`Failed to map ${JSON.stringify(y)} to a biome ID`)};this.sections[n+h]=pl.fromLocalPalette({noSizePrefix:r,data:rt.fromLongArray(u.data||{},u.bitsPerBlock),palette:u.palette.map(y=>t.fromProperties(y.Name.replace("minecraft:",""),y.Properties||{})??m(y)).map(y=>y.stateId)}),this.biomes[n+h]=Fd.fromLocalPalette({noSizePrefix:r,data:rt.fromLongArray(l.data||{},l.bitsPerBiome),palette:l.palette.map(y=>e.biomesByName[y.replace("minecraft:","")]??p(y)).map(y=>y.id)}),c&&this._loadBlockLightNibbles(n,c),d&&this._loadSkyLightNibbles(n,d)}dumpLight(){let n=[],u=[];return this.skyLightSections.forEach((l,c)=>{if(l!==null&&this.skyLightMask.get(c)){let d=new Dd;l.writeBuffer(d),n.push(Uint8Array.from(d.toBuffer()))}}),this.blockLightSections.forEach((l,c)=>{if(l!==null&&this.blockLightMask.get(c)){let d=new Dd;l.writeBuffer(d),u.push(Uint8Array.from(d.toBuffer()))}}),{skyLight:n,blockLight:u,skyLightMask:this.skyLightMask.toLongArray(),blockLightMask:this.blockLightMask.toLongArray(),emptySkyLightMask:this.emptySkyLightMask.toLongArray(),emptyBlockLightMask:this.emptyBlockLightMask.toLongArray()}}dumpLightNew(){return{skyLightMask:this.skyLightMask.toLongArray(),emptySkyLightMask:this.emptySkyLightMask.toLongArray(),skyLightSections:this.skyLightSections.map(n=>n===null?null:n.toJson()),blockLightMask:this.blockLightMask.toLongArray(),emptyBlockLightMask:this.emptyBlockLightMask.toLongArray(),blockLightSections:this.blockLightSections.map(n=>n===null?null:n.toJson())}}loadLightNew(n){this.skyLightMask=rt.fromLongArray(n.skyLightMask,1),this.emptySkyLightMask=rt.fromLongArray(n.emptySkyLightMask,1),this.skyLightSections=n.skyLightSections.map(u=>u===null?null:rt.fromJson(u)),this.blockLightMask=rt.fromLongArray(n.blockLightMask,1),this.emptyBlockLightMask=rt.fromLongArray(n.emptyBlockLightMask,1),this.blockLightSections=n.blockLightSections.map(u=>u===null?null:rt.fromJson(u))}}};function Ud(t,e){return Math.floor((t.y-e)/16)+1}function GH(t,e){return{x:t.x>>2,y:(t.y-e&15)>>2,z:t.z>>2}}function YH(t,e){return{x:t.x,y:t.y-e&15,z:t.z}}function KH(t,e){return(t.y-e&15)<<8|t.z<<4|t.x}});var gl=f((g2t,eG)=>{a();o();s();function tfe(t){let e=Ut()(t);return XH()(e,t)}eG.exports=tfe});var lG=f((b2t,uG)=>{"use strict";a();o();s();var rfe=wa().Vec3,li=16,Xs=16,qy=128,Vn=li*Xs*qy,_l=Vn/2,Wd=Vn/2,Vy=Vn/2,sG=li*Xs,nfe=li*Xs*4,Jd=Vn+_l+Wd+Vy+nfe+sG,xy=va().readUInt4LE,Sy=va().writeUInt4LE;uG.exports=ife;function ife(t){return oG=Ut()(t),ui.w=li,ui.l=Xs,ui.h=qy,ui.BUFFER_SIZE=Jd,ui.version=t.version,ui}var oG;function ml(t){return t!==void 0}var Hd=function(t){return t.x+li*(t.z+Xs*t.y)},tG=function(t){return Hd(t)},rG=function(t){return Vn+Hd(t)*.5},nG=function(t){return Vn+_l+Hd(t)*.5},iG=function(t){return Vn+_l+Wd+Hd(t)*.5},aG=function(t){return Vn+_l+Wd+Vy+t.z*li+t.x},Zs=function(t){return Vn+_l+Wd+Vy+sG+(t.z*li+t.x)*4},ui=class t{constructor(){this.data=Buffer.alloc(Jd),this.data.fill(0)}toJson(){return JSON.stringify({data:this.data.toJSON()})}static fromJson(e){let r=JSON.parse(e),i=new t;return i.data=Buffer.from(r.data),i}initialize(e){let r=new rfe(0,0,0);for(r.y=0;r.y<qy;r.y++)for(r.z=0;r.z<li;r.z++)for(r.x=0;r.x<Xs;r.x++){let i=e(r.x,r.y,r.z);i!==null&&this.setBlock(r,i)}}getBlock(e){let r=new oG(this.getBlockType(e),this.getBiome(e),this.getBlockData(e));return r.light=this.getBlockLight(e),r.skyLight=this.getSkyLight(e),r}setBlock(e,r){ml(r.type)&&this.setBlockType(e,r.type),ml(r.metadata)&&this.setBlockData(e,r.metadata),ml(r.biome)&&this.setBiome(e,r.biome.id),ml(r.skyLight)&&this.setSkyLight(e,r.skyLight),ml(r.light)&&this.setBlockLight(e,r.light)}getBlockType(e){return e.y<0||e.y>=256?0:this.data.readUInt8(tG(e))}setBlockType(e,r){e.y<0||e.y>=256||this.data.writeUInt8(r,tG(e))}getBlockData(e){return e.y<0||e.y>=256?0:xy(this.data,rG(e))}setBlockData(e,r){e.y<0||e.y>=256||Sy(this.data,r,rG(e))}getBlockLight(e){return e.y<0||e.y>=256?0:xy(this.data,nG(e))}setBlockLight(e,r){e.y<0||e.y>=256||Sy(this.data,r,nG(e))}getSkyLight(e){return e.y<0||e.y>=256?0:xy(this.data,iG(e))}setSkyLight(e,r){e.y<0||e.y>=256||Sy(this.data,r,iG(e))}getBiomeColor(e){let r=this.data.readInt32BE(Zs(e))&16777215;return{r:r>>16,g:r>>8&255,b:r&255}}setBiomeColor(e,r,i,n){this.data.writeInt32BE(this.data.readInt32BE(Zs(e))&4278190080|(r&255)<<16|(i&255)<<8|n&255,Zs(e))}getBiome(e){return(this.data.readInt32BE(Zs(e))&4278190080)>>24}setBiome(e,r){this.data.writeInt32BE(this.data.readInt32BE(Zs(e))&16777215|r<<24,Zs(e))}getHeight(e){return this.data.readUInt8(aG(e))}setHeight(e,r){this.data.writeUInt8(r,aG(e))}load(e){if(!Buffer.isBuffer(e))throw new Error("Data must be a buffer");if(e.length!==Jd)throw new Error(`Data buffer not correct size (was ${e.length}, expected ${Jd})`);this.data=e}dumpBiomes(){}dumpLight(){}loadLight(){}loadBiomes(){}dump(){return this.data}getMask(){return 65535}}});var fG=f((x2t,cG)=>{"use strict";a();o();s();var Ey=va().readUInt4LE,Iy=va().writeUInt4LE,oa=16*16*16,yl=16*16*16/2,Ny=16*16*16/2,afe=16*16*16/2,By=1+(oa+yl+afe+Ny);function ci(t){return 1+(t.x*256+t.z*16+t.y)}var Py=class t{constructor(){this.data=Buffer.alloc(By),this.data.fill(0)}toJson(){return JSON.stringify({data:this.data.toJSON()})}static fromJson(e){let r=JSON.parse(e),i=new t;return i.data=Buffer.from(r.data),i}getBlockType(e){return this.data.readUInt8(ci(e))}setBlockType(e,r){this.data.writeUInt8(r,ci(e))}getBlockLight(e){return Ey(this.data,oa+yl+Ny+ci(e)/2)}setBlockLight(e,r){Iy(this.data,r,oa+yl+Ny+ci(e)/2)}getSkyLight(e){return Ey(this.data,oa+yl+ci(e)/2)}setSkyLight(e,r){Iy(this.data,r,oa+yl+ci(e)/2)}getBlockData(e){return Ey(this.data,oa+ci(e)/2)}setBlockData(e,r){Iy(this.data,r,oa+ci(e)/2)}load(e){if(!Buffer.isBuffer(e))throw new Error("Data must be a buffer");if(e.length!==By)throw new Error(`Data buffer not correct size (was ${e.length}, expected ${By})`);this.data=e}dump(){return this.data}};cG.exports=Py});var _G=f((E2t,mG)=>{"use strict";a();o();s();var dG=fG(),En=wa(),hG=256,pG=256*2,sfe=hG+pG;mG.exports=ofe;function ofe(t){return gG=Ut()(t),fi.w=16,fi.l=16,fi.h=256,fi.BUFFER_SIZE=771+16*10241,fi.version=t.version,fi}var gG;function bl(t){return t!==void 0}var fi=class t{constructor(){this.chunks=new Array(16);for(let e=0;e<this.chunks.length;e++)this.chunks[e]=new dG;this.data=Buffer.alloc(sfe),this.data.fill(0);for(let e=0;e<256;e++)this.data[e]=1}toJson(){return JSON.stringify({data:this.data,sections:this.chunks.map(e=>e.toJson())})}static fromJson(e){let r=JSON.parse(e),i=new t;return i.data=r.data,i.chunks=r.sections.map(n=>dG.fromJson(n)),i}initialize(e){let r=new En(0,0,0);for(r.y=0;r.y<t.h;r.y++)for(r.z=0;r.z<t.w;r.z++)for(r.x=0;r.x<t.l;r.x++){let i=e(r.x,r.y,r.z);i!==null&&this.setBlock(r,i)}}getBlock(e){let r=new gG(this.getBlockType(e),this.getBiome(e),this.getBlockData(e));return r.light=this.getBlockLight(e),r.skyLight=this.getSkyLight(e),r}setBlock(e,r){bl(r.type)&&this.setBlockType(e,r.type),bl(r.metadata)&&this.setBlockData(e,r.metadata),bl(r.biome)&&this.setBiome(e,r.biome.id),bl(r.skyLight)&&this.setSkyLight(e,r.skyLight),bl(r.light)&&this.setBlockLight(e,r.light)}getBlockType(e){let r=this.chunks[e.y>>4];return r?r.getBlockType(new En(e.x,e.y-16*(e.y>>4),e.z)):0}setBlockType(e,r){let i=this.chunks[e.y>>4];return i&&i.setBlockType(new En(e.x,e.y-16*(e.y>>4),e.z),r)}getBlockData(e){let r=this.chunks[e.y>>4];return r?r.getBlockData(new En(e.x,e.y-16*(e.y>>4),e.z)):0}setBlockData(e,r){let i=this.chunks[e.y>>4];return i&&i.setBlockData(new En(e.x,e.y-16*(e.y>>4),e.z),r)}getBlockLight(e){let r=this.chunks[e.y>>4];return r?r.getBlockLight(new En(e.x,e.y-16*(e.y>>4),e.z)):0}setBlockLight(e,r){let i=this.chunks[e.y>>4];return i&&i.setBlockLight(new En(e.x,e.y-16*(e.y>>4),e.z),r)}getSkyLight(e){let r=this.chunks[e.y>>4];return r?r.getSkyLight(new En(e.x,e.y-16*(e.y>>4),e.z)):15}setSkyLight(e,r){let i=this.chunks[e.y>>4];return i&&i.setSkyLight(new En(e.x,e.y-16*(e.y>>4),e.z),r)}getBiomeColor(e){return{x:0,y:0,z:0}}setBiomeColor(e,r,i,n){}getBiome(e){return this.data.readUInt8((e.z<<4)+e.x)}setBiome(e,r){this.data.writeUInt8(r,(e.z<<4)+e.x)}getHeight(e){return this.data.readUInt8((e.z<<4)+e.x)}setHeight(e,r){this.data.writeUInt8(r,(e.z<<4)+e.x)}load(e){if(!Buffer.isBuffer(e))throw new Error("Data must be a buffer");let r=0,i=e.readUInt8(r);if(r+=1,i*10241+1>e.length)throw new Error(`Data buffer not correct size (was ${e.length}, expected ${771+16*10241})`);for(let n=0;n<i;n++)this.chunks[n].load(e.slice(r,r+10241)),r+=10241}size(){let e=1;return e+=this.chunks.length*10241,e+=pG,e+=hG,e+=1,e+=1,e}dumpBiomes(){}dumpLight(){}loadLight(){}loadBiomes(){}dump(){let e=0,r=Buffer.alloc(this.size());r.fill(0),r.writeUInt8(this.chunks.length,e),e+=1;for(let i=0;i<this.chunks.length;i++){let n=this.chunks[i].dump();n.copy(r,e),e+=n.length}return this.data.copy(r,e),e+=this.data.length,r.writeUInt8(0,e),e+=1,r.writeUInt8(0,e),e+=1,r}getMask(){return 65535}}});var di=f((P2t,yG)=>{a();o();s();yG.exports={StorageType:{LocalPersistence:0,NetworkPersistence:1,Runtime:2},ChunkVersion:{v0_9_00:0,v0_9_02:1,v0_9_05:2,v0_17_0:3,v0_18_0:4,vConsole1_to_v0_18_0:5,v1_2_0:6,v1_2_0_bis:7,v1_4_0:8,v1_8_0:9,v1_9_0:10,v1_10_0:11,v1_11_0:12,v1_11_1:13,v1_11_2:14,v1_12_0:15,v1_15_0:16,v1_15_1:17,v1_16_0:18,v1_16_1:19,v1_16_100:20,v1_16_200:21,v1_16_210:22,v1_17_0:25,v1_17_30:29,v1_17_40:31,v1_18_0:39,v1_18_11:39}}});var wl=f((A2t,bG)=>{a();o();s();var Ty=class{constructor(e){this.buffer=e||Buffer.allocUnsafe(1e4),this.readOffset=0,this.writeOffset=0,this.size=this.buffer.length}resizeForWriteIfNeeded(e){if(this.writeOffset+e>this.size){this.size*=2;let r=this.size-this.writeOffset;this.buffer=Buffer.concat([this.buffer,Buffer.allocUnsafe(r)])}if(this.size>2097152)throw new Error("Buffer size exceeded guard limit")}readByte(){return this.buffer[this.readOffset++]}writeUInt8(e){this.resizeForWriteIfNeeded(1),this.buffer.writeUInt8(e,this.writeOffset),this.writeOffset+=1}writeUInt16LE(e){this.resizeForWriteIfNeeded(2),this.buffer.writeUInt16LE(e,this.writeOffset),this.writeOffset+=2}writeUInt32LE(e){this.resizeForWriteIfNeeded(4),this.buffer.writeUInt32LE(e,this.writeOffset),this.writeOffset+=4}writeUInt64LE(e){switch(this.resizeForWriteIfNeeded(8),typeof e){case"bigint":this.buffer.writeBigUInt64LE(e,this.writeOffset);break;case"number":this.buffer.writeUInt32LE(e&4294967295,this.writeOffset),this.buffer.writeUInt32LE(e>>>32,this.writeOffset+4);break;default:throw new Error("Invalid value type")}this.writeOffset+=8}writeFloatLE(e){this.resizeForWriteIfNeeded(4),this.buffer.writeFloatLE(e,this.writeOffset),this.writeOffset+=4}writeDoubleLE(e){this.resizeForWriteIfNeeded(8),this.buffer.writeDoubleLE(e,this.writeOffset),this.writeOffset+=8}writeUInt16BE(e){this.resizeForWriteIfNeeded(2),this.buffer.writeUInt16BE(e,this.writeOffset),this.writeOffset+=2}writeUInt32BE(e){this.resizeForWriteIfNeeded(4),this.buffer.writeUInt32BE(e,this.writeOffset),this.writeOffset+=4}writeUInt64BE(e){switch(this.resizeForWriteIfNeeded(8),typeof e){case"bigint":this.buffer.writeBigUInt64BE(e,this.writeOffset);break;case"number":this.buffer.writeUInt32BE(e>>>32,this.writeOffset),this.buffer.writeUInt32BE(e&4294967295,this.writeOffset+4);break;default:throw new Error("Invalid value type")}this.writeOffset+=8}writeInt8(e){this.resizeForWriteIfNeeded(1),this.buffer.writeInt8(e,this.writeOffset),this.writeOffset+=1}writeInt16LE(e){this.resizeForWriteIfNeeded(2),this.buffer.writeInt16LE(e,this.writeOffset),this.writeOffset+=2}writeInt32LE(e){this.resizeForWriteIfNeeded(4),this.buffer.writeInt32LE(e,this.writeOffset),this.writeOffset+=4}writeInt64LE(e){switch(this.resizeForWriteIfNeeded(8),typeof e){case"bigint":this.buffer.writeBigInt64LE(e,this.writeOffset);break;case"number":this.buffer.writeInt32LE(e&4294967295,this.writeOffset),this.buffer.writeInt32LE(e>>>32,this.writeOffset+4);break;default:throw new Error("Invalid value type")}this.writeOffset+=8}writeInt16BE(e){this.resizeForWriteIfNeeded(2),this.buffer.writeInt16BE(e,this.writeOffset),this.writeOffset+=2}writeInt32BE(e){this.resizeForWriteIfNeeded(4),this.buffer.writeInt32BE(e,this.writeOffset),this.writeOffset+=4}writeInt64BE(e){switch(this.resizeForWriteIfNeeded(8),typeof e){case"bigint":this.buffer.writeBigInt64BE(e,this.writeOffset);break;case"number":this.buffer.writeInt32BE(e>>>32,this.writeOffset),this.buffer.writeInt32BE(e&4294967295,this.writeOffset+4);break;default:throw new Error("Invalid value type")}this.writeOffset+=8}writeFloatBE(e){this.resizeForWriteIfNeeded(4),this.buffer.writeFloatBE(e,this.writeOffset),this.writeOffset+=4}writeDoubleBE(e){this.resizeForWriteIfNeeded(8),this.buffer.writeDoubleBE(e,this.writeOffset),this.writeOffset+=8}readUInt8(){let e=this.buffer.readUInt8(this.readOffset);return this.readOffset+=1,e}readUInt16LE(){let e=this.buffer.readUInt16LE(this.readOffset);return this.readOffset+=2,e}readUInt32LE(){let e=this.buffer.readUInt32LE(this.readOffset);return this.readOffset+=4,e}readUInt64LE(){let e=this.buffer.readBigUInt64LE(this.readOffset);return this.readOffset+=8,e}readUInt16BE(){let e=this.buffer.readUInt16BE(this.readOffset);return this.readOffset+=2,e}readUInt32BE(){let e=this.buffer.readUInt32BE(this.readOffset);return this.readOffset+=4,e}readUInt64BE(){let e=this.buffer.readBigUInt64BE(this.readOffset);return this.readOffset+=8,e}readInt8(){let e=this.buffer.readInt8(this.readOffset);return this.readOffset+=1,e}readInt16LE(){let e=this.buffer.readInt16LE(this.readOffset);return this.readOffset+=2,e}readInt32LE(){let e=this.buffer.readInt32LE(this.readOffset);return this.readOffset+=4,e}readInt64LE(){let e=this.buffer.readBigInt64LE(this.readOffset);return this.readOffset+=8,e}writeStringNT(e,r="utf8"){this.resizeForWriteIfNeeded(e.length+1),this.buffer.write(e,this.writeOffset,e.length,r),this.buffer[this.writeOffset+e.length]=0,this.writeOffset+=e.length+1}writeStringRaw(e,r="utf8"){this.resizeForWriteIfNeeded(e.length),this.buffer.write(e,this.writeOffset,e.length,r),this.writeOffset+=e.length}writeBuffer(e){this.resizeForWriteIfNeeded(e.length),e.copy(this.buffer,this.writeOffset),this.writeOffset+=e.length}readBuffer(e){let r=this.buffer.slice(this.readOffset,this.readOffset+e);return this.readOffset+=e,r}writeVarInt(e){this.resizeForWriteIfNeeded(9);let r=0;for(;e>=128;)this.buffer[this.writeOffset+r]=e&127|128,e=e>>>7,r+=1;this.buffer[this.writeOffset+r]=e,this.writeOffset+=r+1}readVarInt(){let e=0,r=0,i;do i=this.buffer[this.readOffset+r],e|=(i&127)<<7*r,r+=1;while(i&128);return this.readOffset+=r,e}writeVarLong(e){this.resizeForWriteIfNeeded(9);let r=0;for(;e>=0x80n;)this.buffer[this.writeOffset+r]=e&0x7fn|0x80n,e=e>>>7n,r+=1;this.buffer[this.writeOffset+r]=e,this.writeOffset+=r+1}readVarLong(){let e=0n,r=0n,i;do i=this.buffer[this.readOffset+r],e|=(i&0x7fn)<<7n*r,r+=1n;while(i&0x80n);return this.readOffset+=Number(r),e}writeZigZagVarInt(e){let r=e<<1^e>>31;this.writeVarInt(r)}readZigZagVarInt(){let e=this.readVarInt();return e>>>1^-(e&1)}writeZigZagVarlong(e){let r=e<<1n^e>>63n;this.writeVarlong(r)}readZigZagVarlong(){let e=this.readVarInt();return e>>>1n^-(e&1n)}peekUInt8(){return this.buffer[this.readOffset]}peek(){return this.buffer[this.readOffset]}getBuffer(){return this.buffer.slice(0,this.writeOffset)}};bG.exports=Ty});var kG=f(($2t,vG)=>{a();o();s();var{Vec3:ufe}=wa(),wG=wl(),Gd=vr(),vl=t=>`${t.x},${t.y},${t.z}`,lfe=(t,e,r)=>`${t&15},${e},${r&15}`,Ly=class{constructor(e,r){this.x=e.x||0,this.z=e.z||0,this.registry=r,this.chunkVersion=e.chunkVersion,this.blockEntities=e.blockEntities||{},this.sections=[],this.entities={},this.compactOnSave=!1,this.setBounds(0,16)}setBounds(e,r){this.minCY=e,this.maxCY=r,this.maxY=this.maxCY*16,this.minY=this.minCY*16,this.worldHeight=this.maxY+Math.abs(this.minY),this.co=Math.abs(this.minCY)}initialize(e){let r=new ufe;for(r.y=0;r.y<this.worldHeight;r.y++)for(r.z=0;r.z<16;r.z++)for(r.x=0;r.x<16;r.x++){let i=e(r.x,r.y,r.z);i&&this.setBlock(r,i)}}getBlock(e,r=!0){let i=e.y>>4,n=this.sections[this.co+i];if(!n)return this.Block.fromStateId(this.registry.blocksByName.air.defaultState,0);let u=n.getBlock(e.l,e.x,e.y&15,e.z,this.getBiomeId(e));return r&&(u.light=n.blockLight.get(e.x,e.y&15,e.z),u.skyLight=n.skyLight.get(e.x,e.y&15,e.z),u.entity=this.getBlockEntity(e)),u}setBlock(e,r){let i=e.y>>4,n=this.sections[this.co+i];n||(n=new this.Section(this.registry,this.Block,{y:i,subChunkVersion:this.subChunkVersion}),this.sections[this.co+i]=n),n.setBlock(e.l,e.x,e.y&15,e.z,r),r.light!==void 0&&n.blockLight.set(e.x,e.y&15,e.z,r.light),r.skyLight!==void 0&&n.skyLight.set(e.x,e.y&15,e.z,r.skyLight),r.entity&&this.setBlockEntity(e,r.entity)}getBlockStateId(e){let r=e.y>>4,i=this.sections[this.co+r];if(i)return i.getBlockStateId(e.l,e.x,e.y&15,e.z)}setBlockStateId(e,r){let i=e.y>>4,n=this.sections[this.co+i];n||(n=new this.Section(this.registry,this.Block,{y:i,subChunkVersion:this.subChunkVersion}),this.sections[this.co+i]=n),n.setBlockStateId(e.l,e.x,e.y&15,e.z,r)}getBiomeId(e){return 0}setBiomeId(e,r){}getBlocks(){let e=this.sections.map(i=>i.getPalette()).flat(2);return Object.values(e.reduce((i,n)=>(i[n.stateId]||(i[n.stateId]=n),i[n.stateId]=n,i),{}))}setBlockLight(e,r){this.sections[this.co+(e.y>>4)].blockLight.set(e.x,e.y&15,e.z,r)}setSkyLight(e,r){this.sections[this.co+(e.y>>4)].skyLight.set(e.x,e.y&15,e.z,r)}getSkyLight(e){return this.sections[this.co+(e.y>>4)].skyLight.get(e.x,e.y&15,e.z)}getBlockLight(e){return this.sections[this.co+(e.y>>4)].blockLight.get(e.x,e.y&15,e.z)}setBlockEntity(e,r){this.blockEntities[vl(e)]=r}getBlockEntity(e){return this.blockEntities[vl(e)]}addBlockEntity(e){let r=lfe(e.value.x.value,e.value.y.value,e.value.z.value);this.blockEntities[r]=e}removeBlockEntity(e){delete this.blockEntities[vl(e)]}moveBlockEntity(e,r){let i=vl(e),n=vl(r),u=this.blockEntities[i];delete this.blockEntities[i],this.blockEntities[n]=u}addEntity(e){let r=e.value.UniqueID.value.toString();this.entities[r]=e}removeEntity(e){delete this.entities[e]}getSection({y:e}){return this.sections[this.co+(e>>4)]}getSectionAtIndex(e){return this.sections[this.co+e]}setSection(e,r){this.sections[this.co+e]=r}newSection(e,r,i){if(r===void 0){let n=this.Section.create(this.registry,this.Block,{y:e,subChunkVersion:this.subChunkVersion});return this.setSection(e,n),n}else{let n=new this.Section(this.registry,this.Block,{y:e,subChunkVersion:this.subChunkVersion});return n.decode(r,i),this.setSection(e,n),n}}getSectionBlockEntities(e){let r=[];for(let i in this.blockEntities)parseInt(i.split(",")[1])>>4===e&&r.push(this.blockEntities[i]);return r}getSections(){return this.sections}getEntities(){return this.entities}loadEntities(e){this.entities=e}diskEncodeBlockEntities(){let e=[];for(let r in this.blockEntities){let i=this.blockEntities[r];e.push(Gd.writeUncompressed(i,"little"))}return Buffer.concat(e)}diskEncodeEntities(){let e=[];for(let r in this.entities){let i=this.entities[r];e.push(Gd.writeUncompressed(i,"little"))}return Buffer.concat(e)}diskDecodeBlockEntities(e){if(!e)return;let r=e instanceof Buffer?new wG(e):e,i=r.readOffset;for(;r.peek()===10;){let{data:n,metadata:u}=Gd.protos.little.parsePacketBuffer("nbt",e,i);r.readOffset+=u.size,i+=u.size,this.addBlockEntity(n)}}diskDecodeEntities(e){if(!e)return;let r=e instanceof Buffer?new wG(e):e,i=r.readOffset;for(;r.peek()===10;){let{data:n,metadata:u}=Gd.protos.little.parsePacketBuffer("nbt",e,i);r.readOffset+=u.size,i+=u.size,this.addEntity(n)}}toObject(){let e=this.sections.map(l=>l?.toObject()),{x:r,z:i,chunkVersion:n,blockEntities:u}=this;return{x:r,z:i,chunkVersion:n,blockEntities:u,sections:e}}};vG.exports=Ly});var Yd=f((F2t,xG)=>{a();o();s();var eo=class extends Uint32Array{toJSON(){return Array.from(this)}[Symbol.for("nodejs.util.inspect.custom")](){return`[Uint32Array of ${this.length} items { ${this.slice(0,10).toString()} ${this.length>10?", ...":""} }]`}},jy=class t{constructor(e){this.bitsPerBlock=e,this.blocksPerWord=Math.floor(32/e),this.wordsCount=Math.ceil(4096/this.blocksPerWord),this.mask=(1<<e)-1,this.array=new eo(this.wordsCount)}read(e){let r=e.readBuffer(this.wordsCount*4);this.array=new eo(new Uint8Array(r).buffer)}write(e){e.writeBuffer(Buffer.from(this.array.buffer))}static copyFrom(e){let r=new t(e.bitsPerBlock);return Object.assign(r,e),e instanceof Uint32Array?r.array=new eo(e.array.slice()):r.array=new eo(e.array),r}getBuffer(){return Buffer.from(this.array.buffer)}readBits(e,r){return this.array[e]>>r&this.mask}writeBits(e,r,i){this.array[e]&=~(this.mask<<r),this.array[e]|=(i&this.mask)<<r}getIndex(e,r,i){e&=15,r&=15,i&=15;let n=Math.floor((e<<8|i<<4|r)/this.blocksPerWord),u=(e<<8|i<<4|r)%this.blocksPerWord*this.bitsPerBlock;return[n,u]}get(e,r,i){let[n,u]=this.getIndex(e,r,i);return this.readBits(n,u)}set(e,r,i,n){let[u,l]=this.getIndex(e,r,i);this.writeBits(u,l,n)}resize(e){let r=new t(e);for(let i=0;i<16;i++)for(let n=0;n<16;n++)for(let u=0;u<16;u++)r.set(i,n,u,this.get(i,n,u));return r}forEach(e){for(let r=0;r<4096;r++){let i=Math.floor(r/this.blocksPerWord),n=r%this.blocksPerWord*this.bitsPerBlock;e(this.readBits(i,n))}}incrementPalette(e){for(let r=0;r<4096;r++){let i=Math.floor(r/this.blocksPerWord),n=r%this.blocksPerWord*this.bitsPerBlock,u=this.readBits(i,n);e[u].count++}}};xG.exports=jy});var VG=f((H2t,qG)=>{"use strict";a();o();s();var cfe=new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,2,127,127,0,96,3,127,127,127,1,127,3,3,2,1,0,5,3,1,0,1,7,23,3,3,109,101,109,2,0,5,120,120,104,51,50,0,0,5,120,120,104,54,52,0,1,10,152,9,2,242,2,1,4,127,32,0,32,1,106,33,3,32,1,32,1,65,16,79,4,127,32,3,65,16,107,33,6,32,2,65,168,136,141,161,2,106,33,1,32,2,65,137,235,208,208,7,107,33,4,32,2,65,207,140,162,142,6,106,33,5,3,64,32,1,32,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,1,32,4,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,4,32,2,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,2,32,5,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,5,32,6,32,0,65,4,106,34,0,79,13,0,11,32,2,65,12,119,32,5,65,18,119,106,32,4,65,7,119,106,32,1,65,1,119,106,5,32,2,65,177,207,217,178,1,106,11,106,33,2,3,64,32,3,32,0,65,4,106,79,4,64,32,2,32,0,40,2,0,65,189,220,202,149,124,108,106,65,17,119,65,175,214,211,190,2,108,33,2,32,0,65,4,106,33,0,12,1,11,11,3,64,32,0,32,3,73,4,64,32,2,32,0,45,0,0,65,177,207,217,178,1,108,106,65,11,119,65,177,243,221,241,121,108,33,2,32,0,65,1,106,33,0,12,1,11,11,32,2,32,2,65,15,118,115,65,247,148,175,175,120,108,34,0,65,13,118,32,0,115,65,189,220,202,149,124,108,34,0,65,16,118,32,0,115,11,161,6,2,4,126,3,127,32,0,65,4,106,53,2,0,32,0,53,2,0,66,32,134,132,33,2,32,1,32,0,65,8,106,34,6,106,33,7,32,1,65,32,79,4,126,32,7,65,32,107,33,8,32,2,66,214,235,130,238,234,253,137,245,224,0,124,33,3,32,2,66,177,169,172,193,173,184,212,166,61,125,33,4,32,2,66,249,234,208,208,231,201,161,228,225,0,124,33,5,3,64,32,3,32,6,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,3,32,4,32,6,65,8,106,34,6,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,4,32,2,32,6,65,8,106,34,6,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,2,32,5,32,6,65,8,106,34,6,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,5,32,8,32,6,65,8,106,34,6,79,13,0,11,32,2,66,12,137,32,5,66,18,137,124,32,4,66,7,137,124,32,3,66,1,137,124,32,3,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,4,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,2,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,5,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,5,32,2,66,197,207,217,178,241,229,186,234,39,124,11,32,1,173,124,33,2,3,64,32,7,32,6,65,8,106,79,4,64,32,2,32,6,41,3,0,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,27,137,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,33,2,32,6,65,8,106,33,6,12,1,11,11,32,6,65,4,106,32,7,77,4,64,32,2,32,6,53,2,0,66,135,149,175,175,152,182,222,155,158,127,126,133,66,23,137,66,207,214,211,190,210,199,171,217,66,126,66,249,243,221,241,153,246,153,171,22,124,33,2,32,6,65,4,106,33,6,11,3,64,32,6,32,7,73,4,64,32,2,32,6,49,0,0,66,197,207,217,178,241,229,186,234,39,126,133,66,11,137,66,135,149,175,175,152,182,222,155,158,127,126,33,2,32,6,65,1,106,33,6,12,1,11,11,32,0,32,2,32,2,66,33,136,133,66,207,214,211,190,210,199,171,217,66,126,34,2,66,29,136,32,2,133,66,249,243,221,241,153,246,153,171,22,126,34,2,66,32,136,32,2,133,34,2,66,32,136,62,2,0,32,0,65,4,106,32,2,62,2,0,11]),to;function SG(t,e,r){if(e.buffer.byteLength<t.byteLength+r){let i=Math.ceil((t.byteLength+r-e.buffer.byteLength)/65536);e.grow(i)}new Uint8Array(e.buffer,r).set(t)}qG.exports=async function(){let{instance:{exports:{mem:t,xxh32:e,xxh64:r}}}=await WebAssembly.instantiate(cfe);function i(u,l=0){return SG(u,t,0),e(0,u.byteLength,l)>>>0}function n(u,l=0,c=0){SG(u,t,8);let d=new DataView(t.buffer);return d.setUint32(0,l,!0),d.setUint32(4,c,!0),r(0,u.byteLength),d}return{h32:function(u,l=0){return to||(to=new(qc(),Bt(sg)).TextEncoder),i(to.encode(u),l).toString(16)},h32Raw:i,h64:function(u,l=0,c=0){to||(to=new(qc(),Bt(sg)).TextEncoder);let d=n(to.encode(u),l,c);return d.getUint32(0,!0).toString(16)+d.getUint32(4,!0).toString(16)},h64Raw:function(u,l=0,c=0){return new Uint8Array(n(u,l,c).buffer,0,8)}}}});var Oy=f((Q2t,EG)=>{a();o();s();var ffe=VG(),Ay;EG.exports={async getChecksum(t){Ay||(Ay=await ffe());let e=Ay.h64Raw(t),r=BigInt(e[0]|e[1]<<8|e[2]<<16|e[3]<<24),i=BigInt(e[4]|e[5]<<8|e[6]<<16|e[7]<<24);return BigInt.asUintN(32,r)<<32n|BigInt.asUintN(32,i)}}});var My=f((tvt,NG)=>{a();o();s();var In=Yd(),{StorageType:hi}=di(),{getChecksum:dfe}=Oy(),IG=Ct(),BG=wl(),ua=vr(),Cy=class{constructor(e,r,i={}){if(this.registry=e,!e)throw new Error("registry is required");if(this.Block=r,this.y=i.y,this.palette=i.palette||[],this.blocks=[],i.blocks)for(let n of i.blocks)this.blocks.push(In.copyFrom(n));this.subChunkVersion=i.subChunkVersion||8,this.hash=i.hash||null,this.updated=i.updated||!0,this.blockLight=i.blockLight?In.copyFrom(i.blockLight):new In(4),this.skyLight=i.skyLight?In.copyFrom(i.skyLight):new In(4)}static create(e,r,i){let n=new this(e,r,{y:i});return n.blocks.push(new In(1)),n.palette.push([]),n.addToPalette(0,n.registry.blocksByName.air.defaultState,4096),n}decode(e,r){r instanceof Buffer&&(r=new BG(r)),this.subChunkVersion=r.readByte();let i=1;switch(this.subChunkVersion){case 1:this.subChunkVersion=8;break;case 8:case 9:if(i=r.readByte(),this.subChunkVersion>=9&&(this.y=r.readByte()),i>2)throw new Error("Expected storage count to be 1 or 2, got "+i);break;default:throw new Error("Unsupported sub chunk version: "+this.subChunkVersion)}for(let n=0;n<i;n++){let u=r.readByte();if(!(u&1)&&e===hi.Runtime)throw new Error(`Expected network encoding while decoding SubChunk at y=${this.y}`);let c=u>>1;this.loadPalettedBlocks(n,r,c,e)}}loadPalettedBlocks(e,r,i,n){let u=new In(i);u.read(r),this.blocks[e]=u;let l=n===hi.LocalPersistence?r.readUInt32LE():r.readZigZagVarInt();if(l>r.buffer.length||l<1)throw new Error(`Invalid palette size: ${l}`);n===hi.Runtime?this.loadRuntimePalette(e,r,l):this.loadLocalPalette(e,r,l,n===hi.NetworkPersistence),this.blocks[e].incrementPalette(this.palette[e])}loadRuntimePalette(e,r,i){this.palette[e]=[];for(let n=0;n<i;n++){let u=r.readZigZagVarInt(),l=this.registry.blockStates[u];this.palette[e][n]={stateId:u,...l,count:0}}}loadLocalPalette(e,r,i,n){this.palette[e]=[];let u=r.buffer,l=r.readOffset,c;for(c=0;c<i;c++){let{metadata:d,data:h}=ua.protos[n?"littleVarint":"little"].parsePacketBuffer("nbt",u,l);r.readOffset+=d.size,l+=d.size;let{name:m,states:p,version:y}=ua.simplify(h),g=this.Block.fromProperties(m.replace("minecraft:",""),p??{},0);g||(g=this.Block.fromProperties("air",{},0)),this.palette[e][c]={stateId:g.stateId,name:m,states:h.value.states.value,version:y,count:0}}if(c!==i)throw new Error(`Expected ${i} blocks, got ${c}`)}async encode(e,r=!1,i=!0){let n=new BG;if(this.subChunkVersion>=8)this.encodeV8(n,e,i);else throw new Error("Unsupported sub chunk version");let u=n.getBuffer();return r&&(this.hash=await dfe(u),this.updated=!1),u}encodeV8(e,r,i){e.writeUInt8(this.subChunkVersion),e.writeUInt8(this.blocks.length),this.subChunkVersion>=9&&e.writeUInt8(this.y);for(let n=0;n<this.blocks.length;n++)i&&this.compact(n),this.writeStorage(e,n,r)}writeStorage(e,r,i){let n=this.blocks[r],u=n.bitsPerBlock<<1;if(i===hi.Runtime&&(u|=1),e.writeUInt8(u),n.write(e),i===hi.LocalPersistence?e.writeUInt32LE(this.palette[r].length):e.writeZigZagVarInt(this.palette[r].length),i===hi.Runtime)for(let l of this.palette[r])e.writeZigZagVarInt(l.stateId);else for(let l of this.palette[r]){let{name:c,states:d,version:h}=l,m=ua.comp({name:ua.string(c),states:ua.comp(d),version:ua.int(h)}),p=ua.writeUncompressed(m,i===hi.LocalPersistence?"little":"littleVarint");e.writeBuffer(p)}}getBlock(e,r,i,n,u){if(e!==void 0){let l=this.getBlockStateId(e,r,i,n);return this.Block.fromStateId(l,u)}else{let l=this.getBlockStateId(0,r,i,n),c=this.getBlockStateId(1,r,i,n),d=this.Block.fromStateId(l,u);return c&&(d.superimposed=this.Block.fromStateId(c,u),d.superimposed.name.includes("water")&&(d.computedStates.waterlogged=!0)),d}}setBlock(e,r,i,n,u){e!==void 0?this.setBlockStateId(e,r,i,n,u.stateId):(this.setBlockStateId(0,r,i,n,u.stateId),u.superimposed&&this.setBlockStateId(1,r,i,n,u.superimposed.stateId)),this.updated=!0}getBlockStateId(e=0,r,i,n){let u=this.blocks[e];return u?this.palette[e][u.get(r,i,n)].stateId:this.registry.blocksByName.air.defaultState}setBlockStateId(e=0,r,i,n,u){if(!this.palette[e])this.palette[e]=[],this.blocks[e]=new In(4),this.addToPalette(e,this.registry.blocksByName.air.defaultState,4095),this.addToPalette(e,u,1),this.blocks[e].set(r,i,n,this.palette[e].length-1);else{let l=this.blocks[e].get(r,i,n),c=this.palette[e][l];if(c.stateId===u)return;c.count--;for(let d=0;d<this.palette[e].length;d++){let h=this.palette[e][d];if(h.stateId===u){h.count=Math.max(h.count,0)+1,this.blocks[e].set(r,i,n,d);return}}this.addToPalette(e,u,1),this.blocks[e].set(r,i,n,this.palette[e].length-1)}this.updated=!0}addToPalette(e,r,i=0){let n=this.registry.blockStates[r];this.palette[e].push({stateId:r,name:n.name,states:n.states,count:i});let u=IG(this.palette[e].length-1);u>this.blocks[e].bitsPerBlock&&(this.blocks[e]=this.blocks[e].resize(u))}isCompactable(e){let r=0;for(let i of this.palette[e])i.count>0&&r++;return r<this.palette[e].length}compact(e){let r=[],i=[];for(let u of this.palette[e])u.count>0&&r.push(u),i.push(r.length-1);if(r.length===this.palette[e].length)return;let n=new In(IG(r.length-1));for(let u=0;u<16;u++)for(let l=0;l<16;l++)for(let c=0;c<16;c++){let d=this.blocks[e].get(u,l,c);n.set(u,l,c,i[d])}this.blocks[e]=n,this.palette[e]=r}getPaletteEntry(e,r,i,n){return this.palette[e][this.blocks[e].get(r,i,n)]}getPalette(e=0){return this.palette[e].filter(r=>r.count>0)}getBlockLight(e,r,i){return this.blockLight.get(e,r,i)}setBlockLight(e,r,i,n){this.blockLight.set(e,r,i,n)}getSkyLight(e,r,i){return this.skyLight.get(e,r,i)}setSkyLight(e,r,i,n){this.skyLight.set(e,r,i,n)}toObject(){return{y:this.y,palette:this.palette,blocks:this.blocks,subChunkVersion:this.subChunkVersion,hash:this.hash,updated:this.updated,blockLight:this.blockLight,skyLight:this.skyLight}}};NG.exports=Cy});var Qd=f((avt,PG)=>{a();o();s();var{StorageType:kl}=di(),Kd=Yd(),hfe=Ct(),$y=class{constructor(e,r,i={}){this.Biome=tl()(e),this.y=r,this.biomes=i.biomes?Kd.copyFrom(i.biomes):new Kd(1),this.palette=i.palette||[0]}readLegacy2D(e){for(let r=0;r<16;r++)for(let i=0;i<16;i++)this.setBiomeId(r,0,i,e.readByte())}copy(e){this.biomes=Kd.copyFrom(e.biomes),this.palette=JSON.parse(JSON.stringify(e.palette)),this.y=e.y}read(e,r,i){this.palette=[];let n=r.readByte();if((n&1)!==1)throw new Error("Biome palette type must be set to use runtime IDs");let l=n>>1;if(l===0){this.palette.push(e===kl.LocalPersistence?r.readInt32LE():r.readVarInt()>>1);return}if(this.biomes=new Kd(l),this.biomes.read(r),e===kl.Runtime){let c=r.readVarInt()>>1;for(let d=0;d<c;d++)this.palette.push(r.readVarInt()>>1)}else{let c=r.readInt32LE();for(let d=0;d<c;d++)this.palette.push(r.readInt32LE())}}setBiomeId(e,r,i,n){this.palette.includes(n)||this.palette.push(n);let u=hfe(this.palette.length-1);u>this.biomes.bitsPerBlock&&(this.biomes=this.biomes.resize(u)),this.biomes.set(e,r,i,this.palette.indexOf(n))}getBiomeId(e,r,i){return this.palette[this.biomes.get(e,r,i)]}getBiome(e){return new this.Biome(this.getBiomeId(e.x,e.y,e.z))}setBiome(e,r){this.setBiomeId(e.x,e.y,e.z,r.id)}export(e,r){let i=Math.ceil(Math.log2(this.palette.length)),n=i<<1|e===kl.Runtime;if(r.writeUInt8(n),i===0){e===kl.LocalPersistence?r.writeInt32LE(this.palette[0]):r.writeVarInt(this.palette[0]<<1);return}if(this.biomes.write(r),e===kl.Runtime){r.writeVarInt(this.palette.length<<1);for(let u of this.palette)r.writeVarInt(u<<1)}else{r.writeUInt32LE(this.palette.length);for(let u of this.palette)r.writeUInt32LE(u)}}exportLegacy2D(e){for(let r=0;r<16;r++)for(let i=0;i<16;i++){let u=this.getBiomeId(r,0,i);e.writeUInt8(u)}}toObject(){return{y:this.y,biomes:this.biomes,palette:this.palette}}};PG.exports=$y});var Zd=f((lvt,TG)=>{a();o();s();var pfe={ChunkSection:0,Biomes:1},Ry=class{created=Date.now();type;constructor(e){Object.assign(this,e)}};TG.exports={BlobType:pfe,BlobEntry:Ry}});var Fy=f((hvt,jG)=>{a();o();s();var gfe=kG(),zy=My(),Xd=Qd(),{StorageType:eh}=di(),xl=wl(),{BlobType:th,BlobEntry:LG}=Zd(),rh=vr(),{getChecksum:mfe}=Oy(),Dy=class extends gfe{Section=zy;constructor(e={},r,i,n){if(super(e,r),this.Block=i,this.Biome=n,this.biomes=[],this.sections=[],this.biomesUpdated=!0,e.sections?.length)for(let u of e.sections)u?this.sections.push(new this.Section(r,i,u)):this.sections.push(null);if(e.biomes?.length)for(let u of e.biomes)this.biomes.push(u?new Xd(r,u.y,u):null);else this.biomes.push(new Xd(r,0))}getBiome(e){return new this.Biome(this.biomes[0].getBiomeId(e.x,0,e.z))}setBiome(e,r){this.biomes[0].setBiomeId(e.x,0,e.z,r.id),this.biomesUpdated=!0}getBiomeId(e){return this.biomes[0].getBiomeId(e.x,0,e.z)}setBiomeId(e,r){this.biomes[0].setBiomeId(e.x,0,e.z,r),this.biomesUpdated=!0}loadLegacyBiomes(e){e instanceof Buffer&&(e=new xl(e));let r=new Xd(this.registry,0);r.readLegacy2D(e),this.biomes=[r]}loadHeights(e){this.heights=e}getHeights(){return this.heights}writeLegacyBiomes(e){this.biomes[0].exportLegacy2D(e)}writeHeightMap(e){this.heights||(this.heights=new Uint16Array(256));for(let r=0;r<256;r++)e.writeUInt16LE(this.heights[r])}async updateBiomeHash(e){return this.biomesUpdated=!1,this.biomesHash=await mfe(e),this.biomesHash}async networkEncodeNoCache(){let e=[];for(let u in this.blockEntities){let l=this.blockEntities[u];e.push(rh.writeUncompressed(l,"littleVarint"))}let r,i=new xl(Buffer.alloc(256));if(this.biomes[0])this.biomes[0].exportLegacy2D(i),r=i.buffer;else throw Error("No biome section");let n=[];for(let u of this.sections)n.push(await u.encode(eh.Runtime,!1,this.compactOnSave));return Buffer.concat([...n,r,Buffer.from([0]),...e])}async networkEncodeBlobs(e){let r=[];for(let i of this.sections){if(i.updated||!e.get(i.hash)){let n=await i.encode(eh.NetworkPersistence,!0,this.compactOnSave),u=new LG({x:this.x,y:i.y,z:this.z,type:th.ChunkSection,buffer:n});e.set(i.hash,u)}r.push({hash:i.hash,type:th.ChunkSection})}if(this.biomesUpdated||!this.biomesHash||!e.get(this.biomesHash)){if(this.biomes[0]){let i=new xl;this.biomes[0].exportLegacy2D(i),await this.updateBiomeHash(i.getBuffer())}else await this.updateBiomeHash(Buffer.alloc(256));this.biomesUpdated=!1,e.set(this.biomesHash,new LG({x:this.x,z:this.z,type:th.Biomes,buffer:this.biomes}))}return r.push({hash:this.biomesHash,type:th.Biomes}),r}async networkEncode(e){let r=await this.networkEncodeBlobs(e),i=[];for(let n in this.blockEntities){let u=this.blockEntities[n];i.push(rh.writeUncompressed(u,"littleVarint"))}return{blobs:r,payload:Buffer.concat([Buffer.from([0]),...i])}}networkDecodeNoCache(e,r){let i=e instanceof Buffer?new xl(e):e;if(r===-1)throw new RangeError("-1 section count not supported below 1.18");this.sections=[];for(let d=0;d<r;d++){let h=new zy(this.registry,this.Block,{y:d,subChunkVersion:this.subChunkVersion});h.decode(eh.Runtime,i),this.setSection(d,h)}let n=new Xd(this.registry,0);n.readLegacy2D(i),this.biomes=[n];let u=i.readZigZagVarInt();if(i.readBuffer(u).length)throw Error(`Read ${u} border blocks, expected 0`);let c=i.readOffset;for(;i.peek()===10;){let{data:d,metadata:h}=rh.protos.littleVarint.parsePacketBuffer("nbt",i.buffer,c);i.readOffset+=h.size,c+=h.size,this.addBlockEntity(d)}}async networkDecode(e,r,i){if(e=[...e],!e.length)throw new Error("No blobs to decode");if(i){let c=new xl(i),d=c.readBuffer(c.readByte());if(d.length)throw new Error("cannot handle border blocks (read length: "+d.length+")");let h=c.readOffset;for(;c.peek()===10;){let{metadata:m,data:p}=rh.protos.littleVarint.parsePacketBuffer("nbt",i,h);c.readOffset+=m.size,h+=m.size,this.addBlockEntity(p)}}let n=[];for(let c of e)r.has(c)||n.push(c);if(n.length>0)return n;this.sections=[],this.sectionsLen=0;let u=e.pop();for(let c=0;c<e.length;c++){let d=r.get(e[c]),h=new zy(this.registry,this.Block,{y:c,subChunkVersion:this.subChunkVersion});h.decode(eh.NetworkPersistence,d.buffer),this.setSection(c,h)}let l=r.get(u);return this.loadLegacyBiomes(l.buffer),n}toObject(){let e=this.biomes.map(r=>r?.toObject());return{...super.toObject(),biomes:e,biomesUpdated:this.biomesUpdated,version:this.registry.version.minecraftVersion}}toJson(){return JSON.stringify(this.toObject())}};jG.exports=Dy});var nh=f((yvt,AG)=>{a();o();s();var{ChunkVersion:_fe}=di(),yfe=Fy();AG.exports=t=>{let e=t.blockRegistry||t,r=Ut()(e),i=tl()(e);return class extends yfe{constructor(u){super(u,e,r,i),this.chunkVersion=this.chunkVersion||_fe.v1_16_0,this.subChunkVersion=8}static fromJson(u){return new this(JSON.parse(u))}}}});var MG=f((kvt,CG)=>{a();o();s();var bfe=My(),{StorageType:OG}=di(),wfe=Yd(),Uy=class extends bfe{loadRuntimePalette(e,r,i){this.palette[e]=[];for(let n=0;n<i;n++){let u=r.readZigZagVarInt(),l=this.registry.blocksByRuntimeId[u];this.palette[e][n]={stateId:l.stateId,...l,count:0}}}loadPalettedBlocks(e,r,i,n){if(n===OG.Runtime&&i===0){this.palette[e]=[],this.blocks[e]=new wfe(1);let u=r.readVarInt()>>1;this.addToPalette(e,u);return}return super.loadPalettedBlocks(...arguments)}writeStorage(e,r,i){if(i===OG.Runtime&&this.palette[r].length===1){e.writeUInt8(1),e.writeZigZagVarInt(this.palette[r][0].stateId);return}return super.writeStorage(...arguments)}};CG.exports=Uy});var RG=f((Vvt,$G)=>{a();o();s();var vfe=Qd(),Jy=class{constructor(e,r){this.registry=e,this.target=r}getBiome(e){return this.target.getBiome(e)}getBiomeId(e){return this.target.getBiomeId(e)}copy(e){return this.target.copy(e)}promote(e){let r=new vfe(this.registry,e);return r.copy(this.target),r}export(e,r){r.writeUInt8(255)}};$G.exports=Jy});var UG=f((Nvt,FG)=>{a();o();s();var kfe=Fy(),ih=MG(),Wy=Qd(),zG=RG(),{BlobType:Sl,BlobEntry:DG}=Zd(),{StorageType:Qr}=di(),Bn=wl(),ql=vr(),Hy=class extends kfe{Section=ih;bounds=this.setBounds(-4,20);getBiome(e){return new this.Biome(this.getBiomeId(e))}setBiome(e,r){this.setBiomeId(e,r.id)}getBiomeId(e){let r=e.y>>4;return this.biomes[this.co+r]?.getBiomeId(e.x,e.y&15,e.z)??0}setBiomeId(e,r){let i=e.y>>4,n=this.biomes[this.co+i];n?n.setBiomeId||(this.biomes[this.co+i]=n=n.promote(i)):this.biomes[this.co+i]=n=new Wy(this.registry,i),n.setBiomeId(e.x,e.y&15,e.z,r),this.biomesUpdated=!0}loadBiomes(e,r){e instanceof Buffer&&(e=new Bn(e)),this.biomes=[];let i;for(let n=this.minCY;e.peek();n++)if(e.peek()===255){if(!i)throw new Error("No last biome");let u=new zG(this.registry,i);this.biomes.push(u),e.readByte()}else{let u=new Wy(this.registry,n);u.read(r,e),i=u,this.biomes.push(u)}}writeBiomes(e){for(let r=0;r<this.worldHeight>>4;r++){let i=this.biomes[r];i||(this.biomes[r-1]?this.biomes[r]=i=new zG(this.registry,this.biomes[r-1]):this.biomes[r]=i=new Wy(this.registry,r)),i.export(Qr.Runtime,e)}}async networkEncodeNoCache(){let e=new Bn;for(let i of this.biomes)i.export(Qr.Runtime,e);let r=e.getBuffer();return Buffer.concat([r,Buffer.from([0])])}async networkEncodeBlobs(e,r){let i=[];if(r){if(this.biomesUpdated||!this.biomesHash||!e.get(this.biomesHash.toString())){let n=new Bn;for(let l of this.biomes)l.export(Qr.Runtime,n);let u=n.getBuffer();await this.updateBiomeHash(u),this.biomesUpdated=!1,e.set(this.biomesHash.toString(),new DG({x:this.x,z:this.z,type:Sl.Biomes,buffer:this.biomes}))}i.push({hash:this.biomesHash,type:Sl.Biomes})}return i}async networkEncode(e){return{blobs:await this.networkEncodeBlobs(e,!0,!1),payload:Buffer.concat([Buffer.from([0])])}}networkDecodeNoCache(e,r){let i=e instanceof Buffer?new Bn(e):e;if(r!==-1&&r!==-2){this.sections=[];for(let l=0;l<r;l++){let c=new ih(this.registry,this.Block,{y:l,subChunkVersion:this.subChunkVersion});c.decode(Qr.Runtime,i),this.setSection(l,c)}}this.loadBiomes(i,Qr.Runtime);let n=i.readBuffer(i.readZigZagVarInt());if(n.length)throw new Error(`Can't handle border blocks (length: ${n.length})`);let u=i.readOffset;for(;i.peek()===10;){let{data:l,metadata:c}=ql.protos.littleVarint.parsePacketBuffer("nbt",i.buffer,u);i.readOffset+=c.size,u+=c.size,this.addBlockEntity(l)}}async networkDecode(e,r,i){if(i){let u=new Bn(i),l=u.readBuffer(u.readZigZagVarInt());if(l.length)throw new Error(`Can't handle border blocks (length: ${l.length})`)}let n=[];for(let u of e)r.has(u.toString())||n.push(u);if(n.length>0)return n;this.sections=[];for(let u of e){let l=r.get(u.toString());if(l.type===Sl.Biomes){let c=new Bn(l.buffer);this.loadBiomes(c,Qr.NetworkPersistence,u)}else throw l.type===Sl.ChunkSection?new Error("Can't accept chunk sections in networkDecode, these Blobs should be sent as individual sections"):Error("Unknown blob type: "+l.type)}return n}async networkDecodeSubChunkNoCache(e,r){let i=new Bn(r),n=new ih(this.registry,this.Block,{y:e,subChunkVersion:this.subChunkVersion});n.decode(Qr.Runtime,i),this.setSection(e,n);let u=i.readOffset;for(;i.peek()===10;){let{data:l,metadata:c}=ql.protos.littleVarint.parsePacketBuffer("nbt",r,u);i.readOffset+=c.size,u+=c.size,this.addBlockEntity(l)}}async networkEncodeSubChunkNoCache(e){let r=this.getSectionBlockEntities(e),n=await this.getSectionAtIndex(e).encode(Qr.Runtime,!1,this.compactOnSave),u=[];for(let l of r)u.push(ql.writeUncompressed(l,"littleVarint"));return Buffer.concat([n,...u])}async networkDecodeSubChunk(e,r,i){if(i){let u=new Bn(i),l=0;for(;u.peekUInt8()===10;){let{data:c,metadata:d}=ql.protos.littleVarint.parsePacketBuffer("nbt",i,l);u.readOffset+=d.size,l+=d.size,this.addBlockEntity(c)}}let n=[];for(let u of e)r.has(u.toString())||n.push(u);if(n.length>0)return n;this.sections=[],this.sectionsLen=0;for(let u of e){let l=r.get(u.toString()),c=new Bn(l.buffer),d=new ih(this.registry,this.Block,{y:u.y,subChunkVersion:this.subChunkVersion});await d.decode(Qr.Runtime,c),this.setSection(d.y,d)}return n}async networkEncodeSubChunk(e,r){let i=this.getSectionBlockEntities(e),n=this.getSectionAtIndex(e);if(n.updated){let l=await n.encode(Qr.Runtime,!0,this.compactOnSave),c=new DG({x:this.x,y:n.y,z:this.z,type:Sl.ChunkSection,buffer:l});r.set(n.hash.toString(),c)}let u=[];for(let l of i)u.push(ql.writeUncompressed(l,"littleVarint"));return[n.hash,Buffer.concat(u)]}toObject(){return{...super.toObject(),version:this.registry.version.minecraftVersion}}};FG.exports=Hy});var Vl=f((Avt,JG)=>{a();o();s();var{ChunkVersion:xfe}=di(),Sfe=UG();JG.exports=t=>{let e=t.blockRegistry||t,r=Ut()(e),i=tl()(e);return class extends Sfe{constructor(u){super(u,e,r,i),this.chunkVersion=this.chunkVersion||xfe.v1_18_0,this.subChunkVersion=9}static fromJson(u){return new this(JSON.parse(u))}}}});var HG=f(($vt,ah)=>{a();o();s();var qfe={pc:{1.8:AW(),1.9:ol(),"1.10":ol(),1.11:ol(),1.12:ol(),1.13:sH(),1.14:pH(),1.15:wH(),1.16:EH(),1.17:jH(),1.18:gl(),1.19:gl(),"1.20":gl(),1.21:gl()},bedrock:{.14:lG(),"1.0":_G(),1.3:nh(),1.16:nh(),1.17:nh(),1.18:Vl(),1.19:Vl(),"1.20":Vl(),1.21:Vl()}};ah.exports=Vfe;var WG=Zd();ah.exports.BlobEntry=WG.BlobEntry;ah.exports.BlobType=WG.BlobType;function Vfe(t){let e=typeof t=="string"?el()(t):t,r=e.version;if(!r)throw new Error("Specified version does not exist");try{return qfe[r.type][r.majorVersion](e)}catch(i){throw i instanceof TypeError?(console.error(i),new Error(`[Prismarine-chunk] No chunk implementation for ${r?.type} ${r?.majorVersion} found`)):(console.log(`Error while loading ${r.type} - ${r.majorVersion}`),i)}}});var YG=f((Fvt,GG)=>{a();o();s();GG.exports=HG()});var Zy=f((c3t,Ofe)=>{Ofe.exports={grass:{data:[{keys:["badlands","badlands_plateau","eroded_badlands","modified_badlands_plateau","modified_wooded_badlands_plateau","wooded_badlands_plateau"],color:9470285},{keys:["desert","desert_hills","desert_lakes","savanna","savanna_plateau","shattered_savanna","shattered_savanna_plateau","nether_wastes","soul_sand_valley","crimson_forest","warped_forest","basalt_deltas"],color:12564309},{keys:["jungle","jungle_hills","modified_jungle","bamboo_jungle","bamboo_jungle_hills"],color:5884220},{keys:["jungle_edge","modified_jungle_edge"],color:6604607},{keys:["forest","flower_forest","wooded_hills"],color:7979098},{keys:["birch_forest","birch_forest_hills","tall_birch_forest","tall_birch_hills"],color:8960871},{keys:["dark_forest","dark_forest_hills"],color:5274162},{keys:["swamp","swamp_hills"],color:6975545},{keys:["swamp","swamp_hills"],color:5011004},{keys:["plains","sunflower_plains","beach"],color:9551193},{keys:["ocean","deep_ocean","warm_ocean","deep_warm_ocean","lukewarm_ocean","deep_lukewarm_ocean","cold_ocean","deep_cold_ocean","deep_frozen_ocean","river","the_end","small_end_islands","end_barrens","end_midlands","end_highlands","the_void"],color:9353585},{keys:["mushroom_fields","mushroom_field_shore"],color:5622079},{keys:["mountains","mountain_edge","gravelly_mountains","modified_gravelly_mountains","wooded_mountains","stone_shore"],color:9090697},{keys:["snowy_beach"],color:8631699},{keys:["giant_tree_taiga","giant_tree_taiga_hills"],color:8829055},{keys:["taiga","taiga_hills","taiga_mountains","giant_spruce_taiga","giant_spruce_taiga_hills"],color:8828803},{keys:["snowy_tundra","snowy_mountains","ice_spikes","snowy_taiga","snowy_taiga_hills","snowy_taiga_mountains","frozen_ocean","frozen_river"],color:8434839}],default:7979098},foliage:{data:[{keys:["badlands","badlands_plateau","eroded_badlands","modified_badlands_plateau","modified_wooded_badlands_plateau","wooded_badlands_plateau"],color:10387789},{keys:["desert","desert_hills","desert_lakes","savanna","savanna_plateau","shattered_savanna","shattered_savanna_plateau","nether_wastes","soul_sand_valley","crimson_forest","warped_forest","basalt_deltas"],color:11445290},{keys:["jungle","jungle_hills","modified_jungle","bamboo_jungle","bamboo_jungle_hills"],color:3193611},{keys:["jungle_edge","modified_jungle_edge"],color:4110351},{keys:["forest","flower_forest","wooded_hills","dark_forest","dark_forest_hills"],color:5877296},{keys:["birch_forest","birch_forest_hills","tall_birch_forest","tall_birch_hills"],color:7055681},{keys:["swamp","swamp_hills"],color:6975545},{keys:["plains","sunflower_plains","beach"],color:7842607},{keys:["ocean","deep_ocean","warm_ocean","deep_warm_ocean","lukewarm_ocean","deep_lukewarm_ocean","cold_ocean","deep_cold_ocean","deep_frozen_ocean","river","the_end","small_end_islands","end_barrens","end_midlands","end_highlands","the_void"],color:7448397},{keys:["mushroom_fields","mushroom_field_shore"],color:2865935},{keys:["mountains","mountain_edge","gravelly_mountains","modified_gravelly_mountains","wooded_mountains","stone_shore"],color:7185259},{keys:["snowy_beach"],color:6595192},{keys:["giant_tree_taiga","giant_tree_taiga_hills"],color:6858079},{keys:["taiga","taiga_hills","taiga_mountains","giant_spruce_taiga","giant_spruce_taiga_hills"],color:6857828},{keys:["snowy_tundra","snowy_mountains","ice_spikes","snowy_taiga","snowy_taiga_hills","snowy_taiga_mountains","frozen_ocean","frozen_river"],color:6332795}],default:5877296},water:{data:[{keys:["cold_ocean","deep_cold_ocean"],color:4020182},{keys:["frozen_ocean","deep_frozen_ocean","frozen_river"],color:3750089},{keys:["lukewarm_ocean","deep_lukewarm_ocean"],color:4566514},{keys:["swamp","swamp_hills"],color:6388580},{keys:["warm_ocean","deep_warm_ocean"],color:4445678}],default:4159204},redstone:{data:[{keys:[0],color:4915200},{keys:[1],color:7274496},{keys:[2],color:7929856},{keys:[3],color:8519680},{keys:[4],color:9175040},{keys:[5],color:9895936},{keys:[6],color:10551296},{keys:[7],color:11206656},{keys:[8],color:11862016},{keys:[9],color:12517376},{keys:[10],color:13238272},{keys:[11],color:13828096},{keys:[12],color:14483456},{keys:[13],color:15140352},{keys:[14],color:15801088},{keys:[15],color:16527616}],default:4915200},constant:{data:[{keys:["birch_leaves"],color:8431445},{keys:["spruce_leaves"],color:6396257},{keys:["lily_pad"],color:2129968}],default:0}}});var lY=f((f3t,uY)=>{a();o();s();uY.exports={tints:Zy()}});a();o();s();a();o();s();var Ow=bh(wa(),1);var Qe=Ow.default.Vec3;a();o();s();var tY=bh(YG(),1),Gy=bh(pd(),1);var KG={lightLevels:{lava:15,brown_mushroom:1,torch:14,wall_torch:14,fire:15,soul_fire:10,soul_torch:10,soul_wall_torch:10,glowstone:15,nether_portal:11,jack_o_lantern:15,enchanting_table:7,brewing_stand:1,lava_cauldron:15,end_portal:15,end_portal_frame:1,dragon_egg:1,ender_chest:7,beacon:15,sea_lantern:15,end_rod:14,end_gateway:15,magma_block:3,conduit:15,lantern:15,soul_lantern:10,shroomlight:15,crying_obsidian:10,amethyst_cluster:5,large_amethyst_bud:4,medium_amethyst_bud:2,small_amethyst_bud:1,sculk_sensor:1,sculk_catalyst:6,ochre_froglight:15,verdant_froglight:15,pearlescent_froglight:15},noOcclusions:{mangrove_roots:!0,oak_leaves:!0,spruce_leaves:!0,birch_leaves:!0,jungle_leaves:!0,acacia_leaves:!0,cherry_leaves:!0,dark_oak_leaves:!0,mangrove_leaves:!0,azalea_leaves:!0,flowering_azalea_leaves:!0,glass:!0,white_bed:!0,orange_bed:!0,magenta_bed:!0,light_blue_bed:!0,yellow_bed:!0,lime_bed:!0,pink_bed:!0,gray_bed:!0,light_gray_bed:!0,cyan_bed:!0,purple_bed:!0,blue_bed:!0,brown_bed:!0,green_bed:!0,red_bed:!0,black_bed:!0,moving_piston:!0,spawner:!0,oak_door:!0,ladder:!0,iron_door:!0,ice:!0,white_stained_glass:!0,orange_stained_glass:!0,magenta_stained_glass:!0,light_blue_stained_glass:!0,yellow_stained_glass:!0,lime_stained_glass:!0,pink_stained_glass:!0,gray_stained_glass:!0,light_gray_stained_glass:!0,cyan_stained_glass:!0,purple_stained_glass:!0,blue_stained_glass:!0,brown_stained_glass:!0,green_stained_glass:!0,red_stained_glass:!0,black_stained_glass:!0,oak_trapdoor:!0,spruce_trapdoor:!0,birch_trapdoor:!0,jungle_trapdoor:!0,acacia_trapdoor:!0,cherry_trapdoor:!0,dark_oak_trapdoor:!0,mangrove_trapdoor:!0,bamboo_trapdoor:!0,iron_bars:!0,chain:!0,glass_pane:!0,lily_pad:!0,brewing_stand:!0,cauldron:!0,dragon_egg:!0,cocoa:!0,beacon:!0,hopper:!0,white_stained_glass_pane:!0,orange_stained_glass_pane:!0,magenta_stained_glass_pane:!0,light_blue_stained_glass_pane:!0,yellow_stained_glass_pane:!0,lime_stained_glass_pane:!0,pink_stained_glass_pane:!0,gray_stained_glass_pane:!0,light_gray_stained_glass_pane:!0,cyan_stained_glass_pane:!0,purple_stained_glass_pane:!0,blue_stained_glass_pane:!0,brown_stained_glass_pane:!0,green_stained_glass_pane:!0,red_stained_glass_pane:!0,black_stained_glass_pane:!0,slime_block:!0,barrier:!0,light:!0,iron_trapdoor:!0,spruce_door:!0,birch_door:!0,jungle_door:!0,acacia_door:!0,cherry_door:!0,dark_oak_door:!0,mangrove_door:!0,bamboo_door:!0,end_rod:!0,chorus_plant:!0,chorus_flower:!0,frosted_ice:!0,turtle_egg:!0,sniffer_egg:!0,sea_pickle:!0,conduit:!0,bamboo:!0,lantern:!0,soul_lantern:!0,campfire:!0,soul_campfire:!0,crimson_trapdoor:!0,warped_trapdoor:!0,crimson_door:!0,warped_door:!0,honey_block:!0,candle:!0,white_candle:!0,orange_candle:!0,magenta_candle:!0,light_blue_candle:!0,yellow_candle:!0,lime_candle:!0,pink_candle:!0,gray_candle:!0,light_gray_candle:!0,cyan_candle:!0,purple_candle:!0,blue_candle:!0,brown_candle:!0,green_candle:!0,red_candle:!0,black_candle:!0,amethyst_cluster:!0,tinted_glass:!0,lightning_rod:!0,pointed_dripstone:!0,azalea:!0,flowering_azalea:!0,frogspawn:!0,decorated_pot:!0},colors:{stone:"rgb(112, 112, 112)",granite:"rgb(151, 109, 77)",polished_granite:"rgb(151, 109, 77)",diorite:"rgb(255, 252, 245)",polished_diorite:"rgb(255, 252, 245)",andesite:"rgb(112, 112, 112)",polished_andesite:"rgb(112, 112, 112)",grass_block:"rgb(127, 178, 56)",dirt:"rgb(151, 109, 77)",coarse_dirt:"rgb(151, 109, 77)",podzol:"rgb(129, 86, 49)",cobblestone:"rgb(112, 112, 112)",oak_planks:"rgb(143, 119, 72)",spruce_planks:"rgb(129, 86, 49)",birch_planks:"rgb(247, 233, 163)",jungle_planks:"rgb(151, 109, 77)",acacia_planks:"rgb(216, 127, 51)",cherry_planks:"rgb(209, 177, 161)",dark_oak_planks:"rgb(102, 76, 51)",mangrove_planks:"rgb(153, 51, 51)",bamboo_planks:"rgb(229, 229, 51)",bamboo_mosaic:"rgb(229, 229, 51)",oak_sapling:"rgb(0, 124, 0)",spruce_sapling:"rgb(0, 124, 0)",birch_sapling:"rgb(0, 124, 0)",jungle_sapling:"rgb(0, 124, 0)",acacia_sapling:"rgb(0, 124, 0)",cherry_sapling:"rgb(242, 127, 165)",dark_oak_sapling:"rgb(0, 124, 0)",mangrove_propagule:"rgb(0, 124, 0)",bedrock:"rgb(112, 112, 112)",water:"rgb(64, 64, 255)",lava:"rgb(255, 0, 0)",sand:"rgb(247, 233, 163)",suspicious_sand:"rgb(247, 233, 163)",red_sand:"rgb(216, 127, 51)",gravel:"rgb(112, 112, 112)",suspicious_gravel:"rgb(112, 112, 112)",gold_ore:"rgb(112, 112, 112)",deepslate_gold_ore:"rgb(100, 100, 100)",iron_ore:"rgb(112, 112, 112)",deepslate_iron_ore:"rgb(100, 100, 100)",coal_ore:"rgb(112, 112, 112)",deepslate_coal_ore:"rgb(100, 100, 100)",nether_gold_ore:"rgb(112, 2, 0)",mangrove_roots:"rgb(129, 86, 49)",muddy_mangrove_roots:"rgb(129, 86, 49)",oak_wood:"rgb(143, 119, 72)",spruce_wood:"rgb(129, 86, 49)",birch_wood:"rgb(247, 233, 163)",jungle_wood:"rgb(151, 109, 77)",acacia_wood:"rgb(76, 76, 76)",cherry_wood:"rgb(57, 41, 35)",dark_oak_wood:"rgb(102, 76, 51)",mangrove_wood:"rgb(153, 51, 51)",stripped_oak_wood:"rgb(143, 119, 72)",stripped_spruce_wood:"rgb(129, 86, 49)",stripped_birch_wood:"rgb(247, 233, 163)",stripped_jungle_wood:"rgb(151, 109, 77)",stripped_acacia_wood:"rgb(216, 127, 51)",stripped_cherry_wood:"rgb(160, 77, 78)",stripped_dark_oak_wood:"rgb(102, 76, 51)",oak_leaves:"rgb(0, 124, 0)",spruce_leaves:"rgb(0, 124, 0)",birch_leaves:"rgb(0, 124, 0)",jungle_leaves:"rgb(0, 124, 0)",acacia_leaves:"rgb(0, 124, 0)",cherry_leaves:"rgb(242, 127, 165)",dark_oak_leaves:"rgb(0, 124, 0)",mangrove_leaves:"rgb(0, 124, 0)",azalea_leaves:"rgb(0, 124, 0)",flowering_azalea_leaves:"rgb(0, 124, 0)",sponge:"rgb(229, 229, 51)",wet_sponge:"rgb(229, 229, 51)",lapis_ore:"rgb(112, 112, 112)",deepslate_lapis_ore:"rgb(100, 100, 100)",lapis_block:"rgb(74, 128, 255)",dispenser:"rgb(112, 112, 112)",sandstone:"rgb(247, 233, 163)",chiseled_sandstone:"rgb(247, 233, 163)",cut_sandstone:"rgb(247, 233, 163)",note_block:"rgb(143, 119, 72)",sticky_piston:"rgb(112, 112, 112)",cobweb:"rgb(199, 199, 199)",grass:"rgb(0, 124, 0)",fern:"rgb(0, 124, 0)",dead_bush:"rgb(143, 119, 72)",seagrass:"rgb(64, 64, 255)",tall_seagrass:"rgb(64, 64, 255)",piston:"rgb(112, 112, 112)",piston_head:"rgb(112, 112, 112)",white_wool:"rgb(255, 255, 255)",orange_wool:"rgb(216, 127, 51)",magenta_wool:"rgb(178, 76, 216)",light_blue_wool:"rgb(102, 153, 216)",yellow_wool:"rgb(229, 229, 51)",lime_wool:"rgb(127, 204, 25)",pink_wool:"rgb(242, 127, 165)",gray_wool:"rgb(76, 76, 76)",light_gray_wool:"rgb(153, 153, 153)",cyan_wool:"rgb(76, 127, 153)",purple_wool:"rgb(127, 63, 178)",blue_wool:"rgb(51, 76, 178)",brown_wool:"rgb(102, 76, 51)",green_wool:"rgb(102, 127, 51)",red_wool:"rgb(153, 51, 51)",black_wool:"rgb(25, 25, 25)",moving_piston:"rgb(112, 112, 112)",dandelion:"rgb(0, 124, 0)",torchflower:"rgb(0, 124, 0)",poppy:"rgb(0, 124, 0)",blue_orchid:"rgb(0, 124, 0)",allium:"rgb(0, 124, 0)",azure_bluet:"rgb(0, 124, 0)",red_tulip:"rgb(0, 124, 0)",orange_tulip:"rgb(0, 124, 0)",white_tulip:"rgb(0, 124, 0)",pink_tulip:"rgb(0, 124, 0)",oxeye_daisy:"rgb(0, 124, 0)",cornflower:"rgb(0, 124, 0)",wither_rose:"rgb(0, 124, 0)",lily_of_the_valley:"rgb(0, 124, 0)",brown_mushroom:"rgb(102, 76, 51)",red_mushroom:"rgb(153, 51, 51)",gold_block:"rgb(250, 238, 77)",iron_block:"rgb(167, 167, 167)",bricks:"rgb(153, 51, 51)",tnt:"rgb(255, 0, 0)",bookshelf:"rgb(143, 119, 72)",chiseled_bookshelf:"rgb(143, 119, 72)",mossy_cobblestone:"rgb(112, 112, 112)",obsidian:"rgb(25, 25, 25)",fire:"rgb(255, 0, 0)",soul_fire:"rgb(102, 153, 216)",spawner:"rgb(112, 112, 112)",chest:"rgb(143, 119, 72)",diamond_ore:"rgb(112, 112, 112)",deepslate_diamond_ore:"rgb(100, 100, 100)",diamond_block:"rgb(92, 219, 213)",crafting_table:"rgb(143, 119, 72)",wheat:"rgb(0, 124, 0)",farmland:"rgb(151, 109, 77)",furnace:"rgb(112, 112, 112)",oak_sign:"rgb(143, 119, 72)",birch_sign:"rgb(247, 233, 163)",acacia_sign:"rgb(216, 127, 51)",oak_wall_sign:"rgb(143, 119, 72)",birch_wall_sign:"rgb(247, 233, 163)",acacia_wall_sign:"rgb(216, 127, 51)",birch_hanging_sign:"rgb(247, 233, 163)",acacia_hanging_sign:"rgb(216, 127, 51)",cherry_hanging_sign:"rgb(160, 77, 78)",crimson_hanging_sign:"rgb(148, 63, 97)",warped_hanging_sign:"rgb(58, 142, 140)",bamboo_hanging_sign:"rgb(229, 229, 51)",spruce_wall_hanging_sign:"rgb(143, 119, 72)",birch_wall_hanging_sign:"rgb(247, 233, 163)",acacia_wall_hanging_sign:"rgb(216, 127, 51)",cherry_wall_hanging_sign:"rgb(160, 77, 78)",crimson_wall_hanging_sign:"rgb(148, 63, 97)",warped_wall_hanging_sign:"rgb(58, 142, 140)",bamboo_wall_hanging_sign:"rgb(229, 229, 51)",stone_pressure_plate:"rgb(112, 112, 112)",iron_door:"rgb(167, 167, 167)",redstone_ore:"rgb(112, 112, 112)",deepslate_redstone_ore:"rgb(100, 100, 100)",snow:"rgb(255, 255, 255)",ice:"rgb(160, 160, 255)",snow_block:"rgb(255, 255, 255)",cactus:"rgb(0, 124, 0)",clay:"rgb(164, 168, 184)",sugar_cane:"rgb(0, 124, 0)",jukebox:"rgb(151, 109, 77)",pumpkin:"rgb(216, 127, 51)",netherrack:"rgb(112, 2, 0)",soul_sand:"rgb(102, 76, 51)",soul_soil:"rgb(102, 76, 51)",basalt:"rgb(25, 25, 25)",polished_basalt:"rgb(25, 25, 25)",glowstone:"rgb(247, 233, 163)",carved_pumpkin:"rgb(216, 127, 51)",jack_o_lantern:"rgb(216, 127, 51)",oak_trapdoor:"rgb(143, 119, 72)",spruce_trapdoor:"rgb(129, 86, 49)",birch_trapdoor:"rgb(247, 233, 163)",jungle_trapdoor:"rgb(151, 109, 77)",acacia_trapdoor:"rgb(216, 127, 51)",cherry_trapdoor:"rgb(209, 177, 161)",dark_oak_trapdoor:"rgb(102, 76, 51)",mangrove_trapdoor:"rgb(153, 51, 51)",bamboo_trapdoor:"rgb(229, 229, 51)",stone_bricks:"rgb(112, 112, 112)",mossy_stone_bricks:"rgb(112, 112, 112)",cracked_stone_bricks:"rgb(112, 112, 112)",chiseled_stone_bricks:"rgb(112, 112, 112)",mud_bricks:"rgb(135, 107, 98)",infested_stone:"rgb(164, 168, 184)",infested_cobblestone:"rgb(164, 168, 184)",infested_stone_bricks:"rgb(164, 168, 184)",infested_mossy_stone_bricks:"rgb(164, 168, 184)",infested_cracked_stone_bricks:"rgb(164, 168, 184)",infested_chiseled_stone_bricks:"rgb(164, 168, 184)",brown_mushroom_block:"rgb(151, 109, 77)",red_mushroom_block:"rgb(153, 51, 51)",mushroom_stem:"rgb(199, 199, 199)",melon:"rgb(127, 204, 25)",attached_pumpkin_stem:"rgb(0, 124, 0)",attached_melon_stem:"rgb(0, 124, 0)",pumpkin_stem:"rgb(0, 124, 0)",melon_stem:"rgb(0, 124, 0)",vine:"rgb(0, 124, 0)",glow_lichen:"rgb(127, 167, 150)",mycelium:"rgb(127, 63, 178)",lily_pad:"rgb(0, 124, 0)",nether_bricks:"rgb(112, 2, 0)",nether_brick_fence:"rgb(112, 2, 0)",nether_wart:"rgb(153, 51, 51)",enchanting_table:"rgb(153, 51, 51)",brewing_stand:"rgb(167, 167, 167)",cauldron:"rgb(112, 112, 112)",end_portal:"rgb(25, 25, 25)",end_portal_frame:"rgb(102, 127, 51)",end_stone:"rgb(247, 233, 163)",dragon_egg:"rgb(25, 25, 25)",cocoa:"rgb(0, 124, 0)",emerald_ore:"rgb(112, 112, 112)",deepslate_emerald_ore:"rgb(100, 100, 100)",ender_chest:"rgb(112, 112, 112)",emerald_block:"rgb(0, 217, 58)",command_block:"rgb(102, 76, 51)",beacon:"rgb(92, 219, 213)",carrots:"rgb(0, 124, 0)",potatoes:"rgb(0, 124, 0)",anvil:"rgb(167, 167, 167)",chipped_anvil:"rgb(167, 167, 167)",damaged_anvil:"rgb(167, 167, 167)",trapped_chest:"rgb(143, 119, 72)",light_weighted_pressure_plate:"rgb(250, 238, 77)",heavy_weighted_pressure_plate:"rgb(167, 167, 167)",daylight_detector:"rgb(143, 119, 72)",redstone_block:"rgb(255, 0, 0)",nether_quartz_ore:"rgb(112, 2, 0)",hopper:"rgb(112, 112, 112)",quartz_block:"rgb(255, 252, 245)",chiseled_quartz_block:"rgb(255, 252, 245)",quartz_pillar:"rgb(255, 252, 245)",dropper:"rgb(112, 112, 112)",white_terracotta:"rgb(209, 177, 161)",orange_terracotta:"rgb(159, 82, 36)",magenta_terracotta:"rgb(149, 87, 108)",light_blue_terracotta:"rgb(112, 108, 138)",yellow_terracotta:"rgb(186, 133, 36)",lime_terracotta:"rgb(103, 117, 53)",pink_terracotta:"rgb(160, 77, 78)",gray_terracotta:"rgb(57, 41, 35)",light_gray_terracotta:"rgb(135, 107, 98)",cyan_terracotta:"rgb(87, 92, 92)",purple_terracotta:"rgb(122, 73, 88)",blue_terracotta:"rgb(76, 62, 92)",brown_terracotta:"rgb(76, 50, 35)",green_terracotta:"rgb(76, 82, 42)",red_terracotta:"rgb(142, 60, 46)",black_terracotta:"rgb(37, 22, 16)",slime_block:"rgb(127, 178, 56)",iron_trapdoor:"rgb(167, 167, 167)",prismarine:"rgb(76, 127, 153)",prismarine_bricks:"rgb(92, 219, 213)",dark_prismarine:"rgb(92, 219, 213)",prismarine_slab:"rgb(76, 127, 153)",prismarine_brick_slab:"rgb(92, 219, 213)",dark_prismarine_slab:"rgb(92, 219, 213)",sea_lantern:"rgb(255, 252, 245)",hay_block:"rgb(229, 229, 51)",white_carpet:"rgb(255, 255, 255)",orange_carpet:"rgb(216, 127, 51)",magenta_carpet:"rgb(178, 76, 216)",light_blue_carpet:"rgb(102, 153, 216)",yellow_carpet:"rgb(229, 229, 51)",lime_carpet:"rgb(127, 204, 25)",pink_carpet:"rgb(242, 127, 165)",gray_carpet:"rgb(76, 76, 76)",light_gray_carpet:"rgb(153, 153, 153)",cyan_carpet:"rgb(76, 127, 153)",purple_carpet:"rgb(127, 63, 178)",blue_carpet:"rgb(51, 76, 178)",brown_carpet:"rgb(102, 76, 51)",green_carpet:"rgb(102, 127, 51)",red_carpet:"rgb(153, 51, 51)",black_carpet:"rgb(25, 25, 25)",terracotta:"rgb(216, 127, 51)",coal_block:"rgb(25, 25, 25)",packed_ice:"rgb(160, 160, 255)",sunflower:"rgb(0, 124, 0)",lilac:"rgb(0, 124, 0)",rose_bush:"rgb(0, 124, 0)",peony:"rgb(0, 124, 0)",tall_grass:"rgb(0, 124, 0)",large_fern:"rgb(0, 124, 0)",white_banner:"rgb(143, 119, 72)",orange_banner:"rgb(143, 119, 72)",magenta_banner:"rgb(143, 119, 72)",light_blue_banner:"rgb(143, 119, 72)",yellow_banner:"rgb(143, 119, 72)",lime_banner:"rgb(143, 119, 72)",pink_banner:"rgb(143, 119, 72)",gray_banner:"rgb(143, 119, 72)",light_gray_banner:"rgb(143, 119, 72)",cyan_banner:"rgb(143, 119, 72)",purple_banner:"rgb(143, 119, 72)",blue_banner:"rgb(143, 119, 72)",brown_banner:"rgb(143, 119, 72)",green_banner:"rgb(143, 119, 72)",red_banner:"rgb(143, 119, 72)",black_banner:"rgb(143, 119, 72)",white_wall_banner:"rgb(143, 119, 72)",orange_wall_banner:"rgb(143, 119, 72)",magenta_wall_banner:"rgb(143, 119, 72)",light_blue_wall_banner:"rgb(143, 119, 72)",yellow_wall_banner:"rgb(143, 119, 72)",lime_wall_banner:"rgb(143, 119, 72)",pink_wall_banner:"rgb(143, 119, 72)",gray_wall_banner:"rgb(143, 119, 72)",light_gray_wall_banner:"rgb(143, 119, 72)",cyan_wall_banner:"rgb(143, 119, 72)",purple_wall_banner:"rgb(143, 119, 72)",blue_wall_banner:"rgb(143, 119, 72)",brown_wall_banner:"rgb(143, 119, 72)",green_wall_banner:"rgb(143, 119, 72)",red_wall_banner:"rgb(143, 119, 72)",black_wall_banner:"rgb(143, 119, 72)",red_sandstone:"rgb(216, 127, 51)",chiseled_red_sandstone:"rgb(216, 127, 51)",cut_red_sandstone:"rgb(216, 127, 51)",oak_slab:"rgb(143, 119, 72)",spruce_slab:"rgb(129, 86, 49)",birch_slab:"rgb(247, 233, 163)",jungle_slab:"rgb(151, 109, 77)",acacia_slab:"rgb(216, 127, 51)",cherry_slab:"rgb(209, 177, 161)",dark_oak_slab:"rgb(102, 76, 51)",mangrove_slab:"rgb(153, 51, 51)",bamboo_slab:"rgb(229, 229, 51)",bamboo_mosaic_slab:"rgb(229, 229, 51)",stone_slab:"rgb(112, 112, 112)",smooth_stone_slab:"rgb(112, 112, 112)",sandstone_slab:"rgb(247, 233, 163)",cut_sandstone_slab:"rgb(247, 233, 163)",petrified_oak_slab:"rgb(143, 119, 72)",cobblestone_slab:"rgb(112, 112, 112)",brick_slab:"rgb(153, 51, 51)",stone_brick_slab:"rgb(112, 112, 112)",mud_brick_slab:"rgb(135, 107, 98)",nether_brick_slab:"rgb(112, 2, 0)",quartz_slab:"rgb(255, 252, 245)",red_sandstone_slab:"rgb(216, 127, 51)",cut_red_sandstone_slab:"rgb(216, 127, 51)",purpur_slab:"rgb(178, 76, 216)",smooth_stone:"rgb(112, 112, 112)",smooth_sandstone:"rgb(247, 233, 163)",smooth_quartz:"rgb(255, 252, 245)",smooth_red_sandstone:"rgb(216, 127, 51)",chorus_plant:"rgb(127, 63, 178)",chorus_flower:"rgb(127, 63, 178)",purpur_block:"rgb(178, 76, 216)",purpur_pillar:"rgb(178, 76, 216)",end_stone_bricks:"rgb(247, 233, 163)",torchflower_crop:"rgb(0, 124, 0)",pitcher_crop:"rgb(0, 124, 0)",pitcher_plant:"rgb(0, 124, 0)",beetroots:"rgb(0, 124, 0)",dirt_path:"rgb(151, 109, 77)",end_gateway:"rgb(25, 25, 25)",repeating_command_block:"rgb(127, 63, 178)",chain_command_block:"rgb(102, 127, 51)",frosted_ice:"rgb(160, 160, 255)",magma_block:"rgb(112, 2, 0)",nether_wart_block:"rgb(153, 51, 51)",red_nether_bricks:"rgb(112, 2, 0)",bone_block:"rgb(247, 233, 163)",observer:"rgb(112, 112, 112)",kelp:"rgb(64, 64, 255)",kelp_plant:"rgb(64, 64, 255)",dried_kelp_block:"rgb(102, 127, 51)",turtle_egg:"rgb(247, 233, 163)",sniffer_egg:"rgb(153, 51, 51)",dead_tube_coral_block:"rgb(76, 76, 76)",dead_brain_coral_block:"rgb(76, 76, 76)",dead_bubble_coral_block:"rgb(76, 76, 76)",dead_fire_coral_block:"rgb(76, 76, 76)",dead_horn_coral_block:"rgb(76, 76, 76)",tube_coral_block:"rgb(51, 76, 178)",brain_coral_block:"rgb(242, 127, 165)",bubble_coral_block:"rgb(127, 63, 178)",fire_coral_block:"rgb(153, 51, 51)",horn_coral_block:"rgb(229, 229, 51)",dead_tube_coral:"rgb(76, 76, 76)",dead_brain_coral:"rgb(76, 76, 76)",dead_bubble_coral:"rgb(76, 76, 76)",dead_fire_coral:"rgb(76, 76, 76)",dead_horn_coral:"rgb(76, 76, 76)",tube_coral:"rgb(51, 76, 178)",brain_coral:"rgb(242, 127, 165)",bubble_coral:"rgb(127, 63, 178)",fire_coral:"rgb(153, 51, 51)",horn_coral:"rgb(229, 229, 51)",dead_tube_coral_fan:"rgb(76, 76, 76)",dead_brain_coral_fan:"rgb(76, 76, 76)",dead_bubble_coral_fan:"rgb(76, 76, 76)",dead_fire_coral_fan:"rgb(76, 76, 76)",dead_horn_coral_fan:"rgb(76, 76, 76)",tube_coral_fan:"rgb(51, 76, 178)",brain_coral_fan:"rgb(242, 127, 165)",bubble_coral_fan:"rgb(127, 63, 178)",fire_coral_fan:"rgb(153, 51, 51)",horn_coral_fan:"rgb(229, 229, 51)",dead_tube_coral_wall_fan:"rgb(76, 76, 76)",dead_brain_coral_wall_fan:"rgb(76, 76, 76)",dead_bubble_coral_wall_fan:"rgb(76, 76, 76)",dead_fire_coral_wall_fan:"rgb(76, 76, 76)",dead_horn_coral_wall_fan:"rgb(76, 76, 76)",tube_coral_wall_fan:"rgb(51, 76, 178)",brain_coral_wall_fan:"rgb(242, 127, 165)",bubble_coral_wall_fan:"rgb(127, 63, 178)",fire_coral_wall_fan:"rgb(153, 51, 51)",horn_coral_wall_fan:"rgb(229, 229, 51)",sea_pickle:"rgb(102, 127, 51)",blue_ice:"rgb(160, 160, 255)",conduit:"rgb(92, 219, 213)",bamboo_sapling:"rgb(143, 119, 72)",bamboo:"rgb(0, 124, 0)",bubble_column:"rgb(64, 64, 255)",scaffolding:"rgb(247, 233, 163)",loom:"rgb(143, 119, 72)",barrel:"rgb(143, 119, 72)",smoker:"rgb(112, 112, 112)",blast_furnace:"rgb(112, 112, 112)",cartography_table:"rgb(143, 119, 72)",fletching_table:"rgb(143, 119, 72)",grindstone:"rgb(167, 167, 167)",lectern:"rgb(143, 119, 72)",smithing_table:"rgb(143, 119, 72)",stonecutter:"rgb(112, 112, 112)",bell:"rgb(250, 238, 77)",lantern:"rgb(167, 167, 167)",soul_lantern:"rgb(167, 167, 167)",campfire:"rgb(129, 86, 49)",soul_campfire:"rgb(129, 86, 49)",sweet_berry_bush:"rgb(0, 124, 0)",warped_hyphae:"rgb(86, 44, 62)",stripped_warped_hyphae:"rgb(86, 44, 62)",warped_nylium:"rgb(22, 126, 134)",warped_fungus:"rgb(76, 127, 153)",warped_wart_block:"rgb(20, 180, 133)",warped_roots:"rgb(76, 127, 153)",nether_sprouts:"rgb(76, 127, 153)",crimson_hyphae:"rgb(92, 25, 29)",stripped_crimson_hyphae:"rgb(92, 25, 29)",crimson_nylium:"rgb(189, 48, 49)",crimson_fungus:"rgb(112, 2, 0)",shroomlight:"rgb(153, 51, 51)",weeping_vines:"rgb(112, 2, 0)",weeping_vines_plant:"rgb(112, 2, 0)",twisting_vines:"rgb(76, 127, 153)",twisting_vines_plant:"rgb(76, 127, 153)",crimson_roots:"rgb(112, 2, 0)",crimson_planks:"rgb(148, 63, 97)",warped_planks:"rgb(58, 142, 140)",structure_block:"rgb(153, 153, 153)",jigsaw:"rgb(153, 153, 153)",composter:"rgb(143, 119, 72)",target:"rgb(255, 252, 245)",bee_nest:"rgb(229, 229, 51)",beehive:"rgb(143, 119, 72)",honey_block:"rgb(216, 127, 51)",honeycomb_block:"rgb(216, 127, 51)",netherite_block:"rgb(25, 25, 25)",ancient_debris:"rgb(25, 25, 25)",crying_obsidian:"rgb(25, 25, 25)",respawn_anchor:"rgb(25, 25, 25)",lodestone:"rgb(167, 167, 167)",blackstone:"rgb(25, 25, 25)",polished_blackstone_pressure_plate:"rgb(25, 25, 25)",chiseled_nether_bricks:"rgb(112, 2, 0)",cracked_nether_bricks:"rgb(112, 2, 0)",amethyst_block:"rgb(127, 63, 178)",budding_amethyst:"rgb(127, 63, 178)",amethyst_cluster:"rgb(127, 63, 178)",tuff:"rgb(57, 41, 35)",calcite:"rgb(209, 177, 161)",tinted_glass:"rgb(76, 76, 76)",powder_snow:"rgb(255, 255, 255)",sculk_sensor:"rgb(76, 127, 153)",sculk:"rgb(25, 25, 25)",sculk_vein:"rgb(25, 25, 25)",sculk_catalyst:"rgb(25, 25, 25)",sculk_shrieker:"rgb(25, 25, 25)",oxidized_copper:"rgb(22, 126, 134)",weathered_copper:"rgb(58, 142, 140)",exposed_copper:"rgb(135, 107, 98)",copper_block:"rgb(216, 127, 51)",deepslate_copper_ore:"rgb(100, 100, 100)",lightning_rod:"rgb(216, 127, 51)",pointed_dripstone:"rgb(76, 50, 35)",dripstone_block:"rgb(76, 50, 35)",cave_vines:"rgb(0, 124, 0)",cave_vines_plant:"rgb(0, 124, 0)",spore_blossom:"rgb(0, 124, 0)",azalea:"rgb(0, 124, 0)",flowering_azalea:"rgb(0, 124, 0)",moss_carpet:"rgb(102, 127, 51)",pink_petals:"rgb(0, 124, 0)",moss_block:"rgb(102, 127, 51)",big_dripleaf:"rgb(0, 124, 0)",big_dripleaf_stem:"rgb(0, 124, 0)",small_dripleaf:"rgb(0, 124, 0)",hanging_roots:"rgb(151, 109, 77)",rooted_dirt:"rgb(151, 109, 77)",mud:"rgb(87, 92, 92)",deepslate:"rgb(100, 100, 100)",infested_deepslate:"rgb(100, 100, 100)",raw_iron_block:"rgb(216, 175, 147)",raw_copper_block:"rgb(216, 127, 51)",raw_gold_block:"rgb(250, 238, 77)",ochre_froglight:"rgb(247, 233, 163)",verdant_froglight:"rgb(127, 167, 150)",pearlescent_froglight:"rgb(242, 127, 165)",frogspawn:"rgb(64, 64, 255)",reinforced_deepslate:"rgb(100, 100, 100)",decorated_pot:"rgb(142, 60, 46)"},invisibleBlocks:{air:!0,void_air:!0,cave_air:!0,barrier:!0,light:!0,moving_piston:!0}};var El={blocks:{"0:0":"air","1:0":"stone","1:1":"granite","1:2":"polished_granite","1:3":"diorite","1:4":"polished_diorite","1:5":"andesite","1:6":"polished_andesite","2:0":"grass_block[snowy=false]","3:0":"dirt","3:1":"coarse_dirt","3:2":"podzol[snowy=false]","4:0":"cobblestone","5:0":"oak_planks","5:1":"spruce_planks","5:2":"birch_planks","5:3":"jungle_planks","5:4":"acacia_planks","5:5":"dark_oak_planks","6:0":"oak_sapling[stage=0]","6:1":"spruce_sapling[stage=0]","6:2":"birch_sapling[stage=0]","6:3":"jungle_sapling[stage=0]","6:4":"acacia_sapling[stage=0]","6:5":"dark_oak_sapling[stage=0]","6:8":"oak_sapling[stage=1]","6:9":"spruce_sapling[stage=1]","6:10":"birch_sapling[stage=1]","6:11":"jungle_sapling[stage=1]","6:12":"acacia_sapling[stage=1]","6:13":"dark_oak_sapling[stage=1]","7:0":"bedrock","8:0":"water[level=0]","8:1":"water[level=1]","8:2":"water[level=2]","8:3":"water[level=3]","8:4":"water[level=4]","8:5":"water[level=5]","8:6":"water[level=6]","8:7":"water[level=7]","8:8":"water[level=8]","8:9":"water[level=9]","8:10":"water[level=10]","8:11":"water[level=11]","8:12":"water[level=12]","8:13":"water[level=13]","8:14":"water[level=14]","8:15":"water[level=15]","9:0":"water[level=0]","9:1":"water[level=1]","9:2":"water[level=2]","9:3":"water[level=3]","9:4":"water[level=4]","9:5":"water[level=5]","9:6":"water[level=6]","9:7":"water[level=7]","9:8":"water[level=8]","9:9":"water[level=9]","9:10":"water[level=10]","9:11":"water[level=11]","9:12":"water[level=12]","9:13":"water[level=13]","9:14":"water[level=14]","9:15":"water[level=15]","10:0":"lava[level=0]","10:1":"lava[level=1]","10:2":"lava[level=2]","10:3":"lava[level=3]","10:4":"lava[level=4]","10:5":"lava[level=5]","10:6":"lava[level=6]","10:7":"lava[level=7]","10:8":"lava[level=8]","10:9":"lava[level=9]","10:10":"lava[level=10]","10:11":"lava[level=11]","10:12":"lava[level=12]","10:13":"lava[level=13]","10:14":"lava[level=14]","10:15":"lava[level=15]","11:0":"lava[level=0]","11:1":"lava[level=1]","11:2":"lava[level=2]","11:3":"lava[level=3]","11:4":"lava[level=4]","11:5":"lava[level=5]","11:6":"lava[level=6]","11:7":"lava[level=7]","11:8":"lava[level=8]","11:9":"lava[level=9]","11:10":"lava[level=10]","11:11":"lava[level=11]","11:12":"lava[level=12]","11:13":"lava[level=13]","11:14":"lava[level=14]","11:15":"lava[level=15]","12:0":"sand","12:1":"red_sand","13:0":"gravel","14:0":"gold_ore","15:0":"iron_ore","16:0":"coal_ore","17:0":"oak_log[axis=y]","17:1":"spruce_log[axis=y]","17:2":"birch_log[axis=y]","17:3":"jungle_log[axis=y]","17:4":"oak_log[axis=x]","17:5":"spruce_log[axis=x]","17:6":"birch_log[axis=x]","17:7":"jungle_log[axis=x]","17:8":"oak_log[axis=z]","17:9":"spruce_log[axis=z]","17:10":"birch_log[axis=z]","17:11":"jungle_log[axis=z]","17:12":"oak_bark","17:13":"spruce_bark","17:14":"birch_bark","17:15":"jungle_bark","18:0":"oak_leaves[check_decay=false,decayable=true]","18:1":"spruce_leaves[check_decay=false,decayable=true]","18:2":"birch_leaves[check_decay=false,decayable=true]","18:3":"jungle_leaves[check_decay=false,decayable=true]","18:4":"oak_leaves[check_decay=false,decayable=false]","18:5":"spruce_leaves[check_decay=false,decayable=false]","18:6":"birch_leaves[check_decay=false,decayable=false]","18:7":"jungle_leaves[check_decay=false,decayable=false]","18:8":"oak_leaves[check_decay=true,decayable=true]","18:9":"spruce_leaves[check_decay=true,decayable=true]","18:10":"birch_leaves[check_decay=true,decayable=true]","18:11":"jungle_leaves[check_decay=true,decayable=true]","18:12":"oak_leaves[check_decay=true,decayable=false]","18:13":"spruce_leaves[check_decay=true,decayable=false]","18:14":"birch_leaves[check_decay=true,decayable=false]","18:15":"jungle_leaves[check_decay=true,decayable=false]","19:0":"sponge","19:1":"wet_sponge","20:0":"glass","21:0":"lapis_ore","22:0":"lapis_block","23:0":"dispenser[facing=down,triggered=false]","23:1":"dispenser[facing=up,triggered=false]","23:2":"dispenser[facing=north,triggered=false]","23:3":"dispenser[facing=south,triggered=false]","23:4":"dispenser[facing=west,triggered=false]","23:5":"dispenser[facing=east,triggered=false]","23:8":"dispenser[facing=down,triggered=true]","23:9":"dispenser[facing=up,triggered=true]","23:10":"dispenser[facing=north,triggered=true]","23:11":"dispenser[facing=south,triggered=true]","23:12":"dispenser[facing=west,triggered=true]","23:13":"dispenser[facing=east,triggered=true]","24:0":"sandstone","24:1":"chiseled_sandstone","24:2":"cut_sandstone","25:0":"note_block","26:0":"red_bed[facing=south,occupied=false,part=foot]","26:1":"red_bed[facing=west,occupied=false,part=foot]","26:2":"red_bed[facing=north,occupied=false,part=foot]","26:3":"red_bed[facing=east,occupied=false,part=foot]","26:8":"red_bed[facing=south,occupied=false,part=head]","26:9":"red_bed[facing=west,occupied=false,part=head]","26:10":"red_bed[facing=north,occupied=false,part=head]","26:11":"red_bed[facing=east,occupied=false,part=head]","26:12":"red_bed[facing=south,occupied=true,part=head]","26:13":"red_bed[facing=west,occupied=true,part=head]","26:14":"red_bed[facing=north,occupied=true,part=head]","26:15":"red_bed[facing=east,occupied=true,part=head]","27:0":"powered_rail[powered=false,shape=north_south]","27:1":"powered_rail[powered=false,shape=east_west]","27:2":"powered_rail[powered=false,shape=ascending_east]","27:3":"powered_rail[powered=false,shape=ascending_west]","27:4":"powered_rail[powered=false,shape=ascending_north]","27:5":"powered_rail[powered=false,shape=ascending_south]","27:8":"powered_rail[powered=true,shape=north_south]","27:9":"powered_rail[powered=true,shape=east_west]","27:10":"powered_rail[powered=true,shape=ascending_east]","27:11":"powered_rail[powered=true,shape=ascending_west]","27:12":"powered_rail[powered=true,shape=ascending_north]","27:13":"powered_rail[powered=true,shape=ascending_south]","28:0":"detector_rail[powered=false,shape=north_south]","28:1":"detector_rail[powered=false,shape=east_west]","28:2":"detector_rail[powered=false,shape=ascending_east]","28:3":"detector_rail[powered=false,shape=ascending_west]","28:4":"detector_rail[powered=false,shape=ascending_north]","28:5":"detector_rail[powered=false,shape=ascending_south]","28:8":"detector_rail[powered=true,shape=north_south]","28:9":"detector_rail[powered=true,shape=east_west]","28:10":"detector_rail[powered=true,shape=ascending_east]","28:11":"detector_rail[powered=true,shape=ascending_west]","28:12":"detector_rail[powered=true,shape=ascending_north]","28:13":"detector_rail[powered=true,shape=ascending_south]","29:0":"sticky_piston[extended=false,facing=down]","29:1":"sticky_piston[extended=false,facing=up]","29:2":"sticky_piston[extended=false,facing=north]","29:3":"sticky_piston[extended=false,facing=south]","29:4":"sticky_piston[extended=false,facing=west]","29:5":"sticky_piston[extended=false,facing=east]","29:8":"sticky_piston[extended=true,facing=down]","29:9":"sticky_piston[extended=true,facing=up]","29:10":"sticky_piston[extended=true,facing=north]","29:11":"sticky_piston[extended=true,facing=south]","29:12":"sticky_piston[extended=true,facing=west]","29:13":"sticky_piston[extended=true,facing=east]","30:0":"cobweb","31:0":"dead_bush","31:1":"grass","31:2":"fern","32:0":"dead_bush","33:0":"piston[extended=false,facing=down]","33:1":"piston[extended=false,facing=up]","33:2":"piston[extended=false,facing=north]","33:3":"piston[extended=false,facing=south]","33:4":"piston[extended=false,facing=west]","33:5":"piston[extended=false,facing=east]","33:8":"piston[extended=true,facing=down]","33:9":"piston[extended=true,facing=up]","33:10":"piston[extended=true,facing=north]","33:11":"piston[extended=true,facing=south]","33:12":"piston[extended=true,facing=west]","33:13":"piston[extended=true,facing=east]","34:0":"piston_head[facing=down,short=false,type=normal]","34:1":"piston_head[facing=up,short=false,type=normal]","34:2":"piston_head[facing=north,short=false,type=normal]","34:3":"piston_head[facing=south,short=false,type=normal]","34:4":"piston_head[facing=west,short=false,type=normal]","34:5":"piston_head[facing=east,short=false,type=normal]","34:8":"piston_head[facing=down,short=false,type=sticky]","34:9":"piston_head[facing=up,short=false,type=sticky]","34:10":"piston_head[facing=north,short=false,type=sticky]","34:11":"piston_head[facing=south,short=false,type=sticky]","34:12":"piston_head[facing=west,short=false,type=sticky]","34:13":"piston_head[facing=east,short=false,type=sticky]","35:0":"white_wool","35:1":"orange_wool","35:2":"magenta_wool","35:3":"light_blue_wool","35:4":"yellow_wool","35:5":"lime_wool","35:6":"pink_wool","35:7":"gray_wool","35:8":"light_gray_wool","35:9":"cyan_wool","35:10":"purple_wool","35:11":"blue_wool","35:12":"brown_wool","35:13":"green_wool","35:14":"red_wool","35:15":"black_wool","36:0":"moving_piston[facing=down,type=normal]","36:1":"moving_piston[facing=up,type=normal]","36:2":"moving_piston[facing=north,type=normal]","36:3":"moving_piston[facing=south,type=normal]","36:4":"moving_piston[facing=west,type=normal]","36:5":"moving_piston[facing=east,type=normal]","36:8":"moving_piston[facing=down,type=sticky]","36:9":"moving_piston[facing=up,type=sticky]","36:10":"moving_piston[facing=north,type=sticky]","36:11":"moving_piston[facing=south,type=sticky]","36:12":"moving_piston[facing=west,type=sticky]","36:13":"moving_piston[facing=east,type=sticky]","37:0":"dandelion","38:0":"poppy","38:1":"blue_orchid","38:2":"allium","38:3":"azure_bluet","38:4":"red_tulip","38:5":"orange_tulip","38:6":"white_tulip","38:7":"pink_tulip","38:8":"oxeye_daisy","39:0":"brown_mushroom","40:0":"red_mushroom","41:0":"gold_block","42:0":"iron_block","43:0":"stone_slab[type=double]","43:1":"sandstone_slab[type=double]","43:2":"petrified_oak_slab[type=double]","43:3":"cobblestone_slab[type=double]","43:4":"brick_slab[type=double]","43:5":"stone_brick_slab[type=double]","43:6":"nether_brick_slab[type=double]","43:7":"quartz_slab[type=double]","43:8":"smooth_stone","43:9":"smooth_sandstone","43:10":"petrified_oak_slab[type=double]","43:11":"cobblestone_slab[type=double]","43:12":"brick_slab[type=double]","43:13":"stone_brick_slab[type=double]","43:14":"nether_brick_slab[type=double]","43:15":"smooth_quartz","44:0":"stone_slab[type=bottom]","44:1":"sandstone_slab[type=bottom]","44:2":"petrified_oak_slab[type=bottom]","44:3":"cobblestone_slab[type=bottom]","44:4":"brick_slab[type=bottom]","44:5":"stone_brick_slab[type=bottom]","44:6":"nether_brick_slab[type=bottom]","44:7":"quartz_slab[type=bottom]","44:8":"stone_slab[type=top]","44:9":"sandstone_slab[type=top]","44:10":"petrified_oak_slab[type=top]","44:11":"cobblestone_slab[type=top]","44:12":"brick_slab[type=top]","44:13":"stone_brick_slab[type=top]","44:14":"nether_brick_slab[type=top]","44:15":"quartz_slab[type=top]","45:0":"bricks","46:0":"tnt[unstable=false]","46:1":"tnt[unstable=true]","47:0":"bookshelf","48:0":"mossy_cobblestone","49:0":"obsidian","50:1":"wall_torch[facing=east]","50:2":"wall_torch[facing=west]","50:3":"wall_torch[facing=south]","50:4":"wall_torch[facing=north]","50:5":"torch","51:0":"fire[age=0,east=false,north=false,south=false,up=false,west=false]","51:1":"fire[age=1,east=false,north=false,south=false,up=false,west=false]","51:2":"fire[age=2,east=false,north=false,south=false,up=false,west=false]","51:3":"fire[age=3,east=false,north=false,south=false,up=false,west=false]","51:4":"fire[age=4,east=false,north=false,south=false,up=false,west=false]","51:5":"fire[age=5,east=false,north=false,south=false,up=false,west=false]","51:6":"fire[age=6,east=false,north=false,south=false,up=false,west=false]","51:7":"fire[age=7,east=false,north=false,south=false,up=false,west=false]","51:8":"fire[age=8,east=false,north=false,south=false,up=false,west=false]","51:9":"fire[age=9,east=false,north=false,south=false,up=false,west=false]","51:10":"fire[age=10,east=false,north=false,south=false,up=false,west=false]","51:11":"fire[age=11,east=false,north=false,south=false,up=false,west=false]","51:12":"fire[age=12,east=false,north=false,south=false,up=false,west=false]","51:13":"fire[age=13,east=false,north=false,south=false,up=false,west=false]","51:14":"fire[age=14,east=false,north=false,south=false,up=false,west=false]","51:15":"fire[age=15,east=false,north=false,south=false,up=false,west=false]","52:0":"mob_spawner","53:0":"oak_stairs[facing=east,half=bottom,shape=straight]","53:1":"oak_stairs[facing=west,half=bottom,shape=straight]","53:2":"oak_stairs[facing=south,half=bottom,shape=straight]","53:3":"oak_stairs[facing=north,half=bottom,shape=straight]","53:4":"oak_stairs[facing=east,half=top,shape=straight]","53:5":"oak_stairs[facing=west,half=top,shape=straight]","53:6":"oak_stairs[facing=south,half=top,shape=straight]","53:7":"oak_stairs[facing=north,half=top,shape=straight]","54:2":"chest[facing=north,type=single]","54:3":"chest[facing=south,type=single]","54:4":"chest[facing=west,type=single]","54:5":"chest[facing=east,type=single]","55:0":"redstone_wire[east=none,north=none,power=0,south=none,west=none]","55:1":"redstone_wire[east=none,north=none,power=1,south=none,west=none]","55:2":"redstone_wire[east=none,north=none,power=2,south=none,west=none]","55:3":"redstone_wire[east=none,north=none,power=3,south=none,west=none]","55:4":"redstone_wire[east=none,north=none,power=4,south=none,west=none]","55:5":"redstone_wire[east=none,north=none,power=5,south=none,west=none]","55:6":"redstone_wire[east=none,north=none,power=6,south=none,west=none]","55:7":"redstone_wire[east=none,north=none,power=7,south=none,west=none]","55:8":"redstone_wire[east=none,north=none,power=8,south=none,west=none]","55:9":"redstone_wire[east=none,north=none,power=9,south=none,west=none]","55:10":"redstone_wire[east=none,north=none,power=10,south=none,west=none]","55:11":"redstone_wire[east=none,north=none,power=11,south=none,west=none]","55:12":"redstone_wire[east=none,north=none,power=12,south=none,west=none]","55:13":"redstone_wire[east=none,north=none,power=13,south=none,west=none]","55:14":"redstone_wire[east=none,north=none,power=14,south=none,west=none]","55:15":"redstone_wire[east=none,north=none,power=15,south=none,west=none]","56:0":"diamond_ore","57:0":"diamond_block","58:0":"crafting_table","59:0":"wheat[age=0]","59:1":"wheat[age=1]","59:2":"wheat[age=2]","59:3":"wheat[age=3]","59:4":"wheat[age=4]","59:5":"wheat[age=5]","59:6":"wheat[age=6]","59:7":"wheat[age=7]","60:0":"farmland[moisture=0]","60:1":"farmland[moisture=1]","60:2":"farmland[moisture=2]","60:3":"farmland[moisture=3]","60:4":"farmland[moisture=4]","60:5":"farmland[moisture=5]","60:6":"farmland[moisture=6]","60:7":"farmland[moisture=7]","61:2":"furnace[facing=north,lit=false]","61:3":"furnace[facing=south,lit=false]","61:4":"furnace[facing=west,lit=false]","61:5":"furnace[facing=east,lit=false]","62:2":"furnace[facing=north,lit=true]","62:3":"furnace[facing=south,lit=true]","62:4":"furnace[facing=west,lit=true]","62:5":"furnace[facing=east,lit=true]","63:0":"sign[rotation=0]","63:1":"sign[rotation=1]","63:2":"sign[rotation=2]","63:3":"sign[rotation=3]","63:4":"sign[rotation=4]","63:5":"sign[rotation=5]","63:6":"sign[rotation=6]","63:7":"sign[rotation=7]","63:8":"sign[rotation=8]","63:9":"sign[rotation=9]","63:10":"sign[rotation=10]","63:11":"sign[rotation=11]","63:12":"sign[rotation=12]","63:13":"sign[rotation=13]","63:14":"sign[rotation=14]","63:15":"sign[rotation=15]","64:0":"oak_door[facing=east,half=lower,hinge=right,open=false,powered=false]","64:1":"oak_door[facing=south,half=lower,hinge=right,open=false,powered=false]","64:2":"oak_door[facing=west,half=lower,hinge=right,open=false,powered=false]","64:3":"oak_door[facing=north,half=lower,hinge=right,open=false,powered=false]","64:4":"oak_door[facing=east,half=lower,hinge=right,open=true,powered=false]","64:5":"oak_door[facing=south,half=lower,hinge=right,open=true,powered=false]","64:6":"oak_door[facing=west,half=lower,hinge=right,open=true,powered=false]","64:7":"oak_door[facing=north,half=lower,hinge=right,open=true,powered=false]","64:8":"oak_door[facing=east,half=upper,hinge=left,open=false,powered=false]","64:9":"oak_door[facing=east,half=upper,hinge=right,open=false,powered=false]","64:10":"oak_door[facing=east,half=upper,hinge=left,open=false,powered=true]","64:11":"oak_door[facing=east,half=upper,hinge=right,open=false,powered=true]","65:2":"ladder[facing=north]","65:3":"ladder[facing=south]","65:4":"ladder[facing=west]","65:5":"ladder[facing=east]","66:0":"rail[shape=north_south]","66:1":"rail[shape=east_west]","66:2":"rail[shape=ascending_east]","66:3":"rail[shape=ascending_west]","66:4":"rail[shape=ascending_north]","66:5":"rail[shape=ascending_south]","66:6":"rail[shape=south_east]","66:7":"rail[shape=south_west]","66:8":"rail[shape=north_west]","66:9":"rail[shape=north_east]","67:0":"cobblestone_stairs[facing=east,half=bottom,shape=straight]","67:1":"cobblestone_stairs[facing=west,half=bottom,shape=straight]","67:2":"cobblestone_stairs[facing=south,half=bottom,shape=straight]","67:3":"cobblestone_stairs[facing=north,half=bottom,shape=straight]","67:4":"cobblestone_stairs[facing=east,half=top,shape=straight]","67:5":"cobblestone_stairs[facing=west,half=top,shape=straight]","67:6":"cobblestone_stairs[facing=south,half=top,shape=straight]","67:7":"cobblestone_stairs[facing=north,half=top,shape=straight]","68:2":"wall_sign[facing=north]","68:3":"wall_sign[facing=south]","68:4":"wall_sign[facing=west]","68:5":"wall_sign[facing=east]","69:0":"lever[face=ceiling,facing=west,powered=false]","69:1":"lever[face=wall,facing=east,powered=false]","69:2":"lever[face=wall,facing=west,powered=false]","69:3":"lever[face=wall,facing=south,powered=false]","69:4":"lever[face=wall,facing=north,powered=false]","69:5":"lever[face=floor,facing=north,powered=false]","69:6":"lever[face=floor,facing=west,powered=false]","69:7":"lever[face=ceiling,facing=north,powered=false]","69:8":"lever[face=ceiling,facing=west,powered=true]","69:9":"lever[face=wall,facing=east,powered=true]","69:10":"lever[face=wall,facing=west,powered=true]","69:11":"lever[face=wall,facing=south,powered=true]","69:12":"lever[face=wall,facing=north,powered=true]","69:13":"lever[face=floor,facing=north,powered=true]","69:14":"lever[face=floor,facing=west,powered=true]","69:15":"lever[face=ceiling,facing=north,powered=true]","70:0":"stone_pressure_plate[powered=false]","70:1":"stone_pressure_plate[powered=true]","71:0":"iron_door[facing=east,half=lower,hinge=right,open=false,powered=false]","71:1":"iron_door[facing=south,half=lower,hinge=right,open=false,powered=false]","71:2":"iron_door[facing=west,half=lower,hinge=right,open=false,powered=false]","71:3":"iron_door[facing=north,half=lower,hinge=right,open=false,powered=false]","71:4":"iron_door[facing=east,half=lower,hinge=right,open=true,powered=false]","71:5":"iron_door[facing=south,half=lower,hinge=right,open=true,powered=false]","71:6":"iron_door[facing=west,half=lower,hinge=right,open=true,powered=false]","71:7":"iron_door[facing=north,half=lower,hinge=right,open=true,powered=false]","71:8":"iron_door[facing=east,half=upper,hinge=left,open=false,powered=false]","71:9":"iron_door[facing=east,half=upper,hinge=right,open=false,powered=false]","71:10":"iron_door[facing=east,half=upper,hinge=left,open=false,powered=true]","71:11":"iron_door[facing=east,half=upper,hinge=right,open=false,powered=true]","72:0":"oak_pressure_plate[powered=false]","72:1":"oak_pressure_plate[powered=true]","73:0":"redstone_ore[lit=false]","74:0":"redstone_ore[lit=true]","75:1":"redstone_wall_torch[facing=east,lit=false]","75:2":"redstone_wall_torch[facing=west,lit=false]","75:3":"redstone_wall_torch[facing=south,lit=false]","75:4":"redstone_wall_torch[facing=north,lit=false]","75:5":"redstone_torch[lit=false]","76:1":"redstone_wall_torch[facing=east,lit=true]","76:2":"redstone_wall_torch[facing=west,lit=true]","76:3":"redstone_wall_torch[facing=south,lit=true]","76:4":"redstone_wall_torch[facing=north,lit=true]","76:5":"redstone_torch[lit=true]","77:0":"stone_button[face=ceiling,facing=north,powered=false]","77:1":"stone_button[face=wall,facing=east,powered=false]","77:2":"stone_button[face=wall,facing=west,powered=false]","77:3":"stone_button[face=wall,facing=south,powered=false]","77:4":"stone_button[face=wall,facing=north,powered=false]","77:5":"stone_button[face=floor,facing=north,powered=false]","77:8":"stone_button[face=ceiling,facing=north,powered=true]","77:9":"stone_button[face=wall,facing=east,powered=true]","77:10":"stone_button[face=wall,facing=west,powered=true]","77:11":"stone_button[face=wall,facing=south,powered=true]","77:12":"stone_button[face=wall,facing=north,powered=true]","77:13":"stone_button[face=floor,facing=north,powered=true]","78:0":"snow[layers=1]","78:1":"snow[layers=2]","78:2":"snow[layers=3]","78:3":"snow[layers=4]","78:4":"snow[layers=5]","78:5":"snow[layers=6]","78:6":"snow[layers=7]","78:7":"snow[layers=8]","79:0":"ice","80:0":"snow_block","81:0":"cactus[age=0]","81:1":"cactus[age=1]","81:2":"cactus[age=2]","81:3":"cactus[age=3]","81:4":"cactus[age=4]","81:5":"cactus[age=5]","81:6":"cactus[age=6]","81:7":"cactus[age=7]","81:8":"cactus[age=8]","81:9":"cactus[age=9]","81:10":"cactus[age=10]","81:11":"cactus[age=11]","81:12":"cactus[age=12]","81:13":"cactus[age=13]","81:14":"cactus[age=14]","81:15":"cactus[age=15]","82:0":"clay","83:0":"sugar_cane[age=0]","83:1":"sugar_cane[age=1]","83:2":"sugar_cane[age=2]","83:3":"sugar_cane[age=3]","83:4":"sugar_cane[age=4]","83:5":"sugar_cane[age=5]","83:6":"sugar_cane[age=6]","83:7":"sugar_cane[age=7]","83:8":"sugar_cane[age=8]","83:9":"sugar_cane[age=9]","83:10":"sugar_cane[age=10]","83:11":"sugar_cane[age=11]","83:12":"sugar_cane[age=12]","83:13":"sugar_cane[age=13]","83:14":"sugar_cane[age=14]","83:15":"sugar_cane[age=15]","84:0":"jukebox[has_record=false]","84:1":"jukebox[has_record=true]","85:0":"oak_fence[east=false,north=false,south=false,west=false]","86:0":"carved_pumpkin[facing=south]","86:1":"carved_pumpkin[facing=west]","86:2":"carved_pumpkin[facing=north]","86:3":"carved_pumpkin[facing=east]","87:0":"netherrack","88:0":"soul_sand","89:0":"glowstone","90:1":"portal[axis=x]","90:2":"portal[axis=z]","91:0":"jack_o_lantern[facing=south]","91:1":"jack_o_lantern[facing=west]","91:2":"jack_o_lantern[facing=north]","91:3":"jack_o_lantern[facing=east]","92:0":"cake[bites=0]","92:1":"cake[bites=1]","92:2":"cake[bites=2]","92:3":"cake[bites=3]","92:4":"cake[bites=4]","92:5":"cake[bites=5]","92:6":"cake[bites=6]","93:0":"repeater[delay=1,facing=south,locked=false,powered=false]","93:1":"repeater[delay=1,facing=west,locked=false,powered=false]","93:2":"repeater[delay=1,facing=north,locked=false,powered=false]","93:3":"repeater[delay=1,facing=east,locked=false,powered=false]","93:4":"repeater[delay=2,facing=south,locked=false,powered=false]","93:5":"repeater[delay=2,facing=west,locked=false,powered=false]","93:6":"repeater[delay=2,facing=north,locked=false,powered=false]","93:7":"repeater[delay=2,facing=east,locked=false,powered=false]","93:8":"repeater[delay=3,facing=south,locked=false,powered=false]","93:9":"repeater[delay=3,facing=west,locked=false,powered=false]","93:10":"repeater[delay=3,facing=north,locked=false,powered=false]","93:11":"repeater[delay=3,facing=east,locked=false,powered=false]","93:12":"repeater[delay=4,facing=south,locked=false,powered=false]","93:13":"repeater[delay=4,facing=west,locked=false,powered=false]","93:14":"repeater[delay=4,facing=north,locked=false,powered=false]","93:15":"repeater[delay=4,facing=east,locked=false,powered=false]","94:0":"repeater[delay=1,facing=south,locked=false,powered=true]","94:1":"repeater[delay=1,facing=west,locked=false,powered=true]","94:2":"repeater[delay=1,facing=north,locked=false,powered=true]","94:3":"repeater[delay=1,facing=east,locked=false,powered=true]","94:4":"repeater[delay=2,facing=south,locked=false,powered=true]","94:5":"repeater[delay=2,facing=west,locked=false,powered=true]","94:6":"repeater[delay=2,facing=north,locked=false,powered=true]","94:7":"repeater[delay=2,facing=east,locked=false,powered=true]","94:8":"repeater[delay=3,facing=south,locked=false,powered=true]","94:9":"repeater[delay=3,facing=west,locked=false,powered=true]","94:10":"repeater[delay=3,facing=north,locked=false,powered=true]","94:11":"repeater[delay=3,facing=east,locked=false,powered=true]","94:12":"repeater[delay=4,facing=south,locked=false,powered=true]","94:13":"repeater[delay=4,facing=west,locked=false,powered=true]","94:14":"repeater[delay=4,facing=north,locked=false,powered=true]","94:15":"repeater[delay=4,facing=east,locked=false,powered=true]","95:0":"white_stained_glass","95:1":"orange_stained_glass","95:2":"magenta_stained_glass","95:3":"light_blue_stained_glass","95:4":"yellow_stained_glass","95:5":"lime_stained_glass","95:6":"pink_stained_glass","95:7":"gray_stained_glass","95:8":"light_gray_stained_glass","95:9":"cyan_stained_glass","95:10":"purple_stained_glass","95:11":"blue_stained_glass","95:12":"brown_stained_glass","95:13":"green_stained_glass","95:14":"red_stained_glass","95:15":"black_stained_glass","96:0":"oak_trapdoor[facing=north,half=bottom,open=false]","96:1":"oak_trapdoor[facing=south,half=bottom,open=false]","96:2":"oak_trapdoor[facing=west,half=bottom,open=false]","96:3":"oak_trapdoor[facing=east,half=bottom,open=false]","96:4":"oak_trapdoor[facing=north,half=bottom,open=true]","96:5":"oak_trapdoor[facing=south,half=bottom,open=true]","96:6":"oak_trapdoor[facing=west,half=bottom,open=true]","96:7":"oak_trapdoor[facing=east,half=bottom,open=true]","96:8":"oak_trapdoor[facing=north,half=top,open=false]","96:9":"oak_trapdoor[facing=south,half=top,open=false]","96:10":"oak_trapdoor[facing=west,half=top,open=false]","96:11":"oak_trapdoor[facing=east,half=top,open=false]","96:12":"oak_trapdoor[facing=north,half=top,open=true]","96:13":"oak_trapdoor[facing=south,half=top,open=true]","96:14":"oak_trapdoor[facing=west,half=top,open=true]","96:15":"oak_trapdoor[facing=east,half=top,open=true]","97:0":"infested_stone","97:1":"infested_cobblestone","97:2":"infested_stone_bricks","97:3":"infested_mossy_stone_bricks","97:4":"infested_cracked_stone_bricks","97:5":"infested_chiseled_stone_bricks","98:0":"stone_bricks","98:1":"mossy_stone_bricks","98:2":"cracked_stone_bricks","98:3":"chiseled_stone_bricks","99:0":"brown_mushroom_block[north=false,east=false,south=false,west=false,up=false,down=false]","99:1":"brown_mushroom_block[north=true,east=false,south=false,west=true,up=true,down=false]","99:2":"brown_mushroom_block[north=true,east=false,south=false,west=false,up=true,down=false]","99:3":"brown_mushroom_block[north=true,east=true,south=false,west=false,up=true,down=false]","99:4":"brown_mushroom_block[north=false,east=false,south=false,west=true,up=true,down=false]","99:5":"brown_mushroom_block[north=false,east=false,south=false,west=false,up=true,down=false]","99:6":"brown_mushroom_block[north=false,east=true,south=false,west=false,up=true,down=false]","99:7":"brown_mushroom_block[north=false,east=false,south=true,west=true,up=true,down=false]","99:8":"brown_mushroom_block[north=false,east=false,south=true,west=false,up=true,down=false]","99:9":"brown_mushroom_block[north=false,east=true,south=true,west=false,up=true,down=false]","99:10":"mushroom_stem[north=true,east=true,south=true,west=true,up=false,down=false]","99:14":"brown_mushroom_block[north=true,east=true,south=true,west=true,up=true,down=true]","99:15":"mushroom_stem[north=true,east=true,south=true,west=true,up=true,down=true]","100:0":"red_mushroom_block[north=false,east=false,south=false,west=false,up=false,down=false]","100:1":"red_mushroom_block[north=true,east=false,south=false,west=true,up=true,down=false]","100:2":"red_mushroom_block[north=true,east=false,south=false,west=false,up=true,down=false]","100:3":"red_mushroom_block[north=true,east=true,south=false,west=false,up=true,down=false]","100:4":"red_mushroom_block[north=false,east=false,south=false,west=true,up=true,down=false]","100:5":"red_mushroom_block[north=false,east=false,south=false,west=false,up=true,down=false]","100:6":"red_mushroom_block[north=false,east=true,south=false,west=false,up=true,down=false]","100:7":"red_mushroom_block[north=false,east=false,south=true,west=true,up=true,down=false]","100:8":"red_mushroom_block[north=false,east=false,south=true,west=false,up=true,down=false]","100:9":"red_mushroom_block[north=false,east=true,south=true,west=false,up=true,down=false]","100:10":"mushroom_stem[north=true,east=true,south=true,west=true,up=false,down=false]","100:14":"red_mushroom_block[north=true,east=true,south=true,west=true,up=true,down=true]","100:15":"mushroom_stem[north=true,east=true,south=true,west=true,up=true,down=true]","101:0":"iron_bars[east=false,north=false,south=false,west=false]","102:0":"glass_pane[east=false,north=false,south=false,west=false]","103:0":"melon_block","104:0":"pumpkin_stem[age=0]","104:1":"pumpkin_stem[age=1]","104:2":"pumpkin_stem[age=2]","104:3":"pumpkin_stem[age=3]","104:4":"pumpkin_stem[age=4]","104:5":"pumpkin_stem[age=5]","104:6":"pumpkin_stem[age=6]","104:7":"pumpkin_stem[age=7]","105:0":"melon_stem[age=0]","105:1":"melon_stem[age=1]","105:2":"melon_stem[age=2]","105:3":"melon_stem[age=3]","105:4":"melon_stem[age=4]","105:5":"melon_stem[age=5]","105:6":"melon_stem[age=6]","105:7":"melon_stem[age=7]","106:0":"vine[east=false,north=false,south=false,up=true,west=false]","106:1":"vine[east=false,north=false,south=true,up=true,west=false]","106:2":"vine[east=false,north=false,south=false,up=true,west=true]","106:3":"vine[east=false,north=false,south=true,up=true,west=true]","106:4":"vine[east=false,north=true,south=false,up=true,west=false]","106:5":"vine[east=false,north=true,south=true,up=true,west=false]","106:6":"vine[east=false,north=true,south=false,up=true,west=true]","106:7":"vine[east=false,north=true,south=true,up=true,west=true]","106:8":"vine[east=true,north=false,south=false,up=true,west=false]","106:9":"vine[east=true,north=false,south=true,up=true,west=false]","106:10":"vine[east=true,north=false,south=false,up=true,west=true]","106:11":"vine[east=true,north=false,south=true,up=true,west=true]","106:12":"vine[east=true,north=true,south=false,up=true,west=false]","106:13":"vine[east=true,north=true,south=true,up=true,west=false]","106:14":"vine[east=true,north=true,south=false,up=true,west=true]","106:15":"vine[east=true,north=true,south=true,up=true,west=true]","107:0":"oak_fence_gate[facing=south,in_wall=false,open=false,powered=false]","107:1":"oak_fence_gate[facing=west,in_wall=false,open=false,powered=false]","107:2":"oak_fence_gate[facing=north,in_wall=false,open=false,powered=false]","107:3":"oak_fence_gate[facing=east,in_wall=false,open=false,powered=false]","107:4":"oak_fence_gate[facing=south,in_wall=false,open=true,powered=false]","107:5":"oak_fence_gate[facing=west,in_wall=false,open=true,powered=false]","107:6":"oak_fence_gate[facing=north,in_wall=false,open=true,powered=false]","107:7":"oak_fence_gate[facing=east,in_wall=false,open=true,powered=false]","107:8":"oak_fence_gate[facing=south,in_wall=false,open=false,powered=true]","107:9":"oak_fence_gate[facing=west,in_wall=false,open=false,powered=true]","107:10":"oak_fence_gate[facing=north,in_wall=false,open=false,powered=true]","107:11":"oak_fence_gate[facing=east,in_wall=false,open=false,powered=true]","107:12":"oak_fence_gate[facing=south,in_wall=false,open=true,powered=true]","107:13":"oak_fence_gate[facing=west,in_wall=false,open=true,powered=true]","107:14":"oak_fence_gate[facing=north,in_wall=false,open=true,powered=true]","107:15":"oak_fence_gate[facing=east,in_wall=false,open=true,powered=true]","108:0":"brick_stairs[facing=east,half=bottom,shape=straight]","108:1":"brick_stairs[facing=west,half=bottom,shape=straight]","108:2":"brick_stairs[facing=south,half=bottom,shape=straight]","108:3":"brick_stairs[facing=north,half=bottom,shape=straight]","108:4":"brick_stairs[facing=east,half=top,shape=straight]","108:5":"brick_stairs[facing=west,half=top,shape=straight]","108:6":"brick_stairs[facing=south,half=top,shape=straight]","108:7":"brick_stairs[facing=north,half=top,shape=straight]","109:0":"stone_brick_stairs[facing=east,half=bottom,shape=straight]","109:1":"stone_brick_stairs[facing=west,half=bottom,shape=straight]","109:2":"stone_brick_stairs[facing=south,half=bottom,shape=straight]","109:3":"stone_brick_stairs[facing=north,half=bottom,shape=straight]","109:4":"stone_brick_stairs[facing=east,half=top,shape=straight]","109:5":"stone_brick_stairs[facing=west,half=top,shape=straight]","109:6":"stone_brick_stairs[facing=south,half=top,shape=straight]","109:7":"stone_brick_stairs[facing=north,half=top,shape=straight]","110:0":"mycelium[snowy=false]","111:0":"lily_pad","112:0":"nether_bricks","113:0":"nether_brick_fence[east=false,north=false,south=false,west=false]","114:0":"nether_brick_stairs[facing=east,half=bottom,shape=straight]","114:1":"nether_brick_stairs[facing=west,half=bottom,shape=straight]","114:2":"nether_brick_stairs[facing=south,half=bottom,shape=straight]","114:3":"nether_brick_stairs[facing=north,half=bottom,shape=straight]","114:4":"nether_brick_stairs[facing=east,half=top,shape=straight]","114:5":"nether_brick_stairs[facing=west,half=top,shape=straight]","114:6":"nether_brick_stairs[facing=south,half=top,shape=straight]","114:7":"nether_brick_stairs[facing=north,half=top,shape=straight]","115:0":"nether_wart[age=0]","115:1":"nether_wart[age=1]","115:2":"nether_wart[age=2]","115:3":"nether_wart[age=3]","116:0":"enchanting_table","117:0":"brewing_stand[has_bottle_0=false,has_bottle_1=false,has_bottle_2=false]","117:1":"brewing_stand[has_bottle_0=true,has_bottle_1=false,has_bottle_2=false]","117:2":"brewing_stand[has_bottle_0=false,has_bottle_1=true,has_bottle_2=false]","117:3":"brewing_stand[has_bottle_0=true,has_bottle_1=true,has_bottle_2=false]","117:4":"brewing_stand[has_bottle_0=false,has_bottle_1=false,has_bottle_2=true]","117:5":"brewing_stand[has_bottle_0=true,has_bottle_1=false,has_bottle_2=true]","117:6":"brewing_stand[has_bottle_0=false,has_bottle_1=true,has_bottle_2=true]","117:7":"brewing_stand[has_bottle_0=true,has_bottle_1=true,has_bottle_2=true]","118:0":"cauldron[level=0]","118:1":"cauldron[level=1]","118:2":"cauldron[level=2]","118:3":"cauldron[level=3]","119:0":"end_portal","120:0":"end_portal_frame[eye=false,facing=south]","120:1":"end_portal_frame[eye=false,facing=west]","120:2":"end_portal_frame[eye=false,facing=north]","120:3":"end_portal_frame[eye=false,facing=east]","120:4":"end_portal_frame[eye=true,facing=south]","120:5":"end_portal_frame[eye=true,facing=west]","120:6":"end_portal_frame[eye=true,facing=north]","120:7":"end_portal_frame[eye=true,facing=east]","121:0":"end_stone","122:0":"dragon_egg","123:0":"redstone_lamp[lit=false]","124:0":"redstone_lamp[lit=true]","125:0":"oak_slab[type=double]","125:1":"spruce_slab[type=double]","125:2":"birch_slab[type=double]","125:3":"jungle_slab[type=double]","125:4":"acacia_slab[type=double]","125:5":"dark_oak_slab[type=double]","126:0":"oak_slab[type=bottom]","126:1":"spruce_slab[type=bottom]","126:2":"birch_slab[type=bottom]","126:3":"jungle_slab[type=bottom]","126:4":"acacia_slab[type=bottom]","126:5":"dark_oak_slab[type=bottom]","126:8":"oak_slab[type=top]","126:9":"spruce_slab[type=top]","126:10":"birch_slab[type=top]","126:11":"jungle_slab[type=top]","126:12":"acacia_slab[type=top]","126:13":"dark_oak_slab[type=top]","127:0":"cocoa[age=0,facing=south]","127:1":"cocoa[age=0,facing=west]","127:2":"cocoa[age=0,facing=north]","127:3":"cocoa[age=0,facing=east]","127:4":"cocoa[age=1,facing=south]","127:5":"cocoa[age=1,facing=west]","127:6":"cocoa[age=1,facing=north]","127:7":"cocoa[age=1,facing=east]","127:8":"cocoa[age=2,facing=south]","127:9":"cocoa[age=2,facing=west]","127:10":"cocoa[age=2,facing=north]","127:11":"cocoa[age=2,facing=east]","128:0":"sandstone_stairs[facing=east,half=bottom,shape=straight]","128:1":"sandstone_stairs[facing=west,half=bottom,shape=straight]","128:2":"sandstone_stairs[facing=south,half=bottom,shape=straight]","128:3":"sandstone_stairs[facing=north,half=bottom,shape=straight]","128:4":"sandstone_stairs[facing=east,half=top,shape=straight]","128:5":"sandstone_stairs[facing=west,half=top,shape=straight]","128:6":"sandstone_stairs[facing=south,half=top,shape=straight]","128:7":"sandstone_stairs[facing=north,half=top,shape=straight]","129:0":"emerald_ore","130:2":"ender_chest[facing=north]","130:3":"ender_chest[facing=south]","130:4":"ender_chest[facing=west]","130:5":"ender_chest[facing=east]","131:0":"tripwire_hook[attached=false,facing=south,powered=false]","131:1":"tripwire_hook[attached=false,facing=west,powered=false]","131:2":"tripwire_hook[attached=false,facing=north,powered=false]","131:3":"tripwire_hook[attached=false,facing=east,powered=false]","131:4":"tripwire_hook[attached=true,facing=south,powered=false]","131:5":"tripwire_hook[attached=true,facing=west,powered=false]","131:6":"tripwire_hook[attached=true,facing=north,powered=false]","131:7":"tripwire_hook[attached=true,facing=east,powered=false]","131:8":"tripwire_hook[attached=false,facing=south,powered=true]","131:9":"tripwire_hook[attached=false,facing=west,powered=true]","131:10":"tripwire_hook[attached=false,facing=north,powered=true]","131:11":"tripwire_hook[attached=false,facing=east,powered=true]","131:12":"tripwire_hook[attached=true,facing=south,powered=true]","131:13":"tripwire_hook[attached=true,facing=west,powered=true]","131:14":"tripwire_hook[attached=true,facing=north,powered=true]","131:15":"tripwire_hook[attached=true,facing=east,powered=true]","132:0":"tripwire[attached=false,disarmed=false,east=false,north=false,powered=false,south=false,west=false]","132:1":"tripwire[attached=false,disarmed=false,east=false,north=false,powered=true,south=false,west=false]","132:4":"tripwire[attached=true,disarmed=false,east=false,north=false,powered=false,south=false,west=false]","132:5":"tripwire[attached=true,disarmed=false,east=false,north=false,powered=true,south=false,west=false]","132:8":"tripwire[attached=false,disarmed=true,east=false,north=false,powered=false,south=false,west=false]","132:9":"tripwire[attached=false,disarmed=true,east=false,north=false,powered=true,south=false,west=false]","132:12":"tripwire[attached=true,disarmed=true,east=false,north=false,powered=false,south=false,west=false]","132:13":"tripwire[attached=true,disarmed=true,east=false,north=false,powered=true,south=false,west=false]","133:0":"emerald_block","134:0":"spruce_stairs[facing=east,half=bottom,shape=straight]","134:1":"spruce_stairs[facing=west,half=bottom,shape=straight]","134:2":"spruce_stairs[facing=south,half=bottom,shape=straight]","134:3":"spruce_stairs[facing=north,half=bottom,shape=straight]","134:4":"spruce_stairs[facing=east,half=top,shape=straight]","134:5":"spruce_stairs[facing=west,half=top,shape=straight]","134:6":"spruce_stairs[facing=south,half=top,shape=straight]","134:7":"spruce_stairs[facing=north,half=top,shape=straight]","135:0":"birch_stairs[facing=east,half=bottom,shape=straight]","135:1":"birch_stairs[facing=west,half=bottom,shape=straight]","135:2":"birch_stairs[facing=south,half=bottom,shape=straight]","135:3":"birch_stairs[facing=north,half=bottom,shape=straight]","135:4":"birch_stairs[facing=east,half=top,shape=straight]","135:5":"birch_stairs[facing=west,half=top,shape=straight]","135:6":"birch_stairs[facing=south,half=top,shape=straight]","135:7":"birch_stairs[facing=north,half=top,shape=straight]","136:0":"jungle_stairs[facing=east,half=bottom,shape=straight]","136:1":"jungle_stairs[facing=west,half=bottom,shape=straight]","136:2":"jungle_stairs[facing=south,half=bottom,shape=straight]","136:3":"jungle_stairs[facing=north,half=bottom,shape=straight]","136:4":"jungle_stairs[facing=east,half=top,shape=straight]","136:5":"jungle_stairs[facing=west,half=top,shape=straight]","136:6":"jungle_stairs[facing=south,half=top,shape=straight]","136:7":"jungle_stairs[facing=north,half=top,shape=straight]","137:0":"command_block[conditional=false,facing=down]","137:1":"command_block[conditional=false,facing=up]","137:2":"command_block[conditional=false,facing=north]","137:3":"command_block[conditional=false,facing=south]","137:4":"command_block[conditional=false,facing=west]","137:5":"command_block[conditional=false,facing=east]","137:8":"command_block[conditional=true,facing=down]","137:9":"command_block[conditional=true,facing=up]","137:10":"command_block[conditional=true,facing=north]","137:11":"command_block[conditional=true,facing=south]","137:12":"command_block[conditional=true,facing=west]","137:13":"command_block[conditional=true,facing=east]","138:0":"beacon","139:0":"cobblestone_wall[east=false,north=false,south=false,up=false,west=false]","139:1":"mossy_cobblestone_wall[east=false,north=false,south=false,up=false,west=false]","140:0":"potted_cactus","140:1":"potted_cactus","140:2":"potted_cactus","140:3":"potted_cactus","140:4":"potted_cactus","140:5":"potted_cactus","140:6":"potted_cactus","140:7":"potted_cactus","140:8":"potted_cactus","140:9":"potted_cactus","140:10":"potted_cactus","140:11":"potted_cactus","140:12":"potted_cactus","140:13":"potted_cactus","140:14":"potted_cactus","140:15":"potted_cactus","141:0":"carrots[age=0]","141:1":"carrots[age=1]","141:2":"carrots[age=2]","141:3":"carrots[age=3]","141:4":"carrots[age=4]","141:5":"carrots[age=5]","141:6":"carrots[age=6]","141:7":"carrots[age=7]","142:0":"potatoes[age=0]","142:1":"potatoes[age=1]","142:2":"potatoes[age=2]","142:3":"potatoes[age=3]","142:4":"potatoes[age=4]","142:5":"potatoes[age=5]","142:6":"potatoes[age=6]","142:7":"potatoes[age=7]","143:0":"oak_button[face=ceiling,facing=north,powered=false]","143:1":"oak_button[face=wall,facing=east,powered=false]","143:2":"oak_button[face=wall,facing=west,powered=false]","143:3":"oak_button[face=wall,facing=south,powered=false]","143:4":"oak_button[face=wall,facing=north,powered=false]","143:5":"oak_button[face=floor,facing=north,powered=false]","143:8":"oak_button[face=ceiling,facing=north,powered=true]","143:9":"oak_button[face=wall,facing=east,powered=true]","143:10":"oak_button[face=wall,facing=west,powered=true]","143:11":"oak_button[face=wall,facing=south,powered=true]","143:12":"oak_button[face=wall,facing=north,powered=true]","143:13":"oak_button[face=floor,facing=north,powered=true]","144:0":"player_head[facing=down]","144:1":"player_head[facing=up]","144:2":"player_head[facing=north]","144:3":"player_head[facing=south]","144:4":"player_head[facing=west]","144:5":"player_head[facing=east]","144:8":"player_head[facing=down]","144:9":"player_head[facing=up]","144:10":"player_head[facing=north]","144:11":"player_head[facing=south]","144:12":"player_head[facing=west]","144:13":"player_head[facing=east]","145:0":"anvil[facing=south]","145:1":"anvil[facing=west]","145:2":"anvil[facing=north]","145:3":"anvil[facing=east]","145:4":"chipped_anvil[facing=south]","145:5":"chipped_anvil[facing=west]","145:6":"chipped_anvil[facing=north]","145:7":"chipped_anvil[facing=east]","145:8":"damaged_anvil[facing=south]","145:9":"damaged_anvil[facing=west]","145:10":"damaged_anvil[facing=north]","145:11":"damaged_anvil[facing=east]","146:2":"trapped_chest[facing=north,type=single]","146:3":"trapped_chest[facing=south,type=single]","146:4":"trapped_chest[facing=west,type=single]","146:5":"trapped_chest[facing=east,type=single]","147:0":"light_weighted_pressure_plate[power=0]","147:1":"light_weighted_pressure_plate[power=1]","147:2":"light_weighted_pressure_plate[power=2]","147:3":"light_weighted_pressure_plate[power=3]","147:4":"light_weighted_pressure_plate[power=4]","147:5":"light_weighted_pressure_plate[power=5]","147:6":"light_weighted_pressure_plate[power=6]","147:7":"light_weighted_pressure_plate[power=7]","147:8":"light_weighted_pressure_plate[power=8]","147:9":"light_weighted_pressure_plate[power=9]","147:10":"light_weighted_pressure_plate[power=10]","147:11":"light_weighted_pressure_plate[power=11]","147:12":"light_weighted_pressure_plate[power=12]","147:13":"light_weighted_pressure_plate[power=13]","147:14":"light_weighted_pressure_plate[power=14]","147:15":"light_weighted_pressure_plate[power=15]","148:0":"heavy_weighted_pressure_plate[power=0]","148:1":"heavy_weighted_pressure_plate[power=1]","148:2":"heavy_weighted_pressure_plate[power=2]","148:3":"heavy_weighted_pressure_plate[power=3]","148:4":"heavy_weighted_pressure_plate[power=4]","148:5":"heavy_weighted_pressure_plate[power=5]","148:6":"heavy_weighted_pressure_plate[power=6]","148:7":"heavy_weighted_pressure_plate[power=7]","148:8":"heavy_weighted_pressure_plate[power=8]","148:9":"heavy_weighted_pressure_plate[power=9]","148:10":"heavy_weighted_pressure_plate[power=10]","148:11":"heavy_weighted_pressure_plate[power=11]","148:12":"heavy_weighted_pressure_plate[power=12]","148:13":"heavy_weighted_pressure_plate[power=13]","148:14":"heavy_weighted_pressure_plate[power=14]","148:15":"heavy_weighted_pressure_plate[power=15]","149:0":"comparator[facing=south,mode=compare,powered=false]","149:1":"comparator[facing=west,mode=compare,powered=false]","149:2":"comparator[facing=north,mode=compare,powered=false]","149:3":"comparator[facing=east,mode=compare,powered=false]","149:4":"comparator[facing=south,mode=subtract,powered=false]","149:5":"comparator[facing=west,mode=subtract,powered=false]","149:6":"comparator[facing=north,mode=subtract,powered=false]","149:7":"comparator[facing=east,mode=subtract,powered=false]","149:8":"comparator[facing=south,mode=compare,powered=true]","149:9":"comparator[facing=west,mode=compare,powered=true]","149:10":"comparator[facing=north,mode=compare,powered=true]","149:11":"comparator[facing=east,mode=compare,powered=true]","149:12":"comparator[facing=south,mode=subtract,powered=true]","149:13":"comparator[facing=west,mode=subtract,powered=true]","149:14":"comparator[facing=north,mode=subtract,powered=true]","149:15":"comparator[facing=east,mode=subtract,powered=true]","150:0":"comparator[facing=south,mode=compare,powered=false]","150:1":"comparator[facing=west,mode=compare,powered=false]","150:2":"comparator[facing=north,mode=compare,powered=false]","150:3":"comparator[facing=east,mode=compare,powered=false]","150:4":"comparator[facing=south,mode=subtract,powered=false]","150:5":"comparator[facing=west,mode=subtract,powered=false]","150:6":"comparator[facing=north,mode=subtract,powered=false]","150:7":"comparator[facing=east,mode=subtract,powered=false]","150:8":"comparator[facing=south,mode=compare,powered=true]","150:9":"comparator[facing=west,mode=compare,powered=true]","150:10":"comparator[facing=north,mode=compare,powered=true]","150:11":"comparator[facing=east,mode=compare,powered=true]","150:12":"comparator[facing=south,mode=subtract,powered=true]","150:13":"comparator[facing=west,mode=subtract,powered=true]","150:14":"comparator[facing=north,mode=subtract,powered=true]","150:15":"comparator[facing=east,mode=subtract,powered=true]","151:0":"daylight_detector[inverted=false,power=0]","151:1":"daylight_detector[inverted=false,power=1]","151:2":"daylight_detector[inverted=false,power=2]","151:3":"daylight_detector[inverted=false,power=3]","151:4":"daylight_detector[inverted=false,power=4]","151:5":"daylight_detector[inverted=false,power=5]","151:6":"daylight_detector[inverted=false,power=6]","151:7":"daylight_detector[inverted=false,power=7]","151:8":"daylight_detector[inverted=false,power=8]","151:9":"daylight_detector[inverted=false,power=9]","151:10":"daylight_detector[inverted=false,power=10]","151:11":"daylight_detector[inverted=false,power=11]","151:12":"daylight_detector[inverted=false,power=12]","151:13":"daylight_detector[inverted=false,power=13]","151:14":"daylight_detector[inverted=false,power=14]","151:15":"daylight_detector[inverted=false,power=15]","152:0":"redstone_block","153:0":"nether_quartz_ore","154:0":"hopper[enabled=true,facing=down]","154:2":"hopper[enabled=true,facing=north]","154:3":"hopper[enabled=true,facing=south]","154:4":"hopper[enabled=true,facing=west]","154:5":"hopper[enabled=true,facing=east]","154:8":"hopper[enabled=false,facing=down]","154:10":"hopper[enabled=false,facing=north]","154:11":"hopper[enabled=false,facing=south]","154:12":"hopper[enabled=false,facing=west]","154:13":"hopper[enabled=false,facing=east]","155:0":"quartz_block","155:1":"chiseled_quartz_block","155:2":"quartz_pillar[axis=y]","155:3":"quartz_pillar[axis=x]","155:4":"quartz_pillar[axis=z]","156:0":"quartz_stairs[facing=east,half=bottom,shape=straight]","156:1":"quartz_stairs[facing=west,half=bottom,shape=straight]","156:2":"quartz_stairs[facing=south,half=bottom,shape=straight]","156:3":"quartz_stairs[facing=north,half=bottom,shape=straight]","156:4":"quartz_stairs[facing=east,half=top,shape=straight]","156:5":"quartz_stairs[facing=west,half=top,shape=straight]","156:6":"quartz_stairs[facing=south,half=top,shape=straight]","156:7":"quartz_stairs[facing=north,half=top,shape=straight]","157:0":"activator_rail[powered=false,shape=north_south]","157:1":"activator_rail[powered=false,shape=east_west]","157:2":"activator_rail[powered=false,shape=ascending_east]","157:3":"activator_rail[powered=false,shape=ascending_west]","157:4":"activator_rail[powered=false,shape=ascending_north]","157:5":"activator_rail[powered=false,shape=ascending_south]","157:8":"activator_rail[powered=true,shape=north_south]","157:9":"activator_rail[powered=true,shape=east_west]","157:10":"activator_rail[powered=true,shape=ascending_east]","157:11":"activator_rail[powered=true,shape=ascending_west]","157:12":"activator_rail[powered=true,shape=ascending_north]","157:13":"activator_rail[powered=true,shape=ascending_south]","158:0":"dropper[facing=down,triggered=false]","158:1":"dropper[facing=up,triggered=false]","158:2":"dropper[facing=north,triggered=false]","158:3":"dropper[facing=south,triggered=false]","158:4":"dropper[facing=west,triggered=false]","158:5":"dropper[facing=east,triggered=false]","158:8":"dropper[facing=down,triggered=true]","158:9":"dropper[facing=up,triggered=true]","158:10":"dropper[facing=north,triggered=true]","158:11":"dropper[facing=south,triggered=true]","158:12":"dropper[facing=west,triggered=true]","158:13":"dropper[facing=east,triggered=true]","159:0":"white_terracotta","159:1":"orange_terracotta","159:2":"magenta_terracotta","159:3":"light_blue_terracotta","159:4":"yellow_terracotta","159:5":"lime_terracotta","159:6":"pink_terracotta","159:7":"gray_terracotta","159:8":"light_gray_terracotta","159:9":"cyan_terracotta","159:10":"purple_terracotta","159:11":"blue_terracotta","159:12":"brown_terracotta","159:13":"green_terracotta","159:14":"red_terracotta","159:15":"black_terracotta","160:0":"white_stained_glass_pane[east=false,north=false,south=false,west=false]","160:1":"orange_stained_glass_pane[east=false,north=false,south=false,west=false]","160:2":"magenta_stained_glass_pane[east=false,north=false,south=false,west=false]","160:3":"light_blue_stained_glass_pane[east=false,north=false,south=false,west=false]","160:4":"yellow_stained_glass_pane[east=false,north=false,south=false,west=false]","160:5":"lime_stained_glass_pane[east=false,north=false,south=false,west=false]","160:6":"pink_stained_glass_pane[east=false,north=false,south=false,west=false]","160:7":"gray_stained_glass_pane[east=false,north=false,south=false,west=false]","160:8":"light_gray_stained_glass_pane[east=false,north=false,south=false,west=false]","160:9":"cyan_stained_glass_pane[east=false,north=false,south=false,west=false]","160:10":"purple_stained_glass_pane[east=false,north=false,south=false,west=false]","160:11":"blue_stained_glass_pane[east=false,north=false,south=false,west=false]","160:12":"brown_stained_glass_pane[east=false,north=false,south=false,west=false]","160:13":"green_stained_glass_pane[east=false,north=false,south=false,west=false]","160:14":"red_stained_glass_pane[east=false,north=false,south=false,west=false]","160:15":"black_stained_glass_pane[east=false,north=false,south=false,west=false]","161:0":"acacia_leaves[check_decay=false,decayable=true]","161:1":"dark_oak_leaves[check_decay=false,decayable=true]","161:4":"acacia_leaves[check_decay=false,decayable=false]","161:5":"dark_oak_leaves[check_decay=false,decayable=false]","161:8":"acacia_leaves[check_decay=true,decayable=true]","161:9":"dark_oak_leaves[check_decay=true,decayable=true]","161:12":"acacia_leaves[check_decay=true,decayable=false]","161:13":"dark_oak_leaves[check_decay=true,decayable=false]","162:0":"acacia_log[axis=y]","162:1":"dark_oak_log[axis=y]","162:4":"acacia_log[axis=x]","162:5":"dark_oak_log[axis=x]","162:8":"acacia_log[axis=z]","162:9":"dark_oak_log[axis=z]","162:12":"acacia_bark","162:13":"dark_oak_bark","163:0":"acacia_stairs[facing=east,half=bottom,shape=straight]","163:1":"acacia_stairs[facing=west,half=bottom,shape=straight]","163:2":"acacia_stairs[facing=south,half=bottom,shape=straight]","163:3":"acacia_stairs[facing=north,half=bottom,shape=straight]","163:4":"acacia_stairs[facing=east,half=top,shape=straight]","163:5":"acacia_stairs[facing=west,half=top,shape=straight]","163:6":"acacia_stairs[facing=south,half=top,shape=straight]","163:7":"acacia_stairs[facing=north,half=top,shape=straight]","164:0":"dark_oak_stairs[facing=east,half=bottom,shape=straight]","164:1":"dark_oak_stairs[facing=west,half=bottom,shape=straight]","164:2":"dark_oak_stairs[facing=south,half=bottom,shape=straight]","164:3":"dark_oak_stairs[facing=north,half=bottom,shape=straight]","164:4":"dark_oak_stairs[facing=east,half=top,shape=straight]","164:5":"dark_oak_stairs[facing=west,half=top,shape=straight]","164:6":"dark_oak_stairs[facing=south,half=top,shape=straight]","164:7":"dark_oak_stairs[facing=north,half=top,shape=straight]","165:0":"slime_block","166:0":"barrier","167:0":"iron_trapdoor[facing=north,half=bottom,open=false]","167:1":"iron_trapdoor[facing=south,half=bottom,open=false]","167:2":"iron_trapdoor[facing=west,half=bottom,open=false]","167:3":"iron_trapdoor[facing=east,half=bottom,open=false]","167:4":"iron_trapdoor[facing=north,half=bottom,open=true]","167:5":"iron_trapdoor[facing=south,half=bottom,open=true]","167:6":"iron_trapdoor[facing=west,half=bottom,open=true]","167:7":"iron_trapdoor[facing=east,half=bottom,open=true]","167:8":"iron_trapdoor[facing=north,half=top,open=false]","167:9":"iron_trapdoor[facing=south,half=top,open=false]","167:10":"iron_trapdoor[facing=west,half=top,open=false]","167:11":"iron_trapdoor[facing=east,half=top,open=false]","167:12":"iron_trapdoor[facing=north,half=top,open=true]","167:13":"iron_trapdoor[facing=south,half=top,open=true]","167:14":"iron_trapdoor[facing=west,half=top,open=true]","167:15":"iron_trapdoor[facing=east,half=top,open=true]","168:0":"prismarine","168:1":"prismarine_bricks","168:2":"dark_prismarine","169:0":"sea_lantern","170:0":"hay_block[axis=y]","170:4":"hay_block[axis=x]","170:8":"hay_block[axis=z]","171:0":"white_carpet","171:1":"orange_carpet","171:2":"magenta_carpet","171:3":"light_blue_carpet","171:4":"yellow_carpet","171:5":"lime_carpet","171:6":"pink_carpet","171:7":"gray_carpet","171:8":"light_gray_carpet","171:9":"cyan_carpet","171:10":"purple_carpet","171:11":"blue_carpet","171:12":"brown_carpet","171:13":"green_carpet","171:14":"red_carpet","171:15":"black_carpet","172:0":"terracotta","173:0":"coal_block","174:0":"packed_ice","175:0":"sunflower[half=lower]","175:1":"lilac[half=lower]","175:2":"tall_grass[half=lower]","175:3":"large_fern[half=lower]","175:4":"rose_bush[half=lower]","175:5":"peony[half=lower]","175:8":"peony[half=upper]","175:9":"peony[half=upper]","175:10":"peony[half=upper]","175:11":"peony[half=upper]","176:0":"white_banner[rotation=0]","176:1":"white_banner[rotation=1]","176:2":"white_banner[rotation=2]","176:3":"white_banner[rotation=3]","176:4":"white_banner[rotation=4]","176:5":"white_banner[rotation=5]","176:6":"white_banner[rotation=6]","176:7":"white_banner[rotation=7]","176:8":"white_banner[rotation=8]","176:9":"white_banner[rotation=9]","176:10":"white_banner[rotation=10]","176:11":"white_banner[rotation=11]","176:12":"white_banner[rotation=12]","176:13":"white_banner[rotation=13]","176:14":"white_banner[rotation=14]","176:15":"white_banner[rotation=15]","177:2":"white_wall_banner[facing=north]","177:3":"white_wall_banner[facing=south]","177:4":"white_wall_banner[facing=west]","177:5":"white_wall_banner[facing=east]","178:0":"daylight_detector[inverted=true,power=0]","178:1":"daylight_detector[inverted=true,power=1]","178:2":"daylight_detector[inverted=true,power=2]","178:3":"daylight_detector[inverted=true,power=3]","178:4":"daylight_detector[inverted=true,power=4]","178:5":"daylight_detector[inverted=true,power=5]","178:6":"daylight_detector[inverted=true,power=6]","178:7":"daylight_detector[inverted=true,power=7]","178:8":"daylight_detector[inverted=true,power=8]","178:9":"daylight_detector[inverted=true,power=9]","178:10":"daylight_detector[inverted=true,power=10]","178:11":"daylight_detector[inverted=true,power=11]","178:12":"daylight_detector[inverted=true,power=12]","178:13":"daylight_detector[inverted=true,power=13]","178:14":"daylight_detector[inverted=true,power=14]","178:15":"daylight_detector[inverted=true,power=15]","179:0":"red_sandstone","179:1":"chiseled_red_sandstone","179:2":"cut_red_sandstone","180:0":"red_sandstone_stairs[facing=east,half=bottom,shape=straight]","180:1":"red_sandstone_stairs[facing=west,half=bottom,shape=straight]","180:2":"red_sandstone_stairs[facing=south,half=bottom,shape=straight]","180:3":"red_sandstone_stairs[facing=north,half=bottom,shape=straight]","180:4":"red_sandstone_stairs[facing=east,half=top,shape=straight]","180:5":"red_sandstone_stairs[facing=west,half=top,shape=straight]","180:6":"red_sandstone_stairs[facing=south,half=top,shape=straight]","180:7":"red_sandstone_stairs[facing=north,half=top,shape=straight]","181:0":"red_sandstone_slab[type=double]","181:8":"smooth_red_sandstone","182:0":"red_sandstone_slab[type=bottom]","182:8":"red_sandstone_slab[type=top]","183:0":"spruce_fence_gate[facing=south,in_wall=false,open=false,powered=false]","183:1":"spruce_fence_gate[facing=west,in_wall=false,open=false,powered=false]","183:2":"spruce_fence_gate[facing=north,in_wall=false,open=false,powered=false]","183:3":"spruce_fence_gate[facing=east,in_wall=false,open=false,powered=false]","183:4":"spruce_fence_gate[facing=south,in_wall=false,open=true,powered=false]","183:5":"spruce_fence_gate[facing=west,in_wall=false,open=true,powered=false]","183:6":"spruce_fence_gate[facing=north,in_wall=false,open=true,powered=false]","183:7":"spruce_fence_gate[facing=east,in_wall=false,open=true,powered=false]","183:8":"spruce_fence_gate[facing=south,in_wall=false,open=false,powered=true]","183:9":"spruce_fence_gate[facing=west,in_wall=false,open=false,powered=true]","183:10":"spruce_fence_gate[facing=north,in_wall=false,open=false,powered=true]","183:11":"spruce_fence_gate[facing=east,in_wall=false,open=false,powered=true]","183:12":"spruce_fence_gate[facing=south,in_wall=false,open=true,powered=true]","183:13":"spruce_fence_gate[facing=west,in_wall=false,open=true,powered=true]","183:14":"spruce_fence_gate[facing=north,in_wall=false,open=true,powered=true]","183:15":"spruce_fence_gate[facing=east,in_wall=false,open=true,powered=true]","184:0":"birch_fence_gate[facing=south,in_wall=false,open=false,powered=false]","184:1":"birch_fence_gate[facing=west,in_wall=false,open=false,powered=false]","184:2":"birch_fence_gate[facing=north,in_wall=false,open=false,powered=false]","184:3":"birch_fence_gate[facing=east,in_wall=false,open=false,powered=false]","184:4":"birch_fence_gate[facing=south,in_wall=false,open=true,powered=false]","184:5":"birch_fence_gate[facing=west,in_wall=false,open=true,powered=false]","184:6":"birch_fence_gate[facing=north,in_wall=false,open=true,powered=false]","184:7":"birch_fence_gate[facing=east,in_wall=false,open=true,powered=false]","184:8":"birch_fence_gate[facing=south,in_wall=false,open=false,powered=true]","184:9":"birch_fence_gate[facing=west,in_wall=false,open=false,powered=true]","184:10":"birch_fence_gate[facing=north,in_wall=false,open=false,powered=true]","184:11":"birch_fence_gate[facing=east,in_wall=false,open=false,powered=true]","184:12":"birch_fence_gate[facing=south,in_wall=false,open=true,powered=true]","184:13":"birch_fence_gate[facing=west,in_wall=false,open=true,powered=true]","184:14":"birch_fence_gate[facing=north,in_wall=false,open=true,powered=true]","184:15":"birch_fence_gate[facing=east,in_wall=false,open=true,powered=true]","185:0":"jungle_fence_gate[facing=south,in_wall=false,open=false,powered=false]","185:1":"jungle_fence_gate[facing=west,in_wall=false,open=false,powered=false]","185:2":"jungle_fence_gate[facing=north,in_wall=false,open=false,powered=false]","185:3":"jungle_fence_gate[facing=east,in_wall=false,open=false,powered=false]","185:4":"jungle_fence_gate[facing=south,in_wall=false,open=true,powered=false]","185:5":"jungle_fence_gate[facing=west,in_wall=false,open=true,powered=false]","185:6":"jungle_fence_gate[facing=north,in_wall=false,open=true,powered=false]","185:7":"jungle_fence_gate[facing=east,in_wall=false,open=true,powered=false]","185:8":"jungle_fence_gate[facing=south,in_wall=false,open=false,powered=true]","185:9":"jungle_fence_gate[facing=west,in_wall=false,open=false,powered=true]","185:10":"jungle_fence_gate[facing=north,in_wall=false,open=false,powered=true]","185:11":"jungle_fence_gate[facing=east,in_wall=false,open=false,powered=true]","185:12":"jungle_fence_gate[facing=south,in_wall=false,open=true,powered=true]","185:13":"jungle_fence_gate[facing=west,in_wall=false,open=true,powered=true]","185:14":"jungle_fence_gate[facing=north,in_wall=false,open=true,powered=true]","185:15":"jungle_fence_gate[facing=east,in_wall=false,open=true,powered=true]","186:0":"dark_oak_fence_gate[facing=south,in_wall=false,open=false,powered=false]","186:1":"dark_oak_fence_gate[facing=west,in_wall=false,open=false,powered=false]","186:2":"dark_oak_fence_gate[facing=north,in_wall=false,open=false,powered=false]","186:3":"dark_oak_fence_gate[facing=east,in_wall=false,open=false,powered=false]","186:4":"dark_oak_fence_gate[facing=south,in_wall=false,open=true,powered=false]","186:5":"dark_oak_fence_gate[facing=west,in_wall=false,open=true,powered=false]","186:6":"dark_oak_fence_gate[facing=north,in_wall=false,open=true,powered=false]","186:7":"dark_oak_fence_gate[facing=east,in_wall=false,open=true,powered=false]","186:8":"dark_oak_fence_gate[facing=south,in_wall=false,open=false,powered=true]","186:9":"dark_oak_fence_gate[facing=west,in_wall=false,open=false,powered=true]","186:10":"dark_oak_fence_gate[facing=north,in_wall=false,open=false,powered=true]","186:11":"dark_oak_fence_gate[facing=east,in_wall=false,open=false,powered=true]","186:12":"dark_oak_fence_gate[facing=south,in_wall=false,open=true,powered=true]","186:13":"dark_oak_fence_gate[facing=west,in_wall=false,open=true,powered=true]","186:14":"dark_oak_fence_gate[facing=north,in_wall=false,open=true,powered=true]","186:15":"dark_oak_fence_gate[facing=east,in_wall=false,open=true,powered=true]","187:0":"acacia_fence_gate[facing=south,in_wall=false,open=false,powered=false]","187:1":"acacia_fence_gate[facing=west,in_wall=false,open=false,powered=false]","187:2":"acacia_fence_gate[facing=north,in_wall=false,open=false,powered=false]","187:3":"acacia_fence_gate[facing=east,in_wall=false,open=false,powered=false]","187:4":"acacia_fence_gate[facing=south,in_wall=false,open=true,powered=false]","187:5":"acacia_fence_gate[facing=west,in_wall=false,open=true,powered=false]","187:6":"acacia_fence_gate[facing=north,in_wall=false,open=true,powered=false]","187:7":"acacia_fence_gate[facing=east,in_wall=false,open=true,powered=false]","187:8":"acacia_fence_gate[facing=south,in_wall=false,open=false,powered=true]","187:9":"acacia_fence_gate[facing=west,in_wall=false,open=false,powered=true]","187:10":"acacia_fence_gate[facing=north,in_wall=false,open=false,powered=true]","187:11":"acacia_fence_gate[facing=east,in_wall=false,open=false,powered=true]","187:12":"acacia_fence_gate[facing=south,in_wall=false,open=true,powered=true]","187:13":"acacia_fence_gate[facing=west,in_wall=false,open=true,powered=true]","187:14":"acacia_fence_gate[facing=north,in_wall=false,open=true,powered=true]","187:15":"acacia_fence_gate[facing=east,in_wall=false,open=true,powered=true]","188:0":"spruce_fence[east=false,north=false,south=false,west=false]","189:0":"birch_fence[east=false,north=false,south=false,west=false]","190:0":"jungle_fence[east=false,north=false,south=false,west=false]","191:0":"dark_oak_fence[east=false,north=false,south=false,west=false]","192:0":"acacia_fence[east=false,north=false,south=false,west=false]","193:0":"spruce_door[facing=east,half=lower,hinge=right,open=false,powered=false]","193:1":"spruce_door[facing=south,half=lower,hinge=right,open=false,powered=false]","193:2":"spruce_door[facing=west,half=lower,hinge=right,open=false,powered=false]","193:3":"spruce_door[facing=north,half=lower,hinge=right,open=false,powered=false]","193:4":"spruce_door[facing=east,half=lower,hinge=right,open=true,powered=false]","193:5":"spruce_door[facing=south,half=lower,hinge=right,open=true,powered=false]","193:6":"spruce_door[facing=west,half=lower,hinge=right,open=true,powered=false]","193:7":"spruce_door[facing=north,half=lower,hinge=right,open=true,powered=false]","193:8":"spruce_door[facing=east,half=upper,hinge=left,open=false,powered=false]","193:9":"spruce_door[facing=east,half=upper,hinge=right,open=false,powered=false]","193:10":"spruce_door[facing=east,half=upper,hinge=left,open=false,powered=true]","193:11":"spruce_door[facing=east,half=upper,hinge=right,open=false,powered=true]","194:0":"birch_door[facing=east,half=lower,hinge=right,open=false,powered=false]","194:1":"birch_door[facing=south,half=lower,hinge=right,open=false,powered=false]","194:2":"birch_door[facing=west,half=lower,hinge=right,open=false,powered=false]","194:3":"birch_door[facing=north,half=lower,hinge=right,open=false,powered=false]","194:4":"birch_door[facing=east,half=lower,hinge=right,open=true,powered=false]","194:5":"birch_door[facing=south,half=lower,hinge=right,open=true,powered=false]","194:6":"birch_door[facing=west,half=lower,hinge=right,open=true,powered=false]","194:7":"birch_door[facing=north,half=lower,hinge=right,open=true,powered=false]","194:8":"birch_door[facing=east,half=upper,hinge=left,open=false,powered=false]","194:9":"birch_door[facing=east,half=upper,hinge=right,open=false,powered=false]","194:10":"birch_door[facing=east,half=upper,hinge=left,open=false,powered=true]","194:11":"birch_door[facing=east,half=upper,hinge=right,open=false,powered=true]","195:0":"jungle_door[facing=east,half=lower,hinge=right,open=false,powered=false]","195:1":"jungle_door[facing=south,half=lower,hinge=right,open=false,powered=false]","195:2":"jungle_door[facing=west,half=lower,hinge=right,open=false,powered=false]","195:3":"jungle_door[facing=north,half=lower,hinge=right,open=false,powered=false]","195:4":"jungle_door[facing=east,half=lower,hinge=right,open=true,powered=false]","195:5":"jungle_door[facing=south,half=lower,hinge=right,open=true,powered=false]","195:6":"jungle_door[facing=west,half=lower,hinge=right,open=true,powered=false]","195:7":"jungle_door[facing=north,half=lower,hinge=right,open=true,powered=false]","195:8":"jungle_door[facing=east,half=upper,hinge=left,open=false,powered=false]","195:9":"jungle_door[facing=east,half=upper,hinge=right,open=false,powered=false]","195:10":"jungle_door[facing=east,half=upper,hinge=left,open=false,powered=true]","195:11":"jungle_door[facing=east,half=upper,hinge=right,open=false,powered=true]","196:0":"acacia_door[facing=east,half=lower,hinge=right,open=false,powered=false]","196:1":"acacia_door[facing=south,half=lower,hinge=right,open=false,powered=false]","196:2":"acacia_door[facing=west,half=lower,hinge=right,open=false,powered=false]","196:3":"acacia_door[facing=north,half=lower,hinge=right,open=false,powered=false]","196:4":"acacia_door[facing=east,half=lower,hinge=right,open=true,powered=false]","196:5":"acacia_door[facing=south,half=lower,hinge=right,open=true,powered=false]","196:6":"acacia_door[facing=west,half=lower,hinge=right,open=true,powered=false]","196:7":"acacia_door[facing=north,half=lower,hinge=right,open=true,powered=false]","196:8":"acacia_door[facing=east,half=upper,hinge=left,open=false,powered=false]","196:9":"acacia_door[facing=east,half=upper,hinge=right,open=false,powered=false]","196:10":"acacia_door[facing=east,half=upper,hinge=left,open=false,powered=true]","196:11":"acacia_door[facing=east,half=upper,hinge=right,open=false,powered=true]","197:0":"dark_oak_door[facing=east,half=lower,hinge=right,open=false,powered=false]","197:1":"dark_oak_door[facing=south,half=lower,hinge=right,open=false,powered=false]","197:2":"dark_oak_door[facing=west,half=lower,hinge=right,open=false,powered=false]","197:3":"dark_oak_door[facing=north,half=lower,hinge=right,open=false,powered=false]","197:4":"dark_oak_door[facing=east,half=lower,hinge=right,open=true,powered=false]","197:5":"dark_oak_door[facing=south,half=lower,hinge=right,open=true,powered=false]","197:6":"dark_oak_door[facing=west,half=lower,hinge=right,open=true,powered=false]","197:7":"dark_oak_door[facing=north,half=lower,hinge=right,open=true,powered=false]","197:8":"dark_oak_door[facing=east,half=upper,hinge=left,open=false,powered=false]","197:9":"dark_oak_door[facing=east,half=upper,hinge=right,open=false,powered=false]","197:10":"dark_oak_door[facing=east,half=upper,hinge=left,open=false,powered=true]","197:11":"dark_oak_door[facing=east,half=upper,hinge=right,open=false,powered=true]","198:0":"end_rod[facing=down]","198:1":"end_rod[facing=up]","198:2":"end_rod[facing=north]","198:3":"end_rod[facing=south]","198:4":"end_rod[facing=west]","198:5":"end_rod[facing=east]","199:0":"chorus_plant[down=false,east=false,north=false,south=false,up=false,west=false]","200:0":"chorus_flower[age=0]","200:1":"chorus_flower[age=1]","200:2":"chorus_flower[age=2]","200:3":"chorus_flower[age=3]","200:4":"chorus_flower[age=4]","200:5":"chorus_flower[age=5]","201:0":"purpur_block","202:0":"purpur_pillar[axis=y]","202:4":"purpur_pillar[axis=x]","202:8":"purpur_pillar[axis=z]","203:0":"purpur_stairs[facing=east,half=bottom,shape=straight]","203:1":"purpur_stairs[facing=west,half=bottom,shape=straight]","203:2":"purpur_stairs[facing=south,half=bottom,shape=straight]","203:3":"purpur_stairs[facing=north,half=bottom,shape=straight]","203:4":"purpur_stairs[facing=east,half=top,shape=straight]","203:5":"purpur_stairs[facing=west,half=top,shape=straight]","203:6":"purpur_stairs[facing=south,half=top,shape=straight]","203:7":"purpur_stairs[facing=north,half=top,shape=straight]","204:0":"purpur_slab[type=double]","205:0":"purpur_slab[type=bottom]","205:8":"purpur_slab[type=top]","206:0":"end_stone_bricks","207:0":"beetroots[age=0]","207:1":"beetroots[age=1]","207:2":"beetroots[age=2]","207:3":"beetroots[age=3]","208:0":"grass_path","209:0":"end_gateway","210:0":"repeating_command_block[conditional=false,facing=down]","210:1":"repeating_command_block[conditional=false,facing=up]","210:2":"repeating_command_block[conditional=false,facing=north]","210:3":"repeating_command_block[conditional=false,facing=south]","210:4":"repeating_command_block[conditional=false,facing=west]","210:5":"repeating_command_block[conditional=false,facing=east]","210:8":"repeating_command_block[conditional=true,facing=down]","210:9":"repeating_command_block[conditional=true,facing=up]","210:10":"repeating_command_block[conditional=true,facing=north]","210:11":"repeating_command_block[conditional=true,facing=south]","210:12":"repeating_command_block[conditional=true,facing=west]","210:13":"repeating_command_block[conditional=true,facing=east]","211:0":"chain_command_block[conditional=false,facing=down]","211:1":"chain_command_block[conditional=false,facing=up]","211:2":"chain_command_block[conditional=false,facing=north]","211:3":"chain_command_block[conditional=false,facing=south]","211:4":"chain_command_block[conditional=false,facing=west]","211:5":"chain_command_block[conditional=false,facing=east]","211:8":"chain_command_block[conditional=true,facing=down]","211:9":"chain_command_block[conditional=true,facing=up]","211:10":"chain_command_block[conditional=true,facing=north]","211:11":"chain_command_block[conditional=true,facing=south]","211:12":"chain_command_block[conditional=true,facing=west]","211:13":"chain_command_block[conditional=true,facing=east]","212:0":"frosted_ice[age=0]","212:1":"frosted_ice[age=1]","212:2":"frosted_ice[age=2]","212:3":"frosted_ice[age=3]","213:0":"magma_block","214:0":"nether_wart_block","215:0":"red_nether_bricks","216:0":"bone_block[axis=y]","216:4":"bone_block[axis=x]","216:8":"bone_block[axis=z]","217:0":"structure_void","218:0":"observer[facing=down,powered=false]","218:1":"observer[facing=up,powered=false]","218:2":"observer[facing=north,powered=false]","218:3":"observer[facing=south,powered=false]","218:4":"observer[facing=west,powered=false]","218:5":"observer[facing=east,powered=false]","218:8":"observer[facing=down,powered=true]","218:9":"observer[facing=up,powered=true]","218:10":"observer[facing=north,powered=true]","218:11":"observer[facing=south,powered=true]","218:12":"observer[facing=west,powered=true]","218:13":"observer[facing=east,powered=true]","219:0":"white_shulker_box[facing=down]","219:1":"white_shulker_box[facing=up]","219:2":"white_shulker_box[facing=north]","219:3":"white_shulker_box[facing=south]","219:4":"white_shulker_box[facing=west]","219:5":"white_shulker_box[facing=east]","220:0":"orange_shulker_box[facing=down]","220:1":"orange_shulker_box[facing=up]","220:2":"orange_shulker_box[facing=north]","220:3":"orange_shulker_box[facing=south]","220:4":"orange_shulker_box[facing=west]","220:5":"orange_shulker_box[facing=east]","221:0":"magenta_shulker_box[facing=down]","221:1":"magenta_shulker_box[facing=up]","221:2":"magenta_shulker_box[facing=north]","221:3":"magenta_shulker_box[facing=south]","221:4":"magenta_shulker_box[facing=west]","221:5":"magenta_shulker_box[facing=east]","222:0":"light_blue_shulker_box[facing=down]","222:1":"light_blue_shulker_box[facing=up]","222:2":"light_blue_shulker_box[facing=north]","222:3":"light_blue_shulker_box[facing=south]","222:4":"light_blue_shulker_box[facing=west]","222:5":"light_blue_shulker_box[facing=east]","223:0":"yellow_shulker_box[facing=down]","223:1":"yellow_shulker_box[facing=up]","223:2":"yellow_shulker_box[facing=north]","223:3":"yellow_shulker_box[facing=south]","223:4":"yellow_shulker_box[facing=west]","223:5":"yellow_shulker_box[facing=east]","224:0":"lime_shulker_box[facing=down]","224:1":"lime_shulker_box[facing=up]","224:2":"lime_shulker_box[facing=north]","224:3":"lime_shulker_box[facing=south]","224:4":"lime_shulker_box[facing=west]","224:5":"lime_shulker_box[facing=east]","225:0":"pink_shulker_box[facing=down]","225:1":"pink_shulker_box[facing=up]","225:2":"pink_shulker_box[facing=north]","225:3":"pink_shulker_box[facing=south]","225:4":"pink_shulker_box[facing=west]","225:5":"pink_shulker_box[facing=east]","226:0":"gray_shulker_box[facing=down]","226:1":"gray_shulker_box[facing=up]","226:2":"gray_shulker_box[facing=north]","226:3":"gray_shulker_box[facing=south]","226:4":"gray_shulker_box[facing=west]","226:5":"gray_shulker_box[facing=east]","227:0":"light_gray_shulker_box[facing=down]","227:1":"light_gray_shulker_box[facing=up]","227:2":"light_gray_shulker_box[facing=north]","227:3":"light_gray_shulker_box[facing=south]","227:4":"light_gray_shulker_box[facing=west]","227:5":"light_gray_shulker_box[facing=east]","228:0":"cyan_shulker_box[facing=down]","228:1":"cyan_shulker_box[facing=up]","228:2":"cyan_shulker_box[facing=north]","228:3":"cyan_shulker_box[facing=south]","228:4":"cyan_shulker_box[facing=west]","228:5":"cyan_shulker_box[facing=east]","229:0":"purple_shulker_box[facing=down]","229:1":"purple_shulker_box[facing=up]","229:2":"purple_shulker_box[facing=north]","229:3":"purple_shulker_box[facing=south]","229:4":"purple_shulker_box[facing=west]","229:5":"purple_shulker_box[facing=east]","230:0":"blue_shulker_box[facing=down]","230:1":"blue_shulker_box[facing=up]","230:2":"blue_shulker_box[facing=north]","230:3":"blue_shulker_box[facing=south]","230:4":"blue_shulker_box[facing=west]","230:5":"blue_shulker_box[facing=east]","231:0":"brown_shulker_box[facing=down]","231:1":"brown_shulker_box[facing=up]","231:2":"brown_shulker_box[facing=north]","231:3":"brown_shulker_box[facing=south]","231:4":"brown_shulker_box[facing=west]","231:5":"brown_shulker_box[facing=east]","232:0":"green_shulker_box[facing=down]","232:1":"green_shulker_box[facing=up]","232:2":"green_shulker_box[facing=north]","232:3":"green_shulker_box[facing=south]","232:4":"green_shulker_box[facing=west]","232:5":"green_shulker_box[facing=east]","233:0":"red_shulker_box[facing=down]","233:1":"red_shulker_box[facing=up]","233:2":"red_shulker_box[facing=north]","233:3":"red_shulker_box[facing=south]","233:4":"red_shulker_box[facing=west]","233:5":"red_shulker_box[facing=east]","234:0":"black_shulker_box[facing=down]","234:1":"black_shulker_box[facing=up]","234:2":"black_shulker_box[facing=north]","234:3":"black_shulker_box[facing=south]","234:4":"black_shulker_box[facing=west]","234:5":"black_shulker_box[facing=east]","235:0":"white_glazed_terracotta[facing=south]","235:1":"white_glazed_terracotta[facing=west]","235:2":"white_glazed_terracotta[facing=north]","235:3":"white_glazed_terracotta[facing=east]","236:0":"orange_glazed_terracotta[facing=south]","236:1":"orange_glazed_terracotta[facing=west]","236:2":"orange_glazed_terracotta[facing=north]","236:3":"orange_glazed_terracotta[facing=east]","237:0":"magenta_glazed_terracotta[facing=south]","237:1":"magenta_glazed_terracotta[facing=west]","237:2":"magenta_glazed_terracotta[facing=north]","237:3":"magenta_glazed_terracotta[facing=east]","238:0":"light_blue_glazed_terracotta[facing=south]","238:1":"light_blue_glazed_terracotta[facing=west]","238:2":"light_blue_glazed_terracotta[facing=north]","238:3":"light_blue_glazed_terracotta[facing=east]","239:0":"yellow_glazed_terracotta[facing=south]","239:1":"yellow_glazed_terracotta[facing=west]","239:2":"yellow_glazed_terracotta[facing=north]","239:3":"yellow_glazed_terracotta[facing=east]","240:0":"lime_glazed_terracotta[facing=south]","240:1":"lime_glazed_terracotta[facing=west]","240:2":"lime_glazed_terracotta[facing=north]","240:3":"lime_glazed_terracotta[facing=east]","241:0":"pink_glazed_terracotta[facing=south]","241:1":"pink_glazed_terracotta[facing=west]","241:2":"pink_glazed_terracotta[facing=north]","241:3":"pink_glazed_terracotta[facing=east]","242:0":"gray_glazed_terracotta[facing=south]","242:1":"gray_glazed_terracotta[facing=west]","242:2":"gray_glazed_terracotta[facing=north]","242:3":"gray_glazed_terracotta[facing=east]","243:0":"light_gray_glazed_terracotta[facing=south]","243:1":"light_gray_glazed_terracotta[facing=west]","243:2":"light_gray_glazed_terracotta[facing=north]","243:3":"light_gray_glazed_terracotta[facing=east]","244:0":"cyan_glazed_terracotta[facing=south]","244:1":"cyan_glazed_terracotta[facing=west]","244:2":"cyan_glazed_terracotta[facing=north]","244:3":"cyan_glazed_terracotta[facing=east]","245:0":"purple_glazed_terracotta[facing=south]","245:1":"purple_glazed_terracotta[facing=west]","245:2":"purple_glazed_terracotta[facing=north]","245:3":"purple_glazed_terracotta[facing=east]","246:0":"blue_glazed_terracotta[facing=south]","246:1":"blue_glazed_terracotta[facing=west]","246:2":"blue_glazed_terracotta[facing=north]","246:3":"blue_glazed_terracotta[facing=east]","247:0":"brown_glazed_terracotta[facing=south]","247:1":"brown_glazed_terracotta[facing=west]","247:2":"brown_glazed_terracotta[facing=north]","247:3":"brown_glazed_terracotta[facing=east]","248:0":"green_glazed_terracotta[facing=south]","248:1":"green_glazed_terracotta[facing=west]","248:2":"green_glazed_terracotta[facing=north]","248:3":"green_glazed_terracotta[facing=east]","249:0":"red_glazed_terracotta[facing=south]","249:1":"red_glazed_terracotta[facing=west]","249:2":"red_glazed_terracotta[facing=north]","249:3":"red_glazed_terracotta[facing=east]","250:0":"black_glazed_terracotta[facing=south]","250:1":"black_glazed_terracotta[facing=west]","250:2":"black_glazed_terracotta[facing=north]","250:3":"black_glazed_terracotta[facing=east]","251:0":"white_concrete","251:1":"orange_concrete","251:2":"magenta_concrete","251:3":"light_blue_concrete","251:4":"yellow_concrete","251:5":"lime_concrete","251:6":"pink_concrete","251:7":"gray_concrete","251:8":"light_gray_concrete","251:9":"cyan_concrete","251:10":"purple_concrete","251:11":"blue_concrete","251:12":"brown_concrete","251:13":"green_concrete","251:14":"red_concrete","251:15":"black_concrete","252:0":"white_concrete_powder","252:1":"orange_concrete_powder","252:2":"magenta_concrete_powder","252:3":"light_blue_concrete_powder","252:4":"yellow_concrete_powder","252:5":"lime_concrete_powder","252:6":"pink_concrete_powder","252:7":"gray_concrete_powder","252:8":"light_gray_concrete_powder","252:9":"cyan_concrete_powder","252:10":"purple_concrete_powder","252:11":"blue_concrete_powder","252:12":"brown_concrete_powder","252:13":"green_concrete_powder","252:14":"red_concrete_powder","252:15":"black_concrete_powder","255:0":"structure_block[mode=save]","255:1":"structure_block[mode=load]","255:2":"structure_block[mode=corner]","255:3":"structure_block[mode=data]"},clientCalculatedBlocks:{block_snowy:["grass_block","dirt","coarse_dirt","podzol","mycelium"],directional:["fire","redstone_wire","oak_fence","iron_bars","glass_pane","vine","nether_brick_fence","tripwire","cobblestone_wall","mossy_cobblestone_wall","white_stained_glass_pane","orange_stained_glass_pane","magenta_stained_glass_pane","light_blue_stained_glass_pane","yellow_stained_glass_pane","lime_stained_glass_pane","pink_stained_glass_pane","gray_stained_glass_pane","light_gray_stained_glass_pane","cyan_stained_glass_pane","purple_stained_glass_pane","blue_stained_glass_pane","brown_stained_glass_pane","green_stained_glass_pane","red_stained_glass_pane","black_stained_glass_pane","spruce_fence","birch_fence","jungle_fence","dark_oak_fence","acacia_fence","chorus_plant"],door:["oak_door","iron_door","spruce_door","birch_door","jungle_door","acacia_door","dark_oak_door"],repeater_locked:["repeater"],gate_in_wall:["oak_fence_gate","spruce_fence_gate","birch_fence_gate","jungle_fence_gate","dark_oak_fence_gate","acacia_fence_gate"]}};a();o();s();function QG(t){return`${t.x},${t.y},${t.z}`}a();o();s();var ZG={version:"",worldMaxY:256,worldMinY:0,enableLighting:!0,skyLight:15,smoothLighting:!1,outputFormat:"threeJs",debugModelVariant:void 0,clipWorldBelowY:void 0,disableBlockEntityTextures:!1},XG=(t,e)=>e?`${t}:${e}`:String(t);a();o();s();var la=new Set(["air","void_air","cave_air","barrier","light","moving_piston"]);var Bfe=Object.keys(KG.noOcclusions);function ca(t,e){return`${t},${e}`}function Nfe(t){if(!t||t.length!==1)return!1;let e=t[0];return e[0]===0&&e[1]===0&&e[2]===0&&e[3]===1&&e[4]===1&&e[5]===1}var Il=class{config=ZG;Chunk;columns={};blockCache={};biomeCache;preflat;erroredBlockModel;customBlockModels=new Map;sentBlockStateModels=new Set;blockStateModelInfo=new Map;constructor(e){this.Chunk=(0,tY.default)(e),this.biomeCache=(0,Gy.default)(e).biomes,this.preflat=!(0,Gy.default)(e).supportFeature("blockStateId"),this.config.version=e}getLight(e,r=!1,i=!1,n=""){e instanceof Qe||(e=new Qe(...e));let{enableLighting:u,skyLight:l}=this.config;if(!u)return 15;let c=this.getColumnByPos(e);if(!c||!Tfe(c,e))return 15;let d=Math.min(15,Math.max(c.getBlockLight(sh(e)),Math.min(l,c.getSkyLight(sh(e))))+2);if(d===2&&[this.getBlock(e)?.name??"",n].some(h=>/_stairs|slab|glass_pane/.exec(h))&&!i){let h=[this.getLight(e.offset(0,1,0),void 0,!0),this.getLight(e.offset(0,-1,0),void 0,!0),this.getLight(e.offset(0,0,1),void 0,!0),this.getLight(e.offset(0,0,-1),void 0,!0),this.getLight(e.offset(1,0,0),void 0,!0),this.getLight(e.offset(-1,0,0),void 0,!0)].filter(m=>m!==2);h.length&&(d=Math.min(...h))}return r&&d===2&&(d=15),d}addColumn(e,r,i){let n=this.Chunk.fromJson(i);return this.columns[ca(e,r)]=n,n}removeColumn(e,r){delete this.columns[ca(e,r)]}getColumn(e,r){return this.columns[ca(e,r)]}setBlockStateId(e,r){if(r===void 0)throw new Error("stateId is undefined");let i=ca(Math.floor(e.x/16)*16,Math.floor(e.z/16)*16),n=this.columns[i];return n?(n.setBlockStateId(sh(e.floored()),r),!0):!1}getColumnByPos(e){return this.getColumn(Math.floor(e.x/16)*16,Math.floor(e.z/16)*16)}getBlock(e,r,i){e instanceof Qe||(e=new Qe(...e));let n=ca(Math.floor(e.x/16)*16,Math.floor(e.z/16)*16),u=this.customBlockModels.get(n)?.[QG(e)],l=this.columns[n];if(!l)return null;let c=e.floored(),d=sh(c),h=l.getBlockStateId(d),m=XG(h,u);if(!this.blockCache[m]){let y=l.getBlock(d);if(u&&(y.name=u),y.isCube=Nfe(y.shapes),this.blockCache[m]=y,Object.defineProperty(y,"position",{get(){throw new Error("position is not reliable, use pos parameter instead of block.position")}}),this.preflat){y._properties={};let g=El.blocks[y.type+":"+y.metadata]||Pfe(y.type,y.metadata,e);if(g){y.name=g.split("[")[0];let v=g.split("[")?.[1]?.split("]");if(v){let w=Object.fromEntries(v.join("").split(",").map(k=>{let[x,S]=k.split("=");return isNaN(S)||(S=parseInt(S,10)),[x,S]}));y._properties=w}}}}let p=this.blockCache[m];if(p.models===void 0&&r){if(!i)throw new Error("attr is required");let y=p.getProperties();try{if(this.preflat&&p.name==="cobblestone_wall"){y.up="true";for(let x of["north","south","east","west"]){let S=y[x];(S==="false"||S==="true")&&(y[x]=S==="true"?"low":"none")}}let g=!!(this.preflat||u),v=[],w=[],k=[];if(p.models=r.getAllResolvedModels0_1({name:p.name,properties:y},g,v,w,k),this.sentBlockStateModels.has(m)||this.blockStateModelInfo.set(m,{cacheKey:m,issues:v,modelNames:w,conditions:k}),p.models.length||(p.name!=="water"&&p.name!=="lava"&&!la.has(p.name)&&console.debug("[mesher] block to render not found",p.name,y),p.models=null),p.models&&u){let x=p.models[0];p.transparent=x[0]?.transparent??p.transparent}}catch(g){this.erroredBlockModel??=r.getAllResolvedModels0_1({name:"errored",properties:{}}),p.models??=this.erroredBlockModel,console.error(`Critical assets error. Unable to get block model for ${p.name}[${JSON.stringify(y)}]: `+g.message,g.stack),i.hadErrors=!0}}return p.name==="flowing_water"&&(p.name="water"),p.name==="flowing_lava"&&(p.name="lava"),p.name==="bubble_column"&&(p.name="water"),p.biome=this.biomeCache[l.getBiome(d)]??this.biomeCache[1]??this.biomeCache[0],p.name==="redstone_ore"&&(p.transparent=!1),p}shouldMakeAo(e){return e?.isCube&&!Bfe.includes(e.name)&&e.boundingBox!=="empty"}},Pfe=(t,e,r)=>{console.warn(`[mesher] Unknown block with ${t}:${e} at ${r}, falling back`);for(let[i,n]of Object.entries(El.blocks)){let[u,l]=i.split(":");if(u===t)return n}return null},Tfe=(t,e)=>{if(t._getSection)return t._getSection(e);if(t.skyLightSections)return t.skyLightSections[eY(e,t.minY)]||t.blockLightSections[eY(e,t.minY)];if(t.sections)return t.sections[e.y>>4]};function sh(t){return new Qe(Math.floor(t.x)&15,Math.floor(t.y),Math.floor(t.z)&15)}function eY(t,e=0){return Math.floor((t.y-e)/16)+1}a();o();s();a();o();s();a();o();s();a();o();s();var Zr=class{strictVersioned;data={latest:{}};previousVersion="";currentVersion="";inclusive=!0;constructor(e=!1){this.strictVersioned=e,e&&(this.data={})}get versionsSorted(){let e=Object.keys(this.data).filter(r=>r!=="latest").sort((r,i)=>this.semverToNumber(r)-this.semverToNumber(i));return this.strictVersioned||e.push("latest"),e}push(e,r,i){this.currentVersion||=e,this.currentVersion!==e&&(this.strictVersioned?this.previousVersion=this.currentVersion:this.previousVersion=this.previousVersion?this.currentVersion:"latest",this.currentVersion=e),this.data[this.previousVersion]?.[r]!==i&&(this.strictVersioned?(this.data[e]??={},this.data[e][r]=i):this.data.latest[r]?(this.data[e]??={},this.data[e][r]=i):this.data.latest[r]=i)}get(e,r,i=this.inclusive){let n=this.semverToNumber(e),u;for(let c of this.versionsSorted)if((i?n<=this.semverToNumber(c):n<this.semverToNumber(c))&&this.data[c]?.[r]){u=c;break}let l;return this.strictVersioned?l=this.data[u]?.[r]:this.data[u]?.[r]?l=this.data[u][r]:this.data.latest[r]&&(l=this.data.latest[r]),l&&typeof l=="object"?structuredClone(l):l}semverToNumber(e){let[r,i="0",n="0"]=e.split(".");return+`${r.padStart(2,"0")}${i.padStart(2,"0")}${n.padStart(2,"0")}`}loadData(e){this.data=e}};a();o();s();a();o();s();var st=class{oversized=!1;constructor(e=0,r=0,i=0,n=0,u=!1,l=void 0){this._width=e,this._height=r,this._x=i,this._y=n,this._data={},this._rot=u,this._allowRotation=l}static Collide(e,r){return e.collide(r)}static Contain(e,r){return e.contain(r)}area(){return this.width*this.height}collide(e){return e.x<this.x+this.width&&e.x+e.width>this.x&&e.y<this.y+this.height&&e.y+e.height>this.y}contain(e){return e.x>=this.x&&e.y>=this.y&&e.x+e.width<=this.x+this.width&&e.y+e.height<=this.y+this.height}_width;get width(){return this._width}set width(e){e!==this._width&&(this._width=e,this._dirty++)}_height;get height(){return this._height}set height(e){e!==this._height&&(this._height=e,this._dirty++)}_x;get x(){return this._x}set x(e){e!==this._x&&(this._x=e,this._dirty++)}_y;get y(){return this._y}set y(e){e!==this._y&&(this._y=e,this._dirty++)}_rot=!1;get rot(){return this._rot}set rot(e){if(this._allowRotation!==!1&&this._rot!==e){let r=this.width;this.width=this.height,this.height=r,this._rot=e,this._dirty++}}_allowRotation=void 0;get allowRotation(){return this._allowRotation}set allowRotation(e){this._allowRotation!==e&&(this._allowRotation=e,this._dirty++)}_data;get data(){return this._data}set data(e){e===null||e===this._data||(this._data=e,typeof e=="object"&&e.hasOwnProperty("allowRotation")&&(this._allowRotation=e.allowRotation),this._dirty++)}_dirty=0;get dirty(){return this._dirty>0}setDirty(e=!0){this._dirty=e?this._dirty+1:0}},oh=class{width;height;maxWidth;maxHeight;freeRects;rects;options;data;tag;_dirty=0;get dirty(){return this._dirty>0||this.rects.some(e=>e.dirty)}setDirty(e=!0){if(this._dirty=e?this._dirty+1:0,!e)for(let r of this.rects)r.setDirty&&r.setDirty(!1)}},ro=class t extends oh{maxWidth;maxHeight;padding;width;height;freeRects=[];rects=[];verticalExpand=!1;stage;border;options={smart:!0,pot:!0,square:!0,allowRotation:!1,tag:!1,exclusiveTag:!0,border:0,logic:Yt.MAX_EDGE};constructor(e=uh,r=uh,i=0,n={}){super(),this.maxWidth=e,this.maxHeight=r,this.padding=i,this.options={...this.options,...n},this.width=this.options.smart?0:e,this.height=this.options.smart?0:r,this.border=this.options.border?this.options.border:0,this.freeRects.push(new st(this.maxWidth+this.padding-this.border*2,this.maxHeight+this.padding-this.border*2,this.border,this.border)),this.stage=new st(this.width,this.height)}add(...e){let r,i;if(e.length===1){if(typeof e[0]!="object")throw new Error("MacrectsBin.add(): Wrong parameters");i=e[0];let u=i.data&&i.data.tag?i.data.tag:i.tag?i.tag:void 0;if(this.options.tag&&this.options.exclusiveTag&&this.tag!==u)return}else{if(r=e.length>2?e[2]:null,this.options.tag&&this.options.exclusiveTag&&(r&&this.tag!==r.tag||!r&&this.tag))return;i=new st(e[0],e[1]),i.data=r,i.setDirty(!1)}let n=this.place(i);return n&&this.rects.push(n),n}repack(){let e=[];this.reset(),this.rects.sort((r,i)=>{let n=Math.max(i.width,i.height)-Math.max(r.width,r.height);return n===0&&r.hash&&i.hash?r.hash>i.hash?-1:1:n});for(let r of this.rects)this.place(r)||e.push(r);for(let r of e)this.rects.splice(this.rects.indexOf(r),1);return e.length>0?e:void 0}reset(e=!1,r=!1){e&&(this.data&&delete this.data,this.tag&&delete this.tag,this.rects=[],r&&(this.options={smart:!0,pot:!0,square:!0,allowRotation:!1,tag:!1,border:0})),this.width=this.options.smart?0:this.maxWidth,this.height=this.options.smart?0:this.maxHeight,this.border=this.options.border?this.options.border:0,this.freeRects=[new st(this.maxWidth+this.padding-this.border*2,this.maxHeight+this.padding-this.border*2,this.border,this.border)],this.stage=new st(this.width,this.height),this._dirty=0}clone(){let e=new t(this.maxWidth,this.maxHeight,this.padding,this.options);for(let r of this.rects)e.add(r);return e}place(e){let r=e.data&&e.data.tag?e.data.tag:e.tag?e.tag:void 0;if(this.options.tag&&this.options.exclusiveTag&&this.tag!==r)return;let i,n;if(e.hasOwnProperty("_allowRotation")&&e.allowRotation!==void 0?n=e.allowRotation:n=this.options.allowRotation,i=this.findNode(e.width+this.padding,e.height+this.padding,n),i){this.updateBinSize(i);let u=this.freeRects.length,l=0;for(;l<u;)this.splitNode(this.freeRects[l],i)&&(this.freeRects.splice(l,1),u--,l--),l++;return this.pruneFreeList(),this.verticalExpand=this.options.logic===Yt.FILL_WIDTH?!1:this.width>this.height,e.x=i.x,e.y=i.y,e.rot===void 0&&(e.rot=!1),e.rot=i.rot?!e.rot:e.rot,this._dirty++,e}else if(this.verticalExpand){if(this.updateBinSize(new st(e.width+this.padding,e.height+this.padding,this.border,this.height+this.padding-this.border))||this.updateBinSize(new st(e.width+this.padding,e.height+this.padding,this.width+this.padding-this.border,this.border)))return this.place(e)}else if(this.updateBinSize(new st(e.width+this.padding,e.height+this.padding,this.width+this.padding-this.border,this.border))||this.updateBinSize(new st(e.width+this.padding,e.height+this.padding,this.border,this.height+this.padding-this.border)))return this.place(e)}findNode(e,r,i){let n=Number.MAX_VALUE,u,l,c;for(let d in this.freeRects){if(l=this.freeRects[d],l.width>=e&&l.height>=r){if(this.options.logic===Yt.MAX_AREA)u=l.width*l.height-e*r;else if(this.options.logic===Yt.FILL_WIDTH){let h=l.x+l.y*this.maxWidth,m=this.freeRects.filter(y=>y.x+y.y*this.maxWidth<h).length,p=l.y+r-this.height;u=m+p}else u=Math.min(l.width-e,l.height-r);u<n&&(c=new st(e,r,l.x,l.y),n=u)}if(i&&l.width>=r&&l.height>=e){if(this.options.logic===Yt.MAX_AREA)u=l.width*l.height-r*e;else if(this.options.logic===Yt.FILL_WIDTH){let h=l.x+l.y*this.maxWidth,m=this.freeRects.filter(y=>y.x+y.y*this.maxWidth<h).length,p=l.y+e-this.height;u=m+p}else u=Math.min(l.height-e,l.width-r);u<n&&(c=new st(r,e,l.x,l.y,!0),n=u)}}return c}splitNode(e,r){if(!e.collide(r))return!1;if(r.x<e.x+e.width&&r.x+r.width>e.x){if(r.y>e.y&&r.y<e.y+e.height){let i=new st(e.width,r.y-e.y,e.x,e.y);this.freeRects.push(i)}if(r.y+r.height<e.y+e.height){let i=new st(e.width,e.y+e.height-(r.y+r.height),e.x,r.y+r.height);this.freeRects.push(i)}}if(r.y<e.y+e.height&&r.y+r.height>e.y){if(r.x>e.x&&r.x<e.x+e.width){let i=new st(r.x-e.x,e.height,e.x,e.y);this.freeRects.push(i)}if(r.x+r.width<e.x+e.width){let i=new st(e.x+e.width-(r.x+r.width),e.height,r.x+r.width,e.y);this.freeRects.push(i)}}return!0}pruneFreeList(){let e=0,r=0,i=this.freeRects.length;for(;e<i;){r=e+1;let n=this.freeRects[e];for(;r<i;){let u=this.freeRects[r];if(u.contain(n)){this.freeRects.splice(e,1),e--,i--;break}n.contain(u)&&(this.freeRects.splice(r,1),r--,i--),r++}e++}}updateBinSize(e){if(!this.options.smart||this.stage.contain(e))return!1;let r=Math.max(this.width,e.x+e.width-this.padding+this.border),i=Math.max(this.height,e.y+e.height-this.padding+this.border);if(this.options.allowRotation){let n=Math.max(this.width,e.x+e.height-this.padding+this.border),u=Math.max(this.height,e.y+e.width-this.padding+this.border);n*u<r*i&&(r=n,i=u)}return this.options.pot&&(r=Math.pow(2,Math.ceil(Math.log(r)*Math.LOG2E)),i=Math.pow(2,Math.ceil(Math.log(i)*Math.LOG2E))),this.options.square&&(r=i=Math.max(r,i)),r>this.maxWidth+this.padding||i>this.maxHeight+this.padding?!1:(this.expandFreeRects(r+this.padding,i+this.padding),this.width=this.stage.width=r,this.height=this.stage.height=i,!0)}expandFreeRects(e,r){this.freeRects.forEach((i,n)=>{i.x+i.width>=Math.min(this.width+this.padding-this.border,e)&&(i.width=e-i.x-this.border),i.y+i.height>=Math.min(this.height+this.padding-this.border,r)&&(i.height=r-i.y-this.border)},this),this.freeRects.push(new st(e-this.width-this.padding,r-this.border*2,this.width+this.padding-this.border,this.border)),this.freeRects.push(new st(e-this.border*2,r-this.height-this.padding,this.border,this.height+this.padding-this.border)),this.freeRects=this.freeRects.filter(i=>!(i.width<=0||i.height<=0||i.x<this.border||i.y<this.border)),this.pruneFreeList()}},Bl=class t extends oh{width;height;data;maxWidth;maxHeight;options;rects=[];freeRects;constructor(...e){if(super(),e.length===1){if(typeof e[0]!="object")throw new Error("OversizedElementBin: Wrong parameters");let r=e[0];this.rects=[r],this.width=r.width,this.height=r.height,this.data=r.data,r.oversized=!0}else{this.width=e[0],this.height=e[1],this.data=e.length>2?e[2]:null;let r=new st(this.width,this.height);r.oversized=!0,r.data=this.data,this.rects.push(r)}this.freeRects=[],this.maxWidth=this.width,this.maxHeight=this.height,this.options={smart:!1,pot:!1,square:!1}}add(){}reset(e=!1){}repack(){}clone(){return new t(this.rects[0])}},uh=4096,Yt;(function(t){t[t.MAX_AREA=0]="MAX_AREA",t[t.MAX_EDGE=1]="MAX_EDGE",t[t.FILL_WIDTH=2]="FILL_WIDTH"})(Yt||(Yt={}));var lh=class{width;height;padding;bins;options={smart:!0,pot:!0,square:!1,allowRotation:!1,tag:!1,exclusiveTag:!0,border:0,logic:Yt.MAX_EDGE};constructor(e=uh,r=uh,i=0,n={}){this.width=e,this.height=r,this.padding=i,this.bins=[],this.options={...this.options,...n}}add(...e){if(e.length===1){if(typeof e[0]!="object")throw new Error("MacrectsPacker.add(): Wrong parameters");let r=e[0];if(!(r.width<=this.width&&r.height<=this.height||this.options.allowRotation&&r.width<=this.height&&r.height<=this.width))this.bins.push(new Bl(r));else if(!this.bins.slice(this._currentBinIndex).find(n=>n.add(r)!==void 0)){let n=new ro(this.width,this.height,this.padding,this.options),u=r.data&&r.data.tag?r.data.tag:r.tag?r.tag:void 0;this.options.tag&&u&&(n.tag=u),n.add(r),this.bins.push(n)}return r}else{let r=new st(e[0],e[1]);if(e.length>2&&(r.data=e[2]),!(r.width<=this.width&&r.height<=this.height||this.options.allowRotation&&r.width<=this.height&&r.height<=this.width))this.bins.push(new Bl(r));else if(!this.bins.slice(this._currentBinIndex).find(n=>n.add(r)!==void 0)){let n=new ro(this.width,this.height,this.padding,this.options);this.options.tag&&r.data.tag&&(n.tag=r.data.tag),n.add(r),this.bins.push(n)}return r}}addArray(e){if(!this.options.tag||this.options.exclusiveTag)this.sort(e,this.options.logic).forEach(r=>this.add(r));else{if(e.length===0)return;e.sort((u,l)=>{let c=u.data&&u.data.tag?u.data.tag:u.tag?u.tag:void 0,d=l.data&&l.data.tag?l.data.tag:l.tag?l.tag:void 0;return d===void 0?-1:c===void 0?1:d>c?-1:1});let r,i=0;if(!this.bins.slice(this._currentBinIndex).find((u,l)=>{let c=u.clone();for(let d=i;d<e.length;d++){let h=e[d],m=h.data&&h.data.tag?h.data.tag:h.tag?h.tag:void 0;if(d===0&&(r=m),m!==r)return r=m,this.sort(e.slice(i,d),this.options.logic).forEach(p=>u.add(p)),i=d,this.addArray(e.slice(d)),!0;if(m===void 0)return this.sort(e.slice(d),this.options.logic).forEach(p=>this.add(p)),i=e.length,!0;if(c.add(h)===void 0)return this.sort(e.slice(i,d),this.options.logic).forEach(p=>u.add(p)),i=d,!1}return this.sort(e.slice(i),this.options.logic).forEach(d=>u.add(d)),!0})){let u=e[i],l=new ro(this.width,this.height,this.padding,this.options),c=u.data&&u.data.tag?u.data.tag:u.tag?u.tag:void 0;this.options.tag&&this.options.exclusiveTag&&c&&(l.tag=c),this.bins.push(l),l.add(u),i++,this.addArray(e.slice(i))}}}reset(){this.bins=[],this._currentBinIndex=0}repack(e=!0){if(e){let i=[];for(let n of this.bins)if(n.dirty){let u=n.repack();u&&i.push(...u)}this.addArray(i);return}if(!this.dirty)return;let r=this.rects;this.reset(),this.addArray(r)}next(){return this._currentBinIndex=this.bins.length,this._currentBinIndex}load(e){e.forEach((r,i)=>{if(r.maxWidth>this.width||r.maxHeight>this.height)this.bins.push(new Bl(r.width,r.height,{}));else{let n=new ro(this.width,this.height,this.padding,r.options);n.freeRects.splice(0),r.freeRects.forEach((u,l)=>{n.freeRects.push(new st(u.width,u.height,u.x,u.y))}),n.width=r.width,n.height=r.height,r.tag&&(n.tag=r.tag),this.bins[i]=n}},this)}save(){let e=[];return this.bins.forEach(r=>{let i={width:r.width,height:r.height,maxWidth:r.maxWidth,maxHeight:r.maxHeight,freeRects:[],rects:[],options:r.options};r.tag&&(i={...i,tag:r.tag}),r.freeRects.forEach(n=>{i.freeRects.push({x:n.x,y:n.y,width:n.width,height:n.height})}),e.push(i)}),e}sort(e,r=Yt.MAX_EDGE){return e.slice().sort((i,n)=>{let u=r===Yt.MAX_EDGE?Math.max(n.width,n.height)-Math.max(i.width,i.height):n.width*n.height-i.width*i.height;return u===0&&i.hash&&n.hash?i.hash>n.hash?-1:1:u})}_currentBinIndex=0;get currentBinIndex(){return this._currentBinIndex}get dirty(){return this.bins.some(e=>e.dirty)}get rects(){let e=[];for(let r of this.bins)e.push(...r.rects);return e}};var ch=16384;function rY(t){return t===0?1:(t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t+1)}var nY=({input:t,getLoadedImage:e,tileSize:r=16,getCanvas:i=u=>typeof document<"u"&&document.createElement?document.createElement("canvas"):new globalThis.Canvas(u,u,"png"),needHorizontalIndexes:n=!1})=>{let u=[...new Set(t)].map(x=>{let S=e(x),V;if(S.image)V=S.image;else if(S.contents)V=new Image,V.src=S.contents;else throw new Error("No image or contents");let E=r*(S.tileWidthMult??1),I=r;if(S.useOriginalSize||S.renderWidth||S.renderHeight){let N=S.renderWidth??V.width,O=S.renderHeight??V.height;E=Math.ceil(N/r)*r,I=Math.ceil(O/r)*r}return{keyValue:x,img:V,inputData:S,renderWidth:E,renderHeight:I,renderSourceWidth:S.useOriginalSize?V.width:S.renderSourceWidth??Math.min(V.width,V.height),renderSourceHeight:S.useOriginalSize?V.height:S.renderSourceHeight??Math.min(V.width,V.height),renderSourceStartX:S.renderSourceStartX??0,renderSourceStartY:S.renderSourceStartY??0}}),l=new lh(void 0,void 0,0,{square:!0,pot:!0,...n?{}:{smart:!0},logic:n?Yt.FILL_WIDTH:Yt.MAX_AREA}),c=u.map(x=>{let S=new st(x.renderWidth,x.renderHeight);return S.data=x,S});l.addArray(c);let d=l.bins[0];if(!d||!d.rects||!d.rects.length)throw new Error("Failed to pack textures");let h={width:d.width,height:d.height,coords:d.rects.map(x=>({x:x.x,y:x.y,img:{data:x.data}}))},m=new Set;for(let x of h.coords){let S=x.img.data;if(m.has(S.keyValue))throw new Error(`Duplicate texture keyValue found in atlas: ${S.keyValue}`);m.add(S.keyValue)}if(m.size!==t.length)throw new Error(`Lost some textures in packing: ${t.length-m.size}`);let p=Math.max(rY(h.width),rY(h.height));if(p>ch){let x=u.reduce((V,E)=>{let I=`${E.renderWidth}x${E.renderHeight}`;return V[I]=(V[I]||0)+1,V},{}),S=Object.entries(x).sort(([,V],[,E])=>E-V).map(([V,E])=>`${V}(${E})`).join(", ");throw new Error(`Required atlas size ${p} exceeds maximum ${ch}. Texture sizes: ${S}`)}let y=i(p);y.width=p,y.height=p;let g=y.getContext("2d");g.imageSmoothingEnabled=!1;let v={},w=r/p,k=Math.ceil(p/r);for(let x of h.coords){let S=x.img.data,V=x.x,E=x.y,I=Math.floor(E/r),N=Math.floor(V/r),O=I*k+N;try{g.drawImage(S.img,S.renderSourceStartX,S.renderSourceStartY,S.renderSourceWidth,S.renderSourceHeight,V,E,S.renderWidth,S.renderHeight)}catch(re){throw new Error(`Error drawing ${S.keyValue}: ${re}`)}let T=S.keyValue.split(".").slice(0,-1).join(".")||S.keyValue,R=S.renderWidth/p,J=S.renderHeight/p;v[T]={u:V/p,v:E/p,tileIndex:O,...R==w&&J==w?{}:{su:R,sv:J}}}return{canvas:y,json:{suSv:w,tileSize:r,width:p,height:p,textures:v}}};a();o();s();var fa=async t=>{let e=new Image;return e.crossOrigin="anonymous",e.src=t,e.complete||await new Promise((r,i)=>{e.onload=r,e.onerror=i}),e};var fh=class t{atlasJson;latestImage;legacyImage;atlasStore;atlasHasLegacyImage;static getTextureInfo(e,r,i,n="latest"){let u=e.get(n,i);if(!u)return;let l=(u.imageType==="latest"?r.latest:r.legacy).suSv;return{...u,su:u?.su??l,sv:u?.sv??l}}constructor(e,r,i){this.atlasJson=e,this.latestImage=r,this.legacyImage=i,this.atlasStore=new Zr,this.atlasStore.inclusive=!1;let n=e,u=(l,c,d,h)=>{for(let[m,p]of Object.entries(d))l.push(c,m,{...p,version:c,imageType:h})};if(u(this.atlasStore,"latest",n.latest.textures,"latest"),this.atlasHasLegacyImage=!!i,i&&n.legacy)for(let l of Object.keys(n.legacy.textures)){let[c,d]=l.split("/");u(this.atlasStore,c,{[d]:n.legacy.textures[l]},"legacy")}}get atlas(){return this.atlasJson}getTextureInfo(e,r="latest"){let i=t.getTextureInfo(this.atlasStore,this.atlas,e,r);if(i)return{...i,getLoadedImage:async()=>await fa(i.imageType==="latest"?this.latestImage:this.legacyImage),getLoadedAtlasImage:async()=>await fa(i.imageType==="latest"?this.latestImage:this.legacyImage)}}async makeNewAtlas(e,r,i=this.atlas.latest.tileSize,n,u=[],l={}){let c=this.atlasJson,d={},h=this.atlasHasLegacyImage?await fa(this.legacyImage):null,m=await fa(this.latestImage);for(let w of new Set([...Object.keys(c.latest.textures),...u])){let k=r?.(w);if(k===!1)continue;if(k&&k!==!0){let T=typeof k=="string"?await fa(k):k;d[w]={u:0,v:0,su:1,sv:1,img:T};continue}let x=this.getTextureInfo(w,e);if(!x)throw new Error(`Missing texture info from the provided atlas for ${w} and not custom data is provided`);let{u:S,v:V,su:E,sv:I}=x,N=x.version==="latest"?c.latest:c.legacy,O=x.imageType==="latest"?m:h;if(!O)throw new Error(`Missing image for ${w}`);d[w]={u:S,v:V,su:E??N.suSv,sv:I??N.suSv,img:O}}let p=Object.keys(d);if(n){let w=typeof n=="function"?n:k=>n.includes(k)?1:-1;p.sort((k,x)=>w(x)-w(k))}let{json:y,canvas:g}=nY({input:p,getLoadedImage:w=>{let k=d[w],x=k.img,S=x.width,V=x.height;return delete k.img,{image:x,renderWidth:k.su*S,renderHeight:k.sv*V,renderSourceStartX:k.u*S,renderSourceStartY:k.v*V,renderSourceWidth:k.su*S,renderSourceHeight:k.sv*V}},tileSize:this.atlas.latest.tileSize,...l}),v;return{canvas:g,atlas:y,get newAtlasParser(){return v||(v=new t({latest:y},g.toDataURL())),v},get image(){return g.toDataURL()}}}async createDebugImage(e=!1){let r=this.atlas.latest;if(r.width!==r.height)throw new Error("Atlas must be square");let n=Math.min(ch,r.width*(e?6:1))/r.width,u=r.height*n,l=r.width*n,c=globalThis.Canvas?new globalThis.Canvas(l,u):document.createElement("canvas");c.width=l,c.height=u;let d=c.getContext("2d");d.imageSmoothingEnabled=!1,d.webkitImageSmoothingEnabled=!1,d.mozImageSmoothingEnabled=!1,d.msImageSmoothingEnabled=!1;let h=await fa(this.latestImage);d.drawImage(h,0,0,r.width,r.height,0,0,l,u),d.strokeStyle="#ff0000",d.lineWidth=2;let m=Object.keys(r.textures),p=m.length,y=0;return m.forEach((g,v)=>{let w=r.textures[g],k=Math.floor(v/p*100);k>=y+10&&(console.log(`Processing textures: ${k}% (${v}/${p})`),y=k);let x=w.u*r.width*n,S=w.v*r.height*n,V=(w.su||r.suSv)*r.width*n,E=(w.sv||r.suSv)*r.height*n,I=d.createPattern((()=>{let N=globalThis.Canvas?new globalThis.Canvas(10,10):document.createElement("canvas");N.width=10,N.height=10;let O=N.getContext("2d");return O.fillStyle="#ff0000",O.fillRect(0,0,5,10),O.fillStyle="#ffff00",O.fillRect(5,0,5,10),N})(),"repeat");if(d.strokeStyle=I,d.strokeRect(x,S,V,E),e){let N=g,O=4,T=V-O*2,R=12;do{if(d.font=`${R}px monospace`,d.measureText(N).width<=T||R<=6)break;R-=1}while(R>6);d.fillStyle="white",d.strokeStyle="black",d.lineWidth=Math.max(1,R/6),d.textBaseline="top";let J=x+O,re=S+O,se=N.split(/(?=[A-Z_/])/g),G="",ne=[];for(let me of se){let fe=G+me;d.measureText(fe).width>T&&G!==""?(ne.push(G),G=me):G=fe}ne.push(G);let ue=R*1.2;ne.forEach((me,fe)=>{d.strokeText(me,J,re+fe*ue),d.fillText(me,J,re+fe*ue)})}}),console.log(`Processing textures: 100% (${p}/${p})`),c.toDataURL()}};a();o();s();var iY=t=>{let e=t.split(":");return e.length===1?"minecraft":e.length===2?e[0]:e.slice(0,-1).join(":")},dh=class{version;blockStatesStore;blockModelsStore;stateIdToElements={};constructor(e,r,i){this.version=e,this.blockStatesStore=r,this.blockModelsStore=i}getElementsCached(e){let{stateId:r}=e;if(this.stateIdToElements[r])return this.stateIdToElements[r];let i=this.getElements(e),n=i===0?[]:i;return this.stateIdToElements[r]=n,n}parseProperties(e){if(typeof e=="object")return e;let r={};for(let i of e.split(",")){let[n,u]=i.split("=");r[n]=u}return r}getElements(e,r=!1){let i=this.getResolvedModelFirst(e,r);if(!i)return 0;let n=[];for(let l of i)l?.elements&&n.push(...l.elements.map(({from:c,to:d})=>[c,d]));return n.length===1&&aY(n[0][0],[0,0,0])&&aY(n[0][1],[16,16,16])?1:n}resolvedModel={modelName:""};issues=[];matchedModels=[];matchedConditions=[];getModelsByBlock(e,r,i){this.matchedModels=[],this.matchedConditions=[];let n=(p,y)=>{if(!y)return!0;typeof y=="string"&&(y=this.parseProperties(y));let g=p.properties;if(y.OR)return y.OR.some(v=>n(p,v));if(y.AND)return y.AND.every(v=>n(p,v));for(let v in y)if(typeof y[v]!="string"&&(y[v]=String(y[v])),!y[v].split("|").some(w=>w===String(g[v])))return!1;return!0},u=[],l=this.blockStatesStore.get(this.version,e.name);if(!l){this.issues.push(`Block ${e.name} not found in all registered blockstates. Place it into assets/${iY(e.name)}/blockstates/${e.name}.json`);return}let c=l.variants,d=!1;if(c){let p=c[""]||c.normal;for(let y in c)if(y!==""&&n(e,y)){p=c[y];break}if(p){let y=Object.entries(c).find(([g])=>p===c[g])?.[0];this.matchedConditions.push(`variant:${y}`)}if(!p)if(r){let y=Object.keys(c)[0];p=c[y],this.matchedConditions.push(`fallback:${y}`)}else return;p&&(u.push(p),d=!0)}if(l.multipart){for(let{when:p,apply:y}of l.multipart)(!p||n(e,p))&&(u.push(y),this.matchedConditions.push(p?`multipart:${JSON.stringify(p)}`:"multipart:always"));if(!u.length&&r){let y=l.multipart.filter(g=>g.when)[0]?.apply;y&&(u.push(y),this.matchedConditions.push("multipart:fallback"))}}if(!u.length){if(!d){let p=Object.keys(c??{}).length;p?this.issues.push(`Block did not match any possible state (${p} possible states)`):this.issues.push(`Blockstates for ${e.name} are not defined`)}return}let h=[],m=0;for(let p of u){m++;let y=0;h.push([]);for(let g of Array.isArray(p)?p:[p])if(y++,this.resolvedModel={modelName:g.model??e.name,x:g.x,y:g.y,z:g.z,uvlock:g.uvlock,weight:g.weight},!!g&&(this.getResolvedModelsByModel(g.model,e.name+"-"+m+"-"+y,!1),h[h.length-1].push(this.resolvedModel),!i&&h[h.length-1].length>0))break}return h}getModelData(e){return this.blockModelsStore.get(this.version,e.replace("minecraft:",""))}getResolvedModelsByModel(e,r,i=!0){i&&(this.resolvedModel={modelName:this.resolvedModel.modelName});let n=this.getModelData(e);if(!n){this.issues.push(`Model ${e} not found. Ensure it is present in assets/${iY(e)}/models/${e}.json`);return}return this.matchedModels.push(e),this.getResolvedModelsByModelData(n,r,i)}getResolvedModelsByModelData(e,r,i=!0){i&&(this.resolvedModel={modelName:this.resolvedModel.modelName});let n=[],u=c=>{if(n.push(c),c.parent){let d=this.getModelData(c.parent);if(!d){this.issues.push(`Parent model ${c.parent} not found for ${r}`);return}this.matchedModels.push(`parent:${c.parent}`),u(d)}};u(e),n.reverse();for(let c of n){if(c.textures){this.resolvedModel.textures??={};for(let[d,h]of Object.entries(c.textures)){if(h.includes("#")&&(h=h.split("/").at(-1)),h.startsWith("#")){let m=h.slice(1);this.resolvedModel.textures[m]&&(h=this.resolvedModel.textures[m])}this.resolvedModel.textures[d]=h}}c.elements&&(this.resolvedModel.elements=c.elements);for(let[d,h]of Object.entries(c))d!=="elements"&&d!=="textures"&&d!=="parent"&&(this.resolvedModel[d]&&typeof this.resolvedModel[d]=="object"&&h&&typeof h=="object"?Object.assign(this.resolvedModel[d],h):this.resolvedModel[d]=h)}let l=(c,d,h)=>{if(h.push(d),c.includes("#")){if(c=c.split("/").at(-1).replace("#",""),this.resolvedModel.textures??={},h.includes(c)){this.issues.push(`${r}: Circular texture reference detected: ${h.join(" -> ")}`);return}let m=this.resolvedModel.textures[c];if(m)return l(m,c,h);this.issues.push(`${r}: Cannot resolve texture ${c} for ${d} because it is not defined`);return}return c};for(let[c,d]of Object.entries(this.resolvedModel.textures??{})){if(!d.includes("#"))continue;let h=l(d,c,[]);h?this.resolvedModel.textures[c]=h:delete this.resolvedModel.textures[c]}for(let c of this.resolvedModel.elements??[])for(let[d,h]of Object.entries(c.faces??{}))h.texture&&(h.texture=this.resolvedModel.textures[h.texture.replace("#","")]??h.texture);return{resolvedModel:this.resolvedModel}}getResolvedModelFirst(e,r=!1){return this.getModelsByBlock(e,r,!1)?.map(i=>i[0])}getResolvedModelRandom(e,r=!1){return this.getModelsByBlock(e,r,!1)?.map(i=>i[Math.floor(Math.random()*i.length)])}getAllResolvedModels(e,r=!1){return this.getModelsByBlock(e,r,!0)}},aY=(t,e)=>!!t&&!!e&&t.length===e.length&&t.every((r,i)=>r===e[i]);a();o();s();var Lfe=new Zr,jfe=new Zr,Afe=new Zr;Lfe.inclusive=!1;jfe.inclusive=!1;Afe.inclusive=!1;var sY=t=>{let e=new Zr;return e.inclusive=!1,e.loadData(t.blockstates),e},oY=t=>{let e=new Zr;return e.inclusive=!1,e.loadData(t.models),e};function Yy(t,e,r){let i=sY(t),n=oY(t),u=new dh(r,i,n),l=new fh(e,"latest","legacy"),c=h=>l.getTextureInfo(h.replace("block/","").replace("blocks/",""),r),d=(h,m,p)=>{let{elements:y,textures:g,...v}=h;return{elements:y?.map((w,k)=>{try{return{...w,faces:Object.fromEntries(Object.entries(w.faces).map(([x,S])=>{let V=S.texture;if(!V)throw new Error(`Missing resolved texture ${V} for face ${x} of ${m.name}`);let E=c(V);if(!E)throw new Error(`Missing texture data ${V} for ${m.name}`);let I=w.from,N=w.to,O=16,T=S.uv||{north:[N[0],O-N[1],I[0],O-I[1]],east:[I[2],O-N[1],N[2],O-I[1]],south:[I[0],O-N[1],N[0],O-I[1]],west:[I[2],O-N[1],N[2],O-I[1]],up:[I[0],I[2],N[0],N[2]],down:[N[0],I[2],I[0],N[2]]}[x],R=(T[2]-T[0])/O*E.su,J=(T[3]-T[1])/O*E.sv;return[x,{...S,texture:{u:E.u+T[0]/16*E.su,v:E.v+T[1]/16*E.sv,su:R,sv:J,tileIndex:E.tileIndex,debugName:V}}]}))}}catch(x){return p?.push(`Error processing element ${k} in ${m.name}: ${x.message}`),null}}).filter(w=>w!==null),...v}};return{getAllResolvedModels0_1(h,m=!1,p=[],y=[],g=[],v=!1){u.issues=[],u.matchedModels=[],u.matchedConditions=[];let w=u.getAllResolvedModels(h,m)??[];if(p.push(...u.issues),y.push(...u.matchedModels),g.push(...u.matchedConditions),!w.length)return p.push(`No models found for block ${h.name}`),[];let k=["north","east","south","west","up","down"];try{let x=w.map(S=>S.map(V=>{try{return d(V,h,v?p:void 0)}catch(E){return p.push(`Error transforming model for ${h.name}: ${E.message}`),null}}).filter(V=>V?.elements?.length)).filter(S=>S.length);return x.length||p.push(`No valid models after transformation for block ${h.name}`),x}catch(x){return p.push(`Fatal error processing models for ${h.name}: ${x.message}`),[]}},transformModel:d,getTextureInfo:c}}a();o();s();function hh(t,e){let r=e/180*Math.PI,i=Math.cos(r),n=Math.sin(r),u={x:0,y:1,z:2}[t],l=(u+1)%3,c=(u+2)%3,d=[[0,0,0],[0,0,0],[0,0,0]];return d[u][u]=1,d[l][l]=i,d[l][c]=-n,d[c][l]=+n,d[c][c]=i,d}function Ky(t,e){return e?[t[0]+e[0],t[1]+e[1],t[2]+e[2]]:t}function ph(t,e){return e?[t[0]-e[0],t[1]-e[1],t[2]-e[2]]:t}function Xr(t,e){return t?[t[0][0]*e[0]+t[0][1]*e[1]+t[0][2]*e[2],t[1][0]*e[0]+t[1][1]*e[1]+t[1][2]*e[2],t[2][0]*e[0]+t[2][1]*e[1]+t[2][2]*e[2]]:e}function Qy(t,e){let r=[[0,0,0],[0,0,0],[0,0,0]],i=t[0][0],n=t[1][0],u=t[2][0],l=t[0][1],c=t[1][1],d=t[2][1],h=t[0][2],m=t[1][2],p=t[2][2],y=e[0][0],g=e[1][0],v=e[2][0],w=e[0][1],k=e[1][1],x=e[2][1],S=e[0][2],V=e[1][2],E=e[2][2];return r[0][0]=i*y+n*w+u*S,r[1][0]=i*g+n*k+u*V,r[2][0]=i*v+n*x+u*E,r[0][1]=l*y+c*w+d*S,r[1][1]=l*g+c*k+d*V,r[2][1]=l*v+c*x+d*E,r[0][2]=h*y+m*w+p*S,r[1][2]=h*g+m*k+p*V,r[2][2]=h*v+m*x+p*E,r}var Nl={up:{dir:[0,1,0],mask1:[1,1,0],mask2:[0,1,1],corners:[[0,1,1,0,1],[1,1,1,1,1],[0,1,0,0,0],[1,1,0,1,0]]},down:{dir:[0,-1,0],mask1:[1,1,0],mask2:[0,1,1],corners:[[1,0,1,0,1],[0,0,1,1,1],[1,0,0,0,0],[0,0,0,1,0]]},east:{dir:[1,0,0],mask1:[1,1,0],mask2:[1,0,1],corners:[[1,1,1,0,0],[1,0,1,0,1],[1,1,0,1,0],[1,0,0,1,1]]},west:{dir:[-1,0,0],mask1:[1,1,0],mask2:[1,0,1],corners:[[0,1,0,0,0],[0,0,0,0,1],[0,1,1,1,0],[0,0,1,1,1]]},north:{dir:[0,0,-1],mask1:[1,0,1],mask2:[0,1,1],corners:[[1,0,0,1,1],[0,0,0,0,1],[1,1,0,1,0],[0,1,0,0,0]]},south:{dir:[0,0,1],mask1:[1,0,1],mask2:[0,1,1],corners:[[0,0,1,0,1],[1,0,1,1,1],[0,1,1,0,0],[1,1,1,1,0]]}};var Cfe=!1,sr=Cfe?console.log:()=>{},gi,no={},pi=!1,gh;try{gh=lY().tints}catch{gh=Zy()}for(let t of Object.keys(gh))no[t]=Mfe(gh[t]);function Mfe(t){let e=new Map,r=cY(t.default);for(let{keys:i,color:n}of t.data){n=cY(n);for(let u of i)e.set(`${u}`,n)}return new Proxy(e,{get(i,n){return i.has(n)?i.get(n):r}})}var $fe=Object.entries(El.clientCalculatedBlocks);function Rfe(t,e,r){let i=$fe.find(([n,u])=>u.includes(t.name))?.[0];if(i)switch(i){case"directional":{let n=!t.name.includes("redstone")&&!t.name.includes("tripwire"),u=[e.getBlock(r.offset(0,0,1)),e.getBlock(r.offset(0,0,-1)),e.getBlock(r.offset(1,0,0)),e.getBlock(r.offset(-1,0,0))],l={},c=!1;for(let[d,h]of u.entries())((n?h&&!h.transparent:!1)||h?.name===t.name)&&(l[["south","north","east","west"][d]]="true",c=!0);return c?l:void 0}case"block_snowy":{let n=e.getBlock(r.offset(0,1,0))?.name==="snow";return n?{snowy:`${n}`}:void 0}case"door":{let{half:n}=t.getProperties();if(n==="upper"){let u=e.getBlock(r.offset(0,-1,0));if(u?.name===t.name)return{...u.getProperties(),half:"upper"}}}}}function cY(t){let e=t>>16&255,r=t>>8&255,i=t&255;return[e/255,r/255,i/255]}function zfe(t,e,r,i,n,u){if(n&&!u||e&&eb(e))return 8/9;if(!e||e.type!==r)return 1/9;if(e.metadata===0){let l=t.getBlock(i.offset(0,1,0));return l&&l.type===r?1:8/9}return((e.metadata>=8?8:7-e.metadata)+1)/9}var hY=t=>!t||t.transparent?!1:t.isCube?!0:!t.models?.length||t.models.length!==1?!1:t.models[0].every(e=>e.elements.every(r=>r.from[0]===0&&r.from[1]===0&&r.from[2]===0&&r.to[0]===16&&r.to[1]===16&&r.to[2]===16)),Xy=(t,e)=>{for(let r of["x","y","z"])Math.abs(e[r])>0&&(t[r]=0);return t.plus(e)};function fY(t,e,r,i,n,u,l,c){let d=[];for(let m=-1;m<=1;m++)for(let p=-1;p<=1;p++){let y=e.offset(p,0,m);d.push(zfe(t,t.getBlock(y),i,y,u,c))}let h=[Math.max(Math.max(d[0],d[1]),Math.max(d[3],d[4])),Math.max(Math.max(d[1],d[2]),Math.max(d[4],d[5])),Math.max(Math.max(d[3],d[4]),Math.max(d[6],d[7])),Math.max(Math.max(d[4],d[5]),Math.max(d[7],d[8]))];for(let m in Nl){let{dir:p,corners:y,mask1:g,mask2:v}=Nl[m],w=p[1]===1,k=e.offset(...p),x=t.getBlock(k);if(!x||x.type===i||u&&(x.name==="water"||eb(x))||hY(x)&&!w)continue;let S=[1,1,1];if(u){let T=1;Math.abs(p[0])>0?T=.6:Math.abs(p[2])>0&&(T=.8),S=no.water[n],S=[S[0]*T,S[1]*T,S[2]*T]}if(pi){let T=l.tiles;T[`${e.x},${e.y},${e.z}`]??={block:"water",faces:[]},T[`${e.x},${e.y},${e.z}`].faces.push({face:m,neighbor:`${k.x},${k.y},${k.z}`,side:0,textureIndex:0})}let{u:V}=r,{v:E}=r,{su:I}=r,{sv:N}=r,O=t.getLight(k,void 0,void 0,u?"water":"lava")/15;for(let T of y){let R=h[T[2]*2+T[0]],J=1e-4;l.t_positions.push((T[0]?1-J:J)+(e.x&15)-8,(T[1]?R-J:J)+(e.y&15)-8,(T[2]?1-J:J)+(e.z&15)-8),l.t_normals.push(...p),l.t_uvs.push(T[3]*I+V,T[4]*N*(T[1]?1:R)+E);let re=O;if(t.config.smoothLighting){let se=T[0]*2-1,G=T[1]*2-1,ne=T[2]*2-1,ue=[se,G,ne],me=[se*g[0],G*g[1],ne*g[2]],fe=[se*v[0],G*v[1],ne*v[2]],le=new Qe(...p),ce=Xy(new Qe(...me),le),U=t.getLight(e.plus(ce))/15,Y=Xy(new Qe(...fe),le),L=t.getLight(e.plus(Y))/15,z=Xy(new Qe(...ue),le),C=t.getLight(e.plus(z))/15,j=[U,L,C,O];re=j.reduce((M,F)=>M+F,0)/j.length}l.t_colors.push(S[0]*re,S[1]*re,S[2]*re)}}}var Dfe=(t,e,r)=>{let i=`${r.x},${r.y},${r.z}`,n={"0,1,0":"down","0,-1,0":"up","1,0,0":"east","-1,0,0":"west","0,0,1":"south","0,0,-1":"north"}[i],u={"0,1,0":h=>`${h.from[0]},${h.from[2]}:${h.to[0]},${h.to[2]}`,"0,-1,0":h=>`${h.to[0]},${h.to[2]}:${h.from[0]},${h.from[2]}`,"1,0,0":h=>`${h.from[2]},${h.from[1]}:${h.to[2]},${h.to[1]}`,"-1,0,0":h=>`${h.to[2]},${h.to[1]}:${h.from[2]},${h.from[1]}`,"0,0,1":h=>`${h.from[1]},${h.from[2]}:${h.to[1]},${h.to[2]}`,"0,0,-1":h=>`${h.to[1]},${h.to[2]}:${h.from[1]},${h.from[2]}`}[i],l={"0,1,0":h=>t.from[1]===0&&h.to[2]===16,"0,-1,0":h=>t.from[1]===0&&h.to[2]===16,"1,0,0":h=>t.from[0]===0&&h.to[1]===16,"-1,0,0":h=>t.from[0]===0&&h.to[1]===16,"0,0,1":h=>t.from[2]===0&&h.to[0]===16,"0,0,-1":h=>t.from[2]===0&&h.to[0]===16}[i],c=0,d=e.models?.map(h=>h[c]??h[0])??[];if(!d.some(h=>h.x||h.y||h.z))return d.every(h=>(h.elements??[]).every(m=>!!(m.faces[n]?.cullface&&u(t)===u(m)&&l(m))))},Ffe=!1;function dY(t,e,r,i,n,u,l,c,d){let h=e,m=c.name.includes("glass")||c.name.includes("ice");for(let p in r.faces){let y=r.faces[p],{corners:g,mask1:v,mask2:w,side:k}=Nl[p],x=Xr(u,Nl[p].dir);if(sr(`[TS] Processing face ${p} at (${e.x}, ${e.y}, ${e.z}), dir=[${x.join(",")}]`),y.cullface){let C=t.getBlock(e.plus(new Qe(...x)),gi,{});if(C){if(m&&C.stateId===c.stateId||!C.transparent&&(hY(C)||Dfe(r,C,new Qe(...x))))continue}else Ffe=!0}let S=r.from[0],V=r.from[1],E=r.from[2],I=r.to[0],N=r.to[1],O=r.to[2],T=y.texture,{u:R}=T,{v:J}=T,{su:re}=T,{sv:se}=T,G=Math.floor(n.positions.length/3);sr(`[TS] Base index: ${G}`);let ne=[1,1,1];y.tintindex!==void 0&&y.tintindex===0&&(c.name==="redstone_wire"?ne=no.redstone[`${c.getProperties().power}`]:c.name==="birch_leaves"||c.name==="spruce_leaves"||c.name==="lily_pad"?ne=no.constant[c.name]:c.name.includes("leaves")||c.name==="vine"?ne=no.foliage[d]:ne=no.grass[d]);let ue=y.rotation||0;p==="down"&&(ue+=180);let me=Math.cos(ue*Math.PI/180),fe=-Math.sin(ue*Math.PI/180),le=null,ce=null;if(r.rotation&&!pi&&(le=hh(r.rotation.axis,r.rotation.angle),ce=ph(r.rotation.origin,Xr(le,r.rotation.origin)),r.rotation.rescale)){let C=2-Math.sqrt(2),j=r.rotation.angle*Math.PI/180,M=Math.abs(Math.sin(j))*C,F=r.rotation.axis==="x"?1:0,ee=r.rotation.axis==="y"?1:0,Z=r.rotation.axis==="z"?1:0,te=[[(1-F)*M+1,0,0],[0,(1-ee)*M+1,0],[0,0,(1-Z)*M+1]];le=Qy(le,te),ce=ph(r.rotation.origin,Xr(le,r.rotation.origin))}let U=[],Y=h.plus(new Qe(...x)),L=t.getLight(Y,void 0,void 0,c.name)/15;for(let C of g){let j=[C[0]?I:S,C[1]?N:V,C[2]?O:E];if(!pi){j=Ky(Xr(le,j),ce),j=Ky(Xr(u,j),l),j=j.map(he=>he/16);let ee=[j[0]+(e.x&15)-8,j[1]+(e.y&15)-8,j[2]+(e.z&15)-8];sr(`[TS] Corner ${C.join(",")}: vertex=[${j.map(he=>he.toFixed(3)).join(",")}], worldPos=[${ee.map(he=>he.toFixed(3)).join(",")}]`),n.positions.push(...ee),n.normals.push(...x);let Z=(C[3]-.5)*me-(C[4]-.5)*fe+.5,te=(C[3]-.5)*fe+(C[4]-.5)*me+.5,oe=Z*re+R,ye=te*se+J;sr(`[TS] UV: cornerUV=[${C[3]},${C[4]}], baseUV=[${Z.toFixed(6)},${te.toFixed(6)}], finalUV=[${oe.toFixed(6)},${ye.toFixed(6)}], texture=[u=${R},v=${J},su=${re},sv=${se}], rotation=${ue}`),n.uvs.push(oe,ye)}let M=1,{smoothLighting:F}=t.config;if(i){let ee=C[0]*2-1,Z=C[1]*2-1,te=C[2]*2-1,oe=Xr(u,[ee,Z,te]),ye=Xr(u,[ee*v[0],Z*v[1],te*v[2]]),he=Xr(u,[ee*w[0],Z*w[1],te*w[2]]),pe=t.getBlock(e.offset(...ye)),$e=t.getBlock(e.offset(...he)),nt=t.getBlock(e.offset(...oe)),wt=L*15;if(F){let ot=new Qe(...x),D=Q=>{for(let ge of["x","y","z"])Math.abs(ot[ge])>0&&(Q[ge]=0);return Q.plus(ot)},K=D(new Qe(...ye)),q=t.getLight(e.plus(K)),_=D(new Qe(...he)),b=t.getLight(e.plus(_)),B=D(new Qe(...oe)),A=t.getLight(e.plus(B)),H=[q,b,A,L*15];wt=H.reduce((Q,ge)=>Q+ge,0)/H.length}let ae=t.shouldMakeAo(pe)?1:0,qe=t.shouldMakeAo($e)?1:0,Xe=t.shouldMakeAo(nt)?1:0,je=ae&&qe?0:3-(ae+qe+Xe);M=(je+1)/4*(wt/15),U.push(je);let Ae=U.length-1;sr(`[TS] Corner ${Ae} AO=${je}, light=${M.toFixed(3)}`)}pi||n.colors.push(ne[0]*M,ne[1]*M,ne[2]*M)}let z=[L*ne[0],L*ne[1],L*ne[2]];if(pi){let C=n.tiles;C[`${e.x},${e.y},${e.z}`]??={block:c.name,faces:[]},(C[`${e.x},${e.y},${e.z}`].faces.length<1||!!1)&&C[`${e.x},${e.y},${e.z}`].faces.push({face:p,side:k,textureIndex:y.texture.tileIndex,neighbor:`${Y.x},${Y.y},${Y.z}`,light:L,tint:z,texture:y.texture.debugName||c.name})}if(!pi){let C,j;i&&U[0]+U[3]>=U[1]+U[2]?(C=[G,G+3,G+2],j=[G,G+1,G+3],sr(`[TS] Indices (AO optimized): tri1=[${C.join(",")}], tri2=[${j.join(",")}], aos=[${U.join(",")}]`),n.indices[n.indicesCount++]=C[0],n.indices[n.indicesCount++]=C[1],n.indices[n.indicesCount++]=C[2],n.indices[n.indicesCount++]=j[0],n.indices[n.indicesCount++]=j[1],n.indices[n.indicesCount++]=j[2]):(C=[G,G+1,G+2],j=[G+2,G+1,G+3],sr(`[TS] Indices (standard): tri1=[${C.join(",")}], tri2=[${j.join(",")}], aos=[${U.join(",")}]`),n.indices[n.indicesCount++]=C[0],n.indices[n.indicesCount++]=C[1],n.indices[n.indicesCount++]=C[2],n.indices[n.indicesCount++]=j[0],n.indices[n.indicesCount++]=j[1],n.indices[n.indicesCount++]=j[2])}}}var Ufe=new Set(["seagrass","tall_seagrass","kelp","kelp_plant","bubble_column"]),eb=t=>t.getProperties().waterlogged===!0||t.getProperties().waterlogged==="true"||Ufe.has(t.name),pY;function gY(t,e,r,i,n=16){let u=[],l={sectionYNumber:e-i.config.worldMinY>>4,chunkKey:ca(t,r),sectionStartY:e,sectionEndY:e+n,sectionStartX:t,sectionEndX:t+16,sectionStartZ:r,sectionEndZ:r+16,sx:t+8,sy:e+8,sz:r+8,positions:[],normals:[],colors:[],uvs:[],t_positions:[],t_normals:[],t_colors:[],t_uvs:[],indices:[],indicesCount:0,using32Array:!0,tiles:{},heads:{},signs:{},banners:{},hadErrors:!1,blocksCount:0},c=new Qe(0,0,0);for(c.y=e;c.y<e+n;c.y++)for(c.z=r;c.z<r+16;c.z++)for(c.x=t;c.x<t+16;c.x++){let p=i.getBlock(c,gi,l);if(la.has(p.name))continue;if((p.name.includes("_sign")||p.name==="sign")&&!i.config.disableBlockEntityTextures){let v=`${c.x},${c.y},${c.z}`,w=p.getProperties(),k={north:2,south:0,west:1,east:3},x=p.name.endsWith("wall_sign")||p.name.endsWith("wall_hanging_sign"),S=p.name.endsWith("hanging_sign");l.signs[v]={isWall:x,isHanging:S,rotation:x?k[w.facing]:+w.rotation}}else if(p.name==="player_head"||p.name==="player_wall_head"){let v=`${c.x},${c.y},${c.z}`,w=p.getProperties(),k={north:0,south:2,west:3,east:1},x=p.name==="player_wall_head";l.heads[v]={isWall:x,rotation:x?k[w.facing]:+w.rotation}}else if(p.name.includes("_banner")&&!i.config.disableBlockEntityTextures){let v=`${c.x},${c.y},${c.z}`,w=p.getProperties(),k={north:2,south:0,west:1,east:3},x=p.name.endsWith("_wall_banner");l.banners[v]={isWall:x,blockName:p.name,rotation:x?k[w.facing]:w.rotation===void 0?0:+w.rotation}}let y=p.biome.name;if(i.preflat){let v=Rfe(p,i,c);v?(p._originalProperties??=p._properties,p._properties={...p._originalProperties,...v},p.models&&JSON.stringify(p._originalProperties)!==JSON.stringify(p._properties)&&(p.models=void 0,p=i.getBlock(c,gi,l))):(p._properties=p._originalProperties??p._properties,p._originalProperties=void 0)}let g=eb(p);if(p.name==="water"||g){let v=c.clone();u.push(()=>{fY(i,v,gi.getTextureInfo("water_still"),p.type,y,!0,l,!g)}),l.blocksCount++}else p.name==="lava"&&(fY(i,c,gi.getTextureInfo("lava_still"),p.type,y,!1,l,!1),l.blocksCount++);if(p.name!=="water"&&p.name!=="lava"&&!la.has(p.name)){let{models:v}=p;sr(`[TS] Processing block at (${c.x}, ${c.y}, ${c.z}), name=${p.name}, stateId=${p.stateId}`),v??=pY;let w=i.config.debugModelVariant?.[0],k=0;for(let x of v??[]){let S=c.clone(),E=i.config.debugModelVariant?.[k]??w??0;k++;let I=x[E]??x[0];if(!I)continue;let N=null,O=null;for(let T of["x","y","z"])T in I&&(N=N?Qy(N,hh(T,-(I[T]??0))):hh(T,-(I[T]??0)));N&&(O=[8,8,8],O=ph(O,Xr(N,O)));for(let T of I.elements??[]){let R=I.ao??p.boundingBox!=="empty";if(p.transparent){let J=c.clone();u.push(()=>{dY(i,J,T,R,l,N,O,p,y)})}else dY(i,c,T,R,l,N,O,p,y)}}k>0&&l.blocksCount++}}for(let p of u)p();u=[];let d=l.positions.length/3;for(let p=0;p<l.t_positions.length/12;p++)l.indices[l.indicesCount++]=d,l.indices[l.indicesCount++]=d+1,l.indices[l.indicesCount++]=d+2,l.indices[l.indicesCount++]=d+2,l.indices[l.indicesCount++]=d+1,l.indices[l.indicesCount++]=d+3,l.indices[l.indicesCount++]=d,l.indices[l.indicesCount++]=d+2,l.indices[l.indicesCount++]=d+1,l.indices[l.indicesCount++]=d+2,l.indices[l.indicesCount++]=d+3,l.indices[l.indicesCount++]=d+1,d+=4;l.positions.push(...l.t_positions),l.normals.push(...l.t_normals),l.colors.push(...l.t_colors),l.uvs.push(...l.t_uvs),delete l.t_positions,delete l.t_normals,delete l.t_colors,delete l.t_uvs,l.positions=new Float32Array(l.positions),l.normals=new Float32Array(l.normals),l.colors=new Float32Array(l.colors),l.uvs=new Float32Array(l.uvs),l.using32Array=Jfe(l.indices),l.using32Array?l.indices=new Uint32Array(l.indices):l.indices=new Uint16Array(l.indices),sr("[TS] Final geometry summary:"),sr(`[TS] Total vertices: ${l.positions.length/3}`),sr(`[TS] Total triangles: ${l.indices.length/3}`);let h=Array.from(l.positions),m=Array.from(l.indices);return sr(`[TS] Positions: [${h.slice(0,12).join(",")}...] (first 4 vertices)`),sr(`[TS] Indices: [${m.slice(0,12).join(",")}...] (first 2 faces)`),pi&&(delete l.positions,delete l.normals,delete l.colors,delete l.uvs),l}function Jfe(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}var mY=(t,e,r=!1,i=!0,n="latest")=>{gi=Yy(t,e,n),globalThis.blockProvider=gi,i&&(pY=gi.getAllResolvedModels0_1({name:"unknown",properties:{}})),pi=r};globalThis.structuredClone??=t=>JSON.parse(JSON.stringify(t));if(globalThis.module&&module.require){let t=module.require,{parentPort:e}=t("worker_threads");global.self=e,global.postMessage=(r,i)=>{e.postMessage(r,i)},global.performance=t("perf_hooks").performance}var Pl=0,Je,mi=new Map,rb=!1;function Wfe(t,e,r){return`${t},${e},${r}`}var _Y=100,io=[],tb=!1,ao=(t,e=[])=>{io.push({data:t,transferList:e}),io.length>_Y&&yY(0,_Y),!tb&&(tb=!0,setTimeout(()=>{tb=!1,yY(0,io.length)}))};function yY(t,e){let r=io.slice(t,e);global.postMessage(r.map(i=>i.data),r.flatMap(i=>i.transferList)),io=io.slice(e)}function Hfe(t,e=!0){let r=Math.floor(t.x/16)*16,i=Math.floor(t.y/16)*16,n=Math.floor(t.z/16)*16,u=Wfe(r,i,n);if(!e){mi.delete(u),ao({type:"sectionFinished",key:u,workerIndex:Pl});return}Je.getColumn(r,n)?.getSection(t)?mi.set(u,(mi.get(u)||0)+1):ao({type:"sectionFinished",key:u,workerIndex:Pl})}var Gfe=()=>{Je=new Il(Je.config.version),globalThis.world=Je},bY=t=>{let e=globalThis;switch(t.type==="mcData"&&(e.mcData=t.mcData,e.loadedData=t.mcData),t.config&&(t.type==="mesherData"&&Je&&(Je.blockCache={},Je.erroredBlockModel=void 0),Je??=new Il(t.config.version),Je.config={...Je.config,...t.config},globalThis.world=Je,globalThis.Vec3=Qe),t.type){case"mesherData":{mY(t.blockstatesModels,t.blocksAtlas,t.config.outputFormat==="webgpu"),rb=!0,Pl=t.workerIndex;break}case"dirty":{let r=new Qe(t.x,t.y,t.z);Hfe(r,t.value);break}case"chunk":{if(Je.addColumn(t.x,t.z,t.chunk),t.customBlockModels){let r=`${t.x},${t.z}`;Je.customBlockModels.set(r,t.customBlockModels)}break}case"unloadChunk":{Je.removeColumn(t.x,t.z),Je.customBlockModels.delete(`${t.x},${t.z}`),Object.keys(Je.columns).length===0&&Gfe();break}case"blockUpdate":{let r=new Qe(t.pos.x,t.pos.y,t.pos.z).floored();t.stateId!==void 0&&t.stateId!==null&&Je?.setBlockStateId(r,t.stateId);let i=`${Math.floor(r.x/16)*16},${Math.floor(r.z/16)*16}`;t.customBlockModels&&Je?.customBlockModels.set(i,t.customBlockModels);break}case"reset":{Je=void 0,mi=new Map,e.mcData=null,e.loadedData=null,rb=!1;break}case"getCustomBlockModel":{let r=new Qe(t.pos.x,t.pos.y,t.pos.z),i=`${Math.floor(r.x/16)*16},${Math.floor(r.z/16)*16}`,n=Je.customBlockModels.get(i)?.[`${r.x},${r.y},${r.z}`];global.postMessage({type:"customBlockModel",chunkKey:i,customBlockModel:n});break}case"getHeightmap":{let r=new Uint8Array(256),i=new Qe(0,0,0);for(let n=0;n<16;n++)for(let u=0;u<16;u++){let l=u+t.x,c=n+t.z;i.x=l,i.z=c,i.y=Je.config.worldMaxY;let d=Je.getBlock(i);for(;d&&la.has(d.name)&&i.y>Je.config.worldMinY;)i.y-=1,d=Je.getBlock(i);let h=n*16+u;r[h]=d?i.y:0}ao({type:"heightmap",key:`${Math.floor(t.x/16)},${Math.floor(t.z/16)}`,heightmap:r});break}}};self.onmessage=({data:t})=>{if(Array.isArray(t)){t.forEach(bY);return}bY(t)};setInterval(()=>{if(!(Je===null||!rb)&&mi.size!==0){for(let t of mi.keys()){let[e,r,i]=t.split(",").map(c=>parseInt(c,10)),n=Je.getColumn(e,i),u=0;if(n?.getSection(new Qe(e,r,i))){let c=performance.now(),d=gY(e,r,i,Je),h=[d.positions?.buffer,d.normals?.buffer,d.colors?.buffer,d.uvs?.buffer].filter(Boolean);ao({type:"geometry",key:t,geometry:d,workerIndex:Pl},h),u=performance.now()-c}let l=mi.get(t);if(!l)throw new Error("dirtySections.get(key) is falsy");for(let c=0;c<l;c++)ao({type:"sectionFinished",key:t,workerIndex:Pl,processTime:u}),u=0;mi.delete(t)}if(Je.blockStateModelInfo.size>0){let t={};for(let[e,r]of Je.blockStateModelInfo)Je.sentBlockStateModels.has(e)||(t[e]=r,Je.sentBlockStateModels.add(e));Object.keys(t).length>0&&ao({type:"blockStateModelInfo",info:t})}}},50);})();
|
|
226
|
+
`):c)})},get signText(){return this.getSignText()[0]},set signText(c){this.setSignText(c)}}}}});var Ut=f((fwt,ty)=>{a();o();s();ty.exports=nce;ty.exports.testedVersions=["1.8.8","1.9.4","1.10.2","1.11.2","1.12.2","1.13.2","1.14.4","1.15.2","1.16.4","1.17.1","1.18.1","bedrock_1.17.10","bedrock_1.18.0","1.20"];var vd=vr(),BW=pd(),tce=Object.entries(BW.legacy.pc.blocks).reduce((t,[e,r])=>{let i=r.replace("minecraft:","").split("[")[0],n=r.split("[")[1]?.replace("]","")??"";return(t[i]=t[i]||{})[n]=e,t},{}),kd=Object.entries(BW.legacy.pc.blocks).reduce((t,[e,r])=>{let i=r.split("[")[1]?.replace("]","");return t[e]=i?Object.fromEntries(i.split(",").map(n=>{let[u,l]=n.split("=");return isNaN(parseInt(l))||(l=parseInt(l)),[u,l]})):{},t},{});function rce(t){if(typeof t=="object")return t;let e={};for(let r of t.split(",")){let[i,n]=r.split("=");e[i]=n}return e}function ey(t,e){if(!e)return!0;e=rce(e);let r=t.getProperties();if(e.OR)return e.OR.some(i=>ey(t,i));for(let i in r){if(e[i]===void 0)continue;if(!(typeof e[i]!="string"?String(e[i]):e[i]).split("|").some(u=>u===String(r[i])))return!1}return!0}function nce(t){let e=typeof t=="string"?el()(t):t,r=e.version;return ace(e,{Biome:tl()(r.minecraftVersion),version:r})}var ice=[[0,0,0,1,1,1]];function ace(t,{Biome:e,version:r}){let i=IW()(t),n=r.type==="pc"&&t.supportFeature("blockStateId")||r.type==="bedrock",u=t.blockCollisionShapes;if(u)for(let y in t.blocks){let g=t.blocks[y],v=u.blocks[g.name];if(g.shapes=v instanceof Array?u.shapes[v[0]]:u.shapes[v],g.shapes||(console.error("No shape found for block "+g.name),g.shapes=[]),g.states||r.type==="bedrock"){if(v instanceof Array){g.stateShapes=[];for(let w in v)g.stateShapes.push(u.shapes[v[w]])}}else if("variations"in g)for(let w in g.variations){let k=g.variations[w].metadata;v instanceof Array?g.variations[w].shapes=u.shapes[v[k]]:g.variations[w].shapes=u.shapes[v]}!g.shapes&&r.type==="bedrock"&&(g.shapes=u.shapes[u.blocks.stone[0]],g.stateShapes=g.shapes)}function l(y,g){let v=t.effectsByName[y];if(!v)return 0;let w=g[v.id];return w?w.amplifier+1:0}function c(y,g){let v=t.enchantmentsByName[y];if(!v)return 0;for(let w of g)if(typeof w.name=="string"){if(w.name.includes(y))return w.lvl}else if(w.name===v.name)return w.lvl;return 0}function d(y){switch(y){case 0:return 1;case 1:return .3;case 2:return .09;case 3:return .0027;default:return 81e-5}}return class Sn{get interactionShapes(){let v=(()=>{let w=globalThis.interactionShapes?.[this.name];if(!w)return this.shapes?.length===0?ice[0].map(k=>k*16):[];if(!Array.isArray(w)){if(w.combine){let x=[];return Object.entries(w.combine).forEach(([S,V])=>{ey(this,S)&&x.push(V)}),x}let k;for(let[x,S]of Object.entries(w))if(ey(this,x)){k=S;break}return k??[]}return w})();return typeof v[0]=="number"?[v.map(w=>w/16)]:v.map(w=>w.map(k=>k/16))??[]}set interactionShapes(g){}constructor(g,v,w,k){if(this.type=g,this.metadata=w??0,this.light=0,this.skyLight=0,this.biome=new e(v),this.position=null,this.entity=void 0,this.stateId=k,this.computedStates={},k===void 0&&g!==void 0){let S=t.blocks[g];this.stateId=S===void 0?null:Math.min(S.minStateId+w,S.maxStateId)}let x=t.blocksByStateId[this.stateId];if(x){if(this.metadata=this.stateId-x.minStateId,this.type=x.id,this.name=x.name,this.hardness=x.hardness,this.displayName=x.displayName,this.shapes=x.shapes,this.interactionShapes=x.interactionShapes,x.stateShapes)x.stateShapes[this.metadata]!==void 0?this.shapes=x.stateShapes[this.metadata]:(this.shapes=x.stateShapes[0],this.missingStateShape=!0);else if(x.variations){let S=x.variations;for(let V in S)S[V].metadata===w&&(this.displayName=S[V].displayName,this.shapes=S[V].shapes)}this.boundingBox=x.boundingBox,this.transparent=x.transparent,this.diggable=x.diggable,this.material=x.material,this.harvestTools=x.harvestTools,this.drops=x.drops}else this.name="",this.displayName="",this.shapes=[],this.hardness=0,this.boundingBox="empty",this.transparent=!0,this.diggable=!1;if(this._properties={},r.type==="pc")if(n){let S=t.blocksByStateId[this.stateId];if(S&&S.states){let V=this.metadata;for(let E=S.states.length-1;E>=0;E--){let I=S.states[E];this._properties[I.name]=p(I,V%I.num_values),V=Math.floor(V/I.num_values)}}}else{if(this._properties=kd[this.type+":"+this.metadata]||kd[this.type+":0"]||{},!this._properties)for(let S=0;S<15&&(this._properties=kd[this.type+":"+S],!this._properties);S++);this._properties??={}}else if(r.type==="bedrock"){let S=t.blockStates?.[this.stateId]?.states||{};for(let V in S)this._properties[V]=S[V].value}else throw new Error("Unknown registry type: "+r.type);this.isWaterlogged=this._properties.waterlogged,this.name.includes("sign")&&sce(this,i.sign),x&&t.supportFeature("blockHashes")&&(this.hash=Sn.getHash(this.name,this._properties))}static fromStateId(g,v){return n?new Sn(void 0,v,0,g):new Sn(g>>4,v,g&15,g)}static fromProperties(g,v,w){let k=typeof g=="string"?t.blocksByName[g]:t.blocks[g];if(!k)throw new Error("No matching block id found for "+g+" with properties "+JSON.stringify(v));if(r.type==="pc")if(k.states){let x=0;for(let[S,V]of Object.entries(v))x+=m(k.states,S,V);return new Sn(void 0,w,0,k.minStateId+x)}else{let x=tce[k.name];for(let S in x){let V;for(let[E,I]of Object.entries(v)){let N=E+"="+I;if(!S.includes(N)){V=!0;break}}if(!V){let[E,I]=x[S].split(":").map(Number);return new Sn(E,w,I)}}throw new Error("No matching block state found for "+k.name+" with properties "+JSON.stringify(v))}else if(r.type==="bedrock"){for(let x=k.minStateId;x<=k.maxStateId;x++){let S=t.blockStates[x].states;if(!Object.entries(v).find(([V,E])=>S[V]?.value!==E))return new Sn(void 0,w,0,x)}return k}}static fromString(g,v){g.startsWith("minecraft:")&&(g=g.substring(10));let w=g.split("[",1)[0],k=g.slice(w.length+1,-1).split(",");return g.includes('["')?Sn.fromProperties(w,Object.fromEntries(k.map(x=>{let[S,V]=x.split(":");return[S.slice(1,-1),V.startsWith('"')?V.slice(1,-1):{true:1,false:0}[V]??parseInt(V)]})),v):Sn.fromProperties(w,Object.fromEntries(k.map(x=>x.split("="))),v)}get blockEntity(){return this.entity?vd.simplify(this.entity):void 0}getProperties(){return Object.assign(this._properties,this.computedStates)}changeProperties(g){if(n)throw new Error("Not implemented");{let v=Object.assign({},this._properties,Object.fromEntries(Object.entries(g).map(([V,E])=>typeof E=="boolean"?[V,`${E}`]:[V,E]))),w=V=>Object.entries(V).map(([E,I])=>E+"="+I).join(","),k=w(v),x,S=Object.entries(kd).find(([V,E])=>{if(+V.split(":")[0]===this.type)x=E;else return!1;return w(E)===k});if(!S)throw new Error("No matching block state found for "+this.name+" with properties "+JSON.stringify(g)+" last found state: "+JSON.stringify(x));return+S[0].split(":")[1]}}static getHash(g,v){if(t.supportFeature("blockHashes")){let w={};for(let S of Object.keys(v).sort())w[S]=v[S];let k=vd.comp({name:{type:"string",value:g.includes(":")?g:`minecraft:${g}`},states:vd.comp(w)}),x=vd.writeUncompressed(k,"little");return oce(x)}}canHarvest(g){return this.harvestTools?g&&this.harvestTools&&this.harvestTools[g]:!0}digTime(g,v,w,k,x=[],S={}){if(v)return 0;let V=t.materials[this.material],E=g&&V&&V[g],I=1;E&&(I=V[g]);let N=c("efficiency",x);N>0&&I>1&&(I+=N*N+1);let O=Math.max(l("Haste",S),l("ConduitPower",S));O>0&&(I*=1+.2*O);let T=l("MiningFatigue",S);T>0&&(I*=d(T));let R=c("aqua_affinity",x);w&&R===0&&(I/=5),k&&(I/=5);let J=this.hardness,re=this.canHarvest(g)?30:100,se=I/J/re;return J===-1&&(se=0),se===0?1/0:se>=1?0:Math.ceil(1/se)*50}};function h(y,g){if(g.type==="enum")return g.values.indexOf(y);if(g.type==="bool"){if(y===!0||y==="true")return 0;if(y===!1||y==="false")return 1}return g.type==="int"?y:g.values?.indexOf(y.toString())??0}function m(y,g,v){let w=1;for(let k=y.length-1;k>=0;k--){let x=y[k];if(x.name===g)return w*h(v,x);w*=x.num_values}return 0}function p(y,g){return y.type==="enum"||y.values?y.values[g]:y.type==="bool"?!g:g}}function sce(t,e){Object.defineProperties(t,Object.getOwnPropertyDescriptors(e))}function oce(t){let r=2166136261;for(let i=0;i<t.length;i++)r^=t[i]&255,r+=(r<<1)+(r<<4)+(r<<7)+(r<<8)+(r<<24);return r&4294967295}});var AW=f((gwt,jW)=>{a();o();s();var uce=sn(),Gi=Dw(),lce=wa().Vec3,NW=256,ry=256,{w:gt,l:bt,sh:Wt}=Gi,Ht=ry>>4;jW.exports=t=>{let e=Ut()(t);return class LW extends uce{static get section(){return Gi}static get w(){return gt}static get l(){return bt}static get h(){return ry}static get version(){return t.version}constructor(){super(t),this.skyLightSent=!0,this.minY=0,this.worldHeight=ry,this.sections=new Array(Ht);for(let i=0;i<Ht;i++)this.sections[i]=new Gi;this.biome=Buffer.alloc(NW)}toJson(){return JSON.stringify({skyLightSent:this.skyLightSent,biome:this.biome.toJSON(),blockEntities:this.blockEntities,sections:this.sections.map(i=>i.toJson())})}static fromJson(i){let n=JSON.parse(i),u=new LW;return u.skyLightSent=n.skyLightSent,u.biome=Buffer.from(n.biome),u.blockEntities=n.blockEntities,u.sections=n.sections.map(l=>Gi.fromJson(l)),u}initialize(i){let n=0;for(let u=0;u<Ht;u++)this.sections[u].initialize((l,c,d,h)=>{let m=i(l,c%Wt,d,h);if(m!=null)return c===0&&Ht===0&&(this.biome.writeUInt8(m.biome.id||0,n),n++),m})}getBlock(i){let n=new e(this.getBlockType(i),this.getBiome(i),this.getBlockData(i));return n.light=this.getBlockLight(i),n.skyLight=this.getSkyLight(i),n.entity=this.getBlockEntity(i),n}setBlock(i,n){il(n.type)&&this.setBlockType(i,n.type),il(n.metadata)&&this.setBlockData(i,n.metadata),il(n.biome)&&this.setBiome(i,n.biome.id),il(n.skyLight)&&this.skyLightSent&&this.setSkyLight(i,n.skyLight),il(n.light)&&this.setBlockLight(i,n.light),n.entity?this.setBlockEntity(i,n.entity):this.removeBlockEntity(i)}_getSection(i){return this.sections[i.y>>4]}getBlockStateId(i){let n=this._getSection(i);return n?n.getBlockStateId(si(i)):0}getBlockType(i){let n=this._getSection(i);return n?n.getBlockType(si(i)):0}getBlockData(i){let n=this._getSection(i);return n?n.getBlockData(si(i)):0}getBlockLight(i){let n=this._getSection(i);return n?n.getBlockLight(si(i)):0}getSkyLight(i){if(!this.skyLightSent)return 0;let n=this._getSection(i);return n?n.getSkyLight(si(i)):15}getBiome(i){let n=PW(i);return this.biome.readUInt8(n)}setBlockStateId(i,n){let u=this._getSection(i);return u&&u.setBlockStateId(si(i),n)}setBlockType(i,n){let u=this.getBlockData(i);this.setBlockStateId(i,n<<4|u)}setBlockData(i,n){let u=this.getBlockType(i);this.setBlockStateId(i,u<<4|n)}setBlockLight(i,n){let u=this._getSection(i);return u&&u.setBlockLight(si(i),n)}setSkyLight(i,n){let u=this._getSection(i);return u&&u.setSkyLight(si(i),n)}setBiome(i,n){let u=PW(i);this.biome.writeUInt8(n,u)}dumpBiomes(){}dumpLight(){}loadLight(){}dumpLightNew(){return{sections:this.sections.map(i=>i.toJson())}}loadLightNew(i){this.sections=i.sections.map(n=>Gi.fromJson(n))}loadBiomes(){}dump(i=65535,n=!0){let u=Gi.sectionSize(this.skyLightSent&&n),{chunkIncluded:l,chunkCount:c}=TW(i),d=c*u+NW,h=Buffer.alloc(d),m=0,p=gt*bt*Ht*c*2,y=this.skyLightSent&&n?gt*bt*Ht*c/2*5:void 0;for(let g=0;g<Ht;g++)l[g]&&(m+=this.sections[g].dump().copy(h,m,0,gt*bt*Wt*2),p+=this.sections[g].dump().copy(h,p,gt*bt*Wt*2,gt*bt*Wt*2+gt*bt*Wt/2),this.skyLightSent&&n&&(y+=this.sections[g].dump().copy(h,y,gt*bt*Wt/2*5,gt*bt*Wt/2*5+gt*bt*Wt/2)));return this.biome.copy(h,gt*bt*Ht*c*(this.skyLightSent&&n?3:5/2)),h}load(i,n=65535,u=!0,l=!0){if(!Buffer.isBuffer(i))throw new Error("Data must be a buffer");this.skyLightSent=u;let c=Gi.sectionSize(u),{chunkIncluded:d,chunkCount:h}=TW(n),m=0,p=gt*bt*Ht*h*2,y=this.skyLightSent?gt*bt*Ht*h/2*5:void 0;for(let v=0;v<Ht;v++)if(d[v]){let w=Buffer.alloc(c);m+=i.copy(w,0,m,m+gt*bt*Wt*2),p+=i.copy(w,gt*bt*Wt*2,p,p+gt*bt*Wt/2),this.skyLightSent&&(y+=i.copy(w,gt*bt*Wt*5/2,y,y+gt*bt*Wt/2)),this.sections[v].load(w,u)}l&&i.copy(this.biome,0,gt*bt*Ht*h*(u?3:5/2));let g=c*h+(l?gt*bt:0);if(i.length!==g)throw new Error(`Data buffer not correct size (was ${i.length}, expected ${g})`)}getMask(){return 65535}}};var il=function(t){return t!==void 0},PW=function(t){return t.z*gt+t.x};function si(t){return t.modulus(new lce(gt,bt,Wt))}function TW(t){let e=new Array(Ht),r=0;for(let i=0;i<Ht;++i)e[i]=t&1<<i,e[i]&&r++;return{chunkIncluded:e,chunkCount:r}}});var qt=f((bwt,OW)=>{a();o();s();OW.exports={CHUNK_HEIGHT:256,CHUNK_WIDTH:16,SECTION_HEIGHT:16,SECTION_WIDTH:16,BLOCK_SECTION_VOLUME:4096,NUM_SECTIONS:16,MIN_BITS_PER_BLOCK:4,MAX_BITS_PER_BLOCK:8,GLOBAL_BITS_PER_BLOCK:16,BIOME_SECTION_VOLUME:64,MIN_BITS_PER_BIOME:1,MAX_BITS_PER_BIOME:3,GLOBAL_BITS_PER_BIOME:6}});var RW=f(qn=>{"use strict";a();o();s();Object.defineProperty(qn,"__esModule",{value:!0});var CW=(_r(),Bt(Ar)),Yi={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};qn.ERRORS=Yi;function cce(t){if(!CW.Buffer.isEncoding(t))throw new Error(Yi.INVALID_ENCODING)}qn.checkEncoding=cce;function MW(t){return typeof t=="number"&&isFinite(t)&&pce(t)}qn.isFiniteInteger=MW;function $W(t,e){if(typeof t=="number"){if(!MW(t)||t<0)throw new Error(e?Yi.INVALID_OFFSET:Yi.INVALID_LENGTH)}else throw new Error(e?Yi.INVALID_OFFSET_NON_NUMBER:Yi.INVALID_LENGTH_NON_NUMBER)}function fce(t){$W(t,!1)}qn.checkLengthValue=fce;function dce(t){$W(t,!0)}qn.checkOffsetValue=dce;function hce(t,e){if(t<0||t>e.length)throw new Error(Yi.INVALID_TARGET_OFFSET)}qn.checkTargetOffset=hce;function pce(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}function gce(t){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof CW.Buffer.prototype[t]>"u")throw new Error(`Platform does not support Buffer.prototype.${t}.`)}qn.bigIntAndBufferInt64Check=gce});var oi=f(iy=>{"use strict";a();o();s();Object.defineProperty(iy,"__esModule",{value:!0});var Be=RW(),zW=4096,mce="utf8",ny=class t{constructor(e){if(this.length=0,this._encoding=mce,this._writeOffset=0,this._readOffset=0,t.isSmartBufferOptions(e))if(e.encoding&&(Be.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(Be.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(Be.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(e.buff)if(Buffer.isBuffer(e.buff))this._buff=e.buff,this.length=e.buff.length;else throw new Error(Be.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(zW);else{if(typeof e<"u")throw new Error(Be.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(zW)}}static fromSize(e,r){return new this({size:e,encoding:r})}static fromBuffer(e,r){return new this({buff:e,encoding:r})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let r=e;return r&&(r.encoding!==void 0||r.size!==void 0||r.buff!==void 0)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffer.prototype.readInt32BE,4,e)}readInt32LE(e){return this._readNumberValue(Buffer.prototype.readInt32LE,4,e)}readBigInt64BE(e){return Be.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){return Be.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,e)}writeInt8(e,r){return this._writeNumberValue(Buffer.prototype.writeInt8,1,e,r),this}insertInt8(e,r){return this._insertNumberValue(Buffer.prototype.writeInt8,1,e,r)}writeInt16BE(e,r){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,e,r)}insertInt16BE(e,r){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,e,r)}writeInt16LE(e,r){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,e,r)}insertInt16LE(e,r){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,e,r)}writeInt32BE(e,r){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,e,r)}insertInt32BE(e,r){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,e,r)}writeInt32LE(e,r){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,e,r)}insertInt32LE(e,r){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,e,r)}writeBigInt64BE(e,r){return Be.bigIntAndBufferInt64Check("writeBigInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,e,r)}insertBigInt64BE(e,r){return Be.bigIntAndBufferInt64Check("writeBigInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,e,r)}writeBigInt64LE(e,r){return Be.bigIntAndBufferInt64Check("writeBigInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,e,r)}insertBigInt64LE(e,r){return Be.bigIntAndBufferInt64Check("writeBigInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,e,r)}readUInt8(e){return this._readNumberValue(Buffer.prototype.readUInt8,1,e)}readUInt16BE(e){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,e)}readUInt16LE(e){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,e)}readUInt32BE(e){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,e)}readUInt32LE(e){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,e)}readBigUInt64BE(e){return Be.bigIntAndBufferInt64Check("readBigUInt64BE"),this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,e)}readBigUInt64LE(e){return Be.bigIntAndBufferInt64Check("readBigUInt64LE"),this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,e)}writeUInt8(e,r){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,e,r)}insertUInt8(e,r){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,e,r)}writeUInt16BE(e,r){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,e,r)}insertUInt16BE(e,r){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,e,r)}writeUInt16LE(e,r){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,e,r)}insertUInt16LE(e,r){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,e,r)}writeUInt32BE(e,r){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,e,r)}insertUInt32BE(e,r){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,e,r)}writeUInt32LE(e,r){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,e,r)}insertUInt32LE(e,r){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,e,r)}writeBigUInt64BE(e,r){return Be.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,r)}insertBigUInt64BE(e,r){return Be.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,r)}writeBigUInt64LE(e,r){return Be.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,r)}insertBigUInt64LE(e,r){return Be.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,r)}readFloatBE(e){return this._readNumberValue(Buffer.prototype.readFloatBE,4,e)}readFloatLE(e){return this._readNumberValue(Buffer.prototype.readFloatLE,4,e)}writeFloatBE(e,r){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,e,r)}insertFloatBE(e,r){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,e,r)}writeFloatLE(e,r){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,e,r)}insertFloatLE(e,r){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,e,r)}readDoubleBE(e){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,e)}readDoubleLE(e){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,e)}writeDoubleBE(e,r){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,e,r)}insertDoubleBE(e,r){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,e,r)}writeDoubleLE(e,r){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,e,r)}insertDoubleLE(e,r){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,e,r)}readString(e,r){let i;typeof e=="number"?(Be.checkLengthValue(e),i=Math.min(e,this.length-this._readOffset)):(r=e,i=this.length-this._readOffset),typeof r<"u"&&Be.checkEncoding(r);let n=this._buff.slice(this._readOffset,this._readOffset+i).toString(r||this._encoding);return this._readOffset+=i,n}insertString(e,r,i){return Be.checkOffsetValue(r),this._handleString(e,!0,r,i)}writeString(e,r,i){return this._handleString(e,!1,r,i)}readStringNT(e){typeof e<"u"&&Be.checkEncoding(e);let r=this.length;for(let n=this._readOffset;n<this.length;n++)if(this._buff[n]===0){r=n;break}let i=this._buff.slice(this._readOffset,r);return this._readOffset=r+1,i.toString(e||this._encoding)}insertStringNT(e,r,i){return Be.checkOffsetValue(r),this.insertString(e,r,i),this.insertUInt8(0,r+e.length),this}writeStringNT(e,r,i){return this.writeString(e,r,i),this.writeUInt8(0,typeof r=="number"?r+e.length:this.writeOffset),this}readBuffer(e){typeof e<"u"&&Be.checkLengthValue(e);let r=typeof e=="number"?e:this.length,i=Math.min(this.length,this._readOffset+r),n=this._buff.slice(this._readOffset,i);return this._readOffset=i,n}insertBuffer(e,r){return Be.checkOffsetValue(r),this._handleBuffer(e,!0,r)}writeBuffer(e,r){return this._handleBuffer(e,!1,r)}readBufferNT(){let e=this.length;for(let i=this._readOffset;i<this.length;i++)if(this._buff[i]===0){e=i;break}let r=this._buff.slice(this._readOffset,e);return this._readOffset=e+1,r}insertBufferNT(e,r){return Be.checkOffsetValue(r),this.insertBuffer(e,r),this.insertUInt8(0,r+e.length),this}writeBufferNT(e,r){return typeof r<"u"&&Be.checkOffsetValue(r),this.writeBuffer(e,r),this.writeUInt8(0,typeof r=="number"?r+e.length:this._writeOffset),this}clear(){return this._writeOffset=0,this._readOffset=0,this.length=0,this}remaining(){return this.length-this._readOffset}get readOffset(){return this._readOffset}set readOffset(e){Be.checkOffsetValue(e),Be.checkTargetOffset(e,this),this._readOffset=e}get writeOffset(){return this._writeOffset}set writeOffset(e){Be.checkOffsetValue(e),Be.checkTargetOffset(e,this),this._writeOffset=e}get encoding(){return this._encoding}set encoding(e){Be.checkEncoding(e),this._encoding=e}get internalBuffer(){return this._buff}toBuffer(){return this._buff.slice(0,this.length)}toString(e){let r=typeof e=="string"?e:this._encoding;return Be.checkEncoding(r),this._buff.toString(r,0,this.length)}destroy(){return this.clear(),this}_handleString(e,r,i,n){let u=this._writeOffset,l=this._encoding;typeof i=="number"?u=i:typeof i=="string"&&(Be.checkEncoding(i),l=i),typeof n=="string"&&(Be.checkEncoding(n),l=n);let c=Buffer.byteLength(e,l);return r?this.ensureInsertable(c,u):this._ensureWriteable(c,u),this._buff.write(e,u,c,l),r?this._writeOffset+=c:typeof i=="number"?this._writeOffset=Math.max(this._writeOffset,u+c):this._writeOffset+=c,this}_handleBuffer(e,r,i){let n=typeof i=="number"?i:this._writeOffset;return r?this.ensureInsertable(e.length,n):this._ensureWriteable(e.length,n),e.copy(this._buff,n),r?this._writeOffset+=e.length:typeof i=="number"?this._writeOffset=Math.max(this._writeOffset,n+e.length):this._writeOffset+=e.length,this}ensureReadable(e,r){let i=this._readOffset;if(typeof r<"u"&&(Be.checkOffsetValue(r),i=r),i<0||i+e>this.length)throw new Error(Be.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(e,r){Be.checkOffsetValue(r),this._ensureCapacity(this.length+e),r<this.length&&this._buff.copy(this._buff,r+e,r,this._buff.length),r+e>this.length?this.length=r+e:this.length+=e}_ensureWriteable(e,r){let i=typeof r=="number"?r:this._writeOffset;this._ensureCapacity(i+e),i+e>this.length&&(this.length=i+e)}_ensureCapacity(e){let r=this._buff.length;if(e>r){let i=this._buff,n=r*3/2+1;n<e&&(n=e),this._buff=Buffer.allocUnsafe(n),i.copy(this._buff,0,0,r)}}_readNumberValue(e,r,i){this.ensureReadable(r,i);let n=e.call(this._buff,typeof i=="number"?i:this._readOffset);return typeof i>"u"&&(this._readOffset+=r),n}_insertNumberValue(e,r,i,n){return Be.checkOffsetValue(n),this.ensureInsertable(r,n),e.call(this._buff,i,n),this._writeOffset+=r,this}_writeNumberValue(e,r,i,n){if(typeof n=="number"){if(n<0)throw new Error(Be.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);Be.checkOffsetValue(n)}let u=typeof n=="number"?n:this._writeOffset;return this._ensureWriteable(r,u),e.call(this._buff,i,u),typeof n=="number"?this._writeOffset=Math.max(this._writeOffset,u+r):this._writeOffset+=r,this}};iy.SmartBuffer=ny});var Ct=f((Pwt,DW)=>{a();o();s();function _ce(t){return 32-Math.clz32(t)}DW.exports=_ce});var Ki=f((Awt,FW)=>{a();o();s();var yce=Ct(),ay=class t{constructor(e){if(e===null)return;e.data||(e.data=new Uint32Array(Math.ceil(e.capacity*e.bitsPerValue/64)*2));let r=(1<<e.bitsPerValue)-1;this.data=e.data.buffer?new Uint32Array(e.data.buffer):Uint32Array.from(e.data),this.capacity=e.capacity,this.bitsPerValue=e.bitsPerValue,this.valueMask=r}toJson(){return JSON.stringify({data:Array.from(this.data),capacity:this.capacity,bitsPerValue:this.bitsPerValue,valueMask:this.valueMask})}static fromJson(e){return new t(JSON.parse(e))}toArray(){let e=[];for(let r=0;r<this.capacity;r++)e.push(this.get(r));return e}static fromArray(e,r){let i=[],n=0,u=0,l=0;for(;n<e.length;)u|=e[n]<<l,l+=r,l>32&&(i.push(u&4294967295),l-=32,u=e[n]>>>r-l),n++;l>0&&i.push(u);let c=new t(null);return c.data=i,c.capacity=e.length,c.bitsPerValue=r,c.valueMask=(1<<r)-1,c}get(e){let r=e*this.bitsPerValue,i=r>>>5,n=this.data[i],u=r&31,l=n>>>u;if(u+this.bitsPerValue>32){let d=this.data[i+1];l|=d<<32-u}return l&this.valueMask}set(e,r){let i=e*this.bitsPerValue,n=i>>>5,u=i&31;this.data[n]=(this.data[n]&~(this.valueMask<<u)|(r&this.valueMask)<<u)>>>0;let l=u+this.bitsPerValue;l>32&&(this.data[n+1]=(this.data[n+1]&~((1<<l-32)-1)|r>>32-u)>>>0)}resizeTo(e){let r=new t({bitsPerValue:e,capacity:this.capacity});for(let i=0;i<this.capacity;++i){let n=this.get(i);if(yce(n)>e)throw new Error("existing value in BitArray can't fit in new bits per value");r.set(i,n)}return r}length(){return this.data.length/2}readBuffer(e,r=this.data.length){if(r!==this.data.length){this.data=new Uint32Array(r),this.readOffset=r*4;return}for(let i=0;i<this.data.length;i+=2)this.data[i+1]=e.readUInt32BE(),this.data[i]=e.readUInt32BE();return this}writeBuffer(e){for(let r=0;r<this.data.length;r+=2)e.writeUInt32BE(this.data[r+1]),e.writeUInt32BE(this.data[r]);return this}getBitsPerValue(){return this.bitsPerValue}};FW.exports=ay});var ar=f(sy=>{a();o();s();sy.write=(t,e)=>{do{let r=e&127;e>>>=7,e!==0&&(r|=128),t.writeUInt8(r)}while(e!==0)};sy.read=t=>{let e=0,r=0,i;do{i=t.readUInt8();let n=i&127;if(r|=n<<7*e,e++,e>5)throw new Error("varint is too big")}while(i&128);return r}});var JW=f((Fwt,UW)=>{a();o();s();var Qi=Ki(),bce=Ct(),Zi=qt(),xd=ar(),wce=13;function Gs(t){return t.y<<8|t.z<<4|t.x}var oy=class t{constructor(e={}){if(e!==null){if(typeof e.solidBlockCount>"u"&&(e.solidBlockCount=0,e.data))for(let r=0;r<Zi.BLOCK_SECTION_VOLUME;r++)e.data.get(r)!==0&&(e.solidBlockCount+=1);e.data||(e.data=new Qi({bitsPerValue:4,capacity:Zi.BLOCK_SECTION_VOLUME})),e.palette===void 0&&(e.palette=[0]),e.blockLight||(e.blockLight=new Qi({bitsPerValue:4,capacity:Zi.BLOCK_SECTION_VOLUME})),e.skyLight===void 0&&(e.skyLight=new Qi({bitsPerValue:4,capacity:Zi.BLOCK_SECTION_VOLUME})),this.data=e.data,this.palette=e.palette,this.isDirty=!1,this.blockLight=e.blockLight,this.skyLight=e.skyLight,this.solidBlockCount=e.solidBlockCount,this.maxBitsPerBlock=e.maxBitsPerBlock||wce}}toJson(){return JSON.stringify({data:this.data.toJson(),palette:this.palette,isDirty:this.isDirty,blockLight:this.blockLight.toJson(),skyLight:this.skyLight?this.skyLight.toJson():this.skyLight,solidBlockCount:this.solidBlockCount})}static fromJson(e){let r=JSON.parse(e);return new t({data:Qi.fromJson(r.data),palette:r.palette,blockLight:Qi.fromJson(r.blockLight),skyLight:r.skyLight?Qi.fromJson(r.skyLight):r.skyLight,solidBlockCount:r.solidBlockCount})}getBlock(e){let r=this.data.get(Gs(e));return this.palette!==null&&(r=this.palette[r]),r}setBlock(e,r){let i=Gs(e),n;if(this.palette!==null){let l=this.palette.indexOf(r);if(l>=0)n=l;else{this.palette.push(r),n=this.palette.length-1;let c=bce(n);if(c>this.data.getBitsPerValue())if(c<=Zi.MAX_BITS_PER_BLOCK)this.data=this.data.resizeTo(c);else{let d=new Qi({bitsPerValue:this.maxBitsPerBlock,capacity:Zi.BLOCK_SECTION_VOLUME});for(let h=0;h<Zi.BLOCK_SECTION_VOLUME;h++){let m=this.palette[this.data.get(h)];d.set(h,m)}this.palette=null,n=r,this.data=d}}}else n=r;let u=this.getBlock(e);r===0&&u!==0?this.solidBlockCount-=1:r!==0&&u===0&&(this.solidBlockCount+=1),this.data.set(i,n)}getBlockLight(e){return this.blockLight.get(Gs(e))}getSkyLight(e){return this.skyLight?this.skyLight.get(Gs(e)):0}setBlockLight(e,r){return this.blockLight.set(Gs(e),r)}setSkyLight(e,r){return this.skyLight?this.skyLight.set(Gs(e),r):0}isEmpty(){return this.solidBlockCount===0}write(e){e.writeUInt8(this.data.getBitsPerValue()),this.palette!==null?(xd.write(e,this.palette.length),this.palette.forEach(r=>{xd.write(e,r)})):xd.write(e,0),xd.write(e,this.data.length()),this.data.writeBuffer(e),this.blockLight.writeBuffer(e),this.skyLight!==null&&this.skyLight.writeBuffer(e)}};UW.exports=oy});var KW=f((Hwt,YW)=>{a();o();s();var WW=oi().SmartBuffer,Sd=JW(),Ir=qt(),al=Ki(),qd=ar(),vce=sn(),kce=Ct(),sl=t=>t!==void 0;YW.exports=(t,e)=>class GW extends vce{static get section(){return Sd}constructor(){super(e),this.sectionMask=0,this.skyLightSent=!0,this.sections=Array(Ir.NUM_SECTIONS).fill(null),this.biomes=Array(Ir.SECTION_WIDTH*Ir.SECTION_WIDTH).fill(1),this.maxBitsPerBlock=kce(Object.values(e.blocks).reduce((i,n)=>Math.max(i,n.maxStateId),0))}toJson(){return JSON.stringify({biomes:this.biomes,blockEntities:this.blockEntities,sectionMask:this.sectionMask,sections:this.sections.map(i=>i===null?null:i.toJson())})}static fromJson(i){let n=JSON.parse(i),u=new GW;return u.biomes=n.biomes,u.blockEntities=n.blockEntities,u.sectionMask=n.sectionMask,u.sections=n.sections.map(l=>l===null?null:Sd.fromJson(l)),u}initialize(i){let n={x:0,y:0,z:0};for(n.y=0;n.y<Ir.CHUNK_HEIGHT;n.y++)for(n.z=0;n.z<Ir.SECTION_WIDTH;n.z++)for(n.x=0;n.x<Ir.SECTION_WIDTH;n.x++){let u=i(n.x,n.y,n.z);u!==null&&this.setBlock(n,u)}}getBlock(i){let n=new t(this.getBlockType(i),this.getBiome(i),this.getBlockData(i));return n.light=this.getBlockLight(i),n.skyLight=this.getSkyLight(i),n.entity=this.getBlockEntity(i),n}setBlock(i,n){sl(n.type)&&this.setBlockType(i,n.type),sl(n.metadata)&&this.setBlockData(i,n.metadata),sl(n.biome)&&this.setBiome(i,n.biome.id),sl(n.skyLight)&&this.skyLightSent&&this.setSkyLight(i,n.skyLight),sl(n.light)&&this.setBlockLight(i,n.light),n.entity?this.setBlockEntity(i,n.entity):this.removeBlockEntity(i)}getBlockType(i){return this.getBlockStateId(i)>>4}getBlockData(i){return this.getBlockStateId(i)&15}getBlockStateId(i){let n=this.sections[i.y>>4];return n?n.getBlock(Ys(i)):0}getBlockLight(i){let n=this.sections[i.y>>4];return n?n.getBlockLight(Ys(i)):15}getSkyLight(i){let n=this.sections[i.y>>4];return n?n.getSkyLight(Ys(i)):15}getBiome(i){return this.biomes[HW(i)]}setBlockType(i,n){let u=this.getBlockData(i);this.setBlockStateId(i,n<<4|u)}setBlockData(i,n){let u=this.getBlockType(i);this.setBlockStateId(i,u<<4|n)}setBlockStateId(i,n){let u=i.y>>4;if(u<0||u>=16)return;let l=this.sections[u];if(!l){if(n===0)return;l=new Sd({maxBitsPerBlock:this.maxBitsPerBlock}),this.sectionMask|=1<<u,this.sections[u]=l}l.setBlock(Ys(i),n)}setBlockLight(i,n){let u=this.sections[i.y>>4];return u&&u.setBlockLight(Ys(i),n)}setSkyLight(i,n){let u=this.sections[i.y>>4];return u&&u.setSkyLight(Ys(i),n)}setBiome(i,n){this.biomes[HW(i)]=n}getMask(){return this.sectionMask}dumpBiomes(){}dumpLight(){}loadLight(){}dumpLightNew(){return{skyLightSections:this.sections.map(i=>i===null?null:i.skyLight.toJson()),blockLightSections:this.sections.map(i=>i===null?null:i.blockLight.toJson()),skyLightMask:0,blockLightMask:0,emptySkyLightMask:0,emptyBlockLightMask:0}}loadLightNew(i){let{skyLightSections:n,blockLightSections:u}=i;n.forEach((l,c)=>{this.sections[c]!==null&&(this.sections[c].skyLight=al.fromJson(l))}),u.forEach((l,c)=>{this.sections[c]!==null&&(this.sections[c].blockLight=al.fromJson(l))})}loadBiomes(){}dump(){let i=new WW;return this.sections.forEach((n,u)=>{n!==null&&!n.isEmpty()&&n.write(i)}),this.biomes.forEach(n=>{i.writeUInt8(n)}),i.length?i.toBuffer():Buffer.alloc(4096)}load(i,n=65535,u=!0,l=!0){let c=WW.fromBuffer(i);this.skyLightSent=u,this.sectionMask|=n;for(let d=0;d<Ir.NUM_SECTIONS;++d){if(!(n>>d&1))continue;let h,m,p=c.readUInt8();if(p<=Ir.MAX_BITS_PER_BLOCK){h=[];let w=qd.read(c);for(let k=0;k<w;++k)h.push(qd.read(c))}else qd.read(c),h=null;let y=new al({bitsPerValue:p>Ir.MAX_BITS_PER_BLOCK?this.maxBitsPerBlock:p,capacity:4096}).readBuffer(c,qd.read(c)*2),g=new al({bitsPerValue:4,capacity:4096}).readBuffer(c);u&&(m=new al({bitsPerValue:4,capacity:4096}).readBuffer(c));let v=new Sd({data:y,palette:h,blockLight:g,...u?{skyLight:m}:{skyLight:null},maxBitsPerBlock:this.maxBitsPerBlock});this.sections[d]=v}if(l){let d={x:0,y:0,z:0};for(d.z=0;d.z<Ir.SECTION_WIDTH;d.z++)for(d.x=0;d.x<Ir.SECTION_WIDTH;d.x++)this.setBiome(d,c.readUInt8())}}};function HW(t){return t.z*16|t.x}function Ys(t){return{x:t.x,y:t.y&15,z:t.z}}});var ol=f((Qwt,QW)=>{a();o();s();var xce=qt();function Sce(t){let e=Ut()(t),r=KW()(e,t);return r.h=xce.CHUNK_HEIGHT,r.version=t.version,r}QW.exports=Sce});var XW=f((t0t,ZW)=>{a();o();s();var Xi=Ki(),qce=Ct(),ea=qt(),uy=ar(),Vce=13;function Ks(t){return t.y*16*16+t.z*16+t.x}var ly=class t{constructor(e={}){if(e!==null){if(typeof e.solidBlockCount>"u"&&(e.solidBlockCount=0,e.data))for(let r=0;r<ea.BLOCK_SECTION_VOLUME;r++)e.data.get(r)!==0&&(e.solidBlockCount+=1);e.data||(e.data=new Xi({bitsPerValue:4,capacity:ea.BLOCK_SECTION_VOLUME})),e.palette===void 0&&(e.palette=[0]),e.blockLight||(e.blockLight=new Xi({bitsPerValue:4,capacity:ea.BLOCK_SECTION_VOLUME})),e.skyLight===void 0&&(e.skyLight=new Xi({bitsPerValue:4,capacity:ea.BLOCK_SECTION_VOLUME})),this.data=e.data,this.palette=e.palette,this.isDirty=!1,this.blockLight=e.blockLight,this.skyLight=e.skyLight,this.solidBlockCount=e.solidBlockCount,this.maxBitsPerBlock=e.maxBitsPerBlock||Vce}}toJson(){return JSON.stringify({data:this.data.toJson(),palette:this.palette,isDirty:this.isDirty,blockLight:this.blockLight.toJson(),skyLight:this.skyLight?this.skyLight.toJson():this.skyLight,solidBlockCount:this.solidBlockCount})}static fromJson(e){let r=JSON.parse(e);return new t({data:Xi.fromJson(r.data),palette:r.palette,blockLight:Xi.fromJson(r.blockLight),skyLight:r.skyLight?Xi.fromJson(r.skyLight):r.skyLight,solidBlockCount:r.solidBlockCount})}getBlock(e){let r=this.data.get(Ks(e));return this.palette!==null&&(r=this.palette[r]),r}setBlock(e,r){let i=Ks(e),n;if(this.palette!==null){let l=this.palette.indexOf(r);if(l>=0)n=l;else{this.palette.push(r),n=this.palette.length-1;let c=qce(n);if(c>this.data.getBitsPerValue())if(c<=ea.MAX_BITS_PER_BLOCK)this.data=this.data.resizeTo(c);else{let d=new Xi({bitsPerValue:this.maxBitsPerBlock,capacity:ea.BLOCK_SECTION_VOLUME});for(let h=0;h<ea.BLOCK_SECTION_VOLUME;h++){let m=this.palette[this.data.get(h)];d.set(h,m)}this.palette=null,n=r,this.data=d}}}else n=r;let u=this.getBlock(e);r===0&&u!==0?this.solidBlockCount-=1:r!==0&&u===0&&(this.solidBlockCount+=1),this.data.set(i,n)}getBlockLight(e){return this.blockLight.get(Ks(e))}getSkyLight(e){return this.skyLight?this.skyLight.get(Ks(e)):0}setBlockLight(e,r){return this.blockLight.set(Ks(e),r)}setSkyLight(e,r){return this.skyLight?this.skyLight.set(Ks(e),r):0}isEmpty(){return this.solidBlockCount===0}write(e){e.writeUInt8(this.data.getBitsPerValue()),this.palette!==null&&(uy.write(e,this.palette.length),this.palette.forEach(r=>{uy.write(e,r)})),uy.write(e,this.data.length()),this.data.writeBuffer(e),this.blockLight.writeBuffer(e),this.skyLight!==null&&this.skyLight.writeBuffer(e)}};ZW.exports=ly});var iH=f((a0t,nH)=>{a();o();s();var eH=oi().SmartBuffer,Vd=XW(),Br=qt(),ul=Ki(),cy=ar(),Ece=sn(),Ice=Ct();nH.exports=(t,e)=>class rH extends Ece{static get section(){return Vd}constructor(){super(e),this.sectionMask=0,this.skyLightSent=!0,this.sections=Array(Br.NUM_SECTIONS).fill(null),this.biomes=Array(Br.SECTION_WIDTH*Br.SECTION_WIDTH).fill(1),this.maxBitsPerBlock=Ice(Object.values(e.blocks).reduce((i,n)=>Math.max(i,n.maxStateId),0))}toJson(){return JSON.stringify({biomes:this.biomes,blockEntities:this.blockEntities,sectionMask:this.sectionMask,sections:this.sections.map(i=>i===null?null:i.toJson())})}static fromJson(i){let n=JSON.parse(i),u=new rH;return u.biomes=n.biomes,u.blockEntities=n.blockEntities,u.sectionMask=n.sectionMask,u.sections=n.sections.map(l=>l===null?null:Vd.fromJson(l)),u}initialize(i){let n={x:0,y:0,z:0};for(n.y=0;n.y<Br.CHUNK_HEIGHT;n.y++)for(n.z=0;n.z<Br.SECTION_WIDTH;n.z++)for(n.x=0;n.x<Br.SECTION_WIDTH;n.x++){let u=i(n.x,n.y,n.z);u!==null&&this.setBlock(n,u)}}getBlock(i){let n=this.sections[i.y>>4],u=this.getBiome(i);if(!n)return t.fromStateId(0,u);let l=n.getBlock(ta(i)),c=t.fromStateId(l,u);return c.light=this.getBlockLight(i),c.skyLight=this.getSkyLight(i),c.entity=this.getBlockEntity(i),c}setBlock(i,n){typeof n.stateId<"u"&&this.setBlockStateId(i,n.stateId),typeof n.biome<"u"&&this.setBiome(i,n.biome.id),typeof n.skyLight<"u"&&this.skyLightSent&&this.setSkyLight(i,n.skyLight),typeof n.light<"u"&&this.setBlockLight(i,n.light),n.entity?this.setBlockEntity(i,n.entity):this.removeBlockEntity(i)}getBlockType(i){let n=this.getBlockStateId(i);return e.blocksByStateId[n].id}getBlockData(i){let n=this.getBlockStateId(i);return e.blocksByStateId[n].metadata}getBlockStateId(i){let n=this.sections[i.y>>4];return n?n.getBlock(ta(i)):0}getBlockLight(i){let n=this.sections[i.y>>4];if(!n)return 15;let u=ta(i);return n.getBlockLight(u)}getSkyLight(i){let n=this.sections[i.y>>4];if(!n)return 15;let u=ta(i);return n.getSkyLight(u)}getBiome(i){return this.biomes[tH(i)]}getBiomeColor(i){return{r:0,g:0,b:0}}setBlockType(i,n){this.setBlockStateId(i,e.blocks[n].minStateId)}setBlockData(i,n){this.setBlockStateId(i,e.blocksByStateId[this.getBlockStateId(i)].minStateId+n)}setBlockStateId(i,n){let u=i.y>>4;if(u<0||u>=16)return;let l=this.sections[u];if(!l){if(n===0)return;l=new Vd({maxBitsPerBlock:this.maxBitsPerBlock}),this.sectionMask|=1<<u,this.sections[u]=l}l.setBlock(ta(i),n)}setBlockLight(i,n){let u=this.sections[i.y>>4];return u&&u.setBlockLight(ta(i),n)}setSkyLight(i,n){let u=this.sections[i.y>>4];return u&&u.setSkyLight(ta(i),n)}setBiome(i,n){this.biomes[tH(i)]=n}getMask(){return this.sectionMask}dumpBiomes(){}dumpLight(){}loadLight(){}dumpLightNew(){return{skyLightSections:this.sections.map(i=>i===null?null:i.skyLight.toJson()),blockLightSections:this.sections.map(i=>i===null?null:i.blockLight.toJson()),skyLightMask:0,blockLightMask:0,emptySkyLightMask:0,emptyBlockLightMask:0}}loadLightNew(i){let{skyLightSections:n,blockLightSections:u}=i;n.forEach((l,c)=>{this.sections[c]!==null&&(this.sections[c].skyLight=ul.fromJson(l))}),u.forEach((l,c)=>{this.sections[c]!==null&&(this.sections[c].blockLight=ul.fromJson(l))})}loadBiomes(){}dump(){let i=new eH;return this.sections.forEach((n,u)=>{n!==null&&!n.isEmpty()&&n.write(i)}),this.biomes.forEach(n=>{i.writeInt32BE(n)}),i.length?i.toBuffer():Buffer.alloc(4096)}load(i,n=65535,u=!0,l=!0){let c=eH.fromBuffer(i);this.skyLightSent=u,this.sectionMask|=n;for(let d=0;d<Br.NUM_SECTIONS;++d){if(!(n>>d&1))continue;let h,m,p=c.readUInt8();if(p<=Br.MAX_BITS_PER_BLOCK){h=[];let k=cy.read(c);for(let x=0;x<k;++x)h.push(cy.read(c))}else h=null;let y=new ul({bitsPerValue:p>Br.MAX_BITS_PER_BLOCK?this.maxBitsPerBlock:p,capacity:4096}).readBuffer(c,cy.read(c)*2),g=new ul({bitsPerValue:4,capacity:4096}),v=new Uint8Array(2048);for(let k=0;k<2048;k++)v[k]=c.readUInt8();for(let k=0;k<2048;k++){let x=v[k],S=k*2,V=k*2+1,E=x&15,I=x>>4&15,N=S%16,O=Math.floor(S/16%16),T=Math.floor(S/256),R=V%16,J=Math.floor(V/16%16),re=Math.floor(V/256),se=T*16*16+O*16+N,G=re*16*16+J*16+R;g.set(se,E),V<4096&&g.set(G,I)}if(u){m=new ul({bitsPerValue:4,capacity:4096});let k=new Uint8Array(2048);for(let x=0;x<2048;x++)k[x]=c.readUInt8();for(let x=0;x<2048;x++){let S=k[x],V=x*2,E=x*2+1,I=S&15,N=S>>4&15,O=V%16,T=Math.floor(V/16%16),R=Math.floor(V/256),J=E%16,re=Math.floor(E/16%16),se=Math.floor(E/256),G=R*16*16+T*16+O,ne=se*16*16+re*16+J;m.set(G,I),E<4096&&m.set(ne,N)}}let w=new Vd({data:y,palette:h,blockLight:g,maxBitsPerBlock:this.maxBitsPerBlock,...u?{skyLight:m}:{skyLight:null}});this.sections[d]=w}if(l){let d={x:0,y:0,z:0};for(d.z=0;d.z<Br.SECTION_WIDTH;d.z++)for(d.x=0;d.x<Br.SECTION_WIDTH;d.x++)this.setBiome(d,c.readInt32BE())}}};function tH(t){return t.z*16|t.x}function ta(t){return{x:t.x,y:t.y&15,z:t.z}}});var sH=f((l0t,aH)=>{a();o();s();var Bce=qt();function Nce(t){let e=Ut()(t),r=iH()(e,t);return r.h=Bce.CHUNK_HEIGHT,r.version=t.version,r}aH.exports=Nce});var ll=f((h0t,uH)=>{a();o();s();var Pce=Ct(),Qs=qt(),fy=ar();function oH(t){return t.y<<8|t.z<<4|t.x}uH.exports=t=>{class e{constructor(i={}){if(i!==null){if(typeof i.solidBlockCount>"u"&&(i.solidBlockCount=0,i.data))for(let n=0;n<Qs.BLOCK_SECTION_VOLUME;n++)i.data.get(n)!==0&&(i.solidBlockCount+=1);i.data||(i.data=new t({bitsPerValue:4,capacity:Qs.BLOCK_SECTION_VOLUME})),i.palette===void 0&&(i.palette=[0]),this.data=i.data,this.palette=i.palette,this.isDirty=!1,this.solidBlockCount=i.solidBlockCount,this.maxBitsPerBlock=i.maxBitsPerBlock??Qs.GLOBAL_BITS_PER_BLOCK}}toJson(){return JSON.stringify({data:this.data.toJson(),palette:this.palette,isDirty:this.isDirty,solidBlockCount:this.solidBlockCount})}static fromJson(i){let n=JSON.parse(i);return new e({data:t.fromJson(n.data),palette:n.palette,solidBlockCount:n.solidBlockCount})}getBlock(i){let n=this.data.get(oH(i));return this.palette!==null&&(n=this.palette[n]),n}setBlock(i,n){let u=oH(i),l;if(this.palette!==null){let d=this.palette.indexOf(n);if(d>=0)l=d;else{this.palette.push(n),l=this.palette.length-1;let h=Pce(l);if(h>this.data.getBitsPerValue())if(h<=Qs.MAX_BITS_PER_BLOCK)this.data=this.data.resizeTo(h);else{let m=new t({bitsPerValue:this.maxBitsPerBlock,capacity:Qs.BLOCK_SECTION_VOLUME});for(let p=0;p<Qs.BLOCK_SECTION_VOLUME;p++){let y=this.palette[this.data.get(p)];m.set(p,y)}this.palette=null,l=n,this.data=m}}}else l=n;let c=this.getBlock(i);n===0&&c!==0?this.solidBlockCount-=1:n!==0&&c===0&&(this.solidBlockCount+=1),this.data.set(u,l)}isEmpty(){return this.solidBlockCount===0}write(i){i.writeInt16BE(this.solidBlockCount),i.writeUInt8(this.data.getBitsPerValue()),this.palette!==null&&(fy.write(i,this.palette.length),this.palette.forEach(n=>{fy.write(i,n)})),fy.write(i,this.data.length()),this.data.writeBuffer(i)}}return e}});var dH=f((_0t,fH)=>{a();o();s();var Ed=oi().SmartBuffer,Gr=Ki(),Id=ll()(Gr),Tce=sn(),Dt=qt(),ra=ar(),Lce=Ct();fH.exports=(t,e)=>class cH extends Tce{static get section(){return Id}constructor(){super(e),this.sectionMask=0,this.sections=Array(Dt.NUM_SECTIONS).fill(null),this.biomes=Array(Dt.SECTION_WIDTH*Dt.SECTION_WIDTH).fill(1),this.skyLightMask=0,this.blockLightMask=0,this.skyLightSections=Array(Dt.NUM_SECTIONS+2).fill(null),this.blockLightSections=Array(Dt.NUM_SECTIONS+2).fill(null),this.maxBitsPerBlock=Lce(Object.values(e.blocks).reduce((i,n)=>Math.max(i,n.maxStateId),0))}toJson(){return JSON.stringify({biomes:this.biomes,blockEntities:this.blockEntities,sectionMask:this.sectionMask,sections:this.sections.map(i=>i===null?null:i.toJson()),skyLightMask:this.skyLightMask,blockLightMask:this.blockLightMask,skyLightSections:this.skyLightSections.map(i=>i===null?null:i.toJson()),blockLightSections:this.blockLightSections.map(i=>i===null?null:i.toJson())})}static fromJson(i){let n=JSON.parse(i),u=new cH;return u.biomes=n.biomes,u.blockEntities=n.blockEntities,u.sectionMask=n.sectionMask,u.sections=n.sections.map(l=>l===null?null:Id.fromJson(l)),u.skyLightMask=n.skyLightMask,u.blockLightMask=n.blockLightMask,u.skyLightSections=n.skyLightSections.map(l=>l===null?null:Gr.fromJson(l)),u.blockLightSections=n.blockLightSections.map(l=>l===null?null:Gr.fromJson(l)),u}initialize(i){let n={x:0,y:0,z:0};for(n.y=0;n.y<Dt.CHUNK_HEIGHT;n.y++)for(n.z=0;n.z<Dt.SECTION_WIDTH;n.z++)for(n.x=0;n.x<Dt.SECTION_WIDTH;n.x++){let u=i(n.x,n.y,n.z);u!==null&&this.setBlock(n,u)}}getBlock(i){let n=this.sections[i.y>>4],u=this.getBiome(i);if(!n)return t.fromStateId(0,u);let l=n.getBlock(dy(i)),c=t.fromStateId(l,u);return c.light=this.getBlockLight(i),c.skyLight=this.getSkyLight(i),c.entity=this.getBlockEntity(i),c}setBlock(i,n){typeof n.stateId<"u"&&this.setBlockStateId(i,n.stateId),typeof n.biome<"u"&&this.setBiome(i,n.biome.id),typeof n.skyLight<"u"&&this.setSkyLight(i,n.skyLight),typeof n.light<"u"&&this.setBlockLight(i,n.light),n.entity?this.setBlockEntity(i,n.entity):this.removeBlockEntity(i)}getBlockType(i){let n=this.getBlockStateId(i);return e.blocksByStateId[n].id}getBlockData(i){let n=this.getBlockStateId(i);return e.blocksByStateId[n].metadata}getBlockStateId(i){let n=this.sections[i.y>>4];return n?n.getBlock(dy(i)):0}getBlockLight(i){let n=this.blockLightSections[Bd(i)];if(!n)return 0;let l=i.y%16*16*16+i.z*16+i.x;return n.get(l)}getSkyLight(i){let n=this.skyLightSections[Bd(i)];if(!n)return 0;let l=i.y%16*16*16+i.z*16+i.x;return n.get(l)}getBiome(i){return this.biomes[lH(i)]}getBiomeColor(i){return{r:0,g:0,b:0}}setBlockType(i,n){this.setBlockStateId(i,e.blocks[n].minStateId)}setBlockData(i,n){this.setBlockStateId(i,e.blocksByStateId[this.getBlockStateId(i)].minStateId+n)}setBlockStateId(i,n){let u=i.y>>4;if(u<0||u>=16)return;let l=this.sections[u];if(!l){if(n===0)return;l=new Id({maxBitsPerBlock:this.maxBitsPerBlock}),this.sectionMask|=1<<u,this.sections[u]=l}l.setBlock(dy(i),n)}setBlockLight(i,n){let u=Bd(i),l=this.blockLightSections[u];if(l===null){if(n===0)return;l=new Gr({bitsPerValue:4,capacity:4096}),this.blockLightMask|=1<<u,this.blockLightSections[u]=l}let d=i.y%16*16*16+i.z*16+i.x;l.set(d,n)}setSkyLight(i,n){let u=Bd(i),l=this.skyLightSections[u];if(l===null){if(n===0)return;l=new Gr({bitsPerValue:4,capacity:4096}),this.skyLightMask|=1<<u,this.skyLightSections[u]=l}let d=i.y%16*16*16+i.z*16+i.x;l.set(d,n)}setBiome(i,n){this.biomes[lH(i)]=n}getMask(){return this.sectionMask}dump(){let i=new Ed;return this.sections.forEach((n,u)=>{n!==null&&!n.isEmpty()&&n.write(i)}),this.biomes.forEach(n=>{i.writeInt32BE(n)}),i.length?i.toBuffer():Buffer.alloc(4096)}load(i,n=65535,u=!0,l=!0){let c=Ed.fromBuffer(i);this.sectionMask|=n;for(let d=0;d<Dt.NUM_SECTIONS;++d){if(!(n>>d&1))continue;let h,m=c.readInt16BE(),p=c.readUInt8();if(p<=Dt.MAX_BITS_PER_BLOCK){h=[];let v=ra.read(c);for(let w=0;w<v;++w)h.push(ra.read(c))}else h=null;let y=new Gr({bitsPerValue:p>Dt.MAX_BITS_PER_BLOCK?this.maxBitsPerBlock:p,capacity:4096}).readBuffer(c,ra.read(c)*2),g=new Id({data:y,palette:h,solidBlockCount:m,maxBitsPerBlock:this.maxBitsPerBlock});this.sections[d]=g}if(l){let d={x:0,y:0,z:0};for(d.z=0;d.z<Dt.SECTION_WIDTH;d.z++)for(d.x=0;d.x<Dt.SECTION_WIDTH;d.x++)this.setBiome(d,c.readInt32BE())}}loadLight(i,n,u,l=0,c=0){let d=Ed.fromBuffer(i);this.skyLightMask|=n;for(let h=0;h<Dt.NUM_SECTIONS+2;h++){if(!(n>>h&1))continue;let m=ra.read(d),p=new Gr({bitsPerValue:4,capacity:4096}),y=new Uint8Array(m);for(let g=0;g<m;g++)y[g]=d.readUInt8();for(let g=0;g<m;g++){let v=y[g],w=g*2,k=g*2+1,x=v&15,S=v>>4&15,V=w%16,E=Math.floor(w/16)%16,I=Math.floor(w/256),N=k%16,O=Math.floor(k/16)%16,T=Math.floor(k/256),R=I*16*16+E*16+V,J=T*16*16+O*16+N;p.set(R,x),k<4096&&p.set(J,S)}this.skyLightSections[h]=p}this.blockLightMask|=u;for(let h=0;h<Dt.NUM_SECTIONS+2;h++){if(!(u>>h&1))continue;let m=ra.read(d),p=new Gr({bitsPerValue:4,capacity:4096}),y=new Uint8Array(m);for(let g=0;g<m;g++)y[g]=d.readUInt8();for(let g=0;g<m;g++){let v=y[g],w=g*2,k=g*2+1,x=v&15,S=v>>4&15,V=w%16,E=Math.floor(w/16)%16,I=Math.floor(w/256),N=k%16,O=Math.floor(k/16)%16,T=Math.floor(k/256),R=I*16*16+E*16+V,J=T*16*16+O*16+N;p.set(R,x),k<4096&&p.set(J,S)}this.blockLightSections[h]=p}}dumpBiomes(){}loadBiomes(){}dumpLight(){let i=new Ed;return this.skyLightSections.forEach((n,u)=>{n!==null&&(ra.write(i,2048),n.writeBuffer(i))}),this.blockLightSections.forEach((n,u)=>{n!==null&&(ra.write(i,2048),n.writeBuffer(i))}),i.toBuffer()}dumpLightNew(){return{skyLightSections:this.skyLightSections.map(i=>i===null?null:i.toJson()),blockLightSections:this.blockLightSections.map(i=>i===null?null:i.toJson()),skyLightMask:this.skyLightMask,blockLightMask:this.blockLightMask,emptySkyLightMask:0,emptyBlockLightMask:0}}loadLightNew(i){let{skyLightSections:n,blockLightSections:u,skyLightMask:l,blockLightMask:c}=i;this.skyLightMask=l,this.skyLightSections=n.map(d=>d===null?null:Gr.fromJson(d)),this.blockLightMask=c,this.blockLightSections=u.map(d=>d===null?null:Gr.fromJson(d))}};function Bd(t){return Math.floor(t.y/16)+1}function lH(t){return t.z*16|t.x}function dy(t){return{x:t.x,y:t.y&15,z:t.z}}});var pH=f((v0t,hH)=>{a();o();s();var jce=qt();function Ace(t){let e=Ut()(t),r=dH()(e,t);return r.h=jce.CHUNK_HEIGHT,r.version=t.version,r}hH.exports=Ace});var yH=f((q0t,_H)=>{a();o();s();var Nd=oi().SmartBuffer,Yr=Ki(),Pd=ll()(Yr),Oce=sn(),Nr=qt(),na=ar(),Cce=Ct();_H.exports=(t,e)=>class mH extends Oce{static get section(){return Pd}constructor(){super(e),this.sectionMask=0,this.sections=Array(Nr.NUM_SECTIONS).fill(null),this.biomes=Array(4*4*64).fill(127),this.skyLightMask=0,this.blockLightMask=0,this.skyLightSections=Array(Nr.NUM_SECTIONS+2).fill(null),this.blockLightSections=Array(Nr.NUM_SECTIONS+2).fill(null),this.maxBitsPerBlock=Cce(Object.values(e.blocks).reduce((i,n)=>Math.max(i,n.maxStateId),0))}toJson(){return JSON.stringify({biomes:this.biomes,blockEntities:this.blockEntities,sectionMask:this.sectionMask,sections:this.sections.map(i=>i===null?null:i.toJson()),skyLightMask:this.skyLightMask,blockLightMask:this.blockLightMask,skyLightSections:this.skyLightSections.map(i=>i===null?null:i.toJson()),blockLightSections:this.blockLightSections.map(i=>i===null?null:i.toJson())})}static fromJson(i){let n=JSON.parse(i),u=new mH;return u.biomes=n.biomes,u.blockEntities=n.blockEntities,u.sectionMask=n.sectionMask,u.sections=n.sections.map(l=>l===null?null:Pd.fromJson(l)),u.skyLightMask=n.skyLightMask,u.blockLightMask=n.blockLightMask,u.skyLightSections=n.skyLightSections.map(l=>l===null?null:Yr.fromJson(l)),u.blockLightSections=n.blockLightSections.map(l=>l===null?null:Yr.fromJson(l)),u}initialize(i){let n={x:0,y:0,z:0};for(n.y=0;n.y<Nr.CHUNK_HEIGHT;n.y++)for(n.z=0;n.z<Nr.SECTION_WIDTH;n.z++)for(n.x=0;n.x<Nr.SECTION_WIDTH;n.x++){let u=i(n.x,n.y,n.z);u!==null&&this.setBlock(n,u)}}getBlock(i){let n=this.sections[i.y>>4],u=this.getBiome(i);if(!n)return t.fromStateId(0,u);let l=n.getBlock(hy(i)),c=t.fromStateId(l,u);return c.light=this.getBlockLight(i),c.skyLight=this.getSkyLight(i),c.entity=this.getBlockEntity(i),c}setBlock(i,n){typeof n.stateId<"u"&&this.setBlockStateId(i,n.stateId),typeof n.biome<"u"&&this.setBiome(i,n.biome.id),typeof n.skyLight<"u"&&this.setSkyLight(i,n.skyLight),typeof n.light<"u"&&this.setBlockLight(i,n.light),n.entity?this.setBlockEntity(i,n.entity):this.removeBlockEntity(i)}getBlockType(i){let n=this.getBlockStateId(i);return e.blocksByStateId[n].id}getBlockData(i){let n=this.getBlockStateId(i);return e.blocksByStateId[n].metadata}getBlockStateId(i){let n=this.sections[i.y>>4];return n?n.getBlock(hy(i)):0}getBlockLight(i){let n=this.blockLightSections[Td(i)];if(!n)return 0;let l=i.y%16*16*16+i.z*16+i.x;return n.get(l)}getSkyLight(i){let n=this.skyLightSections[Td(i)];if(!n)return 0;let l=i.y%16*16*16+i.z*16+i.x;return n.get(l)}getBiome(i){return i.y<0||i.y>=256?0:this.biomes[gH(i)]}setBlockType(i,n){this.setBlockStateId(i,e.blocks[n].minStateId)}setBlockData(i,n){this.setBlockStateId(i,e.blocksByStateId[this.getBlockStateId(i)].minStateId+n)}setBlockStateId(i,n){let u=i.y>>4;if(u<0||u>=16)return;let l=this.sections[u];if(!l){if(n===0)return;l=new Pd({maxBitsPerBlock:this.maxBitsPerBlock}),this.sectionMask|=1<<u,this.sections[u]=l}l.setBlock(hy(i),n)}setBlockLight(i,n){let u=Td(i),l=this.blockLightSections[u];if(l===null){if(n===0)return;l=new Yr({bitsPerValue:4,capacity:4096}),this.blockLightMask|=1<<u,this.blockLightSections[u]=l}let d=i.y%16*16*16+i.z*16+i.x;l.set(d,n)}setSkyLight(i,n){let u=Td(i),l=this.skyLightSections[u];if(l===null){if(n===0)return;l=new Yr({bitsPerValue:4,capacity:4096}),this.skyLightMask|=1<<u,this.skyLightSections[u]=l}let d=i.y%16*16*16+i.z*16+i.x;l.set(d,n)}setBiome(i,n){i.y<0||i.y>=256||(this.biomes[gH(i)]=n)}getMask(){return this.sectionMask}dump(){let i=new Nd;return this.sections.forEach((n,u)=>{n!==null&&!n.isEmpty()&&n.write(i)}),i.length?i.toBuffer():Buffer.alloc(4096)}loadBiomes(i){this.biomes=i}dumpBiomes(i){return this.biomes}load(i,n=65535){let u=Nd.fromBuffer(i);this.sectionMask|=n;for(let l=0;l<Nr.NUM_SECTIONS;++l){if(!(n>>l&1))continue;let c,d=u.readInt16BE(),h=u.readUInt8();if(h<=Nr.MAX_BITS_PER_BLOCK){c=[];let y=na.read(u);for(let g=0;g<y;++g)c.push(na.read(u))}else c=null;let m=new Yr({bitsPerValue:h>Nr.MAX_BITS_PER_BLOCK?this.maxBitsPerBlock:h,capacity:4096}).readBuffer(u,na.read(u)*2),p=new Pd({data:m,palette:c,solidBlockCount:d,maxBitsPerBlock:this.maxBitsPerBlock});this.sections[l]=p}}loadLight(i,n,u,l=0,c=0){let d=Nd.fromBuffer(i);this.skyLightMask|=n;for(let h=0;h<Nr.NUM_SECTIONS+2;h++){if(!(n>>h&1))continue;let m=na.read(d),p=new Yr({bitsPerValue:4,capacity:4096}),y=new Uint8Array(m);for(let g=0;g<m;g++)y[g]=d.readUInt8();for(let g=0;g<m;g++){let v=y[g],w=g*2,k=g*2+1,x=v&15,S=v>>4&15,V=w%16,E=Math.floor(w/16)%16,I=Math.floor(w/256),N=k%16,O=Math.floor(k/16)%16,T=Math.floor(k/256),R=I*16*16+E*16+V,J=T*16*16+O*16+N;p.set(R,x),k<4096&&p.set(J,S)}this.skyLightSections[h]=p}this.blockLightMask|=u;for(let h=0;h<Nr.NUM_SECTIONS+2;h++){if(!(u>>h&1))continue;let m=na.read(d),p=new Yr({bitsPerValue:4,capacity:4096}),y=new Uint8Array(m);for(let g=0;g<m;g++)y[g]=d.readUInt8();for(let g=0;g<m;g++){let v=y[g],w=g*2,k=g*2+1,x=v&15,S=v>>4&15,V=w%16,E=Math.floor(w/16)%16,I=Math.floor(w/256),N=k%16,O=Math.floor(k/16)%16,T=Math.floor(k/256),R=I*16*16+E*16+V,J=T*16*16+O*16+N;p.set(R,x),k<4096&&p.set(J,S)}this.blockLightSections[h]=p}}dumpLight(){let i=new Nd;return this.skyLightSections.forEach((n,u)=>{n!==null&&(na.write(i,2048),n.writeBuffer(i))}),this.blockLightSections.forEach((n,u)=>{n!==null&&(na.write(i,2048),n.writeBuffer(i))}),i.toBuffer()}dumpLightNew(){return{skyLightSections:this.skyLightSections.map(i=>i===null?null:i.toJson()),blockLightSections:this.blockLightSections.map(i=>i===null?null:i.toJson()),skyLightMask:this.skyLightMask,blockLightMask:this.blockLightMask,emptySkyLightMask:0,emptyBlockLightMask:0}}loadLightNew(i){let{skyLightSections:n,blockLightSections:u,skyLightMask:l,blockLightMask:c}=i;this.skyLightMask=l,this.skyLightSections=n.map(d=>d===null?null:Yr.fromJson(d)),this.blockLightMask=c,this.blockLightSections=u.map(d=>d===null?null:Yr.fromJson(d))}};function Td(t){return Math.floor(t.y/16)+1}function gH(t){return(t.y>>2&63)<<4|(t.z>>2&3)<<2|t.x>>2&3}function hy(t){return{x:t.x,y:t.y&15,z:t.z}}});var wH=f((B0t,bH)=>{a();o();s();var Mce=qt();function $ce(t){let e=Ut()(t),r=yH()(e,t);return r.h=Mce.CHUNK_HEIGHT,r.version=t.version,r}bH.exports=$ce});var cl=f((L0t,vH)=>{a();o();s();var Rce=Ct(),py=class t{constructor(e){if(e===null)return;let r=Math.floor(64/e.bitsPerValue),i=Math.ceil(e.capacity/r)*2,n=(1<<e.bitsPerValue)-1;this.data=new Uint32Array(e?.data??i),this.capacity=e.capacity,this.bitsPerValue=e.bitsPerValue,this.valuesPerLong=r,this.valueMask=n}toJson(){return JSON.stringify({data:Array.from(this.data),capacity:this.capacity,bitsPerValue:this.bitsPerValue,valuesPerLong:this.valuesPerLong,valueMask:this.valueMask})}static fromJson(e){return new t(JSON.parse(e))}toArray(){let e=[];for(let r=0;r<this.capacity;r++)e.push(this.get(r));return e}static fromArray(e,r){let i=new t({capacity:e.length,bitsPerValue:r});for(let n=0;n<e.length;n++)i.set(n,e[n]);return i}toLongArray(){let e=[];for(let r=0;r<this.data.length;r+=2)e.push([this.data[r+1]<<32>>32,this.data[r]<<32>>32]);return e}static fromLongArray(e,r){let i=new t({capacity:Math.floor(64/r)*e.length,bitsPerValue:r});for(let n=0;n<e.length;n++){let u=n*2;i.data[u+1]=e[n][0],i.data[u]=e[n][1]}return i}static or(e,r){let i=e.data.length>r.data.length?e.data:r.data,n=e.data.length>r.data.length?r.data:e.data,u=new Uint32Array(i.length);u.set(i);for(let l=0;l<n.length;l++)u[l]|=n[l];return new t({data:u.buffer,bitsPerValue:Math.max(e.bitsPerValue,r.bitsPerValue)})}get(e){let r=Math.floor(e/this.valuesPerLong),i=(e-r*this.valuesPerLong)*this.bitsPerValue;if(i>=32){let d=i-32;return this.data[r*2+1]>>>d&this.valueMask}let n=this.data[r*2],u=i,l=n>>>u;if(u+this.bitsPerValue>32){let d=this.data[r*2+1];l|=d<<32-u}return l&this.valueMask}set(e,r){let i=Math.floor(e/this.valuesPerLong),n=(e-i*this.valuesPerLong)*this.bitsPerValue;if(n>=32){let c=n-32;this.data[i*2+1]=(this.data[i*2+1]&~(this.valueMask<<c)|(r&this.valueMask)<<c)>>>0;return}let u=n;this.data[i*2]=(this.data[i*2]&~(this.valueMask<<u)|(r&this.valueMask)<<u)>>>0;let l=u+this.bitsPerValue;l>32&&(this.data[i*2+1]=(this.data[i*2+1]&~((1<<l-32)-1)|r>>32-u)>>>0)}resize(e){let r=new t({bitsPerValue:this.bitsPerValue,capacity:e});for(let i=0;i<Math.min(e,this.capacity);++i)r.set(i,this.get(i));return r}resizeTo(e){let r=new t({bitsPerValue:e,capacity:this.capacity});for(let i=0;i<this.capacity;++i){let n=this.get(i);if(Rce(n)>e)throw new Error("existing value in BitArray can't fit in new bits per value");r.set(i,n)}return r}length(){return this.data.length/2}readBuffer(e,r=this.data.length){if((!Number.isFinite(r)||r<0||r>1e6)&&(console.warn(`Invalid size in BitArray.readBuffer: ${r}, using default size`),r=this.data.length),r!==this.data.length){this.data=new Uint32Array(r);for(let i=0;i<r;i+=2)this.data[i+1]=e.readUInt32BE(),this.data[i]=e.readUInt32BE();return}for(let i=0;i<this.data.length;i+=2)this.data[i+1]=e.readUInt32BE(),this.data[i]=e.readUInt32BE();return this}writeBuffer(e){for(let r=0;r<this.data.length;r+=2)e.writeUInt32BE(this.data[r+1]),e.writeUInt32BE(this.data[r]);return this}getBitsPerValue(){return this.bitsPerValue}};vH.exports=py});var qH=f((C0t,SH)=>{a();o();s();var Ld=oi().SmartBuffer,Kr=cl(),jd=ll()(Kr),zce=sn(),Pr=qt(),ia=ar(),Dce=Ct();SH.exports=(t,e)=>class xH extends zce{static get section(){return jd}constructor(){super(e),this.sectionMask=0,this.sections=Array(Pr.NUM_SECTIONS).fill(null),this.biomes=Array(4*4*64).fill(127),this.skyLightMask=0,this.blockLightMask=0,this.skyLightSections=Array(Pr.NUM_SECTIONS+2).fill(null),this.blockLightSections=Array(Pr.NUM_SECTIONS+2).fill(null),this.maxBitsPerBlock=Dce(Object.values(e.blocks).reduce((i,n)=>Math.max(i,n.maxStateId),0))}toJson(){return JSON.stringify({biomes:this.biomes,blockEntities:this.blockEntities,sectionMask:this.sectionMask,sections:this.sections.map(i=>i===null?null:i.toJson()),skyLightMask:this.skyLightMask,blockLightMask:this.blockLightMask,skyLightSections:this.skyLightSections.map(i=>i===null?null:i.toJson()),blockLightSections:this.blockLightSections.map(i=>i===null?null:i.toJson())})}static fromJson(i){let n=JSON.parse(i),u=new xH;return u.biomes=n.biomes,u.blockEntities=n.blockEntities,u.sectionMask=n.sectionMask,u.sections=n.sections.map(l=>l===null?null:jd.fromJson(l)),u.skyLightMask=n.skyLightMask,u.blockLightMask=n.blockLightMask,u.skyLightSections=n.skyLightSections.map(l=>l===null?null:Kr.fromJson(l)),u.blockLightSections=n.blockLightSections.map(l=>l===null?null:Kr.fromJson(l)),u}initialize(i){let n={x:0,y:0,z:0};for(n.y=0;n.y<Pr.CHUNK_HEIGHT;n.y++)for(n.z=0;n.z<Pr.SECTION_WIDTH;n.z++)for(n.x=0;n.x<Pr.SECTION_WIDTH;n.x++){let u=i(n.x,n.y,n.z);u!==null&&this.setBlock(n,u)}}getBlock(i){let n=this.sections[i.y>>4],u=this.getBiome(i);if(!n)return t.fromStateId(0,u);let l=n.getBlock(gy(i)),c=t.fromStateId(l,u);return c.light=this.getBlockLight(i),c.skyLight=this.getSkyLight(i),c.entity=this.getBlockEntity(i),c}setBlock(i,n){typeof n.stateId<"u"&&this.setBlockStateId(i,n.stateId),typeof n.biome<"u"&&this.setBiome(i,n.biome.id),typeof n.skyLight<"u"&&this.setSkyLight(i,n.skyLight),typeof n.light<"u"&&this.setBlockLight(i,n.light),n.entity?this.setBlockEntity(i,n.entity):this.removeBlockEntity(i)}getBlockType(i){let n=this.getBlockStateId(i);return e.blocksByStateId[n].id}getBlockData(i){let n=this.getBlockStateId(i);return e.blocksByStateId[n].metadata}getBlockStateId(i){let n=this.sections[i.y>>4];return n?n.getBlock(gy(i)):0}getBlockLight(i){let n=this.blockLightSections[Ad(i)];if(!n)return 0;let l=i.y%16*16*16+i.z*16+i.x;return n.get(l)}getSkyLight(i){let n=this.skyLightSections[Ad(i)];if(!n)return 0;let l=i.y%16*16*16+i.z*16+i.x;return n.get(l)}getBiome(i){return i.y<0||i.y>=256?0:this.biomes[kH(i)]}setBlockType(i,n){this.setBlockStateId(i,e.blocks[n].minStateId)}setBlockData(i,n){this.setBlockStateId(i,e.blocksByStateId[this.getBlockStateId(i)].minStateId+n)}setBlockStateId(i,n){let u=i.y>>4;if(u<0||u>=16)return;let l=this.sections[u];if(!l){if(n===0)return;l=new jd({maxBitsPerBlock:this.maxBitsPerBlock}),this.sectionMask|=1<<u,this.sections[u]=l}l.setBlock(gy(i),n)}setBlockLight(i,n){let u=Ad(i),l=this.blockLightSections[u];if(l===null){if(n===0)return;l=new Kr({bitsPerValue:4,capacity:4096}),this.blockLightMask|=1<<u,this.blockLightSections[u]=l}let d=i.y%16*16*16+i.z*16+i.x;l.set(d,n)}setSkyLight(i,n){let u=Ad(i),l=this.skyLightSections[u];if(l===null){if(n===0)return;l=new Kr({bitsPerValue:4,capacity:4096}),this.skyLightMask|=1<<u,this.skyLightSections[u]=l}let d=i.y%16*16*16+i.z*16+i.x;l.set(d,n)}setBiome(i,n){i.y<0||i.y>=256||(this.biomes[kH(i)]=n)}getMask(){return this.sectionMask}dump(){let i=new Ld;return this.sections.forEach((n,u)=>{n!==null&&!n.isEmpty()&&n.write(i)}),i.length?i.toBuffer():Buffer.alloc(4096)}loadBiomes(i){this.biomes=i}dumpBiomes(i){return this.biomes}load(i,n=65535){let u=Ld.fromBuffer(i);this.sectionMask|=n;for(let l=0;l<Pr.NUM_SECTIONS;++l){if(!(n>>l&1))continue;let c,d=u.readInt16BE(),h=u.readUInt8();if(h<=Pr.MAX_BITS_PER_BLOCK){c=[];let y=ia.read(u);for(let g=0;g<y;++g)c.push(ia.read(u))}else c=null;let m=new Kr({bitsPerValue:h>Pr.MAX_BITS_PER_BLOCK?this.maxBitsPerBlock:h,capacity:4096}).readBuffer(u,ia.read(u)*2),p=new jd({data:m,palette:c,solidBlockCount:d,maxBitsPerBlock:this.maxBitsPerBlock});this.sections[l]=p}}loadLight(i,n,u,l=0,c=0){let d=Ld.fromBuffer(i);this.skyLightMask|=n;for(let h=0;h<Pr.NUM_SECTIONS+2;h++){if(!(n>>h&1))continue;let m=ia.read(d),p=new Kr({bitsPerValue:4,capacity:4096}),y=new Uint8Array(m);for(let g=0;g<m;g++)y[g]=d.readUInt8();for(let g=0;g<m;g++){let v=y[g],w=g*2,k=g*2+1,x=v&15,S=v>>4&15,V=w%16,E=Math.floor(w/16)%16,I=Math.floor(w/256),N=k%16,O=Math.floor(k/16)%16,T=Math.floor(k/256),R=I*16*16+E*16+V,J=T*16*16+O*16+N;p.set(R,x),k<4096&&p.set(J,S)}this.skyLightSections[h]=p}this.blockLightMask|=u;for(let h=0;h<Pr.NUM_SECTIONS+2;h++){if(!(u>>h&1))continue;let m=ia.read(d),p=new Kr({bitsPerValue:4,capacity:4096}),y=new Uint8Array(m);for(let g=0;g<m;g++)y[g]=d.readUInt8();for(let g=0;g<m;g++){let v=y[g],w=g*2,k=g*2+1,x=v&15,S=v>>4&15,V=w%16,E=Math.floor(w/16)%16,I=Math.floor(w/256),N=k%16,O=Math.floor(k/16)%16,T=Math.floor(k/256),R=I*16*16+E*16+V,J=T*16*16+O*16+N;p.set(R,x),k<4096&&p.set(J,S)}this.blockLightSections[h]=p}}dumpLight(){let i=new Ld;return this.skyLightSections.forEach((n,u)=>{n!==null&&(ia.write(i,2048),n.writeBuffer(i))}),this.blockLightSections.forEach((n,u)=>{n!==null&&(ia.write(i,2048),n.writeBuffer(i))}),i.toBuffer()}dumpLightNew(){return{skyLightSections:this.skyLightSections.map(i=>i===null?null:i.toJson()),blockLightSections:this.blockLightSections.map(i=>i===null?null:i.toJson()),skyLightMask:this.skyLightMask,blockLightMask:this.blockLightMask,emptySkyLightMask:0,emptyBlockLightMask:0}}loadLightNew(i){let{skyLightSections:n,blockLightSections:u,skyLightMask:l,blockLightMask:c}=i;this.skyLightMask=l,this.skyLightSections=n.map(d=>d===null?null:Kr.fromJson(d)),this.blockLightMask=c,this.blockLightSections=u.map(d=>d===null?null:Kr.fromJson(d))}};function Ad(t){return Math.floor(t.y/16)+1}function kH(t){return(t.y>>2&63)<<4|(t.z>>2&3)<<2|t.x>>2&3}function gy(t){return{x:t.x,y:t.y&15,z:t.z}}});var EH=f((z0t,VH)=>{a();o();s();var Fce=qt();function Uce(t){let e=Ut()(t),r=qH()(e,t);return r.h=Fce.CHUNK_HEIGHT,r.version=t.version,r}VH.exports=Uce});var TH=f((J0t,PH)=>{a();o();s();var Od=oi().SmartBuffer,Ke=cl(),Cd=ll()(Ke),Jce=sn(),fl=qt(),my=ar(),Wce=Ct();PH.exports=(t,e)=>class NH extends Jce{static get section(){return Cd}constructor(i){super(e),this.minY=i?.minY??0,this.worldHeight=i?.worldHeight??fl.CHUNK_HEIGHT,this.numSections=this.worldHeight>>4,this.maxBitsPerBlock=Wce(Object.values(e.blocks).reduce((n,u)=>Math.max(n,u.maxStateId),0)),this.sectionMask=new Ke({bitsPerValue:1,capacity:this.numSections}),this.sections=Array(this.numSections).fill(null),this.biomes=Array(4*4*(this.worldHeight>>2)).fill(0),this.skyLightMask=new Ke({bitsPerValue:1,capacity:this.numSections+2}),this.emptySkyLightMask=new Ke({bitsPerValue:1,capacity:this.numSections+2}),this.skyLightSections=Array(this.numSections+2).fill(null),this.blockLightMask=new Ke({bitsPerValue:1,capacity:this.numSections+2}),this.emptyBlockLightMask=new Ke({bitsPerValue:1,capacity:this.numSections+2}),this.blockLightSections=Array(this.numSections+2).fill(null)}toJson(){return JSON.stringify({biomes:this.biomes,blockEntities:this.blockEntities,sectionMask:this.sectionMask.toLongArray(),sections:this.sections.map(i=>i===null?null:i.toJson()),skyLightMask:this.skyLightMask.toLongArray(),blockLightMask:this.blockLightMask.toLongArray(),skyLightSections:this.skyLightSections.map(i=>i===null?null:i.toJson()),blockLightSections:this.blockLightSections.map(i=>i===null?null:i.toJson()),emptyBlockLightMask:this.emptyBlockLightMask.toLongArray(),emptySkyLightMask:this.emptySkyLightMask.toLongArray()})}static fromJson(i){let n=JSON.parse(i),u=new NH;return u.biomes=n.biomes,u.blockEntities=n.blockEntities,u.sectionMask=Ke.fromLongArray(n.sectionMask,1),u.sections=n.sections.map(l=>l===null?null:Cd.fromJson(l)),u.skyLightMask=Ke.fromLongArray(n.skyLightMask,1),u.blockLightMask=Ke.fromLongArray(n.blockLightMask,1),u.skyLightSections=n.skyLightSections.map(l=>l===null?null:Ke.fromJson(l)),u.blockLightSections=n.blockLightSections.map(l=>l===null?null:Ke.fromJson(l)),u.emptySkyLightMask=Ke.fromLongArray(n.emptyBlockLightMask,1),u.emptyBlockLightMask=Ke.fromLongArray(n.emptySkyLightMask,1),u}initialize(i){let n={x:0,y:0,z:0};for(n.y=0;n.y<this.worldHeight;n.y++)for(n.z=0;n.z<fl.SECTION_WIDTH;n.z++)for(n.x=0;n.x<fl.SECTION_WIDTH;n.x++){let u=i(n.x,n.y,n.z);u!==null&&this.setBlock(n,u)}}getBlock(i){let n=this.sections[i.y-this.minY>>4],u=this.getBiome(i);if(!n)return t.fromStateId(0,u);let l=n.getBlock(_y(i,this.minY)),c=t.fromStateId(l,u);return c.light=this.getBlockLight(i),c.skyLight=this.getSkyLight(i),c.entity=this.getBlockEntity(i),c}setBlock(i,n){typeof n.stateId<"u"&&this.setBlockStateId(i,n.stateId),typeof n.biome<"u"&&this.setBiome(i,n.biome.id),typeof n.skyLight<"u"&&this.setSkyLight(i,n.skyLight),typeof n.light<"u"&&this.setBlockLight(i,n.light),n.entity?this.setBlockEntity(i,n.entity):this.removeBlockEntity(i)}getBlockType(i){let n=this.getBlockStateId(i);return e.blocksByStateId[n].id}getBlockData(i){let n=this.getBlockStateId(i);return e.blocksByStateId[n].metadata}getBlockStateId(i){let n=this.sections[i.y-this.minY>>4];return n?n.getBlock(_y(i,this.minY)):0}getBlockLight(i){let n=this.blockLightSections[Md(i,this.minY)];if(!n)return 0;let l=(i.y-this.minY)%16*16*16+i.z*16+i.x;return n.get(l)}getSkyLight(i){let n=this.skyLightSections[Md(i,this.minY)];if(!n)return 0;let l=(i.y-this.minY)%16*16*16+i.z*16+i.x;return n.get(l)}getBiome(i){return i.y<this.minY||i.y>=this.minY+this.worldHeight?0:this.biomes[IH(i,this.minY)]}setBlockType(i,n){this.setBlockStateId(i,e.blocks[n].minStateId)}setBlockData(i,n){this.setBlockStateId(i,e.blocksByStateId[this.getBlockStateId(i)].minStateId+n)}setBlockStateId(i,n){let u=i.y-this.minY>>4;if(u<0||u>=this.numSections)return;let l=this.sections[u];if(!l){if(n===0)return;l=new Cd({maxBitsPerBlock:this.maxBitsPerBlock}),u>this.sectionMask.capacity&&(this.sectionMask=this.sectionMask.resize(u)),this.sectionMask.set(u,1),this.sections[u]=l}l.setBlock(_y(i,this.minY),n)}setBlockLight(i,n){let u=Md(i,this.minY),l=this.blockLightSections[u];if(l===null){if(n===0)return;l=new Ke({bitsPerValue:4,capacity:4096}),u>this.blockLightMask.capacity&&(this.blockLightMask=this.blockLightMask.resize(u)),this.blockLightMask.set(u,1),this.blockLightSections[u]=l}l.set(BH(i,this.minY),n)}setSkyLight(i,n){let u=Md(i,this.minY),l=this.skyLightSections[u];if(l===null){if(n===0)return;l=new Ke({bitsPerValue:4,capacity:4096}),this.skyLightMask.set(u,1),this.skyLightSections[u]=l}l.set(BH(i,this.minY),n)}setBiome(i,n){i.y<this.minY||i.y>=this.minY+this.worldHeight||(this.biomes[IH(i,this.minY)]=n)}getMask(){return this.sectionMask.toLongArray()}dump(){let i=new Od;return this.sections.forEach(n=>{n!==null&&!n.isEmpty()&&n.write(i)}),i.length?i.toBuffer():Buffer.alloc(4096)}loadBiomes(i){this.biomes=i}dumpBiomes(i){return this.biomes}load(i,n=[[0,65535]]){let u=Od.fromBuffer(i);n=Ke.fromLongArray(n,1),this.sectionMask=Ke.or(this.sectionMask,n);for(let l=0;l<this.numSections;++l){if(!n.get(l))continue;let c,d=u.readInt16BE(),h=u.readUInt8();if(h<=fl.MAX_BITS_PER_BLOCK){c=[];let p=my.read(u);for(let y=0;y<p;++y)c.push(my.read(u))}else c=null;let m=new Ke({bitsPerValue:h>fl.MAX_BITS_PER_BLOCK?this.maxBitsPerBlock:h,capacity:4096}).readBuffer(u,my.read(u)*2);this.sections[l]=new Cd({data:m,palette:c,solidBlockCount:d,maxBitsPerBlock:this.maxBitsPerBlock})}}loadParsedLight(i,n,u,l,c,d){function h(m,p,y,g,v,w){let k=0,x=Ke.fromLongArray(g,1),S=Ke.fromLongArray(w,1);for(let V=0;V<m.length;V++){let E=S.get(V);if(!x.get(V)&&!E)continue;v.set(V,E),y.set(V,1-E);let I=new Ke({bitsPerValue:4,capacity:4096});if(m[V]=I,!E){let N=p[k++];for(let O=0;O<N.length;O++){let T=N[O],R=O*2,J=O*2+1,re=T&15,se=T>>4&15,G=R%16,ne=Math.floor(R/16)%16,ue=Math.floor(R/256),me=J%16,fe=Math.floor(J/16)%16,le=Math.floor(J/256),ce=ue*16*16+ne*16+G,U=le*16*16+fe*16+me;I.set(ce,re),J<4096&&I.set(U,se)}}}}h(this.skyLightSections,i,this.skyLightMask,u,this.emptySkyLightMask,c),h(this.blockLightSections,n,this.blockLightMask,l,this.emptyBlockLightMask,d)}dumpLight(){let i=[],n=[];return this.skyLightSections.forEach((u,l)=>{if(u!==null&&this.skyLightMask.get(l)){let c=new Od;u.writeBuffer(c),i.push(Uint8Array.from(c.toBuffer()))}}),this.blockLightSections.forEach((u,l)=>{if(u!==null&&this.blockLightMask.get(l)){let c=new Od;u.writeBuffer(c),n.push(Uint8Array.from(c.toBuffer()))}}),{skyLight:i,blockLight:n,skyLightMask:this.skyLightMask.toLongArray(),blockLightMask:this.blockLightMask.toLongArray(),emptySkyLightMask:this.emptySkyLightMask.toLongArray(),emptyBlockLightMask:this.emptyBlockLightMask.toLongArray()}}dumpLightNew(){return{skyLightMask:this.skyLightMask.toLongArray(),emptySkyLightMask:this.emptySkyLightMask.toLongArray(),skyLightSections:this.skyLightSections.map(i=>i===null?null:i.toJson()),blockLightMask:this.blockLightMask.toLongArray(),emptyBlockLightMask:this.emptyBlockLightMask.toLongArray(),blockLightSections:this.blockLightSections.map(i=>i===null?null:i.toJson())}}loadLightNew(i){let{skyLightSections:n,blockLightSections:u,skyLightMask:l,blockLightMask:c,emptySkyLightMask:d,emptyBlockLightMask:h}=i;this.skyLightMask=Ke.fromLongArray(l,1),this.emptySkyLightMask=Ke.fromLongArray(d,1),this.skyLightSections=n.map(m=>m===null?null:Ke.fromJson(m)),this.blockLightMask=Ke.fromLongArray(c,1),this.emptyBlockLightMask=Ke.fromLongArray(h,1),this.blockLightSections=u.map(m=>m===null?null:Ke.fromJson(m))}};function Md(t,e){return Math.floor((t.y-e)/16)+1}function IH(t,e){return(t.y-e>>2&63)<<4|(t.z>>2&3)<<2|t.x>>2&3}function _y(t,e){return{x:t.x,y:t.y-e&15,z:t.z}}function BH(t,e){return(t.y-e&15)<<8|t.z<<4|t.x}});var jH=f((Y0t,LH)=>{a();o();s();function Hce(t){let e=Ut()(t);return TH()(e,t)}LH.exports=Hce});var yy=f((X0t,AH)=>{a();o();s();var sa=cl(),Tr=qt(),Gce=Ct(),aa=ar(),dl=class t{constructor(e){this.noSizePrefix=e?.noSizePrefix,this.data=new sa({bitsPerValue:e?.bitsPerValue??Tr.GLOBAL_BITS_PER_BLOCK,capacity:e?.capacity??Tr.BLOCK_SECTION_VOLUME})}get(e){return this.data.get(e)}set(e,r){return this.data.set(e,r),this}write(e){e.writeUInt8(this.data.bitsPerValue),this.noSizePrefix||aa.write(e,this.data.length()),this.data.writeBuffer(e)}readBuffer(e,r){let i=this.noSizePrefix?Math.ceil(this.data.capacity/Math.floor(64/r)):aa.read(e);return this.data.readBuffer(e,i*2),this}toJson(){return JSON.stringify({type:"direct",data:this.data.toJson()})}static fromJson(e){let r=JSON.parse(e);return new t({noSizePrefix:r.noSizePrefix,data:sa.fromJson(r.data),bitsPerValue:r.bitsPerValue})}},hl=class t{constructor(e){this.noSizePrefix=e?.noSizePrefix,this.data=e?.data??new sa({bitsPerValue:e?.bitsPerValue??Tr.MIN_BITS_PER_BLOCK,capacity:e?.capacity??Tr.BLOCK_SECTION_VOLUME}),this.palette=e?.palette??[0],this.maxBits=e?.maxBits??Tr.MAX_BITS_PER_BLOCK,this.maxBitsPerBlock=e?.maxBitsPerBlock??Tr.MAX_BITS_PER_BLOCK}get(e){return this.palette[this.data.get(e)]}set(e,r){let i=this.palette.indexOf(r);if(i<0){i=this.palette.length,this.palette.push(r);let n=Gce(i);if(n>this.data.bitsPerValue)if(n<=this.maxBits)this.data=this.data.resizeTo(n);else return this.convertToDirect(this.maxBitsPerBlock).set(e,r)}return this.data.set(e,i),this}convertToDirect(e){let r=new dl({noSizePrefix:this.noSizePrefix,bitsPerValue:e??Tr.GLOBAL_BITS_PER_BLOCK,capacity:this.data.capacity});for(let i=0;i<this.data.capacity;++i)r.data.set(i,this.get(i));return r}write(e){e.writeUInt8(this.data.bitsPerValue),aa.write(e,this.palette.length);for(let r of this.palette)aa.write(e,r);this.noSizePrefix||aa.write(e,this.data.length()),this.data.writeBuffer(e)}readBuffer(e,r){let i=this.noSizePrefix?Math.ceil(this.data.capacity/Math.floor(64/r)):aa.read(e);return this.data.readBuffer(e,i*2),this}toJson(){return JSON.stringify({type:"indirect",palette:this.palette,maxBits:this.maxBits,maxBitsPerBlock:this.maxBitsPerBlock,data:this.data.toJson()})}static fromJson(e){let r=JSON.parse(e);return new t({noSizePrefix:r.noSizePrefix,palette:r.palette,maxBits:r.maxBits,maxBitsPerBlock:r.maxBitsPerBlock,data:sa.fromJson(r.data)})}},$d=class t{constructor(e){this.noSizePrefix=e?.noSizePrefix,this.value=e?.value??0,this.bitsPerValue=e?.bitsPerValue??Tr.MIN_BITS_PER_BLOCK,this.capacity=e?.capacity??Tr.BLOCK_SECTION_VOLUME,this.maxBits=e?.maxBits??Tr.MAX_BITS_PER_BLOCK,this.maxBitsPerBlock=e?.maxBitsPerBlock??Tr.MAX_BITS_PER_BLOCK}get(e){return this.value}set(e,r){if(r===this.value)return this;let i=new sa({bitsPerValue:this.bitsPerValue,capacity:this.capacity});return i.set(e,1),new hl({noSizePrefix:this.noSizePrefix,data:i,palette:[this.value,r],capacity:this.capacity,bitsPerValue:this.bitsPerValue,maxBits:this.maxBits,maxBitsPerBlock:this.maxBitsPerBlock})}write(e){e.writeUInt8(0),aa.write(e,this.value),this.noSizePrefix||e.writeUInt8(0)}toJson(){return JSON.stringify({type:"single",value:this.value,bitsPerValue:this.bitsPerValue,capacity:this.capacity,maxBits:this.maxBits,maxBitsPerBlock:this.maxBitsPerBlock})}static fromJson(e){let r=JSON.parse(e);return new t({noSizePrefix:r.noSizePrefix,value:r.value,bitsPerValue:r.bitsPerValue,capacity:r.capacity,maxBits:r.maxBits,maxBitsPerBlock:r.maxBitsPerBlock})}};function Yce(t){let e=JSON.parse(t);if(e.type==="direct")return new dl({noSizePrefix:e.noSizePrefix,data:sa.fromJson(e.data)});if(e.type==="indirect")return new hl({noSizePrefix:e.noSizePrefix,palette:e.palette,maxBits:e.maxBits,data:sa.fromJson(e.data),maxBitsPerBlock:e.maxBitsPerBlock});if(e.type==="single")return new $d({noSizePrefix:e.noSizePrefix,value:e.value,bitsPerValue:e.bitsPerValue,capacity:e.capacity,maxBits:e.maxBits,maxBitsPerBlock:e.maxBitsPerBlock})}AH.exports={SingleValueContainer:$d,IndirectPaletteContainer:hl,DirectPaletteContainer:dl,fromJson:Yce}});var RH=f((n2t,$H)=>{a();o();s();var Gt=qt(),Rd=yy(),by=ar(),OH=Rd.SingleValueContainer,CH=Rd.IndirectPaletteContainer,Kce=Rd.DirectPaletteContainer;function MH(t){return t.y<<8|t.z<<4|t.x}var wy=class t{constructor(e){if(this.noSizePrefix=e?.noSizePrefix,this.data=e?.data,this.data){if(this.solidBlockCount=e?.solidBlockCount??0,e?.solidBlockCount==null)for(let r=0;r<Gt.BLOCK_SECTION_VOLUME;++r)this.data.get(r)&&this.solidBlockCount++}else{let r=e?.singleValue??0;this.data=new OH({value:r,bitsPerValue:Gt.MIN_BITS_PER_BLOCK,capacity:Gt.BLOCK_SECTION_VOLUME,maxBits:Gt.MAX_BITS_PER_BLOCK,maxBitsPerBlock:e?.maxBitsPerBlock??Gt.GLOBAL_BITS_PER_BLOCK,noSizePrefix:this.noSizePrefix}),this.solidBlockCount=r?Gt.BLOCK_SECTION_VOLUME:0}this.palette=this.data.palette}toJson(){return JSON.stringify({data:this.data.toJson(),solidBlockCount:this.solidBlockCount})}static fromJson(e){let r=JSON.parse(e);return new t({data:Rd.fromJson(r.data),solidBlockCount:r.solidBlockCount})}get(e){return this.data.get(MH(e))}set(e,r){let i=MH(e),n=this.get(e);r===0&&n!==0?this.solidBlockCount-=1:r!==0&&n===0&&(this.solidBlockCount+=1),this.data=this.data.set(i,r),this.palette=this.data.palette}isEmpty(){return this.solidBlockCount===0}write(e){e.writeInt16BE(this.solidBlockCount),this.data.write(e)}static fromLocalPalette({data:e,palette:r,noSizePrefix:i}){return new t({noSizePrefix:i,data:r.length===1?new OH({noSizePrefix:i,value:r[0],bitsPerValue:Gt.MIN_BITS_PER_BLOCK,capacity:Gt.BIOME_SECTION_VOLUME,maxBits:Gt.MAX_BITS_PER_BLOCK}):new CH({noSizePrefix:i,data:e,palette:r})})}static read(e,r=Gt.GLOBAL_BITS_PER_BLOCK,i){let n=e.readInt16BE(),u=e.readUInt8();if(u>16)throw new Error(`Bits per block is too big: ${u}`);if(u===0){let d=new t({noSizePrefix:i,solidBlockCount:n,singleValue:by.read(e),maxBitsPerBlock:r});return i||e.readUInt8(),d}if(u>Gt.MAX_BITS_PER_BLOCK)return new t({noSizePrefix:i,solidBlockCount:n,data:new Kce({noSizePrefix:i,bitsPerValue:r,capacity:Gt.BLOCK_SECTION_VOLUME}).readBuffer(e,u)});let l=[],c=by.read(e);for(let d=0;d<c;++d)l.push(by.read(e));return new t({noSizePrefix:i,solidBlockCount:n,data:new CH({noSizePrefix:i,bitsPerValue:u,capacity:Gt.BLOCK_SECTION_VOLUME,maxBits:Gt.MAX_BITS_PER_BLOCK,maxBitsPerBlock:r,palette:l}).readBuffer(e,u)})}};$H.exports=wy});var JH=f((o2t,UH)=>{a();o();s();var Lr=qt(),zd=yy(),vy=ar(),zH=zd.SingleValueContainer,DH=zd.IndirectPaletteContainer,Qce=zd.DirectPaletteContainer;function FH(t){return t.y<<4|t.z<<2|t.x}var ky=class t{constructor(e){this.noSizePrefix=e?.noSizePrefix,this.data=e?.data??new zH({noSizePrefix:this.noSizePrefix,value:e?.singleValue??0,bitsPerValue:Lr.MIN_BITS_PER_BIOME,capacity:Lr.BIOME_SECTION_VOLUME,maxBits:Lr.MAX_BITS_PER_BIOME})}toJson(){return this.data.toJson()}static fromJson(e){return new t({data:zd.fromJson(e)})}get(e){return this.data.get(FH(e))}set(e,r){this.data=this.data.set(FH(e),r)}static fromLocalPalette({palette:e,data:r,noSizePrefix:i}){return new t({noSizePrefix:i,data:e.length===1?new zH({noSizePrefix:i,value:e[0],bitsPerValue:Lr.MIN_BITS_PER_BIOME,capacity:Lr.BIOME_SECTION_VOLUME,maxBits:Lr.MAX_BITS_PER_BIOME}):new DH({noSizePrefix:i,palette:e,data:r})})}write(e){this.data.write(e)}static read(e,r=Lr.GLOBAL_BITS_PER_BIOME,i){let n=e.readUInt8();if(n>8)throw new Error(`Bits per biome is too big: ${n}`);if(n===0){let c=new t({noSizePrefix:i,singleValue:vy.read(e)});return i||e.readUInt8(),c}if(n>Lr.MAX_BITS_PER_BIOME)return new t({noSizePrefix:i,data:new Qce({noSizePrefix:i,bitsPerValue:r,capacity:Lr.BIOME_SECTION_VOLUME}).readBuffer(e,n)});let u=[],l=vy.read(e);for(let c=0;c<l;++c)u.push(vy.read(e));return new t({data:new DH({noSizePrefix:i,bitsPerValue:n,capacity:Lr.BIOME_SECTION_VOLUME,maxBits:Lr.MAX_BITS_PER_BIOME,palette:u}).readBuffer(e,n)})}};UH.exports=ky});var XH=f((f2t,ZH)=>{a();o();s();var Dd=oi().SmartBuffer,rt=cl(),pl=RH(),Fd=JH(),Zce=sn(),WH=qt(),HH=Ct(),Xce=-64,efe=384;ZH.exports=(t,e)=>{let r=e.version[">="]("1.21.5");return class QH extends Zce{static get section(){return pl}constructor(n){super(e),this.minY=n?.minY??Xce,this.worldHeight=n?.worldHeight??efe,this.numSections=this.worldHeight>>4,this.maxBitsPerBlock=HH(Object.values(e.blocks).reduce((u,l)=>Math.max(u,l.maxStateId),0)),this.maxBitsPerBiome=HH(Object.values(e.biomes).length),this.sections=n?.sections??Array.from({length:this.numSections},u=>new pl({noSizePrefix:r,maxBitsPerBlock:this.maxBitsPerBlock})),this.biomes=n?.biomes??Array.from({length:this.numSections},u=>new Fd({noSizePrefix:r})),this.skyLightMask=n?.skyLightMask??new rt({bitsPerValue:1,capacity:this.numSections+2}),this.emptySkyLightMask=n?.emptySkyLightMask??new rt({bitsPerValue:1,capacity:this.numSections+2}),this.skyLightSections=n?.skyLightSections??Array(this.numSections+2).fill(null),this.blockLightMask=n?.blockLightMask??new rt({bitsPerValue:1,capacity:this.numSections+2}),this.emptyBlockLightMask=n?.emptyBlockLightMask??new rt({bitsPerValue:1,capacity:this.numSections+2}),this.blockLightSections=n?.blockLightSections??Array(this.numSections+2).fill(null),this.blockEntities=n?.blockEntities??{}}toJson(){return JSON.stringify({worldHeight:this.worldHeight,minY:this.minY,sections:this.sections.map(n=>n.toJson()),biomes:this.biomes.map(n=>n.toJson()),skyLightMask:this.skyLightMask.toLongArray(),emptySkyLightMask:this.emptySkyLightMask.toLongArray(),skyLightSections:this.skyLightSections.map(n=>n===null?null:n.toJson()),blockLightMask:this.blockLightMask.toLongArray(),emptyBlockLightMask:this.emptyBlockLightMask.toLongArray(),blockLightSections:this.blockLightSections.map(n=>n===null?null:n.toJson()),blockEntities:this.blockEntities})}static fromJson(n){let u=JSON.parse(n);return new QH({worldHeight:u.worldHeight,minY:u.minY,sections:u.sections.map(l=>pl.fromJson(l)),biomes:u.biomes.map(l=>Fd.fromJson(l)),blockEntities:u.blockEntities,skyLightMask:rt.fromLongArray(u.skyLightMask,1),emptySkyLightMask:rt.fromLongArray(u.emptyBlockLightMask,1),skyLightSections:u.skyLightSections.map(l=>l===null?null:rt.fromJson(l)),blockLightMask:rt.fromLongArray(u.blockLightMask,1),emptyBlockLightMask:rt.fromLongArray(u.emptySkyLightMask,1),blockLightSections:u.blockLightSections.map(l=>l===null?null:rt.fromJson(l))})}initialize(n){let u={x:0,y:0,z:0},l=this.worldHeight+this.minY;for(u.y=this.minY;u.y<l;u.y++)for(u.z=0;u.z<WH.SECTION_WIDTH;u.z++)for(u.x=0;u.x<WH.SECTION_WIDTH;u.x++){let c=n(u.x,u.y,u.z);c!==null&&this.setBlock(u,c)}}getBlock(n){let u=this.getBlockStateId(n),l=this.getBiome(n),c=t.fromStateId(u,l);return c.light=this.getBlockLight(n),c.skyLight=this.getSkyLight(n),c.entity=this.getBlockEntity(n),c}setBlock(n,u){typeof u.stateId<"u"&&this.setBlockStateId(n,u.stateId),typeof u.biome<"u"&&this.setBiome(n,u.biome.id),typeof u.skyLight<"u"&&this.setSkyLight(n,u.skyLight),typeof u.light<"u"&&this.setBlockLight(n,u.light),u.entity?this.setBlockEntity(n,u.entity):this.removeBlockEntity(n)}getBlockType(n){let u=this.getBlockStateId(n);return e.blocksByStateId[u].id}getBlockData(n){let u=this.getBlockStateId(n);return e.blocksByStateId[u].metadata}getBlockStateId(n){let u=this.sections[n.y-this.minY>>4];return u?u.get(YH(n,this.minY)):0}getBlockLight(n){let u=this.blockLightSections[Ud(n,this.minY)];if(!u)return 0;let c=(n.y-this.minY)%16*16*16+n.z*16+n.x;return u.get(c)}getSkyLight(n){let u=this.skyLightSections[Ud(n,this.minY)];if(!u)return 0;let c=(n.y-this.minY)%16*16*16+n.z*16+n.x;return u.get(c)}getBiome(n){let u=this.biomes[n.y-this.minY>>4];return u?u.get(GH(n,this.minY)):0}setBlockType(n,u){this.setBlockStateId(n,e.blocks[u].minStateId)}setBlockData(n,u){this.setBlockStateId(n,e.blocksByStateId[this.getBlockStateId(n)].minStateId+u)}setBlockStateId(n,u){let l=this.sections[n.y-this.minY>>4];l&&l.set(YH(n,this.minY),u)}setBlockLight(n,u){let l=Ud(n,this.minY),c=this.blockLightSections[l];if(c===null){if(u===0)return;c=new rt({bitsPerValue:4,capacity:4096}),l>this.blockLightMask.capacity&&(this.blockLightMask=this.blockLightMask.resize(l)),this.blockLightMask.set(l,1),this.blockLightSections[l]=c}c.set(KH(n,this.minY),u)}setSkyLight(n,u){let l=Ud(n,this.minY),c=this.skyLightSections[l];if(c===null){if(u===0)return;c=new rt({bitsPerValue:4,capacity:4096}),this.skyLightMask.set(l,1),this.skyLightSections[l]=c}c.set(KH(n,this.minY),u)}setBiome(n,u){let l=this.biomes[n.y-this.minY>>4];l&&l.set(GH(n,this.minY),u)}getMask(){}dump(){let n=new Dd;for(let u=0;u<this.numSections;++u)this.sections[u].write(n),this.biomes[u].write(n);return n.length?n.toBuffer():Buffer.alloc(4096)}loadBiomes(n){}dumpBiomes(n){}load(n){let u=Dd.fromBuffer(n);for(let l=0;l<this.numSections;++l)this.sections[l]=pl.read(u,this.maxBitsPerBlock,r),this.biomes[l]=Fd.read(u,this.maxBitsPerBiome,r)}loadParsedLight(n,u,l,c,d,h){function m(p,y,g,v,w,k){let x=0,S=rt.fromLongArray(v,1),V=rt.fromLongArray(k,1);for(let E=0;E<p.length;E++){let I=V.get(E);if(!S.get(E)&&!I)continue;w.set(E,I),g.set(E,1-I);let N=new rt({bitsPerValue:4,capacity:4096});if(p[E]=N,!I){let O=y[x++];for(let T=0;T<O.length;T++){let R=O[T],J=T*2,re=T*2+1,se=R&15,G=R>>4&15,ne=J%16,ue=Math.floor(J/16)%16,me=Math.floor(J/256),fe=re%16,le=Math.floor(re/16)%16,ce=Math.floor(re/256),U=me*16*16+ue*16+ne,Y=ce*16*16+le*16+fe;N.set(U,se),re<4096&&N.set(Y,G)}}}}m(this.skyLightSections,n,this.skyLightMask,l,this.emptySkyLightMask,d),m(this.blockLightSections,u,this.blockLightMask,c,this.emptyBlockLightMask,h)}_loadBlockLightNibbles(n,u){if(u.length!==2048)throw new Error("Invalid light nibble buffer length "+u.length);let l=Math.abs(this.minY>>4)+1;this.blockLightMask.set(n+l,1);let c=new rt({bitsPerValue:4,capacity:4096});for(let d=0;d<u.length;d++){let h=u[d],m=d*2,p=d*2+1,y=h&15,g=h>>4&15,v=m%16,w=Math.floor(m/16)%16,k=Math.floor(m/256),x=p%16,S=Math.floor(p/16)%16,V=Math.floor(p/256),E=k*16*16+w*16+v,I=V*16*16+S*16+x;c.set(E,y),p<4096&&c.set(I,g)}this.blockLightSections[n+l]=c}_loadSkyLightNibbles(n,u){if(u.length!==2048)throw new Error("Invalid light nibble buffer length: "+u.length);let l=Math.abs(this.minY>>4)+1;this.skyLightMask.set(n+l,1);let c=new rt({bitsPerValue:4,capacity:4096});for(let d=0;d<u.length;d++){let h=u[d],m=d*2,p=d*2+1,y=h&15,g=h>>4&15,v=m%16,w=Math.floor(m/16)%16,k=Math.floor(m/256),x=p%16,S=Math.floor(p/16)%16,V=Math.floor(p/256),E=k*16*16+w*16+v,I=V*16*16+S*16+x;c.set(E,y),p<4096&&c.set(I,g)}this.skyLightSections[n+l]=c}loadSection(n,u,l,c,d){let h=Math.abs(this.minY>>4),m=y=>{throw new Error(`Failed to map ${JSON.stringify(y)} to a block state ID`)},p=y=>{throw new Error(`Failed to map ${JSON.stringify(y)} to a biome ID`)};this.sections[n+h]=pl.fromLocalPalette({noSizePrefix:r,data:rt.fromLongArray(u.data||{},u.bitsPerBlock),palette:u.palette.map(y=>t.fromProperties(y.Name.replace("minecraft:",""),y.Properties||{})??m(y)).map(y=>y.stateId)}),this.biomes[n+h]=Fd.fromLocalPalette({noSizePrefix:r,data:rt.fromLongArray(l.data||{},l.bitsPerBiome),palette:l.palette.map(y=>e.biomesByName[y.replace("minecraft:","")]??p(y)).map(y=>y.id)}),c&&this._loadBlockLightNibbles(n,c),d&&this._loadSkyLightNibbles(n,d)}dumpLight(){let n=[],u=[];return this.skyLightSections.forEach((l,c)=>{if(l!==null&&this.skyLightMask.get(c)){let d=new Dd;l.writeBuffer(d),n.push(Uint8Array.from(d.toBuffer()))}}),this.blockLightSections.forEach((l,c)=>{if(l!==null&&this.blockLightMask.get(c)){let d=new Dd;l.writeBuffer(d),u.push(Uint8Array.from(d.toBuffer()))}}),{skyLight:n,blockLight:u,skyLightMask:this.skyLightMask.toLongArray(),blockLightMask:this.blockLightMask.toLongArray(),emptySkyLightMask:this.emptySkyLightMask.toLongArray(),emptyBlockLightMask:this.emptyBlockLightMask.toLongArray()}}dumpLightNew(){return{skyLightMask:this.skyLightMask.toLongArray(),emptySkyLightMask:this.emptySkyLightMask.toLongArray(),skyLightSections:this.skyLightSections.map(n=>n===null?null:n.toJson()),blockLightMask:this.blockLightMask.toLongArray(),emptyBlockLightMask:this.emptyBlockLightMask.toLongArray(),blockLightSections:this.blockLightSections.map(n=>n===null?null:n.toJson())}}loadLightNew(n){this.skyLightMask=rt.fromLongArray(n.skyLightMask,1),this.emptySkyLightMask=rt.fromLongArray(n.emptySkyLightMask,1),this.skyLightSections=n.skyLightSections.map(u=>u===null?null:rt.fromJson(u)),this.blockLightMask=rt.fromLongArray(n.blockLightMask,1),this.emptyBlockLightMask=rt.fromLongArray(n.emptyBlockLightMask,1),this.blockLightSections=n.blockLightSections.map(u=>u===null?null:rt.fromJson(u))}}};function Ud(t,e){return Math.floor((t.y-e)/16)+1}function GH(t,e){return{x:t.x>>2,y:(t.y-e&15)>>2,z:t.z>>2}}function YH(t,e){return{x:t.x,y:t.y-e&15,z:t.z}}function KH(t,e){return(t.y-e&15)<<8|t.z<<4|t.x}});var gl=f((g2t,eG)=>{a();o();s();function tfe(t){let e=Ut()(t);return XH()(e,t)}eG.exports=tfe});var lG=f((b2t,uG)=>{"use strict";a();o();s();var rfe=wa().Vec3,li=16,Xs=16,qy=128,Vn=li*Xs*qy,_l=Vn/2,Wd=Vn/2,Vy=Vn/2,sG=li*Xs,nfe=li*Xs*4,Jd=Vn+_l+Wd+Vy+nfe+sG,xy=va().readUInt4LE,Sy=va().writeUInt4LE;uG.exports=ife;function ife(t){return oG=Ut()(t),ui.w=li,ui.l=Xs,ui.h=qy,ui.BUFFER_SIZE=Jd,ui.version=t.version,ui}var oG;function ml(t){return t!==void 0}var Hd=function(t){return t.x+li*(t.z+Xs*t.y)},tG=function(t){return Hd(t)},rG=function(t){return Vn+Hd(t)*.5},nG=function(t){return Vn+_l+Hd(t)*.5},iG=function(t){return Vn+_l+Wd+Hd(t)*.5},aG=function(t){return Vn+_l+Wd+Vy+t.z*li+t.x},Zs=function(t){return Vn+_l+Wd+Vy+sG+(t.z*li+t.x)*4},ui=class t{constructor(){this.data=Buffer.alloc(Jd),this.data.fill(0)}toJson(){return JSON.stringify({data:this.data.toJSON()})}static fromJson(e){let r=JSON.parse(e),i=new t;return i.data=Buffer.from(r.data),i}initialize(e){let r=new rfe(0,0,0);for(r.y=0;r.y<qy;r.y++)for(r.z=0;r.z<li;r.z++)for(r.x=0;r.x<Xs;r.x++){let i=e(r.x,r.y,r.z);i!==null&&this.setBlock(r,i)}}getBlock(e){let r=new oG(this.getBlockType(e),this.getBiome(e),this.getBlockData(e));return r.light=this.getBlockLight(e),r.skyLight=this.getSkyLight(e),r}setBlock(e,r){ml(r.type)&&this.setBlockType(e,r.type),ml(r.metadata)&&this.setBlockData(e,r.metadata),ml(r.biome)&&this.setBiome(e,r.biome.id),ml(r.skyLight)&&this.setSkyLight(e,r.skyLight),ml(r.light)&&this.setBlockLight(e,r.light)}getBlockType(e){return e.y<0||e.y>=256?0:this.data.readUInt8(tG(e))}setBlockType(e,r){e.y<0||e.y>=256||this.data.writeUInt8(r,tG(e))}getBlockData(e){return e.y<0||e.y>=256?0:xy(this.data,rG(e))}setBlockData(e,r){e.y<0||e.y>=256||Sy(this.data,r,rG(e))}getBlockLight(e){return e.y<0||e.y>=256?0:xy(this.data,nG(e))}setBlockLight(e,r){e.y<0||e.y>=256||Sy(this.data,r,nG(e))}getSkyLight(e){return e.y<0||e.y>=256?0:xy(this.data,iG(e))}setSkyLight(e,r){e.y<0||e.y>=256||Sy(this.data,r,iG(e))}getBiomeColor(e){let r=this.data.readInt32BE(Zs(e))&16777215;return{r:r>>16,g:r>>8&255,b:r&255}}setBiomeColor(e,r,i,n){this.data.writeInt32BE(this.data.readInt32BE(Zs(e))&4278190080|(r&255)<<16|(i&255)<<8|n&255,Zs(e))}getBiome(e){return(this.data.readInt32BE(Zs(e))&4278190080)>>24}setBiome(e,r){this.data.writeInt32BE(this.data.readInt32BE(Zs(e))&16777215|r<<24,Zs(e))}getHeight(e){return this.data.readUInt8(aG(e))}setHeight(e,r){this.data.writeUInt8(r,aG(e))}load(e){if(!Buffer.isBuffer(e))throw new Error("Data must be a buffer");if(e.length!==Jd)throw new Error(`Data buffer not correct size (was ${e.length}, expected ${Jd})`);this.data=e}dumpBiomes(){}dumpLight(){}loadLight(){}loadBiomes(){}dump(){return this.data}getMask(){return 65535}}});var fG=f((x2t,cG)=>{"use strict";a();o();s();var Ey=va().readUInt4LE,Iy=va().writeUInt4LE,oa=16*16*16,yl=16*16*16/2,Ny=16*16*16/2,afe=16*16*16/2,By=1+(oa+yl+afe+Ny);function ci(t){return 1+(t.x*256+t.z*16+t.y)}var Py=class t{constructor(){this.data=Buffer.alloc(By),this.data.fill(0)}toJson(){return JSON.stringify({data:this.data.toJSON()})}static fromJson(e){let r=JSON.parse(e),i=new t;return i.data=Buffer.from(r.data),i}getBlockType(e){return this.data.readUInt8(ci(e))}setBlockType(e,r){this.data.writeUInt8(r,ci(e))}getBlockLight(e){return Ey(this.data,oa+yl+Ny+ci(e)/2)}setBlockLight(e,r){Iy(this.data,r,oa+yl+Ny+ci(e)/2)}getSkyLight(e){return Ey(this.data,oa+yl+ci(e)/2)}setSkyLight(e,r){Iy(this.data,r,oa+yl+ci(e)/2)}getBlockData(e){return Ey(this.data,oa+ci(e)/2)}setBlockData(e,r){Iy(this.data,r,oa+ci(e)/2)}load(e){if(!Buffer.isBuffer(e))throw new Error("Data must be a buffer");if(e.length!==By)throw new Error(`Data buffer not correct size (was ${e.length}, expected ${By})`);this.data=e}dump(){return this.data}};cG.exports=Py});var _G=f((E2t,mG)=>{"use strict";a();o();s();var dG=fG(),En=wa(),hG=256,pG=256*2,sfe=hG+pG;mG.exports=ofe;function ofe(t){return gG=Ut()(t),fi.w=16,fi.l=16,fi.h=256,fi.BUFFER_SIZE=771+16*10241,fi.version=t.version,fi}var gG;function bl(t){return t!==void 0}var fi=class t{constructor(){this.chunks=new Array(16);for(let e=0;e<this.chunks.length;e++)this.chunks[e]=new dG;this.data=Buffer.alloc(sfe),this.data.fill(0);for(let e=0;e<256;e++)this.data[e]=1}toJson(){return JSON.stringify({data:this.data,sections:this.chunks.map(e=>e.toJson())})}static fromJson(e){let r=JSON.parse(e),i=new t;return i.data=r.data,i.chunks=r.sections.map(n=>dG.fromJson(n)),i}initialize(e){let r=new En(0,0,0);for(r.y=0;r.y<t.h;r.y++)for(r.z=0;r.z<t.w;r.z++)for(r.x=0;r.x<t.l;r.x++){let i=e(r.x,r.y,r.z);i!==null&&this.setBlock(r,i)}}getBlock(e){let r=new gG(this.getBlockType(e),this.getBiome(e),this.getBlockData(e));return r.light=this.getBlockLight(e),r.skyLight=this.getSkyLight(e),r}setBlock(e,r){bl(r.type)&&this.setBlockType(e,r.type),bl(r.metadata)&&this.setBlockData(e,r.metadata),bl(r.biome)&&this.setBiome(e,r.biome.id),bl(r.skyLight)&&this.setSkyLight(e,r.skyLight),bl(r.light)&&this.setBlockLight(e,r.light)}getBlockType(e){let r=this.chunks[e.y>>4];return r?r.getBlockType(new En(e.x,e.y-16*(e.y>>4),e.z)):0}setBlockType(e,r){let i=this.chunks[e.y>>4];return i&&i.setBlockType(new En(e.x,e.y-16*(e.y>>4),e.z),r)}getBlockData(e){let r=this.chunks[e.y>>4];return r?r.getBlockData(new En(e.x,e.y-16*(e.y>>4),e.z)):0}setBlockData(e,r){let i=this.chunks[e.y>>4];return i&&i.setBlockData(new En(e.x,e.y-16*(e.y>>4),e.z),r)}getBlockLight(e){let r=this.chunks[e.y>>4];return r?r.getBlockLight(new En(e.x,e.y-16*(e.y>>4),e.z)):0}setBlockLight(e,r){let i=this.chunks[e.y>>4];return i&&i.setBlockLight(new En(e.x,e.y-16*(e.y>>4),e.z),r)}getSkyLight(e){let r=this.chunks[e.y>>4];return r?r.getSkyLight(new En(e.x,e.y-16*(e.y>>4),e.z)):15}setSkyLight(e,r){let i=this.chunks[e.y>>4];return i&&i.setSkyLight(new En(e.x,e.y-16*(e.y>>4),e.z),r)}getBiomeColor(e){return{x:0,y:0,z:0}}setBiomeColor(e,r,i,n){}getBiome(e){return this.data.readUInt8((e.z<<4)+e.x)}setBiome(e,r){this.data.writeUInt8(r,(e.z<<4)+e.x)}getHeight(e){return this.data.readUInt8((e.z<<4)+e.x)}setHeight(e,r){this.data.writeUInt8(r,(e.z<<4)+e.x)}load(e){if(!Buffer.isBuffer(e))throw new Error("Data must be a buffer");let r=0,i=e.readUInt8(r);if(r+=1,i*10241+1>e.length)throw new Error(`Data buffer not correct size (was ${e.length}, expected ${771+16*10241})`);for(let n=0;n<i;n++)this.chunks[n].load(e.slice(r,r+10241)),r+=10241}size(){let e=1;return e+=this.chunks.length*10241,e+=pG,e+=hG,e+=1,e+=1,e}dumpBiomes(){}dumpLight(){}loadLight(){}loadBiomes(){}dump(){let e=0,r=Buffer.alloc(this.size());r.fill(0),r.writeUInt8(this.chunks.length,e),e+=1;for(let i=0;i<this.chunks.length;i++){let n=this.chunks[i].dump();n.copy(r,e),e+=n.length}return this.data.copy(r,e),e+=this.data.length,r.writeUInt8(0,e),e+=1,r.writeUInt8(0,e),e+=1,r}getMask(){return 65535}}});var di=f((P2t,yG)=>{a();o();s();yG.exports={StorageType:{LocalPersistence:0,NetworkPersistence:1,Runtime:2},ChunkVersion:{v0_9_00:0,v0_9_02:1,v0_9_05:2,v0_17_0:3,v0_18_0:4,vConsole1_to_v0_18_0:5,v1_2_0:6,v1_2_0_bis:7,v1_4_0:8,v1_8_0:9,v1_9_0:10,v1_10_0:11,v1_11_0:12,v1_11_1:13,v1_11_2:14,v1_12_0:15,v1_15_0:16,v1_15_1:17,v1_16_0:18,v1_16_1:19,v1_16_100:20,v1_16_200:21,v1_16_210:22,v1_17_0:25,v1_17_30:29,v1_17_40:31,v1_18_0:39,v1_18_11:39}}});var wl=f((A2t,bG)=>{a();o();s();var Ty=class{constructor(e){this.buffer=e||Buffer.allocUnsafe(1e4),this.readOffset=0,this.writeOffset=0,this.size=this.buffer.length}resizeForWriteIfNeeded(e){if(this.writeOffset+e>this.size){this.size*=2;let r=this.size-this.writeOffset;this.buffer=Buffer.concat([this.buffer,Buffer.allocUnsafe(r)])}if(this.size>2097152)throw new Error("Buffer size exceeded guard limit")}readByte(){return this.buffer[this.readOffset++]}writeUInt8(e){this.resizeForWriteIfNeeded(1),this.buffer.writeUInt8(e,this.writeOffset),this.writeOffset+=1}writeUInt16LE(e){this.resizeForWriteIfNeeded(2),this.buffer.writeUInt16LE(e,this.writeOffset),this.writeOffset+=2}writeUInt32LE(e){this.resizeForWriteIfNeeded(4),this.buffer.writeUInt32LE(e,this.writeOffset),this.writeOffset+=4}writeUInt64LE(e){switch(this.resizeForWriteIfNeeded(8),typeof e){case"bigint":this.buffer.writeBigUInt64LE(e,this.writeOffset);break;case"number":this.buffer.writeUInt32LE(e&4294967295,this.writeOffset),this.buffer.writeUInt32LE(e>>>32,this.writeOffset+4);break;default:throw new Error("Invalid value type")}this.writeOffset+=8}writeFloatLE(e){this.resizeForWriteIfNeeded(4),this.buffer.writeFloatLE(e,this.writeOffset),this.writeOffset+=4}writeDoubleLE(e){this.resizeForWriteIfNeeded(8),this.buffer.writeDoubleLE(e,this.writeOffset),this.writeOffset+=8}writeUInt16BE(e){this.resizeForWriteIfNeeded(2),this.buffer.writeUInt16BE(e,this.writeOffset),this.writeOffset+=2}writeUInt32BE(e){this.resizeForWriteIfNeeded(4),this.buffer.writeUInt32BE(e,this.writeOffset),this.writeOffset+=4}writeUInt64BE(e){switch(this.resizeForWriteIfNeeded(8),typeof e){case"bigint":this.buffer.writeBigUInt64BE(e,this.writeOffset);break;case"number":this.buffer.writeUInt32BE(e>>>32,this.writeOffset),this.buffer.writeUInt32BE(e&4294967295,this.writeOffset+4);break;default:throw new Error("Invalid value type")}this.writeOffset+=8}writeInt8(e){this.resizeForWriteIfNeeded(1),this.buffer.writeInt8(e,this.writeOffset),this.writeOffset+=1}writeInt16LE(e){this.resizeForWriteIfNeeded(2),this.buffer.writeInt16LE(e,this.writeOffset),this.writeOffset+=2}writeInt32LE(e){this.resizeForWriteIfNeeded(4),this.buffer.writeInt32LE(e,this.writeOffset),this.writeOffset+=4}writeInt64LE(e){switch(this.resizeForWriteIfNeeded(8),typeof e){case"bigint":this.buffer.writeBigInt64LE(e,this.writeOffset);break;case"number":this.buffer.writeInt32LE(e&4294967295,this.writeOffset),this.buffer.writeInt32LE(e>>>32,this.writeOffset+4);break;default:throw new Error("Invalid value type")}this.writeOffset+=8}writeInt16BE(e){this.resizeForWriteIfNeeded(2),this.buffer.writeInt16BE(e,this.writeOffset),this.writeOffset+=2}writeInt32BE(e){this.resizeForWriteIfNeeded(4),this.buffer.writeInt32BE(e,this.writeOffset),this.writeOffset+=4}writeInt64BE(e){switch(this.resizeForWriteIfNeeded(8),typeof e){case"bigint":this.buffer.writeBigInt64BE(e,this.writeOffset);break;case"number":this.buffer.writeInt32BE(e>>>32,this.writeOffset),this.buffer.writeInt32BE(e&4294967295,this.writeOffset+4);break;default:throw new Error("Invalid value type")}this.writeOffset+=8}writeFloatBE(e){this.resizeForWriteIfNeeded(4),this.buffer.writeFloatBE(e,this.writeOffset),this.writeOffset+=4}writeDoubleBE(e){this.resizeForWriteIfNeeded(8),this.buffer.writeDoubleBE(e,this.writeOffset),this.writeOffset+=8}readUInt8(){let e=this.buffer.readUInt8(this.readOffset);return this.readOffset+=1,e}readUInt16LE(){let e=this.buffer.readUInt16LE(this.readOffset);return this.readOffset+=2,e}readUInt32LE(){let e=this.buffer.readUInt32LE(this.readOffset);return this.readOffset+=4,e}readUInt64LE(){let e=this.buffer.readBigUInt64LE(this.readOffset);return this.readOffset+=8,e}readUInt16BE(){let e=this.buffer.readUInt16BE(this.readOffset);return this.readOffset+=2,e}readUInt32BE(){let e=this.buffer.readUInt32BE(this.readOffset);return this.readOffset+=4,e}readUInt64BE(){let e=this.buffer.readBigUInt64BE(this.readOffset);return this.readOffset+=8,e}readInt8(){let e=this.buffer.readInt8(this.readOffset);return this.readOffset+=1,e}readInt16LE(){let e=this.buffer.readInt16LE(this.readOffset);return this.readOffset+=2,e}readInt32LE(){let e=this.buffer.readInt32LE(this.readOffset);return this.readOffset+=4,e}readInt64LE(){let e=this.buffer.readBigInt64LE(this.readOffset);return this.readOffset+=8,e}writeStringNT(e,r="utf8"){this.resizeForWriteIfNeeded(e.length+1),this.buffer.write(e,this.writeOffset,e.length,r),this.buffer[this.writeOffset+e.length]=0,this.writeOffset+=e.length+1}writeStringRaw(e,r="utf8"){this.resizeForWriteIfNeeded(e.length),this.buffer.write(e,this.writeOffset,e.length,r),this.writeOffset+=e.length}writeBuffer(e){this.resizeForWriteIfNeeded(e.length),e.copy(this.buffer,this.writeOffset),this.writeOffset+=e.length}readBuffer(e){let r=this.buffer.slice(this.readOffset,this.readOffset+e);return this.readOffset+=e,r}writeVarInt(e){this.resizeForWriteIfNeeded(9);let r=0;for(;e>=128;)this.buffer[this.writeOffset+r]=e&127|128,e=e>>>7,r+=1;this.buffer[this.writeOffset+r]=e,this.writeOffset+=r+1}readVarInt(){let e=0,r=0,i;do i=this.buffer[this.readOffset+r],e|=(i&127)<<7*r,r+=1;while(i&128);return this.readOffset+=r,e}writeVarLong(e){this.resizeForWriteIfNeeded(9);let r=0;for(;e>=0x80n;)this.buffer[this.writeOffset+r]=e&0x7fn|0x80n,e=e>>>7n,r+=1;this.buffer[this.writeOffset+r]=e,this.writeOffset+=r+1}readVarLong(){let e=0n,r=0n,i;do i=this.buffer[this.readOffset+r],e|=(i&0x7fn)<<7n*r,r+=1n;while(i&0x80n);return this.readOffset+=Number(r),e}writeZigZagVarInt(e){let r=e<<1^e>>31;this.writeVarInt(r)}readZigZagVarInt(){let e=this.readVarInt();return e>>>1^-(e&1)}writeZigZagVarlong(e){let r=e<<1n^e>>63n;this.writeVarlong(r)}readZigZagVarlong(){let e=this.readVarInt();return e>>>1n^-(e&1n)}peekUInt8(){return this.buffer[this.readOffset]}peek(){return this.buffer[this.readOffset]}getBuffer(){return this.buffer.slice(0,this.writeOffset)}};bG.exports=Ty});var kG=f(($2t,vG)=>{a();o();s();var{Vec3:ufe}=wa(),wG=wl(),Gd=vr(),vl=t=>`${t.x},${t.y},${t.z}`,lfe=(t,e,r)=>`${t&15},${e},${r&15}`,Ly=class{constructor(e,r){this.x=e.x||0,this.z=e.z||0,this.registry=r,this.chunkVersion=e.chunkVersion,this.blockEntities=e.blockEntities||{},this.sections=[],this.entities={},this.compactOnSave=!1,this.setBounds(0,16)}setBounds(e,r){this.minCY=e,this.maxCY=r,this.maxY=this.maxCY*16,this.minY=this.minCY*16,this.worldHeight=this.maxY+Math.abs(this.minY),this.co=Math.abs(this.minCY)}initialize(e){let r=new ufe;for(r.y=0;r.y<this.worldHeight;r.y++)for(r.z=0;r.z<16;r.z++)for(r.x=0;r.x<16;r.x++){let i=e(r.x,r.y,r.z);i&&this.setBlock(r,i)}}getBlock(e,r=!0){let i=e.y>>4,n=this.sections[this.co+i];if(!n)return this.Block.fromStateId(this.registry.blocksByName.air.defaultState,0);let u=n.getBlock(e.l,e.x,e.y&15,e.z,this.getBiomeId(e));return r&&(u.light=n.blockLight.get(e.x,e.y&15,e.z),u.skyLight=n.skyLight.get(e.x,e.y&15,e.z),u.entity=this.getBlockEntity(e)),u}setBlock(e,r){let i=e.y>>4,n=this.sections[this.co+i];n||(n=new this.Section(this.registry,this.Block,{y:i,subChunkVersion:this.subChunkVersion}),this.sections[this.co+i]=n),n.setBlock(e.l,e.x,e.y&15,e.z,r),r.light!==void 0&&n.blockLight.set(e.x,e.y&15,e.z,r.light),r.skyLight!==void 0&&n.skyLight.set(e.x,e.y&15,e.z,r.skyLight),r.entity&&this.setBlockEntity(e,r.entity)}getBlockStateId(e){let r=e.y>>4,i=this.sections[this.co+r];if(i)return i.getBlockStateId(e.l,e.x,e.y&15,e.z)}setBlockStateId(e,r){let i=e.y>>4,n=this.sections[this.co+i];n||(n=new this.Section(this.registry,this.Block,{y:i,subChunkVersion:this.subChunkVersion}),this.sections[this.co+i]=n),n.setBlockStateId(e.l,e.x,e.y&15,e.z,r)}getBiomeId(e){return 0}setBiomeId(e,r){}getBlocks(){let e=this.sections.map(i=>i.getPalette()).flat(2);return Object.values(e.reduce((i,n)=>(i[n.stateId]||(i[n.stateId]=n),i[n.stateId]=n,i),{}))}setBlockLight(e,r){this.sections[this.co+(e.y>>4)].blockLight.set(e.x,e.y&15,e.z,r)}setSkyLight(e,r){this.sections[this.co+(e.y>>4)].skyLight.set(e.x,e.y&15,e.z,r)}getSkyLight(e){return this.sections[this.co+(e.y>>4)].skyLight.get(e.x,e.y&15,e.z)}getBlockLight(e){return this.sections[this.co+(e.y>>4)].blockLight.get(e.x,e.y&15,e.z)}setBlockEntity(e,r){this.blockEntities[vl(e)]=r}getBlockEntity(e){return this.blockEntities[vl(e)]}addBlockEntity(e){let r=lfe(e.value.x.value,e.value.y.value,e.value.z.value);this.blockEntities[r]=e}removeBlockEntity(e){delete this.blockEntities[vl(e)]}moveBlockEntity(e,r){let i=vl(e),n=vl(r),u=this.blockEntities[i];delete this.blockEntities[i],this.blockEntities[n]=u}addEntity(e){let r=e.value.UniqueID.value.toString();this.entities[r]=e}removeEntity(e){delete this.entities[e]}getSection({y:e}){return this.sections[this.co+(e>>4)]}getSectionAtIndex(e){return this.sections[this.co+e]}setSection(e,r){this.sections[this.co+e]=r}newSection(e,r,i){if(r===void 0){let n=this.Section.create(this.registry,this.Block,{y:e,subChunkVersion:this.subChunkVersion});return this.setSection(e,n),n}else{let n=new this.Section(this.registry,this.Block,{y:e,subChunkVersion:this.subChunkVersion});return n.decode(r,i),this.setSection(e,n),n}}getSectionBlockEntities(e){let r=[];for(let i in this.blockEntities)parseInt(i.split(",")[1])>>4===e&&r.push(this.blockEntities[i]);return r}getSections(){return this.sections}getEntities(){return this.entities}loadEntities(e){this.entities=e}diskEncodeBlockEntities(){let e=[];for(let r in this.blockEntities){let i=this.blockEntities[r];e.push(Gd.writeUncompressed(i,"little"))}return Buffer.concat(e)}diskEncodeEntities(){let e=[];for(let r in this.entities){let i=this.entities[r];e.push(Gd.writeUncompressed(i,"little"))}return Buffer.concat(e)}diskDecodeBlockEntities(e){if(!e)return;let r=e instanceof Buffer?new wG(e):e,i=r.readOffset;for(;r.peek()===10;){let{data:n,metadata:u}=Gd.protos.little.parsePacketBuffer("nbt",e,i);r.readOffset+=u.size,i+=u.size,this.addBlockEntity(n)}}diskDecodeEntities(e){if(!e)return;let r=e instanceof Buffer?new wG(e):e,i=r.readOffset;for(;r.peek()===10;){let{data:n,metadata:u}=Gd.protos.little.parsePacketBuffer("nbt",e,i);r.readOffset+=u.size,i+=u.size,this.addEntity(n)}}toObject(){let e=this.sections.map(l=>l?.toObject()),{x:r,z:i,chunkVersion:n,blockEntities:u}=this;return{x:r,z:i,chunkVersion:n,blockEntities:u,sections:e}}};vG.exports=Ly});var Yd=f((F2t,xG)=>{a();o();s();var eo=class extends Uint32Array{toJSON(){return Array.from(this)}[Symbol.for("nodejs.util.inspect.custom")](){return`[Uint32Array of ${this.length} items { ${this.slice(0,10).toString()} ${this.length>10?", ...":""} }]`}},jy=class t{constructor(e){this.bitsPerBlock=e,this.blocksPerWord=Math.floor(32/e),this.wordsCount=Math.ceil(4096/this.blocksPerWord),this.mask=(1<<e)-1,this.array=new eo(this.wordsCount)}read(e){let r=e.readBuffer(this.wordsCount*4);this.array=new eo(new Uint8Array(r).buffer)}write(e){e.writeBuffer(Buffer.from(this.array.buffer))}static copyFrom(e){let r=new t(e.bitsPerBlock);return Object.assign(r,e),e instanceof Uint32Array?r.array=new eo(e.array.slice()):r.array=new eo(e.array),r}getBuffer(){return Buffer.from(this.array.buffer)}readBits(e,r){return this.array[e]>>r&this.mask}writeBits(e,r,i){this.array[e]&=~(this.mask<<r),this.array[e]|=(i&this.mask)<<r}getIndex(e,r,i){e&=15,r&=15,i&=15;let n=Math.floor((e<<8|i<<4|r)/this.blocksPerWord),u=(e<<8|i<<4|r)%this.blocksPerWord*this.bitsPerBlock;return[n,u]}get(e,r,i){let[n,u]=this.getIndex(e,r,i);return this.readBits(n,u)}set(e,r,i,n){let[u,l]=this.getIndex(e,r,i);this.writeBits(u,l,n)}resize(e){let r=new t(e);for(let i=0;i<16;i++)for(let n=0;n<16;n++)for(let u=0;u<16;u++)r.set(i,n,u,this.get(i,n,u));return r}forEach(e){for(let r=0;r<4096;r++){let i=Math.floor(r/this.blocksPerWord),n=r%this.blocksPerWord*this.bitsPerBlock;e(this.readBits(i,n))}}incrementPalette(e){for(let r=0;r<4096;r++){let i=Math.floor(r/this.blocksPerWord),n=r%this.blocksPerWord*this.bitsPerBlock,u=this.readBits(i,n);e[u].count++}}};xG.exports=jy});var VG=f((H2t,qG)=>{"use strict";a();o();s();var cfe=new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,2,127,127,0,96,3,127,127,127,1,127,3,3,2,1,0,5,3,1,0,1,7,23,3,3,109,101,109,2,0,5,120,120,104,51,50,0,0,5,120,120,104,54,52,0,1,10,152,9,2,242,2,1,4,127,32,0,32,1,106,33,3,32,1,32,1,65,16,79,4,127,32,3,65,16,107,33,6,32,2,65,168,136,141,161,2,106,33,1,32,2,65,137,235,208,208,7,107,33,4,32,2,65,207,140,162,142,6,106,33,5,3,64,32,1,32,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,1,32,4,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,4,32,2,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,2,32,5,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,5,32,6,32,0,65,4,106,34,0,79,13,0,11,32,2,65,12,119,32,5,65,18,119,106,32,4,65,7,119,106,32,1,65,1,119,106,5,32,2,65,177,207,217,178,1,106,11,106,33,2,3,64,32,3,32,0,65,4,106,79,4,64,32,2,32,0,40,2,0,65,189,220,202,149,124,108,106,65,17,119,65,175,214,211,190,2,108,33,2,32,0,65,4,106,33,0,12,1,11,11,3,64,32,0,32,3,73,4,64,32,2,32,0,45,0,0,65,177,207,217,178,1,108,106,65,11,119,65,177,243,221,241,121,108,33,2,32,0,65,1,106,33,0,12,1,11,11,32,2,32,2,65,15,118,115,65,247,148,175,175,120,108,34,0,65,13,118,32,0,115,65,189,220,202,149,124,108,34,0,65,16,118,32,0,115,11,161,6,2,4,126,3,127,32,0,65,4,106,53,2,0,32,0,53,2,0,66,32,134,132,33,2,32,1,32,0,65,8,106,34,6,106,33,7,32,1,65,32,79,4,126,32,7,65,32,107,33,8,32,2,66,214,235,130,238,234,253,137,245,224,0,124,33,3,32,2,66,177,169,172,193,173,184,212,166,61,125,33,4,32,2,66,249,234,208,208,231,201,161,228,225,0,124,33,5,3,64,32,3,32,6,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,3,32,4,32,6,65,8,106,34,6,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,4,32,2,32,6,65,8,106,34,6,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,2,32,5,32,6,65,8,106,34,6,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,5,32,8,32,6,65,8,106,34,6,79,13,0,11,32,2,66,12,137,32,5,66,18,137,124,32,4,66,7,137,124,32,3,66,1,137,124,32,3,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,4,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,2,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,5,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,5,32,2,66,197,207,217,178,241,229,186,234,39,124,11,32,1,173,124,33,2,3,64,32,7,32,6,65,8,106,79,4,64,32,2,32,6,41,3,0,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,27,137,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,33,2,32,6,65,8,106,33,6,12,1,11,11,32,6,65,4,106,32,7,77,4,64,32,2,32,6,53,2,0,66,135,149,175,175,152,182,222,155,158,127,126,133,66,23,137,66,207,214,211,190,210,199,171,217,66,126,66,249,243,221,241,153,246,153,171,22,124,33,2,32,6,65,4,106,33,6,11,3,64,32,6,32,7,73,4,64,32,2,32,6,49,0,0,66,197,207,217,178,241,229,186,234,39,126,133,66,11,137,66,135,149,175,175,152,182,222,155,158,127,126,33,2,32,6,65,1,106,33,6,12,1,11,11,32,0,32,2,32,2,66,33,136,133,66,207,214,211,190,210,199,171,217,66,126,34,2,66,29,136,32,2,133,66,249,243,221,241,153,246,153,171,22,126,34,2,66,32,136,32,2,133,34,2,66,32,136,62,2,0,32,0,65,4,106,32,2,62,2,0,11]),to;function SG(t,e,r){if(e.buffer.byteLength<t.byteLength+r){let i=Math.ceil((t.byteLength+r-e.buffer.byteLength)/65536);e.grow(i)}new Uint8Array(e.buffer,r).set(t)}qG.exports=async function(){let{instance:{exports:{mem:t,xxh32:e,xxh64:r}}}=await WebAssembly.instantiate(cfe);function i(u,l=0){return SG(u,t,0),e(0,u.byteLength,l)>>>0}function n(u,l=0,c=0){SG(u,t,8);let d=new DataView(t.buffer);return d.setUint32(0,l,!0),d.setUint32(4,c,!0),r(0,u.byteLength),d}return{h32:function(u,l=0){return to||(to=new(qc(),Bt(sg)).TextEncoder),i(to.encode(u),l).toString(16)},h32Raw:i,h64:function(u,l=0,c=0){to||(to=new(qc(),Bt(sg)).TextEncoder);let d=n(to.encode(u),l,c);return d.getUint32(0,!0).toString(16)+d.getUint32(4,!0).toString(16)},h64Raw:function(u,l=0,c=0){return new Uint8Array(n(u,l,c).buffer,0,8)}}}});var Oy=f((Q2t,EG)=>{a();o();s();var ffe=VG(),Ay;EG.exports={async getChecksum(t){Ay||(Ay=await ffe());let e=Ay.h64Raw(t),r=BigInt(e[0]|e[1]<<8|e[2]<<16|e[3]<<24),i=BigInt(e[4]|e[5]<<8|e[6]<<16|e[7]<<24);return BigInt.asUintN(32,r)<<32n|BigInt.asUintN(32,i)}}});var My=f((tvt,NG)=>{a();o();s();var In=Yd(),{StorageType:hi}=di(),{getChecksum:dfe}=Oy(),IG=Ct(),BG=wl(),ua=vr(),Cy=class{constructor(e,r,i={}){if(this.registry=e,!e)throw new Error("registry is required");if(this.Block=r,this.y=i.y,this.palette=i.palette||[],this.blocks=[],i.blocks)for(let n of i.blocks)this.blocks.push(In.copyFrom(n));this.subChunkVersion=i.subChunkVersion||8,this.hash=i.hash||null,this.updated=i.updated||!0,this.blockLight=i.blockLight?In.copyFrom(i.blockLight):new In(4),this.skyLight=i.skyLight?In.copyFrom(i.skyLight):new In(4)}static create(e,r,i){let n=new this(e,r,{y:i});return n.blocks.push(new In(1)),n.palette.push([]),n.addToPalette(0,n.registry.blocksByName.air.defaultState,4096),n}decode(e,r){r instanceof Buffer&&(r=new BG(r)),this.subChunkVersion=r.readByte();let i=1;switch(this.subChunkVersion){case 1:this.subChunkVersion=8;break;case 8:case 9:if(i=r.readByte(),this.subChunkVersion>=9&&(this.y=r.readByte()),i>2)throw new Error("Expected storage count to be 1 or 2, got "+i);break;default:throw new Error("Unsupported sub chunk version: "+this.subChunkVersion)}for(let n=0;n<i;n++){let u=r.readByte();if(!(u&1)&&e===hi.Runtime)throw new Error(`Expected network encoding while decoding SubChunk at y=${this.y}`);let c=u>>1;this.loadPalettedBlocks(n,r,c,e)}}loadPalettedBlocks(e,r,i,n){let u=new In(i);u.read(r),this.blocks[e]=u;let l=n===hi.LocalPersistence?r.readUInt32LE():r.readZigZagVarInt();if(l>r.buffer.length||l<1)throw new Error(`Invalid palette size: ${l}`);n===hi.Runtime?this.loadRuntimePalette(e,r,l):this.loadLocalPalette(e,r,l,n===hi.NetworkPersistence),this.blocks[e].incrementPalette(this.palette[e])}loadRuntimePalette(e,r,i){this.palette[e]=[];for(let n=0;n<i;n++){let u=r.readZigZagVarInt(),l=this.registry.blockStates[u];this.palette[e][n]={stateId:u,...l,count:0}}}loadLocalPalette(e,r,i,n){this.palette[e]=[];let u=r.buffer,l=r.readOffset,c;for(c=0;c<i;c++){let{metadata:d,data:h}=ua.protos[n?"littleVarint":"little"].parsePacketBuffer("nbt",u,l);r.readOffset+=d.size,l+=d.size;let{name:m,states:p,version:y}=ua.simplify(h),g=this.Block.fromProperties(m.replace("minecraft:",""),p??{},0);g||(g=this.Block.fromProperties("air",{},0)),this.palette[e][c]={stateId:g.stateId,name:m,states:h.value.states.value,version:y,count:0}}if(c!==i)throw new Error(`Expected ${i} blocks, got ${c}`)}async encode(e,r=!1,i=!0){let n=new BG;if(this.subChunkVersion>=8)this.encodeV8(n,e,i);else throw new Error("Unsupported sub chunk version");let u=n.getBuffer();return r&&(this.hash=await dfe(u),this.updated=!1),u}encodeV8(e,r,i){e.writeUInt8(this.subChunkVersion),e.writeUInt8(this.blocks.length),this.subChunkVersion>=9&&e.writeUInt8(this.y);for(let n=0;n<this.blocks.length;n++)i&&this.compact(n),this.writeStorage(e,n,r)}writeStorage(e,r,i){let n=this.blocks[r],u=n.bitsPerBlock<<1;if(i===hi.Runtime&&(u|=1),e.writeUInt8(u),n.write(e),i===hi.LocalPersistence?e.writeUInt32LE(this.palette[r].length):e.writeZigZagVarInt(this.palette[r].length),i===hi.Runtime)for(let l of this.palette[r])e.writeZigZagVarInt(l.stateId);else for(let l of this.palette[r]){let{name:c,states:d,version:h}=l,m=ua.comp({name:ua.string(c),states:ua.comp(d),version:ua.int(h)}),p=ua.writeUncompressed(m,i===hi.LocalPersistence?"little":"littleVarint");e.writeBuffer(p)}}getBlock(e,r,i,n,u){if(e!==void 0){let l=this.getBlockStateId(e,r,i,n);return this.Block.fromStateId(l,u)}else{let l=this.getBlockStateId(0,r,i,n),c=this.getBlockStateId(1,r,i,n),d=this.Block.fromStateId(l,u);return c&&(d.superimposed=this.Block.fromStateId(c,u),d.superimposed.name.includes("water")&&(d.computedStates.waterlogged=!0)),d}}setBlock(e,r,i,n,u){e!==void 0?this.setBlockStateId(e,r,i,n,u.stateId):(this.setBlockStateId(0,r,i,n,u.stateId),u.superimposed&&this.setBlockStateId(1,r,i,n,u.superimposed.stateId)),this.updated=!0}getBlockStateId(e=0,r,i,n){let u=this.blocks[e];return u?this.palette[e][u.get(r,i,n)].stateId:this.registry.blocksByName.air.defaultState}setBlockStateId(e=0,r,i,n,u){if(!this.palette[e])this.palette[e]=[],this.blocks[e]=new In(4),this.addToPalette(e,this.registry.blocksByName.air.defaultState,4095),this.addToPalette(e,u,1),this.blocks[e].set(r,i,n,this.palette[e].length-1);else{let l=this.blocks[e].get(r,i,n),c=this.palette[e][l];if(c.stateId===u)return;c.count--;for(let d=0;d<this.palette[e].length;d++){let h=this.palette[e][d];if(h.stateId===u){h.count=Math.max(h.count,0)+1,this.blocks[e].set(r,i,n,d);return}}this.addToPalette(e,u,1),this.blocks[e].set(r,i,n,this.palette[e].length-1)}this.updated=!0}addToPalette(e,r,i=0){let n=this.registry.blockStates[r];this.palette[e].push({stateId:r,name:n.name,states:n.states,count:i});let u=IG(this.palette[e].length-1);u>this.blocks[e].bitsPerBlock&&(this.blocks[e]=this.blocks[e].resize(u))}isCompactable(e){let r=0;for(let i of this.palette[e])i.count>0&&r++;return r<this.palette[e].length}compact(e){let r=[],i=[];for(let u of this.palette[e])u.count>0&&r.push(u),i.push(r.length-1);if(r.length===this.palette[e].length)return;let n=new In(IG(r.length-1));for(let u=0;u<16;u++)for(let l=0;l<16;l++)for(let c=0;c<16;c++){let d=this.blocks[e].get(u,l,c);n.set(u,l,c,i[d])}this.blocks[e]=n,this.palette[e]=r}getPaletteEntry(e,r,i,n){return this.palette[e][this.blocks[e].get(r,i,n)]}getPalette(e=0){return this.palette[e].filter(r=>r.count>0)}getBlockLight(e,r,i){return this.blockLight.get(e,r,i)}setBlockLight(e,r,i,n){this.blockLight.set(e,r,i,n)}getSkyLight(e,r,i){return this.skyLight.get(e,r,i)}setSkyLight(e,r,i,n){this.skyLight.set(e,r,i,n)}toObject(){return{y:this.y,palette:this.palette,blocks:this.blocks,subChunkVersion:this.subChunkVersion,hash:this.hash,updated:this.updated,blockLight:this.blockLight,skyLight:this.skyLight}}};NG.exports=Cy});var Qd=f((avt,PG)=>{a();o();s();var{StorageType:kl}=di(),Kd=Yd(),hfe=Ct(),$y=class{constructor(e,r,i={}){this.Biome=tl()(e),this.y=r,this.biomes=i.biomes?Kd.copyFrom(i.biomes):new Kd(1),this.palette=i.palette||[0]}readLegacy2D(e){for(let r=0;r<16;r++)for(let i=0;i<16;i++)this.setBiomeId(r,0,i,e.readByte())}copy(e){this.biomes=Kd.copyFrom(e.biomes),this.palette=JSON.parse(JSON.stringify(e.palette)),this.y=e.y}read(e,r,i){this.palette=[];let n=r.readByte();if((n&1)!==1)throw new Error("Biome palette type must be set to use runtime IDs");let l=n>>1;if(l===0){this.palette.push(e===kl.LocalPersistence?r.readInt32LE():r.readVarInt()>>1);return}if(this.biomes=new Kd(l),this.biomes.read(r),e===kl.Runtime){let c=r.readVarInt()>>1;for(let d=0;d<c;d++)this.palette.push(r.readVarInt()>>1)}else{let c=r.readInt32LE();for(let d=0;d<c;d++)this.palette.push(r.readInt32LE())}}setBiomeId(e,r,i,n){this.palette.includes(n)||this.palette.push(n);let u=hfe(this.palette.length-1);u>this.biomes.bitsPerBlock&&(this.biomes=this.biomes.resize(u)),this.biomes.set(e,r,i,this.palette.indexOf(n))}getBiomeId(e,r,i){return this.palette[this.biomes.get(e,r,i)]}getBiome(e){return new this.Biome(this.getBiomeId(e.x,e.y,e.z))}setBiome(e,r){this.setBiomeId(e.x,e.y,e.z,r.id)}export(e,r){let i=Math.ceil(Math.log2(this.palette.length)),n=i<<1|e===kl.Runtime;if(r.writeUInt8(n),i===0){e===kl.LocalPersistence?r.writeInt32LE(this.palette[0]):r.writeVarInt(this.palette[0]<<1);return}if(this.biomes.write(r),e===kl.Runtime){r.writeVarInt(this.palette.length<<1);for(let u of this.palette)r.writeVarInt(u<<1)}else{r.writeUInt32LE(this.palette.length);for(let u of this.palette)r.writeUInt32LE(u)}}exportLegacy2D(e){for(let r=0;r<16;r++)for(let i=0;i<16;i++){let u=this.getBiomeId(r,0,i);e.writeUInt8(u)}}toObject(){return{y:this.y,biomes:this.biomes,palette:this.palette}}};PG.exports=$y});var Zd=f((lvt,TG)=>{a();o();s();var pfe={ChunkSection:0,Biomes:1},Ry=class{created=Date.now();type;constructor(e){Object.assign(this,e)}};TG.exports={BlobType:pfe,BlobEntry:Ry}});var Fy=f((hvt,jG)=>{a();o();s();var gfe=kG(),zy=My(),Xd=Qd(),{StorageType:eh}=di(),xl=wl(),{BlobType:th,BlobEntry:LG}=Zd(),rh=vr(),{getChecksum:mfe}=Oy(),Dy=class extends gfe{Section=zy;constructor(e={},r,i,n){if(super(e,r),this.Block=i,this.Biome=n,this.biomes=[],this.sections=[],this.biomesUpdated=!0,e.sections?.length)for(let u of e.sections)u?this.sections.push(new this.Section(r,i,u)):this.sections.push(null);if(e.biomes?.length)for(let u of e.biomes)this.biomes.push(u?new Xd(r,u.y,u):null);else this.biomes.push(new Xd(r,0))}getBiome(e){return new this.Biome(this.biomes[0].getBiomeId(e.x,0,e.z))}setBiome(e,r){this.biomes[0].setBiomeId(e.x,0,e.z,r.id),this.biomesUpdated=!0}getBiomeId(e){return this.biomes[0].getBiomeId(e.x,0,e.z)}setBiomeId(e,r){this.biomes[0].setBiomeId(e.x,0,e.z,r),this.biomesUpdated=!0}loadLegacyBiomes(e){e instanceof Buffer&&(e=new xl(e));let r=new Xd(this.registry,0);r.readLegacy2D(e),this.biomes=[r]}loadHeights(e){this.heights=e}getHeights(){return this.heights}writeLegacyBiomes(e){this.biomes[0].exportLegacy2D(e)}writeHeightMap(e){this.heights||(this.heights=new Uint16Array(256));for(let r=0;r<256;r++)e.writeUInt16LE(this.heights[r])}async updateBiomeHash(e){return this.biomesUpdated=!1,this.biomesHash=await mfe(e),this.biomesHash}async networkEncodeNoCache(){let e=[];for(let u in this.blockEntities){let l=this.blockEntities[u];e.push(rh.writeUncompressed(l,"littleVarint"))}let r,i=new xl(Buffer.alloc(256));if(this.biomes[0])this.biomes[0].exportLegacy2D(i),r=i.buffer;else throw Error("No biome section");let n=[];for(let u of this.sections)n.push(await u.encode(eh.Runtime,!1,this.compactOnSave));return Buffer.concat([...n,r,Buffer.from([0]),...e])}async networkEncodeBlobs(e){let r=[];for(let i of this.sections){if(i.updated||!e.get(i.hash)){let n=await i.encode(eh.NetworkPersistence,!0,this.compactOnSave),u=new LG({x:this.x,y:i.y,z:this.z,type:th.ChunkSection,buffer:n});e.set(i.hash,u)}r.push({hash:i.hash,type:th.ChunkSection})}if(this.biomesUpdated||!this.biomesHash||!e.get(this.biomesHash)){if(this.biomes[0]){let i=new xl;this.biomes[0].exportLegacy2D(i),await this.updateBiomeHash(i.getBuffer())}else await this.updateBiomeHash(Buffer.alloc(256));this.biomesUpdated=!1,e.set(this.biomesHash,new LG({x:this.x,z:this.z,type:th.Biomes,buffer:this.biomes}))}return r.push({hash:this.biomesHash,type:th.Biomes}),r}async networkEncode(e){let r=await this.networkEncodeBlobs(e),i=[];for(let n in this.blockEntities){let u=this.blockEntities[n];i.push(rh.writeUncompressed(u,"littleVarint"))}return{blobs:r,payload:Buffer.concat([Buffer.from([0]),...i])}}networkDecodeNoCache(e,r){let i=e instanceof Buffer?new xl(e):e;if(r===-1)throw new RangeError("-1 section count not supported below 1.18");this.sections=[];for(let d=0;d<r;d++){let h=new zy(this.registry,this.Block,{y:d,subChunkVersion:this.subChunkVersion});h.decode(eh.Runtime,i),this.setSection(d,h)}let n=new Xd(this.registry,0);n.readLegacy2D(i),this.biomes=[n];let u=i.readZigZagVarInt();if(i.readBuffer(u).length)throw Error(`Read ${u} border blocks, expected 0`);let c=i.readOffset;for(;i.peek()===10;){let{data:d,metadata:h}=rh.protos.littleVarint.parsePacketBuffer("nbt",i.buffer,c);i.readOffset+=h.size,c+=h.size,this.addBlockEntity(d)}}async networkDecode(e,r,i){if(e=[...e],!e.length)throw new Error("No blobs to decode");if(i){let c=new xl(i),d=c.readBuffer(c.readByte());if(d.length)throw new Error("cannot handle border blocks (read length: "+d.length+")");let h=c.readOffset;for(;c.peek()===10;){let{metadata:m,data:p}=rh.protos.littleVarint.parsePacketBuffer("nbt",i,h);c.readOffset+=m.size,h+=m.size,this.addBlockEntity(p)}}let n=[];for(let c of e)r.has(c)||n.push(c);if(n.length>0)return n;this.sections=[],this.sectionsLen=0;let u=e.pop();for(let c=0;c<e.length;c++){let d=r.get(e[c]),h=new zy(this.registry,this.Block,{y:c,subChunkVersion:this.subChunkVersion});h.decode(eh.NetworkPersistence,d.buffer),this.setSection(c,h)}let l=r.get(u);return this.loadLegacyBiomes(l.buffer),n}toObject(){let e=this.biomes.map(r=>r?.toObject());return{...super.toObject(),biomes:e,biomesUpdated:this.biomesUpdated,version:this.registry.version.minecraftVersion}}toJson(){return JSON.stringify(this.toObject())}};jG.exports=Dy});var nh=f((yvt,AG)=>{a();o();s();var{ChunkVersion:_fe}=di(),yfe=Fy();AG.exports=t=>{let e=t.blockRegistry||t,r=Ut()(e),i=tl()(e);return class extends yfe{constructor(u){super(u,e,r,i),this.chunkVersion=this.chunkVersion||_fe.v1_16_0,this.subChunkVersion=8}static fromJson(u){return new this(JSON.parse(u))}}}});var MG=f((kvt,CG)=>{a();o();s();var bfe=My(),{StorageType:OG}=di(),wfe=Yd(),Uy=class extends bfe{loadRuntimePalette(e,r,i){this.palette[e]=[];for(let n=0;n<i;n++){let u=r.readZigZagVarInt(),l=this.registry.blocksByRuntimeId[u];this.palette[e][n]={stateId:l.stateId,...l,count:0}}}loadPalettedBlocks(e,r,i,n){if(n===OG.Runtime&&i===0){this.palette[e]=[],this.blocks[e]=new wfe(1);let u=r.readVarInt()>>1;this.addToPalette(e,u);return}return super.loadPalettedBlocks(...arguments)}writeStorage(e,r,i){if(i===OG.Runtime&&this.palette[r].length===1){e.writeUInt8(1),e.writeZigZagVarInt(this.palette[r][0].stateId);return}return super.writeStorage(...arguments)}};CG.exports=Uy});var RG=f((Vvt,$G)=>{a();o();s();var vfe=Qd(),Jy=class{constructor(e,r){this.registry=e,this.target=r}getBiome(e){return this.target.getBiome(e)}getBiomeId(e){return this.target.getBiomeId(e)}copy(e){return this.target.copy(e)}promote(e){let r=new vfe(this.registry,e);return r.copy(this.target),r}export(e,r){r.writeUInt8(255)}};$G.exports=Jy});var UG=f((Nvt,FG)=>{a();o();s();var kfe=Fy(),ih=MG(),Wy=Qd(),zG=RG(),{BlobType:Sl,BlobEntry:DG}=Zd(),{StorageType:Qr}=di(),Bn=wl(),ql=vr(),Hy=class extends kfe{Section=ih;bounds=this.setBounds(-4,20);getBiome(e){return new this.Biome(this.getBiomeId(e))}setBiome(e,r){this.setBiomeId(e,r.id)}getBiomeId(e){let r=e.y>>4;return this.biomes[this.co+r]?.getBiomeId(e.x,e.y&15,e.z)??0}setBiomeId(e,r){let i=e.y>>4,n=this.biomes[this.co+i];n?n.setBiomeId||(this.biomes[this.co+i]=n=n.promote(i)):this.biomes[this.co+i]=n=new Wy(this.registry,i),n.setBiomeId(e.x,e.y&15,e.z,r),this.biomesUpdated=!0}loadBiomes(e,r){e instanceof Buffer&&(e=new Bn(e)),this.biomes=[];let i;for(let n=this.minCY;e.peek();n++)if(e.peek()===255){if(!i)throw new Error("No last biome");let u=new zG(this.registry,i);this.biomes.push(u),e.readByte()}else{let u=new Wy(this.registry,n);u.read(r,e),i=u,this.biomes.push(u)}}writeBiomes(e){for(let r=0;r<this.worldHeight>>4;r++){let i=this.biomes[r];i||(this.biomes[r-1]?this.biomes[r]=i=new zG(this.registry,this.biomes[r-1]):this.biomes[r]=i=new Wy(this.registry,r)),i.export(Qr.Runtime,e)}}async networkEncodeNoCache(){let e=new Bn;for(let i of this.biomes)i.export(Qr.Runtime,e);let r=e.getBuffer();return Buffer.concat([r,Buffer.from([0])])}async networkEncodeBlobs(e,r){let i=[];if(r){if(this.biomesUpdated||!this.biomesHash||!e.get(this.biomesHash.toString())){let n=new Bn;for(let l of this.biomes)l.export(Qr.Runtime,n);let u=n.getBuffer();await this.updateBiomeHash(u),this.biomesUpdated=!1,e.set(this.biomesHash.toString(),new DG({x:this.x,z:this.z,type:Sl.Biomes,buffer:this.biomes}))}i.push({hash:this.biomesHash,type:Sl.Biomes})}return i}async networkEncode(e){return{blobs:await this.networkEncodeBlobs(e,!0,!1),payload:Buffer.concat([Buffer.from([0])])}}networkDecodeNoCache(e,r){let i=e instanceof Buffer?new Bn(e):e;if(r!==-1&&r!==-2){this.sections=[];for(let l=0;l<r;l++){let c=new ih(this.registry,this.Block,{y:l,subChunkVersion:this.subChunkVersion});c.decode(Qr.Runtime,i),this.setSection(l,c)}}this.loadBiomes(i,Qr.Runtime);let n=i.readBuffer(i.readZigZagVarInt());if(n.length)throw new Error(`Can't handle border blocks (length: ${n.length})`);let u=i.readOffset;for(;i.peek()===10;){let{data:l,metadata:c}=ql.protos.littleVarint.parsePacketBuffer("nbt",i.buffer,u);i.readOffset+=c.size,u+=c.size,this.addBlockEntity(l)}}async networkDecode(e,r,i){if(i){let u=new Bn(i),l=u.readBuffer(u.readZigZagVarInt());if(l.length)throw new Error(`Can't handle border blocks (length: ${l.length})`)}let n=[];for(let u of e)r.has(u.toString())||n.push(u);if(n.length>0)return n;this.sections=[];for(let u of e){let l=r.get(u.toString());if(l.type===Sl.Biomes){let c=new Bn(l.buffer);this.loadBiomes(c,Qr.NetworkPersistence,u)}else throw l.type===Sl.ChunkSection?new Error("Can't accept chunk sections in networkDecode, these Blobs should be sent as individual sections"):Error("Unknown blob type: "+l.type)}return n}async networkDecodeSubChunkNoCache(e,r){let i=new Bn(r),n=new ih(this.registry,this.Block,{y:e,subChunkVersion:this.subChunkVersion});n.decode(Qr.Runtime,i),this.setSection(e,n);let u=i.readOffset;for(;i.peek()===10;){let{data:l,metadata:c}=ql.protos.littleVarint.parsePacketBuffer("nbt",r,u);i.readOffset+=c.size,u+=c.size,this.addBlockEntity(l)}}async networkEncodeSubChunkNoCache(e){let r=this.getSectionBlockEntities(e),n=await this.getSectionAtIndex(e).encode(Qr.Runtime,!1,this.compactOnSave),u=[];for(let l of r)u.push(ql.writeUncompressed(l,"littleVarint"));return Buffer.concat([n,...u])}async networkDecodeSubChunk(e,r,i){if(i){let u=new Bn(i),l=0;for(;u.peekUInt8()===10;){let{data:c,metadata:d}=ql.protos.littleVarint.parsePacketBuffer("nbt",i,l);u.readOffset+=d.size,l+=d.size,this.addBlockEntity(c)}}let n=[];for(let u of e)r.has(u.toString())||n.push(u);if(n.length>0)return n;this.sections=[],this.sectionsLen=0;for(let u of e){let l=r.get(u.toString()),c=new Bn(l.buffer),d=new ih(this.registry,this.Block,{y:u.y,subChunkVersion:this.subChunkVersion});await d.decode(Qr.Runtime,c),this.setSection(d.y,d)}return n}async networkEncodeSubChunk(e,r){let i=this.getSectionBlockEntities(e),n=this.getSectionAtIndex(e);if(n.updated){let l=await n.encode(Qr.Runtime,!0,this.compactOnSave),c=new DG({x:this.x,y:n.y,z:this.z,type:Sl.ChunkSection,buffer:l});r.set(n.hash.toString(),c)}let u=[];for(let l of i)u.push(ql.writeUncompressed(l,"littleVarint"));return[n.hash,Buffer.concat(u)]}toObject(){return{...super.toObject(),version:this.registry.version.minecraftVersion}}};FG.exports=Hy});var Vl=f((Avt,JG)=>{a();o();s();var{ChunkVersion:xfe}=di(),Sfe=UG();JG.exports=t=>{let e=t.blockRegistry||t,r=Ut()(e),i=tl()(e);return class extends Sfe{constructor(u){super(u,e,r,i),this.chunkVersion=this.chunkVersion||xfe.v1_18_0,this.subChunkVersion=9}static fromJson(u){return new this(JSON.parse(u))}}}});var HG=f(($vt,ah)=>{a();o();s();var qfe={pc:{1.8:AW(),1.9:ol(),"1.10":ol(),1.11:ol(),1.12:ol(),1.13:sH(),1.14:pH(),1.15:wH(),1.16:EH(),1.17:jH(),1.18:gl(),1.19:gl(),"1.20":gl(),1.21:gl()},bedrock:{.14:lG(),"1.0":_G(),1.3:nh(),1.16:nh(),1.17:nh(),1.18:Vl(),1.19:Vl(),"1.20":Vl(),1.21:Vl()}};ah.exports=Vfe;var WG=Zd();ah.exports.BlobEntry=WG.BlobEntry;ah.exports.BlobType=WG.BlobType;function Vfe(t){let e=typeof t=="string"?el()(t):t,r=e.version;if(!r)throw new Error("Specified version does not exist");try{return qfe[r.type][r.majorVersion](e)}catch(i){throw i instanceof TypeError?(console.error(i),new Error(`[Prismarine-chunk] No chunk implementation for ${r?.type} ${r?.majorVersion} found`)):(console.log(`Error while loading ${r.type} - ${r.majorVersion}`),i)}}});var YG=f((Fvt,GG)=>{a();o();s();GG.exports=HG()});var Zy=f((c3t,Ofe)=>{Ofe.exports={grass:{data:[{keys:["badlands","badlands_plateau","eroded_badlands","modified_badlands_plateau","modified_wooded_badlands_plateau","wooded_badlands_plateau"],color:9470285},{keys:["desert","desert_hills","desert_lakes","savanna","savanna_plateau","shattered_savanna","shattered_savanna_plateau","nether_wastes","soul_sand_valley","crimson_forest","warped_forest","basalt_deltas"],color:12564309},{keys:["jungle","jungle_hills","modified_jungle","bamboo_jungle","bamboo_jungle_hills"],color:5884220},{keys:["jungle_edge","modified_jungle_edge"],color:6604607},{keys:["forest","flower_forest","wooded_hills"],color:7979098},{keys:["birch_forest","birch_forest_hills","tall_birch_forest","tall_birch_hills"],color:8960871},{keys:["dark_forest","dark_forest_hills"],color:5274162},{keys:["swamp","swamp_hills"],color:6975545},{keys:["swamp","swamp_hills"],color:5011004},{keys:["plains","sunflower_plains","beach"],color:9551193},{keys:["ocean","deep_ocean","warm_ocean","deep_warm_ocean","lukewarm_ocean","deep_lukewarm_ocean","cold_ocean","deep_cold_ocean","deep_frozen_ocean","river","the_end","small_end_islands","end_barrens","end_midlands","end_highlands","the_void"],color:9353585},{keys:["mushroom_fields","mushroom_field_shore"],color:5622079},{keys:["mountains","mountain_edge","gravelly_mountains","modified_gravelly_mountains","wooded_mountains","stone_shore"],color:9090697},{keys:["snowy_beach"],color:8631699},{keys:["giant_tree_taiga","giant_tree_taiga_hills"],color:8829055},{keys:["taiga","taiga_hills","taiga_mountains","giant_spruce_taiga","giant_spruce_taiga_hills"],color:8828803},{keys:["snowy_tundra","snowy_mountains","ice_spikes","snowy_taiga","snowy_taiga_hills","snowy_taiga_mountains","frozen_ocean","frozen_river"],color:8434839}],default:7979098},foliage:{data:[{keys:["badlands","badlands_plateau","eroded_badlands","modified_badlands_plateau","modified_wooded_badlands_plateau","wooded_badlands_plateau"],color:10387789},{keys:["desert","desert_hills","desert_lakes","savanna","savanna_plateau","shattered_savanna","shattered_savanna_plateau","nether_wastes","soul_sand_valley","crimson_forest","warped_forest","basalt_deltas"],color:11445290},{keys:["jungle","jungle_hills","modified_jungle","bamboo_jungle","bamboo_jungle_hills"],color:3193611},{keys:["jungle_edge","modified_jungle_edge"],color:4110351},{keys:["forest","flower_forest","wooded_hills","dark_forest","dark_forest_hills"],color:5877296},{keys:["birch_forest","birch_forest_hills","tall_birch_forest","tall_birch_hills"],color:7055681},{keys:["swamp","swamp_hills"],color:6975545},{keys:["plains","sunflower_plains","beach"],color:7842607},{keys:["ocean","deep_ocean","warm_ocean","deep_warm_ocean","lukewarm_ocean","deep_lukewarm_ocean","cold_ocean","deep_cold_ocean","deep_frozen_ocean","river","the_end","small_end_islands","end_barrens","end_midlands","end_highlands","the_void"],color:7448397},{keys:["mushroom_fields","mushroom_field_shore"],color:2865935},{keys:["mountains","mountain_edge","gravelly_mountains","modified_gravelly_mountains","wooded_mountains","stone_shore"],color:7185259},{keys:["snowy_beach"],color:6595192},{keys:["giant_tree_taiga","giant_tree_taiga_hills"],color:6858079},{keys:["taiga","taiga_hills","taiga_mountains","giant_spruce_taiga","giant_spruce_taiga_hills"],color:6857828},{keys:["snowy_tundra","snowy_mountains","ice_spikes","snowy_taiga","snowy_taiga_hills","snowy_taiga_mountains","frozen_ocean","frozen_river"],color:6332795}],default:5877296},water:{data:[{keys:["cold_ocean","deep_cold_ocean"],color:4020182},{keys:["frozen_ocean","deep_frozen_ocean","frozen_river"],color:3750089},{keys:["lukewarm_ocean","deep_lukewarm_ocean"],color:4566514},{keys:["swamp","swamp_hills"],color:6388580},{keys:["warm_ocean","deep_warm_ocean"],color:4445678}],default:4159204},redstone:{data:[{keys:[0],color:4915200},{keys:[1],color:7274496},{keys:[2],color:7929856},{keys:[3],color:8519680},{keys:[4],color:9175040},{keys:[5],color:9895936},{keys:[6],color:10551296},{keys:[7],color:11206656},{keys:[8],color:11862016},{keys:[9],color:12517376},{keys:[10],color:13238272},{keys:[11],color:13828096},{keys:[12],color:14483456},{keys:[13],color:15140352},{keys:[14],color:15801088},{keys:[15],color:16527616}],default:4915200},constant:{data:[{keys:["birch_leaves"],color:8431445},{keys:["spruce_leaves"],color:6396257},{keys:["lily_pad"],color:2129968}],default:0}}});var lY=f((f3t,uY)=>{a();o();s();uY.exports={tints:Zy()}});a();o();s();a();o();s();var Ow=bh(wa(),1);var Qe=Ow.default.Vec3;a();o();s();var tY=bh(YG(),1),Gy=bh(pd(),1);var KG={lightLevels:{lava:15,brown_mushroom:1,torch:14,wall_torch:14,fire:15,soul_fire:10,soul_torch:10,soul_wall_torch:10,glowstone:15,nether_portal:11,jack_o_lantern:15,enchanting_table:7,brewing_stand:1,lava_cauldron:15,end_portal:15,end_portal_frame:1,dragon_egg:1,ender_chest:7,beacon:15,sea_lantern:15,end_rod:14,end_gateway:15,magma_block:3,conduit:15,lantern:15,soul_lantern:10,shroomlight:15,crying_obsidian:10,amethyst_cluster:5,large_amethyst_bud:4,medium_amethyst_bud:2,small_amethyst_bud:1,sculk_sensor:1,sculk_catalyst:6,ochre_froglight:15,verdant_froglight:15,pearlescent_froglight:15},noOcclusions:{mangrove_roots:!0,oak_leaves:!0,spruce_leaves:!0,birch_leaves:!0,jungle_leaves:!0,acacia_leaves:!0,cherry_leaves:!0,dark_oak_leaves:!0,mangrove_leaves:!0,azalea_leaves:!0,flowering_azalea_leaves:!0,glass:!0,white_bed:!0,orange_bed:!0,magenta_bed:!0,light_blue_bed:!0,yellow_bed:!0,lime_bed:!0,pink_bed:!0,gray_bed:!0,light_gray_bed:!0,cyan_bed:!0,purple_bed:!0,blue_bed:!0,brown_bed:!0,green_bed:!0,red_bed:!0,black_bed:!0,moving_piston:!0,spawner:!0,oak_door:!0,ladder:!0,iron_door:!0,ice:!0,white_stained_glass:!0,orange_stained_glass:!0,magenta_stained_glass:!0,light_blue_stained_glass:!0,yellow_stained_glass:!0,lime_stained_glass:!0,pink_stained_glass:!0,gray_stained_glass:!0,light_gray_stained_glass:!0,cyan_stained_glass:!0,purple_stained_glass:!0,blue_stained_glass:!0,brown_stained_glass:!0,green_stained_glass:!0,red_stained_glass:!0,black_stained_glass:!0,oak_trapdoor:!0,spruce_trapdoor:!0,birch_trapdoor:!0,jungle_trapdoor:!0,acacia_trapdoor:!0,cherry_trapdoor:!0,dark_oak_trapdoor:!0,mangrove_trapdoor:!0,bamboo_trapdoor:!0,iron_bars:!0,chain:!0,glass_pane:!0,lily_pad:!0,brewing_stand:!0,cauldron:!0,dragon_egg:!0,cocoa:!0,beacon:!0,hopper:!0,white_stained_glass_pane:!0,orange_stained_glass_pane:!0,magenta_stained_glass_pane:!0,light_blue_stained_glass_pane:!0,yellow_stained_glass_pane:!0,lime_stained_glass_pane:!0,pink_stained_glass_pane:!0,gray_stained_glass_pane:!0,light_gray_stained_glass_pane:!0,cyan_stained_glass_pane:!0,purple_stained_glass_pane:!0,blue_stained_glass_pane:!0,brown_stained_glass_pane:!0,green_stained_glass_pane:!0,red_stained_glass_pane:!0,black_stained_glass_pane:!0,slime_block:!0,barrier:!0,light:!0,iron_trapdoor:!0,spruce_door:!0,birch_door:!0,jungle_door:!0,acacia_door:!0,cherry_door:!0,dark_oak_door:!0,mangrove_door:!0,bamboo_door:!0,end_rod:!0,chorus_plant:!0,chorus_flower:!0,frosted_ice:!0,turtle_egg:!0,sniffer_egg:!0,sea_pickle:!0,conduit:!0,bamboo:!0,lantern:!0,soul_lantern:!0,campfire:!0,soul_campfire:!0,crimson_trapdoor:!0,warped_trapdoor:!0,crimson_door:!0,warped_door:!0,honey_block:!0,candle:!0,white_candle:!0,orange_candle:!0,magenta_candle:!0,light_blue_candle:!0,yellow_candle:!0,lime_candle:!0,pink_candle:!0,gray_candle:!0,light_gray_candle:!0,cyan_candle:!0,purple_candle:!0,blue_candle:!0,brown_candle:!0,green_candle:!0,red_candle:!0,black_candle:!0,amethyst_cluster:!0,tinted_glass:!0,lightning_rod:!0,pointed_dripstone:!0,azalea:!0,flowering_azalea:!0,frogspawn:!0,decorated_pot:!0},colors:{stone:"rgb(112, 112, 112)",granite:"rgb(151, 109, 77)",polished_granite:"rgb(151, 109, 77)",diorite:"rgb(255, 252, 245)",polished_diorite:"rgb(255, 252, 245)",andesite:"rgb(112, 112, 112)",polished_andesite:"rgb(112, 112, 112)",grass_block:"rgb(127, 178, 56)",dirt:"rgb(151, 109, 77)",coarse_dirt:"rgb(151, 109, 77)",podzol:"rgb(129, 86, 49)",cobblestone:"rgb(112, 112, 112)",oak_planks:"rgb(143, 119, 72)",spruce_planks:"rgb(129, 86, 49)",birch_planks:"rgb(247, 233, 163)",jungle_planks:"rgb(151, 109, 77)",acacia_planks:"rgb(216, 127, 51)",cherry_planks:"rgb(209, 177, 161)",dark_oak_planks:"rgb(102, 76, 51)",mangrove_planks:"rgb(153, 51, 51)",bamboo_planks:"rgb(229, 229, 51)",bamboo_mosaic:"rgb(229, 229, 51)",oak_sapling:"rgb(0, 124, 0)",spruce_sapling:"rgb(0, 124, 0)",birch_sapling:"rgb(0, 124, 0)",jungle_sapling:"rgb(0, 124, 0)",acacia_sapling:"rgb(0, 124, 0)",cherry_sapling:"rgb(242, 127, 165)",dark_oak_sapling:"rgb(0, 124, 0)",mangrove_propagule:"rgb(0, 124, 0)",bedrock:"rgb(112, 112, 112)",water:"rgb(64, 64, 255)",lava:"rgb(255, 0, 0)",sand:"rgb(247, 233, 163)",suspicious_sand:"rgb(247, 233, 163)",red_sand:"rgb(216, 127, 51)",gravel:"rgb(112, 112, 112)",suspicious_gravel:"rgb(112, 112, 112)",gold_ore:"rgb(112, 112, 112)",deepslate_gold_ore:"rgb(100, 100, 100)",iron_ore:"rgb(112, 112, 112)",deepslate_iron_ore:"rgb(100, 100, 100)",coal_ore:"rgb(112, 112, 112)",deepslate_coal_ore:"rgb(100, 100, 100)",nether_gold_ore:"rgb(112, 2, 0)",mangrove_roots:"rgb(129, 86, 49)",muddy_mangrove_roots:"rgb(129, 86, 49)",oak_wood:"rgb(143, 119, 72)",spruce_wood:"rgb(129, 86, 49)",birch_wood:"rgb(247, 233, 163)",jungle_wood:"rgb(151, 109, 77)",acacia_wood:"rgb(76, 76, 76)",cherry_wood:"rgb(57, 41, 35)",dark_oak_wood:"rgb(102, 76, 51)",mangrove_wood:"rgb(153, 51, 51)",stripped_oak_wood:"rgb(143, 119, 72)",stripped_spruce_wood:"rgb(129, 86, 49)",stripped_birch_wood:"rgb(247, 233, 163)",stripped_jungle_wood:"rgb(151, 109, 77)",stripped_acacia_wood:"rgb(216, 127, 51)",stripped_cherry_wood:"rgb(160, 77, 78)",stripped_dark_oak_wood:"rgb(102, 76, 51)",oak_leaves:"rgb(0, 124, 0)",spruce_leaves:"rgb(0, 124, 0)",birch_leaves:"rgb(0, 124, 0)",jungle_leaves:"rgb(0, 124, 0)",acacia_leaves:"rgb(0, 124, 0)",cherry_leaves:"rgb(242, 127, 165)",dark_oak_leaves:"rgb(0, 124, 0)",mangrove_leaves:"rgb(0, 124, 0)",azalea_leaves:"rgb(0, 124, 0)",flowering_azalea_leaves:"rgb(0, 124, 0)",sponge:"rgb(229, 229, 51)",wet_sponge:"rgb(229, 229, 51)",lapis_ore:"rgb(112, 112, 112)",deepslate_lapis_ore:"rgb(100, 100, 100)",lapis_block:"rgb(74, 128, 255)",dispenser:"rgb(112, 112, 112)",sandstone:"rgb(247, 233, 163)",chiseled_sandstone:"rgb(247, 233, 163)",cut_sandstone:"rgb(247, 233, 163)",note_block:"rgb(143, 119, 72)",sticky_piston:"rgb(112, 112, 112)",cobweb:"rgb(199, 199, 199)",grass:"rgb(0, 124, 0)",fern:"rgb(0, 124, 0)",dead_bush:"rgb(143, 119, 72)",seagrass:"rgb(64, 64, 255)",tall_seagrass:"rgb(64, 64, 255)",piston:"rgb(112, 112, 112)",piston_head:"rgb(112, 112, 112)",white_wool:"rgb(255, 255, 255)",orange_wool:"rgb(216, 127, 51)",magenta_wool:"rgb(178, 76, 216)",light_blue_wool:"rgb(102, 153, 216)",yellow_wool:"rgb(229, 229, 51)",lime_wool:"rgb(127, 204, 25)",pink_wool:"rgb(242, 127, 165)",gray_wool:"rgb(76, 76, 76)",light_gray_wool:"rgb(153, 153, 153)",cyan_wool:"rgb(76, 127, 153)",purple_wool:"rgb(127, 63, 178)",blue_wool:"rgb(51, 76, 178)",brown_wool:"rgb(102, 76, 51)",green_wool:"rgb(102, 127, 51)",red_wool:"rgb(153, 51, 51)",black_wool:"rgb(25, 25, 25)",moving_piston:"rgb(112, 112, 112)",dandelion:"rgb(0, 124, 0)",torchflower:"rgb(0, 124, 0)",poppy:"rgb(0, 124, 0)",blue_orchid:"rgb(0, 124, 0)",allium:"rgb(0, 124, 0)",azure_bluet:"rgb(0, 124, 0)",red_tulip:"rgb(0, 124, 0)",orange_tulip:"rgb(0, 124, 0)",white_tulip:"rgb(0, 124, 0)",pink_tulip:"rgb(0, 124, 0)",oxeye_daisy:"rgb(0, 124, 0)",cornflower:"rgb(0, 124, 0)",wither_rose:"rgb(0, 124, 0)",lily_of_the_valley:"rgb(0, 124, 0)",brown_mushroom:"rgb(102, 76, 51)",red_mushroom:"rgb(153, 51, 51)",gold_block:"rgb(250, 238, 77)",iron_block:"rgb(167, 167, 167)",bricks:"rgb(153, 51, 51)",tnt:"rgb(255, 0, 0)",bookshelf:"rgb(143, 119, 72)",chiseled_bookshelf:"rgb(143, 119, 72)",mossy_cobblestone:"rgb(112, 112, 112)",obsidian:"rgb(25, 25, 25)",fire:"rgb(255, 0, 0)",soul_fire:"rgb(102, 153, 216)",spawner:"rgb(112, 112, 112)",chest:"rgb(143, 119, 72)",diamond_ore:"rgb(112, 112, 112)",deepslate_diamond_ore:"rgb(100, 100, 100)",diamond_block:"rgb(92, 219, 213)",crafting_table:"rgb(143, 119, 72)",wheat:"rgb(0, 124, 0)",farmland:"rgb(151, 109, 77)",furnace:"rgb(112, 112, 112)",oak_sign:"rgb(143, 119, 72)",birch_sign:"rgb(247, 233, 163)",acacia_sign:"rgb(216, 127, 51)",oak_wall_sign:"rgb(143, 119, 72)",birch_wall_sign:"rgb(247, 233, 163)",acacia_wall_sign:"rgb(216, 127, 51)",birch_hanging_sign:"rgb(247, 233, 163)",acacia_hanging_sign:"rgb(216, 127, 51)",cherry_hanging_sign:"rgb(160, 77, 78)",crimson_hanging_sign:"rgb(148, 63, 97)",warped_hanging_sign:"rgb(58, 142, 140)",bamboo_hanging_sign:"rgb(229, 229, 51)",spruce_wall_hanging_sign:"rgb(143, 119, 72)",birch_wall_hanging_sign:"rgb(247, 233, 163)",acacia_wall_hanging_sign:"rgb(216, 127, 51)",cherry_wall_hanging_sign:"rgb(160, 77, 78)",crimson_wall_hanging_sign:"rgb(148, 63, 97)",warped_wall_hanging_sign:"rgb(58, 142, 140)",bamboo_wall_hanging_sign:"rgb(229, 229, 51)",stone_pressure_plate:"rgb(112, 112, 112)",iron_door:"rgb(167, 167, 167)",redstone_ore:"rgb(112, 112, 112)",deepslate_redstone_ore:"rgb(100, 100, 100)",snow:"rgb(255, 255, 255)",ice:"rgb(160, 160, 255)",snow_block:"rgb(255, 255, 255)",cactus:"rgb(0, 124, 0)",clay:"rgb(164, 168, 184)",sugar_cane:"rgb(0, 124, 0)",jukebox:"rgb(151, 109, 77)",pumpkin:"rgb(216, 127, 51)",netherrack:"rgb(112, 2, 0)",soul_sand:"rgb(102, 76, 51)",soul_soil:"rgb(102, 76, 51)",basalt:"rgb(25, 25, 25)",polished_basalt:"rgb(25, 25, 25)",glowstone:"rgb(247, 233, 163)",carved_pumpkin:"rgb(216, 127, 51)",jack_o_lantern:"rgb(216, 127, 51)",oak_trapdoor:"rgb(143, 119, 72)",spruce_trapdoor:"rgb(129, 86, 49)",birch_trapdoor:"rgb(247, 233, 163)",jungle_trapdoor:"rgb(151, 109, 77)",acacia_trapdoor:"rgb(216, 127, 51)",cherry_trapdoor:"rgb(209, 177, 161)",dark_oak_trapdoor:"rgb(102, 76, 51)",mangrove_trapdoor:"rgb(153, 51, 51)",bamboo_trapdoor:"rgb(229, 229, 51)",stone_bricks:"rgb(112, 112, 112)",mossy_stone_bricks:"rgb(112, 112, 112)",cracked_stone_bricks:"rgb(112, 112, 112)",chiseled_stone_bricks:"rgb(112, 112, 112)",mud_bricks:"rgb(135, 107, 98)",infested_stone:"rgb(164, 168, 184)",infested_cobblestone:"rgb(164, 168, 184)",infested_stone_bricks:"rgb(164, 168, 184)",infested_mossy_stone_bricks:"rgb(164, 168, 184)",infested_cracked_stone_bricks:"rgb(164, 168, 184)",infested_chiseled_stone_bricks:"rgb(164, 168, 184)",brown_mushroom_block:"rgb(151, 109, 77)",red_mushroom_block:"rgb(153, 51, 51)",mushroom_stem:"rgb(199, 199, 199)",melon:"rgb(127, 204, 25)",attached_pumpkin_stem:"rgb(0, 124, 0)",attached_melon_stem:"rgb(0, 124, 0)",pumpkin_stem:"rgb(0, 124, 0)",melon_stem:"rgb(0, 124, 0)",vine:"rgb(0, 124, 0)",glow_lichen:"rgb(127, 167, 150)",mycelium:"rgb(127, 63, 178)",lily_pad:"rgb(0, 124, 0)",nether_bricks:"rgb(112, 2, 0)",nether_brick_fence:"rgb(112, 2, 0)",nether_wart:"rgb(153, 51, 51)",enchanting_table:"rgb(153, 51, 51)",brewing_stand:"rgb(167, 167, 167)",cauldron:"rgb(112, 112, 112)",end_portal:"rgb(25, 25, 25)",end_portal_frame:"rgb(102, 127, 51)",end_stone:"rgb(247, 233, 163)",dragon_egg:"rgb(25, 25, 25)",cocoa:"rgb(0, 124, 0)",emerald_ore:"rgb(112, 112, 112)",deepslate_emerald_ore:"rgb(100, 100, 100)",ender_chest:"rgb(112, 112, 112)",emerald_block:"rgb(0, 217, 58)",command_block:"rgb(102, 76, 51)",beacon:"rgb(92, 219, 213)",carrots:"rgb(0, 124, 0)",potatoes:"rgb(0, 124, 0)",anvil:"rgb(167, 167, 167)",chipped_anvil:"rgb(167, 167, 167)",damaged_anvil:"rgb(167, 167, 167)",trapped_chest:"rgb(143, 119, 72)",light_weighted_pressure_plate:"rgb(250, 238, 77)",heavy_weighted_pressure_plate:"rgb(167, 167, 167)",daylight_detector:"rgb(143, 119, 72)",redstone_block:"rgb(255, 0, 0)",nether_quartz_ore:"rgb(112, 2, 0)",hopper:"rgb(112, 112, 112)",quartz_block:"rgb(255, 252, 245)",chiseled_quartz_block:"rgb(255, 252, 245)",quartz_pillar:"rgb(255, 252, 245)",dropper:"rgb(112, 112, 112)",white_terracotta:"rgb(209, 177, 161)",orange_terracotta:"rgb(159, 82, 36)",magenta_terracotta:"rgb(149, 87, 108)",light_blue_terracotta:"rgb(112, 108, 138)",yellow_terracotta:"rgb(186, 133, 36)",lime_terracotta:"rgb(103, 117, 53)",pink_terracotta:"rgb(160, 77, 78)",gray_terracotta:"rgb(57, 41, 35)",light_gray_terracotta:"rgb(135, 107, 98)",cyan_terracotta:"rgb(87, 92, 92)",purple_terracotta:"rgb(122, 73, 88)",blue_terracotta:"rgb(76, 62, 92)",brown_terracotta:"rgb(76, 50, 35)",green_terracotta:"rgb(76, 82, 42)",red_terracotta:"rgb(142, 60, 46)",black_terracotta:"rgb(37, 22, 16)",slime_block:"rgb(127, 178, 56)",iron_trapdoor:"rgb(167, 167, 167)",prismarine:"rgb(76, 127, 153)",prismarine_bricks:"rgb(92, 219, 213)",dark_prismarine:"rgb(92, 219, 213)",prismarine_slab:"rgb(76, 127, 153)",prismarine_brick_slab:"rgb(92, 219, 213)",dark_prismarine_slab:"rgb(92, 219, 213)",sea_lantern:"rgb(255, 252, 245)",hay_block:"rgb(229, 229, 51)",white_carpet:"rgb(255, 255, 255)",orange_carpet:"rgb(216, 127, 51)",magenta_carpet:"rgb(178, 76, 216)",light_blue_carpet:"rgb(102, 153, 216)",yellow_carpet:"rgb(229, 229, 51)",lime_carpet:"rgb(127, 204, 25)",pink_carpet:"rgb(242, 127, 165)",gray_carpet:"rgb(76, 76, 76)",light_gray_carpet:"rgb(153, 153, 153)",cyan_carpet:"rgb(76, 127, 153)",purple_carpet:"rgb(127, 63, 178)",blue_carpet:"rgb(51, 76, 178)",brown_carpet:"rgb(102, 76, 51)",green_carpet:"rgb(102, 127, 51)",red_carpet:"rgb(153, 51, 51)",black_carpet:"rgb(25, 25, 25)",terracotta:"rgb(216, 127, 51)",coal_block:"rgb(25, 25, 25)",packed_ice:"rgb(160, 160, 255)",sunflower:"rgb(0, 124, 0)",lilac:"rgb(0, 124, 0)",rose_bush:"rgb(0, 124, 0)",peony:"rgb(0, 124, 0)",tall_grass:"rgb(0, 124, 0)",large_fern:"rgb(0, 124, 0)",white_banner:"rgb(143, 119, 72)",orange_banner:"rgb(143, 119, 72)",magenta_banner:"rgb(143, 119, 72)",light_blue_banner:"rgb(143, 119, 72)",yellow_banner:"rgb(143, 119, 72)",lime_banner:"rgb(143, 119, 72)",pink_banner:"rgb(143, 119, 72)",gray_banner:"rgb(143, 119, 72)",light_gray_banner:"rgb(143, 119, 72)",cyan_banner:"rgb(143, 119, 72)",purple_banner:"rgb(143, 119, 72)",blue_banner:"rgb(143, 119, 72)",brown_banner:"rgb(143, 119, 72)",green_banner:"rgb(143, 119, 72)",red_banner:"rgb(143, 119, 72)",black_banner:"rgb(143, 119, 72)",white_wall_banner:"rgb(143, 119, 72)",orange_wall_banner:"rgb(143, 119, 72)",magenta_wall_banner:"rgb(143, 119, 72)",light_blue_wall_banner:"rgb(143, 119, 72)",yellow_wall_banner:"rgb(143, 119, 72)",lime_wall_banner:"rgb(143, 119, 72)",pink_wall_banner:"rgb(143, 119, 72)",gray_wall_banner:"rgb(143, 119, 72)",light_gray_wall_banner:"rgb(143, 119, 72)",cyan_wall_banner:"rgb(143, 119, 72)",purple_wall_banner:"rgb(143, 119, 72)",blue_wall_banner:"rgb(143, 119, 72)",brown_wall_banner:"rgb(143, 119, 72)",green_wall_banner:"rgb(143, 119, 72)",red_wall_banner:"rgb(143, 119, 72)",black_wall_banner:"rgb(143, 119, 72)",red_sandstone:"rgb(216, 127, 51)",chiseled_red_sandstone:"rgb(216, 127, 51)",cut_red_sandstone:"rgb(216, 127, 51)",oak_slab:"rgb(143, 119, 72)",spruce_slab:"rgb(129, 86, 49)",birch_slab:"rgb(247, 233, 163)",jungle_slab:"rgb(151, 109, 77)",acacia_slab:"rgb(216, 127, 51)",cherry_slab:"rgb(209, 177, 161)",dark_oak_slab:"rgb(102, 76, 51)",mangrove_slab:"rgb(153, 51, 51)",bamboo_slab:"rgb(229, 229, 51)",bamboo_mosaic_slab:"rgb(229, 229, 51)",stone_slab:"rgb(112, 112, 112)",smooth_stone_slab:"rgb(112, 112, 112)",sandstone_slab:"rgb(247, 233, 163)",cut_sandstone_slab:"rgb(247, 233, 163)",petrified_oak_slab:"rgb(143, 119, 72)",cobblestone_slab:"rgb(112, 112, 112)",brick_slab:"rgb(153, 51, 51)",stone_brick_slab:"rgb(112, 112, 112)",mud_brick_slab:"rgb(135, 107, 98)",nether_brick_slab:"rgb(112, 2, 0)",quartz_slab:"rgb(255, 252, 245)",red_sandstone_slab:"rgb(216, 127, 51)",cut_red_sandstone_slab:"rgb(216, 127, 51)",purpur_slab:"rgb(178, 76, 216)",smooth_stone:"rgb(112, 112, 112)",smooth_sandstone:"rgb(247, 233, 163)",smooth_quartz:"rgb(255, 252, 245)",smooth_red_sandstone:"rgb(216, 127, 51)",chorus_plant:"rgb(127, 63, 178)",chorus_flower:"rgb(127, 63, 178)",purpur_block:"rgb(178, 76, 216)",purpur_pillar:"rgb(178, 76, 216)",end_stone_bricks:"rgb(247, 233, 163)",torchflower_crop:"rgb(0, 124, 0)",pitcher_crop:"rgb(0, 124, 0)",pitcher_plant:"rgb(0, 124, 0)",beetroots:"rgb(0, 124, 0)",dirt_path:"rgb(151, 109, 77)",end_gateway:"rgb(25, 25, 25)",repeating_command_block:"rgb(127, 63, 178)",chain_command_block:"rgb(102, 127, 51)",frosted_ice:"rgb(160, 160, 255)",magma_block:"rgb(112, 2, 0)",nether_wart_block:"rgb(153, 51, 51)",red_nether_bricks:"rgb(112, 2, 0)",bone_block:"rgb(247, 233, 163)",observer:"rgb(112, 112, 112)",kelp:"rgb(64, 64, 255)",kelp_plant:"rgb(64, 64, 255)",dried_kelp_block:"rgb(102, 127, 51)",turtle_egg:"rgb(247, 233, 163)",sniffer_egg:"rgb(153, 51, 51)",dead_tube_coral_block:"rgb(76, 76, 76)",dead_brain_coral_block:"rgb(76, 76, 76)",dead_bubble_coral_block:"rgb(76, 76, 76)",dead_fire_coral_block:"rgb(76, 76, 76)",dead_horn_coral_block:"rgb(76, 76, 76)",tube_coral_block:"rgb(51, 76, 178)",brain_coral_block:"rgb(242, 127, 165)",bubble_coral_block:"rgb(127, 63, 178)",fire_coral_block:"rgb(153, 51, 51)",horn_coral_block:"rgb(229, 229, 51)",dead_tube_coral:"rgb(76, 76, 76)",dead_brain_coral:"rgb(76, 76, 76)",dead_bubble_coral:"rgb(76, 76, 76)",dead_fire_coral:"rgb(76, 76, 76)",dead_horn_coral:"rgb(76, 76, 76)",tube_coral:"rgb(51, 76, 178)",brain_coral:"rgb(242, 127, 165)",bubble_coral:"rgb(127, 63, 178)",fire_coral:"rgb(153, 51, 51)",horn_coral:"rgb(229, 229, 51)",dead_tube_coral_fan:"rgb(76, 76, 76)",dead_brain_coral_fan:"rgb(76, 76, 76)",dead_bubble_coral_fan:"rgb(76, 76, 76)",dead_fire_coral_fan:"rgb(76, 76, 76)",dead_horn_coral_fan:"rgb(76, 76, 76)",tube_coral_fan:"rgb(51, 76, 178)",brain_coral_fan:"rgb(242, 127, 165)",bubble_coral_fan:"rgb(127, 63, 178)",fire_coral_fan:"rgb(153, 51, 51)",horn_coral_fan:"rgb(229, 229, 51)",dead_tube_coral_wall_fan:"rgb(76, 76, 76)",dead_brain_coral_wall_fan:"rgb(76, 76, 76)",dead_bubble_coral_wall_fan:"rgb(76, 76, 76)",dead_fire_coral_wall_fan:"rgb(76, 76, 76)",dead_horn_coral_wall_fan:"rgb(76, 76, 76)",tube_coral_wall_fan:"rgb(51, 76, 178)",brain_coral_wall_fan:"rgb(242, 127, 165)",bubble_coral_wall_fan:"rgb(127, 63, 178)",fire_coral_wall_fan:"rgb(153, 51, 51)",horn_coral_wall_fan:"rgb(229, 229, 51)",sea_pickle:"rgb(102, 127, 51)",blue_ice:"rgb(160, 160, 255)",conduit:"rgb(92, 219, 213)",bamboo_sapling:"rgb(143, 119, 72)",bamboo:"rgb(0, 124, 0)",bubble_column:"rgb(64, 64, 255)",scaffolding:"rgb(247, 233, 163)",loom:"rgb(143, 119, 72)",barrel:"rgb(143, 119, 72)",smoker:"rgb(112, 112, 112)",blast_furnace:"rgb(112, 112, 112)",cartography_table:"rgb(143, 119, 72)",fletching_table:"rgb(143, 119, 72)",grindstone:"rgb(167, 167, 167)",lectern:"rgb(143, 119, 72)",smithing_table:"rgb(143, 119, 72)",stonecutter:"rgb(112, 112, 112)",bell:"rgb(250, 238, 77)",lantern:"rgb(167, 167, 167)",soul_lantern:"rgb(167, 167, 167)",campfire:"rgb(129, 86, 49)",soul_campfire:"rgb(129, 86, 49)",sweet_berry_bush:"rgb(0, 124, 0)",warped_hyphae:"rgb(86, 44, 62)",stripped_warped_hyphae:"rgb(86, 44, 62)",warped_nylium:"rgb(22, 126, 134)",warped_fungus:"rgb(76, 127, 153)",warped_wart_block:"rgb(20, 180, 133)",warped_roots:"rgb(76, 127, 153)",nether_sprouts:"rgb(76, 127, 153)",crimson_hyphae:"rgb(92, 25, 29)",stripped_crimson_hyphae:"rgb(92, 25, 29)",crimson_nylium:"rgb(189, 48, 49)",crimson_fungus:"rgb(112, 2, 0)",shroomlight:"rgb(153, 51, 51)",weeping_vines:"rgb(112, 2, 0)",weeping_vines_plant:"rgb(112, 2, 0)",twisting_vines:"rgb(76, 127, 153)",twisting_vines_plant:"rgb(76, 127, 153)",crimson_roots:"rgb(112, 2, 0)",crimson_planks:"rgb(148, 63, 97)",warped_planks:"rgb(58, 142, 140)",structure_block:"rgb(153, 153, 153)",jigsaw:"rgb(153, 153, 153)",composter:"rgb(143, 119, 72)",target:"rgb(255, 252, 245)",bee_nest:"rgb(229, 229, 51)",beehive:"rgb(143, 119, 72)",honey_block:"rgb(216, 127, 51)",honeycomb_block:"rgb(216, 127, 51)",netherite_block:"rgb(25, 25, 25)",ancient_debris:"rgb(25, 25, 25)",crying_obsidian:"rgb(25, 25, 25)",respawn_anchor:"rgb(25, 25, 25)",lodestone:"rgb(167, 167, 167)",blackstone:"rgb(25, 25, 25)",polished_blackstone_pressure_plate:"rgb(25, 25, 25)",chiseled_nether_bricks:"rgb(112, 2, 0)",cracked_nether_bricks:"rgb(112, 2, 0)",amethyst_block:"rgb(127, 63, 178)",budding_amethyst:"rgb(127, 63, 178)",amethyst_cluster:"rgb(127, 63, 178)",tuff:"rgb(57, 41, 35)",calcite:"rgb(209, 177, 161)",tinted_glass:"rgb(76, 76, 76)",powder_snow:"rgb(255, 255, 255)",sculk_sensor:"rgb(76, 127, 153)",sculk:"rgb(25, 25, 25)",sculk_vein:"rgb(25, 25, 25)",sculk_catalyst:"rgb(25, 25, 25)",sculk_shrieker:"rgb(25, 25, 25)",oxidized_copper:"rgb(22, 126, 134)",weathered_copper:"rgb(58, 142, 140)",exposed_copper:"rgb(135, 107, 98)",copper_block:"rgb(216, 127, 51)",deepslate_copper_ore:"rgb(100, 100, 100)",lightning_rod:"rgb(216, 127, 51)",pointed_dripstone:"rgb(76, 50, 35)",dripstone_block:"rgb(76, 50, 35)",cave_vines:"rgb(0, 124, 0)",cave_vines_plant:"rgb(0, 124, 0)",spore_blossom:"rgb(0, 124, 0)",azalea:"rgb(0, 124, 0)",flowering_azalea:"rgb(0, 124, 0)",moss_carpet:"rgb(102, 127, 51)",pink_petals:"rgb(0, 124, 0)",moss_block:"rgb(102, 127, 51)",big_dripleaf:"rgb(0, 124, 0)",big_dripleaf_stem:"rgb(0, 124, 0)",small_dripleaf:"rgb(0, 124, 0)",hanging_roots:"rgb(151, 109, 77)",rooted_dirt:"rgb(151, 109, 77)",mud:"rgb(87, 92, 92)",deepslate:"rgb(100, 100, 100)",infested_deepslate:"rgb(100, 100, 100)",raw_iron_block:"rgb(216, 175, 147)",raw_copper_block:"rgb(216, 127, 51)",raw_gold_block:"rgb(250, 238, 77)",ochre_froglight:"rgb(247, 233, 163)",verdant_froglight:"rgb(127, 167, 150)",pearlescent_froglight:"rgb(242, 127, 165)",frogspawn:"rgb(64, 64, 255)",reinforced_deepslate:"rgb(100, 100, 100)",decorated_pot:"rgb(142, 60, 46)"},invisibleBlocks:{air:!0,void_air:!0,cave_air:!0,barrier:!0,light:!0,moving_piston:!0}};var El={blocks:{"0:0":"air","1:0":"stone","1:1":"granite","1:2":"polished_granite","1:3":"diorite","1:4":"polished_diorite","1:5":"andesite","1:6":"polished_andesite","2:0":"grass_block[snowy=false]","3:0":"dirt","3:1":"coarse_dirt","3:2":"podzol[snowy=false]","4:0":"cobblestone","5:0":"oak_planks","5:1":"spruce_planks","5:2":"birch_planks","5:3":"jungle_planks","5:4":"acacia_planks","5:5":"dark_oak_planks","6:0":"oak_sapling[stage=0]","6:1":"spruce_sapling[stage=0]","6:2":"birch_sapling[stage=0]","6:3":"jungle_sapling[stage=0]","6:4":"acacia_sapling[stage=0]","6:5":"dark_oak_sapling[stage=0]","6:8":"oak_sapling[stage=1]","6:9":"spruce_sapling[stage=1]","6:10":"birch_sapling[stage=1]","6:11":"jungle_sapling[stage=1]","6:12":"acacia_sapling[stage=1]","6:13":"dark_oak_sapling[stage=1]","7:0":"bedrock","8:0":"water[level=0]","8:1":"water[level=1]","8:2":"water[level=2]","8:3":"water[level=3]","8:4":"water[level=4]","8:5":"water[level=5]","8:6":"water[level=6]","8:7":"water[level=7]","8:8":"water[level=8]","8:9":"water[level=9]","8:10":"water[level=10]","8:11":"water[level=11]","8:12":"water[level=12]","8:13":"water[level=13]","8:14":"water[level=14]","8:15":"water[level=15]","9:0":"water[level=0]","9:1":"water[level=1]","9:2":"water[level=2]","9:3":"water[level=3]","9:4":"water[level=4]","9:5":"water[level=5]","9:6":"water[level=6]","9:7":"water[level=7]","9:8":"water[level=8]","9:9":"water[level=9]","9:10":"water[level=10]","9:11":"water[level=11]","9:12":"water[level=12]","9:13":"water[level=13]","9:14":"water[level=14]","9:15":"water[level=15]","10:0":"lava[level=0]","10:1":"lava[level=1]","10:2":"lava[level=2]","10:3":"lava[level=3]","10:4":"lava[level=4]","10:5":"lava[level=5]","10:6":"lava[level=6]","10:7":"lava[level=7]","10:8":"lava[level=8]","10:9":"lava[level=9]","10:10":"lava[level=10]","10:11":"lava[level=11]","10:12":"lava[level=12]","10:13":"lava[level=13]","10:14":"lava[level=14]","10:15":"lava[level=15]","11:0":"lava[level=0]","11:1":"lava[level=1]","11:2":"lava[level=2]","11:3":"lava[level=3]","11:4":"lava[level=4]","11:5":"lava[level=5]","11:6":"lava[level=6]","11:7":"lava[level=7]","11:8":"lava[level=8]","11:9":"lava[level=9]","11:10":"lava[level=10]","11:11":"lava[level=11]","11:12":"lava[level=12]","11:13":"lava[level=13]","11:14":"lava[level=14]","11:15":"lava[level=15]","12:0":"sand","12:1":"red_sand","13:0":"gravel","14:0":"gold_ore","15:0":"iron_ore","16:0":"coal_ore","17:0":"oak_log[axis=y]","17:1":"spruce_log[axis=y]","17:2":"birch_log[axis=y]","17:3":"jungle_log[axis=y]","17:4":"oak_log[axis=x]","17:5":"spruce_log[axis=x]","17:6":"birch_log[axis=x]","17:7":"jungle_log[axis=x]","17:8":"oak_log[axis=z]","17:9":"spruce_log[axis=z]","17:10":"birch_log[axis=z]","17:11":"jungle_log[axis=z]","17:12":"oak_bark","17:13":"spruce_bark","17:14":"birch_bark","17:15":"jungle_bark","18:0":"oak_leaves[check_decay=false,decayable=true]","18:1":"spruce_leaves[check_decay=false,decayable=true]","18:2":"birch_leaves[check_decay=false,decayable=true]","18:3":"jungle_leaves[check_decay=false,decayable=true]","18:4":"oak_leaves[check_decay=false,decayable=false]","18:5":"spruce_leaves[check_decay=false,decayable=false]","18:6":"birch_leaves[check_decay=false,decayable=false]","18:7":"jungle_leaves[check_decay=false,decayable=false]","18:8":"oak_leaves[check_decay=true,decayable=true]","18:9":"spruce_leaves[check_decay=true,decayable=true]","18:10":"birch_leaves[check_decay=true,decayable=true]","18:11":"jungle_leaves[check_decay=true,decayable=true]","18:12":"oak_leaves[check_decay=true,decayable=false]","18:13":"spruce_leaves[check_decay=true,decayable=false]","18:14":"birch_leaves[check_decay=true,decayable=false]","18:15":"jungle_leaves[check_decay=true,decayable=false]","19:0":"sponge","19:1":"wet_sponge","20:0":"glass","21:0":"lapis_ore","22:0":"lapis_block","23:0":"dispenser[facing=down,triggered=false]","23:1":"dispenser[facing=up,triggered=false]","23:2":"dispenser[facing=north,triggered=false]","23:3":"dispenser[facing=south,triggered=false]","23:4":"dispenser[facing=west,triggered=false]","23:5":"dispenser[facing=east,triggered=false]","23:8":"dispenser[facing=down,triggered=true]","23:9":"dispenser[facing=up,triggered=true]","23:10":"dispenser[facing=north,triggered=true]","23:11":"dispenser[facing=south,triggered=true]","23:12":"dispenser[facing=west,triggered=true]","23:13":"dispenser[facing=east,triggered=true]","24:0":"sandstone","24:1":"chiseled_sandstone","24:2":"cut_sandstone","25:0":"note_block","26:0":"red_bed[facing=south,occupied=false,part=foot]","26:1":"red_bed[facing=west,occupied=false,part=foot]","26:2":"red_bed[facing=north,occupied=false,part=foot]","26:3":"red_bed[facing=east,occupied=false,part=foot]","26:8":"red_bed[facing=south,occupied=false,part=head]","26:9":"red_bed[facing=west,occupied=false,part=head]","26:10":"red_bed[facing=north,occupied=false,part=head]","26:11":"red_bed[facing=east,occupied=false,part=head]","26:12":"red_bed[facing=south,occupied=true,part=head]","26:13":"red_bed[facing=west,occupied=true,part=head]","26:14":"red_bed[facing=north,occupied=true,part=head]","26:15":"red_bed[facing=east,occupied=true,part=head]","27:0":"powered_rail[powered=false,shape=north_south]","27:1":"powered_rail[powered=false,shape=east_west]","27:2":"powered_rail[powered=false,shape=ascending_east]","27:3":"powered_rail[powered=false,shape=ascending_west]","27:4":"powered_rail[powered=false,shape=ascending_north]","27:5":"powered_rail[powered=false,shape=ascending_south]","27:8":"powered_rail[powered=true,shape=north_south]","27:9":"powered_rail[powered=true,shape=east_west]","27:10":"powered_rail[powered=true,shape=ascending_east]","27:11":"powered_rail[powered=true,shape=ascending_west]","27:12":"powered_rail[powered=true,shape=ascending_north]","27:13":"powered_rail[powered=true,shape=ascending_south]","28:0":"detector_rail[powered=false,shape=north_south]","28:1":"detector_rail[powered=false,shape=east_west]","28:2":"detector_rail[powered=false,shape=ascending_east]","28:3":"detector_rail[powered=false,shape=ascending_west]","28:4":"detector_rail[powered=false,shape=ascending_north]","28:5":"detector_rail[powered=false,shape=ascending_south]","28:8":"detector_rail[powered=true,shape=north_south]","28:9":"detector_rail[powered=true,shape=east_west]","28:10":"detector_rail[powered=true,shape=ascending_east]","28:11":"detector_rail[powered=true,shape=ascending_west]","28:12":"detector_rail[powered=true,shape=ascending_north]","28:13":"detector_rail[powered=true,shape=ascending_south]","29:0":"sticky_piston[extended=false,facing=down]","29:1":"sticky_piston[extended=false,facing=up]","29:2":"sticky_piston[extended=false,facing=north]","29:3":"sticky_piston[extended=false,facing=south]","29:4":"sticky_piston[extended=false,facing=west]","29:5":"sticky_piston[extended=false,facing=east]","29:8":"sticky_piston[extended=true,facing=down]","29:9":"sticky_piston[extended=true,facing=up]","29:10":"sticky_piston[extended=true,facing=north]","29:11":"sticky_piston[extended=true,facing=south]","29:12":"sticky_piston[extended=true,facing=west]","29:13":"sticky_piston[extended=true,facing=east]","30:0":"cobweb","31:0":"dead_bush","31:1":"grass","31:2":"fern","32:0":"dead_bush","33:0":"piston[extended=false,facing=down]","33:1":"piston[extended=false,facing=up]","33:2":"piston[extended=false,facing=north]","33:3":"piston[extended=false,facing=south]","33:4":"piston[extended=false,facing=west]","33:5":"piston[extended=false,facing=east]","33:8":"piston[extended=true,facing=down]","33:9":"piston[extended=true,facing=up]","33:10":"piston[extended=true,facing=north]","33:11":"piston[extended=true,facing=south]","33:12":"piston[extended=true,facing=west]","33:13":"piston[extended=true,facing=east]","34:0":"piston_head[facing=down,short=false,type=normal]","34:1":"piston_head[facing=up,short=false,type=normal]","34:2":"piston_head[facing=north,short=false,type=normal]","34:3":"piston_head[facing=south,short=false,type=normal]","34:4":"piston_head[facing=west,short=false,type=normal]","34:5":"piston_head[facing=east,short=false,type=normal]","34:8":"piston_head[facing=down,short=false,type=sticky]","34:9":"piston_head[facing=up,short=false,type=sticky]","34:10":"piston_head[facing=north,short=false,type=sticky]","34:11":"piston_head[facing=south,short=false,type=sticky]","34:12":"piston_head[facing=west,short=false,type=sticky]","34:13":"piston_head[facing=east,short=false,type=sticky]","35:0":"white_wool","35:1":"orange_wool","35:2":"magenta_wool","35:3":"light_blue_wool","35:4":"yellow_wool","35:5":"lime_wool","35:6":"pink_wool","35:7":"gray_wool","35:8":"light_gray_wool","35:9":"cyan_wool","35:10":"purple_wool","35:11":"blue_wool","35:12":"brown_wool","35:13":"green_wool","35:14":"red_wool","35:15":"black_wool","36:0":"moving_piston[facing=down,type=normal]","36:1":"moving_piston[facing=up,type=normal]","36:2":"moving_piston[facing=north,type=normal]","36:3":"moving_piston[facing=south,type=normal]","36:4":"moving_piston[facing=west,type=normal]","36:5":"moving_piston[facing=east,type=normal]","36:8":"moving_piston[facing=down,type=sticky]","36:9":"moving_piston[facing=up,type=sticky]","36:10":"moving_piston[facing=north,type=sticky]","36:11":"moving_piston[facing=south,type=sticky]","36:12":"moving_piston[facing=west,type=sticky]","36:13":"moving_piston[facing=east,type=sticky]","37:0":"dandelion","38:0":"poppy","38:1":"blue_orchid","38:2":"allium","38:3":"azure_bluet","38:4":"red_tulip","38:5":"orange_tulip","38:6":"white_tulip","38:7":"pink_tulip","38:8":"oxeye_daisy","39:0":"brown_mushroom","40:0":"red_mushroom","41:0":"gold_block","42:0":"iron_block","43:0":"stone_slab[type=double]","43:1":"sandstone_slab[type=double]","43:2":"petrified_oak_slab[type=double]","43:3":"cobblestone_slab[type=double]","43:4":"brick_slab[type=double]","43:5":"stone_brick_slab[type=double]","43:6":"nether_brick_slab[type=double]","43:7":"quartz_slab[type=double]","43:8":"smooth_stone","43:9":"smooth_sandstone","43:10":"petrified_oak_slab[type=double]","43:11":"cobblestone_slab[type=double]","43:12":"brick_slab[type=double]","43:13":"stone_brick_slab[type=double]","43:14":"nether_brick_slab[type=double]","43:15":"smooth_quartz","44:0":"stone_slab[type=bottom]","44:1":"sandstone_slab[type=bottom]","44:2":"petrified_oak_slab[type=bottom]","44:3":"cobblestone_slab[type=bottom]","44:4":"brick_slab[type=bottom]","44:5":"stone_brick_slab[type=bottom]","44:6":"nether_brick_slab[type=bottom]","44:7":"quartz_slab[type=bottom]","44:8":"stone_slab[type=top]","44:9":"sandstone_slab[type=top]","44:10":"petrified_oak_slab[type=top]","44:11":"cobblestone_slab[type=top]","44:12":"brick_slab[type=top]","44:13":"stone_brick_slab[type=top]","44:14":"nether_brick_slab[type=top]","44:15":"quartz_slab[type=top]","45:0":"bricks","46:0":"tnt[unstable=false]","46:1":"tnt[unstable=true]","47:0":"bookshelf","48:0":"mossy_cobblestone","49:0":"obsidian","50:1":"wall_torch[facing=east]","50:2":"wall_torch[facing=west]","50:3":"wall_torch[facing=south]","50:4":"wall_torch[facing=north]","50:5":"torch","51:0":"fire[age=0,east=false,north=false,south=false,up=false,west=false]","51:1":"fire[age=1,east=false,north=false,south=false,up=false,west=false]","51:2":"fire[age=2,east=false,north=false,south=false,up=false,west=false]","51:3":"fire[age=3,east=false,north=false,south=false,up=false,west=false]","51:4":"fire[age=4,east=false,north=false,south=false,up=false,west=false]","51:5":"fire[age=5,east=false,north=false,south=false,up=false,west=false]","51:6":"fire[age=6,east=false,north=false,south=false,up=false,west=false]","51:7":"fire[age=7,east=false,north=false,south=false,up=false,west=false]","51:8":"fire[age=8,east=false,north=false,south=false,up=false,west=false]","51:9":"fire[age=9,east=false,north=false,south=false,up=false,west=false]","51:10":"fire[age=10,east=false,north=false,south=false,up=false,west=false]","51:11":"fire[age=11,east=false,north=false,south=false,up=false,west=false]","51:12":"fire[age=12,east=false,north=false,south=false,up=false,west=false]","51:13":"fire[age=13,east=false,north=false,south=false,up=false,west=false]","51:14":"fire[age=14,east=false,north=false,south=false,up=false,west=false]","51:15":"fire[age=15,east=false,north=false,south=false,up=false,west=false]","52:0":"mob_spawner","53:0":"oak_stairs[facing=east,half=bottom,shape=straight]","53:1":"oak_stairs[facing=west,half=bottom,shape=straight]","53:2":"oak_stairs[facing=south,half=bottom,shape=straight]","53:3":"oak_stairs[facing=north,half=bottom,shape=straight]","53:4":"oak_stairs[facing=east,half=top,shape=straight]","53:5":"oak_stairs[facing=west,half=top,shape=straight]","53:6":"oak_stairs[facing=south,half=top,shape=straight]","53:7":"oak_stairs[facing=north,half=top,shape=straight]","54:2":"chest[facing=north,type=single]","54:3":"chest[facing=south,type=single]","54:4":"chest[facing=west,type=single]","54:5":"chest[facing=east,type=single]","55:0":"redstone_wire[east=none,north=none,power=0,south=none,west=none]","55:1":"redstone_wire[east=none,north=none,power=1,south=none,west=none]","55:2":"redstone_wire[east=none,north=none,power=2,south=none,west=none]","55:3":"redstone_wire[east=none,north=none,power=3,south=none,west=none]","55:4":"redstone_wire[east=none,north=none,power=4,south=none,west=none]","55:5":"redstone_wire[east=none,north=none,power=5,south=none,west=none]","55:6":"redstone_wire[east=none,north=none,power=6,south=none,west=none]","55:7":"redstone_wire[east=none,north=none,power=7,south=none,west=none]","55:8":"redstone_wire[east=none,north=none,power=8,south=none,west=none]","55:9":"redstone_wire[east=none,north=none,power=9,south=none,west=none]","55:10":"redstone_wire[east=none,north=none,power=10,south=none,west=none]","55:11":"redstone_wire[east=none,north=none,power=11,south=none,west=none]","55:12":"redstone_wire[east=none,north=none,power=12,south=none,west=none]","55:13":"redstone_wire[east=none,north=none,power=13,south=none,west=none]","55:14":"redstone_wire[east=none,north=none,power=14,south=none,west=none]","55:15":"redstone_wire[east=none,north=none,power=15,south=none,west=none]","56:0":"diamond_ore","57:0":"diamond_block","58:0":"crafting_table","59:0":"wheat[age=0]","59:1":"wheat[age=1]","59:2":"wheat[age=2]","59:3":"wheat[age=3]","59:4":"wheat[age=4]","59:5":"wheat[age=5]","59:6":"wheat[age=6]","59:7":"wheat[age=7]","60:0":"farmland[moisture=0]","60:1":"farmland[moisture=1]","60:2":"farmland[moisture=2]","60:3":"farmland[moisture=3]","60:4":"farmland[moisture=4]","60:5":"farmland[moisture=5]","60:6":"farmland[moisture=6]","60:7":"farmland[moisture=7]","61:2":"furnace[facing=north,lit=false]","61:3":"furnace[facing=south,lit=false]","61:4":"furnace[facing=west,lit=false]","61:5":"furnace[facing=east,lit=false]","62:2":"furnace[facing=north,lit=true]","62:3":"furnace[facing=south,lit=true]","62:4":"furnace[facing=west,lit=true]","62:5":"furnace[facing=east,lit=true]","63:0":"sign[rotation=0]","63:1":"sign[rotation=1]","63:2":"sign[rotation=2]","63:3":"sign[rotation=3]","63:4":"sign[rotation=4]","63:5":"sign[rotation=5]","63:6":"sign[rotation=6]","63:7":"sign[rotation=7]","63:8":"sign[rotation=8]","63:9":"sign[rotation=9]","63:10":"sign[rotation=10]","63:11":"sign[rotation=11]","63:12":"sign[rotation=12]","63:13":"sign[rotation=13]","63:14":"sign[rotation=14]","63:15":"sign[rotation=15]","64:0":"oak_door[facing=east,half=lower,hinge=right,open=false,powered=false]","64:1":"oak_door[facing=south,half=lower,hinge=right,open=false,powered=false]","64:2":"oak_door[facing=west,half=lower,hinge=right,open=false,powered=false]","64:3":"oak_door[facing=north,half=lower,hinge=right,open=false,powered=false]","64:4":"oak_door[facing=east,half=lower,hinge=right,open=true,powered=false]","64:5":"oak_door[facing=south,half=lower,hinge=right,open=true,powered=false]","64:6":"oak_door[facing=west,half=lower,hinge=right,open=true,powered=false]","64:7":"oak_door[facing=north,half=lower,hinge=right,open=true,powered=false]","64:8":"oak_door[facing=east,half=upper,hinge=left,open=false,powered=false]","64:9":"oak_door[facing=east,half=upper,hinge=right,open=false,powered=false]","64:10":"oak_door[facing=east,half=upper,hinge=left,open=false,powered=true]","64:11":"oak_door[facing=east,half=upper,hinge=right,open=false,powered=true]","65:2":"ladder[facing=north]","65:3":"ladder[facing=south]","65:4":"ladder[facing=west]","65:5":"ladder[facing=east]","66:0":"rail[shape=north_south]","66:1":"rail[shape=east_west]","66:2":"rail[shape=ascending_east]","66:3":"rail[shape=ascending_west]","66:4":"rail[shape=ascending_north]","66:5":"rail[shape=ascending_south]","66:6":"rail[shape=south_east]","66:7":"rail[shape=south_west]","66:8":"rail[shape=north_west]","66:9":"rail[shape=north_east]","67:0":"cobblestone_stairs[facing=east,half=bottom,shape=straight]","67:1":"cobblestone_stairs[facing=west,half=bottom,shape=straight]","67:2":"cobblestone_stairs[facing=south,half=bottom,shape=straight]","67:3":"cobblestone_stairs[facing=north,half=bottom,shape=straight]","67:4":"cobblestone_stairs[facing=east,half=top,shape=straight]","67:5":"cobblestone_stairs[facing=west,half=top,shape=straight]","67:6":"cobblestone_stairs[facing=south,half=top,shape=straight]","67:7":"cobblestone_stairs[facing=north,half=top,shape=straight]","68:2":"wall_sign[facing=north]","68:3":"wall_sign[facing=south]","68:4":"wall_sign[facing=west]","68:5":"wall_sign[facing=east]","69:0":"lever[face=ceiling,facing=west,powered=false]","69:1":"lever[face=wall,facing=east,powered=false]","69:2":"lever[face=wall,facing=west,powered=false]","69:3":"lever[face=wall,facing=south,powered=false]","69:4":"lever[face=wall,facing=north,powered=false]","69:5":"lever[face=floor,facing=north,powered=false]","69:6":"lever[face=floor,facing=west,powered=false]","69:7":"lever[face=ceiling,facing=north,powered=false]","69:8":"lever[face=ceiling,facing=west,powered=true]","69:9":"lever[face=wall,facing=east,powered=true]","69:10":"lever[face=wall,facing=west,powered=true]","69:11":"lever[face=wall,facing=south,powered=true]","69:12":"lever[face=wall,facing=north,powered=true]","69:13":"lever[face=floor,facing=north,powered=true]","69:14":"lever[face=floor,facing=west,powered=true]","69:15":"lever[face=ceiling,facing=north,powered=true]","70:0":"stone_pressure_plate[powered=false]","70:1":"stone_pressure_plate[powered=true]","71:0":"iron_door[facing=east,half=lower,hinge=right,open=false,powered=false]","71:1":"iron_door[facing=south,half=lower,hinge=right,open=false,powered=false]","71:2":"iron_door[facing=west,half=lower,hinge=right,open=false,powered=false]","71:3":"iron_door[facing=north,half=lower,hinge=right,open=false,powered=false]","71:4":"iron_door[facing=east,half=lower,hinge=right,open=true,powered=false]","71:5":"iron_door[facing=south,half=lower,hinge=right,open=true,powered=false]","71:6":"iron_door[facing=west,half=lower,hinge=right,open=true,powered=false]","71:7":"iron_door[facing=north,half=lower,hinge=right,open=true,powered=false]","71:8":"iron_door[facing=east,half=upper,hinge=left,open=false,powered=false]","71:9":"iron_door[facing=east,half=upper,hinge=right,open=false,powered=false]","71:10":"iron_door[facing=east,half=upper,hinge=left,open=false,powered=true]","71:11":"iron_door[facing=east,half=upper,hinge=right,open=false,powered=true]","72:0":"oak_pressure_plate[powered=false]","72:1":"oak_pressure_plate[powered=true]","73:0":"redstone_ore[lit=false]","74:0":"redstone_ore[lit=true]","75:1":"redstone_wall_torch[facing=east,lit=false]","75:2":"redstone_wall_torch[facing=west,lit=false]","75:3":"redstone_wall_torch[facing=south,lit=false]","75:4":"redstone_wall_torch[facing=north,lit=false]","75:5":"redstone_torch[lit=false]","76:1":"redstone_wall_torch[facing=east,lit=true]","76:2":"redstone_wall_torch[facing=west,lit=true]","76:3":"redstone_wall_torch[facing=south,lit=true]","76:4":"redstone_wall_torch[facing=north,lit=true]","76:5":"redstone_torch[lit=true]","77:0":"stone_button[face=ceiling,facing=north,powered=false]","77:1":"stone_button[face=wall,facing=east,powered=false]","77:2":"stone_button[face=wall,facing=west,powered=false]","77:3":"stone_button[face=wall,facing=south,powered=false]","77:4":"stone_button[face=wall,facing=north,powered=false]","77:5":"stone_button[face=floor,facing=north,powered=false]","77:8":"stone_button[face=ceiling,facing=north,powered=true]","77:9":"stone_button[face=wall,facing=east,powered=true]","77:10":"stone_button[face=wall,facing=west,powered=true]","77:11":"stone_button[face=wall,facing=south,powered=true]","77:12":"stone_button[face=wall,facing=north,powered=true]","77:13":"stone_button[face=floor,facing=north,powered=true]","78:0":"snow[layers=1]","78:1":"snow[layers=2]","78:2":"snow[layers=3]","78:3":"snow[layers=4]","78:4":"snow[layers=5]","78:5":"snow[layers=6]","78:6":"snow[layers=7]","78:7":"snow[layers=8]","79:0":"ice","80:0":"snow_block","81:0":"cactus[age=0]","81:1":"cactus[age=1]","81:2":"cactus[age=2]","81:3":"cactus[age=3]","81:4":"cactus[age=4]","81:5":"cactus[age=5]","81:6":"cactus[age=6]","81:7":"cactus[age=7]","81:8":"cactus[age=8]","81:9":"cactus[age=9]","81:10":"cactus[age=10]","81:11":"cactus[age=11]","81:12":"cactus[age=12]","81:13":"cactus[age=13]","81:14":"cactus[age=14]","81:15":"cactus[age=15]","82:0":"clay","83:0":"sugar_cane[age=0]","83:1":"sugar_cane[age=1]","83:2":"sugar_cane[age=2]","83:3":"sugar_cane[age=3]","83:4":"sugar_cane[age=4]","83:5":"sugar_cane[age=5]","83:6":"sugar_cane[age=6]","83:7":"sugar_cane[age=7]","83:8":"sugar_cane[age=8]","83:9":"sugar_cane[age=9]","83:10":"sugar_cane[age=10]","83:11":"sugar_cane[age=11]","83:12":"sugar_cane[age=12]","83:13":"sugar_cane[age=13]","83:14":"sugar_cane[age=14]","83:15":"sugar_cane[age=15]","84:0":"jukebox[has_record=false]","84:1":"jukebox[has_record=true]","85:0":"oak_fence[east=false,north=false,south=false,west=false]","86:0":"carved_pumpkin[facing=south]","86:1":"carved_pumpkin[facing=west]","86:2":"carved_pumpkin[facing=north]","86:3":"carved_pumpkin[facing=east]","87:0":"netherrack","88:0":"soul_sand","89:0":"glowstone","90:1":"portal[axis=x]","90:2":"portal[axis=z]","91:0":"jack_o_lantern[facing=south]","91:1":"jack_o_lantern[facing=west]","91:2":"jack_o_lantern[facing=north]","91:3":"jack_o_lantern[facing=east]","92:0":"cake[bites=0]","92:1":"cake[bites=1]","92:2":"cake[bites=2]","92:3":"cake[bites=3]","92:4":"cake[bites=4]","92:5":"cake[bites=5]","92:6":"cake[bites=6]","93:0":"repeater[delay=1,facing=south,locked=false,powered=false]","93:1":"repeater[delay=1,facing=west,locked=false,powered=false]","93:2":"repeater[delay=1,facing=north,locked=false,powered=false]","93:3":"repeater[delay=1,facing=east,locked=false,powered=false]","93:4":"repeater[delay=2,facing=south,locked=false,powered=false]","93:5":"repeater[delay=2,facing=west,locked=false,powered=false]","93:6":"repeater[delay=2,facing=north,locked=false,powered=false]","93:7":"repeater[delay=2,facing=east,locked=false,powered=false]","93:8":"repeater[delay=3,facing=south,locked=false,powered=false]","93:9":"repeater[delay=3,facing=west,locked=false,powered=false]","93:10":"repeater[delay=3,facing=north,locked=false,powered=false]","93:11":"repeater[delay=3,facing=east,locked=false,powered=false]","93:12":"repeater[delay=4,facing=south,locked=false,powered=false]","93:13":"repeater[delay=4,facing=west,locked=false,powered=false]","93:14":"repeater[delay=4,facing=north,locked=false,powered=false]","93:15":"repeater[delay=4,facing=east,locked=false,powered=false]","94:0":"repeater[delay=1,facing=south,locked=false,powered=true]","94:1":"repeater[delay=1,facing=west,locked=false,powered=true]","94:2":"repeater[delay=1,facing=north,locked=false,powered=true]","94:3":"repeater[delay=1,facing=east,locked=false,powered=true]","94:4":"repeater[delay=2,facing=south,locked=false,powered=true]","94:5":"repeater[delay=2,facing=west,locked=false,powered=true]","94:6":"repeater[delay=2,facing=north,locked=false,powered=true]","94:7":"repeater[delay=2,facing=east,locked=false,powered=true]","94:8":"repeater[delay=3,facing=south,locked=false,powered=true]","94:9":"repeater[delay=3,facing=west,locked=false,powered=true]","94:10":"repeater[delay=3,facing=north,locked=false,powered=true]","94:11":"repeater[delay=3,facing=east,locked=false,powered=true]","94:12":"repeater[delay=4,facing=south,locked=false,powered=true]","94:13":"repeater[delay=4,facing=west,locked=false,powered=true]","94:14":"repeater[delay=4,facing=north,locked=false,powered=true]","94:15":"repeater[delay=4,facing=east,locked=false,powered=true]","95:0":"white_stained_glass","95:1":"orange_stained_glass","95:2":"magenta_stained_glass","95:3":"light_blue_stained_glass","95:4":"yellow_stained_glass","95:5":"lime_stained_glass","95:6":"pink_stained_glass","95:7":"gray_stained_glass","95:8":"light_gray_stained_glass","95:9":"cyan_stained_glass","95:10":"purple_stained_glass","95:11":"blue_stained_glass","95:12":"brown_stained_glass","95:13":"green_stained_glass","95:14":"red_stained_glass","95:15":"black_stained_glass","96:0":"oak_trapdoor[facing=north,half=bottom,open=false]","96:1":"oak_trapdoor[facing=south,half=bottom,open=false]","96:2":"oak_trapdoor[facing=west,half=bottom,open=false]","96:3":"oak_trapdoor[facing=east,half=bottom,open=false]","96:4":"oak_trapdoor[facing=north,half=bottom,open=true]","96:5":"oak_trapdoor[facing=south,half=bottom,open=true]","96:6":"oak_trapdoor[facing=west,half=bottom,open=true]","96:7":"oak_trapdoor[facing=east,half=bottom,open=true]","96:8":"oak_trapdoor[facing=north,half=top,open=false]","96:9":"oak_trapdoor[facing=south,half=top,open=false]","96:10":"oak_trapdoor[facing=west,half=top,open=false]","96:11":"oak_trapdoor[facing=east,half=top,open=false]","96:12":"oak_trapdoor[facing=north,half=top,open=true]","96:13":"oak_trapdoor[facing=south,half=top,open=true]","96:14":"oak_trapdoor[facing=west,half=top,open=true]","96:15":"oak_trapdoor[facing=east,half=top,open=true]","97:0":"infested_stone","97:1":"infested_cobblestone","97:2":"infested_stone_bricks","97:3":"infested_mossy_stone_bricks","97:4":"infested_cracked_stone_bricks","97:5":"infested_chiseled_stone_bricks","98:0":"stone_bricks","98:1":"mossy_stone_bricks","98:2":"cracked_stone_bricks","98:3":"chiseled_stone_bricks","99:0":"brown_mushroom_block[north=false,east=false,south=false,west=false,up=false,down=false]","99:1":"brown_mushroom_block[north=true,east=false,south=false,west=true,up=true,down=false]","99:2":"brown_mushroom_block[north=true,east=false,south=false,west=false,up=true,down=false]","99:3":"brown_mushroom_block[north=true,east=true,south=false,west=false,up=true,down=false]","99:4":"brown_mushroom_block[north=false,east=false,south=false,west=true,up=true,down=false]","99:5":"brown_mushroom_block[north=false,east=false,south=false,west=false,up=true,down=false]","99:6":"brown_mushroom_block[north=false,east=true,south=false,west=false,up=true,down=false]","99:7":"brown_mushroom_block[north=false,east=false,south=true,west=true,up=true,down=false]","99:8":"brown_mushroom_block[north=false,east=false,south=true,west=false,up=true,down=false]","99:9":"brown_mushroom_block[north=false,east=true,south=true,west=false,up=true,down=false]","99:10":"mushroom_stem[north=true,east=true,south=true,west=true,up=false,down=false]","99:14":"brown_mushroom_block[north=true,east=true,south=true,west=true,up=true,down=true]","99:15":"mushroom_stem[north=true,east=true,south=true,west=true,up=true,down=true]","100:0":"red_mushroom_block[north=false,east=false,south=false,west=false,up=false,down=false]","100:1":"red_mushroom_block[north=true,east=false,south=false,west=true,up=true,down=false]","100:2":"red_mushroom_block[north=true,east=false,south=false,west=false,up=true,down=false]","100:3":"red_mushroom_block[north=true,east=true,south=false,west=false,up=true,down=false]","100:4":"red_mushroom_block[north=false,east=false,south=false,west=true,up=true,down=false]","100:5":"red_mushroom_block[north=false,east=false,south=false,west=false,up=true,down=false]","100:6":"red_mushroom_block[north=false,east=true,south=false,west=false,up=true,down=false]","100:7":"red_mushroom_block[north=false,east=false,south=true,west=true,up=true,down=false]","100:8":"red_mushroom_block[north=false,east=false,south=true,west=false,up=true,down=false]","100:9":"red_mushroom_block[north=false,east=true,south=true,west=false,up=true,down=false]","100:10":"mushroom_stem[north=true,east=true,south=true,west=true,up=false,down=false]","100:14":"red_mushroom_block[north=true,east=true,south=true,west=true,up=true,down=true]","100:15":"mushroom_stem[north=true,east=true,south=true,west=true,up=true,down=true]","101:0":"iron_bars[east=false,north=false,south=false,west=false]","102:0":"glass_pane[east=false,north=false,south=false,west=false]","103:0":"melon_block","104:0":"pumpkin_stem[age=0]","104:1":"pumpkin_stem[age=1]","104:2":"pumpkin_stem[age=2]","104:3":"pumpkin_stem[age=3]","104:4":"pumpkin_stem[age=4]","104:5":"pumpkin_stem[age=5]","104:6":"pumpkin_stem[age=6]","104:7":"pumpkin_stem[age=7]","105:0":"melon_stem[age=0]","105:1":"melon_stem[age=1]","105:2":"melon_stem[age=2]","105:3":"melon_stem[age=3]","105:4":"melon_stem[age=4]","105:5":"melon_stem[age=5]","105:6":"melon_stem[age=6]","105:7":"melon_stem[age=7]","106:0":"vine[east=false,north=false,south=false,up=true,west=false]","106:1":"vine[east=false,north=false,south=true,up=true,west=false]","106:2":"vine[east=false,north=false,south=false,up=true,west=true]","106:3":"vine[east=false,north=false,south=true,up=true,west=true]","106:4":"vine[east=false,north=true,south=false,up=true,west=false]","106:5":"vine[east=false,north=true,south=true,up=true,west=false]","106:6":"vine[east=false,north=true,south=false,up=true,west=true]","106:7":"vine[east=false,north=true,south=true,up=true,west=true]","106:8":"vine[east=true,north=false,south=false,up=true,west=false]","106:9":"vine[east=true,north=false,south=true,up=true,west=false]","106:10":"vine[east=true,north=false,south=false,up=true,west=true]","106:11":"vine[east=true,north=false,south=true,up=true,west=true]","106:12":"vine[east=true,north=true,south=false,up=true,west=false]","106:13":"vine[east=true,north=true,south=true,up=true,west=false]","106:14":"vine[east=true,north=true,south=false,up=true,west=true]","106:15":"vine[east=true,north=true,south=true,up=true,west=true]","107:0":"oak_fence_gate[facing=south,in_wall=false,open=false,powered=false]","107:1":"oak_fence_gate[facing=west,in_wall=false,open=false,powered=false]","107:2":"oak_fence_gate[facing=north,in_wall=false,open=false,powered=false]","107:3":"oak_fence_gate[facing=east,in_wall=false,open=false,powered=false]","107:4":"oak_fence_gate[facing=south,in_wall=false,open=true,powered=false]","107:5":"oak_fence_gate[facing=west,in_wall=false,open=true,powered=false]","107:6":"oak_fence_gate[facing=north,in_wall=false,open=true,powered=false]","107:7":"oak_fence_gate[facing=east,in_wall=false,open=true,powered=false]","107:8":"oak_fence_gate[facing=south,in_wall=false,open=false,powered=true]","107:9":"oak_fence_gate[facing=west,in_wall=false,open=false,powered=true]","107:10":"oak_fence_gate[facing=north,in_wall=false,open=false,powered=true]","107:11":"oak_fence_gate[facing=east,in_wall=false,open=false,powered=true]","107:12":"oak_fence_gate[facing=south,in_wall=false,open=true,powered=true]","107:13":"oak_fence_gate[facing=west,in_wall=false,open=true,powered=true]","107:14":"oak_fence_gate[facing=north,in_wall=false,open=true,powered=true]","107:15":"oak_fence_gate[facing=east,in_wall=false,open=true,powered=true]","108:0":"brick_stairs[facing=east,half=bottom,shape=straight]","108:1":"brick_stairs[facing=west,half=bottom,shape=straight]","108:2":"brick_stairs[facing=south,half=bottom,shape=straight]","108:3":"brick_stairs[facing=north,half=bottom,shape=straight]","108:4":"brick_stairs[facing=east,half=top,shape=straight]","108:5":"brick_stairs[facing=west,half=top,shape=straight]","108:6":"brick_stairs[facing=south,half=top,shape=straight]","108:7":"brick_stairs[facing=north,half=top,shape=straight]","109:0":"stone_brick_stairs[facing=east,half=bottom,shape=straight]","109:1":"stone_brick_stairs[facing=west,half=bottom,shape=straight]","109:2":"stone_brick_stairs[facing=south,half=bottom,shape=straight]","109:3":"stone_brick_stairs[facing=north,half=bottom,shape=straight]","109:4":"stone_brick_stairs[facing=east,half=top,shape=straight]","109:5":"stone_brick_stairs[facing=west,half=top,shape=straight]","109:6":"stone_brick_stairs[facing=south,half=top,shape=straight]","109:7":"stone_brick_stairs[facing=north,half=top,shape=straight]","110:0":"mycelium[snowy=false]","111:0":"lily_pad","112:0":"nether_bricks","113:0":"nether_brick_fence[east=false,north=false,south=false,west=false]","114:0":"nether_brick_stairs[facing=east,half=bottom,shape=straight]","114:1":"nether_brick_stairs[facing=west,half=bottom,shape=straight]","114:2":"nether_brick_stairs[facing=south,half=bottom,shape=straight]","114:3":"nether_brick_stairs[facing=north,half=bottom,shape=straight]","114:4":"nether_brick_stairs[facing=east,half=top,shape=straight]","114:5":"nether_brick_stairs[facing=west,half=top,shape=straight]","114:6":"nether_brick_stairs[facing=south,half=top,shape=straight]","114:7":"nether_brick_stairs[facing=north,half=top,shape=straight]","115:0":"nether_wart[age=0]","115:1":"nether_wart[age=1]","115:2":"nether_wart[age=2]","115:3":"nether_wart[age=3]","116:0":"enchanting_table","117:0":"brewing_stand[has_bottle_0=false,has_bottle_1=false,has_bottle_2=false]","117:1":"brewing_stand[has_bottle_0=true,has_bottle_1=false,has_bottle_2=false]","117:2":"brewing_stand[has_bottle_0=false,has_bottle_1=true,has_bottle_2=false]","117:3":"brewing_stand[has_bottle_0=true,has_bottle_1=true,has_bottle_2=false]","117:4":"brewing_stand[has_bottle_0=false,has_bottle_1=false,has_bottle_2=true]","117:5":"brewing_stand[has_bottle_0=true,has_bottle_1=false,has_bottle_2=true]","117:6":"brewing_stand[has_bottle_0=false,has_bottle_1=true,has_bottle_2=true]","117:7":"brewing_stand[has_bottle_0=true,has_bottle_1=true,has_bottle_2=true]","118:0":"cauldron[level=0]","118:1":"cauldron[level=1]","118:2":"cauldron[level=2]","118:3":"cauldron[level=3]","119:0":"end_portal","120:0":"end_portal_frame[eye=false,facing=south]","120:1":"end_portal_frame[eye=false,facing=west]","120:2":"end_portal_frame[eye=false,facing=north]","120:3":"end_portal_frame[eye=false,facing=east]","120:4":"end_portal_frame[eye=true,facing=south]","120:5":"end_portal_frame[eye=true,facing=west]","120:6":"end_portal_frame[eye=true,facing=north]","120:7":"end_portal_frame[eye=true,facing=east]","121:0":"end_stone","122:0":"dragon_egg","123:0":"redstone_lamp[lit=false]","124:0":"redstone_lamp[lit=true]","125:0":"oak_slab[type=double]","125:1":"spruce_slab[type=double]","125:2":"birch_slab[type=double]","125:3":"jungle_slab[type=double]","125:4":"acacia_slab[type=double]","125:5":"dark_oak_slab[type=double]","126:0":"oak_slab[type=bottom]","126:1":"spruce_slab[type=bottom]","126:2":"birch_slab[type=bottom]","126:3":"jungle_slab[type=bottom]","126:4":"acacia_slab[type=bottom]","126:5":"dark_oak_slab[type=bottom]","126:8":"oak_slab[type=top]","126:9":"spruce_slab[type=top]","126:10":"birch_slab[type=top]","126:11":"jungle_slab[type=top]","126:12":"acacia_slab[type=top]","126:13":"dark_oak_slab[type=top]","127:0":"cocoa[age=0,facing=south]","127:1":"cocoa[age=0,facing=west]","127:2":"cocoa[age=0,facing=north]","127:3":"cocoa[age=0,facing=east]","127:4":"cocoa[age=1,facing=south]","127:5":"cocoa[age=1,facing=west]","127:6":"cocoa[age=1,facing=north]","127:7":"cocoa[age=1,facing=east]","127:8":"cocoa[age=2,facing=south]","127:9":"cocoa[age=2,facing=west]","127:10":"cocoa[age=2,facing=north]","127:11":"cocoa[age=2,facing=east]","128:0":"sandstone_stairs[facing=east,half=bottom,shape=straight]","128:1":"sandstone_stairs[facing=west,half=bottom,shape=straight]","128:2":"sandstone_stairs[facing=south,half=bottom,shape=straight]","128:3":"sandstone_stairs[facing=north,half=bottom,shape=straight]","128:4":"sandstone_stairs[facing=east,half=top,shape=straight]","128:5":"sandstone_stairs[facing=west,half=top,shape=straight]","128:6":"sandstone_stairs[facing=south,half=top,shape=straight]","128:7":"sandstone_stairs[facing=north,half=top,shape=straight]","129:0":"emerald_ore","130:2":"ender_chest[facing=north]","130:3":"ender_chest[facing=south]","130:4":"ender_chest[facing=west]","130:5":"ender_chest[facing=east]","131:0":"tripwire_hook[attached=false,facing=south,powered=false]","131:1":"tripwire_hook[attached=false,facing=west,powered=false]","131:2":"tripwire_hook[attached=false,facing=north,powered=false]","131:3":"tripwire_hook[attached=false,facing=east,powered=false]","131:4":"tripwire_hook[attached=true,facing=south,powered=false]","131:5":"tripwire_hook[attached=true,facing=west,powered=false]","131:6":"tripwire_hook[attached=true,facing=north,powered=false]","131:7":"tripwire_hook[attached=true,facing=east,powered=false]","131:8":"tripwire_hook[attached=false,facing=south,powered=true]","131:9":"tripwire_hook[attached=false,facing=west,powered=true]","131:10":"tripwire_hook[attached=false,facing=north,powered=true]","131:11":"tripwire_hook[attached=false,facing=east,powered=true]","131:12":"tripwire_hook[attached=true,facing=south,powered=true]","131:13":"tripwire_hook[attached=true,facing=west,powered=true]","131:14":"tripwire_hook[attached=true,facing=north,powered=true]","131:15":"tripwire_hook[attached=true,facing=east,powered=true]","132:0":"tripwire[attached=false,disarmed=false,east=false,north=false,powered=false,south=false,west=false]","132:1":"tripwire[attached=false,disarmed=false,east=false,north=false,powered=true,south=false,west=false]","132:4":"tripwire[attached=true,disarmed=false,east=false,north=false,powered=false,south=false,west=false]","132:5":"tripwire[attached=true,disarmed=false,east=false,north=false,powered=true,south=false,west=false]","132:8":"tripwire[attached=false,disarmed=true,east=false,north=false,powered=false,south=false,west=false]","132:9":"tripwire[attached=false,disarmed=true,east=false,north=false,powered=true,south=false,west=false]","132:12":"tripwire[attached=true,disarmed=true,east=false,north=false,powered=false,south=false,west=false]","132:13":"tripwire[attached=true,disarmed=true,east=false,north=false,powered=true,south=false,west=false]","133:0":"emerald_block","134:0":"spruce_stairs[facing=east,half=bottom,shape=straight]","134:1":"spruce_stairs[facing=west,half=bottom,shape=straight]","134:2":"spruce_stairs[facing=south,half=bottom,shape=straight]","134:3":"spruce_stairs[facing=north,half=bottom,shape=straight]","134:4":"spruce_stairs[facing=east,half=top,shape=straight]","134:5":"spruce_stairs[facing=west,half=top,shape=straight]","134:6":"spruce_stairs[facing=south,half=top,shape=straight]","134:7":"spruce_stairs[facing=north,half=top,shape=straight]","135:0":"birch_stairs[facing=east,half=bottom,shape=straight]","135:1":"birch_stairs[facing=west,half=bottom,shape=straight]","135:2":"birch_stairs[facing=south,half=bottom,shape=straight]","135:3":"birch_stairs[facing=north,half=bottom,shape=straight]","135:4":"birch_stairs[facing=east,half=top,shape=straight]","135:5":"birch_stairs[facing=west,half=top,shape=straight]","135:6":"birch_stairs[facing=south,half=top,shape=straight]","135:7":"birch_stairs[facing=north,half=top,shape=straight]","136:0":"jungle_stairs[facing=east,half=bottom,shape=straight]","136:1":"jungle_stairs[facing=west,half=bottom,shape=straight]","136:2":"jungle_stairs[facing=south,half=bottom,shape=straight]","136:3":"jungle_stairs[facing=north,half=bottom,shape=straight]","136:4":"jungle_stairs[facing=east,half=top,shape=straight]","136:5":"jungle_stairs[facing=west,half=top,shape=straight]","136:6":"jungle_stairs[facing=south,half=top,shape=straight]","136:7":"jungle_stairs[facing=north,half=top,shape=straight]","137:0":"command_block[conditional=false,facing=down]","137:1":"command_block[conditional=false,facing=up]","137:2":"command_block[conditional=false,facing=north]","137:3":"command_block[conditional=false,facing=south]","137:4":"command_block[conditional=false,facing=west]","137:5":"command_block[conditional=false,facing=east]","137:8":"command_block[conditional=true,facing=down]","137:9":"command_block[conditional=true,facing=up]","137:10":"command_block[conditional=true,facing=north]","137:11":"command_block[conditional=true,facing=south]","137:12":"command_block[conditional=true,facing=west]","137:13":"command_block[conditional=true,facing=east]","138:0":"beacon","139:0":"cobblestone_wall[east=false,north=false,south=false,up=false,west=false]","139:1":"mossy_cobblestone_wall[east=false,north=false,south=false,up=false,west=false]","140:0":"potted_cactus","140:1":"potted_cactus","140:2":"potted_cactus","140:3":"potted_cactus","140:4":"potted_cactus","140:5":"potted_cactus","140:6":"potted_cactus","140:7":"potted_cactus","140:8":"potted_cactus","140:9":"potted_cactus","140:10":"potted_cactus","140:11":"potted_cactus","140:12":"potted_cactus","140:13":"potted_cactus","140:14":"potted_cactus","140:15":"potted_cactus","141:0":"carrots[age=0]","141:1":"carrots[age=1]","141:2":"carrots[age=2]","141:3":"carrots[age=3]","141:4":"carrots[age=4]","141:5":"carrots[age=5]","141:6":"carrots[age=6]","141:7":"carrots[age=7]","142:0":"potatoes[age=0]","142:1":"potatoes[age=1]","142:2":"potatoes[age=2]","142:3":"potatoes[age=3]","142:4":"potatoes[age=4]","142:5":"potatoes[age=5]","142:6":"potatoes[age=6]","142:7":"potatoes[age=7]","143:0":"oak_button[face=ceiling,facing=north,powered=false]","143:1":"oak_button[face=wall,facing=east,powered=false]","143:2":"oak_button[face=wall,facing=west,powered=false]","143:3":"oak_button[face=wall,facing=south,powered=false]","143:4":"oak_button[face=wall,facing=north,powered=false]","143:5":"oak_button[face=floor,facing=north,powered=false]","143:8":"oak_button[face=ceiling,facing=north,powered=true]","143:9":"oak_button[face=wall,facing=east,powered=true]","143:10":"oak_button[face=wall,facing=west,powered=true]","143:11":"oak_button[face=wall,facing=south,powered=true]","143:12":"oak_button[face=wall,facing=north,powered=true]","143:13":"oak_button[face=floor,facing=north,powered=true]","144:0":"player_head[facing=down]","144:1":"player_head[facing=up]","144:2":"player_head[facing=north]","144:3":"player_head[facing=south]","144:4":"player_head[facing=west]","144:5":"player_head[facing=east]","144:8":"player_head[facing=down]","144:9":"player_head[facing=up]","144:10":"player_head[facing=north]","144:11":"player_head[facing=south]","144:12":"player_head[facing=west]","144:13":"player_head[facing=east]","145:0":"anvil[facing=south]","145:1":"anvil[facing=west]","145:2":"anvil[facing=north]","145:3":"anvil[facing=east]","145:4":"chipped_anvil[facing=south]","145:5":"chipped_anvil[facing=west]","145:6":"chipped_anvil[facing=north]","145:7":"chipped_anvil[facing=east]","145:8":"damaged_anvil[facing=south]","145:9":"damaged_anvil[facing=west]","145:10":"damaged_anvil[facing=north]","145:11":"damaged_anvil[facing=east]","146:2":"trapped_chest[facing=north,type=single]","146:3":"trapped_chest[facing=south,type=single]","146:4":"trapped_chest[facing=west,type=single]","146:5":"trapped_chest[facing=east,type=single]","147:0":"light_weighted_pressure_plate[power=0]","147:1":"light_weighted_pressure_plate[power=1]","147:2":"light_weighted_pressure_plate[power=2]","147:3":"light_weighted_pressure_plate[power=3]","147:4":"light_weighted_pressure_plate[power=4]","147:5":"light_weighted_pressure_plate[power=5]","147:6":"light_weighted_pressure_plate[power=6]","147:7":"light_weighted_pressure_plate[power=7]","147:8":"light_weighted_pressure_plate[power=8]","147:9":"light_weighted_pressure_plate[power=9]","147:10":"light_weighted_pressure_plate[power=10]","147:11":"light_weighted_pressure_plate[power=11]","147:12":"light_weighted_pressure_plate[power=12]","147:13":"light_weighted_pressure_plate[power=13]","147:14":"light_weighted_pressure_plate[power=14]","147:15":"light_weighted_pressure_plate[power=15]","148:0":"heavy_weighted_pressure_plate[power=0]","148:1":"heavy_weighted_pressure_plate[power=1]","148:2":"heavy_weighted_pressure_plate[power=2]","148:3":"heavy_weighted_pressure_plate[power=3]","148:4":"heavy_weighted_pressure_plate[power=4]","148:5":"heavy_weighted_pressure_plate[power=5]","148:6":"heavy_weighted_pressure_plate[power=6]","148:7":"heavy_weighted_pressure_plate[power=7]","148:8":"heavy_weighted_pressure_plate[power=8]","148:9":"heavy_weighted_pressure_plate[power=9]","148:10":"heavy_weighted_pressure_plate[power=10]","148:11":"heavy_weighted_pressure_plate[power=11]","148:12":"heavy_weighted_pressure_plate[power=12]","148:13":"heavy_weighted_pressure_plate[power=13]","148:14":"heavy_weighted_pressure_plate[power=14]","148:15":"heavy_weighted_pressure_plate[power=15]","149:0":"comparator[facing=south,mode=compare,powered=false]","149:1":"comparator[facing=west,mode=compare,powered=false]","149:2":"comparator[facing=north,mode=compare,powered=false]","149:3":"comparator[facing=east,mode=compare,powered=false]","149:4":"comparator[facing=south,mode=subtract,powered=false]","149:5":"comparator[facing=west,mode=subtract,powered=false]","149:6":"comparator[facing=north,mode=subtract,powered=false]","149:7":"comparator[facing=east,mode=subtract,powered=false]","149:8":"comparator[facing=south,mode=compare,powered=true]","149:9":"comparator[facing=west,mode=compare,powered=true]","149:10":"comparator[facing=north,mode=compare,powered=true]","149:11":"comparator[facing=east,mode=compare,powered=true]","149:12":"comparator[facing=south,mode=subtract,powered=true]","149:13":"comparator[facing=west,mode=subtract,powered=true]","149:14":"comparator[facing=north,mode=subtract,powered=true]","149:15":"comparator[facing=east,mode=subtract,powered=true]","150:0":"comparator[facing=south,mode=compare,powered=false]","150:1":"comparator[facing=west,mode=compare,powered=false]","150:2":"comparator[facing=north,mode=compare,powered=false]","150:3":"comparator[facing=east,mode=compare,powered=false]","150:4":"comparator[facing=south,mode=subtract,powered=false]","150:5":"comparator[facing=west,mode=subtract,powered=false]","150:6":"comparator[facing=north,mode=subtract,powered=false]","150:7":"comparator[facing=east,mode=subtract,powered=false]","150:8":"comparator[facing=south,mode=compare,powered=true]","150:9":"comparator[facing=west,mode=compare,powered=true]","150:10":"comparator[facing=north,mode=compare,powered=true]","150:11":"comparator[facing=east,mode=compare,powered=true]","150:12":"comparator[facing=south,mode=subtract,powered=true]","150:13":"comparator[facing=west,mode=subtract,powered=true]","150:14":"comparator[facing=north,mode=subtract,powered=true]","150:15":"comparator[facing=east,mode=subtract,powered=true]","151:0":"daylight_detector[inverted=false,power=0]","151:1":"daylight_detector[inverted=false,power=1]","151:2":"daylight_detector[inverted=false,power=2]","151:3":"daylight_detector[inverted=false,power=3]","151:4":"daylight_detector[inverted=false,power=4]","151:5":"daylight_detector[inverted=false,power=5]","151:6":"daylight_detector[inverted=false,power=6]","151:7":"daylight_detector[inverted=false,power=7]","151:8":"daylight_detector[inverted=false,power=8]","151:9":"daylight_detector[inverted=false,power=9]","151:10":"daylight_detector[inverted=false,power=10]","151:11":"daylight_detector[inverted=false,power=11]","151:12":"daylight_detector[inverted=false,power=12]","151:13":"daylight_detector[inverted=false,power=13]","151:14":"daylight_detector[inverted=false,power=14]","151:15":"daylight_detector[inverted=false,power=15]","152:0":"redstone_block","153:0":"nether_quartz_ore","154:0":"hopper[enabled=true,facing=down]","154:2":"hopper[enabled=true,facing=north]","154:3":"hopper[enabled=true,facing=south]","154:4":"hopper[enabled=true,facing=west]","154:5":"hopper[enabled=true,facing=east]","154:8":"hopper[enabled=false,facing=down]","154:10":"hopper[enabled=false,facing=north]","154:11":"hopper[enabled=false,facing=south]","154:12":"hopper[enabled=false,facing=west]","154:13":"hopper[enabled=false,facing=east]","155:0":"quartz_block","155:1":"chiseled_quartz_block","155:2":"quartz_pillar[axis=y]","155:3":"quartz_pillar[axis=x]","155:4":"quartz_pillar[axis=z]","156:0":"quartz_stairs[facing=east,half=bottom,shape=straight]","156:1":"quartz_stairs[facing=west,half=bottom,shape=straight]","156:2":"quartz_stairs[facing=south,half=bottom,shape=straight]","156:3":"quartz_stairs[facing=north,half=bottom,shape=straight]","156:4":"quartz_stairs[facing=east,half=top,shape=straight]","156:5":"quartz_stairs[facing=west,half=top,shape=straight]","156:6":"quartz_stairs[facing=south,half=top,shape=straight]","156:7":"quartz_stairs[facing=north,half=top,shape=straight]","157:0":"activator_rail[powered=false,shape=north_south]","157:1":"activator_rail[powered=false,shape=east_west]","157:2":"activator_rail[powered=false,shape=ascending_east]","157:3":"activator_rail[powered=false,shape=ascending_west]","157:4":"activator_rail[powered=false,shape=ascending_north]","157:5":"activator_rail[powered=false,shape=ascending_south]","157:8":"activator_rail[powered=true,shape=north_south]","157:9":"activator_rail[powered=true,shape=east_west]","157:10":"activator_rail[powered=true,shape=ascending_east]","157:11":"activator_rail[powered=true,shape=ascending_west]","157:12":"activator_rail[powered=true,shape=ascending_north]","157:13":"activator_rail[powered=true,shape=ascending_south]","158:0":"dropper[facing=down,triggered=false]","158:1":"dropper[facing=up,triggered=false]","158:2":"dropper[facing=north,triggered=false]","158:3":"dropper[facing=south,triggered=false]","158:4":"dropper[facing=west,triggered=false]","158:5":"dropper[facing=east,triggered=false]","158:8":"dropper[facing=down,triggered=true]","158:9":"dropper[facing=up,triggered=true]","158:10":"dropper[facing=north,triggered=true]","158:11":"dropper[facing=south,triggered=true]","158:12":"dropper[facing=west,triggered=true]","158:13":"dropper[facing=east,triggered=true]","159:0":"white_terracotta","159:1":"orange_terracotta","159:2":"magenta_terracotta","159:3":"light_blue_terracotta","159:4":"yellow_terracotta","159:5":"lime_terracotta","159:6":"pink_terracotta","159:7":"gray_terracotta","159:8":"light_gray_terracotta","159:9":"cyan_terracotta","159:10":"purple_terracotta","159:11":"blue_terracotta","159:12":"brown_terracotta","159:13":"green_terracotta","159:14":"red_terracotta","159:15":"black_terracotta","160:0":"white_stained_glass_pane[east=false,north=false,south=false,west=false]","160:1":"orange_stained_glass_pane[east=false,north=false,south=false,west=false]","160:2":"magenta_stained_glass_pane[east=false,north=false,south=false,west=false]","160:3":"light_blue_stained_glass_pane[east=false,north=false,south=false,west=false]","160:4":"yellow_stained_glass_pane[east=false,north=false,south=false,west=false]","160:5":"lime_stained_glass_pane[east=false,north=false,south=false,west=false]","160:6":"pink_stained_glass_pane[east=false,north=false,south=false,west=false]","160:7":"gray_stained_glass_pane[east=false,north=false,south=false,west=false]","160:8":"light_gray_stained_glass_pane[east=false,north=false,south=false,west=false]","160:9":"cyan_stained_glass_pane[east=false,north=false,south=false,west=false]","160:10":"purple_stained_glass_pane[east=false,north=false,south=false,west=false]","160:11":"blue_stained_glass_pane[east=false,north=false,south=false,west=false]","160:12":"brown_stained_glass_pane[east=false,north=false,south=false,west=false]","160:13":"green_stained_glass_pane[east=false,north=false,south=false,west=false]","160:14":"red_stained_glass_pane[east=false,north=false,south=false,west=false]","160:15":"black_stained_glass_pane[east=false,north=false,south=false,west=false]","161:0":"acacia_leaves[check_decay=false,decayable=true]","161:1":"dark_oak_leaves[check_decay=false,decayable=true]","161:4":"acacia_leaves[check_decay=false,decayable=false]","161:5":"dark_oak_leaves[check_decay=false,decayable=false]","161:8":"acacia_leaves[check_decay=true,decayable=true]","161:9":"dark_oak_leaves[check_decay=true,decayable=true]","161:12":"acacia_leaves[check_decay=true,decayable=false]","161:13":"dark_oak_leaves[check_decay=true,decayable=false]","162:0":"acacia_log[axis=y]","162:1":"dark_oak_log[axis=y]","162:4":"acacia_log[axis=x]","162:5":"dark_oak_log[axis=x]","162:8":"acacia_log[axis=z]","162:9":"dark_oak_log[axis=z]","162:12":"acacia_bark","162:13":"dark_oak_bark","163:0":"acacia_stairs[facing=east,half=bottom,shape=straight]","163:1":"acacia_stairs[facing=west,half=bottom,shape=straight]","163:2":"acacia_stairs[facing=south,half=bottom,shape=straight]","163:3":"acacia_stairs[facing=north,half=bottom,shape=straight]","163:4":"acacia_stairs[facing=east,half=top,shape=straight]","163:5":"acacia_stairs[facing=west,half=top,shape=straight]","163:6":"acacia_stairs[facing=south,half=top,shape=straight]","163:7":"acacia_stairs[facing=north,half=top,shape=straight]","164:0":"dark_oak_stairs[facing=east,half=bottom,shape=straight]","164:1":"dark_oak_stairs[facing=west,half=bottom,shape=straight]","164:2":"dark_oak_stairs[facing=south,half=bottom,shape=straight]","164:3":"dark_oak_stairs[facing=north,half=bottom,shape=straight]","164:4":"dark_oak_stairs[facing=east,half=top,shape=straight]","164:5":"dark_oak_stairs[facing=west,half=top,shape=straight]","164:6":"dark_oak_stairs[facing=south,half=top,shape=straight]","164:7":"dark_oak_stairs[facing=north,half=top,shape=straight]","165:0":"slime_block","166:0":"barrier","167:0":"iron_trapdoor[facing=north,half=bottom,open=false]","167:1":"iron_trapdoor[facing=south,half=bottom,open=false]","167:2":"iron_trapdoor[facing=west,half=bottom,open=false]","167:3":"iron_trapdoor[facing=east,half=bottom,open=false]","167:4":"iron_trapdoor[facing=north,half=bottom,open=true]","167:5":"iron_trapdoor[facing=south,half=bottom,open=true]","167:6":"iron_trapdoor[facing=west,half=bottom,open=true]","167:7":"iron_trapdoor[facing=east,half=bottom,open=true]","167:8":"iron_trapdoor[facing=north,half=top,open=false]","167:9":"iron_trapdoor[facing=south,half=top,open=false]","167:10":"iron_trapdoor[facing=west,half=top,open=false]","167:11":"iron_trapdoor[facing=east,half=top,open=false]","167:12":"iron_trapdoor[facing=north,half=top,open=true]","167:13":"iron_trapdoor[facing=south,half=top,open=true]","167:14":"iron_trapdoor[facing=west,half=top,open=true]","167:15":"iron_trapdoor[facing=east,half=top,open=true]","168:0":"prismarine","168:1":"prismarine_bricks","168:2":"dark_prismarine","169:0":"sea_lantern","170:0":"hay_block[axis=y]","170:4":"hay_block[axis=x]","170:8":"hay_block[axis=z]","171:0":"white_carpet","171:1":"orange_carpet","171:2":"magenta_carpet","171:3":"light_blue_carpet","171:4":"yellow_carpet","171:5":"lime_carpet","171:6":"pink_carpet","171:7":"gray_carpet","171:8":"light_gray_carpet","171:9":"cyan_carpet","171:10":"purple_carpet","171:11":"blue_carpet","171:12":"brown_carpet","171:13":"green_carpet","171:14":"red_carpet","171:15":"black_carpet","172:0":"terracotta","173:0":"coal_block","174:0":"packed_ice","175:0":"sunflower[half=lower]","175:1":"lilac[half=lower]","175:2":"tall_grass[half=lower]","175:3":"large_fern[half=lower]","175:4":"rose_bush[half=lower]","175:5":"peony[half=lower]","175:8":"peony[half=upper]","175:9":"peony[half=upper]","175:10":"peony[half=upper]","175:11":"peony[half=upper]","176:0":"white_banner[rotation=0]","176:1":"white_banner[rotation=1]","176:2":"white_banner[rotation=2]","176:3":"white_banner[rotation=3]","176:4":"white_banner[rotation=4]","176:5":"white_banner[rotation=5]","176:6":"white_banner[rotation=6]","176:7":"white_banner[rotation=7]","176:8":"white_banner[rotation=8]","176:9":"white_banner[rotation=9]","176:10":"white_banner[rotation=10]","176:11":"white_banner[rotation=11]","176:12":"white_banner[rotation=12]","176:13":"white_banner[rotation=13]","176:14":"white_banner[rotation=14]","176:15":"white_banner[rotation=15]","177:2":"white_wall_banner[facing=north]","177:3":"white_wall_banner[facing=south]","177:4":"white_wall_banner[facing=west]","177:5":"white_wall_banner[facing=east]","178:0":"daylight_detector[inverted=true,power=0]","178:1":"daylight_detector[inverted=true,power=1]","178:2":"daylight_detector[inverted=true,power=2]","178:3":"daylight_detector[inverted=true,power=3]","178:4":"daylight_detector[inverted=true,power=4]","178:5":"daylight_detector[inverted=true,power=5]","178:6":"daylight_detector[inverted=true,power=6]","178:7":"daylight_detector[inverted=true,power=7]","178:8":"daylight_detector[inverted=true,power=8]","178:9":"daylight_detector[inverted=true,power=9]","178:10":"daylight_detector[inverted=true,power=10]","178:11":"daylight_detector[inverted=true,power=11]","178:12":"daylight_detector[inverted=true,power=12]","178:13":"daylight_detector[inverted=true,power=13]","178:14":"daylight_detector[inverted=true,power=14]","178:15":"daylight_detector[inverted=true,power=15]","179:0":"red_sandstone","179:1":"chiseled_red_sandstone","179:2":"cut_red_sandstone","180:0":"red_sandstone_stairs[facing=east,half=bottom,shape=straight]","180:1":"red_sandstone_stairs[facing=west,half=bottom,shape=straight]","180:2":"red_sandstone_stairs[facing=south,half=bottom,shape=straight]","180:3":"red_sandstone_stairs[facing=north,half=bottom,shape=straight]","180:4":"red_sandstone_stairs[facing=east,half=top,shape=straight]","180:5":"red_sandstone_stairs[facing=west,half=top,shape=straight]","180:6":"red_sandstone_stairs[facing=south,half=top,shape=straight]","180:7":"red_sandstone_stairs[facing=north,half=top,shape=straight]","181:0":"red_sandstone_slab[type=double]","181:8":"smooth_red_sandstone","182:0":"red_sandstone_slab[type=bottom]","182:8":"red_sandstone_slab[type=top]","183:0":"spruce_fence_gate[facing=south,in_wall=false,open=false,powered=false]","183:1":"spruce_fence_gate[facing=west,in_wall=false,open=false,powered=false]","183:2":"spruce_fence_gate[facing=north,in_wall=false,open=false,powered=false]","183:3":"spruce_fence_gate[facing=east,in_wall=false,open=false,powered=false]","183:4":"spruce_fence_gate[facing=south,in_wall=false,open=true,powered=false]","183:5":"spruce_fence_gate[facing=west,in_wall=false,open=true,powered=false]","183:6":"spruce_fence_gate[facing=north,in_wall=false,open=true,powered=false]","183:7":"spruce_fence_gate[facing=east,in_wall=false,open=true,powered=false]","183:8":"spruce_fence_gate[facing=south,in_wall=false,open=false,powered=true]","183:9":"spruce_fence_gate[facing=west,in_wall=false,open=false,powered=true]","183:10":"spruce_fence_gate[facing=north,in_wall=false,open=false,powered=true]","183:11":"spruce_fence_gate[facing=east,in_wall=false,open=false,powered=true]","183:12":"spruce_fence_gate[facing=south,in_wall=false,open=true,powered=true]","183:13":"spruce_fence_gate[facing=west,in_wall=false,open=true,powered=true]","183:14":"spruce_fence_gate[facing=north,in_wall=false,open=true,powered=true]","183:15":"spruce_fence_gate[facing=east,in_wall=false,open=true,powered=true]","184:0":"birch_fence_gate[facing=south,in_wall=false,open=false,powered=false]","184:1":"birch_fence_gate[facing=west,in_wall=false,open=false,powered=false]","184:2":"birch_fence_gate[facing=north,in_wall=false,open=false,powered=false]","184:3":"birch_fence_gate[facing=east,in_wall=false,open=false,powered=false]","184:4":"birch_fence_gate[facing=south,in_wall=false,open=true,powered=false]","184:5":"birch_fence_gate[facing=west,in_wall=false,open=true,powered=false]","184:6":"birch_fence_gate[facing=north,in_wall=false,open=true,powered=false]","184:7":"birch_fence_gate[facing=east,in_wall=false,open=true,powered=false]","184:8":"birch_fence_gate[facing=south,in_wall=false,open=false,powered=true]","184:9":"birch_fence_gate[facing=west,in_wall=false,open=false,powered=true]","184:10":"birch_fence_gate[facing=north,in_wall=false,open=false,powered=true]","184:11":"birch_fence_gate[facing=east,in_wall=false,open=false,powered=true]","184:12":"birch_fence_gate[facing=south,in_wall=false,open=true,powered=true]","184:13":"birch_fence_gate[facing=west,in_wall=false,open=true,powered=true]","184:14":"birch_fence_gate[facing=north,in_wall=false,open=true,powered=true]","184:15":"birch_fence_gate[facing=east,in_wall=false,open=true,powered=true]","185:0":"jungle_fence_gate[facing=south,in_wall=false,open=false,powered=false]","185:1":"jungle_fence_gate[facing=west,in_wall=false,open=false,powered=false]","185:2":"jungle_fence_gate[facing=north,in_wall=false,open=false,powered=false]","185:3":"jungle_fence_gate[facing=east,in_wall=false,open=false,powered=false]","185:4":"jungle_fence_gate[facing=south,in_wall=false,open=true,powered=false]","185:5":"jungle_fence_gate[facing=west,in_wall=false,open=true,powered=false]","185:6":"jungle_fence_gate[facing=north,in_wall=false,open=true,powered=false]","185:7":"jungle_fence_gate[facing=east,in_wall=false,open=true,powered=false]","185:8":"jungle_fence_gate[facing=south,in_wall=false,open=false,powered=true]","185:9":"jungle_fence_gate[facing=west,in_wall=false,open=false,powered=true]","185:10":"jungle_fence_gate[facing=north,in_wall=false,open=false,powered=true]","185:11":"jungle_fence_gate[facing=east,in_wall=false,open=false,powered=true]","185:12":"jungle_fence_gate[facing=south,in_wall=false,open=true,powered=true]","185:13":"jungle_fence_gate[facing=west,in_wall=false,open=true,powered=true]","185:14":"jungle_fence_gate[facing=north,in_wall=false,open=true,powered=true]","185:15":"jungle_fence_gate[facing=east,in_wall=false,open=true,powered=true]","186:0":"dark_oak_fence_gate[facing=south,in_wall=false,open=false,powered=false]","186:1":"dark_oak_fence_gate[facing=west,in_wall=false,open=false,powered=false]","186:2":"dark_oak_fence_gate[facing=north,in_wall=false,open=false,powered=false]","186:3":"dark_oak_fence_gate[facing=east,in_wall=false,open=false,powered=false]","186:4":"dark_oak_fence_gate[facing=south,in_wall=false,open=true,powered=false]","186:5":"dark_oak_fence_gate[facing=west,in_wall=false,open=true,powered=false]","186:6":"dark_oak_fence_gate[facing=north,in_wall=false,open=true,powered=false]","186:7":"dark_oak_fence_gate[facing=east,in_wall=false,open=true,powered=false]","186:8":"dark_oak_fence_gate[facing=south,in_wall=false,open=false,powered=true]","186:9":"dark_oak_fence_gate[facing=west,in_wall=false,open=false,powered=true]","186:10":"dark_oak_fence_gate[facing=north,in_wall=false,open=false,powered=true]","186:11":"dark_oak_fence_gate[facing=east,in_wall=false,open=false,powered=true]","186:12":"dark_oak_fence_gate[facing=south,in_wall=false,open=true,powered=true]","186:13":"dark_oak_fence_gate[facing=west,in_wall=false,open=true,powered=true]","186:14":"dark_oak_fence_gate[facing=north,in_wall=false,open=true,powered=true]","186:15":"dark_oak_fence_gate[facing=east,in_wall=false,open=true,powered=true]","187:0":"acacia_fence_gate[facing=south,in_wall=false,open=false,powered=false]","187:1":"acacia_fence_gate[facing=west,in_wall=false,open=false,powered=false]","187:2":"acacia_fence_gate[facing=north,in_wall=false,open=false,powered=false]","187:3":"acacia_fence_gate[facing=east,in_wall=false,open=false,powered=false]","187:4":"acacia_fence_gate[facing=south,in_wall=false,open=true,powered=false]","187:5":"acacia_fence_gate[facing=west,in_wall=false,open=true,powered=false]","187:6":"acacia_fence_gate[facing=north,in_wall=false,open=true,powered=false]","187:7":"acacia_fence_gate[facing=east,in_wall=false,open=true,powered=false]","187:8":"acacia_fence_gate[facing=south,in_wall=false,open=false,powered=true]","187:9":"acacia_fence_gate[facing=west,in_wall=false,open=false,powered=true]","187:10":"acacia_fence_gate[facing=north,in_wall=false,open=false,powered=true]","187:11":"acacia_fence_gate[facing=east,in_wall=false,open=false,powered=true]","187:12":"acacia_fence_gate[facing=south,in_wall=false,open=true,powered=true]","187:13":"acacia_fence_gate[facing=west,in_wall=false,open=true,powered=true]","187:14":"acacia_fence_gate[facing=north,in_wall=false,open=true,powered=true]","187:15":"acacia_fence_gate[facing=east,in_wall=false,open=true,powered=true]","188:0":"spruce_fence[east=false,north=false,south=false,west=false]","189:0":"birch_fence[east=false,north=false,south=false,west=false]","190:0":"jungle_fence[east=false,north=false,south=false,west=false]","191:0":"dark_oak_fence[east=false,north=false,south=false,west=false]","192:0":"acacia_fence[east=false,north=false,south=false,west=false]","193:0":"spruce_door[facing=east,half=lower,hinge=right,open=false,powered=false]","193:1":"spruce_door[facing=south,half=lower,hinge=right,open=false,powered=false]","193:2":"spruce_door[facing=west,half=lower,hinge=right,open=false,powered=false]","193:3":"spruce_door[facing=north,half=lower,hinge=right,open=false,powered=false]","193:4":"spruce_door[facing=east,half=lower,hinge=right,open=true,powered=false]","193:5":"spruce_door[facing=south,half=lower,hinge=right,open=true,powered=false]","193:6":"spruce_door[facing=west,half=lower,hinge=right,open=true,powered=false]","193:7":"spruce_door[facing=north,half=lower,hinge=right,open=true,powered=false]","193:8":"spruce_door[facing=east,half=upper,hinge=left,open=false,powered=false]","193:9":"spruce_door[facing=east,half=upper,hinge=right,open=false,powered=false]","193:10":"spruce_door[facing=east,half=upper,hinge=left,open=false,powered=true]","193:11":"spruce_door[facing=east,half=upper,hinge=right,open=false,powered=true]","194:0":"birch_door[facing=east,half=lower,hinge=right,open=false,powered=false]","194:1":"birch_door[facing=south,half=lower,hinge=right,open=false,powered=false]","194:2":"birch_door[facing=west,half=lower,hinge=right,open=false,powered=false]","194:3":"birch_door[facing=north,half=lower,hinge=right,open=false,powered=false]","194:4":"birch_door[facing=east,half=lower,hinge=right,open=true,powered=false]","194:5":"birch_door[facing=south,half=lower,hinge=right,open=true,powered=false]","194:6":"birch_door[facing=west,half=lower,hinge=right,open=true,powered=false]","194:7":"birch_door[facing=north,half=lower,hinge=right,open=true,powered=false]","194:8":"birch_door[facing=east,half=upper,hinge=left,open=false,powered=false]","194:9":"birch_door[facing=east,half=upper,hinge=right,open=false,powered=false]","194:10":"birch_door[facing=east,half=upper,hinge=left,open=false,powered=true]","194:11":"birch_door[facing=east,half=upper,hinge=right,open=false,powered=true]","195:0":"jungle_door[facing=east,half=lower,hinge=right,open=false,powered=false]","195:1":"jungle_door[facing=south,half=lower,hinge=right,open=false,powered=false]","195:2":"jungle_door[facing=west,half=lower,hinge=right,open=false,powered=false]","195:3":"jungle_door[facing=north,half=lower,hinge=right,open=false,powered=false]","195:4":"jungle_door[facing=east,half=lower,hinge=right,open=true,powered=false]","195:5":"jungle_door[facing=south,half=lower,hinge=right,open=true,powered=false]","195:6":"jungle_door[facing=west,half=lower,hinge=right,open=true,powered=false]","195:7":"jungle_door[facing=north,half=lower,hinge=right,open=true,powered=false]","195:8":"jungle_door[facing=east,half=upper,hinge=left,open=false,powered=false]","195:9":"jungle_door[facing=east,half=upper,hinge=right,open=false,powered=false]","195:10":"jungle_door[facing=east,half=upper,hinge=left,open=false,powered=true]","195:11":"jungle_door[facing=east,half=upper,hinge=right,open=false,powered=true]","196:0":"acacia_door[facing=east,half=lower,hinge=right,open=false,powered=false]","196:1":"acacia_door[facing=south,half=lower,hinge=right,open=false,powered=false]","196:2":"acacia_door[facing=west,half=lower,hinge=right,open=false,powered=false]","196:3":"acacia_door[facing=north,half=lower,hinge=right,open=false,powered=false]","196:4":"acacia_door[facing=east,half=lower,hinge=right,open=true,powered=false]","196:5":"acacia_door[facing=south,half=lower,hinge=right,open=true,powered=false]","196:6":"acacia_door[facing=west,half=lower,hinge=right,open=true,powered=false]","196:7":"acacia_door[facing=north,half=lower,hinge=right,open=true,powered=false]","196:8":"acacia_door[facing=east,half=upper,hinge=left,open=false,powered=false]","196:9":"acacia_door[facing=east,half=upper,hinge=right,open=false,powered=false]","196:10":"acacia_door[facing=east,half=upper,hinge=left,open=false,powered=true]","196:11":"acacia_door[facing=east,half=upper,hinge=right,open=false,powered=true]","197:0":"dark_oak_door[facing=east,half=lower,hinge=right,open=false,powered=false]","197:1":"dark_oak_door[facing=south,half=lower,hinge=right,open=false,powered=false]","197:2":"dark_oak_door[facing=west,half=lower,hinge=right,open=false,powered=false]","197:3":"dark_oak_door[facing=north,half=lower,hinge=right,open=false,powered=false]","197:4":"dark_oak_door[facing=east,half=lower,hinge=right,open=true,powered=false]","197:5":"dark_oak_door[facing=south,half=lower,hinge=right,open=true,powered=false]","197:6":"dark_oak_door[facing=west,half=lower,hinge=right,open=true,powered=false]","197:7":"dark_oak_door[facing=north,half=lower,hinge=right,open=true,powered=false]","197:8":"dark_oak_door[facing=east,half=upper,hinge=left,open=false,powered=false]","197:9":"dark_oak_door[facing=east,half=upper,hinge=right,open=false,powered=false]","197:10":"dark_oak_door[facing=east,half=upper,hinge=left,open=false,powered=true]","197:11":"dark_oak_door[facing=east,half=upper,hinge=right,open=false,powered=true]","198:0":"end_rod[facing=down]","198:1":"end_rod[facing=up]","198:2":"end_rod[facing=north]","198:3":"end_rod[facing=south]","198:4":"end_rod[facing=west]","198:5":"end_rod[facing=east]","199:0":"chorus_plant[down=false,east=false,north=false,south=false,up=false,west=false]","200:0":"chorus_flower[age=0]","200:1":"chorus_flower[age=1]","200:2":"chorus_flower[age=2]","200:3":"chorus_flower[age=3]","200:4":"chorus_flower[age=4]","200:5":"chorus_flower[age=5]","201:0":"purpur_block","202:0":"purpur_pillar[axis=y]","202:4":"purpur_pillar[axis=x]","202:8":"purpur_pillar[axis=z]","203:0":"purpur_stairs[facing=east,half=bottom,shape=straight]","203:1":"purpur_stairs[facing=west,half=bottom,shape=straight]","203:2":"purpur_stairs[facing=south,half=bottom,shape=straight]","203:3":"purpur_stairs[facing=north,half=bottom,shape=straight]","203:4":"purpur_stairs[facing=east,half=top,shape=straight]","203:5":"purpur_stairs[facing=west,half=top,shape=straight]","203:6":"purpur_stairs[facing=south,half=top,shape=straight]","203:7":"purpur_stairs[facing=north,half=top,shape=straight]","204:0":"purpur_slab[type=double]","205:0":"purpur_slab[type=bottom]","205:8":"purpur_slab[type=top]","206:0":"end_stone_bricks","207:0":"beetroots[age=0]","207:1":"beetroots[age=1]","207:2":"beetroots[age=2]","207:3":"beetroots[age=3]","208:0":"grass_path","209:0":"end_gateway","210:0":"repeating_command_block[conditional=false,facing=down]","210:1":"repeating_command_block[conditional=false,facing=up]","210:2":"repeating_command_block[conditional=false,facing=north]","210:3":"repeating_command_block[conditional=false,facing=south]","210:4":"repeating_command_block[conditional=false,facing=west]","210:5":"repeating_command_block[conditional=false,facing=east]","210:8":"repeating_command_block[conditional=true,facing=down]","210:9":"repeating_command_block[conditional=true,facing=up]","210:10":"repeating_command_block[conditional=true,facing=north]","210:11":"repeating_command_block[conditional=true,facing=south]","210:12":"repeating_command_block[conditional=true,facing=west]","210:13":"repeating_command_block[conditional=true,facing=east]","211:0":"chain_command_block[conditional=false,facing=down]","211:1":"chain_command_block[conditional=false,facing=up]","211:2":"chain_command_block[conditional=false,facing=north]","211:3":"chain_command_block[conditional=false,facing=south]","211:4":"chain_command_block[conditional=false,facing=west]","211:5":"chain_command_block[conditional=false,facing=east]","211:8":"chain_command_block[conditional=true,facing=down]","211:9":"chain_command_block[conditional=true,facing=up]","211:10":"chain_command_block[conditional=true,facing=north]","211:11":"chain_command_block[conditional=true,facing=south]","211:12":"chain_command_block[conditional=true,facing=west]","211:13":"chain_command_block[conditional=true,facing=east]","212:0":"frosted_ice[age=0]","212:1":"frosted_ice[age=1]","212:2":"frosted_ice[age=2]","212:3":"frosted_ice[age=3]","213:0":"magma_block","214:0":"nether_wart_block","215:0":"red_nether_bricks","216:0":"bone_block[axis=y]","216:4":"bone_block[axis=x]","216:8":"bone_block[axis=z]","217:0":"structure_void","218:0":"observer[facing=down,powered=false]","218:1":"observer[facing=up,powered=false]","218:2":"observer[facing=north,powered=false]","218:3":"observer[facing=south,powered=false]","218:4":"observer[facing=west,powered=false]","218:5":"observer[facing=east,powered=false]","218:8":"observer[facing=down,powered=true]","218:9":"observer[facing=up,powered=true]","218:10":"observer[facing=north,powered=true]","218:11":"observer[facing=south,powered=true]","218:12":"observer[facing=west,powered=true]","218:13":"observer[facing=east,powered=true]","219:0":"white_shulker_box[facing=down]","219:1":"white_shulker_box[facing=up]","219:2":"white_shulker_box[facing=north]","219:3":"white_shulker_box[facing=south]","219:4":"white_shulker_box[facing=west]","219:5":"white_shulker_box[facing=east]","220:0":"orange_shulker_box[facing=down]","220:1":"orange_shulker_box[facing=up]","220:2":"orange_shulker_box[facing=north]","220:3":"orange_shulker_box[facing=south]","220:4":"orange_shulker_box[facing=west]","220:5":"orange_shulker_box[facing=east]","221:0":"magenta_shulker_box[facing=down]","221:1":"magenta_shulker_box[facing=up]","221:2":"magenta_shulker_box[facing=north]","221:3":"magenta_shulker_box[facing=south]","221:4":"magenta_shulker_box[facing=west]","221:5":"magenta_shulker_box[facing=east]","222:0":"light_blue_shulker_box[facing=down]","222:1":"light_blue_shulker_box[facing=up]","222:2":"light_blue_shulker_box[facing=north]","222:3":"light_blue_shulker_box[facing=south]","222:4":"light_blue_shulker_box[facing=west]","222:5":"light_blue_shulker_box[facing=east]","223:0":"yellow_shulker_box[facing=down]","223:1":"yellow_shulker_box[facing=up]","223:2":"yellow_shulker_box[facing=north]","223:3":"yellow_shulker_box[facing=south]","223:4":"yellow_shulker_box[facing=west]","223:5":"yellow_shulker_box[facing=east]","224:0":"lime_shulker_box[facing=down]","224:1":"lime_shulker_box[facing=up]","224:2":"lime_shulker_box[facing=north]","224:3":"lime_shulker_box[facing=south]","224:4":"lime_shulker_box[facing=west]","224:5":"lime_shulker_box[facing=east]","225:0":"pink_shulker_box[facing=down]","225:1":"pink_shulker_box[facing=up]","225:2":"pink_shulker_box[facing=north]","225:3":"pink_shulker_box[facing=south]","225:4":"pink_shulker_box[facing=west]","225:5":"pink_shulker_box[facing=east]","226:0":"gray_shulker_box[facing=down]","226:1":"gray_shulker_box[facing=up]","226:2":"gray_shulker_box[facing=north]","226:3":"gray_shulker_box[facing=south]","226:4":"gray_shulker_box[facing=west]","226:5":"gray_shulker_box[facing=east]","227:0":"light_gray_shulker_box[facing=down]","227:1":"light_gray_shulker_box[facing=up]","227:2":"light_gray_shulker_box[facing=north]","227:3":"light_gray_shulker_box[facing=south]","227:4":"light_gray_shulker_box[facing=west]","227:5":"light_gray_shulker_box[facing=east]","228:0":"cyan_shulker_box[facing=down]","228:1":"cyan_shulker_box[facing=up]","228:2":"cyan_shulker_box[facing=north]","228:3":"cyan_shulker_box[facing=south]","228:4":"cyan_shulker_box[facing=west]","228:5":"cyan_shulker_box[facing=east]","229:0":"purple_shulker_box[facing=down]","229:1":"purple_shulker_box[facing=up]","229:2":"purple_shulker_box[facing=north]","229:3":"purple_shulker_box[facing=south]","229:4":"purple_shulker_box[facing=west]","229:5":"purple_shulker_box[facing=east]","230:0":"blue_shulker_box[facing=down]","230:1":"blue_shulker_box[facing=up]","230:2":"blue_shulker_box[facing=north]","230:3":"blue_shulker_box[facing=south]","230:4":"blue_shulker_box[facing=west]","230:5":"blue_shulker_box[facing=east]","231:0":"brown_shulker_box[facing=down]","231:1":"brown_shulker_box[facing=up]","231:2":"brown_shulker_box[facing=north]","231:3":"brown_shulker_box[facing=south]","231:4":"brown_shulker_box[facing=west]","231:5":"brown_shulker_box[facing=east]","232:0":"green_shulker_box[facing=down]","232:1":"green_shulker_box[facing=up]","232:2":"green_shulker_box[facing=north]","232:3":"green_shulker_box[facing=south]","232:4":"green_shulker_box[facing=west]","232:5":"green_shulker_box[facing=east]","233:0":"red_shulker_box[facing=down]","233:1":"red_shulker_box[facing=up]","233:2":"red_shulker_box[facing=north]","233:3":"red_shulker_box[facing=south]","233:4":"red_shulker_box[facing=west]","233:5":"red_shulker_box[facing=east]","234:0":"black_shulker_box[facing=down]","234:1":"black_shulker_box[facing=up]","234:2":"black_shulker_box[facing=north]","234:3":"black_shulker_box[facing=south]","234:4":"black_shulker_box[facing=west]","234:5":"black_shulker_box[facing=east]","235:0":"white_glazed_terracotta[facing=south]","235:1":"white_glazed_terracotta[facing=west]","235:2":"white_glazed_terracotta[facing=north]","235:3":"white_glazed_terracotta[facing=east]","236:0":"orange_glazed_terracotta[facing=south]","236:1":"orange_glazed_terracotta[facing=west]","236:2":"orange_glazed_terracotta[facing=north]","236:3":"orange_glazed_terracotta[facing=east]","237:0":"magenta_glazed_terracotta[facing=south]","237:1":"magenta_glazed_terracotta[facing=west]","237:2":"magenta_glazed_terracotta[facing=north]","237:3":"magenta_glazed_terracotta[facing=east]","238:0":"light_blue_glazed_terracotta[facing=south]","238:1":"light_blue_glazed_terracotta[facing=west]","238:2":"light_blue_glazed_terracotta[facing=north]","238:3":"light_blue_glazed_terracotta[facing=east]","239:0":"yellow_glazed_terracotta[facing=south]","239:1":"yellow_glazed_terracotta[facing=west]","239:2":"yellow_glazed_terracotta[facing=north]","239:3":"yellow_glazed_terracotta[facing=east]","240:0":"lime_glazed_terracotta[facing=south]","240:1":"lime_glazed_terracotta[facing=west]","240:2":"lime_glazed_terracotta[facing=north]","240:3":"lime_glazed_terracotta[facing=east]","241:0":"pink_glazed_terracotta[facing=south]","241:1":"pink_glazed_terracotta[facing=west]","241:2":"pink_glazed_terracotta[facing=north]","241:3":"pink_glazed_terracotta[facing=east]","242:0":"gray_glazed_terracotta[facing=south]","242:1":"gray_glazed_terracotta[facing=west]","242:2":"gray_glazed_terracotta[facing=north]","242:3":"gray_glazed_terracotta[facing=east]","243:0":"light_gray_glazed_terracotta[facing=south]","243:1":"light_gray_glazed_terracotta[facing=west]","243:2":"light_gray_glazed_terracotta[facing=north]","243:3":"light_gray_glazed_terracotta[facing=east]","244:0":"cyan_glazed_terracotta[facing=south]","244:1":"cyan_glazed_terracotta[facing=west]","244:2":"cyan_glazed_terracotta[facing=north]","244:3":"cyan_glazed_terracotta[facing=east]","245:0":"purple_glazed_terracotta[facing=south]","245:1":"purple_glazed_terracotta[facing=west]","245:2":"purple_glazed_terracotta[facing=north]","245:3":"purple_glazed_terracotta[facing=east]","246:0":"blue_glazed_terracotta[facing=south]","246:1":"blue_glazed_terracotta[facing=west]","246:2":"blue_glazed_terracotta[facing=north]","246:3":"blue_glazed_terracotta[facing=east]","247:0":"brown_glazed_terracotta[facing=south]","247:1":"brown_glazed_terracotta[facing=west]","247:2":"brown_glazed_terracotta[facing=north]","247:3":"brown_glazed_terracotta[facing=east]","248:0":"green_glazed_terracotta[facing=south]","248:1":"green_glazed_terracotta[facing=west]","248:2":"green_glazed_terracotta[facing=north]","248:3":"green_glazed_terracotta[facing=east]","249:0":"red_glazed_terracotta[facing=south]","249:1":"red_glazed_terracotta[facing=west]","249:2":"red_glazed_terracotta[facing=north]","249:3":"red_glazed_terracotta[facing=east]","250:0":"black_glazed_terracotta[facing=south]","250:1":"black_glazed_terracotta[facing=west]","250:2":"black_glazed_terracotta[facing=north]","250:3":"black_glazed_terracotta[facing=east]","251:0":"white_concrete","251:1":"orange_concrete","251:2":"magenta_concrete","251:3":"light_blue_concrete","251:4":"yellow_concrete","251:5":"lime_concrete","251:6":"pink_concrete","251:7":"gray_concrete","251:8":"light_gray_concrete","251:9":"cyan_concrete","251:10":"purple_concrete","251:11":"blue_concrete","251:12":"brown_concrete","251:13":"green_concrete","251:14":"red_concrete","251:15":"black_concrete","252:0":"white_concrete_powder","252:1":"orange_concrete_powder","252:2":"magenta_concrete_powder","252:3":"light_blue_concrete_powder","252:4":"yellow_concrete_powder","252:5":"lime_concrete_powder","252:6":"pink_concrete_powder","252:7":"gray_concrete_powder","252:8":"light_gray_concrete_powder","252:9":"cyan_concrete_powder","252:10":"purple_concrete_powder","252:11":"blue_concrete_powder","252:12":"brown_concrete_powder","252:13":"green_concrete_powder","252:14":"red_concrete_powder","252:15":"black_concrete_powder","255:0":"structure_block[mode=save]","255:1":"structure_block[mode=load]","255:2":"structure_block[mode=corner]","255:3":"structure_block[mode=data]"},clientCalculatedBlocks:{block_snowy:["grass_block","dirt","coarse_dirt","podzol","mycelium"],directional:["fire","redstone_wire","oak_fence","iron_bars","glass_pane","vine","nether_brick_fence","tripwire","cobblestone_wall","mossy_cobblestone_wall","white_stained_glass_pane","orange_stained_glass_pane","magenta_stained_glass_pane","light_blue_stained_glass_pane","yellow_stained_glass_pane","lime_stained_glass_pane","pink_stained_glass_pane","gray_stained_glass_pane","light_gray_stained_glass_pane","cyan_stained_glass_pane","purple_stained_glass_pane","blue_stained_glass_pane","brown_stained_glass_pane","green_stained_glass_pane","red_stained_glass_pane","black_stained_glass_pane","spruce_fence","birch_fence","jungle_fence","dark_oak_fence","acacia_fence","chorus_plant"],door:["oak_door","iron_door","spruce_door","birch_door","jungle_door","acacia_door","dark_oak_door"],repeater_locked:["repeater"],gate_in_wall:["oak_fence_gate","spruce_fence_gate","birch_fence_gate","jungle_fence_gate","dark_oak_fence_gate","acacia_fence_gate"]}};a();o();s();function QG(t){return`${t.x},${t.y},${t.z}`}a();o();s();var ZG={version:"",worldMaxY:256,worldMinY:0,enableLighting:!0,skyLight:15,smoothLighting:!1,outputFormat:"threeJs",debugModelVariant:void 0,clipWorldBelowY:void 0,disableBlockEntityTextures:!1},XG=(t,e)=>e?`${t}:${e}`:String(t);a();o();s();var la=new Set(["air","void_air","cave_air","barrier","light","moving_piston"]);var Bfe=Object.keys(KG.noOcclusions);function ca(t,e){return`${t},${e}`}function Nfe(t){if(!t||t.length!==1)return!1;let e=t[0];return e[0]===0&&e[1]===0&&e[2]===0&&e[3]===1&&e[4]===1&&e[5]===1}var Il=class{config=ZG;Chunk;columns={};blockCache={};biomeCache;preflat;erroredBlockModel;customBlockModels=new Map;sentBlockStateModels=new Set;blockStateModelInfo=new Map;constructor(e){this.Chunk=(0,tY.default)(e),this.biomeCache=(0,Gy.default)(e).biomes,this.preflat=!(0,Gy.default)(e).supportFeature("blockStateId"),this.config.version=e}getLight(e,r=!1,i=!1,n=""){e instanceof Qe||(e=new Qe(...e));let{enableLighting:u,skyLight:l}=this.config;if(!u)return 15;let c=this.getColumnByPos(e);if(!c||!Tfe(c,e))return 15;let d=Math.min(15,Math.max(c.getBlockLight(sh(e)),Math.min(l,c.getSkyLight(sh(e))))+2);if(d===2&&[this.getBlock(e)?.name??"",n].some(h=>/_stairs|slab|glass_pane/.exec(h))&&!i){let h=[this.getLight(e.offset(0,1,0),void 0,!0),this.getLight(e.offset(0,-1,0),void 0,!0),this.getLight(e.offset(0,0,1),void 0,!0),this.getLight(e.offset(0,0,-1),void 0,!0),this.getLight(e.offset(1,0,0),void 0,!0),this.getLight(e.offset(-1,0,0),void 0,!0)].filter(m=>m!==2);h.length&&(d=Math.min(...h))}return r&&d===2&&(d=15),d}addColumn(e,r,i){let n=this.Chunk.fromJson(i);return this.columns[ca(e,r)]=n,n}removeColumn(e,r){delete this.columns[ca(e,r)]}getColumn(e,r){return this.columns[ca(e,r)]}setBlockStateId(e,r){if(r===void 0)throw new Error("stateId is undefined");let i=ca(Math.floor(e.x/16)*16,Math.floor(e.z/16)*16),n=this.columns[i];return n?(n.setBlockStateId(sh(e.floored()),r),!0):!1}getColumnByPos(e){return this.getColumn(Math.floor(e.x/16)*16,Math.floor(e.z/16)*16)}getBlock(e,r,i){e instanceof Qe||(e=new Qe(...e));let n=ca(Math.floor(e.x/16)*16,Math.floor(e.z/16)*16),u=this.customBlockModels.get(n)?.[QG(e)],l=this.columns[n];if(!l)return null;let c=e.floored(),d=sh(c),h=l.getBlockStateId(d),m=XG(h,u);if(!this.blockCache[m]){let y=l.getBlock(d);if(u&&(y.name=u),y.isCube=Nfe(y.shapes),this.blockCache[m]=y,Object.defineProperty(y,"position",{get(){throw new Error("position is not reliable, use pos parameter instead of block.position")}}),this.preflat){y._properties={};let g=El.blocks[y.type+":"+y.metadata]||Pfe(y.type,y.metadata,e);if(g){y.name=g.split("[")[0];let v=g.split("[")?.[1]?.split("]");if(v){let w=Object.fromEntries(v.join("").split(",").map(k=>{let[x,S]=k.split("=");return isNaN(S)||(S=parseInt(S,10)),[x,S]}));y._properties=w}}}}let p=this.blockCache[m];if(p.models===void 0&&r){if(!i)throw new Error("attr is required");let y=p.getProperties();try{if(this.preflat&&p.name==="cobblestone_wall"){y.up="true";for(let x of["north","south","east","west"]){let S=y[x];(S==="false"||S==="true")&&(y[x]=S==="true"?"low":"none")}}let g=!!(this.preflat||u),v=[],w=[],k=[];if(p.models=r.getAllResolvedModels0_1({name:p.name,properties:y},g,v,w,k),this.sentBlockStateModels.has(m)||this.blockStateModelInfo.set(m,{cacheKey:m,issues:v,modelNames:w,conditions:k}),p.models.length||(p.name!=="water"&&p.name!=="lava"&&!la.has(p.name)&&console.debug("[mesher] block to render not found",p.name,y),p.models=null),p.models&&u){let x=p.models[0];p.transparent=x[0]?.transparent??p.transparent}}catch(g){this.erroredBlockModel??=r.getAllResolvedModels0_1({name:"errored",properties:{}}),p.models??=this.erroredBlockModel,console.error(`Critical assets error. Unable to get block model for ${p.name}[${JSON.stringify(y)}]: `+g.message,g.stack),i.hadErrors=!0}}return p.name==="flowing_water"&&(p.name="water"),p.name==="flowing_lava"&&(p.name="lava"),p.name==="bubble_column"&&(p.name="water"),p.biome=this.biomeCache[l.getBiome(d)]??this.biomeCache[1]??this.biomeCache[0],p.name==="redstone_ore"&&(p.transparent=!1),p}shouldMakeAo(e){return e?.isCube&&!Bfe.includes(e.name)&&e.boundingBox!=="empty"}},Pfe=(t,e,r)=>{console.warn(`[mesher] Unknown block with ${t}:${e} at ${r}, falling back`);for(let[i,n]of Object.entries(El.blocks)){let[u,l]=i.split(":");if(u===t)return n}return null},Tfe=(t,e)=>{if(t._getSection)return t._getSection(e);if(t.skyLightSections)return t.skyLightSections[eY(e,t.minY)]||t.blockLightSections[eY(e,t.minY)];if(t.sections)return t.sections[e.y>>4]};function sh(t){return new Qe(Math.floor(t.x)&15,Math.floor(t.y),Math.floor(t.z)&15)}function eY(t,e=0){return Math.floor((t.y-e)/16)+1}a();o();s();a();o();s();a();o();s();a();o();s();var Zr=class{strictVersioned;data={latest:{}};previousVersion="";currentVersion="";inclusive=!0;constructor(e=!1){this.strictVersioned=e,e&&(this.data={})}get versionsSorted(){let e=Object.keys(this.data).filter(r=>r!=="latest").sort((r,i)=>this.semverToNumber(r)-this.semverToNumber(i));return this.strictVersioned||e.push("latest"),e}push(e,r,i){this.currentVersion||=e,this.currentVersion!==e&&(this.strictVersioned?this.previousVersion=this.currentVersion:this.previousVersion=this.previousVersion?this.currentVersion:"latest",this.currentVersion=e),this.data[this.previousVersion]?.[r]!==i&&(this.strictVersioned?(this.data[e]??={},this.data[e][r]=i):this.data.latest[r]?(this.data[e]??={},this.data[e][r]=i):this.data.latest[r]=i)}get(e,r,i=this.inclusive){let n=this.semverToNumber(e),u;for(let c of this.versionsSorted)if((i?n<=this.semverToNumber(c):n<this.semverToNumber(c))&&this.data[c]?.[r]){u=c;break}let l;return this.strictVersioned?l=this.data[u]?.[r]:this.data[u]?.[r]?l=this.data[u][r]:this.data.latest[r]&&(l=this.data.latest[r]),l&&typeof l=="object"?structuredClone(l):l}semverToNumber(e){let[r,i="0",n="0"]=e.split(".");return+`${r.padStart(2,"0")}${i.padStart(2,"0")}${n.padStart(2,"0")}`}loadData(e){this.data=e}};a();o();s();a();o();s();var st=class{oversized=!1;constructor(e=0,r=0,i=0,n=0,u=!1,l=void 0){this._width=e,this._height=r,this._x=i,this._y=n,this._data={},this._rot=u,this._allowRotation=l}static Collide(e,r){return e.collide(r)}static Contain(e,r){return e.contain(r)}area(){return this.width*this.height}collide(e){return e.x<this.x+this.width&&e.x+e.width>this.x&&e.y<this.y+this.height&&e.y+e.height>this.y}contain(e){return e.x>=this.x&&e.y>=this.y&&e.x+e.width<=this.x+this.width&&e.y+e.height<=this.y+this.height}_width;get width(){return this._width}set width(e){e!==this._width&&(this._width=e,this._dirty++)}_height;get height(){return this._height}set height(e){e!==this._height&&(this._height=e,this._dirty++)}_x;get x(){return this._x}set x(e){e!==this._x&&(this._x=e,this._dirty++)}_y;get y(){return this._y}set y(e){e!==this._y&&(this._y=e,this._dirty++)}_rot=!1;get rot(){return this._rot}set rot(e){if(this._allowRotation!==!1&&this._rot!==e){let r=this.width;this.width=this.height,this.height=r,this._rot=e,this._dirty++}}_allowRotation=void 0;get allowRotation(){return this._allowRotation}set allowRotation(e){this._allowRotation!==e&&(this._allowRotation=e,this._dirty++)}_data;get data(){return this._data}set data(e){e===null||e===this._data||(this._data=e,typeof e=="object"&&e.hasOwnProperty("allowRotation")&&(this._allowRotation=e.allowRotation),this._dirty++)}_dirty=0;get dirty(){return this._dirty>0}setDirty(e=!0){this._dirty=e?this._dirty+1:0}},oh=class{width;height;maxWidth;maxHeight;freeRects;rects;options;data;tag;_dirty=0;get dirty(){return this._dirty>0||this.rects.some(e=>e.dirty)}setDirty(e=!0){if(this._dirty=e?this._dirty+1:0,!e)for(let r of this.rects)r.setDirty&&r.setDirty(!1)}},ro=class t extends oh{maxWidth;maxHeight;padding;width;height;freeRects=[];rects=[];verticalExpand=!1;stage;border;options={smart:!0,pot:!0,square:!0,allowRotation:!1,tag:!1,exclusiveTag:!0,border:0,logic:Yt.MAX_EDGE};constructor(e=uh,r=uh,i=0,n={}){super(),this.maxWidth=e,this.maxHeight=r,this.padding=i,this.options={...this.options,...n},this.width=this.options.smart?0:e,this.height=this.options.smart?0:r,this.border=this.options.border?this.options.border:0,this.freeRects.push(new st(this.maxWidth+this.padding-this.border*2,this.maxHeight+this.padding-this.border*2,this.border,this.border)),this.stage=new st(this.width,this.height)}add(...e){let r,i;if(e.length===1){if(typeof e[0]!="object")throw new Error("MacrectsBin.add(): Wrong parameters");i=e[0];let u=i.data&&i.data.tag?i.data.tag:i.tag?i.tag:void 0;if(this.options.tag&&this.options.exclusiveTag&&this.tag!==u)return}else{if(r=e.length>2?e[2]:null,this.options.tag&&this.options.exclusiveTag&&(r&&this.tag!==r.tag||!r&&this.tag))return;i=new st(e[0],e[1]),i.data=r,i.setDirty(!1)}let n=this.place(i);return n&&this.rects.push(n),n}repack(){let e=[];this.reset(),this.rects.sort((r,i)=>{let n=Math.max(i.width,i.height)-Math.max(r.width,r.height);return n===0&&r.hash&&i.hash?r.hash>i.hash?-1:1:n});for(let r of this.rects)this.place(r)||e.push(r);for(let r of e)this.rects.splice(this.rects.indexOf(r),1);return e.length>0?e:void 0}reset(e=!1,r=!1){e&&(this.data&&delete this.data,this.tag&&delete this.tag,this.rects=[],r&&(this.options={smart:!0,pot:!0,square:!0,allowRotation:!1,tag:!1,border:0})),this.width=this.options.smart?0:this.maxWidth,this.height=this.options.smart?0:this.maxHeight,this.border=this.options.border?this.options.border:0,this.freeRects=[new st(this.maxWidth+this.padding-this.border*2,this.maxHeight+this.padding-this.border*2,this.border,this.border)],this.stage=new st(this.width,this.height),this._dirty=0}clone(){let e=new t(this.maxWidth,this.maxHeight,this.padding,this.options);for(let r of this.rects)e.add(r);return e}place(e){let r=e.data&&e.data.tag?e.data.tag:e.tag?e.tag:void 0;if(this.options.tag&&this.options.exclusiveTag&&this.tag!==r)return;let i,n;if(e.hasOwnProperty("_allowRotation")&&e.allowRotation!==void 0?n=e.allowRotation:n=this.options.allowRotation,i=this.findNode(e.width+this.padding,e.height+this.padding,n),i){this.updateBinSize(i);let u=this.freeRects.length,l=0;for(;l<u;)this.splitNode(this.freeRects[l],i)&&(this.freeRects.splice(l,1),u--,l--),l++;return this.pruneFreeList(),this.verticalExpand=this.options.logic===Yt.FILL_WIDTH?!1:this.width>this.height,e.x=i.x,e.y=i.y,e.rot===void 0&&(e.rot=!1),e.rot=i.rot?!e.rot:e.rot,this._dirty++,e}else if(this.verticalExpand){if(this.updateBinSize(new st(e.width+this.padding,e.height+this.padding,this.border,this.height+this.padding-this.border))||this.updateBinSize(new st(e.width+this.padding,e.height+this.padding,this.width+this.padding-this.border,this.border)))return this.place(e)}else if(this.updateBinSize(new st(e.width+this.padding,e.height+this.padding,this.width+this.padding-this.border,this.border))||this.updateBinSize(new st(e.width+this.padding,e.height+this.padding,this.border,this.height+this.padding-this.border)))return this.place(e)}findNode(e,r,i){let n=Number.MAX_VALUE,u,l,c;for(let d in this.freeRects){if(l=this.freeRects[d],l.width>=e&&l.height>=r){if(this.options.logic===Yt.MAX_AREA)u=l.width*l.height-e*r;else if(this.options.logic===Yt.FILL_WIDTH){let h=l.x+l.y*this.maxWidth,m=this.freeRects.filter(y=>y.x+y.y*this.maxWidth<h).length,p=l.y+r-this.height;u=m+p}else u=Math.min(l.width-e,l.height-r);u<n&&(c=new st(e,r,l.x,l.y),n=u)}if(i&&l.width>=r&&l.height>=e){if(this.options.logic===Yt.MAX_AREA)u=l.width*l.height-r*e;else if(this.options.logic===Yt.FILL_WIDTH){let h=l.x+l.y*this.maxWidth,m=this.freeRects.filter(y=>y.x+y.y*this.maxWidth<h).length,p=l.y+e-this.height;u=m+p}else u=Math.min(l.height-e,l.width-r);u<n&&(c=new st(r,e,l.x,l.y,!0),n=u)}}return c}splitNode(e,r){if(!e.collide(r))return!1;if(r.x<e.x+e.width&&r.x+r.width>e.x){if(r.y>e.y&&r.y<e.y+e.height){let i=new st(e.width,r.y-e.y,e.x,e.y);this.freeRects.push(i)}if(r.y+r.height<e.y+e.height){let i=new st(e.width,e.y+e.height-(r.y+r.height),e.x,r.y+r.height);this.freeRects.push(i)}}if(r.y<e.y+e.height&&r.y+r.height>e.y){if(r.x>e.x&&r.x<e.x+e.width){let i=new st(r.x-e.x,e.height,e.x,e.y);this.freeRects.push(i)}if(r.x+r.width<e.x+e.width){let i=new st(e.x+e.width-(r.x+r.width),e.height,r.x+r.width,e.y);this.freeRects.push(i)}}return!0}pruneFreeList(){let e=0,r=0,i=this.freeRects.length;for(;e<i;){r=e+1;let n=this.freeRects[e];for(;r<i;){let u=this.freeRects[r];if(u.contain(n)){this.freeRects.splice(e,1),e--,i--;break}n.contain(u)&&(this.freeRects.splice(r,1),r--,i--),r++}e++}}updateBinSize(e){if(!this.options.smart||this.stage.contain(e))return!1;let r=Math.max(this.width,e.x+e.width-this.padding+this.border),i=Math.max(this.height,e.y+e.height-this.padding+this.border);if(this.options.allowRotation){let n=Math.max(this.width,e.x+e.height-this.padding+this.border),u=Math.max(this.height,e.y+e.width-this.padding+this.border);n*u<r*i&&(r=n,i=u)}return this.options.pot&&(r=Math.pow(2,Math.ceil(Math.log(r)*Math.LOG2E)),i=Math.pow(2,Math.ceil(Math.log(i)*Math.LOG2E))),this.options.square&&(r=i=Math.max(r,i)),r>this.maxWidth+this.padding||i>this.maxHeight+this.padding?!1:(this.expandFreeRects(r+this.padding,i+this.padding),this.width=this.stage.width=r,this.height=this.stage.height=i,!0)}expandFreeRects(e,r){this.freeRects.forEach((i,n)=>{i.x+i.width>=Math.min(this.width+this.padding-this.border,e)&&(i.width=e-i.x-this.border),i.y+i.height>=Math.min(this.height+this.padding-this.border,r)&&(i.height=r-i.y-this.border)},this),this.freeRects.push(new st(e-this.width-this.padding,r-this.border*2,this.width+this.padding-this.border,this.border)),this.freeRects.push(new st(e-this.border*2,r-this.height-this.padding,this.border,this.height+this.padding-this.border)),this.freeRects=this.freeRects.filter(i=>!(i.width<=0||i.height<=0||i.x<this.border||i.y<this.border)),this.pruneFreeList()}},Bl=class t extends oh{width;height;data;maxWidth;maxHeight;options;rects=[];freeRects;constructor(...e){if(super(),e.length===1){if(typeof e[0]!="object")throw new Error("OversizedElementBin: Wrong parameters");let r=e[0];this.rects=[r],this.width=r.width,this.height=r.height,this.data=r.data,r.oversized=!0}else{this.width=e[0],this.height=e[1],this.data=e.length>2?e[2]:null;let r=new st(this.width,this.height);r.oversized=!0,r.data=this.data,this.rects.push(r)}this.freeRects=[],this.maxWidth=this.width,this.maxHeight=this.height,this.options={smart:!1,pot:!1,square:!1}}add(){}reset(e=!1){}repack(){}clone(){return new t(this.rects[0])}},uh=4096,Yt;(function(t){t[t.MAX_AREA=0]="MAX_AREA",t[t.MAX_EDGE=1]="MAX_EDGE",t[t.FILL_WIDTH=2]="FILL_WIDTH"})(Yt||(Yt={}));var lh=class{width;height;padding;bins;options={smart:!0,pot:!0,square:!1,allowRotation:!1,tag:!1,exclusiveTag:!0,border:0,logic:Yt.MAX_EDGE};constructor(e=uh,r=uh,i=0,n={}){this.width=e,this.height=r,this.padding=i,this.bins=[],this.options={...this.options,...n}}add(...e){if(e.length===1){if(typeof e[0]!="object")throw new Error("MacrectsPacker.add(): Wrong parameters");let r=e[0];if(!(r.width<=this.width&&r.height<=this.height||this.options.allowRotation&&r.width<=this.height&&r.height<=this.width))this.bins.push(new Bl(r));else if(!this.bins.slice(this._currentBinIndex).find(n=>n.add(r)!==void 0)){let n=new ro(this.width,this.height,this.padding,this.options),u=r.data&&r.data.tag?r.data.tag:r.tag?r.tag:void 0;this.options.tag&&u&&(n.tag=u),n.add(r),this.bins.push(n)}return r}else{let r=new st(e[0],e[1]);if(e.length>2&&(r.data=e[2]),!(r.width<=this.width&&r.height<=this.height||this.options.allowRotation&&r.width<=this.height&&r.height<=this.width))this.bins.push(new Bl(r));else if(!this.bins.slice(this._currentBinIndex).find(n=>n.add(r)!==void 0)){let n=new ro(this.width,this.height,this.padding,this.options);this.options.tag&&r.data.tag&&(n.tag=r.data.tag),n.add(r),this.bins.push(n)}return r}}addArray(e){if(!this.options.tag||this.options.exclusiveTag)this.sort(e,this.options.logic).forEach(r=>this.add(r));else{if(e.length===0)return;e.sort((u,l)=>{let c=u.data&&u.data.tag?u.data.tag:u.tag?u.tag:void 0,d=l.data&&l.data.tag?l.data.tag:l.tag?l.tag:void 0;return d===void 0?-1:c===void 0?1:d>c?-1:1});let r,i=0;if(!this.bins.slice(this._currentBinIndex).find((u,l)=>{let c=u.clone();for(let d=i;d<e.length;d++){let h=e[d],m=h.data&&h.data.tag?h.data.tag:h.tag?h.tag:void 0;if(d===0&&(r=m),m!==r)return r=m,this.sort(e.slice(i,d),this.options.logic).forEach(p=>u.add(p)),i=d,this.addArray(e.slice(d)),!0;if(m===void 0)return this.sort(e.slice(d),this.options.logic).forEach(p=>this.add(p)),i=e.length,!0;if(c.add(h)===void 0)return this.sort(e.slice(i,d),this.options.logic).forEach(p=>u.add(p)),i=d,!1}return this.sort(e.slice(i),this.options.logic).forEach(d=>u.add(d)),!0})){let u=e[i],l=new ro(this.width,this.height,this.padding,this.options),c=u.data&&u.data.tag?u.data.tag:u.tag?u.tag:void 0;this.options.tag&&this.options.exclusiveTag&&c&&(l.tag=c),this.bins.push(l),l.add(u),i++,this.addArray(e.slice(i))}}}reset(){this.bins=[],this._currentBinIndex=0}repack(e=!0){if(e){let i=[];for(let n of this.bins)if(n.dirty){let u=n.repack();u&&i.push(...u)}this.addArray(i);return}if(!this.dirty)return;let r=this.rects;this.reset(),this.addArray(r)}next(){return this._currentBinIndex=this.bins.length,this._currentBinIndex}load(e){e.forEach((r,i)=>{if(r.maxWidth>this.width||r.maxHeight>this.height)this.bins.push(new Bl(r.width,r.height,{}));else{let n=new ro(this.width,this.height,this.padding,r.options);n.freeRects.splice(0),r.freeRects.forEach((u,l)=>{n.freeRects.push(new st(u.width,u.height,u.x,u.y))}),n.width=r.width,n.height=r.height,r.tag&&(n.tag=r.tag),this.bins[i]=n}},this)}save(){let e=[];return this.bins.forEach(r=>{let i={width:r.width,height:r.height,maxWidth:r.maxWidth,maxHeight:r.maxHeight,freeRects:[],rects:[],options:r.options};r.tag&&(i={...i,tag:r.tag}),r.freeRects.forEach(n=>{i.freeRects.push({x:n.x,y:n.y,width:n.width,height:n.height})}),e.push(i)}),e}sort(e,r=Yt.MAX_EDGE){return e.slice().sort((i,n)=>{let u=r===Yt.MAX_EDGE?Math.max(n.width,n.height)-Math.max(i.width,i.height):n.width*n.height-i.width*i.height;return u===0&&i.hash&&n.hash?i.hash>n.hash?-1:1:u})}_currentBinIndex=0;get currentBinIndex(){return this._currentBinIndex}get dirty(){return this.bins.some(e=>e.dirty)}get rects(){let e=[];for(let r of this.bins)e.push(...r.rects);return e}};var ch=16384;function rY(t){return t===0?1:(t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t+1)}var nY=({input:t,getLoadedImage:e,tileSize:r=16,getCanvas:i=u=>typeof document<"u"&&document.createElement?document.createElement("canvas"):new globalThis.Canvas(u,u,"png"),needHorizontalIndexes:n=!1})=>{let u=[...new Set(t)].map(x=>{let S=e(x),V;if(S.image)V=S.image;else if(S.contents)V=new Image,V.src=S.contents;else throw new Error("No image or contents");let E=r*(S.tileWidthMult??1),I=r;if(S.useOriginalSize||S.renderWidth||S.renderHeight){let N=S.renderWidth??V.width,O=S.renderHeight??V.height;E=Math.ceil(N/r)*r,I=Math.ceil(O/r)*r}return{keyValue:x,img:V,inputData:S,renderWidth:E,renderHeight:I,renderSourceWidth:S.useOriginalSize?V.width:S.renderSourceWidth??Math.min(V.width,V.height),renderSourceHeight:S.useOriginalSize?V.height:S.renderSourceHeight??Math.min(V.width,V.height),renderSourceStartX:S.renderSourceStartX??0,renderSourceStartY:S.renderSourceStartY??0}}),l=new lh(void 0,void 0,0,{square:!0,pot:!0,...n?{}:{smart:!0},logic:n?Yt.FILL_WIDTH:Yt.MAX_AREA}),c=u.map(x=>{let S=new st(x.renderWidth,x.renderHeight);return S.data=x,S});l.addArray(c);let d=l.bins[0];if(!d||!d.rects||!d.rects.length)throw new Error("Failed to pack textures");let h={width:d.width,height:d.height,coords:d.rects.map(x=>({x:x.x,y:x.y,img:{data:x.data}}))},m=new Set;for(let x of h.coords){let S=x.img.data;if(m.has(S.keyValue))throw new Error(`Duplicate texture keyValue found in atlas: ${S.keyValue}`);m.add(S.keyValue)}if(m.size!==t.length)throw new Error(`Lost some textures in packing: ${t.length-m.size}`);let p=Math.max(rY(h.width),rY(h.height));if(p>ch){let x=u.reduce((V,E)=>{let I=`${E.renderWidth}x${E.renderHeight}`;return V[I]=(V[I]||0)+1,V},{}),S=Object.entries(x).sort(([,V],[,E])=>E-V).map(([V,E])=>`${V}(${E})`).join(", ");throw new Error(`Required atlas size ${p} exceeds maximum ${ch}. Texture sizes: ${S}`)}let y=i(p);y.width=p,y.height=p;let g=y.getContext("2d");g.imageSmoothingEnabled=!1;let v={},w=r/p,k=Math.ceil(p/r);for(let x of h.coords){let S=x.img.data,V=x.x,E=x.y,I=Math.floor(E/r),N=Math.floor(V/r),O=I*k+N;try{g.drawImage(S.img,S.renderSourceStartX,S.renderSourceStartY,S.renderSourceWidth,S.renderSourceHeight,V,E,S.renderWidth,S.renderHeight)}catch(re){throw new Error(`Error drawing ${S.keyValue}: ${re}`)}let T=S.keyValue.split(".").slice(0,-1).join(".")||S.keyValue,R=S.renderWidth/p,J=S.renderHeight/p;v[T]={u:V/p,v:E/p,tileIndex:O,...R==w&&J==w?{}:{su:R,sv:J}}}return{canvas:y,json:{suSv:w,tileSize:r,width:p,height:p,textures:v}}};a();o();s();var fa=async t=>{let e=new Image;return e.crossOrigin="anonymous",e.src=t,e.complete||await new Promise((r,i)=>{e.onload=r,e.onerror=i}),e};var fh=class t{atlasJson;latestImage;legacyImage;atlasStore;atlasHasLegacyImage;static getTextureInfo(e,r,i,n="latest"){let u=e.get(n,i);if(!u)return;let l=(u.imageType==="latest"?r.latest:r.legacy).suSv;return{...u,su:u?.su??l,sv:u?.sv??l}}constructor(e,r,i){this.atlasJson=e,this.latestImage=r,this.legacyImage=i,this.atlasStore=new Zr,this.atlasStore.inclusive=!1;let n=e,u=(l,c,d,h)=>{for(let[m,p]of Object.entries(d))l.push(c,m,{...p,version:c,imageType:h})};if(u(this.atlasStore,"latest",n.latest.textures,"latest"),this.atlasHasLegacyImage=!!i,i&&n.legacy)for(let l of Object.keys(n.legacy.textures)){let[c,d]=l.split("/");u(this.atlasStore,c,{[d]:n.legacy.textures[l]},"legacy")}}get atlas(){return this.atlasJson}getTextureInfo(e,r="latest"){let i=t.getTextureInfo(this.atlasStore,this.atlas,e,r);if(i)return{...i,getLoadedImage:async()=>await fa(i.imageType==="latest"?this.latestImage:this.legacyImage),getLoadedAtlasImage:async()=>await fa(i.imageType==="latest"?this.latestImage:this.legacyImage)}}async makeNewAtlas(e,r,i=this.atlas.latest.tileSize,n,u=[],l={}){let c=this.atlasJson,d={},h=this.atlasHasLegacyImage?await fa(this.legacyImage):null,m=await fa(this.latestImage);for(let w of new Set([...Object.keys(c.latest.textures),...u])){let k=r?.(w);if(k===!1)continue;if(k&&k!==!0){let T=typeof k=="string"?await fa(k):k;d[w]={u:0,v:0,su:1,sv:1,img:T};continue}let x=this.getTextureInfo(w,e);if(!x)throw new Error(`Missing texture info from the provided atlas for ${w} and not custom data is provided`);let{u:S,v:V,su:E,sv:I}=x,N=x.version==="latest"?c.latest:c.legacy,O=x.imageType==="latest"?m:h;if(!O)throw new Error(`Missing image for ${w}`);d[w]={u:S,v:V,su:E??N.suSv,sv:I??N.suSv,img:O}}let p=Object.keys(d);if(n){let w=typeof n=="function"?n:k=>n.includes(k)?1:-1;p.sort((k,x)=>w(x)-w(k))}let{json:y,canvas:g}=nY({input:p,getLoadedImage:w=>{let k=d[w],x=k.img,S=x.width,V=x.height;return delete k.img,{image:x,renderWidth:k.su*S,renderHeight:k.sv*V,renderSourceStartX:k.u*S,renderSourceStartY:k.v*V,renderSourceWidth:k.su*S,renderSourceHeight:k.sv*V}},tileSize:this.atlas.latest.tileSize,...l}),v;return{canvas:g,atlas:y,get newAtlasParser(){return v||(v=new t({latest:y},g.toDataURL())),v},get image(){return g.toDataURL()}}}async createDebugImage(e=!1){let r=this.atlas.latest;if(r.width!==r.height)throw new Error("Atlas must be square");let n=Math.min(ch,r.width*(e?6:1))/r.width,u=r.height*n,l=r.width*n,c=globalThis.Canvas?new globalThis.Canvas(l,u):document.createElement("canvas");c.width=l,c.height=u;let d=c.getContext("2d");d.imageSmoothingEnabled=!1,d.webkitImageSmoothingEnabled=!1,d.mozImageSmoothingEnabled=!1,d.msImageSmoothingEnabled=!1;let h=await fa(this.latestImage);d.drawImage(h,0,0,r.width,r.height,0,0,l,u),d.strokeStyle="#ff0000",d.lineWidth=2;let m=Object.keys(r.textures),p=m.length,y=0;return m.forEach((g,v)=>{let w=r.textures[g],k=Math.floor(v/p*100);k>=y+10&&(console.log(`Processing textures: ${k}% (${v}/${p})`),y=k);let x=w.u*r.width*n,S=w.v*r.height*n,V=(w.su||r.suSv)*r.width*n,E=(w.sv||r.suSv)*r.height*n,I=d.createPattern((()=>{let N=globalThis.Canvas?new globalThis.Canvas(10,10):document.createElement("canvas");N.width=10,N.height=10;let O=N.getContext("2d");return O.fillStyle="#ff0000",O.fillRect(0,0,5,10),O.fillStyle="#ffff00",O.fillRect(5,0,5,10),N})(),"repeat");if(d.strokeStyle=I,d.strokeRect(x,S,V,E),e){let N=g,O=4,T=V-O*2,R=12;do{if(d.font=`${R}px monospace`,d.measureText(N).width<=T||R<=6)break;R-=1}while(R>6);d.fillStyle="white",d.strokeStyle="black",d.lineWidth=Math.max(1,R/6),d.textBaseline="top";let J=x+O,re=S+O,se=N.split(/(?=[A-Z_/])/g),G="",ne=[];for(let me of se){let fe=G+me;d.measureText(fe).width>T&&G!==""?(ne.push(G),G=me):G=fe}ne.push(G);let ue=R*1.2;ne.forEach((me,fe)=>{d.strokeText(me,J,re+fe*ue),d.fillText(me,J,re+fe*ue)})}}),console.log(`Processing textures: 100% (${p}/${p})`),c.toDataURL()}};a();o();s();var iY=t=>{let e=t.split(":");return e.length===1?"minecraft":e.length===2?e[0]:e.slice(0,-1).join(":")},dh=class{version;blockStatesStore;blockModelsStore;stateIdToElements={};constructor(e,r,i){this.version=e,this.blockStatesStore=r,this.blockModelsStore=i}getElementsCached(e){let{stateId:r}=e;if(this.stateIdToElements[r])return this.stateIdToElements[r];let i=this.getElements(e),n=i===0?[]:i;return this.stateIdToElements[r]=n,n}parseProperties(e){if(typeof e=="object")return e;let r={};for(let i of e.split(",")){let[n,u]=i.split("=");r[n]=u}return r}getElements(e,r=!1){let i=this.getResolvedModelFirst(e,r);if(!i)return 0;let n=[];for(let l of i)l?.elements&&n.push(...l.elements.map(({from:c,to:d})=>[c,d]));return n.length===1&&aY(n[0][0],[0,0,0])&&aY(n[0][1],[16,16,16])?1:n}resolvedModel={modelName:""};issues=[];matchedModels=[];matchedConditions=[];getModelsByBlock(e,r,i){this.matchedModels=[],this.matchedConditions=[];let n=(p,y)=>{if(!y)return!0;typeof y=="string"&&(y=this.parseProperties(y));let g=p.properties;if(y.OR)return y.OR.some(v=>n(p,v));if(y.AND)return y.AND.every(v=>n(p,v));for(let v in y)if(typeof y[v]!="string"&&(y[v]=String(y[v])),!y[v].split("|").some(w=>w===String(g[v])))return!1;return!0},u=[],l=this.blockStatesStore.get(this.version,e.name);if(!l){this.issues.push(`Block ${e.name} not found in all registered blockstates. Place it into assets/${iY(e.name)}/blockstates/${e.name}.json`);return}let c=l.variants,d=!1;if(c){let p=c[""]||c.normal;for(let y in c)if(y!==""&&n(e,y)){p=c[y];break}if(p){let y=Object.entries(c).find(([g])=>p===c[g])?.[0];this.matchedConditions.push(`variant:${y}`)}if(!p)if(r){let y=Object.keys(c)[0];p=c[y],this.matchedConditions.push(`fallback:${y}`)}else return;p&&(u.push(p),d=!0)}if(l.multipart){for(let{when:p,apply:y}of l.multipart)(!p||n(e,p))&&(u.push(y),this.matchedConditions.push(p?`multipart:${JSON.stringify(p)}`:"multipart:always"));if(!u.length&&r){let y=l.multipart.filter(g=>g.when)[0]?.apply;y&&(u.push(y),this.matchedConditions.push("multipart:fallback"))}}if(!u.length){if(!d){let p=Object.keys(c??{}).length;p?this.issues.push(`Block did not match any possible state (${p} possible states)`):this.issues.push(`Blockstates for ${e.name} are not defined`)}return}let h=[],m=0;for(let p of u){m++;let y=0;h.push([]);for(let g of Array.isArray(p)?p:[p])if(y++,this.resolvedModel={modelName:g.model??e.name,x:g.x,y:g.y,z:g.z,uvlock:g.uvlock,weight:g.weight},!!g&&(this.getResolvedModelsByModel(g.model,e.name+"-"+m+"-"+y,!1),h[h.length-1].push(this.resolvedModel),!i&&h[h.length-1].length>0))break}return h}getModelData(e){return this.blockModelsStore.get(this.version,e.replace("minecraft:",""))}getResolvedModelsByModel(e,r,i=!0){i&&(this.resolvedModel={modelName:this.resolvedModel.modelName});let n=this.getModelData(e);if(!n){this.issues.push(`Model ${e} not found. Ensure it is present in assets/${iY(e)}/models/${e}.json`);return}return this.matchedModels.push(e),this.getResolvedModelsByModelData(n,r,i)}getResolvedModelsByModelData(e,r,i=!0){i&&(this.resolvedModel={modelName:this.resolvedModel.modelName});let n=[],u=c=>{if(n.push(c),c.parent){let d=this.getModelData(c.parent);if(!d){this.issues.push(`Parent model ${c.parent} not found for ${r}`);return}this.matchedModels.push(`parent:${c.parent}`),u(d)}};u(e),n.reverse();for(let c of n){if(c.textures){this.resolvedModel.textures??={};for(let[d,h]of Object.entries(c.textures)){if(h.includes("#")&&(h=h.split("/").at(-1)),h.startsWith("#")){let m=h.slice(1);this.resolvedModel.textures[m]&&(h=this.resolvedModel.textures[m])}this.resolvedModel.textures[d]=h}}c.elements&&(this.resolvedModel.elements=c.elements);for(let[d,h]of Object.entries(c))d!=="elements"&&d!=="textures"&&d!=="parent"&&(this.resolvedModel[d]&&typeof this.resolvedModel[d]=="object"&&h&&typeof h=="object"?Object.assign(this.resolvedModel[d],h):this.resolvedModel[d]=h)}let l=(c,d,h)=>{if(h.push(d),c.includes("#")){if(c=c.split("/").at(-1).replace("#",""),this.resolvedModel.textures??={},h.includes(c)){this.issues.push(`${r}: Circular texture reference detected: ${h.join(" -> ")}`);return}let m=this.resolvedModel.textures[c];if(m)return l(m,c,h);this.issues.push(`${r}: Cannot resolve texture ${c} for ${d} because it is not defined`);return}return c};for(let[c,d]of Object.entries(this.resolvedModel.textures??{})){if(!d.includes("#"))continue;let h=l(d,c,[]);h?this.resolvedModel.textures[c]=h:delete this.resolvedModel.textures[c]}for(let c of this.resolvedModel.elements??[])for(let[d,h]of Object.entries(c.faces??{}))h.texture&&(h.texture=this.resolvedModel.textures[h.texture.replace("#","")]??h.texture);return{resolvedModel:this.resolvedModel}}getResolvedModelFirst(e,r=!1){return this.getModelsByBlock(e,r,!1)?.map(i=>i[0])}getResolvedModelRandom(e,r=!1){return this.getModelsByBlock(e,r,!1)?.map(i=>i[Math.floor(Math.random()*i.length)])}getAllResolvedModels(e,r=!1){return this.getModelsByBlock(e,r,!0)}},aY=(t,e)=>!!t&&!!e&&t.length===e.length&&t.every((r,i)=>r===e[i]);a();o();s();var Lfe=new Zr,jfe=new Zr,Afe=new Zr;Lfe.inclusive=!1;jfe.inclusive=!1;Afe.inclusive=!1;var sY=t=>{let e=new Zr;return e.inclusive=!1,e.loadData(t.blockstates),e},oY=t=>{let e=new Zr;return e.inclusive=!1,e.loadData(t.models),e};function Yy(t,e,r){let i=sY(t),n=oY(t),u=new dh(r,i,n),l=new fh(e,"latest","legacy"),c=h=>l.getTextureInfo(h.replace("block/","").replace("blocks/",""),r),d=(h,m,p)=>{let{elements:y,textures:g,...v}=h;return{elements:y?.map((w,k)=>{try{return{...w,faces:Object.fromEntries(Object.entries(w.faces).map(([x,S])=>{let V=S.texture;if(!V)throw new Error(`Missing resolved texture ${V} for face ${x} of ${m.name}`);let E=c(V);if(!E)throw new Error(`Missing texture data ${V} for ${m.name}`);let I=w.from,N=w.to,O=16,T=S.uv||{north:[N[0],O-N[1],I[0],O-I[1]],east:[I[2],O-N[1],N[2],O-I[1]],south:[I[0],O-N[1],N[0],O-I[1]],west:[I[2],O-N[1],N[2],O-I[1]],up:[I[0],I[2],N[0],N[2]],down:[N[0],I[2],I[0],N[2]]}[x],R=(T[2]-T[0])/O*E.su,J=(T[3]-T[1])/O*E.sv;return[x,{...S,texture:{u:E.u+T[0]/16*E.su,v:E.v+T[1]/16*E.sv,su:R,sv:J,tileIndex:E.tileIndex,debugName:V}}]}))}}catch(x){return p?.push(`Error processing element ${k} in ${m.name}: ${x.message}`),null}}).filter(w=>w!==null),...v}};return{getAllResolvedModels0_1(h,m=!1,p=[],y=[],g=[],v=!1){u.issues=[],u.matchedModels=[],u.matchedConditions=[];let w=u.getAllResolvedModels(h,m)??[];if(p.push(...u.issues),y.push(...u.matchedModels),g.push(...u.matchedConditions),!w.length)return p.push(`No models found for block ${h.name}`),[];let k=["north","east","south","west","up","down"];try{let x=w.map(S=>S.map(V=>{try{return d(V,h,v?p:void 0)}catch(E){return p.push(`Error transforming model for ${h.name}: ${E.message}`),null}}).filter(V=>V?.elements?.length)).filter(S=>S.length);return x.length||p.push(`No valid models after transformation for block ${h.name}`),x}catch(x){return p.push(`Fatal error processing models for ${h.name}: ${x.message}`),[]}},transformModel:d,getTextureInfo:c}}a();o();s();function hh(t,e){let r=e/180*Math.PI,i=Math.cos(r),n=Math.sin(r),u={x:0,y:1,z:2}[t],l=(u+1)%3,c=(u+2)%3,d=[[0,0,0],[0,0,0],[0,0,0]];return d[u][u]=1,d[l][l]=i,d[l][c]=-n,d[c][l]=+n,d[c][c]=i,d}function Ky(t,e){return e?[t[0]+e[0],t[1]+e[1],t[2]+e[2]]:t}function ph(t,e){return e?[t[0]-e[0],t[1]-e[1],t[2]-e[2]]:t}function Xr(t,e){return t?[t[0][0]*e[0]+t[0][1]*e[1]+t[0][2]*e[2],t[1][0]*e[0]+t[1][1]*e[1]+t[1][2]*e[2],t[2][0]*e[0]+t[2][1]*e[1]+t[2][2]*e[2]]:e}function Qy(t,e){let r=[[0,0,0],[0,0,0],[0,0,0]],i=t[0][0],n=t[1][0],u=t[2][0],l=t[0][1],c=t[1][1],d=t[2][1],h=t[0][2],m=t[1][2],p=t[2][2],y=e[0][0],g=e[1][0],v=e[2][0],w=e[0][1],k=e[1][1],x=e[2][1],S=e[0][2],V=e[1][2],E=e[2][2];return r[0][0]=i*y+n*w+u*S,r[1][0]=i*g+n*k+u*V,r[2][0]=i*v+n*x+u*E,r[0][1]=l*y+c*w+d*S,r[1][1]=l*g+c*k+d*V,r[2][1]=l*v+c*x+d*E,r[0][2]=h*y+m*w+p*S,r[1][2]=h*g+m*k+p*V,r[2][2]=h*v+m*x+p*E,r}var Nl={up:{dir:[0,1,0],mask1:[1,1,0],mask2:[0,1,1],corners:[[0,1,1,0,1],[1,1,1,1,1],[0,1,0,0,0],[1,1,0,1,0]]},down:{dir:[0,-1,0],mask1:[1,1,0],mask2:[0,1,1],corners:[[1,0,1,0,1],[0,0,1,1,1],[1,0,0,0,0],[0,0,0,1,0]]},east:{dir:[1,0,0],mask1:[1,1,0],mask2:[1,0,1],corners:[[1,1,1,0,0],[1,0,1,0,1],[1,1,0,1,0],[1,0,0,1,1]]},west:{dir:[-1,0,0],mask1:[1,1,0],mask2:[1,0,1],corners:[[0,1,0,0,0],[0,0,0,0,1],[0,1,1,1,0],[0,0,1,1,1]]},north:{dir:[0,0,-1],mask1:[1,0,1],mask2:[0,1,1],corners:[[1,0,0,1,1],[0,0,0,0,1],[1,1,0,1,0],[0,1,0,0,0]]},south:{dir:[0,0,1],mask1:[1,0,1],mask2:[0,1,1],corners:[[0,0,1,0,1],[1,0,1,1,1],[0,1,1,0,0],[1,1,1,1,0]]}};var Cfe=!1,sr=Cfe?console.log:()=>{},gi,no={},pi=!1,gh;try{gh=lY().tints}catch{gh=Zy()}for(let t of Object.keys(gh))no[t]=Mfe(gh[t]);function Mfe(t){let e=new Map,r=cY(t.default);for(let{keys:i,color:n}of t.data){n=cY(n);for(let u of i)e.set(`${u}`,n)}return new Proxy(e,{get(i,n){return i.has(n)?i.get(n):r}})}var $fe=Object.entries(El.clientCalculatedBlocks);function Rfe(t,e,r){let i=$fe.find(([n,u])=>u.includes(t.name))?.[0];if(i)switch(i){case"directional":{let n=!t.name.includes("redstone")&&!t.name.includes("tripwire"),u=[e.getBlock(r.offset(0,0,1)),e.getBlock(r.offset(0,0,-1)),e.getBlock(r.offset(1,0,0)),e.getBlock(r.offset(-1,0,0))],l={},c=!1;for(let[d,h]of u.entries())((n?h&&!h.transparent:!1)||h?.name===t.name)&&(l[["south","north","east","west"][d]]="true",c=!0);return c?l:void 0}case"block_snowy":{let n=e.getBlock(r.offset(0,1,0))?.name==="snow";return n?{snowy:`${n}`}:void 0}case"door":{let{half:n}=t.getProperties();if(n==="upper"){let u=e.getBlock(r.offset(0,-1,0));if(u?.name===t.name)return{...u.getProperties(),half:"upper"}}}}}function cY(t){let e=t>>16&255,r=t>>8&255,i=t&255;return[e/255,r/255,i/255]}function zfe(t,e,r,i,n,u){if(n&&!u||e&&eb(e))return 8/9;if(!e||e.type!==r)return 1/9;if(e.metadata===0){let l=t.getBlock(i.offset(0,1,0));return l&&l.type===r?1:8/9}return((e.metadata>=8?8:7-e.metadata)+1)/9}var hY=t=>!t||t.transparent?!1:t.isCube?!0:!t.models?.length||t.models.length!==1?!1:t.models[0].every(e=>e.elements.every(r=>r.from[0]===0&&r.from[1]===0&&r.from[2]===0&&r.to[0]===16&&r.to[1]===16&&r.to[2]===16)),Xy=(t,e)=>{for(let r of["x","y","z"])Math.abs(e[r])>0&&(t[r]=0);return t.plus(e)};function fY(t,e,r,i,n,u,l,c){let d=[];for(let m=-1;m<=1;m++)for(let p=-1;p<=1;p++){let y=e.offset(p,0,m);d.push(zfe(t,t.getBlock(y),i,y,u,c))}let h=[Math.max(Math.max(d[0],d[1]),Math.max(d[3],d[4])),Math.max(Math.max(d[1],d[2]),Math.max(d[4],d[5])),Math.max(Math.max(d[3],d[4]),Math.max(d[6],d[7])),Math.max(Math.max(d[4],d[5]),Math.max(d[7],d[8]))];for(let m in Nl){let{dir:p,corners:y,mask1:g,mask2:v}=Nl[m],w=p[1]===1,k=e.offset(...p),x=t.getBlock(k);if(!x||x.type===i||u&&(x.name==="water"||eb(x))||hY(x)&&!w)continue;let S=[1,1,1];if(u){let T=1;Math.abs(p[0])>0?T=.6:Math.abs(p[2])>0&&(T=.8),S=no.water[n],S=[S[0]*T,S[1]*T,S[2]*T]}if(pi){let T=l.tiles;T[`${e.x},${e.y},${e.z}`]??={block:"water",faces:[]},T[`${e.x},${e.y},${e.z}`].faces.push({face:m,neighbor:`${k.x},${k.y},${k.z}`,side:0,textureIndex:0})}let{u:V}=r,{v:E}=r,{su:I}=r,{sv:N}=r,O=t.getLight(k,void 0,void 0,u?"water":"lava")/15;for(let T of y){let R=h[T[2]*2+T[0]],J=1e-4;l.t_positions.push((T[0]?1-J:J)+(e.x&15)-8,(T[1]?R-J:J)+(e.y&15)-8,(T[2]?1-J:J)+(e.z&15)-8),l.t_normals.push(...p),l.t_uvs.push(T[3]*I+V,T[4]*N*(T[1]?1:R)+E);let re=O;if(t.config.smoothLighting){let se=T[0]*2-1,G=T[1]*2-1,ne=T[2]*2-1,ue=[se,G,ne],me=[se*g[0],G*g[1],ne*g[2]],fe=[se*v[0],G*v[1],ne*v[2]],le=new Qe(...p),ce=Xy(new Qe(...me),le),U=t.getLight(e.plus(ce))/15,Y=Xy(new Qe(...fe),le),L=t.getLight(e.plus(Y))/15,z=Xy(new Qe(...ue),le),C=t.getLight(e.plus(z))/15,j=[U,L,C,O];re=j.reduce((M,F)=>M+F,0)/j.length}l.t_colors.push(S[0]*re,S[1]*re,S[2]*re)}}}var Dfe=(t,e,r)=>{let i=`${r.x},${r.y},${r.z}`,n={"0,1,0":"down","0,-1,0":"up","1,0,0":"east","-1,0,0":"west","0,0,1":"south","0,0,-1":"north"}[i],u={"0,1,0":h=>`${h.from[0]},${h.from[2]}:${h.to[0]},${h.to[2]}`,"0,-1,0":h=>`${h.to[0]},${h.to[2]}:${h.from[0]},${h.from[2]}`,"1,0,0":h=>`${h.from[2]},${h.from[1]}:${h.to[2]},${h.to[1]}`,"-1,0,0":h=>`${h.to[2]},${h.to[1]}:${h.from[2]},${h.from[1]}`,"0,0,1":h=>`${h.from[1]},${h.from[2]}:${h.to[1]},${h.to[2]}`,"0,0,-1":h=>`${h.to[1]},${h.to[2]}:${h.from[1]},${h.from[2]}`}[i],l={"0,1,0":h=>t.from[1]===0&&h.to[2]===16,"0,-1,0":h=>t.from[1]===0&&h.to[2]===16,"1,0,0":h=>t.from[0]===0&&h.to[1]===16,"-1,0,0":h=>t.from[0]===0&&h.to[1]===16,"0,0,1":h=>t.from[2]===0&&h.to[0]===16,"0,0,-1":h=>t.from[2]===0&&h.to[0]===16}[i],c=0,d=e.models?.map(h=>h[c]??h[0])??[];if(!d.some(h=>h.x||h.y||h.z))return d.every(h=>(h.elements??[]).every(m=>!!(m.faces[n]?.cullface&&u(t)===u(m)&&l(m))))},Ffe=!1;function dY(t,e,r,i,n,u,l,c,d){let h=e,m=c.name.includes("glass")||c.name.includes("ice");for(let p in r.faces){let y=r.faces[p],{corners:g,mask1:v,mask2:w,side:k}=Nl[p],x=Xr(u,Nl[p].dir);if(sr(`[TS] Processing face ${p} at (${e.x}, ${e.y}, ${e.z}), dir=[${x.join(",")}]`),y.cullface){let C=t.getBlock(e.plus(new Qe(...x)),gi,{});if(C){if(m&&C.stateId===c.stateId||!C.transparent&&(hY(C)||Dfe(r,C,new Qe(...x))))continue}else Ffe=!0}let S=r.from[0],V=r.from[1],E=r.from[2],I=r.to[0],N=r.to[1],O=r.to[2],T=y.texture,{u:R}=T,{v:J}=T,{su:re}=T,{sv:se}=T,G=Math.floor(n.positions.length/3);sr(`[TS] Base index: ${G}`);let ne=[1,1,1];y.tintindex!==void 0&&y.tintindex===0&&(c.name==="redstone_wire"?ne=no.redstone[`${c.getProperties().power}`]:c.name==="birch_leaves"||c.name==="spruce_leaves"||c.name==="lily_pad"?ne=no.constant[c.name]:c.name.includes("leaves")||c.name==="vine"?ne=no.foliage[d]:ne=no.grass[d]);let ue=y.rotation||0;p==="down"&&(ue+=180);let me=Math.cos(ue*Math.PI/180),fe=-Math.sin(ue*Math.PI/180),le=null,ce=null;if(r.rotation&&!pi&&(le=hh(r.rotation.axis,r.rotation.angle),ce=ph(r.rotation.origin,Xr(le,r.rotation.origin)),r.rotation.rescale)){let C=2-Math.sqrt(2),j=r.rotation.angle*Math.PI/180,M=Math.abs(Math.sin(j))*C,F=r.rotation.axis==="x"?1:0,ee=r.rotation.axis==="y"?1:0,Z=r.rotation.axis==="z"?1:0,te=[[(1-F)*M+1,0,0],[0,(1-ee)*M+1,0],[0,0,(1-Z)*M+1]];le=Qy(le,te),ce=ph(r.rotation.origin,Xr(le,r.rotation.origin))}let U=[],Y=h.plus(new Qe(...x)),L=t.getLight(Y,void 0,void 0,c.name)/15;for(let C of g){let j=[C[0]?I:S,C[1]?N:V,C[2]?O:E];if(!pi){j=Ky(Xr(le,j),ce),j=Ky(Xr(u,j),l),j=j.map(he=>he/16);let ee=[j[0]+(e.x&15)-8,j[1]+(e.y&15)-8,j[2]+(e.z&15)-8];sr(`[TS] Corner ${C.join(",")}: vertex=[${j.map(he=>he.toFixed(3)).join(",")}], worldPos=[${ee.map(he=>he.toFixed(3)).join(",")}]`),n.positions.push(...ee),n.normals.push(...x);let Z=(C[3]-.5)*me-(C[4]-.5)*fe+.5,te=(C[3]-.5)*fe+(C[4]-.5)*me+.5,oe=Z*re+R,ye=te*se+J;sr(`[TS] UV: cornerUV=[${C[3]},${C[4]}], baseUV=[${Z.toFixed(6)},${te.toFixed(6)}], finalUV=[${oe.toFixed(6)},${ye.toFixed(6)}], texture=[u=${R},v=${J},su=${re},sv=${se}], rotation=${ue}`),n.uvs.push(oe,ye)}let M=1,{smoothLighting:F}=t.config;if(i){let ee=C[0]*2-1,Z=C[1]*2-1,te=C[2]*2-1,oe=Xr(u,[ee,Z,te]),ye=Xr(u,[ee*v[0],Z*v[1],te*v[2]]),he=Xr(u,[ee*w[0],Z*w[1],te*w[2]]),pe=t.getBlock(e.offset(...ye)),$e=t.getBlock(e.offset(...he)),nt=t.getBlock(e.offset(...oe)),wt=L*15;if(F){let ot=new Qe(...x),D=Q=>{for(let ge of["x","y","z"])Math.abs(ot[ge])>0&&(Q[ge]=0);return Q.plus(ot)},K=D(new Qe(...ye)),q=t.getLight(e.plus(K)),_=D(new Qe(...he)),b=t.getLight(e.plus(_)),B=D(new Qe(...oe)),A=t.getLight(e.plus(B)),H=[q,b,A,L*15];wt=H.reduce((Q,ge)=>Q+ge,0)/H.length}let ae=t.shouldMakeAo(pe)?1:0,qe=t.shouldMakeAo($e)?1:0,Xe=t.shouldMakeAo(nt)?1:0,je=ae&&qe?0:3-(ae+qe+Xe);M=(je+1)/4*(wt/15),U.push(je);let Ae=U.length-1;sr(`[TS] Corner ${Ae} AO=${je}, light=${M.toFixed(3)}`)}pi||n.colors.push(ne[0]*M,ne[1]*M,ne[2]*M)}let z=[L*ne[0],L*ne[1],L*ne[2]];if(pi){let C=n.tiles;C[`${e.x},${e.y},${e.z}`]??={block:c.name,faces:[]},(C[`${e.x},${e.y},${e.z}`].faces.length<1||!!1)&&C[`${e.x},${e.y},${e.z}`].faces.push({face:p,side:k,textureIndex:y.texture.tileIndex,neighbor:`${Y.x},${Y.y},${Y.z}`,light:L,tint:z,texture:y.texture.debugName||c.name})}if(!pi){let C,j;i&&U[0]+U[3]>=U[1]+U[2]?(C=[G,G+3,G+2],j=[G,G+1,G+3],sr(`[TS] Indices (AO optimized): tri1=[${C.join(",")}], tri2=[${j.join(",")}], aos=[${U.join(",")}]`),n.indices[n.indicesCount++]=C[0],n.indices[n.indicesCount++]=C[1],n.indices[n.indicesCount++]=C[2],n.indices[n.indicesCount++]=j[0],n.indices[n.indicesCount++]=j[1],n.indices[n.indicesCount++]=j[2]):(C=[G,G+1,G+2],j=[G+2,G+1,G+3],sr(`[TS] Indices (standard): tri1=[${C.join(",")}], tri2=[${j.join(",")}], aos=[${U.join(",")}]`),n.indices[n.indicesCount++]=C[0],n.indices[n.indicesCount++]=C[1],n.indices[n.indicesCount++]=C[2],n.indices[n.indicesCount++]=j[0],n.indices[n.indicesCount++]=j[1],n.indices[n.indicesCount++]=j[2])}}}var Ufe=new Set(["seagrass","tall_seagrass","kelp","kelp_plant","bubble_column"]),eb=t=>t.getProperties().waterlogged===!0||t.getProperties().waterlogged==="true"||Ufe.has(t.name),pY;function gY(t,e,r,i,n=16){let u=[],l={sectionYNumber:e-i.config.worldMinY>>4,chunkKey:ca(t,r),sectionStartY:e,sectionEndY:e+n,sectionStartX:t,sectionEndX:t+16,sectionStartZ:r,sectionEndZ:r+16,sx:t+8,sy:e+8,sz:r+8,positions:[],normals:[],colors:[],uvs:[],t_positions:[],t_normals:[],t_colors:[],t_uvs:[],indices:[],indicesCount:0,using32Array:!0,tiles:{},heads:{},signs:{},banners:{},hadErrors:!1,blocksCount:0},c=new Qe(0,0,0);for(c.y=e;c.y<e+n;c.y++)for(c.z=r;c.z<r+16;c.z++)for(c.x=t;c.x<t+16;c.x++){let p=i.getBlock(c,gi,l);if(la.has(p.name))continue;if((p.name.includes("_sign")||p.name==="sign")&&!i.config.disableBlockEntityTextures){let v=`${c.x},${c.y},${c.z}`,w=p.getProperties(),k={north:2,south:0,west:1,east:3},x=p.name.endsWith("wall_sign")||p.name.endsWith("wall_hanging_sign"),S=p.name.endsWith("hanging_sign");l.signs[v]={isWall:x,isHanging:S,rotation:x?k[w.facing]:+w.rotation}}else if(p.name==="player_head"||p.name==="player_wall_head"){let v=`${c.x},${c.y},${c.z}`,w=p.getProperties(),k={north:0,south:2,west:3,east:1},x=p.name==="player_wall_head";l.heads[v]={isWall:x,rotation:x?k[w.facing]:+w.rotation}}else if(p.name.includes("_banner")&&!i.config.disableBlockEntityTextures){let v=`${c.x},${c.y},${c.z}`,w=p.getProperties(),k={north:2,south:0,west:1,east:3},x=p.name.endsWith("_wall_banner");l.banners[v]={isWall:x,blockName:p.name,rotation:x?k[w.facing]:w.rotation===void 0?0:+w.rotation}}let y=p.biome.name;if(i.preflat){let v=Rfe(p,i,c);v?(p._originalProperties??=p._properties,p._properties={...p._originalProperties,...v},p.models&&JSON.stringify(p._originalProperties)!==JSON.stringify(p._properties)&&(p.models=void 0,p=i.getBlock(c,gi,l))):(p._properties=p._originalProperties??p._properties,p._originalProperties=void 0)}let g=eb(p);if(p.name==="water"||g){let v=c.clone();u.push(()=>{fY(i,v,gi.getTextureInfo("water_still"),p.type,y,!0,l,!g)}),l.blocksCount++}else p.name==="lava"&&(fY(i,c,gi.getTextureInfo("lava_still"),p.type,y,!1,l,!1),l.blocksCount++);if(p.name!=="water"&&p.name!=="lava"&&!la.has(p.name)){let{models:v}=p;sr(`[TS] Processing block at (${c.x}, ${c.y}, ${c.z}), name=${p.name}, stateId=${p.stateId}`),v??=pY;let w=i.config.debugModelVariant?.[0],k=0;for(let x of v??[]){let S=c.clone(),E=i.config.debugModelVariant?.[k]??w??0;k++;let I=x[E]??x[0];if(!I)continue;let N=null,O=null;for(let T of["x","y","z"])T in I&&(N=N?Qy(N,hh(T,-(I[T]??0))):hh(T,-(I[T]??0)));N&&(O=[8,8,8],O=ph(O,Xr(N,O)));for(let T of I.elements??[]){let R=I.ao??p.boundingBox!=="empty";if(p.transparent){let J=c.clone();u.push(()=>{dY(i,J,T,R,l,N,O,p,y)})}else dY(i,c,T,R,l,N,O,p,y)}}k>0&&l.blocksCount++}}for(let p of u)p();u=[];let d=l.positions.length/3;for(let p=0;p<l.t_positions.length/12;p++)l.indices[l.indicesCount++]=d,l.indices[l.indicesCount++]=d+1,l.indices[l.indicesCount++]=d+2,l.indices[l.indicesCount++]=d+2,l.indices[l.indicesCount++]=d+1,l.indices[l.indicesCount++]=d+3,l.indices[l.indicesCount++]=d,l.indices[l.indicesCount++]=d+2,l.indices[l.indicesCount++]=d+1,l.indices[l.indicesCount++]=d+2,l.indices[l.indicesCount++]=d+3,l.indices[l.indicesCount++]=d+1,d+=4;l.positions.push(...l.t_positions),l.normals.push(...l.t_normals),l.colors.push(...l.t_colors),l.uvs.push(...l.t_uvs),delete l.t_positions,delete l.t_normals,delete l.t_colors,delete l.t_uvs,l.positions=new Float32Array(l.positions),l.normals=new Float32Array(l.normals),l.colors=new Float32Array(l.colors),l.uvs=new Float32Array(l.uvs),l.using32Array=Jfe(l.indices),l.using32Array?l.indices=new Uint32Array(l.indices):l.indices=new Uint16Array(l.indices),sr("[TS] Final geometry summary:"),sr(`[TS] Total vertices: ${l.positions.length/3}`),sr(`[TS] Total triangles: ${l.indices.length/3}`);let h=Array.from(l.positions),m=Array.from(l.indices);return sr(`[TS] Positions: [${h.slice(0,12).join(",")}...] (first 4 vertices)`),sr(`[TS] Indices: [${m.slice(0,12).join(",")}...] (first 2 faces)`),pi&&(delete l.positions,delete l.normals,delete l.colors,delete l.uvs),l}function Jfe(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}var mY=(t,e,r=!1,i=!0,n="latest")=>{gi=Yy(t,e,n),globalThis.blockProvider=gi,i&&(pY=gi.getAllResolvedModels0_1({name:"unknown",properties:{}})),pi=r};globalThis.structuredClone??=t=>JSON.parse(JSON.stringify(t));if(globalThis.module&&module.require){let t=module.require,{parentPort:e}=t("worker_threads");global.self=e,global.postMessage=(r,i)=>{e.postMessage(r,i)},global.performance=t("perf_hooks").performance}var Pl=0,Je,mi=new Map,rb=!1;function Wfe(t,e,r){return`${t},${e},${r}`}var _Y=100,io=[],tb=!1,ao=(t,e=[])=>{io.push({data:t,transferList:e}),io.length>_Y&&yY(0,_Y),!tb&&(tb=!0,setTimeout(()=>{tb=!1,yY(0,io.length)}))};function yY(t,e){let r=io.slice(t,e);global.postMessage(r.map(i=>i.data),r.flatMap(i=>i.transferList)),io=io.slice(e)}function Hfe(t,e=!0){let r=Math.floor(t.x/16)*16,i=Math.floor(t.y/16)*16,n=Math.floor(t.z/16)*16,u=Wfe(r,i,n);if(!e){mi.delete(u),ao({type:"sectionFinished",key:u,workerIndex:Pl});return}Je.getColumn(r,n)?.getSection(t)?mi.set(u,(mi.get(u)||0)+1):ao({type:"sectionFinished",key:u,workerIndex:Pl})}var Gfe=()=>{Je=new Il(Je.config.version),globalThis.world=Je},bY=t=>{let e=globalThis;switch(t.type==="mcData"&&(e.mcData=t.mcData,e.loadedData=t.mcData),t.config&&(t.type==="mesherData"&&Je&&(Je.blockCache={},Je.erroredBlockModel=void 0),Je??=new Il(t.config.version),Je.config={...Je.config,...t.config},globalThis.world=Je,globalThis.Vec3=Qe),t.type){case"mesherData":{mY(t.blockstatesModels,t.blocksAtlas,t.config.outputFormat==="webgpu"),rb=!0,Pl=t.workerIndex;break}case"dirty":{let r=new Qe(t.x,t.y,t.z);Hfe(r,t.value);break}case"chunk":{if(Je.addColumn(t.x,t.z,t.chunk),t.customBlockModels){let r=`${t.x},${t.z}`;Je.customBlockModels.set(r,t.customBlockModels)}break}case"unloadChunk":{Je.removeColumn(t.x,t.z),Je.customBlockModels.delete(`${t.x},${t.z}`),Object.keys(Je.columns).length===0&&Gfe();break}case"blockUpdate":{let r=new Qe(t.pos.x,t.pos.y,t.pos.z).floored();t.stateId!==void 0&&t.stateId!==null&&Je?.setBlockStateId(r,t.stateId);let i=`${Math.floor(r.x/16)*16},${Math.floor(r.z/16)*16}`;t.customBlockModels&&Je?.customBlockModels.set(i,t.customBlockModels);break}case"reset":{Je=void 0,mi=new Map,e.mcData=null,e.loadedData=null,rb=!1;break}case"getCustomBlockModel":{let r=new Qe(t.pos.x,t.pos.y,t.pos.z),i=`${Math.floor(r.x/16)*16},${Math.floor(r.z/16)*16}`,n=Je.customBlockModels.get(i)?.[`${r.x},${r.y},${r.z}`];global.postMessage({type:"customBlockModel",chunkKey:i,customBlockModel:n});break}case"getHeightmap":{let r=new Int16Array(256),i=new Qe(0,0,0);for(let n=0;n<16;n++)for(let u=0;u<16;u++){let l=u+t.x,c=n+t.z;i.x=l,i.z=c,i.y=Je.config.worldMaxY;let d=Je.getBlock(i);for(;d&&la.has(d.name)&&i.y>Je.config.worldMinY;)i.y-=1,d=Je.getBlock(i);let h=n*16+u;r[h]=d?i.y:-32768}ao({type:"heightmap",key:`${Math.floor(t.x/16)},${Math.floor(t.z/16)}`,heightmap:r});break}}};self.onmessage=({data:t})=>{if(Array.isArray(t)){t.forEach(bY);return}bY(t)};setInterval(()=>{if(!(Je===null||!rb)&&mi.size!==0){for(let t of mi.keys()){let[e,r,i]=t.split(",").map(c=>parseInt(c,10)),n=Je.getColumn(e,i),u=0;if(n?.getSection(new Qe(e,r,i))){let c=performance.now(),d=gY(e,r,i,Je),h=[d.positions?.buffer,d.normals?.buffer,d.colors?.buffer,d.uvs?.buffer].filter(Boolean);ao({type:"geometry",key:t,geometry:d,workerIndex:Pl},h),u=performance.now()-c}let l=mi.get(t);if(!l)throw new Error("dirtySections.get(key) is falsy");for(let c=0;c<l;c++)ao({type:"sectionFinished",key:t,workerIndex:Pl,processTime:u}),u=0;mi.delete(t)}if(Je.blockStateModelInfo.size>0){let t={};for(let[e,r]of Je.blockStateModelInfo)Je.sentBlockStateModels.has(e)||(t[e]=r,Je.sentBlockStateModels.add(e));Object.keys(t).length>0&&ao({type:"blockStateModelInfo",info:t})}}},50);})();
|
|
227
227
|
/*! Bundled license information:
|
|
228
228
|
|
|
229
229
|
@jspm/core/nodelibs/browser/chunk-DtuTasat.js:
|