Skip to content

Commit

Permalink
Get rid of lang submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
PetteriM1 committed Mar 26, 2024
1 parent 98acb33 commit 36dd01d
Show file tree
Hide file tree
Showing 24 changed files with 6,472 additions and 12 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "src/main/resources/lang"]
path = src/main/resources/lang
url = https://github.com/NukkitX/Languages.git
2 changes: 0 additions & 2 deletions nukkit.yml.default
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
settings:
# Multi-language setting
# Available: eng, chs, cht, jpn, rus, spa, pol, bra, kor, ukr, deu
language: "eng"
2 changes: 1 addition & 1 deletion src/main/java/cn/nukkit/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ protected boolean orderChunks() {
int centerX = this.getChunkX();
int centerZ = this.getChunkZ();

int radius = spawned ? this.chunkRadius : server.c_s_spawnThreshold;
int radius = spawned ? this.chunkRadius : server.spawnThresholdRadius;
int radiusSqr = radius * radius;

long index;
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/cn/nukkit/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public class Server {
private int maxPlayers; // setMaxPlayers
private boolean autoSave = true; // setAutoSave
private int difficulty; // setDifficulty
int c_s_spawnThreshold;
int spawnThresholdRadius;
private String ip;
private int port;
private final UUID serverID;
Expand Down Expand Up @@ -2810,7 +2810,7 @@ private void loadSettings() {
/* nukkit.yml */

this.forceLanguage = this.getConfig("settings.force-language", false);
this.queryPlugins = this.getConfig("settings.query-plugins", false);
this.queryPlugins = this.getConfig("settings.query-plugins", true);

this.networkCompressionThreshold = this.getConfig("network.batch-threshold", 256);
this.networkCompressionLevel = Math.max(Math.min(this.getConfig("network.compression-level", 4), 9), 0);
Expand All @@ -2834,7 +2834,7 @@ private void loadSettings() {
this.spawnThreshold = this.getConfig("spawn-threshold", 56);
this.cacheChunks = this.getConfig("cache-chunks", false);

this.c_s_spawnThreshold = (int) Math.ceil(Math.sqrt(this.spawnThreshold));
this.spawnThresholdRadius = (int) Math.ceil(Math.sqrt(this.spawnThreshold));

/* server.properties */

Expand All @@ -2845,7 +2845,6 @@ private void loadSettings() {
this.achievementsEnabled = this.getPropertyBoolean("achievements", true);
this.pvpEnabled = this.getPropertyBoolean("pvp", true);
this.announceAchievements = this.getPropertyBoolean("announce-player-achievements", true);
this.queryPlugins = this.getPropertyBoolean("query-plugins", false);
this.allowFlight = this.getPropertyBoolean("allow-flight", false);
this.isHardcore = this.getPropertyBoolean("hardcore", false);
this.forceResources = this.getPropertyBoolean("force-resources", false);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/cn/nukkit/level/Level.java
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ public Level(Server server, String name, String path, Class<? extends LevelProvi
this.chunkGenerationQueueSize = this.server.getConfig("chunk-generation.queue-size", 8);
this.chunkPopulationQueueSize = this.server.getConfig("chunk-generation.population-queue-size", 8);
this.chunkTickList.clear();
this.clearChunksOnTick = this.server.getConfig("clear-chunk-tick-list", true);
this.clearChunksOnTick = this.server.getConfig("chunk-ticking.clear-tick-list", false);
this.temporalVector = new Vector3(0, 0, 0);

this.skyLightSubtracted = this.calculateSkylightSubtracted(1);
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/lang
Submodule lang deleted from bd94ef
344 changes: 344 additions & 0 deletions src/main/resources/lang/ara/lang.ini

Large diffs are not rendered by default.

383 changes: 383 additions & 0 deletions src/main/resources/lang/bra/lang.ini

Large diffs are not rendered by default.

381 changes: 381 additions & 0 deletions src/main/resources/lang/chs/lang.ini

Large diffs are not rendered by default.

381 changes: 381 additions & 0 deletions src/main/resources/lang/cht/lang.ini

Large diffs are not rendered by default.

381 changes: 381 additions & 0 deletions src/main/resources/lang/cze/lang.ini

Large diffs are not rendered by default.

381 changes: 381 additions & 0 deletions src/main/resources/lang/deu/lang.ini

Large diffs are not rendered by default.

381 changes: 381 additions & 0 deletions src/main/resources/lang/eng/lang.ini

Large diffs are not rendered by default.

381 changes: 381 additions & 0 deletions src/main/resources/lang/fin/lang.ini

Large diffs are not rendered by default.

381 changes: 381 additions & 0 deletions src/main/resources/lang/idn/lang.ini

Large diffs are not rendered by default.

381 changes: 381 additions & 0 deletions src/main/resources/lang/jpn/lang.ini

Large diffs are not rendered by default.

381 changes: 381 additions & 0 deletions src/main/resources/lang/kor/lang.ini

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions src/main/resources/lang/language.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
eng => English
chs => 中文(简体)
cht => 中文(繁體)
jpn => 日本語
rus => Pyccĸий
spa => Español
pol => Polish
bra => Português-Brasil
kor => 한국어
ukr => Українська
deu => Deutsch
ltu => Lietuviškai
idn => Indonesia
cze => Czech
tur => Turkish
fin => Suomi
ara => العربيه
382 changes: 382 additions & 0 deletions src/main/resources/lang/ltu/lang.ini

Large diffs are not rendered by default.

Loading

0 comments on commit 36dd01d

Please sign in to comment.