diff --git a/src/main/java/de/florianmichael/viafabricplus/fixes/tracker/JoinGameDataTracker.java b/src/main/java/de/florianmichael/viafabricplus/fixes/viaversion/JoinGameDataTracker.java
similarity index 96%
rename from src/main/java/de/florianmichael/viafabricplus/fixes/tracker/JoinGameDataTracker.java
rename to src/main/java/de/florianmichael/viafabricplus/fixes/viaversion/JoinGameDataTracker.java
index 77e6f5b7..c0b00ef1 100644
--- a/src/main/java/de/florianmichael/viafabricplus/fixes/tracker/JoinGameDataTracker.java
+++ b/src/main/java/de/florianmichael/viafabricplus/fixes/viaversion/JoinGameDataTracker.java
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-package de.florianmichael.viafabricplus.fixes.tracker;
+package de.florianmichael.viafabricplus.fixes.viaversion;
import com.viaversion.viaversion.api.connection.StoredObject;
import com.viaversion.viaversion.api.connection.UserConnection;
diff --git a/src/main/java/de/florianmichael/viafabricplus/fixes/tracker/TeleportTracker.java b/src/main/java/de/florianmichael/viafabricplus/fixes/viaversion/TeleportTracker.java
similarity index 95%
rename from src/main/java/de/florianmichael/viafabricplus/fixes/tracker/TeleportTracker.java
rename to src/main/java/de/florianmichael/viafabricplus/fixes/viaversion/TeleportTracker.java
index 28741ef5..1bd758c3 100644
--- a/src/main/java/de/florianmichael/viafabricplus/fixes/tracker/TeleportTracker.java
+++ b/src/main/java/de/florianmichael/viafabricplus/fixes/viaversion/TeleportTracker.java
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-package de.florianmichael.viafabricplus.fixes.tracker;
+package de.florianmichael.viafabricplus.fixes.viaversion;
import com.viaversion.viaversion.api.connection.StoredObject;
import com.viaversion.viaversion.api.connection.UserConnection;
diff --git a/src/main/java/de/florianmichael/viafabricplus/fixes/VFPProtocol.java b/src/main/java/de/florianmichael/viafabricplus/fixes/viaversion/ViaFabricPlusProtocol.java
similarity index 95%
rename from src/main/java/de/florianmichael/viafabricplus/fixes/VFPProtocol.java
rename to src/main/java/de/florianmichael/viafabricplus/fixes/viaversion/ViaFabricPlusProtocol.java
index 84fd8204..1612cc5f 100644
--- a/src/main/java/de/florianmichael/viafabricplus/fixes/VFPProtocol.java
+++ b/src/main/java/de/florianmichael/viafabricplus/fixes/viaversion/ViaFabricPlusProtocol.java
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-package de.florianmichael.viafabricplus.fixes;
+package de.florianmichael.viafabricplus.fixes.viaversion;
import com.viaversion.viaversion.api.protocol.AbstractSimpleProtocol;
import com.viaversion.viaversion.api.protocol.packet.ClientboundPacketType;
@@ -41,13 +41,13 @@ import java.util.HashMap;
import java.util.Map;
// Protocol to handle error handling changes in older protocols, always last element of the pipeline
-public class VFPProtocol extends AbstractSimpleProtocol {
+public class ViaFabricPlusProtocol extends AbstractSimpleProtocol {
- public static final VFPProtocol INSTANCE = new VFPProtocol();
+ public static final ViaFabricPlusProtocol INSTANCE = new ViaFabricPlusProtocol();
private final Map> payloadDiff = new HashMap<>();
- public VFPProtocol() {
+ public ViaFabricPlusProtocol() {
registerMapping(BrandCustomPayload.ID, LegacyProtocolVersion.c0_0_15a_1, wrapper -> wrapper.passthrough(Types.STRING));
registerMapping(DebugGameTestAddMarkerCustomPayload.ID, ProtocolVersion.v1_14, wrapper -> {
wrapper.passthrough(Types.BLOCK_POSITION1_14);
diff --git a/src/main/java/de/florianmichael/viafabricplus/fixes/tracker/WolfHealthTracker.java b/src/main/java/de/florianmichael/viafabricplus/fixes/viaversion/WolfHealthTracker.java
similarity index 97%
rename from src/main/java/de/florianmichael/viafabricplus/fixes/tracker/WolfHealthTracker.java
rename to src/main/java/de/florianmichael/viafabricplus/fixes/viaversion/WolfHealthTracker.java
index e9ba3e3a..82342c17 100644
--- a/src/main/java/de/florianmichael/viafabricplus/fixes/tracker/WolfHealthTracker.java
+++ b/src/main/java/de/florianmichael/viafabricplus/fixes/viaversion/WolfHealthTracker.java
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-package de.florianmichael.viafabricplus.fixes.tracker;
+package de.florianmichael.viafabricplus.fixes.viaversion;
import com.viaversion.viaversion.api.connection.StoredObject;
import com.viaversion.viaversion.api.connection.UserConnection;
diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/integration/MixinDebugHud.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/integration/MixinDebugHud.java
index 33e1f08c..05b9ac7f 100644
--- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/integration/MixinDebugHud.java
+++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/integration/MixinDebugHud.java
@@ -21,7 +21,7 @@ package de.florianmichael.viafabricplus.injection.mixin.base.integration;
import com.viaversion.viaversion.api.connection.ProtocolInfo;
import com.viaversion.viaversion.api.connection.UserConnection;
-import de.florianmichael.viafabricplus.fixes.tracker.JoinGameDataTracker;
+import de.florianmichael.viafabricplus.fixes.viaversion.JoinGameDataTracker;
import de.florianmichael.viafabricplus.injection.ViaFabricPlusMixinPlugin;
import de.florianmichael.viafabricplus.injection.access.IChunkTracker;
import de.florianmichael.viafabricplus.injection.access.IRakSessionCodec;
diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinWolfEntity.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinWolfEntity.java
index 900480e0..08d0d316 100644
--- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinWolfEntity.java
+++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinWolfEntity.java
@@ -20,7 +20,7 @@
package de.florianmichael.viafabricplus.injection.mixin.fixes.minecraft.entity;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
-import de.florianmichael.viafabricplus.fixes.tracker.WolfHealthTracker;
+import de.florianmichael.viafabricplus.fixes.viaversion.WolfHealthTracker;
import de.florianmichael.viafabricplus.protocoltranslator.ProtocolTranslator;
import net.minecraft.component.DataComponentTypes;
import net.minecraft.component.type.FoodComponent;
diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/network/MixinClientPlayNetworkHandler.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/network/MixinClientPlayNetworkHandler.java
index a51ece78..38378e45 100644
--- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/network/MixinClientPlayNetworkHandler.java
+++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/network/MixinClientPlayNetworkHandler.java
@@ -51,7 +51,6 @@ import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.*;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import java.util.ArrayList;
import java.util.LinkedHashSet;
@@ -78,9 +77,6 @@ public abstract class MixinClientPlayNetworkHandler extends ClientCommonNetworkH
@Shadow
protected abstract boolean isSecureChatEnforced();
- @Shadow
- public abstract void sendChatCommand(String command);
-
protected MixinClientPlayNetworkHandler(MinecraftClient client, ClientConnection connection, ClientConnectionState connectionState) {
super(client, connection, connectionState);
}
@@ -94,14 +90,6 @@ public abstract class MixinClientPlayNetworkHandler extends ClientCommonNetworkH
}
}
- @Inject(method = "sendCommand", at = @At("HEAD"), cancellable = true)
- private void alwaysSendSignedCommand(String command, CallbackInfoReturnable cir) {
- if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_20_3)) {
- sendChatCommand(command);
- cir.setReturnValue(true);
- }
- }
-
@WrapWithCondition(method = "onEnterReconfiguration", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayNetworkHandler;sendAcknowledgment()V"))
private boolean dontSendChatAck(ClientPlayNetworkHandler instance) {
return ProtocolTranslator.getTargetVersion().newerThanOrEqualTo(ProtocolVersion.v1_20_5);
diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/vialegacy/MixinProtocolr1_7_6_10Tor1_8.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/vialegacy/MixinProtocolr1_7_6_10Tor1_8.java
index 27ed9edd..11594c42 100644
--- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/vialegacy/MixinProtocolr1_7_6_10Tor1_8.java
+++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/vialegacy/MixinProtocolr1_7_6_10Tor1_8.java
@@ -25,7 +25,7 @@ import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers;
import com.viaversion.viaversion.api.type.Types;
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_8;
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ServerboundPackets1_8;
-import de.florianmichael.viafabricplus.fixes.tracker.TeleportTracker;
+import de.florianmichael.viafabricplus.fixes.viaversion.TeleportTracker;
import net.raphimc.vialegacy.protocol.release.r1_7_2_5tor1_7_6_10.packet.ClientboundPackets1_7_2;
import net.raphimc.vialegacy.protocol.release.r1_7_2_5tor1_7_6_10.packet.ServerboundPackets1_7_2;
import net.raphimc.vialegacy.protocol.release.r1_7_6_10tor1_8.Protocolr1_7_6_10Tor1_8;
diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinEntityPacketRewriter1_15.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinEntityPacketRewriter1_15.java
index d3efe3d5..b834e7cf 100644
--- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinEntityPacketRewriter1_15.java
+++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinEntityPacketRewriter1_15.java
@@ -24,7 +24,7 @@ import com.viaversion.viaversion.protocols.v1_14_4to1_15.Protocol1_14_4To1_15;
import com.viaversion.viaversion.protocols.v1_14_4to1_15.rewriter.EntityPacketRewriter1_15;
import com.viaversion.viaversion.rewriter.EntityRewriter;
import com.viaversion.viaversion.rewriter.entitydata.EntityDataFilter;
-import de.florianmichael.viafabricplus.fixes.tracker.WolfHealthTracker;
+import de.florianmichael.viafabricplus.fixes.viaversion.WolfHealthTracker;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/viabedrock/MixinBedrockProtocol.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/viabedrock/MixinBedrockProtocol.java
index 8c50786c..356d6a60 100644
--- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/viabedrock/MixinBedrockProtocol.java
+++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/viabedrock/MixinBedrockProtocol.java
@@ -20,7 +20,7 @@
package de.florianmichael.viafabricplus.injection.mixin.viabedrock;
import com.viaversion.viaversion.api.connection.UserConnection;
-import de.florianmichael.viafabricplus.fixes.tracker.JoinGameDataTracker;
+import de.florianmichael.viafabricplus.fixes.viaversion.JoinGameDataTracker;
import net.raphimc.viabedrock.protocol.BedrockProtocol;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/viabedrock/MixinJoinPackets.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/viabedrock/MixinJoinPackets.java
index 31e28e09..85647084 100644
--- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/viabedrock/MixinJoinPackets.java
+++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/viabedrock/MixinJoinPackets.java
@@ -21,7 +21,7 @@ package de.florianmichael.viafabricplus.injection.mixin.viabedrock;
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
import com.viaversion.viaversion.api.type.Type;
-import de.florianmichael.viafabricplus.fixes.tracker.JoinGameDataTracker;
+import de.florianmichael.viafabricplus.fixes.viaversion.JoinGameDataTracker;
import net.raphimc.viabedrock.protocol.packets.JoinPackets;
import net.raphimc.viabedrock.protocol.types.primitive.LongLEType;
import net.raphimc.viabedrock.protocol.types.primitive.StringType;
diff --git a/src/main/java/de/florianmichael/viafabricplus/protocoltranslator/ProtocolTranslator.java b/src/main/java/de/florianmichael/viafabricplus/protocoltranslator/ProtocolTranslator.java
index 3e83b804..384bda78 100644
--- a/src/main/java/de/florianmichael/viafabricplus/protocoltranslator/ProtocolTranslator.java
+++ b/src/main/java/de/florianmichael/viafabricplus/protocoltranslator/ProtocolTranslator.java
@@ -35,7 +35,7 @@ import com.viaversion.viaversion.connection.UserConnectionImpl;
import com.viaversion.viaversion.protocol.ProtocolPipelineImpl;
import com.viaversion.viaversion.protocols.v1_20_3to1_20_5.Protocol1_20_3To1_20_5;
import de.florianmichael.viafabricplus.event.ChangeProtocolVersionCallback;
-import de.florianmichael.viafabricplus.fixes.VFPProtocol;
+import de.florianmichael.viafabricplus.fixes.viaversion.ViaFabricPlusProtocol;
import de.florianmichael.viafabricplus.injection.access.IClientConnection;
import de.florianmichael.viafabricplus.protocoltranslator.impl.command.ViaFabricPlusVLCommandHandler;
import de.florianmichael.viafabricplus.protocoltranslator.impl.platform.ViaFabricPlusViaLegacyPlatformImpl;
@@ -323,7 +323,7 @@ public class ProtocolTranslator {
);
Protocol1_20_3To1_20_5.strictErrorHandling = false;
ProtocolVersion.register(AUTO_DETECT_PROTOCOL);
- VFPProtocol.INSTANCE.initialize();
+ ViaFabricPlusProtocol.INSTANCE.initialize();
});
}
diff --git a/src/main/java/de/florianmichael/viafabricplus/protocoltranslator/netty/ViaFabricPlusVLLegacyPipeline.java b/src/main/java/de/florianmichael/viafabricplus/protocoltranslator/netty/ViaFabricPlusVLLegacyPipeline.java
index 93306608..5b744176 100644
--- a/src/main/java/de/florianmichael/viafabricplus/protocoltranslator/netty/ViaFabricPlusVLLegacyPipeline.java
+++ b/src/main/java/de/florianmichael/viafabricplus/protocoltranslator/netty/ViaFabricPlusVLLegacyPipeline.java
@@ -22,7 +22,7 @@ package de.florianmichael.viafabricplus.protocoltranslator.netty;
import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import de.florianmichael.viafabricplus.ViaFabricPlus;
-import de.florianmichael.viafabricplus.fixes.VFPProtocol;
+import de.florianmichael.viafabricplus.fixes.viaversion.ViaFabricPlusProtocol;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import net.minecraft.network.handler.HandlerNames;
@@ -47,7 +47,7 @@ public class ViaFabricPlusVLLegacyPipeline extends VLLegacyPipeline {
ctx.pipeline().addAfter(VIA_DECODER_NAME, VIA_FLOW_CONTROL, new NoReadFlowControlHandler());
- this.user.getProtocolInfo().getPipeline().add(VFPProtocol.INSTANCE);
+ this.user.getProtocolInfo().getPipeline().add(ViaFabricPlusProtocol.INSTANCE);
}
@Override
diff --git a/src/main/java/de/florianmichael/viafabricplus/protocoltranslator/translator/ItemTranslator.java b/src/main/java/de/florianmichael/viafabricplus/protocoltranslator/translator/ItemTranslator.java
index 9f7a8d61..d2cb56ba 100644
--- a/src/main/java/de/florianmichael/viafabricplus/protocoltranslator/translator/ItemTranslator.java
+++ b/src/main/java/de/florianmichael/viafabricplus/protocoltranslator/translator/ItemTranslator.java
@@ -29,7 +29,7 @@ import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.Types;
import com.viaversion.viaversion.api.type.types.version.Types1_20_5;
import de.florianmichael.viafabricplus.ViaFabricPlus;
-import de.florianmichael.viafabricplus.fixes.VFPProtocol;
+import de.florianmichael.viafabricplus.fixes.viaversion.ViaFabricPlusProtocol;
import de.florianmichael.viafabricplus.protocoltranslator.ProtocolTranslator;
import io.netty.buffer.Unpooled;
import net.minecraft.client.MinecraftClient;
@@ -60,7 +60,7 @@ public class ItemTranslator {
buf.writeShort(0); // slot
ItemStack.OPTIONAL_PACKET_CODEC.encode(buf, stack); // item
- final PacketWrapper setCreativeModeSlot = PacketWrapper.create(VFPProtocol.getSetCreativeModeSlot(), buf, user);
+ final PacketWrapper setCreativeModeSlot = PacketWrapper.create(ViaFabricPlusProtocol.getSetCreativeModeSlot(), buf, user);
user.getProtocolInfo().getPipeline().transform(Direction.SERVERBOUND, State.PLAY, setCreativeModeSlot);
setCreativeModeSlot.read(Types.SHORT); // slot