Git Product home page Git Product logo

jraknet's Introduction

GoMint is no longer actively maintained.

GoMint

Build Status GitHub Stars GitHub Stars GitHub Stars License

GoMint is a modern Minecraft Bedrock Edition server enabling you to make your visions come true

Start Sequence

โ‡ Getting Started

๐Ÿ“ฆ Features

  • โšก High performance, fast startup and low resource usage
  • ๐Ÿ”ง Highly configurable via configuration files
  • ๐Ÿ”Œ Functionality extendable via plugins
  • ๐Ÿ— Cryptography implementations in Rust
  • ๐Ÿ’ซ Crafting, enchanting, all blocks, all items

โฌ Download

โš  The following one-liner scripts download the latest build, not the latest tag! โš  GoMint requires Java version 11 or higher!

Windows Command Line

powershell.exe "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri 'https://gomint-artifacts.s3.amazonaws.com/latest.zip' -OutFile gomint.zip; $Random = Get-Random -Maximum 0xFFFFFF; Expand-Archive -LiteralPath gomint.zip -DestinationPath gomint-$Random; Write-Output gomint-$Random"

PowerShell

$ProgressPreference = 'SilentlyContinue'; `
    Invoke-WebRequest -Uri 'https://gomint-artifacts.s3.amazonaws.com/latest.zip' -OutFile gomint.zip; `
    $Random = Get-Random -Maximum 0xFFFFFF; `
    Expand-Archive -LiteralPath gomint.zip -DestinationPath gomint-$Random; `
    Write-Output gomint-$Random

Unix (Curl + Core Utils)

WORKSPACE=gomint-$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 6 | head -n 1) && \
	curl --silent -o gomint.zip https://gomint-artifacts.s3.amazonaws.com/latest.zip && \
	unzip gomint.zip -d $WORKSPACE && echo $WORKSPACE

Unix (Wget + Core Utils)

WORKSPACE=gomint-$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 6 | head -n 1) && \
	wget --quiet -O gomint.zip https://gomint-artifacts.s3.amazonaws.com/latest.zip && \
	unzip gomint.zip -d $WORKSPACE && echo $WORKSPACE

๐Ÿ’  Integration

CloudNet V3

Guide coming soon

Docker

Guide coming soon

Pterodactyl

Guide coming soon

โš’ Compilation

Bundled Maven (Windows Command Line)

mvnw clean install

Bundled Maven (Shell)

./mvnw.sh clean install

Local Maven Installation

mvn clean install

๐Ÿš€ Developer setup

You need to run compilation at least once since there is a code generator configured. Once you have done that you can add io.gomint.server.Bootstrap as a runner. That runner needs custom options for Netty --add-opens java.base/java.nio=io.netty.common --add-exports java.base/jdk.internal.misc=io.netty.common --add-modules ALL-DEFAULT.

If not properly configured you will see this error when the first connection arrives:

[jRaknet events] WARN  io.netty.channel.DefaultChannelPipeline - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.lang.UnsupportedOperationException: sun.misc.Unsafe or java.nio.DirectByteBuffer.<init>(long, int) not available

๐Ÿ‘ฅ Contributors

๐Ÿ“ Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

๐Ÿ’ธ Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

jraknet's People

Contributors

cieldeville avatar dependabot[bot] avatar enricoangelon avatar genazt avatar schuwi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

jraknet's Issues

How jRakNet works with RakNet?

We're working on a game, We're going to use RakNet on the client side, if we use jRakNet on the server side, What we need to do to make it work? other Suggestions? Thanks!

Socket thread factory does not catch uncaught exceptions

If an exception was to occur in a thread generated by the ThreadFactory used from the open Socket, the exception would not be output to the SLF4J Logger.

I have written a fix for this on JungleTree's fork, but it will need backporting for GoMint.

See the fix within the socket class to see how I'm doing it.

Batched packets with sizes over the MTU

This is more of a question than an issue (though it is an issue that is in your code). This is referencing the comment In io.gomint.jraknet.Socket.java between lines 36 and 51.

We allocate buffers able to hold twice the maximum MTU size for the reasons listed below:

Somehow I noticed receiving datagrams that exceeded their respective connection's MTU by
far whenever they contained a Batch Packet. As this behaviour comes out of seemingly
nowhere yet we do need to receive these batch packets we must have room enough to actually
gather all this data even though it does not seem legit to allocate larger buffers for this
reason. But as the underlying DatagramSocket provides no way of grabbing the minimum required
buffer size for the datagram we are forced to play this dirty trick. If - at any point in the
future - this behaviour changes, please add this buffer size back to its original value:
MAXIMUM_MTU_SIZE.

Examples of too large datagrams:

  • Datagram containing BatchPacket for LoginPacket: 1507 bytes the batch packet alone (5th of March 2016)

Suggestions:

  • Make this value configurable in order to easily adjust this value whenever necessary

First; is this an issue with jRakNet? Or is it coming from MCPE? If I were to use jRakNet on a server and connect it with a client using jRakNet, would I ever have an issue of batch packets being over the MTU? I assume that the issue is on MCPE's side. I am asking this because I am investigating using jRakNet as networking for my game.

Second; I used to develop a server for MCPE. I didn't get far in writing actual server software, but I had studied MCPE's (and RakNet, by accident at the time) protocol. Things have changed since then, of course, but from my understanding RakNet determined the MTU between the client and the server during connection. Might this be the issue? MCPE would determine the max MTU and send as many packets that fit. I might have misinterpreted the documentation at the time, it's been several years.

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.