3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-10-03 08:41:05 +02:00

Set mapping load thread name, config comment change

Closes #1922
Dieser Commit ist enthalten in:
KennyTV 2020-07-21 09:10:16 +02:00
Ursprung 647230a996
Commit 601a6eb808
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
5 geänderte Dateien mit 30 neuen und 27 gelöschten Zeilen

Datei anzeigen

@ -367,7 +367,7 @@ public abstract class AbstractViaConfig extends Config implements ViaVersionConf
}
@Override
public boolean isIgnoreLong1_16ChannelMessages() {
public boolean isIgnoreLong1_16ChannelNames() {
return ignoreLongChannelNames;
}
}

Datei anzeigen

@ -169,7 +169,7 @@ public interface ViaVersionConfig {
/**
* Replace extended pistons on 1.10 chunk loading.
*
* @return True if to replace them
* @return true if to replace them
*/
boolean isReplacePistons();
@ -183,28 +183,28 @@ public interface ViaVersionConfig {
/**
* Force json transform
*
* @return True if enabled
* @return true if enabled
*/
boolean isForceJsonTransform();
/**
* Should we fix nbt array's in json chat messages for 1.12 clients
*
* @return True if enabled
* @return true if enabled
*/
boolean is1_12NBTArrayFix();
/**
* Should we make team colours based on the last colour in team prefix
*
* @return True if enabled
* @return true if enabled
*/
boolean is1_13TeamColourFix();
/**
* Should we fix shift quick move action for 1.12 clients
*
* @return True if enabled
* @return true if enabled
*/
boolean is1_12QuickMoveActionFix();
@ -233,28 +233,28 @@ public interface ViaVersionConfig {
/**
* Should we hide errors that occur when trying to convert block and item data over versions?
*
* @return True if enabled
* @return true if enabled
*/
boolean isSuppressConversionWarnings();
/**
* Should we disable the 1.13 auto-complete feature to stop spam kicks? (for any server lower than 1.13)
*
* @return True if enabled
* @return true if enabled
*/
boolean isDisable1_13AutoComplete();
/**
* Tries to minimize cooldown animation.
*
* @return True if enabled
* @return true if enabled
*/
boolean isMinimizeCooldown();
/**
* Enable the serverside blockconnections for 1.13+ clients
*
* @return True if enabled
* @return true if enabled
*/
boolean isServersideBlockConnections();
@ -268,7 +268,7 @@ public interface ViaVersionConfig {
/**
* When activated, only the most important blocks are saved in the BlockStorage.
*
* @return True if enabled
* @return true if enabled
*/
boolean isReduceBlockStorageMemory();
@ -276,28 +276,28 @@ public interface ViaVersionConfig {
* When activated with serverside-blockconnections, flower parts with blocks above will be sent as stems.
* Useful for lobbyservers where users can't build and those stems are used decoratively.
*
* @return True if enabled
* @return true if enabled
*/
boolean isStemWhenBlockAbove();
/**
* Vines not connected to any blocks will be mapped to air for 1.13+ clients to prevent them from climbing up.
*
* @return True if enabled
* @return true if enabled
*/
boolean isVineClimbFix();
/**
* When activated, the 1-layer snow will be sent as 2-layer snow to 1.13+ clients to have collision.
*
* @return True if enabled
* @return true if enabled
*/
boolean isSnowCollisionFix();
/**
* When activated, infested blocks will be mapped to their normal stone variants for 1.13+ clients.
*
* @return True if enabled
* @return true if enabled
*/
boolean isInfestedBlocksFix();
@ -311,35 +311,35 @@ public interface ViaVersionConfig {
/**
* When activated, edited books with more than 50 pages will be shortened to 50.
*
* @return True if enabled
* @return true if enabled
*/
boolean isTruncate1_14Books();
/**
* Handles left handed info by using unused bit 7 on Client Settings packet
*
* @return True if enabled
* @return true if enabled
*/
boolean isLeftHandedHandling();
/**
* Fixes velocity bugs due to different hitbox for 1.9-1.13 clients on 1.8 servers.
*
* @return True if enabled
* @return true if enabled
*/
boolean is1_9HitboxFix();
/**
* Fixes velocity bugs due to different hitbox for 1.14+ clients on sub 1.14 servers.
*
* @return True if enabled
* @return true if enabled
*/
boolean is1_14HitboxFix();
/**
* Fixes non full blocks having 0 light for 1.14+ clients on sub 1.14 servers.
*
* @return True if enabled
* @return true if enabled
*/
boolean isNonFullBlockLightFix();
@ -348,14 +348,14 @@ public interface ViaVersionConfig {
/**
* Should 1.15 clients respawn instantly / without showing the death screen.
*
* @return True if enabled
* @return true if enabled
*/
boolean is1_15InstantRespawn();
/**
* Ignores incoming plugin channel messages of 1.16 clients with channel names longer than 32 charatcers.
* Ignores incoming plugin channel messages of 1.16+ clients with channel names longer than 32 charatcers.
*
* @return True if enabled
* @return true if enabled
*/
boolean isIgnoreLong1_16ChannelMessages();
boolean isIgnoreLong1_16ChannelNames();
}

Datei anzeigen

@ -2,6 +2,7 @@ package us.myles.ViaVersion.api.protocol;
import com.google.common.collect.Lists;
import com.google.common.collect.Range;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import org.jetbrains.annotations.Nullable;
@ -50,6 +51,7 @@ import java.util.TreeSet;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
@ -70,7 +72,8 @@ public class ProtocolRegistry {
private static boolean mappingsLoaded;
static {
mappingLoaderExecutor = new ThreadPoolExecutor(5, 16, 45L, TimeUnit.SECONDS, new SynchronousQueue<>());
ThreadFactory threadFactory = new ThreadFactoryBuilder().setNameFormat("Via-Mappingloader-%d").build();
mappingLoaderExecutor = new ThreadPoolExecutor(5, 16, 45L, TimeUnit.SECONDS, new SynchronousQueue<>(), threadFactory);
mappingLoaderExecutor.allowCoreThreadTimeOut(true);
// Base Protocol

Datei anzeigen

@ -143,7 +143,7 @@ public class Protocol1_16To1_15_2 extends Protocol<ClientboundPackets1_15, Clien
}
});
if (Via.getConfig().isIgnoreLong1_16ChannelMessages()) {
if (Via.getConfig().isIgnoreLong1_16ChannelNames()) {
registerIncoming(ServerboundPackets1_16.PLUGIN_MESSAGE, new PacketRemapper() {
@Override
public void registerMap() {

Datei anzeigen

@ -147,7 +147,7 @@ flowerstem-when-block-above: false
# Vines that are not connected to blocks will be mapped to air, else 1.13+ would still be able to climb up on them.
vine-climb-fix: false
#
# Ignores incoming plugin channel messages of 1.16 clients with channel names longer than 32 charatcers.
# Ignores incoming plugin channel messages of 1.16+ clients with channel names longer than 32 charatcers.
# CraftBukkit had this limit hardcoded until 1.16, so we have to assume any server/proxy might have this arbitrary check present.
ignore-long-1_16-channel-names: true
#