Code Monkey home page Code Monkey logo

trident's Introduction

TridentSDK Build Status Coverage Status

The TridentSDK project. The API for the new generation of multithreaded, high-performance, cleanroom Minecraft servers.

Latest Release

Not released

Getting a JAR

One would need a TridentSDK JAR to debug plugins, use the plugin API, or otherwise any application that isn't evil.

Method one: Build it yourself

If you have decided that our forms of distribution are questionable, or you would like to modify something before getting a JAR file, you want to build from the source directly.

Prerequisites

  1. A computer
  2. Git
  3. Maven

Directions

Type in the following into the command line:

git clone -b [master|bleeding-edge] https://github.com/TridentSDK/TridentSDK.git
cd TridentSDK
mvn clean install

One would use master to ensure compatibility with the latest build of Trident. Otherwise, for the most up-to-date (and potentially breaking) build of TridentSDK, one would use bleeding-edge. If you are building the JAR yourself, it is your responsibility to know which one is right for you.

The built JAR will ./TridentSDK/target/tridentsdk-*.jar

Method two: Download from Sonatype Nexus

For a precompiled solution, one which has passed the tests we have wrote, as well as if you are too lazy to download 2 files and install the Method one prerequeisites, you can download one yourself.

Prerequisites

  1. A mouse
  2. A web browser
  3. A computer

Directions

  1. Click
  2. Click "Keep"

Method three: Get one from us

If we've released a JAR for you to use, it usually comes with a nice read. So if you like nice reads or the look of our official website, you can go rummage around the releases forum and look for a download link.

Prerequisites

  1. A mouse
  2. A web browser
  3. A computer

Directions

Fortunately, because there are no releases yet, you don't need to do that quite yet.

Tools

None yet

API

TridentSDK provides an extensive API which allows both high and low level control over the Trident server.

A jar placed in the plugins folder is a valid plugin, if it has a class that does not have the same descriptor as an existing Trident or TridentSDK class. It must also have one and only one class whose superclass is net.tridentsdk.plugin.Plugin, annotated with net.tridentsdk.plugin.annotation.PluginDesc with a non-empty name field.

Example:

package com.example;

import net.tridentsdk.plugin.Plugin;

@PluginDesc(name = "Plugin")
public class ExamplePlugin extends Plugin {
}

This is the minimal requirements to have a plugin loaded by the server.

For more information on how to use the API, visit the Wiki page.

trident's People

Contributors

garris0n- avatar hfoxy avatar nickrobson avatar pizzacrust avatar saadardati avatar stuntguy3000 avatar tigerreborn avatar ultimatebudgie avatar vilsol avatar xize avatar

Stargazers

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

Watchers

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

trident's Issues

Config formatting

Configs currently cannot hold comments or integer values (they can only be floating point or double for whatever reason).

PlayInTeleportConfirm not received sometimes

The Minecraft client seems to not respond to PlayOutPosLook with a teleportation confirm. We use this to resume login, and that doesn't happen sometimes.

Usually occurs when starting the server after a while without using it. Can be fixed by restarting the server, but whether or not it happens again is random.

I suspect an error is occurring, but since netty swallows a lot of exceptions, I really don't have any clue. On a side note, the client doesn't seem to be disconnected when the a matching teleportation confirm packet is not sent within 30 seconds, so more testing is needed here.

TridentWorld.getBlockAt function small issue

if (location.getWorld().getName().equals(this.getName()))
throw new IllegalArgumentException("Provided location does not have the same world!");

This will run if the worlds are the same, please change to:

if (!location.getWorld().getName().equals(this.getName()))
throw new IllegalArgumentException("Provided location does not have the same world!");

Minecraft's title resetting is mentally retarded

See TridentPlayer#resetTitle()

Titles cannot be fully reset, the subtitle is a remnant artifact even after using the PlayOutTitle#Reset packet. Therefore, 3 packets are sent instead, each to set all the fields to empty/default values.

Discuss performance options

Hanging on startup

I tried to build and start a server but it's not working, nothing is displayed and the processes never ends until we kill it.

image

TODO List

This is the todo list of what still needs to be done for the revamp of TridentSDK, once you start working on one of them, please create a new issue and reference it here.

  • World Interactions
    • Player Interactions
    • Block Interactions
  • HUD
  • Plugin Engine
    • Plugin Loading
    • Events
    • Commands
  • Inventory Menu
    • Chests, Furnaces, etc
  • Physics
    • Redstone
    • Gravity
    • Collisions
  • Entities
    • Tile Entities
    • Mobs
    • Items

Rejoining server fails to send appropriate packets

