hytopia 0.1.58 → 0.1.59

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/server.d.ts CHANGED
@@ -221,8 +221,6 @@ export declare class AudioManager {
221
221
 
222
222
  /** The world the audio manager is for. */
223
223
  get world(): World;
224
-
225
-
226
224
  /**
227
225
  * Retrieves all loaded audio instances for the world.
228
226
  *
@@ -248,6 +246,19 @@ export declare class AudioManager {
248
246
  * @returns An array of audio instances.
249
247
  */
250
248
  getAllOneshotAudios(): Audio[];
249
+
250
+ /**
251
+ * Unregisters and stops an audio instance from the audio manager.
252
+ *
253
+ * @param audio - The audio instance to unregister.
254
+ */
255
+ unregisterAudio(audio: Audio): void;
256
+ /**
257
+ * Unregisters and stops all audio instances attached to a specific entity.
258
+ *
259
+ * @param entity - The entity to unregister audio instances for.
260
+ */
261
+ unregisterEntityAttachedAudios(entity: Entity): void;
251
262
  }
252
263
 
253
264
  /** Options for creating an Audio instance. @public */
@@ -453,6 +464,7 @@ export declare class BlockType implements protocol.Serializable {
453
464
 
454
465
 
455
466
 
467
+
456
468
  /**
457
469
  * Creates a new block type instance.
458
470
  * @param world - The world the block type is for.
@@ -463,12 +475,14 @@ export declare class BlockType implements protocol.Serializable {
463
475
  get id(): number;
464
476
  /** The collider options for the block type. */
465
477
  get colliderOptions(): ColliderOptions;
466
- /** The URI of the texture for the block type. */
467
- get textureUri(): string;
468
- /** The name of the block type. */
469
- get name(): string;
478
+ /** Whether the block type is a liquid. */
479
+ get isLiquid(): boolean;
470
480
  /** Whether the block type is meshable. */
471
481
  get isMeshable(): boolean;
482
+ /** The name of the block type. */
483
+ get name(): string;
484
+ /** The URI of the texture for the block type. */
485
+ get textureUri(): string;
472
486
 
473
487
 
474
488
  }
@@ -476,9 +490,10 @@ export declare class BlockType implements protocol.Serializable {
476
490
  /** Options for creating a block type instance. @public */
477
491
  export declare interface BlockTypeOptions {
478
492
  id: number;
479
- textureUri: string;
480
- name: string;
481
493
  customColliderOptions?: ColliderOptions;
494
+ isLiquid?: boolean;
495
+ name: string;
496
+ textureUri: string;
482
497
  }
483
498
 
484
499
  /**
@@ -727,7 +742,7 @@ export declare class Chunk implements protocol.Serializable {
727
742
  * @param localCoordinate - The local coordinate of the block to get.
728
743
  * @returns The block type id.
729
744
  */
730
- getBlock(localCoordinate: Vector3Like): number;
745
+ getBlockId(localCoordinate: Vector3Like): number;
731
746
  /**
732
747
  * Check if a block exists at a specific local coordinate.
733
748
  * @param localCoordinate - The local coordinate of the block to check.
@@ -796,7 +811,13 @@ export declare class ChunkLattice {
796
811
  * @param globalCoordinate - The global coordinate of the block to get.
797
812
  * @returns The block type id, 0 if no block is set.
798
813
  */
799
- getBlock(globalCoordinate: Vector3Like): number;
814
+ getBlockId(globalCoordinate: Vector3Like): number;
815
+ /**
816
+ * Get the block type at a specific global coordinate.
817
+ * @param globalCoordinate - The global coordinate of the block to get.
818
+ * @returns The block type, null if no block is set.
819
+ */
820
+ getBlockType(globalCoordinate: Vector3Like): BlockType | null;
800
821
  /**
801
822
  * Get a chunk by its origin coordinate.
802
823
  * @param originCoordinate - The origin coordinate of the chunk to get.