@orusteam/solariscore 2.5.13 → 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 +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -11
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from "./block/components";
|
|
2
|
-
export * from "./item/components";
|
|
3
1
|
export * from "./misc/DynamicDatabase";
|
|
4
2
|
export * from "./utils";
|
|
5
3
|
type SolarisCoreBlockComponentIds = "solariscore:crop" | "solariscore:door" | "solariscore:egg" | "solariscore:grass" | "solariscore:leaves" | "solariscore:particle_emitter" | "solariscore:sapling";
|
|
4
|
+
type SolarisCoreItemComponentIds = "solariscore:durability_sensor";
|
|
6
5
|
declare class SolarisCore {
|
|
7
6
|
setEnabledBlockComponents(componentIds: SolarisCoreBlockComponentIds[]): void;
|
|
7
|
+
setEnabledItemComponents(componentIds: SolarisCoreItemComponentIds[]): void;
|
|
8
8
|
}
|
|
9
9
|
export declare const solarisCore: SolarisCore;
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
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
|
@@ -4641,7 +4641,7 @@ function getDynamicDatabase(provider, dataId) {
|
|
|
4641
4641
|
}
|
|
4642
4642
|
|
|
4643
4643
|
// src/index.ts
|
|
4644
|
-
var
|
|
4644
|
+
var solarisCoreBlockComponentClassMap = {
|
|
4645
4645
|
"solariscore:crop": CropBlockComponent,
|
|
4646
4646
|
"solariscore:door": DoorBlockComponent,
|
|
4647
4647
|
"solariscore:egg": EggBlockComponent,
|
|
@@ -4650,16 +4650,28 @@ var SolarisCoreBlockComponentClassMap = {
|
|
|
4650
4650
|
"solariscore:particle_emitter": ParticleEmitterBlockComponent,
|
|
4651
4651
|
"solariscore:sapling": SaplingBlockComponent
|
|
4652
4652
|
};
|
|
4653
|
+
var solarisCoreItemComponentClassMap = {
|
|
4654
|
+
"solariscore:durability_sensor": DurabilitySensorItemComponent
|
|
4655
|
+
};
|
|
4653
4656
|
var SolarisCore = class {
|
|
4654
4657
|
setEnabledBlockComponents(componentIds) {
|
|
4655
4658
|
system6.beforeEvents.startup.subscribe(({ blockComponentRegistry }) => {
|
|
4656
4659
|
for (const id of componentIds) {
|
|
4657
|
-
const ComponentClass =
|
|
4660
|
+
const ComponentClass = solarisCoreBlockComponentClassMap[id];
|
|
4658
4661
|
if (!ComponentClass) continue;
|
|
4659
4662
|
blockComponentRegistry.registerCustomComponent(id, new ComponentClass());
|
|
4660
4663
|
}
|
|
4661
4664
|
});
|
|
4662
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
|
+
}
|
|
4663
4675
|
};
|
|
4664
4676
|
var solarisCore = new SolarisCore();
|
|
4665
4677
|
export {
|
|
@@ -4668,24 +4680,15 @@ export {
|
|
|
4668
4680
|
ChunkManager,
|
|
4669
4681
|
ChunkUtil,
|
|
4670
4682
|
ColorUtil,
|
|
4671
|
-
CropBlockComponent,
|
|
4672
4683
|
DateUtil,
|
|
4673
|
-
DoorBlockComponent,
|
|
4674
|
-
DurabilitySensorItemComponent,
|
|
4675
4684
|
DynamicDatabase,
|
|
4676
|
-
EggBlockComponent,
|
|
4677
4685
|
EntityUtil,
|
|
4678
|
-
GrassBlockComponent,
|
|
4679
4686
|
ItemUtil,
|
|
4680
|
-
LeavesBlockComponent,
|
|
4681
4687
|
MathUtil,
|
|
4682
4688
|
MessageUtil,
|
|
4683
|
-
ParticleEmitterBlockComponent,
|
|
4684
|
-
SaplingBlockComponent,
|
|
4685
4689
|
StringUtil,
|
|
4686
4690
|
VectorUtil,
|
|
4687
4691
|
WorldUtil,
|
|
4688
|
-
applyGrowthEffects,
|
|
4689
4692
|
getDynamicDatabase,
|
|
4690
4693
|
solarisCore
|
|
4691
4694
|
};
|