@orusteam/solariscore 2.5.12 → 2.5.13

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/index.d.ts CHANGED
@@ -2,4 +2,9 @@ export * from "./block/components";
2
2
  export * from "./item/components";
3
3
  export * from "./misc/DynamicDatabase";
4
4
  export * from "./utils";
5
+ type SolarisCoreBlockComponentIds = "solariscore:crop" | "solariscore:door" | "solariscore:egg" | "solariscore:grass" | "solariscore:leaves" | "solariscore:particle_emitter" | "solariscore:sapling";
6
+ declare class SolarisCore {
7
+ setEnabledBlockComponents(componentIds: SolarisCoreBlockComponentIds[]): void;
8
+ }
9
+ export declare const solarisCore: SolarisCore;
5
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,SAAS,CAAC;AAIxB,KAAK,4BAA4B,GAC3B,kBAAkB,GAClB,kBAAkB,GAClB,iBAAiB,GACjB,mBAAmB,GACnB,oBAAoB,GACpB,8BAA8B,GAC9B,qBAAqB,CAAC;AAgB5B,cAAM,WAAW;IACb,yBAAyB,CAAC,YAAY,EAAE,4BAA4B,EAAE;CASzE;AAID,eAAO,MAAM,WAAW,aAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -1,3 +1,6 @@
1
+ // src/index.ts
2
+ import { system as system6 } from "@minecraft/server";
3
+
1
4
  // node_modules/@minecraft/math/lib/src/general/clamp.js
2
5
  function clampNumber(val, min, max) {
3
6
  return Math.min(Math.max(val, min), max);
@@ -4636,6 +4639,29 @@ function getDynamicDatabase(provider, dataId) {
4636
4639
  }
4637
4640
  throw new Error("Inst\xE2ncia de DynamicDatabase n\xE3o encontrada para o provedor fornecido.");
4638
4641
  }
4642
+
4643
+ // src/index.ts
4644
+ var SolarisCoreBlockComponentClassMap = {
4645
+ "solariscore:crop": CropBlockComponent,
4646
+ "solariscore:door": DoorBlockComponent,
4647
+ "solariscore:egg": EggBlockComponent,
4648
+ "solariscore:grass": GrassBlockComponent,
4649
+ "solariscore:leaves": LeavesBlockComponent,
4650
+ "solariscore:particle_emitter": ParticleEmitterBlockComponent,
4651
+ "solariscore:sapling": SaplingBlockComponent
4652
+ };
4653
+ var SolarisCore = class {
4654
+ setEnabledBlockComponents(componentIds) {
4655
+ system6.beforeEvents.startup.subscribe(({ blockComponentRegistry }) => {
4656
+ for (const id of componentIds) {
4657
+ const ComponentClass = SolarisCoreBlockComponentClassMap[id];
4658
+ if (!ComponentClass) continue;
4659
+ blockComponentRegistry.registerCustomComponent(id, new ComponentClass());
4660
+ }
4661
+ });
4662
+ }
4663
+ };
4664
+ var solarisCore = new SolarisCore();
4639
4665
  export {
4640
4666
  BlockBuilder,
4641
4667
  BlockUtil,
@@ -4660,5 +4686,6 @@ export {
4660
4686
  VectorUtil,
4661
4687
  WorldUtil,
4662
4688
  applyGrowthEffects,
4663
- getDynamicDatabase
4689
+ getDynamicDatabase,
4690
+ solarisCore
4664
4691
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orusteam/solariscore",
3
- "version": "2.5.12",
3
+ "version": "2.5.13",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",