mirror of
https://github.com/ViaVersion/ViaForge.git
synced 2024-11-21 11:55:13 +01:00
Minecraft 1.19.4
This commit is contained in:
parent
1232b01736
commit
a36cf3257c
@ -5,14 +5,16 @@ org.gradle.daemon=false
|
||||
# forge
|
||||
mod_id=viaforge
|
||||
mod_name=ViaForge
|
||||
mod_version=3.0.0
|
||||
mod_version=3.1.0
|
||||
mod_base_package=de.enzaxd
|
||||
|
||||
# mixin
|
||||
mixin_version=0.8.3
|
||||
|
||||
# via-version
|
||||
vialoadingbase_version=ad5fd83ad1
|
||||
viaversion_version=4.6.0-23w04a-SNAPSHOT
|
||||
viabackwards_version=4.6.0-23w03a-SNAPSHOT
|
||||
viarewind_version=2.0.3-SNAPSHOT
|
||||
vialoadingbase_version=6dad0a2561
|
||||
viaversion_version=4.6.2-SNAPSHOT
|
||||
viabackwards_version=4.6.2-SNAPSHOT
|
||||
viarewind_version=2.0.4-SNAPSHOT
|
||||
snake_yml_version=2.0
|
||||
|
||||
|
@ -90,7 +90,7 @@ def viaLibs = [
|
||||
"com.viaversion:viaversion:${project.viaversion_version}",
|
||||
"com.viaversion:viabackwards:${project.viabackwards_version}",
|
||||
"com.viaversion:viarewind-core:${project.viarewind_version}",
|
||||
"org.yaml:snakeyaml:1.29",
|
||||
"org.yaml:snakeyaml:${project.snake_yml_version}",
|
||||
|
||||
"com.github.FlorianMichael:ViaLoadingBase:${project.vialoadingbase_version}"
|
||||
]
|
||||
|
@ -3,7 +3,7 @@ package de.florianmichael.viaforge;
|
||||
import com.mojang.realmsclient.gui.ChatFormatting;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import de.florianmichael.vialoadingbase.ViaLoadingBase;
|
||||
import de.florianmichael.vialoadingbase.api.version.InternalProtocolList;
|
||||
import de.florianmichael.vialoadingbase.platform.InternalProtocolList;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@ -86,7 +86,7 @@ public class GuiProtocolSelector extends GuiScreen {
|
||||
protected void drawSlot(int i, int i1, int i2, int i3, int i4, int i5, float v) {
|
||||
final ProtocolVersion version = InternalProtocolList.getProtocols().get(i);
|
||||
|
||||
drawCenteredString(mc.fontRenderer,(ViaLoadingBase.getTargetVersion().getVersion() == version.getVersion() ? ChatFormatting.GREEN.toString() : ChatFormatting.DARK_RED.toString()) + version.getName(), width / 2, i2, -1);
|
||||
drawCenteredString(mc.fontRenderer,(ViaLoadingBase.getClassWrapper().getTargetVersion().getVersion() == version.getVersion() ? ChatFormatting.GREEN.toString() : ChatFormatting.DARK_RED.toString()) + version.getName(), width / 2, i2, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,13 +11,12 @@ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
public class ViaForge {
|
||||
|
||||
@Mod.EventHandler
|
||||
public void init(FMLPreInitializationEvent event) throws Exception {
|
||||
public void init(FMLPreInitializationEvent event) {
|
||||
ViaLoadingBase.ViaLoadingBaseBuilder.
|
||||
create().
|
||||
runDirectory(Minecraft.getMinecraft().gameDir).
|
||||
nativeVersion(RealmsSharedConstants.NETWORK_PROTOCOL_VERSION).
|
||||
singlePlayerProvider(() -> Minecraft.getMinecraft().isSingleplayer()).
|
||||
eventLoop(new DefaultEventLoop(ViaLoadingBase.EXECUTOR_SERVICE)).
|
||||
forceNativeVersionCondition(() -> Minecraft.getMinecraft().isSingleplayer()).
|
||||
build();
|
||||
}
|
||||
}
|
||||
|
@ -4,9 +4,9 @@ import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.connection.UserConnectionImpl;
|
||||
import com.viaversion.viaversion.protocol.ProtocolPipelineImpl;
|
||||
import de.florianmichael.vialoadingbase.ViaLoadingBase;
|
||||
import de.florianmichael.vialoadingbase.netty.CustomViaDecodeHandler;
|
||||
import de.florianmichael.vialoadingbase.netty.CustomViaEncodeHandler;
|
||||
import de.florianmichael.vialoadingbase.netty.NettyConstants;
|
||||
import de.florianmichael.vialoadingbase.netty.VLBViaDecodeHandler;
|
||||
import de.florianmichael.vialoadingbase.netty.VLBViaEncodeHandler;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.socket.SocketChannel;
|
||||
import net.minecraft.realms.RealmsSharedConstants;
|
||||
@ -20,14 +20,14 @@ public class MixinNetworkManagerSub5 {
|
||||
|
||||
@Inject(method = "initChannel", at = @At(value = "TAIL"), remap = false)
|
||||
private void onInitChannel(Channel channel, CallbackInfo ci) {
|
||||
if (channel instanceof SocketChannel && ViaLoadingBase.getTargetVersion().getVersion() != RealmsSharedConstants.NETWORK_PROTOCOL_VERSION) {
|
||||
if (channel instanceof SocketChannel && ViaLoadingBase.getClassWrapper().getTargetVersion().getVersion() != RealmsSharedConstants.NETWORK_PROTOCOL_VERSION) {
|
||||
|
||||
UserConnection user = new UserConnectionImpl(channel, true);
|
||||
new ProtocolPipelineImpl(user);
|
||||
|
||||
channel.pipeline()
|
||||
.addBefore("encoder", NettyConstants.HANDLER_ENCODER_NAME, new CustomViaEncodeHandler(user))
|
||||
.addBefore("decoder", NettyConstants.HANDLER_DECODER_NAME, new CustomViaDecodeHandler(user));
|
||||
.addBefore("encoder", NettyConstants.HANDLER_ENCODER_NAME, new VLBViaEncodeHandler(user))
|
||||
.addBefore("decoder", NettyConstants.HANDLER_DECODER_NAME, new VLBViaDecodeHandler(user));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user