Upon joining, leaving, and then rejoining the server, the server does not send an extra AddPlayer packet for the tablist. This results in the player losing his skin and not having an updated tablist.

Implement Chunk unloading

We need a way to have chunks be unloaded when they are not used by any entity or player. Upon disconnect, the chunks loaded by a player must be released.

We can do this a multitude of ways, some of which are:

  • Manual release
  • Weak references
  • More?

IRC channel

Not really an issue, but I didn't know where I had to ask this.

Does this project has an IRC channel where developers can discuss, and Server owners ask questions/suggest things. If not, I can create one if you guys want.

World Generation

This is going to be tricky, we can examine the MC server source code and write something extremely similar so that a world would generate the same given the same seed on our server and mojangs, or examine their source to produce a slightly similar implementation that would produce almost indistinguishable worlds. The other option is to create our own world generator that looks only vaguely similar to the official maps and allow users to add their own Maps if they want the real worlds.

Implement ChunkSection

Lots and lots of work needed here.

  • Check threading performance. Contention is a prime slowdown with the use of atomic variables.
  • Check the failures that occur with typical generator
  • Implement palette index increments for large block varieties
  • Check overworld skylight
  • Correctly implement atomic byte arrays

Some packets throw IndexOutOfBounds

Jul 01, 2017 9:03:17 PM io.netty.channel.DefaultChannelPipeline onUnhandledInboundException
WARNING: 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.
io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(222) + length(8) exceeds writerIndex(224): PooledUnsafeDirectByteBuf(ridx: 222, widx: 224, cap: 224)
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:442)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
	at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:1018)
	at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:394)
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:299)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
	at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IndexOutOfBoundsException: readerIndex(222) + length(8) exceeds writerIndex(224): PooledUnsafeDirectByteBuf(ridx: 222, widx: 224, cap: 224)
	at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1389)
	at io.netty.buffer.AbstractByteBuf.readLong(AbstractByteBuf.java:792)
	at io.netty.buffer.AbstractByteBuf.readDouble(AbstractByteBuf.java:818)
	at net.tridentsdk.server.packet.play.PlayInPosLook.read(PlayInPosLook.java:44)
	at net.tridentsdk.server.net.InDecoder.decode(InDecoder.java:102)
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411)
	... 14 more

Implimentations

Bukkit plugin support
Lite and pro version
Boss Bar Native
World Edit native
Essentials native

Plugin channels

Implement and create an API for handling plugin channels that may be created or used by client plugins.

No SDK issue as of yet.

Also need to develop the plugin/command/event API implementations.

Block Updates

Make block updates happen in a way similar to MC server, i.e. one block being updated gives all the blocks around it a chance to execute updates, and it propogates like this. Possibly our own implementation that does block updates randomly so that sand will fall etc. Configurable.

Link error messages to web help page

Create a lookup class that would convert an ID to a message, and provide a link in the error message to the website explaining the error and some usual scenarios.

Add block placement

Add the ability for players to place blocks and have them stored in the chunk.

Server Not Running/Starting

Can the server run yet, or are you just doing basic framework? When I compile with maven, it doesn't run. Thanks

Check thread-safety of newly implemented classes

Please check or at least make a decent attempt at ensuring the classes that are used in a multithreaded context have the proper initialization safety and access safety for accessors that are given to plugins for modification.

Inclusion of custom Pathfinders

In the future, I assume you will be using some sort of Pathfinding and/or Navigation system. I suggest that you implement a way to either implement or extend a generic Pathfinder class that you can use to create your own Pathfinder logic, then allow the use of an API to give mobs said Pathfinders. Some mock psuedocode is something along the lines of having the Entity contain a Pathfinding/Navigation manager, lets call this a 'Navigator', then calling something like Entity#getNavigatior(), which would then lead to something like Navigator#addPathfinder(), passing in the Pathfinder.
Just a suggestion ;)

Implement more packets

As we continue development, this is just a landmark issue for implementing more of the packets in the protocol.

Proper heightmaps

The heightmap needs to be updated after setting blocks in TridentChunk. Perhaps this number should be calculated rather than cached and updated every block update.

Add sprinting

Currently players cannot sprint or crouch properly.

Entity update distance

Perhaps packets and housekeeping for entities should be kept within a specified range in order to prevent mobs that cannot be seen or that are irrelevant from taking up bandwidth and tick cycles.

Netty swallows errors

Netty seems to have a thing with hiding errors thrown in packet handling classes such as NullPointerExceptions and the like. Unfortunately errors like these are difficult to trace and cause a lot of dumb behavior that should be spotted.

Not sure if this is an issue with exceptionCaught not being implemented in the initialized channel handlers?

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.