Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LevelDB support & other updates #2175

Merged
merged 32 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
98acb33
Merge Nukkit PM1E
PetteriM1 Mar 26, 2024
36dd01d
Get rid of lang submodule
PetteriM1 Mar 26, 2024
003debb
.
PetteriM1 Mar 26, 2024
7d989f3
.
PetteriM1 Mar 26, 2024
0c9f264
Use normal block-state-updater
PetteriM1 Mar 26, 2024
430174c
Fix nukkit.yml being excluded
PetteriM1 Mar 26, 2024
964ce76
Encryption enabled by default + remove timings translations
PetteriM1 Mar 26, 2024
875f43b
Dependencies
PetteriM1 Mar 27, 2024
84d4487
Resolved
PetteriM1 Mar 27, 2024
9a975f1
Update Network
PetteriM1 Apr 1, 2024
2b0d7d2
These are not needed
PetteriM1 Apr 1, 2024
c05be0b
Update
PetteriM1 Apr 23, 2024
0038ffb
Only register packets which are supposed to be received
PetteriM1 May 12, 2024
9ee7817
Merge branch 'master' into leveldb
PetteriM1 Jun 11, 2024
e2d13d7
Update
PetteriM1 Jun 13, 2024
7e6d8b0
Merge
PetteriM1 Jun 19, 2024
6306927
Update leveldb palette to 1.20.70
PetteriM1 Jun 28, 2024
5b7ce45
Merge
PetteriM1 Jul 9, 2024
2e4f3f8
Merge branch 'master' into leveldb
PetteriM1 Jul 9, 2024
45b2907
Merge
PetteriM1 Jul 16, 2024
7d73d81
Merge
PetteriM1 Aug 13, 2024
8b25bb0
Merge (1.21.30)
PetteriM1 Sep 17, 2024
0519924
Merge
PetteriM1 Sep 23, 2024
8773482
Remove custom block API from stable branch
PetteriM1 Oct 3, 2024
da0f169
Merge
PetteriM1 Oct 3, 2024
89be986
Missed these
PetteriM1 Oct 3, 2024
c6302d7
These too and bump API to 1.1.0
PetteriM1 Oct 3, 2024
258f38c
Fix packet compression related bugs
PetteriM1 Oct 3, 2024
26f1282
Cleanup
PetteriM1 Oct 4, 2024
4ba1a10
Refactor riptide
PetteriM1 Oct 6, 2024
7376835
Merge (1.21.40)
PetteriM1 Oct 20, 2024
f3d4e87
Merge
PetteriM1 Nov 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
107 changes: 0 additions & 107 deletions .github/CONTRIBUTING.md

This file was deleted.

26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,24 @@
Introduction
-------------

Nukkit is nuclear-powered server software for Minecraft: Pocket Edition.
Nukkit is nuclear-powered server software for Minecraft Bedrock Edition.
It has a few key advantages over other server software:

* Written in Java, Nukkit is faster and more stable.
* Having a friendly structure, it's easy to contribute to Nukkit's development and rewrite plugins from other platforms into Nukkit plugins.

Nukkit is **under improvement** yet, we welcome contributions.
Nukkit is under improvement yet, we welcome contributions.

Links
--------------------

