@orusteam/solariscore 2.5.11 → 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,5 +2,9 @@ export * from "./block/components";
2
2
  export * from "./item/components";
3
3
  export * from "./misc/DynamicDatabase";
4
4
  export * from "./utils";
5
- import "./registry/index";
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;
6
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;AACxB,OAAO,kBAAkB,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);
@@ -4637,20 +4640,28 @@ function getDynamicDatabase(provider, dataId) {
4637
4640
  throw new Error("Inst\xE2ncia de DynamicDatabase n\xE3o encontrada para o provedor fornecido.");
4638
4641
  }
4639
4642
 
4640
- // src/registry/BlockComponentRegistry.ts
4641
- import { system as system6 } from "@minecraft/server";
4642
- function registryBlockComponents() {
4643
- system6.beforeEvents.startup.subscribe(({ blockComponentRegistry }) => {
4644
- blockComponentRegistry.registerCustomComponent("solariscore:crop", new CropBlockComponent());
4645
- blockComponentRegistry.registerCustomComponent("solariscore:door", new DoorBlockComponent());
4646
- blockComponentRegistry.registerCustomComponent("solariscore:egg", new EggBlockComponent());
4647
- blockComponentRegistry.registerCustomComponent("solariscore:grass", new GrassBlockComponent());
4648
- blockComponentRegistry.registerCustomComponent("solariscore:leaves", new LeavesBlockComponent());
4649
- blockComponentRegistry.registerCustomComponent("solariscore:particle_emitter", new ParticleEmitterBlockComponent());
4650
- blockComponentRegistry.registerCustomComponent("solariscore:sapling", new SaplingBlockComponent());
4651
- });
4652
- }
4653
- registryBlockComponents();
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();
4654
4665
  export {
4655
4666
  BlockBuilder,
4656
4667
  BlockUtil,
@@ -4675,5 +4686,6 @@ export {
4675
4686
  VectorUtil,
4676
4687
  WorldUtil,
4677
4688
  applyGrowthEffects,
4678
- getDynamicDatabase
4689
+ getDynamicDatabase,
4690
+ solarisCore
4679
4691
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orusteam/solariscore",
3
- "version": "2.5.11",
3
+ "version": "2.5.13",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",