From f44782d21df904e73ebd6fa97ea5fa23b9d497a2 Mon Sep 17 00:00:00 2001 From: EnZaXD <60033407+FlorianMichael@users.noreply.github.com> Date: Mon, 1 Apr 2024 12:55:50 +0200 Subject: [PATCH] Fix minor inconsistencies in protocol packages (#3768) --- .../main/java/com/viaversion/viaversion/ViaManagerImpl.java | 2 +- .../protocols/protocol1_11to1_10/Protocol1_11To1_10.java | 2 ++ .../metadata/MetadataRewriter1_11To1_10.java | 2 +- .../protocols/protocol1_11to1_10/packets/InventoryPackets.java | 2 +- .../protocol1_11to1_10/{ => rewriter}/BlockEntityRewriter.java | 2 +- .../protocol1_11to1_10/{ => rewriter}/EntityIdRewriter.java | 2 +- .../protocol1_13to1_12_2/{ => task}/TabCompleteThread.java | 3 ++- .../protocol1_18to1_17_1/{ => data}/BlockEntityIds.java | 2 +- .../protocols/protocol1_18to1_17_1/packets/WorldPackets.java | 2 +- .../protocol1_9_3to1_9_1_2/Protocol1_9_3To1_9_1_2.java | 2 +- .../{chunks => data}/FakeTileEntity.java | 2 +- 11 files changed, 13 insertions(+), 10 deletions(-) rename common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/{ => rewriter}/BlockEntityRewriter.java (97%) rename common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/{ => rewriter}/EntityIdRewriter.java (98%) rename common/src/main/java/com/viaversion/viaversion/protocols/protocol1_13to1_12_2/{ => task}/TabCompleteThread.java (94%) rename common/src/main/java/com/viaversion/viaversion/protocols/protocol1_18to1_17_1/{ => data}/BlockEntityIds.java (99%) rename common/src/main/java/com/viaversion/viaversion/protocols/protocol1_9_3to1_9_1_2/{chunks => data}/FakeTileEntity.java (99%) diff --git a/common/src/main/java/com/viaversion/viaversion/ViaManagerImpl.java b/common/src/main/java/com/viaversion/viaversion/ViaManagerImpl.java index 7cbc838ea..5d2dc50b0 100644 --- a/common/src/main/java/com/viaversion/viaversion/ViaManagerImpl.java +++ b/common/src/main/java/com/viaversion/viaversion/ViaManagerImpl.java @@ -39,7 +39,7 @@ import com.viaversion.viaversion.debug.DebugHandlerImpl; import com.viaversion.viaversion.protocol.ProtocolManagerImpl; import com.viaversion.viaversion.protocol.ServerProtocolVersionRange; import com.viaversion.viaversion.protocol.ServerProtocolVersionSingleton; -import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.TabCompleteThread; +import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.task.TabCompleteThread; import com.viaversion.viaversion.protocols.protocol1_9to1_8.ViaIdleThread; import com.viaversion.viaversion.scheduler.TaskScheduler; import com.viaversion.viaversion.update.UpdateUtil; diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/Protocol1_11To1_10.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/Protocol1_11To1_10.java index dd161f78f..e733e3153 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/Protocol1_11To1_10.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/Protocol1_11To1_10.java @@ -34,6 +34,8 @@ import com.viaversion.viaversion.api.type.types.version.Types1_9; import com.viaversion.viaversion.protocols.protocol1_11to1_10.data.PotionColorMapping; import com.viaversion.viaversion.protocols.protocol1_11to1_10.metadata.MetadataRewriter1_11To1_10; import com.viaversion.viaversion.protocols.protocol1_11to1_10.packets.InventoryPackets; +import com.viaversion.viaversion.protocols.protocol1_11to1_10.rewriter.BlockEntityRewriter; +import com.viaversion.viaversion.protocols.protocol1_11to1_10.rewriter.EntityIdRewriter; import com.viaversion.viaversion.protocols.protocol1_11to1_10.storage.EntityTracker1_11; import com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.ClientboundPackets1_9_3; import com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.ServerboundPackets1_9_3; diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/metadata/MetadataRewriter1_11To1_10.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/metadata/MetadataRewriter1_11To1_10.java index 66ae23ab4..6862dc31f 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/metadata/MetadataRewriter1_11To1_10.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/metadata/MetadataRewriter1_11To1_10.java @@ -25,7 +25,7 @@ import com.viaversion.viaversion.api.minecraft.metadata.Metadata; import com.viaversion.viaversion.api.minecraft.metadata.types.MetaType1_9; import com.viaversion.viaversion.api.protocol.packet.PacketWrapper; import com.viaversion.viaversion.api.type.Type; -import com.viaversion.viaversion.protocols.protocol1_11to1_10.EntityIdRewriter; +import com.viaversion.viaversion.protocols.protocol1_11to1_10.rewriter.EntityIdRewriter; import com.viaversion.viaversion.protocols.protocol1_11to1_10.Protocol1_11To1_10; import com.viaversion.viaversion.protocols.protocol1_11to1_10.storage.EntityTracker1_11; import com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.ClientboundPackets1_9_3; diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/packets/InventoryPackets.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/packets/InventoryPackets.java index 15bb2f319..7882e106c 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/packets/InventoryPackets.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/packets/InventoryPackets.java @@ -20,7 +20,7 @@ package com.viaversion.viaversion.protocols.protocol1_11to1_10.packets; import com.viaversion.viaversion.api.minecraft.item.Item; import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers; import com.viaversion.viaversion.api.type.Type; -import com.viaversion.viaversion.protocols.protocol1_11to1_10.EntityIdRewriter; +import com.viaversion.viaversion.protocols.protocol1_11to1_10.rewriter.EntityIdRewriter; import com.viaversion.viaversion.protocols.protocol1_11to1_10.Protocol1_11To1_10; import com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.ClientboundPackets1_9_3; import com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.ServerboundPackets1_9_3; diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/BlockEntityRewriter.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/rewriter/BlockEntityRewriter.java similarity index 97% rename from common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/BlockEntityRewriter.java rename to common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/rewriter/BlockEntityRewriter.java index 336929692..4cb45e9d4 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/BlockEntityRewriter.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/rewriter/BlockEntityRewriter.java @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.viaversion.viaversion.protocols.protocol1_11to1_10; +package com.viaversion.viaversion.protocols.protocol1_11to1_10.rewriter; import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/EntityIdRewriter.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/rewriter/EntityIdRewriter.java similarity index 98% rename from common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/EntityIdRewriter.java rename to common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/rewriter/EntityIdRewriter.java index 73b39c0f3..87b742137 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/EntityIdRewriter.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_11to1_10/rewriter/EntityIdRewriter.java @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.viaversion.viaversion.protocols.protocol1_11to1_10; +package com.viaversion.viaversion.protocols.protocol1_11to1_10.rewriter; import com.github.steveice10.opennbt.tag.builtin.CompoundTag; import com.github.steveice10.opennbt.tag.builtin.StringTag; diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_13to1_12_2/TabCompleteThread.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_13to1_12_2/task/TabCompleteThread.java similarity index 94% rename from common/src/main/java/com/viaversion/viaversion/protocols/protocol1_13to1_12_2/TabCompleteThread.java rename to common/src/main/java/com/viaversion/viaversion/protocols/protocol1_13to1_12_2/task/TabCompleteThread.java index f400c1372..1e344a7f6 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_13to1_12_2/TabCompleteThread.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_13to1_12_2/task/TabCompleteThread.java @@ -15,10 +15,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.viaversion.viaversion.protocols.protocol1_13to1_12_2; +package com.viaversion.viaversion.protocols.protocol1_13to1_12_2.task; import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.connection.UserConnection; +import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.Protocol1_13To1_12_2; import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.storage.TabCompleteTracker; public class TabCompleteThread implements Runnable { diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_18to1_17_1/BlockEntityIds.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_18to1_17_1/data/BlockEntityIds.java similarity index 99% rename from common/src/main/java/com/viaversion/viaversion/protocols/protocol1_18to1_17_1/BlockEntityIds.java rename to common/src/main/java/com/viaversion/viaversion/protocols/protocol1_18to1_17_1/data/BlockEntityIds.java index 63e6ef114..6baf11257 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_18to1_17_1/BlockEntityIds.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_18to1_17_1/data/BlockEntityIds.java @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.viaversion.viaversion.protocols.protocol1_18to1_17_1; +package com.viaversion.viaversion.protocols.protocol1_18to1_17_1.data; import com.viaversion.viaversion.api.Via; import java.util.Arrays; diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_18to1_17_1/packets/WorldPackets.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_18to1_17_1/packets/WorldPackets.java index b817d2010..434d631b0 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_18to1_17_1/packets/WorldPackets.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_18to1_17_1/packets/WorldPackets.java @@ -35,7 +35,7 @@ import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_17; import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_18; import com.viaversion.viaversion.protocols.protocol1_17_1to1_17.ClientboundPackets1_17_1; -import com.viaversion.viaversion.protocols.protocol1_18to1_17_1.BlockEntityIds; +import com.viaversion.viaversion.protocols.protocol1_18to1_17_1.data.BlockEntityIds; import com.viaversion.viaversion.protocols.protocol1_18to1_17_1.Protocol1_18To1_17_1; import com.viaversion.viaversion.protocols.protocol1_18to1_17_1.data.BlockEntities; import com.viaversion.viaversion.protocols.protocol1_18to1_17_1.storage.ChunkLightStorage; diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_9_3to1_9_1_2/Protocol1_9_3To1_9_1_2.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_9_3to1_9_1_2/Protocol1_9_3To1_9_1_2.java index f0349bc91..3b05f8a92 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_9_3to1_9_1_2/Protocol1_9_3To1_9_1_2.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_9_3to1_9_1_2/Protocol1_9_3To1_9_1_2.java @@ -35,7 +35,7 @@ import com.viaversion.viaversion.api.protocol.remapper.ValueTransformer; import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_9_1; import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_9_3; -import com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.chunks.FakeTileEntity; +import com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.data.FakeTileEntity; import com.viaversion.viaversion.protocols.protocol1_9to1_8.ClientboundPackets1_9; import com.viaversion.viaversion.protocols.protocol1_9to1_8.ServerboundPackets1_9; import java.util.List; diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_9_3to1_9_1_2/chunks/FakeTileEntity.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_9_3to1_9_1_2/data/FakeTileEntity.java similarity index 99% rename from common/src/main/java/com/viaversion/viaversion/protocols/protocol1_9_3to1_9_1_2/chunks/FakeTileEntity.java rename to common/src/main/java/com/viaversion/viaversion/protocols/protocol1_9_3to1_9_1_2/data/FakeTileEntity.java index 086737112..fc7fea847 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_9_3to1_9_1_2/chunks/FakeTileEntity.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_9_3to1_9_1_2/data/FakeTileEntity.java @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.chunks; +package com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.data; import com.github.steveice10.opennbt.tag.builtin.CompoundTag; import com.github.steveice10.opennbt.tag.builtin.IntTag;