mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2025-01-06 19:18:25 +01:00
Update Via* API usage
This commit is contained in:
parent
153ae7ac30
commit
ef763be5f0
@ -25,9 +25,9 @@ import com.google.gson.JsonObject;
|
||||
import com.viaversion.viafabricplus.ViaFabricPlus;
|
||||
import com.viaversion.viafabricplus.api.settings.AbstractSetting;
|
||||
import com.viaversion.viafabricplus.api.settings.SettingGroup;
|
||||
import com.viaversion.vialoader.util.VersionRange;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import net.minecraft.text.MutableText;
|
||||
import net.raphimc.vialoader.util.VersionRange;
|
||||
|
||||
public class VersionedBooleanSetting extends AbstractSetting<Integer> {
|
||||
|
||||
|
@ -41,8 +41,6 @@ repositories {
|
||||
}
|
||||
|
||||
configurations {
|
||||
// Workaround Gradle 8+ not supporting including a configuration as dependency by
|
||||
// just extending a defined configuration later to other configurations :)
|
||||
vvDependencies
|
||||
|
||||
compileOnly.extendsFrom vvDependencies
|
||||
@ -53,18 +51,18 @@ dependencies {
|
||||
mappings "net.fabricmc:yarn:${project.yarn_version}:v2"
|
||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
|
||||
vvDependencies "com.viaversion:viaversion-common:5.2.1-SNAPSHOT"
|
||||
vvDependencies "com.viaversion:viabackwards-common:5.2.1-SNAPSHOT"
|
||||
vvDependencies "net.raphimc:viaaprilfools-common:3.0.4"
|
||||
vvDependencies "com.viaversion:viaversion-common:5.2.1"
|
||||
vvDependencies "com.viaversion:viabackwards-common:5.2.1"
|
||||
vvDependencies "com.viaversion:viaaprilfools-common:4.0.0"
|
||||
vvDependencies ("com.viaversion:vialoader:4.0.0") {
|
||||
exclude group: "com.google.guava", module: "guava"
|
||||
exclude group: "org.slf4j", module: "slf4j-api"
|
||||
}
|
||||
vvDependencies "net.raphimc:ViaLegacy:3.0.7-SNAPSHOT"
|
||||
vvDependencies ("net.raphimc:ViaBedrock:0.0.14-SNAPSHOT") {
|
||||
exclude group: "io.jsonwebtoken"
|
||||
exclude group: "com.mojang", module: "brigadier"
|
||||
}
|
||||
vvDependencies ("net.raphimc:ViaLoader:3.0.4") {
|
||||
exclude group: "com.google.guava", module: "guava"
|
||||
exclude group: "org.slf4j", module: "slf4j-api"
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
package com.viaversion.viafabricplus.features;
|
||||
|
||||
import com.viaversion.viaaprilfools.api.AprilFoolsProtocolVersion;
|
||||
import com.viaversion.viafabricplus.api.events.LoadingCycleCallback;
|
||||
import com.viaversion.viafabricplus.base.Events;
|
||||
import com.viaversion.viafabricplus.features.emulation.armor_hud.ArmorHudEmulation1_8;
|
||||
@ -33,7 +34,6 @@ import com.viaversion.viafabricplus.features.networking.resource_pack_header.Res
|
||||
import com.viaversion.viafabricplus.features.emulation.recipe.Recipes1_11_2;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.raphimc.viaaprilfools.api.AprilFoolsProtocolVersion;
|
||||
|
||||
public final class FeaturesLoading {
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
package com.viaversion.viafabricplus.features.item.filter_creative_tabs;
|
||||
|
||||
import com.viaversion.vialoader.util.VersionRange;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import com.viaversion.viafabricplus.injection.access.base.IClientConnection;
|
||||
import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator;
|
||||
@ -29,17 +30,16 @@ import net.minecraft.client.network.ClientPlayNetworkHandler;
|
||||
import net.minecraft.item.Item;
|
||||
import net.raphimc.vialegacy.protocol.classic.c0_30cpetoc0_28_30.data.ClassicProtocolExtension;
|
||||
import net.raphimc.vialegacy.protocol.classic.c0_30cpetoc0_28_30.storage.ExtensionProtocolMetadataStorage;
|
||||
import net.raphimc.vialoader.util.VersionRange;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.viaversion.vialoader.util.VersionRange.*;
|
||||
import static com.viaversion.viaversion.api.protocol.version.ProtocolVersion.*;
|
||||
import static net.minecraft.item.Items.*;
|
||||
import static net.raphimc.vialegacy.api.LegacyProtocolVersion.*;
|
||||
import static net.raphimc.vialoader.util.VersionRange.*;
|
||||
|
||||
/**
|
||||
* Class file which contains the {@link VersionRange} for every item added in the game.
|
||||
|
@ -25,6 +25,10 @@ import com.llamalad7.mixinextras.injector.v2.WrapWithCondition;
|
||||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
|
||||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
|
||||
import com.llamalad7.mixinextras.sugar.Local;
|
||||
import com.viaversion.vialoader.netty.CompressionReorderEvent;
|
||||
import com.viaversion.vialoader.netty.VLLegacyPipeline;
|
||||
import com.viaversion.vialoader.netty.VLPipeline;
|
||||
import com.viaversion.vialoader.netty.viabedrock.PingEncapsulationCodec;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import com.viaversion.viafabricplus.injection.access.base.IClientConnection;
|
||||
@ -45,10 +49,6 @@ import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.util.profiler.MultiValueDebugSampleLogImpl;
|
||||
import net.raphimc.viabedrock.api.BedrockProtocolVersion;
|
||||
import net.raphimc.vialegacy.api.LegacyProtocolVersion;
|
||||
import net.raphimc.vialoader.netty.CompressionReorderEvent;
|
||||
import net.raphimc.vialoader.netty.VLLegacyPipeline;
|
||||
import net.raphimc.vialoader.netty.VLPipeline;
|
||||
import net.raphimc.vialoader.netty.viabedrock.PingEncapsulationCodec;
|
||||
import org.cloudburstmc.netty.channel.raknet.RakChannelFactory;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
@ -21,9 +21,9 @@
|
||||
|
||||
package com.viaversion.viafabricplus.injection.mixin.features.april_fools_8bit_sound;
|
||||
|
||||
import com.viaversion.viaaprilfools.api.AprilFoolsProtocolVersion;
|
||||
import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator;
|
||||
import net.minecraft.client.sound.StaticSound;
|
||||
import net.raphimc.viaaprilfools.api.AprilFoolsProtocolVersion;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
@ -26,6 +26,10 @@ import com.mojang.brigadier.arguments.StringArgumentType;
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
import com.mojang.brigadier.builder.RequiredArgumentBuilder;
|
||||
import com.viaversion.viafabricplus.base.Events;
|
||||
import com.viaversion.vialoader.ViaLoader;
|
||||
import com.viaversion.vialoader.impl.platform.ViaAprilFoolsPlatformImpl;
|
||||
import com.viaversion.vialoader.impl.platform.ViaBackwardsPlatformImpl;
|
||||
import com.viaversion.vialoader.impl.platform.ViaBedrockPlatformImpl;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.connection.ProtocolInfo;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
@ -58,10 +62,6 @@ import net.minecraft.client.network.ClientPlayNetworkHandler;
|
||||
import net.minecraft.network.ClientConnection;
|
||||
import net.raphimc.viabedrock.api.BedrockProtocolVersion;
|
||||
import net.raphimc.viabedrock.protocol.data.ProtocolConstants;
|
||||
import net.raphimc.vialoader.ViaLoader;
|
||||
import net.raphimc.vialoader.impl.platform.ViaAprilFoolsPlatformImpl;
|
||||
import net.raphimc.vialoader.impl.platform.ViaBackwardsPlatformImpl;
|
||||
import net.raphimc.vialoader.impl.platform.ViaBedrockPlatformImpl;
|
||||
import org.cloudburstmc.netty.channel.raknet.config.RakChannelOption;
|
||||
|
||||
import java.nio.file.FileAlreadyExistsException;
|
||||
|
@ -27,8 +27,8 @@ import com.mojang.brigadier.suggestion.Suggestions;
|
||||
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
||||
import com.viaversion.viafabricplus.protocoltranslator.impl.command.classic.ListExtensionsCommand;
|
||||
import com.viaversion.viafabricplus.protocoltranslator.impl.command.classic.SetTimeCommand;
|
||||
import com.viaversion.vialoader.impl.viaversion.VLCommandHandler;
|
||||
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
|
||||
import net.raphimc.vialoader.impl.viaversion.VLCommandHandler;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
package com.viaversion.viafabricplus.protocoltranslator.impl.platform;
|
||||
|
||||
import net.raphimc.vialoader.impl.platform.ViaLegacyPlatformImpl;
|
||||
import com.viaversion.vialoader.impl.platform.ViaLegacyPlatformImpl;
|
||||
|
||||
public final class ViaFabricPlusViaLegacyPlatformImpl extends ViaLegacyPlatformImpl {
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
package com.viaversion.viafabricplus.protocoltranslator.impl.platform;
|
||||
|
||||
import com.viaversion.vialoader.impl.platform.ViaVersionPlatformImpl;
|
||||
import com.viaversion.viaversion.configuration.AbstractViaConfig;
|
||||
import com.viaversion.viaversion.libs.gson.JsonArray;
|
||||
import com.viaversion.viaversion.libs.gson.JsonObject;
|
||||
@ -29,7 +30,6 @@ import com.viaversion.viafabricplus.injection.ViaFabricPlusMixinPlugin;
|
||||
import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator;
|
||||
import com.viaversion.viafabricplus.protocoltranslator.impl.viaversion.ViaFabricPlusVLViaConfig;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.raphimc.vialoader.impl.platform.ViaVersionPlatformImpl;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
package com.viaversion.viafabricplus.protocoltranslator.impl.provider.viabedrock;
|
||||
|
||||
import com.viaversion.vialoader.netty.VLPipeline;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viafabricplus.protocoltranslator.netty.ViaFabricPlusVLLegacyPipeline;
|
||||
import io.netty.channel.Channel;
|
||||
@ -28,7 +29,6 @@ import net.raphimc.viabedrock.api.io.compression.ProtocolCompression;
|
||||
import net.raphimc.viabedrock.netty.AesEncryptionCodec;
|
||||
import net.raphimc.viabedrock.netty.CompressionCodec;
|
||||
import net.raphimc.viabedrock.protocol.provider.NettyPipelineProvider;
|
||||
import net.raphimc.vialoader.netty.VLPipeline;
|
||||
|
||||
import javax.crypto.SecretKey;
|
||||
|
||||
|
@ -21,8 +21,8 @@
|
||||
|
||||
package com.viaversion.viafabricplus.protocoltranslator.impl.viaversion;
|
||||
|
||||
import net.raphimc.vialoader.impl.viaversion.VLInjector;
|
||||
import net.raphimc.vialoader.netty.VLLegacyPipeline;
|
||||
import com.viaversion.vialoader.impl.viaversion.VLInjector;
|
||||
import com.viaversion.vialoader.netty.VLLegacyPipeline;
|
||||
|
||||
public final class ViaFabricPlusVLInjector extends VLInjector {
|
||||
|
||||
|
@ -25,6 +25,7 @@ import com.viaversion.viafabricplus.api.events.LoadingCycleCallback;
|
||||
import com.viaversion.viafabricplus.base.Events;
|
||||
import com.viaversion.viafabricplus.protocoltranslator.impl.provider.vialegacy.*;
|
||||
import com.viaversion.viafabricplus.protocoltranslator.impl.provider.viaversion.*;
|
||||
import com.viaversion.vialoader.impl.viaversion.VLLoader;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.minecraft.signature.SignableCommandArgumentsProvider;
|
||||
import com.viaversion.viaversion.api.platform.providers.ViaProviders;
|
||||
@ -43,7 +44,6 @@ import net.raphimc.vialegacy.protocol.classic.c0_28_30toa1_0_15.provider.Classic
|
||||
import net.raphimc.vialegacy.protocol.release.r1_2_4_5tor1_3_1_2.provider.OldAuthProvider;
|
||||
import net.raphimc.vialegacy.protocol.release.r1_6_4tor1_7_2_5.provider.EncryptionProvider;
|
||||
import net.raphimc.vialegacy.protocol.release.r1_7_6_10tor1_8.provider.GameProfileFetcher;
|
||||
import net.raphimc.vialoader.impl.viaversion.VLLoader;
|
||||
|
||||
public final class ViaFabricPlusVLLoader extends VLLoader {
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
package com.viaversion.viafabricplus.protocoltranslator.impl.viaversion;
|
||||
|
||||
import net.raphimc.vialoader.impl.viaversion.VLViaConfig;
|
||||
import com.viaversion.vialoader.impl.viaversion.VLViaConfig;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.logging.Logger;
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
package com.viaversion.viafabricplus.protocoltranslator.netty;
|
||||
|
||||
import com.viaversion.vialoader.netty.CompressionReorderEvent;
|
||||
import com.viaversion.vialoader.netty.VLLegacyPipeline;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import com.viaversion.viafabricplus.ViaFabricPlusImpl;
|
||||
@ -28,8 +30,6 @@ import com.viaversion.viafabricplus.protocoltranslator.protocol.ViaFabricPlusPro
|
||||
import io.netty.channel.ChannelHandler;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import net.minecraft.network.handler.HandlerNames;
|
||||
import net.raphimc.vialoader.netty.CompressionReorderEvent;
|
||||
import net.raphimc.vialoader.netty.VLLegacyPipeline;
|
||||
|
||||
public final class ViaFabricPlusVLLegacyPipeline extends VLLegacyPipeline {
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
package com.viaversion.viafabricplus.protocoltranslator.netty;
|
||||
|
||||
import com.viaversion.vialoader.netty.ViaDecoder;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viafabricplus.ViaFabricPlusImpl;
|
||||
import com.viaversion.viafabricplus.settings.impl.GeneralSettings;
|
||||
@ -28,7 +29,6 @@ import com.viaversion.viafabricplus.util.ChatUtil;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.raphimc.vialoader.netty.ViaDecoder;
|
||||
|
||||
public final class ViaFabricPlusViaDecoder extends ViaDecoder {
|
||||
|
||||
|
@ -20,11 +20,11 @@
|
||||
*/
|
||||
package com.viaversion.viafabricplus.protocoltranslator.util;
|
||||
|
||||
import com.viaversion.vialoader.util.ProtocolVersionList;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import net.lenni0451.mcping.MCPing;
|
||||
import net.lenni0451.mcping.responses.MCPingResponse;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.raphimc.vialoader.util.ProtocolVersionList;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
package com.viaversion.viafabricplus.screen.impl;
|
||||
|
||||
import com.viaversion.vialoader.util.ProtocolVersionList;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import com.viaversion.viafabricplus.screen.VFPList;
|
||||
import com.viaversion.viafabricplus.screen.VFPListEntry;
|
||||
@ -32,7 +33,6 @@ import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.text.MutableText;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.raphimc.vialoader.util.ProtocolVersionList;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
package com.viaversion.viafabricplus.screen.impl;
|
||||
|
||||
import com.viaversion.vialoader.util.ProtocolVersionList;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import com.viaversion.viafabricplus.protocoltranslator.ProtocolTranslator;
|
||||
import com.viaversion.viafabricplus.screen.VFPList;
|
||||
@ -33,7 +34,6 @@ import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.gui.widget.ButtonWidget;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.text.Text;
|
||||
import net.raphimc.vialoader.util.ProtocolVersionList;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
@ -24,9 +24,9 @@ package com.viaversion.viafabricplus.settings.impl;
|
||||
import com.viaversion.viafabricplus.api.settings.SettingGroup;
|
||||
import com.viaversion.viafabricplus.api.settings.type.BooleanSetting;
|
||||
import com.viaversion.viafabricplus.api.settings.type.VersionedBooleanSetting;
|
||||
import com.viaversion.vialoader.util.VersionRange;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import net.minecraft.text.Text;
|
||||
import net.raphimc.vialoader.util.VersionRange;
|
||||
|
||||
public final class DebugSettings extends SettingGroup {
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
package com.viaversion.viafabricplus.visuals.settings;
|
||||
|
||||
import com.viaversion.vialoader.util.VersionRange;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import com.viaversion.viafabricplus.api.settings.type.BooleanSetting;
|
||||
import com.viaversion.viafabricplus.api.settings.type.ModeSetting;
|
||||
@ -30,7 +31,6 @@ import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.font.FontStorage;
|
||||
import net.minecraft.text.Text;
|
||||
import net.raphimc.vialegacy.api.LegacyProtocolVersion;
|
||||
import net.raphimc.vialoader.util.VersionRange;
|
||||
|
||||
public final class VisualSettings extends SettingGroup {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user