Nukkit 2.0 Alpha

Nukkit 2.0 is now in alpha with support for blocks above ID 255 (old chunk format limitation), LevelDB support, faster chunk loading and a variety of other features that listed are below. This build is NOT intended to be used in production environments as there are still major bugs that could potentially corrupt your world.
Existing anvil format worlds will be automatically converted to the LevelDB format upon loading. This may take a long time however we are still optimising the converter code.

Developers
The API has undergone some major changes in areas which will 100% break your plugins and due to this version still being in alpha, we do not recommend updating them yet as there may still be more changes to come.





New Features

Custom Blocks, Items & Entities

These will require a resource pack to be loaded with the definitions and textures for the specified object. A custom class can be registered with the corresponding Registry to give your block custom features such as drops, hardness and light level. You will need to have load: STARTUP set in your plugin.yml so that the blocks, items and entities can be registered before any worlds are loaded. As of writing this post, custom entities have not been tested so they may not work. If you do come across any issues, please make a bug report on the GitHub issue tracker with your resource pack included.


Async Chunk I/O

Chunk loading was previously run on the main thread which caused unnecessary lag on the due to compression and decompression of the chunks being loaded from the disk. Now chunk loading has been moved into it's own thread pool with generation to give some extra performance to the main thread.


LevelDB

LevelDB support has been updated to enable loading of vanilla worlds into Nukkit and vice versa although 1.13+ worlds cannot currently be loaded into Nukkit due to new block state changes in the format. This will be implemented at a later date. With the move to LevelDB, we are now able to support blocks above ID 255 which was a limitation of the old Anvil format. Loading times should also be improved as the format saved to disk is native to Minecraft Bedrock therefore requiring minimal decoding before being sent to the player.


Other Major Changes

Network

The network has been overhauled to use Netty wherever possible to reduce the overhead from converting between Java byte arrays and native Netty buffers. All packets sent using the indirect method will now be batched together in a single packet every tick to reduce network overhead (vanilla does this by default)


Entities

Every entity now have it's own interface to allow extra customisation so you do not have to extend the existing BaseEntity class and can write one from scratch. These entities can be registered in the EntityRegistry class which allows overriding of the default entity classes using a priority system. Overridden and plugins specific entities can still be created by using the function that provides a plugin object.
Entity metadata has also been completely rewritten so that protocol updates do not require your plugins to be recompiled if they use any metadata constants.
 
Please consider writing a shim for PluginBase.getLogger() (PluginLogger) - It's likely the one method that every single plugin calls, making every plugin incompatible with 2.0, without warning as it was never even deprecated.
-
The alpha version also crashes because this method doesn't exist during plugin loading.
Code:
2020-01-29 09:57:14.682 [main] FATAL - Nukkit crashed
java.lang.BootstrapMethodError: java.lang.NoSuchMethodError: cn.nukkit.plugin.PluginBase.getLogger()Lcn/nukkit/plugin/PluginLogger;
    at com.djrapitops.plugin.NukkitPlugin.<init>(NukkitPlugin.java:80) ~[?:?]
    at com.djrapitops.plugin.NukkitPlugin.<init>(NukkitPlugin.java:68) ~[?:?]
    at com.djrapitops.plan.PlanNukkit.<init>(PlanNukkit.java:37) ~[?:?]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_221]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_221]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_221]
    at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_221]
    at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_221]
    at cn.nukkit.plugin.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:59) ~[Nukkit.jar:?]
    at cn.nukkit.plugin.PluginManager.loadPlugin(PluginManager.java:97) ~[Nukkit.jar:?]
    at cn.nukkit.plugin.PluginManager.loadPlugins(PluginManager.java:269) ~[Nukkit.jar:?]
    at cn.nukkit.plugin.PluginManager.loadPlugins(PluginManager.java:134) ~[Nukkit.jar:?]
    at cn.nukkit.plugin.PluginManager.loadPlugins(PluginManager.java:126) ~[Nukkit.jar:?]
    at cn.nukkit.plugin.PluginManager.loadPlugins(PluginManager.java:122) ~[Nukkit.jar:?]
    at cn.nukkit.Server.boot(Server.java:525) ~[Nukkit.jar:?]
    at cn.nukkit.Nukkit.main(Nukkit.java:138) [Nukkit.jar:?]
Caused by: java.lang.NoSuchMethodError: cn.nukkit.plugin.PluginBase.getLogger()Lcn/nukkit/plugin/PluginLogger;
    at java.lang.invoke.MethodHandleNatives.resolve(Native Method) ~[?:1.8.0_221]
    at java.lang.invoke.MemberName$Factory.resolve(Unknown Source) ~[?:1.8.0_221]
    at java.lang.invoke.MemberName$Factory.resolveOrFail(Unknown Source) ~[?:1.8.0_221]
    at java.lang.invoke.MethodHandles$Lookup.resolveOrFail(Unknown Source) ~[?:1.8.0_221]
    at java.lang.invoke.MethodHandles$Lookup.linkMethodHandleConstant(Unknown Source) ~[?:1.8.0_221]
    at java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(Unknown Source) ~[?:1.8.0_221]
    ... 16 more
2020-01-29 09:57:14.691 [main] INFO  - Stopping other threads
 
Please consider writing a shim for PluginBase.getLogger() (PluginLogger) - It's likely the one method that every single plugin calls, making every plugin incompatible with 2.0, without warning as it was never even deprecated.
-
The alpha version also crashes because this method doesn't exist during plugin loading.
It's not supposed to be compatible with old plugins. That's why we've changed the major version number.
 
Well then! I was coming here to ask about the current development status of Nukkit, and there's my answer front and center. More blocks means more building options, even if not all features are in. Exciting stuff, I'm looking forward to future updates on this front!
 
It looks good, but it's a bit disappointing because therfor sstill no mob AI and it is still not suitable for survival servers.
From what I've heard, this will be coming later. For the time being, you can use MobPlugin, which achieves this.
 
I get this error when I start my server



17:13:56 [FATAL] Nukkit crashed
java.lang.IllegalStateException: No worlds configured! Add a world to nukkit.yml and try again!
at cn.nukkit.Server.loadLevels(Server.java:1951) ~[Nukkit.jar:?]
at cn.nukkit.Server.boot(Server.java:554) ~[Nukkit.jar:?]
at cn.nukkit.Nukkit.main(Nukkit.java:144) [Nukkit.jar:?]
 
Hello xFalling,
I have run into the same problem. Even if I comment the example world configuration in the yaml file it still didn't work.
I have fixed the code to create a default world if not in the yaml file. This will at least get the server to boot. I have noticed other issues but I have to fry that up another time.

Note: this only currently exists on my github branch.
I will eventually create a pull request to try top get it into the master branch. Perhaps when I get home I can try to get you the compiled version.
 
Top