Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-20 06:50:08 +01:00
Ursprung
647230a996
Commit
601a6eb808
@ -367,7 +367,7 @@ public abstract class AbstractViaConfig extends Config implements ViaVersionConf
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isIgnoreLong1_16ChannelMessages() {
|
public boolean isIgnoreLong1_16ChannelNames() {
|
||||||
return ignoreLongChannelNames;
|
return ignoreLongChannelNames;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ public interface ViaVersionConfig {
|
|||||||
/**
|
/**
|
||||||
* Replace extended pistons on 1.10 chunk loading.
|
* Replace extended pistons on 1.10 chunk loading.
|
||||||
*
|
*
|
||||||
* @return True if to replace them
|
* @return true if to replace them
|
||||||
*/
|
*/
|
||||||
boolean isReplacePistons();
|
boolean isReplacePistons();
|
||||||
|
|
||||||
@ -183,28 +183,28 @@ public interface ViaVersionConfig {
|
|||||||
/**
|
/**
|
||||||
* Force json transform
|
* Force json transform
|
||||||
*
|
*
|
||||||
* @return True if enabled
|
* @return true if enabled
|
||||||
*/
|
*/
|
||||||
boolean isForceJsonTransform();
|
boolean isForceJsonTransform();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should we fix nbt array's in json chat messages for 1.12 clients
|
* 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();
|
boolean is1_12NBTArrayFix();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should we make team colours based on the last colour in team prefix
|
* Should we make team colours based on the last colour in team prefix
|
||||||
*
|
*
|
||||||
* @return True if enabled
|
* @return true if enabled
|
||||||
*/
|
*/
|
||||||
boolean is1_13TeamColourFix();
|
boolean is1_13TeamColourFix();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should we fix shift quick move action for 1.12 clients
|
* Should we fix shift quick move action for 1.12 clients
|
||||||
*
|
*
|
||||||
* @return True if enabled
|
* @return true if enabled
|
||||||
*/
|
*/
|
||||||
boolean is1_12QuickMoveActionFix();
|
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?
|
* 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();
|
boolean isSuppressConversionWarnings();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should we disable the 1.13 auto-complete feature to stop spam kicks? (for any server lower than 1.13)
|
* 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();
|
boolean isDisable1_13AutoComplete();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tries to minimize cooldown animation.
|
* Tries to minimize cooldown animation.
|
||||||
*
|
*
|
||||||
* @return True if enabled
|
* @return true if enabled
|
||||||
*/
|
*/
|
||||||
boolean isMinimizeCooldown();
|
boolean isMinimizeCooldown();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable the serverside blockconnections for 1.13+ clients
|
* Enable the serverside blockconnections for 1.13+ clients
|
||||||
*
|
*
|
||||||
* @return True if enabled
|
* @return true if enabled
|
||||||
*/
|
*/
|
||||||
boolean isServersideBlockConnections();
|
boolean isServersideBlockConnections();
|
||||||
|
|
||||||
@ -268,7 +268,7 @@ public interface ViaVersionConfig {
|
|||||||
/**
|
/**
|
||||||
* When activated, only the most important blocks are saved in the BlockStorage.
|
* When activated, only the most important blocks are saved in the BlockStorage.
|
||||||
*
|
*
|
||||||
* @return True if enabled
|
* @return true if enabled
|
||||||
*/
|
*/
|
||||||
boolean isReduceBlockStorageMemory();
|
boolean isReduceBlockStorageMemory();
|
||||||
|
|
||||||
@ -276,28 +276,28 @@ public interface ViaVersionConfig {
|
|||||||
* When activated with serverside-blockconnections, flower parts with blocks above will be sent as stems.
|
* 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.
|
* Useful for lobbyservers where users can't build and those stems are used decoratively.
|
||||||
*
|
*
|
||||||
* @return True if enabled
|
* @return true if enabled
|
||||||
*/
|
*/
|
||||||
boolean isStemWhenBlockAbove();
|
boolean isStemWhenBlockAbove();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vines not connected to any blocks will be mapped to air for 1.13+ clients to prevent them from climbing up.
|
* 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();
|
boolean isVineClimbFix();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When activated, the 1-layer snow will be sent as 2-layer snow to 1.13+ clients to have collision.
|
* 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();
|
boolean isSnowCollisionFix();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When activated, infested blocks will be mapped to their normal stone variants for 1.13+ clients.
|
* 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();
|
boolean isInfestedBlocksFix();
|
||||||
|
|
||||||
@ -311,35 +311,35 @@ public interface ViaVersionConfig {
|
|||||||
/**
|
/**
|
||||||
* When activated, edited books with more than 50 pages will be shortened to 50.
|
* 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();
|
boolean isTruncate1_14Books();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles left handed info by using unused bit 7 on Client Settings packet
|
* Handles left handed info by using unused bit 7 on Client Settings packet
|
||||||
*
|
*
|
||||||
* @return True if enabled
|
* @return true if enabled
|
||||||
*/
|
*/
|
||||||
boolean isLeftHandedHandling();
|
boolean isLeftHandedHandling();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fixes velocity bugs due to different hitbox for 1.9-1.13 clients on 1.8 servers.
|
* 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();
|
boolean is1_9HitboxFix();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fixes velocity bugs due to different hitbox for 1.14+ clients on sub 1.14 servers.
|
* 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();
|
boolean is1_14HitboxFix();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fixes non full blocks having 0 light for 1.14+ clients on sub 1.14 servers.
|
* 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();
|
boolean isNonFullBlockLightFix();
|
||||||
|
|
||||||
@ -348,14 +348,14 @@ public interface ViaVersionConfig {
|
|||||||
/**
|
/**
|
||||||
* Should 1.15 clients respawn instantly / without showing the death screen.
|
* Should 1.15 clients respawn instantly / without showing the death screen.
|
||||||
*
|
*
|
||||||
* @return True if enabled
|
* @return true if enabled
|
||||||
*/
|
*/
|
||||||
boolean is1_15InstantRespawn();
|
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();
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package us.myles.ViaVersion.api.protocol;
|
|||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Range;
|
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.Int2ObjectMap;
|
||||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
@ -50,6 +51,7 @@ import java.util.TreeSet;
|
|||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.SynchronousQueue;
|
import java.util.concurrent.SynchronousQueue;
|
||||||
|
import java.util.concurrent.ThreadFactory;
|
||||||
import java.util.concurrent.ThreadPoolExecutor;
|
import java.util.concurrent.ThreadPoolExecutor;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@ -70,7 +72,8 @@ public class ProtocolRegistry {
|
|||||||
private static boolean mappingsLoaded;
|
private static boolean mappingsLoaded;
|
||||||
|
|
||||||
static {
|
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);
|
mappingLoaderExecutor.allowCoreThreadTimeOut(true);
|
||||||
|
|
||||||
// Base Protocol
|
// Base Protocol
|
||||||
|
@ -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() {
|
registerIncoming(ServerboundPackets1_16.PLUGIN_MESSAGE, new PacketRemapper() {
|
||||||
@Override
|
@Override
|
||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
|
@ -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.
|
# 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
|
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.
|
# 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
|
ignore-long-1_16-channel-names: true
|
||||||
#
|
#
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren