sandstone 1.1.3 → 1.1.4

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.
Files changed (39) hide show
  1. package/dist/_internal/index.d.ts +7 -15
  2. package/dist/_internal/index.d.ts.map +1 -1
  3. package/dist/_internal/index.js +43 -41
  4. package/dist/_internal/index.js.map +1 -1
  5. package/dist/_internal/types/arguments/generated/resources.d.ts +2 -2
  6. package/dist/_internal/types/arguments/generated/resources.d.ts.map +1 -1
  7. package/dist/_internal/types/commands/implementations/block/place.d.ts +1 -1
  8. package/dist/_internal/types/commands/implementations/block/place.d.ts.map +1 -1
  9. package/dist/_internal/types/commands/implementations/server/schedule.d.ts +1 -1
  10. package/dist/_internal/types/core/resources/index.d.ts +1 -1
  11. package/dist/_internal/types/core/resources/resourcepack/blockstate.d.ts +13 -13
  12. package/dist/_internal/types/core/resources/resourcepack/blockstate.d.ts.map +1 -1
  13. package/dist/_internal/types/flow/Flow.d.ts +11 -11
  14. package/dist/_internal/types/flow/loop.d.ts +1 -1
  15. package/dist/_internal/types/pack/index.d.ts +1 -1
  16. package/dist/_internal/types/pack/pack.d.ts +7 -7
  17. package/dist/_internal/types/pack/pack.d.ts.map +1 -1
  18. package/dist/_internal/types/variables/Data.d.ts +1 -1
  19. package/dist/_internal/types/variables/DataSets.d.ts +4 -4
  20. package/dist/_internal/types/variables/DataSets.d.ts.map +1 -1
  21. package/dist/_internal/types/variables/ResolveNBT.d.ts +2 -2
  22. package/dist/browser/sandstone.esm.js +43 -41
  23. package/dist/browser/sandstone.esm.js.map +1 -1
  24. package/dist/exports/core/index.d.ts +1 -1
  25. package/dist/exports/core/index.js +1 -1
  26. package/dist/exports/index.d.ts +1 -1
  27. package/dist/exports/index.js +1 -1
  28. package/dist/exports/variables/index.d.ts +1 -1
  29. package/dist/exports/variables/index.js +1 -1
  30. package/package.json +2 -2
  31. package/src/arguments/generated/resources.ts +2 -2
  32. package/src/commands/implementations/block/place.ts +1 -1
  33. package/src/core/resources/datapack/itemModifier.ts +2 -2
  34. package/src/core/resources/resourcepack/blockstate.ts +32 -32
  35. package/src/pack/pack.ts +17 -37
  36. package/src/sandstone.ts +4 -20
  37. package/src/variables/DataSets.ts +4 -4
  38. package/src/core/resources/datapack/decoratedPotPattern.ts.disable +0 -47
  39. package/src/core/resources/datapack/slotSource.ts.disable +0 -47
@@ -2538,68 +2538,68 @@ AtlasClass = class AtlasClass extends ResourceClass {
2538
2538
  }
2539
2539
  }
2540
2540
  };
