@hylithiumjs.com/core 1.2.6 → 1.2.8
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/types.d.ts +94 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +39 -39
package/dist/types.d.ts
CHANGED
|
@@ -804,6 +804,24 @@ export interface World {
|
|
|
804
804
|
getEntityStore(): EntityStoreWrapper;
|
|
805
805
|
execute(task: () => void): void;
|
|
806
806
|
}
|
|
807
|
+
export interface Path {
|
|
808
|
+
toString(): string;
|
|
809
|
+
}
|
|
810
|
+
export interface CompletableFuture<T> {
|
|
811
|
+
thenApply(func: (arg: T) => unknown): CompletableFuture<unknown>;
|
|
812
|
+
join(): T;
|
|
813
|
+
get(): T;
|
|
814
|
+
}
|
|
815
|
+
export interface WorldConfig {
|
|
816
|
+
setWorldGenProvider(provider: unknown): void;
|
|
817
|
+
markChanged(): void;
|
|
818
|
+
setChunkStorageProvider(provider: unknown): void;
|
|
819
|
+
getRequiredPlugins(): Map<any, any>;
|
|
820
|
+
getUuid(): {
|
|
821
|
+
toString(): string;
|
|
822
|
+
};
|
|
823
|
+
isDeleteOnUniverseStart(): boolean;
|
|
824
|
+
}
|
|
807
825
|
export interface Universe {
|
|
808
826
|
get(): Universe;
|
|
809
827
|
getDefaultWorld(): World;
|
|
@@ -819,6 +837,16 @@ export interface Universe {
|
|
|
819
837
|
getWorlds(): Map<string, World>;
|
|
820
838
|
getPlayers(): PlayerRef[];
|
|
821
839
|
getPlayerCount(): number;
|
|
840
|
+
makeWorld(name: string, savePath: unknown, worldConfig: WorldConfig): CompletableFuture<World>;
|
|
841
|
+
makeWorld(name: string, savePath: unknown, worldConfig: WorldConfig, start: boolean): CompletableFuture<World>;
|
|
842
|
+
addWorld(name: string): CompletableFuture<World>;
|
|
843
|
+
addWorld(name: string, generatorType: string | null, chunkStorageType: string | null): CompletableFuture<World>;
|
|
844
|
+
isWorldLoadable(name: string): boolean;
|
|
845
|
+
loadWorld(name: string): CompletableFuture<World>;
|
|
846
|
+
removeWorld(name: string): boolean;
|
|
847
|
+
removeWorldExceptionally(name: string): void;
|
|
848
|
+
getUniverseReady(): CompletableFuture<void>;
|
|
849
|
+
getPath(): Path;
|
|
822
850
|
}
|
|
823
851
|
export interface Message {
|
|
824
852
|
toString(): string;
|
|
@@ -6505,8 +6533,74 @@ export interface CommonAssetModule {
|
|
|
6505
6533
|
get(): CommonAssetModule;
|
|
6506
6534
|
addCommonAsset(namespace: string, asset: ByteArrayCommonAsset): void;
|
|
6507
6535
|
}
|
|
6536
|
+
export interface ChunkStore {
|
|
6537
|
+
}
|
|
6538
|
+
export interface InstanceDataResource {
|
|
6539
|
+
}
|
|
6540
|
+
export interface EntityStore {
|
|
6541
|
+
}
|
|
6542
|
+
export interface InstanceEntityConfig {
|
|
6543
|
+
}
|
|
6544
|
+
export interface InstanceBlock {
|
|
6545
|
+
}
|
|
6546
|
+
export interface ConfigurableInstanceBlock {
|
|
6547
|
+
}
|
|
6548
|
+
export interface WorldReturnPoint {
|
|
6549
|
+
getWorld(): string;
|
|
6550
|
+
getReturnPoint(): Transform;
|
|
6551
|
+
isReturnOnReconnect(): boolean;
|
|
6552
|
+
setReturnOnReconnect(arg0: boolean): void;
|
|
6553
|
+
}
|
|
6554
|
+
export interface InstanceWorldConfig {
|
|
6555
|
+
getReturnPoint(): WorldReturnPoint;
|
|
6556
|
+
setReturnPoint(arg0: WorldReturnPoint): void;
|
|
6557
|
+
shouldPreventReconnection(): boolean;
|
|
6558
|
+
setPreventReconnection(arg0: boolean): void;
|
|
6559
|
+
}
|
|
6560
|
+
export interface InstancesPlugin {
|
|
6561
|
+
spawnInstance(name: string, forWorld: World, returnPoint: Transform): CompletableFuture<World>;
|
|
6562
|
+
spawnInstance(name: string, worldName: string | null, forWorld: World, returnPoint: Transform): CompletableFuture<World>;
|
|
6563
|
+
getInstanceAssets(): string[];
|
|
6564
|
+
getLogger(): {
|
|
6565
|
+
info(s: string): void;
|
|
6566
|
+
};
|
|
6567
|
+
getInstanceDataResourceType(): ResourceType<ChunkStore, InstanceDataResource>;
|
|
6568
|
+
getInstanceEntityConfigComponentType(): ComponentType<EntityStore, InstanceEntityConfig>;
|
|
6569
|
+
getInstanceBlockComponentType(): ComponentType<ChunkStore, InstanceBlock>;
|
|
6570
|
+
getConfigurableInstanceBlockComponentType(): ComponentType<ChunkStore, ConfigurableInstanceBlock>;
|
|
6571
|
+
}
|
|
6572
|
+
export interface InstancesPluginClass {
|
|
6573
|
+
get(): InstancesPlugin;
|
|
6574
|
+
teleportPlayerToLoadingInstance(entityRef: Ref<EntityStore>, componentAccessor: ComponentAccessor, worldFuture: CompletableFuture<World>, overrideReturn: Transform | null): void;
|
|
6575
|
+
teleportPlayerToInstance(playerRef: Ref<EntityStore>, componentAccessor: ComponentAccessor, targetWorld: World, overrideReturn: Transform | null): void;
|
|
6576
|
+
exitInstance(targetRef: Ref<EntityStore>, componentAccessor: ComponentAccessor): void;
|
|
6577
|
+
safeRemoveInstance(worldName: string): void;
|
|
6578
|
+
safeRemoveInstance(worldUUID: {
|
|
6579
|
+
toString(): string;
|
|
6580
|
+
}): void;
|
|
6581
|
+
safeRemoveInstance(instanceWorld: World | null): void;
|
|
6582
|
+
getInstanceAssetPath(name: string): Path;
|
|
6583
|
+
doesInstanceAssetExist(name: string): boolean;
|
|
6584
|
+
loadInstanceAssetForEdit(name: string): CompletableFuture<World>;
|
|
6585
|
+
INSTANCE_PREFIX: string;
|
|
6586
|
+
CONFIG_FILENAME: string;
|
|
6587
|
+
}
|
|
6588
|
+
export interface ComponentAccessor {
|
|
6589
|
+
}
|
|
6590
|
+
export interface ResourceType<S, R> {
|
|
6591
|
+
}
|
|
6592
|
+
export interface ComponentType<S, C> {
|
|
6593
|
+
}
|
|
6594
|
+
export interface ScriptScheduler {
|
|
6595
|
+
runLater(callback: () => void, delayMs: number): unknown;
|
|
6596
|
+
runRepeating(callback: () => void, delayMs: number, periodMs: number): unknown;
|
|
6597
|
+
runRepeatingWithDelay(callback: () => void, delayMs: number, periodMs: number): unknown;
|
|
6598
|
+
awaitFuture<T>(future: CompletableFuture<T>, callback: (result: T) => void): void;
|
|
6599
|
+
cancelAllTasks(): void;
|
|
6600
|
+
}
|
|
6508
6601
|
declare global {
|
|
6509
6602
|
const EventTitleUtil: EventTitleUtil;
|
|
6603
|
+
const InstancesPlugin: InstancesPluginClass;
|
|
6510
6604
|
const MySQLManager: MySQLManager;
|
|
6511
6605
|
const TableBuilder: TableBuilderConstructor;
|
|
6512
6606
|
}
|