在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):sciner/webcraft开源软件地址(OpenSource Url):https://github.com/sciner/webcraft开源编程语言(OpenSource Language):JavaScript 96.2%开源软件介绍(OpenSource Introduction):MadCraftMinecraft clone on JS
Third PartyRun and playCompilate texture pack. It require for first run the game, because textures not included in repo. For example you can download this texture pack from https://polyflore.net/projects/depixel
Start server:
Commands// Teleport current user to random location
Qubatch.player.teleport('random', null);
// Toggle rain
Qubatch.render.setWeather('rain'); // rain|snow|clear
// Set block at current player coordinates
let pp = Qubatch.player.getBlockPos();
Qubatch.world.chunkManager.setBlock(pp.x, pp.y, pp.z, {id: 10}, true);
// Emulate user keyboard control
// .walk(direction, duration_milliseconds)
Qubatch.player.walk('forward', 2000); // forward|back|left|right
// Get player rotate
let rotate = Qubatch.player.rotate;
// Set player rotate
Qubatch.player.setRotate({x: 0, y: 0, z: 0});
// Send message to chat
Qubatch.player.chat.sendMessage('Hello, World!');
// Get all supported blocks
let blocks = Qubatch.world.block_manager.getAll();
// Change game mode
Qubatch.world.server.GameModeSet('creative'); // survival|creative|adventure|spectator
// Open inventory window
Qubatch.player.inventory.open();
// Spawn mob
Qubatch.player.chat.sendMessage('/spawnmob 3880 71 2527 horse creamy');
Qubatch.player.chat.sendMessage('/spawnmob 3880 71 2527 bee base');
// Admins
// 1. admin list managed only by chat commands
// 2. only owner or another admin can add new admin
// 3. owner cannot be removed from admins
/admin list
/admin add username
/admin remove username Server packetsSend particle animation from server to player: const packets = [{
name: ServerClient.CMD_PARTICLE_BLOCK_DESTROY,
data: {
pos: {x: 100, y: 100, z: 100},
item: {id: 2}
}
}];
chunk.sendAll(packets, []); Manage server by chat commands
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论