@orusteam/solariscore 2.5.12 → 2.5.14

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
@@ -1,5 +1,10 @@
1
- export * from "./block/components";
2
- export * from "./item/components";
3
1
  export * from "./misc/DynamicDatabase";
4
2
  export * from "./utils";
3
+ type SolarisCoreBlockComponentIds = "solariscore:crop" | "solariscore:door" | "solariscore:egg" | "solariscore:grass" | "solariscore:leaves" | "solariscore:particle_emitter" | "solariscore:sapling";
4
+ type SolarisCoreItemComponentIds = "solariscore:durability_sensor";
5
+ declare class SolarisCore {
6
+ setEnabledBlockComponents(componentIds: SolarisCoreBlockComponentIds[]): void;
7
+ setEnabledItemComponents(componentIds: SolarisCoreItemComponentIds[]): 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":"AAGA,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;AAC5B,KAAK,2BAA2B,GAC1B,+BAA+B,CAAC;AAoBtC,cAAM,WAAW;IACb,yBAAyB,CAAC,YAAY,EAAE,4BAA4B,EAAE;IAStE,wBAAwB,CAAC,YAAY,EAAE,2BAA2B,EAAE;CASvE;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,29 +4639,56 @@ 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 solarisCoreItemComponentClassMap = {
4654
+ "solariscore:durability_sensor": DurabilitySensorItemComponent
4655
+ };
4656
+ var SolarisCore = class {
4657
+ setEnabledBlockComponents(componentIds) {
4658
+ system6.beforeEvents.startup.subscribe(({ blockComponentRegistry }) => {
4659
+ for (const id of componentIds) {
4660
+ const ComponentClass = solarisCoreBlockComponentClassMap[id];
4661
+ if (!ComponentClass) continue;
4662
+ blockComponentRegistry.registerCustomComponent(id, new ComponentClass());
4663
+ }
4664
+ });
4665
+ }
4666
+ setEnabledItemComponents(componentIds) {
4667
+ system6.beforeEvents.startup.subscribe(({ itemComponentRegistry }) => {
4668
+ for (const id of componentIds) {
4669
+ const ComponentClass = solarisCoreItemComponentClassMap[id];
4670
+ if (!ComponentClass) continue;
4671
+ itemComponentRegistry.registerCustomComponent(id, new ComponentClass());
4672
+ }
4673
+ });
4674
+ }
4675
+ };
4676
+ var solarisCore = new SolarisCore();
4639
4677
  export {
4640
4678
  BlockBuilder,
4641
4679
  BlockUtil,
4642
4680
  ChunkManager,
4643
4681
  ChunkUtil,
4644
4682
  ColorUtil,
4645
- CropBlockComponent,
4646
4683
  DateUtil,
4647
- DoorBlockComponent,
4648
- DurabilitySensorItemComponent,
4649
4684
  DynamicDatabase,
4650
- EggBlockComponent,
4651
4685
  EntityUtil,
4652
- GrassBlockComponent,
4653
4686
  ItemUtil,
4654
- LeavesBlockComponent,
4655
4687
  MathUtil,
4656
4688
  MessageUtil,
4657
- ParticleEmitterBlockComponent,
4658
- SaplingBlockComponent,
4659
4689
  StringUtil,
4660
4690
  VectorUtil,
4661
4691
  WorldUtil,
4662
- applyGrowthEffects,
4663
- getDynamicDatabase
4692
+ getDynamicDatabase,
4693
+ solarisCore
4664
4694
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orusteam/solariscore",
3
- "version": "2.5.12",
3
+ "version": "2.5.14",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",