* __[News](https://nukkitx.com)__
* __[Forums](https://nukkitx.com/forums)__
* __[Forums](https://cloudburstmc.org/forums/)__
* __[Discord](https://discord.gg/5PzMkyK)__
* __[Download](https://ci.nukkitx.com/job/NukkitX/job/Nukkit/job/master)__
* __[Plugins](https://nukkitx.com/resources/categories/nukkit-plugins.1)__
* __[Wiki](https://nukkitx.com/wiki/nukkit)__
* __[Wiki](https://cloudburstmc.org/wiki/nukkit)__
* __[Download Nukkit](https://ci.opencollab.dev/job/NukkitX/job/Nukkit/job/master/)__
* __[Download Plugins](https://cloudburstmc.org/resources/categories/nukkit-plugins.1/)__

Contributing
-------------
Please read the [CONTRIBUTING](.github/CONTRIBUTING.md) guide before submitting any issue. Issues with insufficient information or in the wrong format will be closed and will not be reviewed.

Build JAR file
Compile Nukkit
-------------
- `git clone https://github.com/CloudburstMC/Nukkit`
- `cd Nukkit`
Expand All @@ -38,6 +33,8 @@ Build JAR file

The compiled JAR can be found in the `target/` directory.

Note: You don't need to compile Nukkit yourself if you don't intend to modify the code. You can find precompiled JARs on Jenkins.

Running
-------------
Simply run `java -jar nukkit-1.0-SNAPSHOT.jar`.
Expand Down Expand Up @@ -114,3 +111,8 @@ Testing after deployment:
Completely remove the chart:

`helm uninstall nukkit`

Pterodactyl Panel
-------------

[Download the official egg](https://raw.githubusercontent.com/parkervcp/eggs/master/game_eggs/minecraft/bedrock/nukkit/egg-nukkit.json)
22 changes: 21 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,47 @@ plugins {

group = "cn.nukkit"
version = "1.0-SNAPSHOT"
description = "Nuclear powered server software for Minecraft: Bedrock Edition"
description = "Nuclear powered server software for Minecraft Bedrock Edition"

repositories {
mavenLocal()
mavenCentral()
maven("https://repo.opencollab.dev/maven-releases")
maven("https://repo.opencollab.dev/maven-snapshots")
maven("https://repo.mznt.eu/snapshots") //TODO
PetteriM1 marked this conversation as resolved.
Show resolved Hide resolved
}

dependencies {
api(libs.network)
api(libs.natives)
api(libs.fastutil)
api(libs.fastutil1)
PetteriM1 marked this conversation as resolved.
Show resolved Hide resolved
api(libs.fastutil2)
api(libs.fastutil3)
api(libs.guava)
api(libs.gson)
api(libs.snakeyaml)
api(libs.leveldb)
api(libs.leveldbjni) {
exclude(group = "com.google.guava", module = "guava")
exclude(group = "io.netty", module = "netty-buffer")
exclude(group = "org.iq80.snappy", module = "snappy")
exclude(group = "org.iq80.leveldb", module = "leveldb")
}
api(libs.snappy)
api(libs.expiringmap)
api(libs.jwt)
api(libs.bundles.terminal)
api(libs.bundles.log4j)
api(libs.jopt.simple)
api(libs.blockstateupdater)
api(libs.lmbda) {
exclude(group = "org.checkerframework", module = "checker-qual")
}
api(libs.noise) {
exclude(group = "net.daporkchop.lib", module = "common")
exclude(group = "net.daporkchop.lib", module = "math")
}
compileOnly(libs.lombok)
annotationProcessor(libs.lombok)

Expand Down
9 changes: 9 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,21 @@ jline = "3.22.0"
network = { group = "com.nukkitx.network", name = "raknet", version = "1.6.28-SNAPSHOT" }
natives = { group = "com.nukkitx", name = "natives", version = "1.0.3" }
fastutil = { group = "com.nukkitx", name = "fastutil-lite", version = "8.1.1" }
fastutil1 = { group = "com.nukkitx.fastutil", name = "fastutil-int-short-maps", version = "8.5.3" }
PetteriM1 marked this conversation as resolved.
Show resolved Hide resolved
fastutil2 = { group = "com.nukkitx.fastutil", name = "fastutil-object-int-maps", version = "8.5.3" }
fastutil3 = { group = "com.nukkitx.fastutil", name = "fastutil-object-object-maps", version = "8.5.3" }
guava = { group = "com.google.guava", name = "guava", version = "30.1.1-jre" }
gson = { group = "com.google.code.gson", name = "gson", version = "2.10.1" }
snakeyaml = { group = "org.yaml", name = "snakeyaml", version = "1.33" }
leveldb = { group = "org.iq80.leveldb", name = "leveldb", version = "0.11-SNAPSHOT" }
leveldbjni = { group = "net.daporkchop", name = "leveldb-mcpe-jni", version = "0.0.10-SNAPSHOT" }
snappy = { group = "org.xerial.snappy", name = "snappy-java", version = "1.1.10.5" }
expiringmap = { group = "net.jodah", name = "expiringmap", version = "0.5.11" }
PetteriM1 marked this conversation as resolved.
Show resolved Hide resolved
jwt = { group = "com.nimbusds", name = "nimbus-jose-jwt", version = "9.13" }
jopt-simple = { group = "net.sf.jopt-simple", name = "jopt-simple", version = "5.0.4" }
blockstateupdater = { group = "org.cloudburstmc", name = "block-state-updater", version = "1.20.10-ONBT-SNAPSHOT" }
lmbda = { group = "org.lanternpowered", name = "lmbda", version = "2.0.0" }
noise = { group = "net.daporkchop.lib", name = "noise", version = "0.5.6-SNAPSHOT" }
lombok = { group = "org.projectlombok", name = "lombok", version = "1.18.26" }

# Logging dependencies
Expand Down
47 changes: 39 additions & 8 deletions src/main/java/cn/nukkit/Achievement.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,64 @@
import java.util.HashMap;

/**
* Created by CreeperFace on 9. 11. 2016.
* Achievement list and functions
*
* @author CreeperFace
*/
public class Achievement {

/**
* All known achievements.
*
* Based on <a href="https://minecraft.fandom.com/wiki/Achievement/Java_Edition#List_of_achievements">...</a>
*/
public static final HashMap<String, Achievement> achievements = new HashMap<String, Achievement>() {
{
put("mineWood", new Achievement("Getting Wood"));
put("openInventory", new Achievement("Taking Inventory"));
put("mineWood", new Achievement("Getting Wood", "openInventory"));
put("buildWorkBench", new Achievement("Benchmarking", "mineWood"));
put("buildPickaxe", new Achievement("Time to Mine!", "buildWorkBench"));
put("buildFurnace", new Achievement("Hot Topic", "buildPickaxe"));
put("acquireIron", new Achievement("Acquire hardware", "buildFurnace"));
put("acquireIron", new Achievement("Acquire Hardware", "buildFurnace"));
put("buildHoe", new Achievement("Time to Farm!", "buildWorkBench"));
put("makeBread", new Achievement("Bake Bread", "buildHoe"));
put("bakeCake", new Achievement("The Lie", "buildHoe"));
put("buildBetterPickaxe", new Achievement("Getting an Upgrade", "buildPickaxe"));
put("cookFish", new Achievement("Delicious Fish", "buildFurnace"));
put("onARail", new Achievement("On A Rail", "acquireIron"));
put("buildSword", new Achievement("Time to Strike!", "buildWorkBench"));
put("killEnemy", new Achievement("Monster Hunter", "buildSword"));
put("killCow", new Achievement("Cow Tipper", "buildSword"));
put("flyPig", new Achievement("When Pigs Fly", "killCow"));
put("snipeSkeleton", new Achievement("Sniper Duel", "killEnemy"));
put("diamonds", new Achievement("DIAMONDS!", "acquireIron"));
put("portal", new Achievement("We Need to Go Deeper", "diamonds"));
put("ghast", new Achievement("Return to Sender", "portal"));
put("blazeRod", new Achievement("Into Fire", "portal"));
put("potion", new Achievement("Local Brewery", "blazeRod"));
put("theEnd", new Achievement("The End?", "blazeRod"));
put("theEnd2", new Achievement("The End.", "theEnd"));
put("enchantments", new Achievement("Enchanter", "diamonds"));
put("overkill", new Achievement("Overkill", "enchantments"));
put("bookcase", new Achievement("Librarian", "enchantments"));
put("exploreAllBiomes", new Achievement("Adventuring Time", "theEnd")); //TODO
put("spawnWither", new Achievement("The Beginning?", "theEnd"));
put("killWither", new Achievement("The Beginning.", "spawnWither"));
put("fullBeacon", new Achievement("Beaconator", "killWither"));
put("breedCow", new Achievement("Repopulation", "killCow"));
put("diamondsToYou", new Achievement("Diamonds to you!", "diamonds"));
put("overpowered", new Achievement("Overpowered", "buildBetterPickaxe"));
}
};

public static boolean broadcast(Player player, String achievementId) {
if (!achievements.containsKey(achievementId)) {
return false;
}
String translation = Server.getInstance().getLanguage().translateString("chat.type.achievement", player.getDisplayName(), TextFormat.GREEN + achievements.get(achievementId).getMessage() + TextFormat.RESET);

if (Server.getInstance().getPropertyBoolean("announce-player-achievements", true)) {
String translation = TextFormat.WHITE + Server.getInstance().getLanguage().translateString("chat.type.achievement", player.getDisplayName(), TextFormat.GREEN + "[" + achievements.get(achievementId).message + "]", null);

if (Server.getInstance().announceAchievements) {
Server.getInstance().broadcastMessage(translation);
} else {
player.sendMessage(translation);
Expand Down Expand Up @@ -61,12 +92,12 @@ public String getMessage() {
}

public void broadcast(Player player) {
String translation = Server.getInstance().getLanguage().translateString("chat.type.achievement", player.getDisplayName(), TextFormat.GREEN + this.getMessage(), null);
String translation = TextFormat.WHITE + Server.getInstance().getLanguage().translateString("chat.type.achievement", player.getDisplayName(), TextFormat.GREEN + "[" + this.message + "]", null);

if (Server.getInstance().getPropertyBoolean("announce-player-achievements", true)) {
if (Server.getInstance().announceAchievements) {
Server.getInstance().broadcastMessage(translation);
} else {
player.sendMessage(translation);
}
}
}
}
Loading
Loading