FlorianMichael 2023-04-24 20:33:50 +02:00
parent a1b3d23566
commit 0afc393291
2 changed files with 43 additions and 1 deletions

View File

@ -0,0 +1,41 @@
/*
* 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.fixes.viaversion.protocol1_9_1to1_9;
import com.viaversion.viaversion.api.protocol.AbstractProtocol;
import com.viaversion.viaversion.protocols.protocol1_9_1to1_9.Protocol1_9_1To1_9;
import com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
import com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.types.Chunk1_9_1_2Type;
import com.viaversion.viaversion.protocols.protocol1_9to1_8.ClientboundPackets1_9;
import com.viaversion.viaversion.protocols.protocol1_9to1_8.ServerboundPackets1_9;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(value = Protocol1_9_1To1_9.class, remap = false)
public class MixinProtocol1_9_1To1_9 extends AbstractProtocol<ClientboundPackets1_9, ClientboundPackets1_9, ServerboundPackets1_9, ServerboundPackets1_9> {
@Inject(method = "registerPackets", at = @At("RETURN"))
public void furry(CallbackInfo ci) {
registerClientbound(ClientboundPackets1_9.CHUNK_DATA, wrapper -> {
wrapper.passthrough(new Chunk1_9_1_2Type(wrapper.user().get(ClientWorld.class)));
wrapper.clearInputBuffer();
});
}
}

View File

@ -19,6 +19,7 @@
"base.MixinOptionsScreen", "base.MixinOptionsScreen",
"base.MixinServerInfo", "base.MixinServerInfo",
"base.MixinSharedConstants", "base.MixinSharedConstants",
"classic4j.MixinCCAuthenticationResponse",
"fixes.minecraft.MixinBipedEntityModel", "fixes.minecraft.MixinBipedEntityModel",
"fixes.minecraft.MixinCamera", "fixes.minecraft.MixinCamera",
"fixes.minecraft.MixinClientPlayerInteractionManager", "fixes.minecraft.MixinClientPlayerInteractionManager",
@ -158,7 +159,7 @@
"jsonwebtoken.MixinClasses", "jsonwebtoken.MixinClasses",
"jsonwebtoken.MixinDefaultCompressionCodecResolver", "jsonwebtoken.MixinDefaultCompressionCodecResolver",
"jsonwebtoken.MixinDefaultJwtParserBuilder", "jsonwebtoken.MixinDefaultJwtParserBuilder",
"classic4j.MixinCCAuthenticationResponse" "fixes.viaversion.protocol1_9_1to1_9.MixinProtocol1_9_1To1_9"
], ],
"injectors": { "injectors": {
"defaultRequire": 1 "defaultRequire": 1