Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-26 00:00:28 +01:00
Package/class renames and moves
Dieser Commit ist enthalten in:
Ursprung
75db1a7cdf
Commit
e965e97139
@ -16,7 +16,9 @@ sourceSets {
|
||||
|
||||
dependencies {
|
||||
api(libs.fastutil)
|
||||
api(libs.vianbt)
|
||||
api(libs.vianbt) {
|
||||
exclude("it.unimi.dsi", "fastutil")
|
||||
}
|
||||
api(libs.gson)
|
||||
implementation(rootProject.libs.text) {
|
||||
exclude("com.google.code.gson", "gson")
|
||||
|
@ -22,9 +22,9 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.data;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.IntArrayTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.Tag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.nbt.tag.IntArrayTag;
|
||||
import com.viaversion.nbt.tag.Tag;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.minecraft.RegistryType;
|
||||
import com.viaversion.viaversion.api.minecraft.TagData;
|
||||
|
@ -22,15 +22,15 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.data;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.ByteTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.IntArrayTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.IntTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.ListTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.StringTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.Tag;
|
||||
import com.github.steveice10.opennbt.tag.io.NBTIO;
|
||||
import com.github.steveice10.opennbt.tag.io.TagReader;
|
||||
import com.viaversion.nbt.tag.ByteTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.nbt.tag.IntArrayTag;
|
||||
import com.viaversion.nbt.tag.IntTag;
|
||||
import com.viaversion.nbt.tag.ListTag;
|
||||
import com.viaversion.nbt.tag.StringTag;
|
||||
import com.viaversion.nbt.tag.Tag;
|
||||
import com.viaversion.nbt.io.NBTIO;
|
||||
import com.viaversion.nbt.io.TagReader;
|
||||
import com.google.common.annotations.Beta;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.Tag;
|
||||
import com.viaversion.nbt.tag.Tag;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
public record RegistryEntry(String key, @Nullable Tag tag) {
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.blockentity;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
public interface BlockEntity {
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.blockentity;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
|
||||
public record BlockEntityImpl(byte packedXZ, short y, int typeId, CompoundTag tag) implements BlockEntity {
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.chunks;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.minecraft.blockentity.BlockEntity;
|
||||
import java.util.BitSet;
|
||||
import java.util.List;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.chunks;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.minecraft.blockentity.BlockEntity;
|
||||
import java.util.BitSet;
|
||||
import java.util.List;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.chunks;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.minecraft.blockentity.BlockEntity;
|
||||
import java.util.BitSet;
|
||||
import java.util.List;
|
||||
|
@ -22,8 +22,8 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.data;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.Tag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.nbt.tag.Tag;
|
||||
import com.viaversion.viaversion.api.minecraft.GameProfile;
|
||||
import com.viaversion.viaversion.api.minecraft.Holder;
|
||||
import com.viaversion.viaversion.api.minecraft.item.Item;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.item;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.viaversion.viaversion.api.minecraft.data.StructuredDataContainer;
|
||||
import java.util.Objects;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.item;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.minecraft.data.StructuredDataContainer;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.item;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.minecraft.data.StructuredDataContainer;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.item.data;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.Tag;
|
||||
import com.viaversion.nbt.tag.Tag;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.misc.HolderType;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.item.data;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.Tag;
|
||||
import com.viaversion.nbt.tag.Tag;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.misc.HolderType;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.item.data;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.ArrayType;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.item.data;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.minecraft.HolderSet;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.ArrayType;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.item.data;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.Tag;
|
||||
import com.viaversion.nbt.tag.Tag;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.ArrayType;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
@ -22,8 +22,8 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.Tag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.nbt.tag.Tag;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.viaversion.viaversion.api.minecraft.BlockChangeRecord;
|
||||
import com.viaversion.viaversion.api.minecraft.EulerAngle;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.block;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.minecraft.blockentity.BlockEntity;
|
||||
import com.viaversion.viaversion.api.minecraft.blockentity.BlockEntityImpl;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.block;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.minecraft.blockentity.BlockEntity;
|
||||
import com.viaversion.viaversion.api.minecraft.blockentity.BlockEntityImpl;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.chunk;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.minecraft.Environment;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.BaseChunk;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.chunk;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.BaseChunk;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.Chunk;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.chunk;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.BaseChunk;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.Chunk;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.chunk;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.BaseChunk;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.Chunk;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.chunk;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.BaseChunk;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.Chunk;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.chunk;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.BaseChunk;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.chunk;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.viaversion.viaversion.api.minecraft.blockentity.BlockEntity;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.Chunk;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.chunk;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.viaversion.viaversion.api.minecraft.blockentity.BlockEntity;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.Chunk;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.chunk;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.minecraft.Environment;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.BaseChunk;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.misc;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.type.OptionalType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
@ -22,9 +22,9 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.misc;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.Tag;
|
||||
import com.github.steveice10.opennbt.tag.limiter.TagLimiter;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.nbt.tag.Tag;
|
||||
import com.viaversion.nbt.limiter.TagLimiter;
|
||||
import com.viaversion.viaversion.api.type.OptionalType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
@ -22,9 +22,9 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.misc;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.TagRegistry;
|
||||
import com.github.steveice10.opennbt.tag.builtin.Tag;
|
||||
import com.github.steveice10.opennbt.tag.limiter.TagLimiter;
|
||||
import com.viaversion.nbt.io.TagRegistry;
|
||||
import com.viaversion.nbt.tag.Tag;
|
||||
import com.viaversion.nbt.limiter.TagLimiter;
|
||||
import com.viaversion.viaversion.api.type.OptionalType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
@ -23,7 +23,6 @@ tasks {
|
||||
|
||||
fun ShadowJar.configureRelocations() {
|
||||
relocate("com.google.gson", "com.viaversion.viaversion.libs.gson")
|
||||
relocate("com.github.steveice10.opennbt", "com.viaversion.viaversion.libs.opennbt")
|
||||
relocate("it.unimi.dsi.fastutil", "com.viaversion.viaversion.libs.fastutil")
|
||||
relocate("net.lenni0451.mcstructs", "com.viaversion.viaversion.libs.mcstructs")
|
||||
}
|
||||
|
@ -21,9 +21,9 @@ import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.bukkit.listeners.ViaBukkitListener;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.ArmorType;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.ClientboundPackets1_9;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.Protocol1_9To1_8;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.ArmorType;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9;
|
||||
import java.util.UUID;
|
||||
import java.util.logging.Level;
|
||||
import org.bukkit.Bukkit;
|
||||
@ -47,7 +47,7 @@ public class ArmorListener extends ViaBukkitListener {
|
||||
private static final UUID ARMOR_ATTRIBUTE = UUID.fromString("2AD3F246-FEE1-4E67-B886-69FD380BB150");
|
||||
|
||||
public ArmorListener(Plugin plugin) {
|
||||
super(plugin, Protocol1_9To1_8.class);
|
||||
super(plugin, Protocol1_8To1_9.class);
|
||||
}
|
||||
|
||||
public void sendArmorUpdate(Player player) {
|
||||
@ -68,7 +68,7 @@ public class ArmorListener extends ViaBukkitListener {
|
||||
wrapper.write(Type.UUID, ARMOR_ATTRIBUTE); // armor modifier uuid
|
||||
wrapper.write(Type.DOUBLE, (double) armor); // the modifier value
|
||||
wrapper.write(Type.BYTE, (byte) 0);// the modifier operation, 0 = add number
|
||||
wrapper.scheduleSend(Protocol1_9To1_8.class);
|
||||
wrapper.scheduleSend(Protocol1_8To1_9.class);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
|
@ -19,8 +19,8 @@ package com.viaversion.viaversion.bukkit.listeners.protocol1_9to1_8;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.Position;
|
||||
import com.viaversion.viaversion.bukkit.listeners.ViaBukkitListener;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.Protocol1_9To1_8;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.storage.EntityTracker1_9;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.storage.EntityTracker1_9;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
@ -30,14 +30,14 @@ import org.bukkit.plugin.Plugin;
|
||||
public class BlockListener extends ViaBukkitListener {
|
||||
|
||||
public BlockListener(Plugin plugin) {
|
||||
super(plugin, Protocol1_9To1_8.class);
|
||||
super(plugin, Protocol1_8To1_9.class);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void placeBlock(BlockPlaceEvent e) {
|
||||
if (isOnPipe(e.getPlayer())) {
|
||||
Block b = e.getBlockPlaced();
|
||||
EntityTracker1_9 tracker = getUserConnection(e.getPlayer()).getEntityTracker(Protocol1_9To1_8.class);
|
||||
EntityTracker1_9 tracker = getUserConnection(e.getPlayer()).getEntityTracker(Protocol1_8To1_9.class);
|
||||
tracker.addBlockInteraction(new Position(b.getX(), b.getY(), b.getZ()));
|
||||
}
|
||||
}
|
||||
|
@ -22,8 +22,8 @@ import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.bukkit.listeners.ViaBukkitListener;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.ClientboundPackets1_9;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.Protocol1_9To1_8;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9;
|
||||
import com.viaversion.viaversion.util.ComponentUtil;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -36,7 +36,7 @@ import java.util.logging.Level;
|
||||
public class DeathListener extends ViaBukkitListener {
|
||||
|
||||
public DeathListener(Plugin plugin) {
|
||||
super(plugin, Protocol1_9To1_8.class);
|
||||
super(plugin, Protocol1_8To1_9.class);
|
||||
}
|
||||
|
||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
|
||||
@ -66,7 +66,7 @@ public class DeathListener extends ViaBukkitListener {
|
||||
wrapper.write(Type.INT, p.getEntityId()); // Entity ID
|
||||
wrapper.write(Type.COMPONENT, ComponentUtil.plainToJson(msg)); // Message
|
||||
|
||||
wrapper.scheduleSend(Protocol1_9To1_8.class);
|
||||
wrapper.scheduleSend(Protocol1_8To1_9.class);
|
||||
} catch (Exception e) {
|
||||
Via.getPlatform().getLogger().log(Level.WARNING, "Failed to send death message", e);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ package com.viaversion.viaversion.bukkit.listeners.protocol1_9to1_8;
|
||||
|
||||
import com.viaversion.viaversion.bukkit.listeners.ViaBukkitListener;
|
||||
import com.viaversion.viaversion.bukkit.util.CollisionChecker;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.Protocol1_9To1_8;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
@ -34,7 +34,7 @@ public class PaperPatch extends ViaBukkitListener {
|
||||
private final CollisionChecker CHECKER = CollisionChecker.getInstance();
|
||||
|
||||
public PaperPatch(Plugin plugin) {
|
||||
super(plugin, Protocol1_9To1_8.class);
|
||||
super(plugin, Protocol1_8To1_9.class);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -18,7 +18,7 @@
|
||||
package com.viaversion.viaversion.bukkit.providers;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections.providers.BlockConnectionProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections.providers.BlockConnectionProvider;
|
||||
import java.util.UUID;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Chunk;
|
||||
|
@ -24,8 +24,8 @@ import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.version.Types1_14;
|
||||
import com.viaversion.viaversion.bukkit.listeners.ViaBukkitListener;
|
||||
import com.viaversion.viaversion.protocols.protocol1_15to1_14_4.ClientboundPackets1_15;
|
||||
import com.viaversion.viaversion.protocols.protocol1_15to1_14_4.Protocol1_15To1_14_4;
|
||||
import com.viaversion.viaversion.protocols.v1_14_4to1_15.Protocol1_14_4To1_15;
|
||||
import com.viaversion.viaversion.protocols.v1_14_4to1_15.packet.ClientboundPackets1_15;
|
||||
import java.util.Arrays;
|
||||
import java.util.logging.Level;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -39,7 +39,7 @@ public class EntityToggleGlideListener extends ViaBukkitListener {
|
||||
private boolean swimmingMethodExists;
|
||||
|
||||
public EntityToggleGlideListener(ViaVersionPlugin plugin) {
|
||||
super(plugin, Protocol1_15To1_14_4.class);
|
||||
super(plugin, Protocol1_14_4To1_15.class);
|
||||
try {
|
||||
Player.class.getMethod("isSwimming");
|
||||
swimmingMethodExists = true;
|
||||
@ -82,7 +82,7 @@ public class EntityToggleGlideListener extends ViaBukkitListener {
|
||||
|
||||
// leave 0x80 as 0 to stop gliding
|
||||
packet.write(Types1_14.METADATA_LIST, Arrays.asList(new Metadata(0, Types1_14.META_TYPES.byteType, bitmask)));
|
||||
packet.scheduleSend(Protocol1_15To1_14_4.class);
|
||||
packet.scheduleSend(Protocol1_14_4To1_15.class);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ package com.viaversion.viaversion.bukkit.listeners.protocol1_19_4To1_19_3;
|
||||
|
||||
import com.viaversion.viaversion.ViaVersionPlugin;
|
||||
import com.viaversion.viaversion.bukkit.listeners.ViaBukkitListener;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19_4to1_19_3.Protocol1_19_4To1_19_3;
|
||||
import com.viaversion.viaversion.protocols.v1_19_3to1_19_4.Protocol1_19_3To1_19_4;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -32,7 +32,7 @@ import org.bukkit.inventory.PlayerInventory;
|
||||
public final class ArmorToggleListener extends ViaBukkitListener {
|
||||
|
||||
public ArmorToggleListener(final ViaVersionPlugin plugin) {
|
||||
super(plugin, Protocol1_19_4To1_19_3.class);
|
||||
super(plugin, Protocol1_19_3To1_19_4.class);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
|
@ -22,7 +22,7 @@ import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import com.viaversion.viaversion.bukkit.listeners.ViaBukkitListener;
|
||||
import com.viaversion.viaversion.bukkit.util.NMSUtil;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19to1_18_2.Protocol1_19To1_18_2;
|
||||
import com.viaversion.viaversion.protocols.v1_18_2to1_19.Protocol1_18_2To1_19;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockState;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -42,7 +42,7 @@ public final class BlockBreakListener extends ViaBukkitListener {
|
||||
}
|
||||
|
||||
public BlockBreakListener(ViaVersionPlugin plugin) {
|
||||
super(plugin, Protocol1_19To1_18_2.class);
|
||||
super(plugin, Protocol1_18_2To1_19.class);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
|
@ -38,12 +38,12 @@ import com.viaversion.viaversion.bukkit.providers.BukkitAckSequenceProvider;
|
||||
import com.viaversion.viaversion.bukkit.providers.BukkitBlockConnectionProvider;
|
||||
import com.viaversion.viaversion.bukkit.providers.BukkitInventoryQuickMoveProvider;
|
||||
import com.viaversion.viaversion.bukkit.providers.BukkitViaMovementTransmitter;
|
||||
import com.viaversion.viaversion.protocols.protocol1_12to1_11_1.providers.InventoryQuickMoveProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections.ConnectionData;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections.providers.BlockConnectionProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19to1_18_2.provider.AckSequenceProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.HandItemProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_11_1to1_12.providers.InventoryQuickMoveProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections.ConnectionData;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections.providers.BlockConnectionProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_18_2to1_19.provider.AckSequenceProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.HandItemProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.MovementTransmitterProvider;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
@ -21,8 +21,8 @@ import com.viaversion.viaversion.ViaVersionPlugin;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import com.viaversion.viaversion.bukkit.tasks.protocol1_19to1_18_2.AckSequenceTask;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19to1_18_2.provider.AckSequenceProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19to1_18_2.storage.SequenceStorage;
|
||||
import com.viaversion.viaversion.protocols.v1_18_2to1_19.provider.AckSequenceProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_18_2to1_19.storage.SequenceStorage;
|
||||
|
||||
public final class BukkitAckSequenceProvider extends AckSequenceProvider {
|
||||
|
||||
|
@ -23,8 +23,8 @@ import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import com.viaversion.viaversion.bukkit.tasks.protocol1_12to1_11_1.BukkitInventoryUpdateTask;
|
||||
import com.viaversion.viaversion.bukkit.util.NMSUtil;
|
||||
import com.viaversion.viaversion.protocols.protocol1_12to1_11_1.providers.InventoryQuickMoveProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_12to1_11_1.storage.ItemTransaction;
|
||||
import com.viaversion.viaversion.protocols.v1_11_1to1_12.providers.InventoryQuickMoveProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_11_1to1_12.storage.ItemTransaction;
|
||||
import com.viaversion.viaversion.util.ReflectionUtil;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
@ -20,8 +20,8 @@ package com.viaversion.viaversion.bukkit.providers;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.bukkit.util.NMSUtil;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.storage.MovementTracker;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.MovementTransmitterProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.storage.MovementTracker;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
|
@ -18,7 +18,7 @@
|
||||
package com.viaversion.viaversion.bukkit.tasks.protocol1_12to1_11_1;
|
||||
|
||||
import com.viaversion.viaversion.bukkit.providers.BukkitInventoryQuickMoveProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_12to1_11_1.storage.ItemTransaction;
|
||||
import com.viaversion.viaversion.protocols.v1_11_1to1_12.storage.ItemTransaction;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
@ -21,9 +21,9 @@ import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19to1_18_2.ClientboundPackets1_19;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19to1_18_2.Protocol1_19To1_18_2;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19to1_18_2.storage.SequenceStorage;
|
||||
import com.viaversion.viaversion.protocols.v1_18_2to1_19.Protocol1_18_2To1_19;
|
||||
import com.viaversion.viaversion.protocols.v1_18_2to1_19.packet.ClientboundPackets1_19;
|
||||
import com.viaversion.viaversion.protocols.v1_18_2to1_19.storage.SequenceStorage;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public final class AckSequenceTask implements Runnable {
|
||||
@ -42,7 +42,7 @@ public final class AckSequenceTask implements Runnable {
|
||||
try {
|
||||
final PacketWrapper ackPacket = PacketWrapper.create(ClientboundPackets1_19.BLOCK_CHANGED_ACK, connection);
|
||||
ackPacket.write(Type.VAR_INT, sequence);
|
||||
ackPacket.scheduleSend(Protocol1_19To1_18_2.class);
|
||||
ackPacket.scheduleSend(Protocol1_18_2To1_19.class);
|
||||
} catch (final Exception e) {
|
||||
Via.getPlatform().getLogger().log(Level.WARNING, "Failed to send block changed ack packet", e);
|
||||
}
|
||||
|
@ -30,11 +30,11 @@ import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.bungee.storage.BungeeStorage;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.packets.InventoryPackets;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.ClientboundPackets1_9;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.Protocol1_9To1_8;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.EntityIdProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.storage.EntityTracker1_9;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.rewriter.ItemPacketRewriter1_13;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.EntityIdProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.storage.EntityTracker1_9;
|
||||
import java.lang.invoke.MethodHandle;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.lang.invoke.MethodType;
|
||||
@ -173,7 +173,7 @@ public class BungeeServerHandler implements Listener {
|
||||
|
||||
|
||||
// Clear auto-team
|
||||
EntityTracker1_9 oldEntityTracker = user.getEntityTracker(Protocol1_9To1_8.class);
|
||||
EntityTracker1_9 oldEntityTracker = user.getEntityTracker(Protocol1_8To1_9.class);
|
||||
if (oldEntityTracker != null && oldEntityTracker.isAutoTeam() && oldEntityTracker.isTeamExists()) {
|
||||
oldEntityTracker.sendTeamPacket(false, true);
|
||||
}
|
||||
@ -183,12 +183,12 @@ public class BungeeServerHandler implements Listener {
|
||||
ProtocolVersion serverProtocolVersion = Via.proxyPlatform().protocolDetectorService().serverProtocolVersion(serverName);
|
||||
if (serverProtocolVersion.olderThanOrEqualTo(ProtocolVersion.v1_8) && storage.getBossbar() != null) { // 1.8 doesn't have BossBar packet
|
||||
// This ensures we can encode it properly as only the 1.9 protocol is currently implemented.
|
||||
if (user.getProtocolInfo().getPipeline().contains(Protocol1_9To1_8.class)) {
|
||||
if (user.getProtocolInfo().getPipeline().contains(Protocol1_8To1_9.class)) {
|
||||
for (UUID uuid : storage.getBossbar()) {
|
||||
PacketWrapper wrapper = PacketWrapper.create(ClientboundPackets1_9.BOSSBAR, null, user);
|
||||
wrapper.write(Type.UUID, uuid);
|
||||
wrapper.write(Type.VAR_INT, 1); // remove
|
||||
wrapper.send(Protocol1_9To1_8.class);
|
||||
wrapper.send(Protocol1_8To1_9.class);
|
||||
}
|
||||
}
|
||||
storage.getBossbar().clear();
|
||||
@ -225,9 +225,9 @@ public class BungeeServerHandler implements Listener {
|
||||
String channel = iterator.next();
|
||||
String oldChannel = channel;
|
||||
if (toNewId) {
|
||||
channel = InventoryPackets.getNewPluginChannelId(channel);
|
||||
channel = ItemPacketRewriter1_13.getNewPluginChannelId(channel);
|
||||
} else {
|
||||
channel = InventoryPackets.getOldPluginChannelId(channel);
|
||||
channel = ItemPacketRewriter1_13.getOldPluginChannelId(channel);
|
||||
}
|
||||
if (channel == null) {
|
||||
iterator.remove();
|
||||
@ -245,9 +245,9 @@ public class BungeeServerHandler implements Listener {
|
||||
if (brandMessage != null) {
|
||||
String channel = brandMessage.getTag();
|
||||
if (toNewId) {
|
||||
channel = InventoryPackets.getNewPluginChannelId(channel);
|
||||
channel = ItemPacketRewriter1_13.getNewPluginChannelId(channel);
|
||||
} else {
|
||||
channel = InventoryPackets.getOldPluginChannelId(channel);
|
||||
channel = ItemPacketRewriter1_13.getOldPluginChannelId(channel);
|
||||
}
|
||||
if (channel != null) {
|
||||
brandMessage.setTag(channel);
|
||||
@ -260,7 +260,7 @@ public class BungeeServerHandler implements Listener {
|
||||
user.setActive(protocolPath != null);
|
||||
|
||||
ProxiedPlayer player = storage.getPlayer();
|
||||
EntityTracker1_9 newTracker = user.getEntityTracker(Protocol1_9To1_8.class);
|
||||
EntityTracker1_9 newTracker = user.getEntityTracker(Protocol1_8To1_9.class);
|
||||
if (newTracker != null && Via.getConfig().isAutoTeam()) {
|
||||
String currentTeam = null;
|
||||
for (Team team : player.getScoreboard().getTeams()) {
|
||||
|
@ -24,9 +24,9 @@ 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.api.type.types.version.Types1_9;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.ClientboundPackets1_9;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.Protocol1_9To1_8;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.storage.EntityTracker1_9;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.storage.EntityTracker1_9;
|
||||
import java.util.Collections;
|
||||
import java.util.logging.Level;
|
||||
import net.md_5.bungee.api.event.ServerConnectedEvent;
|
||||
@ -44,8 +44,8 @@ public class ElytraPatch implements Listener {
|
||||
UserConnection user = Via.getManager().getConnectionManager().getConnectedClient(event.getPlayer().getUniqueId());
|
||||
if (user == null) return;
|
||||
|
||||
if (user.getProtocolInfo().getPipeline().contains(Protocol1_9To1_8.class)) {
|
||||
EntityTracker1_9 tracker = user.getEntityTracker(Protocol1_9To1_8.class);
|
||||
if (user.getProtocolInfo().getPipeline().contains(Protocol1_8To1_9.class)) {
|
||||
EntityTracker1_9 tracker = user.getEntityTracker(Protocol1_8To1_9.class);
|
||||
int entityId = tracker.getProvidedEntityId();
|
||||
|
||||
PacketWrapper wrapper = PacketWrapper.create(ClientboundPackets1_9.ENTITY_METADATA, null, user);
|
||||
@ -53,7 +53,7 @@ public class ElytraPatch implements Listener {
|
||||
wrapper.write(Type.VAR_INT, entityId);
|
||||
wrapper.write(Types1_9.METADATA_LIST, Collections.singletonList(new Metadata(0, MetaType1_9.Byte, (byte) 0)));
|
||||
|
||||
wrapper.scheduleSend(Protocol1_9To1_8.class);
|
||||
wrapper.scheduleSend(Protocol1_8To1_9.class);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -29,9 +29,9 @@ import com.viaversion.viaversion.bungee.providers.BungeeBossBarProvider;
|
||||
import com.viaversion.viaversion.bungee.providers.BungeeEntityIdProvider;
|
||||
import com.viaversion.viaversion.bungee.providers.BungeeMainHandProvider;
|
||||
import com.viaversion.viaversion.bungee.providers.BungeeVersionProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.BossBarProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.EntityIdProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MainHandProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.BossBarProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.EntityIdProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.MainHandProvider;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
@ -19,7 +19,7 @@ package com.viaversion.viaversion.bungee.providers;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.bungee.storage.BungeeStorage;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.BossBarProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.BossBarProvider;
|
||||
import java.util.UUID;
|
||||
|
||||
public class BungeeBossBarProvider extends BossBarProvider {
|
||||
|
@ -19,7 +19,7 @@ package com.viaversion.viaversion.bungee.providers;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.bungee.storage.BungeeStorage;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.EntityIdProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.EntityIdProvider;
|
||||
import java.lang.reflect.Method;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
|
||||
|
@ -20,7 +20,7 @@ package com.viaversion.viaversion.bungee.providers;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.connection.ProtocolInfo;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MainHandProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.MainHandProvider;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
|
@ -40,8 +40,8 @@ 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.task.TabCompleteThread;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.ViaIdleThread;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.task.TabCompleteThread;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.ViaIdleThread;
|
||||
import com.viaversion.viaversion.scheduler.TaskScheduler;
|
||||
import com.viaversion.viaversion.update.UpdateUtil;
|
||||
import java.util.ArrayList;
|
||||
|
@ -17,8 +17,8 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.data.entity;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.NumberTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.nbt.tag.NumberTag;
|
||||
import com.viaversion.viaversion.api.data.entity.DimensionData;
|
||||
|
||||
public final class DimensionDataImpl implements DimensionData {
|
||||
|
@ -27,8 +27,8 @@ import com.viaversion.viaversion.api.legacy.bossbar.BossFlag;
|
||||
import com.viaversion.viaversion.api.legacy.bossbar.BossStyle;
|
||||
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.ClientboundPackets1_9;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.Protocol1_9To1_8;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9;
|
||||
import com.viaversion.viaversion.util.ComponentUtil;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@ -228,12 +228,12 @@ public class CommonBoss implements BossBar {
|
||||
}
|
||||
|
||||
private void sendPacketConnection(UserConnection conn, PacketWrapper wrapper) {
|
||||
if (conn.getProtocolInfo() == null || !conn.getProtocolInfo().getPipeline().contains(Protocol1_9To1_8.class)) {
|
||||
if (conn.getProtocolInfo() == null || !conn.getProtocolInfo().getPipeline().contains(Protocol1_8To1_9.class)) {
|
||||
connections.remove(conn.getProtocolInfo().getUuid());
|
||||
return;
|
||||
}
|
||||
try {
|
||||
wrapper.scheduleSend(Protocol1_9To1_8.class);
|
||||
wrapper.scheduleSend(Protocol1_8To1_9.class);
|
||||
} catch (Exception e) {
|
||||
Via.getPlatform().getLogger().log(Level.WARNING, "Failed to send bossbar packet", e);
|
||||
}
|
||||
|
@ -41,43 +41,43 @@ import com.viaversion.viaversion.protocol.packet.VersionedPacketTransformerImpl;
|
||||
import com.viaversion.viaversion.protocols.base.BaseProtocol;
|
||||
import com.viaversion.viaversion.protocols.base.BaseProtocol1_16;
|
||||
import com.viaversion.viaversion.protocols.base.BaseProtocol1_7;
|
||||
import com.viaversion.viaversion.protocols.protocol1_10to1_9_3.Protocol1_10To1_9_3_4;
|
||||
import com.viaversion.viaversion.protocols.protocol1_11_1to1_11.Protocol1_11_1To1_11;
|
||||
import com.viaversion.viaversion.protocols.protocol1_11to1_10.Protocol1_11To1_10;
|
||||
import com.viaversion.viaversion.protocols.protocol1_12_1to1_12.Protocol1_12_1To1_12;
|
||||
import com.viaversion.viaversion.protocols.protocol1_12_2to1_12_1.Protocol1_12_2To1_12_1;
|
||||
import com.viaversion.viaversion.protocols.protocol1_12to1_11_1.Protocol1_12To1_11_1;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13_1to1_13.Protocol1_13_1To1_13;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13_2to1_13_1.Protocol1_13_2To1_13_1;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.Protocol1_13To1_12_2;
|
||||
import com.viaversion.viaversion.protocols.protocol1_14_1to1_14.Protocol1_14_1To1_14;
|
||||
import com.viaversion.viaversion.protocols.protocol1_14_2to1_14_1.Protocol1_14_2To1_14_1;
|
||||
import com.viaversion.viaversion.protocols.protocol1_14_3to1_14_2.Protocol1_14_3To1_14_2;
|
||||
import com.viaversion.viaversion.protocols.protocol1_14_4to1_14_3.Protocol1_14_4To1_14_3;
|
||||
import com.viaversion.viaversion.protocols.protocol1_14to1_13_2.Protocol1_14To1_13_2;
|
||||
import com.viaversion.viaversion.protocols.protocol1_15_1to1_15.Protocol1_15_1To1_15;
|
||||
import com.viaversion.viaversion.protocols.protocol1_15_2to1_15_1.Protocol1_15_2To1_15_1;
|
||||
import com.viaversion.viaversion.protocols.protocol1_15to1_14_4.Protocol1_15To1_14_4;
|
||||
import com.viaversion.viaversion.protocols.protocol1_16_1to1_16.Protocol1_16_1To1_16;
|
||||
import com.viaversion.viaversion.protocols.protocol1_16_2to1_16_1.Protocol1_16_2To1_16_1;
|
||||
import com.viaversion.viaversion.protocols.protocol1_16_3to1_16_2.Protocol1_16_3To1_16_2;
|
||||
import com.viaversion.viaversion.protocols.protocol1_16_4to1_16_3.Protocol1_16_4To1_16_3;
|
||||
import com.viaversion.viaversion.protocols.protocol1_16to1_15_2.Protocol1_16To1_15_2;
|
||||
import com.viaversion.viaversion.protocols.protocol1_17_1to1_17.Protocol1_17_1To1_17;
|
||||
import com.viaversion.viaversion.protocols.protocol1_17to1_16_4.Protocol1_17To1_16_4;
|
||||
import com.viaversion.viaversion.protocols.protocol1_18_2to1_18.Protocol1_18_2To1_18;
|
||||
import com.viaversion.viaversion.protocols.protocol1_18to1_17_1.Protocol1_18To1_17_1;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19_1to1_19.Protocol1_19_1To1_19;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19_3to1_19_1.Protocol1_19_3To1_19_1;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19_4to1_19_3.Protocol1_19_4To1_19_3;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19to1_18_2.Protocol1_19To1_18_2;
|
||||
import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.Protocol1_20_2To1_20;
|
||||
import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.Protocol1_20_3To1_20_2;
|
||||
import com.viaversion.viaversion.protocols.protocol1_20to1_19_4.Protocol1_20To1_19_4;
|
||||
import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.Protocol1_20_5To1_20_3;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9_1to1_9.Protocol1_9_1To1_9;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.Protocol1_9_3To1_9_1_2;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.Protocol1_9To1_8;
|
||||
import com.viaversion.viaversion.protocols.v1_9_3to1_10.Protocol1_9_3To1_10;
|
||||
import com.viaversion.viaversion.protocols.v1_11to1_11_1.Protocol1_11To1_11_1;
|
||||
import com.viaversion.viaversion.protocols.v1_10to1_11.Protocol1_10To1_11;
|
||||
import com.viaversion.viaversion.protocols.v1_12to1_12_1.Protocol1_12To1_12_1;
|
||||
import com.viaversion.viaversion.protocols.v1_12_1to1_12_2.Protocol1_12_1To1_12_2;
|
||||
import com.viaversion.viaversion.protocols.v1_11_1to1_12.Protocol1_11_1To1_12;
|
||||
import com.viaversion.viaversion.protocols.v1_13to1_13_1.Protocol1_13To1_13_1;
|
||||
import com.viaversion.viaversion.protocols.v1_13_1to1_13_2.Protocol1_13_1To1_13_2;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.Protocol1_12_2To1_13;
|
||||
import com.viaversion.viaversion.protocols.v1_14to1_14_1.Protocol1_14To1_14_1;
|
||||
import com.viaversion.viaversion.protocols.v1_14_1to1_14_2.Protocol1_14_1To1_14_2;
|
||||
import com.viaversion.viaversion.protocols.v1_14_2to1_14_3.Protocol1_14_2To1_14_3;
|
||||
import com.viaversion.viaversion.protocols.v1_14_3to1_14_4.Protocol1_14_3To1_14_4;
|
||||
import com.viaversion.viaversion.protocols.v1_13_2to1_14.Protocol1_13_2To1_14;
|
||||
import com.viaversion.viaversion.protocols.v1_15to1_15_1.Protocol1_15To1_15_1;
|
||||
import com.viaversion.viaversion.protocols.v1_15_1to1_15_2.Protocol1_15_1To1_15_2;
|
||||
import com.viaversion.viaversion.protocols.v1_14_4to1_15.Protocol1_14_4To1_15;
|
||||
import com.viaversion.viaversion.protocols.v1_16to1_16_1.Protocol1_16To1_16_1;
|
||||
import com.viaversion.viaversion.protocols.v1_16_1to1_16_2.Protocol1_16_1To1_16_2;
|
||||
import com.viaversion.viaversion.protocols.v1_16_2to1_16_3.Protocol1_16_2To1_16_3;
|
||||
import com.viaversion.viaversion.protocols.v1_16_3to1_16_4.Protocol1_16_3To1_16_4;
|
||||
import com.viaversion.viaversion.protocols.v1_15_2to1_16.Protocol1_15_2To1_16;
|
||||
import com.viaversion.viaversion.protocols.v1_17to1_17_1.Protocol1_17To1_17_1;
|
||||
import com.viaversion.viaversion.protocols.v1_16_4to1_17.Protocol1_16_4To1_17;
|
||||
import com.viaversion.viaversion.protocols.v1_18to1_18_2.Protocol1_18To1_18_2;
|
||||
import com.viaversion.viaversion.protocols.v1_17_1to1_18.Protocol1_17_1To1_18;
|
||||
import com.viaversion.viaversion.protocols.v1_19to1_19_1.Protocol1_19To1_19_1;
|
||||
import com.viaversion.viaversion.protocols.v1_19_1to1_19_3.Protocol1_19_1To1_19_3;
|
||||
import com.viaversion.viaversion.protocols.v1_19_3to1_19_4.Protocol1_19_3To1_19_4;
|
||||
import com.viaversion.viaversion.protocols.v1_18_2to1_19.Protocol1_18_2To1_19;
|
||||
import com.viaversion.viaversion.protocols.v1_20to1_20_2.Protocol1_20To1_20_2;
|
||||
import com.viaversion.viaversion.protocols.v1_20_2to1_20_3.Protocol1_20_2To1_20_3;
|
||||
import com.viaversion.viaversion.protocols.v1_20_3to1_20_5.Protocol1_20_3To1_20_5;
|
||||
import com.viaversion.viaversion.protocols.v1_19_4to1_20.Protocol1_19_4To1_20;
|
||||
import com.viaversion.viaversion.protocols.v1_9to1_9_1.Protocol1_9To1_9_1;
|
||||
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.Protocol1_9_1To1_9_3;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9;
|
||||
import com.viaversion.viaversion.util.Pair;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import java.util.ArrayList;
|
||||
@ -139,54 +139,54 @@ public class ProtocolManagerImpl implements ProtocolManager {
|
||||
registerBaseProtocol(new BaseProtocol1_7(), Range.closedOpen(ProtocolVersion.v1_7_2, ProtocolVersion.v1_16));
|
||||
registerBaseProtocol(new BaseProtocol1_16(), Range.atLeast(ProtocolVersion.v1_16));
|
||||
|
||||
registerProtocol(new Protocol1_9To1_8(), ProtocolVersion.v1_9, ProtocolVersion.v1_8);
|
||||
registerProtocol(new Protocol1_9_1To1_9(), Arrays.asList(ProtocolVersion.v1_9_1, ProtocolVersion.v1_9_2), ProtocolVersion.v1_9);
|
||||
registerProtocol(new Protocol1_9_3To1_9_1_2(), ProtocolVersion.v1_9_3, ProtocolVersion.v1_9_2);
|
||||
registerProtocol(new Protocol1_8To1_9(), ProtocolVersion.v1_9, ProtocolVersion.v1_8);
|
||||
registerProtocol(new Protocol1_9To1_9_1(), Arrays.asList(ProtocolVersion.v1_9_1, ProtocolVersion.v1_9_2), ProtocolVersion.v1_9);
|
||||
registerProtocol(new Protocol1_9_1To1_9_3(), ProtocolVersion.v1_9_3, ProtocolVersion.v1_9_2);
|
||||
|
||||
registerProtocol(new Protocol1_10To1_9_3_4(), ProtocolVersion.v1_10, ProtocolVersion.v1_9_3);
|
||||
registerProtocol(new Protocol1_9_3To1_10(), ProtocolVersion.v1_10, ProtocolVersion.v1_9_3);
|
||||
|
||||
registerProtocol(new Protocol1_11To1_10(), ProtocolVersion.v1_11, ProtocolVersion.v1_10);
|
||||
registerProtocol(new Protocol1_11_1To1_11(), ProtocolVersion.v1_11_1, ProtocolVersion.v1_11);
|
||||
registerProtocol(new Protocol1_10To1_11(), ProtocolVersion.v1_11, ProtocolVersion.v1_10);
|
||||
registerProtocol(new Protocol1_11To1_11_1(), ProtocolVersion.v1_11_1, ProtocolVersion.v1_11);
|
||||
|
||||
registerProtocol(new Protocol1_12To1_11_1(), ProtocolVersion.v1_12, ProtocolVersion.v1_11_1);
|
||||
registerProtocol(new Protocol1_12_1To1_12(), ProtocolVersion.v1_12_1, ProtocolVersion.v1_12);
|
||||
registerProtocol(new Protocol1_12_2To1_12_1(), ProtocolVersion.v1_12_2, ProtocolVersion.v1_12_1);
|
||||
registerProtocol(new Protocol1_11_1To1_12(), ProtocolVersion.v1_12, ProtocolVersion.v1_11_1);
|
||||
registerProtocol(new Protocol1_12To1_12_1(), ProtocolVersion.v1_12_1, ProtocolVersion.v1_12);
|
||||
registerProtocol(new Protocol1_12_1To1_12_2(), ProtocolVersion.v1_12_2, ProtocolVersion.v1_12_1);
|
||||
|
||||
registerProtocol(new Protocol1_13To1_12_2(), ProtocolVersion.v1_13, ProtocolVersion.v1_12_2);
|
||||
registerProtocol(new Protocol1_13_1To1_13(), ProtocolVersion.v1_13_1, ProtocolVersion.v1_13);
|
||||
registerProtocol(new Protocol1_13_2To1_13_1(), ProtocolVersion.v1_13_2, ProtocolVersion.v1_13_1);
|
||||
registerProtocol(new Protocol1_12_2To1_13(), ProtocolVersion.v1_13, ProtocolVersion.v1_12_2);
|
||||
registerProtocol(new Protocol1_13To1_13_1(), ProtocolVersion.v1_13_1, ProtocolVersion.v1_13);
|
||||
registerProtocol(new Protocol1_13_1To1_13_2(), ProtocolVersion.v1_13_2, ProtocolVersion.v1_13_1);
|
||||
|
||||
registerProtocol(new Protocol1_14To1_13_2(), ProtocolVersion.v1_14, ProtocolVersion.v1_13_2);
|
||||
registerProtocol(new Protocol1_14_1To1_14(), ProtocolVersion.v1_14_1, ProtocolVersion.v1_14);
|
||||
registerProtocol(new Protocol1_14_2To1_14_1(), ProtocolVersion.v1_14_2, ProtocolVersion.v1_14_1);
|
||||
registerProtocol(new Protocol1_14_3To1_14_2(), ProtocolVersion.v1_14_3, ProtocolVersion.v1_14_2);
|
||||
registerProtocol(new Protocol1_14_4To1_14_3(), ProtocolVersion.v1_14_4, ProtocolVersion.v1_14_3);
|
||||
registerProtocol(new Protocol1_13_2To1_14(), ProtocolVersion.v1_14, ProtocolVersion.v1_13_2);
|
||||
registerProtocol(new Protocol1_14To1_14_1(), ProtocolVersion.v1_14_1, ProtocolVersion.v1_14);
|
||||
registerProtocol(new Protocol1_14_1To1_14_2(), ProtocolVersion.v1_14_2, ProtocolVersion.v1_14_1);
|
||||
registerProtocol(new Protocol1_14_2To1_14_3(), ProtocolVersion.v1_14_3, ProtocolVersion.v1_14_2);
|
||||
registerProtocol(new Protocol1_14_3To1_14_4(), ProtocolVersion.v1_14_4, ProtocolVersion.v1_14_3);
|
||||
|
||||
registerProtocol(new Protocol1_15To1_14_4(), ProtocolVersion.v1_15, ProtocolVersion.v1_14_4);
|
||||
registerProtocol(new Protocol1_15_1To1_15(), ProtocolVersion.v1_15_1, ProtocolVersion.v1_15);
|
||||
registerProtocol(new Protocol1_15_2To1_15_1(), ProtocolVersion.v1_15_2, ProtocolVersion.v1_15_1);
|
||||
registerProtocol(new Protocol1_14_4To1_15(), ProtocolVersion.v1_15, ProtocolVersion.v1_14_4);
|
||||
registerProtocol(new Protocol1_15To1_15_1(), ProtocolVersion.v1_15_1, ProtocolVersion.v1_15);
|
||||
registerProtocol(new Protocol1_15_1To1_15_2(), ProtocolVersion.v1_15_2, ProtocolVersion.v1_15_1);
|
||||
|
||||
registerProtocol(new Protocol1_16To1_15_2(), ProtocolVersion.v1_16, ProtocolVersion.v1_15_2);
|
||||
registerProtocol(new Protocol1_16_1To1_16(), ProtocolVersion.v1_16_1, ProtocolVersion.v1_16);
|
||||
registerProtocol(new Protocol1_16_2To1_16_1(), ProtocolVersion.v1_16_2, ProtocolVersion.v1_16_1);
|
||||
registerProtocol(new Protocol1_16_3To1_16_2(), ProtocolVersion.v1_16_3, ProtocolVersion.v1_16_2);
|
||||
registerProtocol(new Protocol1_16_4To1_16_3(), ProtocolVersion.v1_16_4, ProtocolVersion.v1_16_3);
|
||||
registerProtocol(new Protocol1_15_2To1_16(), ProtocolVersion.v1_16, ProtocolVersion.v1_15_2);
|
||||
registerProtocol(new Protocol1_16To1_16_1(), ProtocolVersion.v1_16_1, ProtocolVersion.v1_16);
|
||||
registerProtocol(new Protocol1_16_1To1_16_2(), ProtocolVersion.v1_16_2, ProtocolVersion.v1_16_1);
|
||||
registerProtocol(new Protocol1_16_2To1_16_3(), ProtocolVersion.v1_16_3, ProtocolVersion.v1_16_2);
|
||||
registerProtocol(new Protocol1_16_3To1_16_4(), ProtocolVersion.v1_16_4, ProtocolVersion.v1_16_3);
|
||||
|
||||
registerProtocol(new Protocol1_17To1_16_4(), ProtocolVersion.v1_17, ProtocolVersion.v1_16_4);
|
||||
registerProtocol(new Protocol1_17_1To1_17(), ProtocolVersion.v1_17_1, ProtocolVersion.v1_17);
|
||||
registerProtocol(new Protocol1_16_4To1_17(), ProtocolVersion.v1_17, ProtocolVersion.v1_16_4);
|
||||
registerProtocol(new Protocol1_17To1_17_1(), ProtocolVersion.v1_17_1, ProtocolVersion.v1_17);
|
||||
|
||||
registerProtocol(new Protocol1_18To1_17_1(), ProtocolVersion.v1_18, ProtocolVersion.v1_17_1);
|
||||
registerProtocol(new Protocol1_18_2To1_18(), ProtocolVersion.v1_18_2, ProtocolVersion.v1_18);
|
||||
registerProtocol(new Protocol1_17_1To1_18(), ProtocolVersion.v1_18, ProtocolVersion.v1_17_1);
|
||||
registerProtocol(new Protocol1_18To1_18_2(), ProtocolVersion.v1_18_2, ProtocolVersion.v1_18);
|
||||
|
||||
registerProtocol(new Protocol1_19To1_18_2(), ProtocolVersion.v1_19, ProtocolVersion.v1_18_2);
|
||||
registerProtocol(new Protocol1_19_1To1_19(), ProtocolVersion.v1_19_1, ProtocolVersion.v1_19);
|
||||
registerProtocol(new Protocol1_19_3To1_19_1(), ProtocolVersion.v1_19_3, ProtocolVersion.v1_19_1);
|
||||
registerProtocol(new Protocol1_19_4To1_19_3(), ProtocolVersion.v1_19_4, ProtocolVersion.v1_19_3);
|
||||
registerProtocol(new Protocol1_18_2To1_19(), ProtocolVersion.v1_19, ProtocolVersion.v1_18_2);
|
||||
registerProtocol(new Protocol1_19To1_19_1(), ProtocolVersion.v1_19_1, ProtocolVersion.v1_19);
|
||||
registerProtocol(new Protocol1_19_1To1_19_3(), ProtocolVersion.v1_19_3, ProtocolVersion.v1_19_1);
|
||||
registerProtocol(new Protocol1_19_3To1_19_4(), ProtocolVersion.v1_19_4, ProtocolVersion.v1_19_3);
|
||||
|
||||
registerProtocol(new Protocol1_20To1_19_4(), ProtocolVersion.v1_20, ProtocolVersion.v1_19_4);
|
||||
registerProtocol(new Protocol1_20_2To1_20(), ProtocolVersion.v1_20_2, ProtocolVersion.v1_20);
|
||||
registerProtocol(new Protocol1_20_3To1_20_2(), ProtocolVersion.v1_20_3, ProtocolVersion.v1_20_2);
|
||||
registerProtocol(new Protocol1_20_5To1_20_3(), ProtocolVersion.v1_20_5, ProtocolVersion.v1_20_3);
|
||||
registerProtocol(new Protocol1_19_4To1_20(), ProtocolVersion.v1_20, ProtocolVersion.v1_19_4);
|
||||
registerProtocol(new Protocol1_20To1_20_2(), ProtocolVersion.v1_20_2, ProtocolVersion.v1_20);
|
||||
registerProtocol(new Protocol1_20_2To1_20_3(), ProtocolVersion.v1_20_3, ProtocolVersion.v1_20_2);
|
||||
registerProtocol(new Protocol1_20_3To1_20_5(), ProtocolVersion.v1_20_5, ProtocolVersion.v1_20_3);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -15,10 +15,10 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_11to1_10;
|
||||
package com.viaversion.viaversion.protocols.v1_10to1_11;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.StringTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.nbt.tag.StringTag;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.ClientWorld;
|
||||
@ -31,18 +31,18 @@ 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_3;
|
||||
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;
|
||||
import com.viaversion.viaversion.protocols.v1_10to1_11.data.PotionColorMapping;
|
||||
import com.viaversion.viaversion.protocols.v1_10to1_11.metadata.MetadataRewriter1_11To1_10;
|
||||
import com.viaversion.viaversion.protocols.v1_10to1_11.rewriter.BlockEntityRewriter;
|
||||
import com.viaversion.viaversion.protocols.v1_10to1_11.rewriter.EntityIdRewriter;
|
||||
import com.viaversion.viaversion.protocols.v1_10to1_11.rewriter.ItemPacketRewriter1_11;
|
||||
import com.viaversion.viaversion.protocols.v1_10to1_11.storage.EntityTracker1_11;
|
||||
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ClientboundPackets1_9_3;
|
||||
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ServerboundPackets1_9_3;
|
||||
import com.viaversion.viaversion.rewriter.SoundRewriter;
|
||||
import com.viaversion.viaversion.util.Pair;
|
||||
|
||||
public class Protocol1_11To1_10 extends AbstractProtocol<ClientboundPackets1_9_3, ClientboundPackets1_9_3, ServerboundPackets1_9_3, ServerboundPackets1_9_3> {
|
||||
public class Protocol1_10To1_11 extends AbstractProtocol<ClientboundPackets1_9_3, ClientboundPackets1_9_3, ServerboundPackets1_9_3, ServerboundPackets1_9_3> {
|
||||
private static final ValueTransformer<Float, Short> toOldByte = new ValueTransformer<>(Type.UNSIGNED_BYTE) {
|
||||
@Override
|
||||
public Short transform(PacketWrapper wrapper, Float inputValue) {
|
||||
@ -51,9 +51,9 @@ public class Protocol1_11To1_10 extends AbstractProtocol<ClientboundPackets1_9_3
|
||||
};
|
||||
|
||||
private final MetadataRewriter1_11To1_10 entityRewriter = new MetadataRewriter1_11To1_10(this);
|
||||
private final InventoryPackets itemRewriter = new InventoryPackets(this);
|
||||
private final ItemPacketRewriter1_11 itemRewriter = new ItemPacketRewriter1_11(this);
|
||||
|
||||
public Protocol1_11To1_10() {
|
||||
public Protocol1_10To1_11() {
|
||||
super(ClientboundPackets1_9_3.class, ClientboundPackets1_9_3.class, ServerboundPackets1_9_3.class, ServerboundPackets1_9_3.class);
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ public class Protocol1_11To1_10 extends AbstractProtocol<ClientboundPackets1_9_3
|
||||
wrapper.set(Type.VAR_INT, 1, entType.getId());
|
||||
|
||||
// Register Type ID
|
||||
wrapper.user().getEntityTracker(Protocol1_11To1_10.class).addEntity(entityId, entType);
|
||||
wrapper.user().getEntityTracker(Protocol1_10To1_11.class).addEntity(entityId, entType);
|
||||
entityRewriter.handleMetadata(entityId, wrapper.get(Types1_9.METADATA_LIST, 0), wrapper.user());
|
||||
}
|
||||
});
|
||||
@ -137,7 +137,7 @@ public class Protocol1_11To1_10 extends AbstractProtocol<ClientboundPackets1_9_3
|
||||
handler(wrapper -> {
|
||||
int entityID = wrapper.get(Type.VAR_INT, 0);
|
||||
if (Via.getConfig().isHologramPatch()) {
|
||||
EntityTracker1_11 tracker = wrapper.user().getEntityTracker(Protocol1_11To1_10.class);
|
||||
EntityTracker1_11 tracker = wrapper.user().getEntityTracker(Protocol1_10To1_11.class);
|
||||
if (tracker.isHologram(entityID)) {
|
||||
Double newValue = wrapper.get(Type.DOUBLE, 1);
|
||||
newValue -= (Via.getConfig().getHologramYOffset());
|
||||
@ -361,7 +361,7 @@ public class Protocol1_11To1_10 extends AbstractProtocol<ClientboundPackets1_9_3
|
||||
}
|
||||
|
||||
@Override
|
||||
public InventoryPackets getItemRewriter() {
|
||||
public ItemPacketRewriter1_11 getItemRewriter() {
|
||||
return itemRewriter;
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_11to1_10.data;
|
||||
package com.viaversion.viaversion.protocols.v1_10to1_11.data;
|
||||
|
||||
import com.viaversion.viaversion.util.Pair;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_11to1_10.metadata;
|
||||
package com.viaversion.viaversion.protocols.v1_10to1_11.metadata;
|
||||
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_11;
|
||||
@ -25,18 +25,18 @@ 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.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;
|
||||
import com.viaversion.viaversion.protocols.v1_10to1_11.Protocol1_10To1_11;
|
||||
import com.viaversion.viaversion.protocols.v1_10to1_11.rewriter.EntityIdRewriter;
|
||||
import com.viaversion.viaversion.protocols.v1_10to1_11.storage.EntityTracker1_11;
|
||||
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ClientboundPackets1_9_3;
|
||||
import com.viaversion.viaversion.rewriter.EntityRewriter;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class MetadataRewriter1_11To1_10 extends EntityRewriter<ClientboundPackets1_9_3, Protocol1_11To1_10> {
|
||||
public class MetadataRewriter1_11To1_10 extends EntityRewriter<ClientboundPackets1_9_3, Protocol1_10To1_11> {
|
||||
|
||||
public MetadataRewriter1_11To1_10(Protocol1_11To1_10 protocol) {
|
||||
public MetadataRewriter1_11To1_10(Protocol1_10To1_11 protocol) {
|
||||
super(protocol);
|
||||
}
|
||||
|
||||
@ -120,7 +120,7 @@ public class MetadataRewriter1_11To1_10 extends EntityRewriter<ClientboundPacket
|
||||
wrapper.write(Type.SHORT, (short) 0);
|
||||
wrapper.write(Type.BOOLEAN, true);
|
||||
|
||||
wrapper.send(Protocol1_11To1_10.class);
|
||||
wrapper.send(Protocol1_10To1_11.class);
|
||||
}
|
||||
}
|
||||
});
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_11to1_10.rewriter;
|
||||
package com.viaversion.viaversion.protocols.v1_10to1_11.rewriter;
|
||||
|
||||
import com.google.common.collect.BiMap;
|
||||
import com.google.common.collect.HashBiMap;
|
@ -15,10 +15,10 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_11to1_10.rewriter;
|
||||
package com.viaversion.viaversion.protocols.v1_10to1_11.rewriter;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.StringTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.nbt.tag.StringTag;
|
||||
import com.google.common.collect.BiMap;
|
||||
import com.google.common.collect.HashBiMap;
|
||||
import com.viaversion.viaversion.api.minecraft.item.Item;
|
@ -15,21 +15,21 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_11to1_10.packets;
|
||||
package com.viaversion.viaversion.protocols.v1_10to1_11.rewriter;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
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.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;
|
||||
import com.viaversion.viaversion.protocols.v1_10to1_11.Protocol1_10To1_11;
|
||||
import com.viaversion.viaversion.protocols.v1_10to1_11.rewriter.EntityIdRewriter;
|
||||
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ClientboundPackets1_9_3;
|
||||
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ServerboundPackets1_9_3;
|
||||
import com.viaversion.viaversion.rewriter.ItemRewriter;
|
||||
|
||||
public class InventoryPackets extends ItemRewriter<ClientboundPackets1_9_3, ServerboundPackets1_9_3, Protocol1_11To1_10> {
|
||||
public class ItemPacketRewriter1_11 extends ItemRewriter<ClientboundPackets1_9_3, ServerboundPackets1_9_3, Protocol1_10To1_11> {
|
||||
|
||||
public InventoryPackets(Protocol1_11To1_10 protocol) {
|
||||
public ItemPacketRewriter1_11(Protocol1_10To1_11 protocol) {
|
||||
super(protocol, Type.ITEM1_8, Type.ITEM1_8_SHORT_ARRAY);
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_11to1_10.storage;
|
||||
package com.viaversion.viaversion.protocols.v1_10to1_11.storage;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_11.EntityType;
|
@ -15,11 +15,11 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_12to1_11_1;
|
||||
package com.viaversion.viaversion.protocols.v1_11_1to1_12;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.IntTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.StringTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.nbt.tag.IntTag;
|
||||
import com.viaversion.nbt.tag.StringTag;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
@ -37,25 +37,26 @@ import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_9_3;
|
||||
import com.viaversion.viaversion.api.type.types.version.Types1_12;
|
||||
import com.viaversion.viaversion.data.entity.EntityTrackerBase;
|
||||
import com.viaversion.viaversion.protocols.protocol1_12to1_11_1.metadata.MetadataRewriter1_12To1_11_1;
|
||||
import com.viaversion.viaversion.protocols.protocol1_12to1_11_1.packets.InventoryPackets;
|
||||
import com.viaversion.viaversion.protocols.protocol1_12to1_11_1.providers.InventoryQuickMoveProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_12to1_11_1.rewriter.ChatItemRewriter;
|
||||
import com.viaversion.viaversion.protocols.protocol1_12to1_11_1.rewriter.TranslateRewriter;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.ClientboundPackets1_13;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.Protocol1_13To1_12_2;
|
||||
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;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9to1_8.Protocol1_9To1_8;
|
||||
import com.viaversion.viaversion.protocols.v1_11_1to1_12.metadata.MetadataRewriter1_12To1_11_1;
|
||||
import com.viaversion.viaversion.protocols.v1_11_1to1_12.packet.ClientboundPackets1_12;
|
||||
import com.viaversion.viaversion.protocols.v1_11_1to1_12.packet.ServerboundPackets1_12;
|
||||
import com.viaversion.viaversion.protocols.v1_11_1to1_12.providers.InventoryQuickMoveProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_11_1to1_12.rewriter.ChatItemRewriter;
|
||||
import com.viaversion.viaversion.protocols.v1_11_1to1_12.rewriter.ItemPacketRewriter1_12;
|
||||
import com.viaversion.viaversion.protocols.v1_11_1to1_12.rewriter.TranslateRewriter;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.Protocol1_12_2To1_13;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.packet.ClientboundPackets1_13;
|
||||
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ClientboundPackets1_9_3;
|
||||
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ServerboundPackets1_9_3;
|
||||
import com.viaversion.viaversion.rewriter.SoundRewriter;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class Protocol1_12To1_11_1 extends AbstractProtocol<ClientboundPackets1_9_3, ClientboundPackets1_12, ServerboundPackets1_9_3, ServerboundPackets1_12> {
|
||||
public class Protocol1_11_1To1_12 extends AbstractProtocol<ClientboundPackets1_9_3, ClientboundPackets1_12, ServerboundPackets1_9_3, ServerboundPackets1_12> {
|
||||
|
||||
private final MetadataRewriter1_12To1_11_1 metadataRewriter = new MetadataRewriter1_12To1_11_1(this);
|
||||
private final InventoryPackets itemRewriter = new InventoryPackets(this);
|
||||
private final ItemPacketRewriter1_12 itemRewriter = new ItemPacketRewriter1_12(this);
|
||||
|
||||
public Protocol1_12To1_11_1() {
|
||||
public Protocol1_11_1To1_12() {
|
||||
super(ClientboundPackets1_9_3.class, ClientboundPackets1_12.class, ServerboundPackets1_9_3.class, ServerboundPackets1_12.class);
|
||||
}
|
||||
|
||||
@ -154,7 +155,7 @@ public class Protocol1_12To1_11_1 extends AbstractProtocol<ClientboundPackets1_9
|
||||
// Reset recipes
|
||||
if (user.getProtocolInfo().protocolVersion().newerThanOrEqualTo(ProtocolVersion.v1_13)) {
|
||||
wrapper.create(ClientboundPackets1_13.DECLARE_RECIPES, packetWrapper -> packetWrapper.write(Type.VAR_INT, 0))
|
||||
.scheduleSend(Protocol1_13To1_12_2.class);
|
||||
.scheduleSend(Protocol1_12_2To1_13.class);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -254,7 +255,7 @@ public class Protocol1_12To1_11_1 extends AbstractProtocol<ClientboundPackets1_9
|
||||
}
|
||||
|
||||
@Override
|
||||
public InventoryPackets getItemRewriter() {
|
||||
public ItemPacketRewriter1_12 getItemRewriter() {
|
||||
return itemRewriter;
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_12to1_11_1.data;
|
||||
package com.viaversion.viaversion.protocols.v1_11_1to1_12.data;
|
||||
|
||||
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
|
||||
import java.util.HashSet;
|
@ -15,18 +15,18 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_12to1_11_1.metadata;
|
||||
package com.viaversion.viaversion.protocols.v1_11_1to1_12.metadata;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.entities.EntityType;
|
||||
import com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_12;
|
||||
import com.viaversion.viaversion.api.minecraft.item.Item;
|
||||
import com.viaversion.viaversion.protocols.protocol1_12to1_11_1.Protocol1_12To1_11_1;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.ClientboundPackets1_9_3;
|
||||
import com.viaversion.viaversion.protocols.v1_11_1to1_12.Protocol1_11_1To1_12;
|
||||
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ClientboundPackets1_9_3;
|
||||
import com.viaversion.viaversion.rewriter.EntityRewriter;
|
||||
|
||||
public class MetadataRewriter1_12To1_11_1 extends EntityRewriter<ClientboundPackets1_9_3, Protocol1_12To1_11_1> {
|
||||
public class MetadataRewriter1_12To1_11_1 extends EntityRewriter<ClientboundPackets1_9_3, Protocol1_11_1To1_12> {
|
||||
|
||||
public MetadataRewriter1_12To1_11_1(Protocol1_12To1_11_1 protocol) {
|
||||
public MetadataRewriter1_12To1_11_1(Protocol1_11_1To1_12 protocol) {
|
||||
super(protocol);
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_12to1_11_1;
|
||||
package com.viaversion.viaversion.protocols.v1_11_1to1_12.packet;
|
||||
|
||||
import com.viaversion.viaversion.api.protocol.packet.ClientboundPacketType;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_12to1_11_1;
|
||||
package com.viaversion.viaversion.protocols.v1_11_1to1_12.packet;
|
||||
|
||||
import com.viaversion.viaversion.api.protocol.packet.ServerboundPacketType;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_12to1_11_1.providers;
|
||||
package com.viaversion.viaversion.protocols.v1_11_1to1_12.providers;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.platform.providers.Provider;
|
@ -15,9 +15,9 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_12to1_11_1.rewriter;
|
||||
package com.viaversion.viaversion.protocols.v1_11_1to1_12.rewriter;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
@ -15,23 +15,23 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_12to1_11_1.packets;
|
||||
package com.viaversion.viaversion.protocols.v1_11_1to1_12.rewriter;
|
||||
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
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_12to1_11_1.Protocol1_12To1_11_1;
|
||||
import com.viaversion.viaversion.protocols.protocol1_12to1_11_1.ServerboundPackets1_12;
|
||||
import com.viaversion.viaversion.protocols.protocol1_12to1_11_1.providers.InventoryQuickMoveProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.ClientboundPackets1_9_3;
|
||||
import com.viaversion.viaversion.protocols.v1_11_1to1_12.Protocol1_11_1To1_12;
|
||||
import com.viaversion.viaversion.protocols.v1_11_1to1_12.packet.ServerboundPackets1_12;
|
||||
import com.viaversion.viaversion.protocols.v1_11_1to1_12.providers.InventoryQuickMoveProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ClientboundPackets1_9_3;
|
||||
import com.viaversion.viaversion.rewriter.ItemRewriter;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
public class InventoryPackets extends ItemRewriter<ClientboundPackets1_9_3, ServerboundPackets1_12, Protocol1_12To1_11_1> {
|
||||
public class ItemPacketRewriter1_12 extends ItemRewriter<ClientboundPackets1_9_3, ServerboundPackets1_12, Protocol1_11_1To1_12> {
|
||||
|
||||
public InventoryPackets(Protocol1_12To1_11_1 protocol) {
|
||||
public ItemPacketRewriter1_12(Protocol1_11_1To1_12 protocol) {
|
||||
super(protocol, Type.ITEM1_8, Type.ITEM1_8_SHORT_ARRAY);
|
||||
}
|
||||
|
@ -15,15 +15,15 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_12to1_11_1.rewriter;
|
||||
package com.viaversion.viaversion.protocols.v1_11_1to1_12.rewriter;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.protocols.protocol1_12to1_11_1.data.AchievementTranslationMapping;
|
||||
import com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.ClientboundPackets1_9_3;
|
||||
import com.viaversion.viaversion.protocols.v1_11_1to1_12.data.AchievementTranslationMapping;
|
||||
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ClientboundPackets1_9_3;
|
||||
import com.viaversion.viaversion.rewriter.ComponentRewriter;
|
||||
import com.viaversion.viaversion.util.SerializerVersion;
|
||||
import java.util.logging.Level;
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_12to1_11_1.storage;
|
||||
package com.viaversion.viaversion.protocols.v1_11_1to1_12.storage;
|
||||
|
||||
public record ItemTransaction(short windowId, short slotId, short actionId) {
|
||||
}
|
@ -15,18 +15,18 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_11_1to1_11;
|
||||
package com.viaversion.viaversion.protocols.v1_11to1_11_1;
|
||||
|
||||
import com.viaversion.viaversion.api.protocol.AbstractProtocol;
|
||||
import com.viaversion.viaversion.protocols.protocol1_11_1to1_11.packets.InventoryPackets;
|
||||
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;
|
||||
import com.viaversion.viaversion.protocols.v1_11to1_11_1.rewriter.ItemPacketRewriter1_11_1;
|
||||
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ClientboundPackets1_9_3;
|
||||
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ServerboundPackets1_9_3;
|
||||
|
||||
public class Protocol1_11_1To1_11 extends AbstractProtocol<ClientboundPackets1_9_3, ClientboundPackets1_9_3, ServerboundPackets1_9_3, ServerboundPackets1_9_3> {
|
||||
public class Protocol1_11To1_11_1 extends AbstractProtocol<ClientboundPackets1_9_3, ClientboundPackets1_9_3, ServerboundPackets1_9_3, ServerboundPackets1_9_3> {
|
||||
|
||||
private final InventoryPackets itemRewriter = new InventoryPackets(this);
|
||||
private final ItemPacketRewriter1_11_1 itemRewriter = new ItemPacketRewriter1_11_1(this);
|
||||
|
||||
public Protocol1_11_1To1_11() {
|
||||
public Protocol1_11To1_11_1() {
|
||||
super(ClientboundPackets1_9_3.class, ClientboundPackets1_9_3.class, ServerboundPackets1_9_3.class, ServerboundPackets1_9_3.class);
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ public class Protocol1_11_1To1_11 extends AbstractProtocol<ClientboundPackets1_9
|
||||
}
|
||||
|
||||
@Override
|
||||
public InventoryPackets getItemRewriter() {
|
||||
public ItemPacketRewriter1_11_1 getItemRewriter() {
|
||||
return itemRewriter;
|
||||
}
|
||||
}
|
@ -15,19 +15,19 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_11_1to1_11.packets;
|
||||
package com.viaversion.viaversion.protocols.v1_11to1_11_1.rewriter;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.item.Item;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.protocols.protocol1_11_1to1_11.Protocol1_11_1To1_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;
|
||||
import com.viaversion.viaversion.protocols.v1_11to1_11_1.Protocol1_11To1_11_1;
|
||||
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ClientboundPackets1_9_3;
|
||||
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ServerboundPackets1_9_3;
|
||||
import com.viaversion.viaversion.rewriter.ItemRewriter;
|
||||
|
||||
public class InventoryPackets extends ItemRewriter<ClientboundPackets1_9_3, ServerboundPackets1_9_3, Protocol1_11_1To1_11> {
|
||||
public class ItemPacketRewriter1_11_1 extends ItemRewriter<ClientboundPackets1_9_3, ServerboundPackets1_9_3, Protocol1_11To1_11_1> {
|
||||
|
||||
public InventoryPackets(Protocol1_11_1To1_11 protocol) {
|
||||
public ItemPacketRewriter1_11_1(Protocol1_11To1_11_1 protocol) {
|
||||
super(protocol, Type.ITEM1_8, null);
|
||||
}
|
||||
|
@ -15,17 +15,17 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_12_2to1_12_1;
|
||||
package com.viaversion.viaversion.protocols.v1_12_1to1_12_2;
|
||||
|
||||
import com.viaversion.viaversion.api.protocol.AbstractProtocol;
|
||||
import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.protocols.protocol1_12_1to1_12.ClientboundPackets1_12_1;
|
||||
import com.viaversion.viaversion.protocols.protocol1_12_1to1_12.ServerboundPackets1_12_1;
|
||||
import com.viaversion.viaversion.protocols.v1_12to1_12_1.packet.ClientboundPackets1_12_1;
|
||||
import com.viaversion.viaversion.protocols.v1_12to1_12_1.packet.ServerboundPackets1_12_1;
|
||||
|
||||
public class Protocol1_12_2To1_12_1 extends AbstractProtocol<ClientboundPackets1_12_1, ClientboundPackets1_12_1, ServerboundPackets1_12_1, ServerboundPackets1_12_1> {
|
||||
public class Protocol1_12_1To1_12_2 extends AbstractProtocol<ClientboundPackets1_12_1, ClientboundPackets1_12_1, ServerboundPackets1_12_1, ServerboundPackets1_12_1> {
|
||||
|
||||
public Protocol1_12_2To1_12_1() {
|
||||
public Protocol1_12_1To1_12_2() {
|
||||
super(ClientboundPackets1_12_1.class, ClientboundPackets1_12_1.class, ServerboundPackets1_12_1.class, ServerboundPackets1_12_1.class);
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.common.primitives.Ints;
|
||||
@ -42,27 +42,29 @@ import com.viaversion.viaversion.data.entity.EntityTrackerBase;
|
||||
import com.viaversion.viaversion.protocols.base.ClientboundLoginPackets;
|
||||
import com.viaversion.viaversion.protocols.base.ClientboundStatusPackets;
|
||||
import com.viaversion.viaversion.protocols.base.ServerboundLoginPackets;
|
||||
import com.viaversion.viaversion.protocols.protocol1_12_1to1_12.ClientboundPackets1_12_1;
|
||||
import com.viaversion.viaversion.protocols.protocol1_12_1to1_12.ServerboundPackets1_12_1;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections.ConnectionData;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections.providers.BlockConnectionProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections.providers.PacketBlockConnectionProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.data.BlockIdData;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.data.ComponentRewriter1_13;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.data.MappingData;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.data.RecipeData;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.data.StatisticData;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.data.StatisticMappings;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.metadata.MetadataRewriter1_13To1_12_2;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.packets.EntityPackets;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.packets.InventoryPackets;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.packets.WorldPackets;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.providers.BlockEntityProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.providers.PaintingProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.providers.PlayerLookTargetProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.storage.BlockConnectionStorage;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.storage.BlockStorage;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.storage.TabCompleteTracker;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.packet.ClientboundPackets1_13;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.packet.ServerboundPackets1_13;
|
||||
import com.viaversion.viaversion.protocols.v1_12to1_12_1.packet.ClientboundPackets1_12_1;
|
||||
import com.viaversion.viaversion.protocols.v1_12to1_12_1.packet.ServerboundPackets1_12_1;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections.ConnectionData;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections.providers.BlockConnectionProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections.providers.PacketBlockConnectionProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.data.BlockIdData;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.data.ComponentRewriter1_13;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.data.MappingData1_13;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.data.RecipeData;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.data.StatisticData;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.data.StatisticMappings;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.metadata.MetadataRewriter1_13To1_12_2;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.BlockEntityProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.PaintingProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.PlayerLookTargetProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.rewriter.EntityPacketRewriter1_13;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.rewriter.ItemPacketRewriter1_13;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.rewriter.WorldPacketRewriter1_13;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.storage.BlockConnectionStorage;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.storage.BlockStorage;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.storage.TabCompleteTracker;
|
||||
import com.viaversion.viaversion.rewriter.SoundRewriter;
|
||||
import com.viaversion.viaversion.util.ChatColorUtil;
|
||||
import com.viaversion.viaversion.util.ComponentUtil;
|
||||
@ -75,14 +77,14 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class Protocol1_13To1_12_2 extends AbstractProtocol<ClientboundPackets1_12_1, ClientboundPackets1_13, ServerboundPackets1_12_1, ServerboundPackets1_13> {
|
||||
public class Protocol1_12_2To1_13 extends AbstractProtocol<ClientboundPackets1_12_1, ClientboundPackets1_13, ServerboundPackets1_12_1, ServerboundPackets1_13> {
|
||||
|
||||
public static final MappingData MAPPINGS = new MappingData();
|
||||
public static final MappingData1_13 MAPPINGS = new MappingData1_13();
|
||||
// These are arbitrary rewrite values, it just needs an invalid color code character.
|
||||
private static final Map<Character, Character> SCOREBOARD_TEAM_NAME_REWRITE = new HashMap<>();
|
||||
private static final Set<Character> FORMATTING_CODES = Sets.newHashSet('k', 'l', 'm', 'n', 'o', 'r');
|
||||
private final MetadataRewriter1_13To1_12_2 entityRewriter = new MetadataRewriter1_13To1_12_2(this);
|
||||
private final InventoryPackets itemRewriter = new InventoryPackets(this);
|
||||
private final ItemPacketRewriter1_13 itemRewriter = new ItemPacketRewriter1_13(this);
|
||||
private final ComponentRewriter1_13<ClientboundPackets1_12_1> componentRewriter = new ComponentRewriter1_13<>(this);
|
||||
|
||||
static {
|
||||
@ -110,7 +112,7 @@ public class Protocol1_13To1_12_2 extends AbstractProtocol<ClientboundPackets1_1
|
||||
SCOREBOARD_TEAM_NAME_REWRITE.put('r', '/');
|
||||
}
|
||||
|
||||
public Protocol1_13To1_12_2() {
|
||||
public Protocol1_12_2To1_13() {
|
||||
super(ClientboundPackets1_12_1.class, ClientboundPackets1_13.class, ServerboundPackets1_12_1.class, ServerboundPackets1_13.class);
|
||||
}
|
||||
|
||||
@ -140,7 +142,7 @@ public class Protocol1_13To1_12_2 extends AbstractProtocol<ClientboundPackets1_1
|
||||
wrapper.write(Type.STRING, "minecraft:ask_server"); // Ask server
|
||||
|
||||
wrapper.write(Type.VAR_INT, 0); // Root node index
|
||||
}).scheduleSend(Protocol1_13To1_12_2.class);
|
||||
}).scheduleSend(Protocol1_12_2To1_13.class);
|
||||
|
||||
// Send tags packet
|
||||
w.create(ClientboundPackets1_13.TAGS, wrapper -> {
|
||||
@ -162,15 +164,15 @@ public class Protocol1_13To1_12_2 extends AbstractProtocol<ClientboundPackets1_1
|
||||
// Needs copy as other protocols may modify it
|
||||
wrapper.write(Type.VAR_INT_ARRAY_PRIMITIVE, tag.getValue());
|
||||
}
|
||||
}).scheduleSend(Protocol1_13To1_12_2.class);
|
||||
}).scheduleSend(Protocol1_12_2To1_13.class);
|
||||
};
|
||||
|
||||
@Override
|
||||
protected void registerPackets() {
|
||||
super.registerPackets();
|
||||
|
||||
EntityPackets.register(this);
|
||||
WorldPackets.register(this);
|
||||
EntityPacketRewriter1_13.register(this);
|
||||
WorldPacketRewriter1_13.register(this);
|
||||
|
||||
registerClientbound(State.LOGIN, ClientboundLoginPackets.LOGIN_DISCONNECT.getId(), ClientboundLoginPackets.LOGIN_DISCONNECT.getId(), wrapper -> {
|
||||
componentRewriter.processText(wrapper.user(), wrapper.passthrough(Type.COMPONENT));
|
||||
@ -300,7 +302,7 @@ public class Protocol1_13To1_12_2 extends AbstractProtocol<ClientboundPackets1_1
|
||||
PacketWrapper packet = wrapper.create(ClientboundPackets1_13.COOLDOWN);
|
||||
packet.write(Type.VAR_INT, newItem);
|
||||
packet.write(Type.VAR_INT, ticks);
|
||||
packet.send(Protocol1_13To1_12_2.class);
|
||||
packet.send(Protocol1_12_2To1_13.class);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
@ -312,7 +314,7 @@ public class Protocol1_13To1_12_2 extends AbstractProtocol<ClientboundPackets1_1
|
||||
PacketWrapper packet = wrapper.create(ClientboundPackets1_13.COOLDOWN);
|
||||
packet.write(Type.VAR_INT, newItem);
|
||||
packet.write(Type.VAR_INT, ticks);
|
||||
packet.send(Protocol1_13To1_12_2.class);
|
||||
packet.send(Protocol1_12_2To1_13.class);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
@ -336,7 +338,7 @@ public class Protocol1_13To1_12_2 extends AbstractProtocol<ClientboundPackets1_1
|
||||
} else if (id == 2001) { // Block break + block break sound
|
||||
int blockId = data & 0xFFF;
|
||||
int blockData = data >> 12;
|
||||
wrapper.set(Type.INT, 1, WorldPackets.toNewId(IdAndData.toRawData(blockId, blockData)));
|
||||
wrapper.set(Type.INT, 1, WorldPacketRewriter1_13.toNewId(IdAndData.toRawData(blockId, blockData)));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -394,7 +396,7 @@ public class Protocol1_13To1_12_2 extends AbstractProtocol<ClientboundPackets1_1
|
||||
wrapper.write(Type.STRING_ARRAY, stringIds);
|
||||
}
|
||||
if (action == 0) {
|
||||
wrapper.create(ClientboundPackets1_13.DECLARE_RECIPES, w -> writeDeclareRecipes(w)).send(Protocol1_13To1_12_2.class);
|
||||
wrapper.create(ClientboundPackets1_13.DECLARE_RECIPES, w -> writeDeclareRecipes(w)).send(Protocol1_12_2To1_13.class);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -896,7 +898,7 @@ public class Protocol1_13To1_12_2 extends AbstractProtocol<ClientboundPackets1_1
|
||||
}
|
||||
|
||||
@Override
|
||||
public MappingData getMappingData() {
|
||||
public MappingData1_13 getMappingData() {
|
||||
return MAPPINGS;
|
||||
}
|
||||
|
||||
@ -906,7 +908,7 @@ public class Protocol1_13To1_12_2 extends AbstractProtocol<ClientboundPackets1_1
|
||||
}
|
||||
|
||||
@Override
|
||||
public InventoryPackets getItemRewriter() {
|
||||
public ItemPacketRewriter1_13 getItemRewriter() {
|
||||
return itemRewriter;
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.BlockFace;
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.BlockFace;
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.viaversion.viaversion.api.minecraft.BlockFace;
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.BlockFace;
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.BlockFace;
|
@ -15,15 +15,15 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.ByteArrayTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.IntArrayTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.ListTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.NumberTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.StringTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.Tag;
|
||||
import com.viaversion.nbt.tag.ByteArrayTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.nbt.tag.IntArrayTag;
|
||||
import com.viaversion.nbt.tag.ListTag;
|
||||
import com.viaversion.nbt.tag.NumberTag;
|
||||
import com.viaversion.nbt.tag.StringTag;
|
||||
import com.viaversion.nbt.tag.Tag;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.data.MappingDataLoader;
|
||||
@ -36,11 +36,11 @@ import com.viaversion.viaversion.api.minecraft.chunks.DataPalette;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.PaletteType;
|
||||
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.ClientboundPackets1_13;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.Protocol1_13To1_12_2;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections.providers.BlockConnectionProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections.providers.PacketBlockConnectionProvider;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections.providers.UserBlockData;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.Protocol1_12_2To1_13;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections.providers.BlockConnectionProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections.providers.PacketBlockConnectionProvider;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections.providers.UserBlockData;
|
||||
import com.viaversion.viaversion.protocols.v1_12_2to1_13.packet.ClientboundPackets1_13;
|
||||
import com.viaversion.viaversion.util.Key;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
@ -91,7 +91,7 @@ public final class ConnectionData {
|
||||
PacketWrapper blockUpdatePacket = PacketWrapper.create(ClientboundPackets1_13.BLOCK_CHANGE, null, user);
|
||||
blockUpdatePacket.write(Type.POSITION1_8, pos);
|
||||
blockUpdatePacket.write(Type.VAR_INT, newBlockState);
|
||||
blockUpdatePacket.send(Protocol1_13To1_12_2.class);
|
||||
blockUpdatePacket.send(Protocol1_12_2To1_13.class);
|
||||
}
|
||||
}
|
||||
|
||||
@ -723,7 +723,7 @@ public final class ConnectionData {
|
||||
wrapper.write(Type.INT, chunkX + chunkDeltaX);
|
||||
wrapper.write(Type.INT, chunkZ + chunkDeltaZ);
|
||||
wrapper.write(Type.BLOCK_CHANGE_RECORD_ARRAY, updates.toArray(EMPTY_RECORDS));
|
||||
wrapper.send(Protocol1_13To1_12_2.class);
|
||||
wrapper.send(Protocol1_12_2To1_13.class);
|
||||
updates.clear();
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.Position;
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.BlockFace;
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.BlockFace;
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.ProtocolInfo;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
public class MelonConnectionHandler extends AbstractStempConnectionHandler {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
public class NetherFenceConnectionHandler extends AbstractFenceConnectionHandler {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
public class PumpkinConnectionHandler extends AbstractStempConnectionHandler {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.BlockFace;
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.BlockFace;
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.BlockFace;
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.BlockFace;
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.BlockFace;
|
@ -15,7 +15,7 @@
|
||||
* 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 com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections;
|
||||
package com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.BlockFace;
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren