import{EntityComponentTypes as t}from"@minecraft/server";function n(t,n,r){return{x:t,y:n,z:r}}function r(t,n){return{x:Math.floor(n.x+t.x),y:Math.floor(n.y+t.y),z:Math.floor(n.z+t.z)}}function e(t){switch(t){case"north":return 0;case"south":return 180;case"west":return 270;case"east":return 90}}function o(t){switch(t.toLowerCase()){case"north":return"south";case"south":return"north";case"east":return"west";case"west":return"east";case"up":return"down";case"down":return"up"}}function s(t,n,r){return Math.max(n,Math.min(t,r))}function u(t){if(!t)return;const n=t.split(":")[1];return n?a(n):void 0}function a(t){if(t)return t.split("_").map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join(" ")}function c(n,r,e){const o=n.getComponent(t.Inventory).container.addItem(r);o||n.dimension.spawnItem(o,e??n.location)}export{c as addItemOrDrop,a as camelCase,u as camelCaseNamespacedID,s as clamp,r as getBlockOffset,o as getOpsiteDirection,e as getRotationFromState,n as vec3};
