@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 +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -15
- package/package.json +1 -1
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
|
-
|
|
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
|
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":"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/
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
}
|
|
4653
|
-
|
|
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
|
};
|