sandstone 1.0.1 → 1.0.2
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/_internal/index.d.ts +8 -8
- package/dist/_internal/index.d.ts.map +1 -1
- package/dist/_internal/index.js +45 -43
- package/dist/_internal/index.js.map +1 -1
- package/dist/_internal/types/arguments/generated/resources.d.ts +2 -2
- package/dist/_internal/types/arguments/generated/resources.d.ts.map +1 -1
- package/dist/_internal/types/commands/implementations/block/place.d.ts +1 -1
- package/dist/_internal/types/commands/implementations/block/place.d.ts.map +1 -1
- package/dist/_internal/types/commands/implementations/server/schedule.d.ts +1 -1
- package/dist/_internal/types/core/resources/index.d.ts +1 -1
- package/dist/_internal/types/core/resources/resourcepack/blockstate.d.ts +13 -13
- package/dist/_internal/types/core/resources/resourcepack/blockstate.d.ts.map +1 -1
- package/dist/_internal/types/flow/Flow.d.ts +11 -11
- package/dist/_internal/types/flow/loop.d.ts +1 -1
- package/dist/_internal/types/pack/index.d.ts +1 -1
- package/dist/_internal/types/pack/pack.d.ts +7 -7
- package/dist/_internal/types/pack/pack.d.ts.map +1 -1
- package/dist/_internal/types/variables/Data.d.ts +1 -1
- package/dist/_internal/types/variables/DataSets.d.ts +4 -4
- package/dist/_internal/types/variables/DataSets.d.ts.map +1 -1
- package/dist/_internal/types/variables/ResolveNBT.d.ts +2 -2
- package/dist/browser/sandstone.esm.js +45 -43
- package/dist/browser/sandstone.esm.js.map +1 -1
- package/dist/exports/core/index.d.ts +1 -1
- package/dist/exports/core/index.js +1 -1
- package/dist/exports/index.d.ts +1 -1
- package/dist/exports/index.js +1 -1
- package/dist/exports/variables/index.d.ts +1 -1
- package/dist/exports/variables/index.js +1 -1
- package/package.json +1 -1
- package/src/arguments/generated/resources.ts +2 -2
- package/src/commands/implementations/block/place.ts +1 -1
- package/src/core/resources/datapack/itemModifier.ts +2 -2
- package/src/core/resources/resourcepack/blockstate.ts +32 -32
- package/src/pack/pack.ts +17 -15
- package/src/sandstone.ts +34 -5
- package/src/variables/DataSets.ts +4 -4
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { JSONTextComponent } from "./types/arguments/jsonTextComponent.js";
|
|
2
2
|
import { SandstoneContext, setSandstoneContext, getSandstoneContext, hasContext, resetContext } from "./types/context.js";
|
|
3
3
|
import type { FillCommand, GiveCommand, SetBlockCommand, AdvancementCommand, AttributeOperationCommand, BossBarCommand, FinalCommandOutput, CloneOptionsCommand, CloneFromDimensionCommand, DamageSourceCommand, DataCommand, DataPackCommand, DebugCommand, DialogCommand, EffectCommand, ExecuteCommand, ExperienceCommand, ForceLoadCommand, ExtractNBTIntRange, LocateCommand, LootCommand, PerfCommand, PlaceCommand, RandomCommand, RecipeCommand, SandstoneCommands, RotateFacingArguments, RideArgumentsCommand, ItemCommand, JFRCommand, ScheduleCommand, ScoreboardCommand, StopwatchCommand, TagArgumentsCommand, TeamCommand, TeleportFacingCommand, TestCommand, TimeCommand, TitleArgumentsCommand, TriggerArgumentsCommand, WaypointCommand, WeatherCommand, WorldBorderCommand, StoreType } from "./types/commands/index.js";
|
|
4
|
-
import { AdvancementClassArguments, AtlasClassArguments, BannerPatternClassArguments,
|
|
4
|
+
import { AdvancementClassArguments, AtlasClassArguments, BannerPatternClassArguments, BlockStateDefinitionArguments, ChatTypeClassArguments, DamageTypeClassArguments, DialogClassArguments, EnchantmentClassArguments, EnchantmentProviderClassArguments, EquipmentClassArguments, FontArguments, InstrumentClassArguments, ItemModelDefinitionClassArguments, ItemModifierClassArguments, JukeboxSongClassArguments, LanguageArguments, LootTableClassArguments, MCFunctionClassArguments, ModelClassArguments, ParticleClassArguments, PlainTextArguments, PostEffectClassArguments, PredicateClassArguments, RecipeClassArguments, ShaderClassArguments, SoundEventArguments, SoundsIndexArguments, TagClassArguments, TestEnvironmentClassArguments, TestInstanceClassArguments, TextureArguments, TimelineClassArguments, TradeSetClassArguments, TrialSpawnerClassArguments, TrimMaterialClassArguments, TrimPatternClassArguments, VariantClassArguments, VillagerTradeClassArguments, WaypointStyleClassArguments, WorldClockClassArguments, MCFunctionClass, DataPointPickClass, CustomResourceClass, MacroArgument, TagValuesJSON, VariantType, BlockStateDefinitionJSON, BlockStateDefinitionType, ItemModelDefinitionInput, ShaderClass, PlainTextClass, MacroLiteral, SandstoneCore, ResourceClass } from "./types/core/index.js";
|
|
5
5
|
import { Flow, Condition } from "./types/flow/index.js";
|
|
6
6
|
import type { BASIC_CONFLICT_STRATEGIES, LiteralUnion, NamespacedLiteralUnion, SetType, AllKeys, MakeInstanceCallable } from "./types/utils.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import { NBTAnyValue, NBTByte, NBTByteArray, NBTClass, NBTDouble, NBTFloat, NBTInt, NBTIntArray, NBTList, NBTLong, NBTLongArray, NBTPrimitive, NBTRange, NBTShort, NBTString, NBTTypedArray, NotNBT, ResolvedNBT, NBTAllArrays, NBTAllNumberClasses, NBTAllNumbers, NBTAllPrimitives, NBTAllValues, NBTSimpleClasses } from "./types/variables/nbt/NBTs.js";
|
|
8
|
+
import { ObjectiveClass, Score, SelectorClass, LabelClass, UUIDClass, DataPointClass, ItemPredicateClass, DATA_TYPES, TriggerHandler, TriggerClass, _RawLabelClass, TargetlessDataClass, TargetFor, DataClass, DATA_PATH, TargetlessDataPointClass, ResolveNBTClass, DataIndexMapType, DataArrayType, SelectorEntityType, SelectorProperties, UUIDinNumber, UUIDOptions, UUIDinScore, SelectorPickClass, ItemPredicateItem, SleepClass } from "./types/variables/index.js";
|
|
9
|
+
import { AdvancementClass, BannerPatternClass, ChatTypeClass, DamageTypeClass, DialogClass, EnchantmentClass, EnchantmentProviderClass, InstrumentClass, ItemModifierClass, JukeboxSongClass, LootTableClass, PredicateClass, RecipeClass, StructureClass, TagClass, TestEnvironmentClass, TestInstanceClass, TimelineClass, TradeSetClass, TrialSpawnerClass, TrimMaterialClass, TrimPatternClass, VariantClass, VillagerTradeClass, WorldClockClass, AtlasClass, BlockStateDefinitionClass, EquipmentClass, FontClass, ItemModelDefinitionClass, LanguageClass, ModelClass, ParticleClass, PostEffectClass, SoundEventClass, SoundsIndexClass, TextureClass, WaypointStyleClass } from "./types/core/resources/index.js";
|
|
9
10
|
import type { SingleEntityArgumentOf, MultiplePlayersArgumentOf, Coordinates, GAMEMODES, DIFFICULTIES, MultipleEntitiesArgument, RootNBT, MessageOrSelector, AbsoluteCoordinates, SOUND_SOURCES, Rotation, SinglePlayerArgumentOf, ColumnCoordinates, ObjectiveArgument, MCDocToJSON, SymbolResource, RecipeJSON, REGISTRIES, SOUND_TYPES, TEXTURE_TYPES, OBJECTIVE_CRITERIA, NBTObject, TimeArgument } from "./types/arguments/index.js";
|
|
10
11
|
import type { ITEMS } from "./types/arguments/generated/_registry/items.js";
|
|
11
12
|
import type { DAMAGE_TYPES } from "./types/arguments/generated/_registry/damage_types.js";
|
|
@@ -2107,7 +2108,7 @@ export declare const RawResource: {
|
|
|
2107
2108
|
'minecraft:worldgen/world_preset': WorldPreset;
|
|
2108
2109
|
zombie_nautilus_variant: ZombieNautilusVariant;
|
|
2109
2110
|
'minecraft:zombie_nautilus_variant': ZombieNautilusVariant;
|
|
2110
|
-
}[`${T}_variant`]>, options?: Omit<Partial<VariantClassArguments<T>>, "variant"> | undefined) => VariantClass<T>, VillagerTrade: (name: string, villagerTrade: VillagerTradeClassArguments["json"], options?: Omit<Partial<VillagerTradeClassArguments>, "json">) => VillagerTradeClass, WorldClock: (name: string, worldClock: WorldClockClassArguments["json"], options?: Omit<Partial<WorldClockClassArguments>, "json">) => WorldClockClass, Atlas: (name: string, json: AtlasClassArguments["json"], options?: Omit<Partial<AtlasClassArguments>, "json">) => AtlasClass,
|
|
2111
|
+
}[`${T}_variant`]>, options?: Omit<Partial<VariantClassArguments<T>>, "variant"> | undefined) => VariantClass<T>, VillagerTrade: (name: string, villagerTrade: VillagerTradeClassArguments["json"], options?: Omit<Partial<VillagerTradeClassArguments>, "json">) => VillagerTradeClass, WorldClock: (name: string, worldClock: WorldClockClassArguments["json"], options?: Omit<Partial<WorldClockClassArguments>, "json">) => WorldClockClass, Atlas: (name: string, json: AtlasClassArguments["json"], options?: Omit<Partial<AtlasClassArguments>, "json">) => AtlasClass, BlockStateDefinition: <JSON extends BlockStateDefinitionJSON>(name: string, json: JSON, options?: Omit<Partial<BlockStateDefinitionArguments<JSON>>, "json"> | undefined) => BlockStateDefinitionClass<JSON, Extract<AllKeys<JSON>, BlockStateDefinitionType>>, Equipment: (name: string, json: EquipmentClassArguments["json"], options?: Omit<Partial<EquipmentClassArguments>, "json">) => EquipmentClass, Font: (name: string, providers: FontArguments["providers"], options?: Omit<Partial<FontArguments>, "providers">) => FontClass, ItemModelDefinition: (name: string, definition: ItemModelDefinitionInput, options?: Omit<Partial<ItemModelDefinitionClassArguments>, "definition">) => ItemModelDefinitionClass, Language: (name: string, language: LanguageArguments["language"], options?: Omit<Partial<LanguageArguments>, "language">) => LanguageClass, Model: <Type extends LiteralUnion<"block" | "item">>(type: Type, name: string, json: ModelClassArguments["json"], options?: Omit<Partial<ModelClassArguments>, "json">) => ModelClass<Type>, ParticleResource: (name: string, json: ParticleClassArguments["json"], options?: Omit<Partial<ParticleClassArguments>, "json">) => ParticleClass, PostEffect: (name: string, json: PostEffectClassArguments["json"], options?: Omit<Partial<PostEffectClassArguments>, "json">) => PostEffectClass, Shader: (name: string, json: ShaderClassArguments["json"], options?: Omit<Partial<ShaderClassArguments>, "json">) => ShaderClass, SoundEvent: <Type extends SOUND_TYPES>(type: Type, name: string, sound: SoundEventArguments["sound"], options?: Omit<Partial<SoundEventArguments>, "sound">) => SoundEventClass<Type>, SoundsIndex: (definitions: SoundsIndexArguments["definitions"], namespace?: string, options?: Omit<Partial<SoundsIndexArguments>, "definitions">) => SoundsIndexClass, PlainText: (name: string, text: PlainTextArguments["text"], options?: Partial<PlainTextArguments>) => PlainTextClass, Texture: <Type extends LiteralUnion<TEXTURE_TYPES>>(type: Type, name: string, texture: ArrayBuffer | Buffer<ArrayBufferLike> | Promise<ArrayBuffer | Buffer<ArrayBufferLike>> | undefined, options?: Partial<TextureArguments<Type>> | undefined) => TextureClass<Type>, WaypointStyle: (name: string, json: WaypointStyleClassArguments["json"], options?: Omit<Partial<WaypointStyleClassArguments>, "json">) => WaypointStyleClass, Objective: {
|
|
2111
2112
|
create: (name: string, criteria?: LiteralUnion<OBJECTIVE_CRITERIA>, display?: JSONTextComponent, options?: {
|
|
2112
2113
|
alreadyExists?: boolean;
|
|
2113
2114
|
useDefaultNamespace?: boolean;
|
|
@@ -2128,10 +2129,10 @@ export declare const RawResource: {
|
|
|
2128
2129
|
}, DataVariable: {
|
|
2129
2130
|
(initialValue?: NBTObject | DataPointClass<any> | DataPointPickClass, name?: string): DataPointClass<"storage">;
|
|
2130
2131
|
(score: Score, storeType?: StoreType, scale?: number, name?: string): DataPointClass<"storage">;
|
|
2131
|
-
}, getTempStorage: (name: string) => DataPointClass<"storage">, ResolveNBT: (nbt: NBTObject, dataPoint?: DataPointClass<"storage">) => ResolveNBTClass, DataIndexMap: <INITIAL extends RootNBT | Record<string, DataPointClass | DataPointPickClass>>(initialize: INITIAL, dataPoint?: DataPointClass<"storage">) =>
|
|
2132
|
+
}, getTempStorage: (name: string) => DataPointClass<"storage">, ResolveNBT: (nbt: NBTObject, dataPoint?: DataPointClass<"storage">) => ResolveNBTClass, DataIndexMap: <INITIAL extends RootNBT | Record<string, DataPointClass | DataPointPickClass>>(initialize: INITIAL, dataPoint?: DataPointClass<"storage">) => DataIndexMapType<INITIAL>, DataArray: <INITIAL extends readonly NBTObject[] | readonly [
|
|
2132
2133
|
string,
|
|
2133
2134
|
DataPointClass | DataPointPickClass
|
|
2134
|
-
]>(initialize: INITIAL, dataPoint?: DataPointClass<"storage">) =>
|
|
2135
|
+
]>(initialize: INITIAL, dataPoint?: DataPointClass<"storage">) => DataArrayType<INITIAL>, Selector: {
|
|
2135
2136
|
(target: "@e"): SelectorClass<false, false, false>;
|
|
2136
2137
|
(target: "@a"): SelectorClass<false, false, true>;
|
|
2137
2138
|
(target: "@s" | "@n"): SelectorClass<false, true, false>;
|
|
@@ -2153,7 +2154,6 @@ export declare const RawResource: {
|
|
|
2153
2154
|
load: TagClass<"function">;
|
|
2154
2155
|
postLoad: TagClass<"function">;
|
|
2155
2156
|
}, defaultNamespace: string;
|
|
2156
|
-
export * from "./types/variables/nbt/NBTs.js";
|
|
2157
2157
|
export declare const absolute: typeof coordinates.absolute, relative: typeof coordinates.relative, local: typeof coordinates.local;
|
|
2158
2158
|
export declare const abs: typeof coordinates.absolute;
|
|
2159
2159
|
export declare const rel: typeof coordinates.relative;
|
|
@@ -2477,7 +2477,7 @@ ContentStrategyKind<'default', BASIC_CONFLICT_STRATEGIES>
|
|
|
2477
2477
|
* The conflict strategy to use for Block states.
|
|
2478
2478
|
* Will override the defined `default` strategy.
|
|
2479
2479
|
*/
|
|
2480
|
-
| ContentStrategyKind<'
|
|
2480
|
+
| ContentStrategyKind<'block_definition', NonNullable<BlockStateDefinitionArguments<any>['onConflict']>>
|
|
2481
2481
|
/**
|
|
2482
2482
|
* The conflict strategy to use for Fonts.
|
|
2483
2483
|
* Will override the defined `default` strategy.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/sandstone.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/sandstone.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA4Da;;;;;;;;;;;;;;;;qBAkFX,wCACA,kIACA,gCACA;;;GACA;;;GACA,yDACA,+KACA,0BACA,2BACA,4BACA,8BACA,0DACA,+DACA,8BACA,sHACA,gCACA,sCACA;;;GACA;;;;;GACA,oCACA,oIACA;;;;;;;;;;;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,6JACA,qMACA,wJACA,kKACA,6JACA,mJACA,mJACA,+NACA,gKACA,iLACA,kKACA,8IACA,8IACA,kKACA,kKACA,6JACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kHACA,uKACA,wJAEA,8HACA,gQACA,8IACA,+HACA,iLACA,4IACA,6LACU,kJACV,kJACA,kIACA,uLACA,uKACA,sHACA,yQACA,8JAGA;;;;;;GACA,oIAEA;;;GACA,qBACA,0GACA,oIACA;;;;;;;;;GACA;;;GACA,6DACA,wFACA,wLACA;;;0FACA;;;;;;;;GACA;;;;;;GACA,oEACA;;;GACA,4CACA;;;;GACA;qBA6Fa,uCAAU,uCAAU;qBAEtB;qBACA;qBACA;qBAEE;;;;GAAoB;;;;;;GAAqB;qBAC3C","file":"index.d.ts"}
|
package/dist/_internal/index.js
CHANGED
|
@@ -2491,68 +2491,68 @@ AtlasClass = class AtlasClass extends ResourceClass {
|
|
|
2491
2491
|
}
|
|
2492
2492
|
}
|
|
2493
2493
|
};
|
|
2494
|
-
|
|
2494
|
+
BlockStateDefinitionNode = class BlockStateDefinitionNode extends ContainerNode {
|
|
2495
2495
|
resource;
|
|
2496
2496
|
constructor(sandstoneCore, resource) {
|
|
2497
2497
|
super(sandstoneCore);
|
|
2498
2498
|
this.resource = resource;
|
|
2499
2499
|
}
|
|
2500
|
-
getValue = () => jsonStringify(this.resource.
|
|
2500
|
+
getValue = () => jsonStringify(this.resource.blockStateDefinitionJSON, this.resource._resourceType);
|
|
2501
2501
|
};
|
|
2502
|
-
|
|
2502
|
+
BlockStateDefinitionClass = class BlockStateDefinitionClass extends ResourceClass {
|
|
2503
2503
|
static resourceType = "block_definition";
|
|
2504
|
-
|
|
2504
|
+
blockStateDefinitionJSON;
|
|
2505
2505
|
type;
|
|
2506
2506
|
constructor(core, name, args) {
|
|
2507
|
-
super(core, { packType: core.pack.resourcePack() },
|
|
2508
|
-
this.
|
|
2509
|
-
this.type = Object.keys(this.
|
|
2507
|
+
super(core, { packType: core.pack.resourcePack() }, BlockStateDefinitionNode, BlockStateDefinitionClass.resourceType, core.pack.resourceToPath(name, RESOURCE_PATHS[BlockStateDefinitionClass.resourceType].path), args);
|
|
2508
|
+
this.blockStateDefinitionJSON = args.json;
|
|
2509
|
+
this.type = Object.keys(this.blockStateDefinitionJSON)[0];
|
|
2510
2510
|
this.handleConflicts();
|
|
2511
2511
|
}
|
|
2512
2512
|
push(...states) {
|
|
2513
2513
|
if (this.type === "variants") {
|
|
2514
|
-
if (states[0] instanceof
|
|
2514
|
+
if (states[0] instanceof BlockStateDefinitionClass) {
|
|
2515
2515
|
for (const state of states) {
|
|
2516
|
-
this.
|
|
2516
|
+
this.blockStateDefinitionJSON.variants = { ...this.blockStateDefinitionJSON.variants, ...state.blockStateDefinitionJSON.variants };
|
|
2517
2517
|
}
|
|
2518
2518
|
} else {
|
|
2519
2519
|
for (const state of states) {
|
|
2520
|
-
this.
|
|
2520
|
+
this.blockStateDefinitionJSON.variants = { ...this.blockStateDefinitionJSON.variants, ...state.variants };
|
|
2521
2521
|
}
|
|
2522
2522
|
}
|
|
2523
2523
|
}
|
|
2524
2524
|
if (this.type === "multipart") {
|
|
2525
|
-
if (states[0] instanceof
|
|
2525
|
+
if (states[0] instanceof BlockStateDefinitionClass) {
|
|
2526
2526
|
for (const state of states) {
|
|
2527
|
-
this.
|
|
2527
|
+
this.blockStateDefinitionJSON.multipart.push(...state.blockStateDefinitionJSON.multipart);
|
|
2528
2528
|
}
|
|
2529
2529
|
} else {
|
|
2530
2530
|
for (const state of states) {
|
|
2531
|
-
this.
|
|
2531
|
+
this.blockStateDefinitionJSON.multipart.push(...state.multipart);
|
|
2532
2532
|
}
|
|
2533
2533
|
}
|
|
2534
2534
|
}
|
|
2535
2535
|
}
|
|
2536
2536
|
unshift(...states) {
|
|
2537
2537
|
if (this.type === "variants") {
|
|
2538
|
-
if (states[0] instanceof
|
|
2538
|
+
if (states[0] instanceof BlockStateDefinitionClass) {
|
|
2539
2539
|
for (const state of states) {
|
|
2540
|
-
this.
|
|
2540
|
+
this.blockStateDefinitionJSON.variants = { ...state.blockStateDefinitionJSON.variants, ...this.blockStateDefinitionJSON.variants };
|
|
2541
2541
|
}
|
|
2542
2542
|
} else {
|
|
2543
2543
|
for (const state of states) {
|
|
2544
|
-
this.
|
|
2544
|
+
this.blockStateDefinitionJSON.variants = { ...state.variants, ...this.blockStateDefinitionJSON.variants };
|
|
2545
2545
|
}
|
|
2546
2546
|
}
|
|
2547
2547
|
}
|
|
2548
2548
|
if (this.type === "multipart") {
|
|
2549
|
-
if (states[0] instanceof
|
|
2549
|
+
if (states[0] instanceof BlockStateDefinitionClass) {
|
|
2550
2550
|
for (const state of states) {
|
|
2551
|
-
this.
|
|
2551
|
+
this.blockStateDefinitionJSON.multipart.unshift(...state.blockStateDefinitionJSON.multipart);
|
|
2552
2552
|
}
|
|
2553
2553
|
} else {
|
|
2554
2554
|
for (const state of states) {
|
|
2555
|
-
this.
|
|
2555
|
+
this.blockStateDefinitionJSON.multipart.unshift(...state.multipart);
|
|
2556
2556
|
}
|
|
2557
2557
|
}
|
|
2558
2558
|
}
|
|
@@ -8189,7 +8189,7 @@ var init_atlas = __esm(() => {
|
|
|
8189
8189
|
});
|
|
8190
8190
|
|
|
8191
8191
|
// src/core/resources/resourcepack/blockstate.ts
|
|
8192
|
-
var
|
|
8192
|
+
var BlockStateDefinitionNode, BlockStateDefinitionClass;
|
|
8193
8193
|
var init_blockstate = __esm(() => {
|
|
8194
8194
|
init_arguments();
|
|
8195
8195
|
init_nodes();
|
|
@@ -10641,11 +10641,11 @@ class SandstonePack {
|
|
|
10641
10641
|
}
|
|
10642
10642
|
return {
|
|
10643
10643
|
datapack: {
|
|
10644
|
-
packFormat:
|
|
10644
|
+
packFormat: 111,
|
|
10645
10645
|
description: "A Sandstone datapack"
|
|
10646
10646
|
},
|
|
10647
10647
|
resourcepack: {
|
|
10648
|
-
packFormat:
|
|
10648
|
+
packFormat: 92,
|
|
10649
10649
|
description: "A Sandstone resource pack"
|
|
10650
10650
|
}
|
|
10651
10651
|
};
|
|
@@ -10722,7 +10722,7 @@ class SandstonePack {
|
|
|
10722
10722
|
dataPack() {
|
|
10723
10723
|
let pack = this.packTypes.get("datapack");
|
|
10724
10724
|
if (!pack) {
|
|
10725
|
-
const options = this.packOptions.datapack ?? { packFormat:
|
|
10725
|
+
const options = this.packOptions.datapack ?? { packFormat: 111, description: "A Sandstone datapack" };
|
|
10726
10726
|
pack = this.packTypes.set("datapack", new DataPack(false, options)).get("datapack");
|
|
10727
10727
|
}
|
|
10728
10728
|
return pack;
|
|
@@ -10730,7 +10730,7 @@ class SandstonePack {
|
|
|
10730
10730
|
resourcePack() {
|
|
10731
10731
|
let pack = this.packTypes.get("resourcepack");
|
|
10732
10732
|
if (!pack) {
|
|
10733
|
-
const options = this.packOptions.resourcepack ?? { packFormat:
|
|
10733
|
+
const options = this.packOptions.resourcepack ?? { packFormat: 92, description: "A Sandstone resource pack" };
|
|
10734
10734
|
pack = this.packTypes.set("resourcepack", new ResourcePack(options)).get("resourcepack");
|
|
10735
10735
|
}
|
|
10736
10736
|
return pack;
|
|
@@ -10876,10 +10876,10 @@ class SandstonePack {
|
|
|
10876
10876
|
return anonymousData;
|
|
10877
10877
|
}
|
|
10878
10878
|
DataIndexMap(initialize, dataPoint2) {
|
|
10879
|
-
return
|
|
10879
|
+
return DataIndexMapInternal(this, initialize, dataPoint2);
|
|
10880
10880
|
}
|
|
10881
10881
|
DataArray(initialize, dataPoint2) {
|
|
10882
|
-
return
|
|
10882
|
+
return DataArrayInternal(this, initialize, dataPoint2);
|
|
10883
10883
|
}
|
|
10884
10884
|
getTempStorage = (name) => {
|
|
10885
10885
|
if (tempStorage) {
|
|
@@ -11179,12 +11179,12 @@ class SandstonePack {
|
|
|
11179
11179
|
onConflict: conflictDefaults("atlas"),
|
|
11180
11180
|
...options
|
|
11181
11181
|
});
|
|
11182
|
-
|
|
11183
|
-
return new
|
|
11182
|
+
BlockStateDefinition(name, json, options) {
|
|
11183
|
+
return new BlockStateDefinitionClass(this.core, name, {
|
|
11184
11184
|
json,
|
|
11185
11185
|
creator: "user",
|
|
11186
11186
|
addToSandstoneCore: true,
|
|
11187
|
-
onConflict: conflictDefaults("
|
|
11187
|
+
onConflict: conflictDefaults("block_definition"),
|
|
11188
11188
|
...options
|
|
11189
11189
|
});
|
|
11190
11190
|
}
|
|
@@ -11339,10 +11339,10 @@ var init_sandstone = __esm(() => {
|
|
|
11339
11339
|
init_utils();
|
|
11340
11340
|
init_Coordinates();
|
|
11341
11341
|
init_ResolveNBT();
|
|
11342
|
+
init_NBTs();
|
|
11342
11343
|
init_variables2();
|
|
11343
11344
|
init_core();
|
|
11344
11345
|
init_resources();
|
|
11345
|
-
init_NBTs();
|
|
11346
11346
|
sandstonePack = new Proxy({}, {
|
|
11347
11347
|
get(_target, prop) {
|
|
11348
11348
|
if (!_sandstonePack) {
|
|
@@ -51260,7 +51260,7 @@ var init_resources3 = __esm(() => {
|
|
|
51260
51260
|
[VillagerTradeClass, "villager_trade"],
|
|
51261
51261
|
[WorldClockClass, "world_clock"],
|
|
51262
51262
|
[AtlasClass, "atlas"],
|
|
51263
|
-
[
|
|
51263
|
+
[BlockStateDefinitionClass, "block_definition"],
|
|
51264
51264
|
[EquipmentClass, "equipment"],
|
|
51265
51265
|
[FontClass, "font"],
|
|
51266
51266
|
[ItemModelDefinitionClass, "item_definition"],
|
|
@@ -51314,7 +51314,7 @@ var init_ItemPredicate = __esm(() => {
|
|
|
51314
51314
|
});
|
|
51315
51315
|
|
|
51316
51316
|
// src/variables/DataSets.ts
|
|
51317
|
-
function
|
|
51317
|
+
function DataIndexMapInternal(pack2, initialize, dataPoint2) {
|
|
51318
51318
|
const indexMap = new DataIndexMapClass(pack2, initialize, dataPoint2);
|
|
51319
51319
|
return new Proxy(indexMap, {
|
|
51320
51320
|
get(target, p, receiver) {
|
|
@@ -51332,7 +51332,7 @@ function DataIndexMap(pack2, initialize, dataPoint2) {
|
|
|
51332
51332
|
}
|
|
51333
51333
|
});
|
|
51334
51334
|
}
|
|
51335
|
-
function
|
|
51335
|
+
function DataArrayInternal(pack2, initialize, dataPoint2) {
|
|
51336
51336
|
const array = new DataArrayClass(pack2, initialize, dataPoint2);
|
|
51337
51337
|
return new Proxy(array, {
|
|
51338
51338
|
get(target, p, receiver) {
|
|
@@ -51824,6 +51824,7 @@ init_pack2();
|
|
|
51824
51824
|
init_utils();
|
|
51825
51825
|
init_Coordinates();
|
|
51826
51826
|
init_ResolveNBT();
|
|
51827
|
+
init_NBTs();
|
|
51827
51828
|
init_variables2();
|
|
51828
51829
|
init_core();
|
|
51829
51830
|
init_resources();
|
|
@@ -51833,7 +51834,6 @@ init_commands2();
|
|
|
51833
51834
|
init_flow();
|
|
51834
51835
|
init_pack2();
|
|
51835
51836
|
init_arguments();
|
|
51836
|
-
init_NBTs();
|
|
51837
51837
|
var _sandstonePack2;
|
|
51838
51838
|
var sandstonePack2 = new Proxy({}, {
|
|
51839
51839
|
get(_target, prop) {
|
|
@@ -52022,7 +52022,7 @@ var {
|
|
|
52022
52022
|
VillagerTrade,
|
|
52023
52023
|
WorldClock,
|
|
52024
52024
|
Atlas,
|
|
52025
|
-
|
|
52025
|
+
BlockStateDefinition,
|
|
52026
52026
|
Equipment,
|
|
52027
52027
|
Font,
|
|
52028
52028
|
ItemModelDefinition,
|
|
@@ -52046,8 +52046,8 @@ var {
|
|
|
52046
52046
|
DataVariable,
|
|
52047
52047
|
getTempStorage,
|
|
52048
52048
|
ResolveNBT: ResolveNBT2,
|
|
52049
|
-
DataIndexMap
|
|
52050
|
-
DataArray
|
|
52049
|
+
DataIndexMap,
|
|
52050
|
+
DataArray,
|
|
52051
52051
|
Selector: Selector2,
|
|
52052
52052
|
UUID: UUID2,
|
|
52053
52053
|
ItemPredicate: ItemPredicate2,
|
|
@@ -52705,14 +52705,16 @@ export {
|
|
|
52705
52705
|
DataModifyFromCommand,
|
|
52706
52706
|
DataModifyCommand,
|
|
52707
52707
|
DataMergeCommand,
|
|
52708
|
+
DataIndexMapInternal,
|
|
52708
52709
|
DataIndexMapClass,
|
|
52709
|
-
|
|
52710
|
+
DataIndexMap,
|
|
52710
52711
|
DataGetCommand,
|
|
52711
52712
|
DataCommandNode,
|
|
52712
52713
|
DataCommand,
|
|
52713
52714
|
DataClass,
|
|
52715
|
+
DataArrayInternal,
|
|
52714
52716
|
DataArrayClass,
|
|
52715
|
-
|
|
52717
|
+
DataArray,
|
|
52716
52718
|
Data2 as Data,
|
|
52717
52719
|
DamageTypeNode,
|
|
52718
52720
|
DamageTypeClass,
|
|
@@ -52776,9 +52778,9 @@ export {
|
|
|
52776
52778
|
BossBarCommandNode,
|
|
52777
52779
|
BossBarCommand,
|
|
52778
52780
|
BlocksConditionNode,
|
|
52779
|
-
|
|
52780
|
-
|
|
52781
|
-
|
|
52781
|
+
BlockStateDefinitionNode,
|
|
52782
|
+
BlockStateDefinitionClass,
|
|
52783
|
+
BlockStateDefinition,
|
|
52782
52784
|
BlockConditionNode,
|
|
52783
52785
|
BiomeConditionNode,
|
|
52784
52786
|
BannerPatternNode,
|
|
@@ -52812,5 +52814,5 @@ export {
|
|
|
52812
52814
|
ACTIVITIES_SET
|
|
52813
52815
|
};
|
|
52814
52816
|
|
|
52815
|
-
//# debugId=
|
|
52817
|
+
//# debugId=ADCADF930687878B64756E2164756E21
|
|
52816
52818
|
//# sourceMappingURL=index.js.map
|