@orusteam/solariscore 2.5.14 → 2.5.15

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.
@@ -1 +1 @@
1
- {"version":3,"file":"LeavesBlockComponent.d.ts","sourceRoot":"","sources":["../../../src/block/components/LeavesBlockComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,oBAAoB,EAAE,yBAAyB,EAA4B,MAAM,mBAAmB,CAAC;AAU7I,qBAAa,oBAAqB,YAAW,oBAAoB;;IAK7D,YAAY,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,6BAA6B,EAAE,EAAE,MAAM,EAAE,EAAE,yBAAyB;CA4B1G"}
1
+ {"version":3,"file":"LeavesBlockComponent.d.ts","sourceRoot":"","sources":["../../../src/block/components/LeavesBlockComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,oBAAoB,EAAE,yBAAyB,EAA4B,MAAM,mBAAmB,CAAC;AAW7I,qBAAa,oBAAqB,YAAW,oBAAoB;;IAK7D,YAAY,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,6BAA6B,EAAE,EAAE,MAAM,EAAE,EAAE,yBAAyB;CAwB1G"}
package/dist/index.js CHANGED
@@ -591,6 +591,13 @@ var ColorUtil = class {
591
591
  blue: result ? parseInt(result[3], 16) / 255 : 0
592
592
  };
593
593
  }
594
+ static normalize(rgbInt) {
595
+ return {
596
+ red: rgbInt.red / 255,
597
+ green: rgbInt.green / 255,
598
+ blue: rgbInt.blue / 255
599
+ };
600
+ }
594
601
  static rgbToTuple(rgb) {
595
602
  return [rgb.red, rgb.green, rgb.blue];
596
603
  }
@@ -4451,11 +4458,7 @@ var LeavesBlockComponent = class {
4451
4458
  if (blockBelow.isAir) {
4452
4459
  const { color } = params;
4453
4460
  const molangVariableMap = new MolangVariableMap();
4454
- molangVariableMap.setColorRGB("color", {
4455
- red: color[0],
4456
- green: color[1],
4457
- blue: color[2]
4458
- });
4461
+ if (color) molangVariableMap.setColorRGB("color", ColorUtil.colorToRgb(color));
4459
4462
  dimension.spawnParticle("minecraft:biome_tinted_leaves_particle", block.center(), molangVariableMap);
4460
4463
  }
4461
4464
  }
@@ -10,7 +10,7 @@ declare class ChunkManager {
10
10
  }
11
11
  declare class ChunkUtil {
12
12
  private static chunksCache;
13
- static getChunk(dimension: Dimension, location: VectorXZ): ChunkManager | undefined;
13
+ static getChunk(dimension: Dimension, location: VectorXZ): ChunkManager;
14
14
  static getChunkId(location: VectorXZ): string;
15
15
  static getChunkXZ(location: VectorXZ): VectorXZ;
16
16
  static getNearbyChunks(dimension: Dimension, location: Vector3, renderDistance?: number): ChunkManager[];
@@ -1 +1 @@
1
- {"version":3,"file":"ChunkUtil.d.ts","sourceRoot":"","sources":["../../src/utils/ChunkUtil.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAU,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIzE,cAAM,YAAY;IAMF,QAAQ,CAAC,SAAS,EAAE,SAAS;IALzC,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAS;gBAER,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ;IAS7D,IAAI,QAAQ,IAAI,OAAO,CAEtB;CACJ;AAID,cAAM,SAAS;IACX,OAAO,CAAC,MAAM,CAAC,WAAW,CAAmC;IAE7D,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,YAAY,GAAG,SAAS;IAanF,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM;IAK7C,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IAO/C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EACZ,CAAC"}
@@ -1,9 +1,15 @@
1
1
  import { RGB } from "@minecraft/server";
2
- type RGBTuple = [r: number, g: number, b: number];
2
+ interface RGBInt {
3
+ red: number;
4
+ green: number;
5
+ blue: number;
6
+ }
7
+ type RGBTuple = [red: number, green: number, blue: number];
3
8
  type Color = RGB | RGBTuple | string;
4
9
  declare class ColorUtil {
5
10
  static colorToRgb(color: Color): RGB;
6
11
  static hexToRgb(hex: string): RGB;
12
+ static normalize(rgbInt: RGBInt): RGB;
7
13
  static rgbToTuple(rgb: RGB): RGBTuple;
8
14
  static tupleToRgb(tuple: RGBTuple): RGB;
9
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ColorUtil.d.ts","sourceRoot":"","sources":["../../src/utils/ColorUtil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAIxC,KAAK,QAAQ,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;AAClD,KAAK,KAAK,GAAG,GAAG,GAAG,QAAQ,GAAG,MAAM,CAAC;AAIrC,cAAM,SAAS;IACX,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,GAAG;IAYpC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG;IASjC,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,QAAQ;IAIrC,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,QAAQ,GAAG,GAAG;CAO1C;AAID,OAAO,EACH,KAAK,EACL,SAAS,EACT,QAAQ,EACX,CAAC"}
1
+ {"version":3,"file":"ColorUtil.d.ts","sourceRoot":"","sources":["../../src/utils/ColorUtil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAIxC,UAAU,MAAM;IAAG,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;CAAE;AAC9D,KAAK,QAAQ,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAC3D,KAAK,KAAK,GAAG,GAAG,GAAG,QAAQ,GAAG,MAAM,CAAC;AAIrC,cAAM,SAAS;IACX,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,GAAG;IAYpC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG;IASjC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;IAQrC,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,QAAQ;IAIrC,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,QAAQ,GAAG,GAAG;CAO1C;AAID,OAAO,EACH,KAAK,EACL,SAAS,EACT,QAAQ,EACX,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orusteam/solariscore",
3
- "version": "2.5.14",
3
+ "version": "2.5.15",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  ],
10
10
  "peerDependencies": {
11
11
  "@minecraft/math": "^2.4.0",
12
- "@minecraft/server": "^2.5.0",
12
+ "@minecraft/server": "^2.6.0",
13
13
  "@minecraft/server-ui": "^2.0.0"
14
14
  },
15
15
  "devDependencies": {
@@ -1,6 +0,0 @@
1
- import { BlockComponentRandomTickEvent, BlockCustomComponent, CustomComponentParameters } from "@minecraft/server";
2
- export declare class GrassBlockComponent implements BlockCustomComponent {
3
- constructor();
4
- onRandomTick({ block }: BlockComponentRandomTickEvent, { params }: CustomComponentParameters): void;
5
- }
6
- //# sourceMappingURL=GrassDecayBlockComponent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GrassDecayBlockComponent.d.ts","sourceRoot":"","sources":["../../../src/block/components/GrassDecayBlockComponent.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,6BAA6B,EAAE,oBAAoB,EAAE,yBAAyB,EAAW,MAAM,mBAAmB,CAAC;AAkCnI,qBAAa,mBAAoB,YAAW,oBAAoB;;IAK5D,YAAY,CAAC,EAAE,KAAK,EAAE,EAAE,6BAA6B,EAAE,EAAE,MAAM,EAAE,EAAE,yBAAyB;CAS/F"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=BlockComponentRegistry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BlockComponentRegistry.d.ts","sourceRoot":"","sources":["../../src/registry/BlockComponentRegistry.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import "./BlockComponentRegistry";
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/registry/index.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAC"}