mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-11-04 09:19:33 +01:00
updated README
This commit is contained in:
parent
b8dd7a24b6
commit
84f9753ce1
@ -80,6 +80,9 @@ It should work fine with most if not all mods and modpacks.
|
||||
- Bedrock (1.19.70)
|
||||
|
||||
## Clientside related Fixes
|
||||
<details>
|
||||
<summary>Click to open</summary>
|
||||
|
||||
- [x] Bounding boxes for all versions
|
||||
- [x] Entity interaction and movement related packet fixes
|
||||
- [x] Sync and async mouse/keyboard handling in <= 1.12.2
|
||||
@ -97,6 +100,8 @@ It should work fine with most if not all mods and modpacks.
|
||||
- [x] Implementing non-sequenced block placement in <= 1.18.2
|
||||
- [x] Animation related fixes (1.7 Sneaking, c0.30 walking animation, ...)
|
||||
- [x] Fixed clientside packet handling (1.16.5 transactions, 1.19.0 tablist, ...)
|
||||
</details>
|
||||
|
||||
#### TODO:
|
||||
- [ ] More extensions for Classic Protocol Extensions protocol
|
||||
- [ ] Window click interactions in <= 1.16.5
|
||||
|
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* This file is part of ViaFabricPlus - https://github.com/FlorianMichael/ViaFabricPlus
|
||||
* Copyright (C) 2021-2023 FlorianMichael/EnZaXD and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package de.florianmichael.viafabricplus.injection.mixin.base;
|
||||
|
||||
import de.florianmichael.viafabricplus.event.ChangeProtocolVersionCallback;
|
||||
import de.florianmichael.viafabricplus.injection.access.IServerInfo;
|
||||
import de.florianmichael.viafabricplus.protocolhack.ProtocolHack;
|
||||
import de.florianmichael.vialoadingbase.model.ComparableProtocolVersion;
|
||||
import net.minecraft.client.network.ServerInfo;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.Optional;
|
||||
|
||||
@Mixin(targets = "net.minecraft.client.gui.screen.ConnectScreen$1")
|
||||
public class MixinConnectScreen_1 {
|
||||
|
||||
@Final
|
||||
@Shadow
|
||||
ServerInfo field_40415;
|
||||
|
||||
@Redirect(method = "run", at = @At(value = "INVOKE", target = "Ljava/util/Optional;get()Ljava/lang/Object;"))
|
||||
public Object mapSocketAddress(Optional<InetSocketAddress> instance) {
|
||||
final InetSocketAddress address = instance.get();
|
||||
final ComparableProtocolVersion forcedVersion = ((IServerInfo) field_40415).viafabricplus_forcedVersion();
|
||||
if (forcedVersion != null) {
|
||||
ProtocolHack.getForcedVersions().put(address, forcedVersion);
|
||||
ChangeProtocolVersionCallback.EVENT.invoker().onChangeProtocolVersion(forcedVersion);
|
||||
}
|
||||
return address;
|
||||
}
|
||||
}
|
@ -68,10 +68,6 @@ public class MixinConnectScreen_1 {
|
||||
@Shadow
|
||||
ConnectScreen field_2416;
|
||||
|
||||
@Final
|
||||
@Shadow
|
||||
ServerInfo field_40415;
|
||||
|
||||
@Redirect(method = "run", at = @At(value = "INVOKE", target = "Ljava/net/InetSocketAddress;getHostName()Ljava/lang/String;", ordinal = 0))
|
||||
public String replaceAddress(InetSocketAddress instance) {
|
||||
if (ProtocolHack.isOlderThanOrEqualToOrForced(instance, ProtocolVersion.v1_17) || ProtocolHack.isEqualToOrForced(instance, BedrockProtocolVersion.bedrockLatest)) {
|
||||
@ -98,17 +94,6 @@ public class MixinConnectScreen_1 {
|
||||
instance.send(packet);
|
||||
}
|
||||
|
||||
@Redirect(method = "run", at = @At(value = "INVOKE", target = "Ljava/util/Optional;get()Ljava/lang/Object;"))
|
||||
public Object mapSocketAddress(Optional<InetSocketAddress> instance) {
|
||||
final InetSocketAddress address = instance.get();
|
||||
final ComparableProtocolVersion forcedVersion = ((IServerInfo) field_40415).viafabricplus_forcedVersion();
|
||||
if (forcedVersion != null) {
|
||||
ProtocolHack.getForcedVersions().put(address, forcedVersion);
|
||||
ChangeProtocolVersionCallback.EVENT.invoker().onChangeProtocolVersion(forcedVersion);
|
||||
}
|
||||
return address;
|
||||
}
|
||||
|
||||
@Inject(method = "run", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/ClientConnection;send(Lnet/minecraft/network/packet/Packet;)V", ordinal = 1, shift = At.Shift.BEFORE))
|
||||
public void setupConnectionSessions(CallbackInfo ci) {
|
||||
final ClientConnection connection = field_2416.connection;
|
||||
|
@ -31,7 +31,7 @@ public class MixinMerchantScreenHandler {
|
||||
@Inject(method = "switchTo", at = @At("HEAD"), cancellable = true)
|
||||
private void injectSwitchTo(int recipeId, CallbackInfo ci) {
|
||||
if (ProtocolHack.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_13_2)) {
|
||||
ci.cancel(); // no lmao?
|
||||
ci.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -80,6 +80,6 @@ public class AuthenticationSettings extends SettingGroup {
|
||||
|
||||
|
||||
public AuthenticationSettings() {
|
||||
super("MP Pass");
|
||||
super("Authentication");
|
||||
}
|
||||
}
|
||||
|
@ -4,20 +4,21 @@
|
||||
"package": "de.florianmichael.viafabricplus.injection.mixin",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"client": [
|
||||
"base.MixinAddServerScreen",
|
||||
"base.MixinClientConnection",
|
||||
"base.MixinClientConnection_1",
|
||||
"base.MixinClientLoginNetworkHandler",
|
||||
"base.MixinConnectScreen",
|
||||
"base.MixinConnectScreen_1",
|
||||
"base.MixinDebugHud",
|
||||
"base.MixinDownloadingTerrainScreen",
|
||||
"base.MixinMain",
|
||||
"base.MixinMinecraftClient",
|
||||
"base.MixinMultiplayerScreen",
|
||||
"base.MixinMultiplayerServerListPinger",
|
||||
"base.MixinSharedConstants",
|
||||
"base.MixinAddServerScreen",
|
||||
"base.MixinConnectScreen",
|
||||
"base.MixinDebugHud",
|
||||
"base.MixinDownloadingTerrainScreen",
|
||||
"base.MixinOptionsScreen",
|
||||
"base.MixinServerInfo",
|
||||
"base.MixinSharedConstants",
|
||||
"fixes.minecraft.MixinBipedEntityModel",
|
||||
"fixes.minecraft.MixinCamera",
|
||||
"fixes.minecraft.MixinClientPlayerInteractionManager",
|
||||
|
Loading…
Reference in New Issue
Block a user