2541
- BlockStateNode = class BlockStateNode extends ContainerNode {
2541
+ BlockStateDefinitionNode = class BlockStateDefinitionNode extends ContainerNode {
2542
2542
  resource;
2543
2543
  constructor(sandstoneCore, resource) {
2544
2544
  super(sandstoneCore);
2545
2545
  this.resource = resource;
2546
2546
  }
2547
- getValue = () => jsonStringify(this.resource.blockStateJSON, this.resource._resourceType);
2547
+ getValue = () => jsonStringify(this.resource.blockStateDefinitionJSON, this.resource._resourceType);
2548
2548
  };
2549
- BlockStateClass = class BlockStateClass extends ResourceClass {
2549
+ BlockStateDefinitionClass = class BlockStateDefinitionClass extends ResourceClass {
2550
2550
  static resourceType = "block_definition";
2551
- blockStateJSON;
2551
+ blockStateDefinitionJSON;
2552
2552
  type;
2553
2553
  constructor(core, name, args) {
2554
- super(core, { packType: core.pack.resourcePack() }, BlockStateNode, BlockStateClass.resourceType, core.pack.resourceToPath(name, RESOURCE_PATHS[BlockStateClass.resourceType].path), args);
2555
- this.blockStateJSON = args.json;
2556
- this.type = Object.keys(this.blockStateJSON)[0];
2554
+ super(core, { packType: core.pack.resourcePack() }, BlockStateDefinitionNode, BlockStateDefinitionClass.resourceType, core.pack.resourceToPath(name, RESOURCE_PATHS[BlockStateDefinitionClass.resourceType].path), args);
2555
+ this.blockStateDefinitionJSON = args.json;
2556
+ this.type = Object.keys(this.blockStateDefinitionJSON)[0];
2557
2557
  this.handleConflicts();
2558
2558
  }
2559
2559
  push(...states) {
2560
2560
  if (this.type === "variants") {
2561
- if (states[0] instanceof BlockStateClass) {
2561
+ if (states[0] instanceof BlockStateDefinitionClass) {
2562
2562
  for (const state of states) {
2563
- this.blockStateJSON.variants = { ...this.blockStateJSON.variants, ...state.blockStateJSON.variants };
2563
+ this.blockStateDefinitionJSON.variants = { ...this.blockStateDefinitionJSON.variants, ...state.blockStateDefinitionJSON.variants };
2564
2564
  }
2565
2565
  } else {
2566
2566
  for (const state of states) {
2567
- this.blockStateJSON.variants = { ...this.blockStateJSON.variants, ...state.variants };
2567
+ this.blockStateDefinitionJSON.variants = { ...this.blockStateDefinitionJSON.variants, ...state.variants };
2568
2568
  }
2569
2569
  }
2570
2570
  }
2571
2571
  if (this.type === "multipart") {
2572
- if (states[0] instanceof BlockStateClass) {
2572
+ if (states[0] instanceof BlockStateDefinitionClass) {
2573
2573
  for (const state of states) {
2574
- this.blockStateJSON.multipart.push(...state.blockStateJSON.multipart);
2574
+ this.blockStateDefinitionJSON.multipart.push(...state.blockStateDefinitionJSON.multipart);
2575
2575
  }
2576
2576
  } else {
2577
2577
  for (const state of states) {
2578
- this.blockStateJSON.multipart.push(...state.multipart);
2578
+ this.blockStateDefinitionJSON.multipart.push(...state.multipart);
2579
2579
  }
2580
2580
  }
2581
2581
  }
2582
2582
  }
2583
2583
  unshift(...states) {
2584
2584
  if (this.type === "variants") {
2585
- if (states[0] instanceof BlockStateClass) {
2585
+ if (states[0] instanceof BlockStateDefinitionClass) {
2586
2586
  for (const state of states) {
2587
- this.blockStateJSON.variants = { ...state.blockStateJSON.variants, ...this.blockStateJSON.variants };
2587
+ this.blockStateDefinitionJSON.variants = { ...state.blockStateDefinitionJSON.variants, ...this.blockStateDefinitionJSON.variants };
2588
2588
  }
2589
2589
  } else {
2590
2590
  for (const state of states) {
2591
- this.blockStateJSON.variants = { ...state.variants, ...this.blockStateJSON.variants };
2591
+ this.blockStateDefinitionJSON.variants = { ...state.variants, ...this.blockStateDefinitionJSON.variants };
2592
2592
  }
2593
2593
  }
2594
2594
  }
2595
2595
  if (this.type === "multipart") {
2596
- if (states[0] instanceof BlockStateClass) {
2596
+ if (states[0] instanceof BlockStateDefinitionClass) {
2597
2597
  for (const state of states) {
2598
- this.blockStateJSON.multipart.unshift(...state.blockStateJSON.multipart);
2598
+ this.blockStateDefinitionJSON.multipart.unshift(...state.blockStateDefinitionJSON.multipart);
2599
2599
  }
2600
2600
  } else {
2601
2601
  for (const state of states) {
2602
- this.blockStateJSON.multipart.unshift(...state.multipart);
2602
+ this.blockStateDefinitionJSON.multipart.unshift(...state.multipart);
2603
2603
  }
2604
2604
  }
2605
2605
  }
@@ -17564,7 +17564,7 @@ var init_atlas = __esm(() => {
17564
17564
  });
17565
17565
 
17566
17566
  // src/core/resources/resourcepack/blockstate.ts
17567
- var BlockStateNode, BlockStateClass;
17567
+ var BlockStateDefinitionNode, BlockStateDefinitionClass;
17568
17568
  var init_blockstate = __esm(() => {
17569
17569
  init_arguments();
17570
17570
  init_nodes();
@@ -20074,11 +20074,11 @@ class SandstonePack {
20074
20074
  }
20075
20075
  return {
20076
20076
  datapack: {
20077
- packFormat: 61,
20077
+ packFormat: 111,
20078
20078
  description: "A Sandstone datapack"
20079
20079
  },
20080
20080
  resourcepack: {
20081
- packFormat: 46,
20081
+ packFormat: 92,
20082
20082
  description: "A Sandstone resource pack"
20083
20083
  }
20084
20084
  };
@@ -20155,7 +20155,7 @@ class SandstonePack {
20155
20155
  dataPack() {
20156
20156
  let pack = this.packTypes.get("datapack");
20157
20157
  if (!pack) {
20158
- const options = this.packOptions.datapack ?? { packFormat: 98, description: "A Sandstone datapack" };
20158
+ const options = this.packOptions.datapack ?? { packFormat: 111, description: "A Sandstone datapack" };
20159
20159
  pack = this.packTypes.set("datapack", new DataPack(false, options)).get("datapack");
20160
20160
  }
20161
20161
  return pack;
@@ -20163,7 +20163,7 @@ class SandstonePack {
20163
20163
  resourcePack() {
20164
20164
  let pack = this.packTypes.get("resourcepack");
20165
20165
  if (!pack) {
20166
- const options = this.packOptions.resourcepack ?? { packFormat: 79, description: "A Sandstone resource pack" };
20166
+ const options = this.packOptions.resourcepack ?? { packFormat: 92, description: "A Sandstone resource pack" };
20167
20167
  pack = this.packTypes.set("resourcepack", new ResourcePack(options)).get("resourcepack");
20168
20168
  }
20169
20169
  return pack;
@@ -20309,10 +20309,10 @@ class SandstonePack {
20309
20309
  return anonymousData;
20310
20310
  }
20311
20311
  DataIndexMap(initialize, dataPoint2) {
20312
- return DataIndexMap(this, initialize, dataPoint2);
20312
+ return DataIndexMapInternal(this, initialize, dataPoint2);
20313
20313
  }
20314
20314
  DataArray(initialize, dataPoint2) {
20315
- return DataArray(this, initialize, dataPoint2);
20315
+ return DataArrayInternal(this, initialize, dataPoint2);
20316
20316
  }
20317
20317
  getTempStorage = (name) => {
20318
20318
  if (tempStorage) {
@@ -20619,12 +20619,12 @@ class SandstonePack {
20619
20619
  onConflict: conflictDefaults("atlas"),
20620
20620
  ...options
20621
20621
  });
20622
- BlockState(name, json, options) {
20623
- return new BlockStateClass(this.core, name, {
20622
+ BlockStateDefinition(name, json, options) {
20623
+ return new BlockStateDefinitionClass(this.core, name, {
20624
20624
  json,
20625
20625
  creator: "user",
20626
20626
  addToSandstoneCore: true,
20627
- onConflict: conflictDefaults("blockstate"),
20627
+ onConflict: conflictDefaults("block_definition"),
20628
20628
  ...options
20629
20629
  });
20630
20630
  }
@@ -61929,7 +61929,7 @@ var init_resources3 = __esm(() => {
61929
61929
  [VillagerTradeClass, "villager_trade"],
61930
61930
  [WorldClockClass, "world_clock"],
61931
61931
  [AtlasClass, "atlas"],
61932
- [BlockStateClass, "block_definition"],
61932
+ [BlockStateDefinitionClass, "block_definition"],
61933
61933
  [EquipmentClass, "equipment"],
61934
61934
  [FontClass, "font"],
61935
61935
  [ItemModelDefinitionClass, "item_definition"],
@@ -61983,7 +61983,7 @@ var init_ItemPredicate = __esm(() => {
61983
61983
  });
61984
61984
 
61985
61985
  // src/variables/DataSets.ts
61986
- function DataIndexMap(pack2, initialize, dataPoint2) {
61986
+ function DataIndexMapInternal(pack2, initialize, dataPoint2) {
61987
61987
  const indexMap = new DataIndexMapClass(pack2, initialize, dataPoint2);
61988
61988
  return new Proxy(indexMap, {
61989
61989
  get(target, p, receiver) {
@@ -62001,7 +62001,7 @@ function DataIndexMap(pack2, initialize, dataPoint2) {
62001
62001
  }
62002
62002
  });
62003
62003
  }
62004
- function DataArray(pack2, initialize, dataPoint2) {
62004
+ function DataArrayInternal(pack2, initialize, dataPoint2) {
62005
62005
  const array3 = new DataArrayClass(pack2, initialize, dataPoint2);
62006
62006
  return new Proxy(array3, {
62007
62007
  get(target, p, receiver) {
@@ -62692,7 +62692,7 @@ var {
62692
62692
  VillagerTrade,
62693
62693
  WorldClock,
62694
62694
  Atlas,
62695
- BlockState,
62695
+ BlockStateDefinition,
62696
62696
  Equipment,
62697
62697
  Font,
62698
62698
  ItemModelDefinition,
@@ -62716,8 +62716,8 @@ var {
62716
62716
  DataVariable,
62717
62717
  getTempStorage,
62718
62718
  ResolveNBT: ResolveNBT2,
62719
- DataIndexMap: DataIndexMap2,
62720
- DataArray: DataArray2,
62719
+ DataIndexMap,
62720
+ DataArray,
62721
62721
  Selector: Selector2,
62722
62722
  UUID: UUID2,
62723
62723
  ItemPredicate: ItemPredicate2,
@@ -63379,14 +63379,16 @@ export {
63379
63379
  DataModifyFromCommand,
63380
63380
  DataModifyCommand,
63381
63381
  DataMergeCommand,
63382
+ DataIndexMapInternal,
63382
63383
  DataIndexMapClass,
63383
- DataIndexMap2 as DataIndexMap,
63384
+ DataIndexMap,
63384
63385
  DataGetCommand,
63385
63386
  DataCommandNode,
63386
63387
  DataCommand,
63387
63388
  DataClass,
63389
+ DataArrayInternal,
63388
63390
  DataArrayClass,
63389
- DataArray2 as DataArray,
63391
+ DataArray,
63390
63392
  Data2 as Data,
63391
63393
  DamageTypeNode,
63392
63394
  DamageTypeClass,
@@ -63450,9 +63452,9 @@ export {
63450
63452
  BossBarCommandNode,
63451
63453
  BossBarCommand,
63452
63454
  BlocksConditionNode,
63453
- BlockStateNode,
63454
- BlockStateClass,
63455
- BlockState,
63455
+ BlockStateDefinitionNode,
63456
+ BlockStateDefinitionClass,
63457
+ BlockStateDefinition,
63456
63458
  BlockConditionNode,
63457
63459
  BiomeConditionNode,
63458
63460
  BannerPatternNode,
@@ -63486,5 +63488,5 @@ export {
63486
63488
  ACTIVITIES_SET
63487
63489
  };
63488
63490
 
63489
- //# debugId=E27C63D507A308F364756E2164756E21
63491
+ //# debugId=A65E69D8F92C95B464756E2164756E21
63490
63492
  //# sourceMappingURL=sandstone.esm.js.map