GithubHelp home page GithubHelp logo

jonnyzazu / flying-squid Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prismarinejs/flying-squid

0.0 0.0 0.0 1.1 MB

Create Minecraft servers with a powerful, stable, and high level JavaScript API.

Home Page: https://prismarinejs.github.io/flying-squid/

License: MIT License

JavaScript 99.84% Dockerfile 0.16%

flying-squid's Introduction

flying-squid

NPM version Build Status Discord Gitter Irc

Create Minecraft servers with a powerful, stable, and high level JavaScript API.

Features

  • Support for Minecraft 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15 and 1.16
  • Players can see the world
  • Players see each other in-game and in tab
  • Digging
  • Placing blocks
  • Player movement
  • World generation
  • Anvil loading
  • Multi-world

Building / Running

Before running or building it is recommended that you configure the server in config/settings.json

npm install
node app.js

You can also install flying-squid globally with sudo npm install -g flying-squid and then run it with flying-squid command.

Docker

Docker allows for a higher level of isolation, compatibility and consistency. You can learn how to install Docker here.

Quick start a simple server to test out flying-squid:

docker run -p 25565:25565 prismarinejs/flying-squid

With specific configuration and a container name:

docker run -p 25565:25565 -v $(pwd)/config:/config --name my-flying-squid prismarinejs/flying-squid

docker-compose is useful to quickly launch & stop a single container with a specific configuration.

docker-compose.yaml:

version: '3.8'

services:
  flying-squid:
    image: prismarinejs/flying-squid
    volumes:
       - ${PWD}/config:/config
    ports:
      - "25565:25565"
volumes:
  flying-squid:
docker-compose -f path/to/docker-compose.yaml up

Or do it all locally:

docker build -t local-flying-squid .
docker run -p 25565:25565 local-flying-squid

or

docker-compose up

World generation

There are several modules than can be used to generate the world. The default one is called diamond-square

  • node-voxel-worldgen: a voxel world generator written in Rust, compatible with flying-squid and allows basic minecraft-like generation including caves.
  • diamond-square: a diamond square minecraft generation.
  • superflat: a superflat worldgen with configurable blocks and biome.

To install a world generation, all you have to do is npm install it and then change the generation option in settings.json.

Plugins

  • flying-squid-irc a bridge between a irc chan and the minecraft server. Currently used between our test server (rom1504.fr) and our gitter room (through the official gitter irc bridge)
  • flying-squid-schematic Flying-squid plugin providing /listSchemas and /loadSchema commands. You can add schema through a simple http api and then add them in your world by just calling /loadSchema in game.
  • flying-squid-essentials Plugin that in a future will be like Essentials of bukkit/spigot. All the basic commands that a server should have
  • squidcord a bridge between a discord channel and the minecraft server.
  • authme an auth plugin for online-mode=false servers.

Documentation

For development see the API documentation, CONTRIBUTE.md and HISTORY.md

Using as a lib

flying-squid is also a server lib. Here is a basic example of usage:

const mcServer = require('flying-squid')

mcServer.createMCServer({
  'motd': 'A Minecraft Server \nRunning flying-squid',
  'port': 25565,
  'max-players': 10,
  'online-mode': true,
  'logging': true,
  'gameMode': 1,
  'difficulty': 1,
  'worldFolder': 'world',
  'generation': {
    'name': 'diamond_square',
    'options': {
      'worldHeight': 80
    }
  },
  'kickTimeout': 10000,
  'plugins': {

  },
  'modpe': false,
  'view-distance': 10,
  'player-list-text': {
    'header': 'Flying squid',
    'footer': 'Test server'
  },
  'everybody-op': true,
  'max-entities': 100,
  'version': '1.16.5'
})

You can add server plugins and player plugins in your package, following CONTRIBUTE.md.

For further examples, see the examples page.

Contributors

  • @mhsjlw creator of flying-squid
  • @roblabla for helping out with the protocols
  • @rom1504 for massive contributions to the code
  • @demipixel
  • The PrismarineJS team for creating prismarine-chunk and node-minecraft-protocol
  • wiki.vg for documenting minecraft protocols
  • All of our other awesome contributors!

flying-squid's People

Contributors

rom1504 avatar demipixel avatar karang avatar kotinash avatar deudly avatar greenkeeperio-bot avatar 109c avatar dependabot[bot] avatar creeplays avatar rrwr avatar idanho avatar dependabot-preview[bot] avatar u9g avatar jvyden avatar darksunlight avatar zardoy avatar falcog avatar saiv46 avatar groobledierne avatar jwo1f avatar kf106 avatar rom1504bot avatar rtm516 avatar somucheffort avatar extremeheat avatar bitknox avatar thealan404 avatar shin-jaeheon avatar kaffinpx avatar louis030195 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.