hytopia 0.5.0-dev3 → 0.5.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.
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+
3
+ // Ran from root as prepublishOnly hook to replace __SDK_DEV_VERSION__ with the actual SDK version.
4
+ const fs = require('fs');
5
+ const package = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
6
+ const server = fs.readFileSync('./server.js', 'utf8');
7
+
8
+ if (!server.includes('__DEV_SDK_VERSION__')) {
9
+ throw new Error('__DEV_SDK_VERSION__ not found in server.js. Please create a fresh build before publishing with: cd ../server && bun run build.');
10
+ }
11
+
12
+ fs.writeFileSync('./server.js', server.replace(/__DEV_SDK_VERSION__/g, package.version));
@@ -375,6 +375,7 @@ export default class GamePlayerEntity extends DefaultPlayerEntity {
375
375
  this.resetAnimations();
376
376
 
377
377
  this.playerController.on(BaseEntityControllerEvent.TICK_WITH_PLAYER_INPUT, this._onTickWithPlayerInput);
378
+ this.playerController.canSwim = () => false;
378
379
  }
379
380
 
380
381
  private _setupPlayerHeadshotCollider(): void {
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "payload-game",
2
+ "name": "player-persistence",
3
3
  "version": "1.0.0",
4
4
  "description": "",
5
5
  "main": "index.js",
@@ -0,0 +1,3 @@
1
+ # world-switching
2
+
3
+ A simple demo showcasing switching players between 2 different worlds.