Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| daa146c8b5 | |||
| e0d42cb1d3 | |||
| 559b2e089a | |||
| a07649d14d | |||
| 6aa709cf75 | |||
| 6a452799cc |
@@ -85,7 +85,7 @@ jobs:
|
||||
echo "release_exists=${release_exists}" >> $GITHUB_ENV
|
||||
|
||||
- name: Check If Branch In Expectations
|
||||
if: github.event_name != 'pull_request'
|
||||
if: github.event_name != 'pull_request' && env.flag_release == 'true'
|
||||
run: |
|
||||
if [[ "$GITHUB_REF_NAME" == ver/* ]] || [[ "$GITHUB_REF_NAME" == exp/* ]] || [[ "$GITHUB_REF_NAME" == dev/* ]]; then
|
||||
echo "Branch is in expected prefixes"
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ weightVersion=2.0.7
|
||||
release=2
|
||||
# 0 for skip release, 1 for pre-release, 2 for release
|
||||
|
||||
luminolRef=e605804fc5600aa41b18863543873bff65e125e9
|
||||
luminolRef=4553d0974982c54663b47c996ae5383371ff2db3
|
||||
|
||||
org.gradle.configuration-cache=true
|
||||
org.gradle.caching=true
|
||||
|
||||
+8
@@ -13,4 +13,12 @@ public class LanguageConfig implements IConfigModule {
|
||||
Please use the key from https://minecraft.wiki/w/Language
|
||||
Sample of format: en_us zh_cn zh_hk zh_tw""")
|
||||
public static String lang = "en_us";
|
||||
|
||||
@ConfigInfo(name = "full_blocking_load", comments = """
|
||||
Whether to allow blocking server loading when loading localized language.
|
||||
If you want only use your localized language to shown in your terminal,
|
||||
you need to enable it.
|
||||
|
||||
WARNING: This may slow down the startup speed!""")
|
||||
public static boolean full_blocking_load = false;
|
||||
}
|
||||
@@ -64,7 +64,11 @@ public class ServerI18nUtil {
|
||||
langJsonPath = "minecraft/lang/" + LanguageConfig.lang + ".json";
|
||||
lophineLangPath = "/assets/lophine/lang/" + LanguageConfig.lang + ".json";
|
||||
logger.info("Starting load language: {}", LanguageConfig.lang);
|
||||
preloadTask.thenAcceptAsync(v -> loadI18n(LanguageConfig.lang, 2));
|
||||
if (LanguageConfig.full_blocking_load) {
|
||||
loadI18n(LanguageConfig.lang, 2);
|
||||
} else {
|
||||
preloadTask.thenAcceptAsync(v -> loadI18n(LanguageConfig.lang, 2));
|
||||
}
|
||||
}
|
||||
|
||||
public static void preInit() {
|
||||
|
||||
+4
-3
@@ -19,6 +19,7 @@ package org.leavesmc.leaves.protocol.servux;
|
||||
|
||||
import com.google.common.collect.HashBasedTable;
|
||||
import com.google.common.collect.Table;
|
||||
import com.google.common.collect.Tables;
|
||||
import com.mojang.serialization.DataResult;
|
||||
import fun.bm.lophine.config.modules.function.protocol.ServuxProtocolConfig;
|
||||
import io.netty.buffer.Unpooled;
|
||||
@@ -53,12 +54,12 @@ public class ServuxHudDataProtocol implements LeavesProtocol {
|
||||
|
||||
public static final int PROTOCOL_VERSION = 2;
|
||||
|
||||
private static final List<ServerPlayer> players = new ArrayList<>();
|
||||
private static final Set<ServerPlayer> players = ConcurrentHashMap.newKeySet();
|
||||
private static final int updateInterval = 80;
|
||||
|
||||
private static final Map<ServerPlayer, List<DataLogger.Type>> loggerPlayers = new ConcurrentHashMap<>();
|
||||
private static final Map<DataLogger.Type, DataLogger<?>> LOGGERS = new ConcurrentHashMap<>();
|
||||
private static final Table<DataLogger.Type, ServerPlayer, Tag> DATA = HashBasedTable.create();
|
||||
private static final Table<DataLogger.Type, ServerPlayer, Tag> DATA = Tables.synchronizedTable(HashBasedTable.create());
|
||||
|
||||
public static boolean refreshSpawnMetadata = false;
|
||||
|
||||
@@ -373,4 +374,4 @@ public class ServuxHudDataProtocol implements LeavesProtocol {
|
||||
this(type, new CompoundTag(), buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+13
-2
@@ -28,6 +28,7 @@ import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.level.block.Mirror;
|
||||
import net.minecraft.world.level.block.Rotation;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.leavesmc.leaves.protocol.core.LeavesProtocol;
|
||||
import org.leavesmc.leaves.protocol.core.ProtocolHandler;
|
||||
import org.leavesmc.leaves.protocol.syncmatica.exchange.*;
|
||||
@@ -40,6 +41,8 @@ import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
import static fun.bm.lophine.LophineLogger.LOGGER;
|
||||
|
||||
@LeavesProtocol.Register(namespace = "syncmatica")
|
||||
public class CommunicationManager implements LeavesProtocol {
|
||||
|
||||
@@ -178,6 +181,10 @@ public class CommunicationManager implements LeavesProtocol {
|
||||
if (id.equals(PacketType.MODIFY_REQUEST.identifier)) {
|
||||
final UUID placementId = packetBuf.readUUID();
|
||||
final ModifyExchangeServer modifier = new ModifyExchangeServer(placementId, source);
|
||||
if (modifier.getPlacement() == null) {
|
||||
LOGGER.warn("Could not find placement for modify request {}", placementId);
|
||||
return;
|
||||
}
|
||||
startExchange(modifier);
|
||||
}
|
||||
}
|
||||
@@ -351,8 +358,12 @@ public class CommunicationManager implements LeavesProtocol {
|
||||
return downloadState.getOrDefault(syncmatic.getHash(), false);
|
||||
}
|
||||
|
||||
public static void setModifier(final @NotNull ServerPlacement syncmatic, final Exchange exchange) {
|
||||
modifyState.put(syncmatic.getHash(), exchange);
|
||||
public static void setModifier(final @NotNull ServerPlacement syncmatic, final @Nullable Exchange exchange) {
|
||||
if (exchange == null) {
|
||||
modifyState.remove(syncmatic.getHash());
|
||||
} else {
|
||||
modifyState.put(syncmatic.getHash(), exchange);
|
||||
}
|
||||
}
|
||||
|
||||
public static Exchange getModifier(final @NotNull ServerPlacement syncmatic) {
|
||||
|
||||
Reference in New Issue
Block a user