Repository to keep up with ViaVersion on MCP (Originally from https://github.com/LaVache-FR/ViaMCP)

Overview

ViaMCP-Reborn

Repository to keep up with ViaVersion on MCP (Originally from https://github.com/LaVache-FR/ViaMCP)

1.7.x Protocols

Yes, i know they are not working right now, do not make a pull request to remove them, as i am not going to remove them.

Small note about version

If you are using 1.8.x as a client base, use viamcp src folder

If you are using 1.12.2 as a client base, use viamcp1_12 src folder and rename it to viamcp

Installation

You will need to add some lines of code before you can use ViaMCP

You also need to add libraries into dependencies before using this!

Main Class

Add this to the main class of your client (aka injection function)

try
{
  ViaMCP.getInstance().start();
}
catch (Exception e)
{
  e.printStackTrace();
}

NetworkManager

You will need to replace 2 functions in NetworkManager.java

1: (Name may vary, but should be func_181124_a or contain (Bootstrap)((Bootstrap)((Bootstrap)(new Bootstrap()).group((EventLoopGroup)lazyloadbase.getValue()))

Add:

if (p_initChannel_1_ instanceof SocketChannel && ViaMCP.getInstance().getVersion() != ViaMCP.PROTOCOL_VERSION)
{
  UserConnection user = new UserConnectionImpl(p_initChannel_1_, true);
  new ProtocolPipelineImpl(user);
  p_initChannel_1_.pipeline().addBefore("encoder", CommonTransformer.HANDLER_ENCODER_NAME, new VREncodeHandler(user)).addBefore("decoder", CommonTransformer.HANDLER_DECODER_NAME, new VRDecodeHandler(user));
}

After:

p_initChannel_1_.pipeline().addLast((String)"timeout", (ChannelHandler)(new ReadTimeoutHandler(30))).addLast((String)"splitter", (ChannelHandler)(new MessageDeserializer2())).addLast((String)"decoder", (ChannelHandler)(new MessageDeserializer(EnumPacketDirection.CLIENTBOUND))).addLast((String)"prepender", (ChannelHandler)(new MessageSerializer2())).addLast((String)"encoder", (ChannelHandler)(new MessageSerializer(EnumPacketDirection.SERVERBOUND))).addLast((String)"packet_handler", (ChannelHandler)networkmanager);

2: setCompressionTreshold (Yes, minecraft devs cannot spell 'Threshold')

Comment out: (Old Decoder)

this.channel.pipeline().addBefore("decoder", "decompress", new NettyCompressionDecoder(treshold));

Replace with: (New Decoder)

NettyUtil.decodeEncodePlacement(channel.pipeline(), "decoder", "decompress", new NettyCompressionDecoder(treshold));

Comment out: (Old Encoder)

this.channel.pipeline().addBefore("encoder", "compress", new NettyCompressionEncoder(treshold))

Replace with: (New Encoder)

NettyUtil.decodeEncodePlacement(channel.pipeline(), "encoder", "compress", new NettyCompressionEncoder(treshold));

GuiMainMenu

You will need to add a button to access the protocol switcher

In addSingleplayerMultiplayerButtons() function you will need to add the following code:

this.buttonList.add(new GuiButton(69, 5, 5, 90, 20, "Protocol"));

In actionPerformed(GuiButton button) function you will need to add the following code:

if (button.id == 69)
{
  this.mc.displayGuiScreen(new GuiProtocolSelector(this));
}

Finishing

You should now be able to use ViaMCP

If you have any problems, DM Hideri#9003 on discord!

Comments
  • Sound disappears while placing a block

    Sound disappears while placing a block

    I set my protocol version to 340(1.12.2),and entered an 1.12.2-Server. If I use a 1.12.2 client, the sound plays normally. While I was using a 1.8.9-based-client to place blocks, the sound disappears. However, when I use this client to enter a 1.8.9-Server, the sound plays normally again. Is this a bug that can be fixed or a problem?

    opened by vlouboos 15
  • Channel error

    Channel error

    hi when i change my protocol version from 1.8 to any other one and i try to connect to a server or ping one i get this error Jul 14, 2021 1:13:12 PM io.netty.channel.ChannelInitializer channelRegistered WARNING: Failed to initialize a channel. Closing: [id: 0xe6cf1c65] pls help

    opened by aamber2231 9
  • Error: java.lang.NoClassDefFoundError

    Error: java.lang.NoClassDefFoundError

    I am getting this error after exporting my client during when I am trying to run it in the minecraft launcher:

    The game crashed whilst initializing game Error: java.lang.NoClassDefFoundError: com/viaversion/viaversion/api/platform/ViaInjector Exit Code: -1

    Does anyone know how to fix this?

    opened by GitCat3 4
  • Crashes when exported

    Crashes when exported

    This works great and I appreciate it, but when I export my client to the normal minecraft launcher instead of eclipse, when I go to the GuiProtocolSelector it crashes. This doesn't happen in eclipse. I think it's something to do with the libs, can you help pls

    opened by JonnyMqc 3
  • Probem With Export Client

    Probem With Export Client

    Hi ! When Im Trying Put All Libs Into My Client There is a Problem

    Some Files Have The Save Name And I Cant Put The Jar Files into my client !

    For Example :

    Viaversion - Viarewind - ViaBackwars

    Have The Same Files : bungee.yml plugin.yml fabric.mod.json And More .....

    Maybe Im Dumb And Do Something Wrong Please Explain

    opened by KillergameReal 2
  • Problems with EnumChatFormatting

    Problems with EnumChatFormatting

    in GuiProtocolSelector in viamcp.gui

    EnumChatFormating is replaced with TextFormatting in 1.12.2

    EnumChatFormating.BOLD > TextFormatting.BOLD etc.. import net.minecraft.util.EnumChatFormating; > import net.minecraft.util.text.TextFormatting;

    And now there is problems with drawSlot image

    And in image

    Thanks

    opened by NaNonnI 2
  • Cant Connect to Servers[Fixed]

    Cant Connect to Servers[Fixed]

    I cant Connect to Servers , This Message Is Showing up After i change my Protocol: Java.nio.channels.closedChanellExeption

    and when i try log with 1.12.2 (Main Protocol)

    My game just gona Crash !

    Please Help !

    opened by KillergameReal 1
  • getting errors. please help

    getting errors. please help

    ---- Minecraft Crash Report ---- // Who set us up the TNT?

    Time: 16:49 28/06/21 Description: Initializing game

    java.lang.NoSuchFieldError: com/viaversion/viaversion/api/protocol/version/ProtocolVersion.v1_17_1 at com.viaversion.viabackwards.api.ViaBackwardsPlatform.init(ViaBackwardsPlatform.java:108) at viamcp.loader.VRBackwardsLoader.(VRBackwardsLoader.java:15) at viamcp.ViaMCP.start(ViaMCP.java:64) at God.Shush.Client.startClient(Client.java:38) at net.minecraft.client.Minecraft.startGame(Minecraft.java:592) at net.minecraft.client.Minecraft.run(Minecraft.java:400) at net.minecraft.client.main.Main.main(Main.java:113) at Start.main(Start.java:11)

    opened by Godwhitelight 1
Owner
LWJGL is kinda hard
null
This repository is for active development of the Azure SDK for Java.

This repository is for active development of the Azure SDK for Java.

Microsoft Azure 1.8k Dec 31, 2022
This repository holds the source code for TML (Tecknix Mod Loader)'s API.

This repository contains the modding API not the MDK (Mod Development Kit). This repository will not give you the ability to mod Tecknix Client but you can contribute to the repository if you have events you would like to add.

Tecknix Client 6 Aug 1, 2022
Live Access Serever 9 (repository: las9)

Live Access Serever 9 (repository: las9) This version of LAS has the following technical features. All configuration and management done using an Admi

Pacific Marine Environmental Laboratory 1 Mar 14, 2022
Repository for AMES Amperes 2022 Rapid React season

Repository for AMES Amperes 2022 Rapid React season

null 3 Nov 10, 2022
A Nexus Repository 3 plugin that allows usage of Terraform repositories

Nexus Repository Terraform Format Table Of Contents Developing Requirements Download Building Using Terraform with Nexus Repository Manager 3 Compatib

null 8 Dec 5, 2022
*old repository* --> this is now integrated in https://github.com/javaparser/javaparser

JavaSymbolSolver has been integrated in JavaParser: development will continue there! We will work on current issues opened here, but all new issues sh

JavaParser 288 Nov 25, 2022
Several implementations of a text table, originally using ASCII and UTF-8 characters for borders.

ASCII Table ASCII table - A simple tool to format tables with various row/column options for indentation, indentation character, alignment, padding (l

Sven van der Meer 415 Dec 26, 2022
EssentialClient is a client side mod originally forked from Carpet Client for 1.15.2 that implements new client side features

EssentialClient EssentialClient is a client side only mod originally forked from Carpet Client for 1.15.2 that implements new client side features. Th

null 62 Jan 3, 2023
RT4 client originally compiled on Jan 28, 2009 (530)

Goals Identify all classes Create new static classes by grouping related members Identify all methods Identify all fields Identify all local variables

Pazaz 10 Nov 14, 2022
Eclipse Foundation 3k Dec 31, 2022
DEPRECATED: use https://github.com/jhipster/jhipster-bom instead

JHipster BOM and server-side library - DEPRECATED Full documentation and information is available on our website at https://www.jhipster.tech/ This pr

JHipster 407 Nov 29, 2022
Now redundant weka mirror. Visit https://github.com/Waikato/weka-trunk for the real deal

weka (mirror) Computing and Mathematical Sciences at the University of Waikato now has an official github organization including a read-only git mirro

Benjamin Petersen 313 Dec 16, 2022
Please visit https://github.com/h2oai/h2o-3 for latest H2O

Caution: H2O-3 is now the current H2O! Please visit https://github.com/h2oai/h2o-3 H2O H2O makes Hadoop do math! H2O scales statistics, machine learni

H2O.ai 2.2k Jan 6, 2023
A simple expressive web framework for java. Spark has a kotlin DSL https://github.com/perwendel/spark-kotlin

Spark - a tiny web framework for Java 8 Spark 2.9.3 is out!! Changeset <dependency> <groupId>com.sparkjava</groupId> <artifactId>spark-core</a

Per Wendel 9.4k Dec 29, 2022
Please visit https://github.com/h2oai/h2o-3 for latest H2O

Caution: H2O-3 is now the current H2O! Please visit https://github.com/h2oai/h2o-3 H2O H2O makes Hadoop do math! H2O scales statistics, machine learni

H2O.ai 2.2k Dec 9, 2022
Maven port of the Netflix Gradle code generation plugin for graphql. https://github.com/Netflix/dgs-codegen

This is port of the netflix codegen plugin for Gradle. Found here. COPIED FROM NETFLIX DOCUMENTATION. The DGS Code Generation plugin generates code fo

null 63 Dec 24, 2022
Old and archived; More recent development is in https://github.com/Create-Fabric/Create-Refabricated.

NOW ARCHIVED Go here for the continuation of this project. Old README Create Fabric A Fabric port of Create. Create Discord: https://discord.gg/AjRTh6

null 12 Dec 7, 2022
PS4 Remote PKG Installer GUI for https://github.com/flatz/ps4_remote_pkg_installer

PS4 Remote PKG Installer PS4 Remote PKG Installer GUI for https://github.com/flatz/ps4_remote_pkg_installer Tired of copying PKG files to USB then wal

Benjamin Faal 116 Dec 25, 2022
图书管理;图书管理系统;图书管理系统后端,该项目采用Springboot整合Mybatis对数据持久化以及Api的封装实现,前台项目地址:https://github.com/Nirunfeng/BookSys-Client

System of Book Management(sbm) 项目说明 图书管理系统后台,该项目采用Springboot整合Mybatis对数据持久化以及Api的封装实现,前台项目地址:BookSys-Client 项目启动 数据库:mysql5.6执行以下脚本,项目下脚本文件--sbm.sql 导

null 61 Dec 30, 2022