mirror of
https://github.com/ViaVersion/ViaForge.git
synced 2025-01-08 19:38:33 +01:00
updated class names
This commit is contained in:
parent
98ea2cbbf9
commit
075fc88215
@ -4,10 +4,10 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||
import com.viaversion.viaversion.ViaManagerImpl;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.data.MappingDataLoader;
|
||||
import de.enzaxd.viaforge.loader.VRBackwardsLoader;
|
||||
import de.enzaxd.viaforge.loader.VRProviderLoader;
|
||||
import de.enzaxd.viaforge.platform.VRInjector;
|
||||
import de.enzaxd.viaforge.platform.VRPlatform;
|
||||
import de.enzaxd.viaforge.loader.BackwardsLoader;
|
||||
import de.enzaxd.viaforge.platform.Injector;
|
||||
import de.enzaxd.viaforge.platform.Platform;
|
||||
import de.enzaxd.viaforge.platform.ProviderLoader;
|
||||
import de.enzaxd.viaforge.util.JLoggerToLog4j;
|
||||
import io.netty.channel.DefaultEventLoopGroup;
|
||||
import io.netty.channel.EventLoop;
|
||||
@ -51,16 +51,16 @@ public class ViaForge {
|
||||
|
||||
Via.init(
|
||||
ViaManagerImpl.builder()
|
||||
.injector(new VRInjector())
|
||||
.loader(new VRProviderLoader())
|
||||
.platform(new VRPlatform(file))
|
||||
.injector(new Injector())
|
||||
.loader(new ProviderLoader())
|
||||
.platform(new Platform(file))
|
||||
.build()
|
||||
);
|
||||
|
||||
MappingDataLoader.enableMappingsCache();
|
||||
((ViaManagerImpl) Via.getManager()).init();
|
||||
|
||||
new VRBackwardsLoader(file);
|
||||
new BackwardsLoader(file);
|
||||
|
||||
initFuture.complete(null);
|
||||
}
|
||||
|
@ -13,12 +13,12 @@ import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.List;
|
||||
|
||||
@ChannelHandler.Sharable
|
||||
public class VRDecodeHandler extends MessageToMessageDecoder<ByteBuf> {
|
||||
public class DecodeHandler extends MessageToMessageDecoder<ByteBuf> {
|
||||
private final UserConnection info;
|
||||
private boolean handledCompression;
|
||||
private boolean skipDoubleTransform;
|
||||
|
||||
public VRDecodeHandler(UserConnection info) {
|
||||
public DecodeHandler(UserConnection info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
@ -13,11 +13,11 @@ import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.List;
|
||||
|
||||
@ChannelHandler.Sharable
|
||||
public class VREncodeHandler extends MessageToMessageEncoder<ByteBuf> {
|
||||
public class EncodeHandler extends MessageToMessageEncoder<ByteBuf> {
|
||||
private final UserConnection info;
|
||||
private boolean handledCompression;
|
||||
|
||||
public VREncodeHandler(UserConnection info) {
|
||||
public EncodeHandler(UserConnection info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
@ -5,8 +5,8 @@ import com.viaversion.viaversion.connection.UserConnectionImpl;
|
||||
import com.viaversion.viaversion.protocol.ProtocolPipelineImpl;
|
||||
import de.enzaxd.viaforge.ViaForge;
|
||||
import de.enzaxd.viaforge.handler.CommonTransformer;
|
||||
import de.enzaxd.viaforge.handler.VRDecodeHandler;
|
||||
import de.enzaxd.viaforge.handler.VREncodeHandler;
|
||||
import de.enzaxd.viaforge.handler.DecodeHandler;
|
||||
import de.enzaxd.viaforge.handler.EncodeHandler;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.socket.SocketChannel;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@ -25,8 +25,8 @@ public abstract class MixinNetworkManagerChInit {
|
||||
new ProtocolPipelineImpl(user);
|
||||
|
||||
channel.pipeline()
|
||||
.addBefore("encoder", CommonTransformer.HANDLER_ENCODER_NAME, new VREncodeHandler(user))
|
||||
.addBefore("decoder", CommonTransformer.HANDLER_DECODER_NAME, new VRDecodeHandler(user));
|
||||
.addBefore("encoder", CommonTransformer.HANDLER_ENCODER_NAME, new EncodeHandler(user))
|
||||
.addBefore("decoder", CommonTransformer.HANDLER_DECODER_NAME, new DecodeHandler(user));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ import de.enzaxd.viaforge.ViaForge;
|
||||
import java.io.File;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class VRBackwardsLoader implements ViaBackwardsPlatform {
|
||||
public class BackwardsLoader implements ViaBackwardsPlatform {
|
||||
private final File file;
|
||||
|
||||
public VRBackwardsLoader(final File file) {
|
||||
public BackwardsLoader(final File file) {
|
||||
this.init(this.file = new File(file, "ViaBackwards"));
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import com.viaversion.viaversion.libs.gson.JsonObject;
|
||||
import de.enzaxd.viaforge.ViaForge;
|
||||
import de.enzaxd.viaforge.handler.CommonTransformer;
|
||||
|
||||
public class VRInjector implements ViaInjector {
|
||||
public class Injector implements ViaInjector {
|
||||
|
||||
@Override
|
||||
public void inject() {
|
@ -1,6 +1,5 @@
|
||||
package de.enzaxd.viaforge.platform;
|
||||
|
||||
import com.viaversion.viaversion.api.ViaAPI;
|
||||
import com.viaversion.viaversion.api.command.ViaCommandSender;
|
||||
import com.viaversion.viaversion.api.configuration.ConfigurationProvider;
|
||||
import com.viaversion.viaversion.api.configuration.ViaVersionConfig;
|
||||
@ -24,19 +23,19 @@ import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class VRPlatform implements ViaPlatform<UUID> {
|
||||
public class Platform implements ViaPlatform<UUID> {
|
||||
|
||||
private final Logger logger = new JLoggerToLog4j(LogManager.getLogger("ViaVersion"));
|
||||
|
||||
private final VRViaConfig config;
|
||||
private final ViaConfig config;
|
||||
private final File dataFolder;
|
||||
private final ViaAPI<UUID> api;
|
||||
private final com.viaversion.viaversion.api.ViaAPI api;
|
||||
|
||||
public VRPlatform(File dataFolder) {
|
||||
public Platform(File dataFolder) {
|
||||
Path configDir = dataFolder.toPath().resolve("ViaVersion");
|
||||
config = new VRViaConfig(configDir.resolve("viaversion.yml").toFile());
|
||||
config = new ViaConfig(configDir.resolve("viaversion.yml").toFile());
|
||||
this.dataFolder = configDir.toFile();
|
||||
api = new VRViaAPI();
|
||||
api = new ViaAPI();
|
||||
}
|
||||
|
||||
public static String legacyToJson(String legacy) {
|
||||
@ -125,7 +124,7 @@ public class VRPlatform implements ViaPlatform<UUID> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ViaAPI<UUID> getApi() {
|
||||
public com.viaversion.viaversion.api.ViaAPI getApi() {
|
||||
return api;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package de.enzaxd.viaforge.loader;
|
||||
package de.enzaxd.viaforge.platform;
|
||||
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
@ -9,7 +9,7 @@ import com.viaversion.viaversion.protocols.base.BaseVersionProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider;
|
||||
import de.enzaxd.viaforge.ViaForge;
|
||||
|
||||
public class VRProviderLoader implements ViaPlatformLoader {
|
||||
public class ProviderLoader implements ViaPlatformLoader {
|
||||
|
||||
@Override
|
||||
public void load() {
|
@ -4,5 +4,5 @@ import com.viaversion.viaversion.ViaAPIBase;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class VRViaAPI extends ViaAPIBase<UUID> {
|
||||
public class ViaAPI extends ViaAPIBase<UUID> {
|
||||
}
|
@ -8,14 +8,14 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class VRViaConfig extends AbstractViaConfig {
|
||||
public class ViaConfig extends AbstractViaConfig {
|
||||
// Based on Sponge ViaVersion
|
||||
private static List<String> UNSUPPORTED = Arrays.asList("anti-xray-patch", "bungee-ping-interval",
|
||||
"bungee-ping-save", "bungee-servers", "quick-move-action-fix", "nms-player-ticking",
|
||||
"velocity-ping-interval", "velocity-ping-save", "velocity-servers",
|
||||
"blockconnection-method", "change-1_9-hitbox", "change-1_14-hitbox");
|
||||
|
||||
public VRViaConfig(File configFile) {
|
||||
public ViaConfig(File configFile) {
|
||||
super(configFile);
|
||||
// Load config
|
||||
reloadConfig();
|
Loading…
Reference in New Issue
Block a user