Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-11-17 13:30:14 +01:00
1.19.1-pre3
Dieser Commit ist enthalten in:
Ursprung
317af16975
Commit
32bd9378e1
@ -5,7 +5,7 @@ plugins {
|
||||
|
||||
allprojects {
|
||||
group = "com.viaversion"
|
||||
version = "4.4.0-1.19.1-pre2-SNAPSHOT"
|
||||
version = "4.4.0-1.19.1-pre3-SNAPSHOT"
|
||||
description = "Allow older clients to join newer server versions."
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ public interface ViaBackwardsPlatform {
|
||||
protocolManager.registerProtocol(new Protocol1_17_1To1_18(), ProtocolVersion.v1_17_1, ProtocolVersion.v1_18);
|
||||
protocolManager.registerProtocol(new Protocol1_18To1_18_2(), ProtocolVersion.v1_18, ProtocolVersion.v1_18_2);
|
||||
|
||||
// 1.19.0 clients cannot join 1.19.1+ servers due to changes in the public profile key. 1.19.0 servers can use older ViaBackwards 4.3.1 snapshots
|
||||
// 1.19.0 clients cannot join 1.19.1+ servers due to changes in the public profile key. 1.19.0 servers can use ViaBackwards 4.3.1
|
||||
protocolManager.registerProtocol(new Protocol1_18_2To1_19_1(), ProtocolVersion.v1_18_2, ProtocolVersion.v1_19_1);
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ import com.viaversion.viaversion.protocols.base.ClientboundLoginPackets;
|
||||
import com.viaversion.viaversion.protocols.base.ServerboundLoginPackets;
|
||||
import com.viaversion.viaversion.protocols.protocol1_17to1_16_4.ServerboundPackets1_17;
|
||||
import com.viaversion.viaversion.protocols.protocol1_18to1_17_1.ClientboundPackets1_18;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19to1_18_2.ClientboundPackets1_19;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19_1to1_19.ClientboundPackets1_19_1;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19to1_18_2.Protocol1_19To1_18_2;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19to1_18_2.ServerboundPackets1_19;
|
||||
import com.viaversion.viaversion.rewriter.CommandRewriter;
|
||||
@ -62,7 +62,7 @@ import com.viaversion.viaversion.rewriter.TagRewriter;
|
||||
import java.time.Instant;
|
||||
import java.util.UUID;
|
||||
|
||||
public final class Protocol1_18_2To1_19_1 extends BackwardsProtocol<ClientboundPackets1_19, ClientboundPackets1_18, ServerboundPackets1_19, ServerboundPackets1_17> {
|
||||
public final class Protocol1_18_2To1_19_1 extends BackwardsProtocol<ClientboundPackets1_19_1, ClientboundPackets1_18, ServerboundPackets1_19, ServerboundPackets1_17> {
|
||||
|
||||
public static final BackwardsMappings MAPPINGS = new BackwardsMappings();
|
||||
private static final UUID ZERO_UUID = new UUID(0, 0);
|
||||
@ -72,7 +72,7 @@ public final class Protocol1_18_2To1_19_1 extends BackwardsProtocol<ClientboundP
|
||||
private final TranslatableRewriter translatableRewriter = new TranslatableRewriter(this);
|
||||
|
||||
public Protocol1_18_2To1_19_1() {
|
||||
super(ClientboundPackets1_19.class, ClientboundPackets1_18.class, ServerboundPackets1_19.class, ServerboundPackets1_17.class);
|
||||
super(ClientboundPackets1_19_1.class, ClientboundPackets1_18.class, ServerboundPackets1_19.class, ServerboundPackets1_17.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -82,22 +82,22 @@ public final class Protocol1_18_2To1_19_1 extends BackwardsProtocol<ClientboundP
|
||||
entityRewriter.onMappingDataLoaded();
|
||||
});
|
||||
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets1_19.ACTIONBAR);
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets1_19.TITLE_TEXT);
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets1_19.TITLE_SUBTITLE);
|
||||
translatableRewriter.registerBossBar(ClientboundPackets1_19.BOSSBAR);
|
||||
translatableRewriter.registerDisconnect(ClientboundPackets1_19.DISCONNECT);
|
||||
translatableRewriter.registerTabList(ClientboundPackets1_19.TAB_LIST);
|
||||
translatableRewriter.registerOpenWindow(ClientboundPackets1_19.OPEN_WINDOW);
|
||||
translatableRewriter.registerCombatKill(ClientboundPackets1_19.COMBAT_KILL);
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets1_19_1.ACTIONBAR);
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets1_19_1.TITLE_TEXT);
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets1_19_1.TITLE_SUBTITLE);
|
||||
translatableRewriter.registerBossBar(ClientboundPackets1_19_1.BOSSBAR);
|
||||
translatableRewriter.registerDisconnect(ClientboundPackets1_19_1.DISCONNECT);
|
||||
translatableRewriter.registerTabList(ClientboundPackets1_19_1.TAB_LIST);
|
||||
translatableRewriter.registerOpenWindow(ClientboundPackets1_19_1.OPEN_WINDOW);
|
||||
translatableRewriter.registerCombatKill(ClientboundPackets1_19_1.COMBAT_KILL);
|
||||
translatableRewriter.registerPing();
|
||||
|
||||
blockItemPackets.register();
|
||||
entityRewriter.register();
|
||||
|
||||
final SoundRewriter soundRewriter = new SoundRewriter(this);
|
||||
soundRewriter.registerStopSound(ClientboundPackets1_19.STOP_SOUND);
|
||||
registerClientbound(ClientboundPackets1_19.SOUND, new PacketRemapper() {
|
||||
soundRewriter.registerStopSound(ClientboundPackets1_19_1.STOP_SOUND);
|
||||
registerClientbound(ClientboundPackets1_19_1.SOUND, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.VAR_INT); // Sound id
|
||||
@ -111,7 +111,7 @@ public final class Protocol1_18_2To1_19_1 extends BackwardsProtocol<ClientboundP
|
||||
handler(soundRewriter.getSoundHandler());
|
||||
}
|
||||
});
|
||||
registerClientbound(ClientboundPackets1_19.ENTITY_SOUND, new PacketRemapper() {
|
||||
registerClientbound(ClientboundPackets1_19_1.ENTITY_SOUND, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.VAR_INT); // Sound id
|
||||
@ -123,7 +123,7 @@ public final class Protocol1_18_2To1_19_1 extends BackwardsProtocol<ClientboundP
|
||||
handler(soundRewriter.getSoundHandler());
|
||||
}
|
||||
});
|
||||
registerClientbound(ClientboundPackets1_19.NAMED_SOUND, new PacketRemapper() {
|
||||
registerClientbound(ClientboundPackets1_19_1.NAMED_SOUND, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.STRING); // Sound name
|
||||
@ -147,12 +147,12 @@ public final class Protocol1_18_2To1_19_1 extends BackwardsProtocol<ClientboundP
|
||||
tagRewriter.renameTag(RegistryType.BLOCK, "minecraft:wool_carpets", "minecraft:carpets");
|
||||
tagRewriter.renameTag(RegistryType.ITEM, "minecraft:wool_carpets", "minecraft:carpets");
|
||||
tagRewriter.addEmptyTag(RegistryType.ITEM, "minecraft:occludes_vibration_signals");
|
||||
tagRewriter.registerGeneric(ClientboundPackets1_19.TAGS);
|
||||
tagRewriter.registerGeneric(ClientboundPackets1_19_1.TAGS);
|
||||
|
||||
new StatisticsRewriter(this).register(ClientboundPackets1_19.STATISTICS);
|
||||
new StatisticsRewriter(this).register(ClientboundPackets1_19_1.STATISTICS);
|
||||
|
||||
final CommandRewriter commandRewriter = new CommandRewriter1_19(this);
|
||||
registerClientbound(ClientboundPackets1_19.DECLARE_COMMANDS, new PacketRemapper() {
|
||||
registerClientbound(ClientboundPackets1_19_1.DECLARE_COMMANDS, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
handler(wrapper -> {
|
||||
@ -191,10 +191,10 @@ public final class Protocol1_18_2To1_19_1 extends BackwardsProtocol<ClientboundP
|
||||
}
|
||||
});
|
||||
|
||||
cancelClientbound(ClientboundPackets1_19.SERVER_DATA);
|
||||
cancelClientbound(ClientboundPackets1_19.CHAT_PREVIEW);
|
||||
cancelClientbound(ClientboundPackets1_19.SET_DISPLAY_CHAT_PREVIEW);
|
||||
registerClientbound(ClientboundPackets1_19.PLAYER_CHAT, ClientboundPackets1_18.CHAT_MESSAGE, new PacketRemapper() {
|
||||
cancelClientbound(ClientboundPackets1_19_1.SERVER_DATA);
|
||||
cancelClientbound(ClientboundPackets1_19_1.CHAT_PREVIEW);
|
||||
cancelClientbound(ClientboundPackets1_19_1.SET_DISPLAY_CHAT_PREVIEW);
|
||||
registerClientbound(ClientboundPackets1_19_1.PLAYER_CHAT, ClientboundPackets1_18.CHAT_MESSAGE, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
handler(wrapper -> {
|
||||
@ -223,7 +223,7 @@ public final class Protocol1_18_2To1_19_1 extends BackwardsProtocol<ClientboundP
|
||||
}
|
||||
});
|
||||
|
||||
registerClientbound(ClientboundPackets1_19.SYSTEM_CHAT, ClientboundPackets1_18.CHAT_MESSAGE, new PacketRemapper() {
|
||||
registerClientbound(ClientboundPackets1_19_1.SYSTEM_CHAT, ClientboundPackets1_18.CHAT_MESSAGE, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.COMPONENT);
|
||||
@ -292,6 +292,9 @@ public final class Protocol1_18_2To1_19_1 extends BackwardsProtocol<ClientboundP
|
||||
create(Type.BOOLEAN, true); // Is nonce
|
||||
}
|
||||
});
|
||||
|
||||
// Can't do anything with them unless we add clutter clients with fake player profiles
|
||||
cancelClientbound(ClientboundPackets1_19_1.CUSTOM_CHAT_COMPLETIONS);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -32,7 +32,7 @@ import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.protocols.protocol1_16to1_15_2.data.RecipeRewriter1_16;
|
||||
import com.viaversion.viaversion.protocols.protocol1_17to1_16_4.ServerboundPackets1_17;
|
||||
import com.viaversion.viaversion.protocols.protocol1_18to1_17_1.types.Chunk1_18Type;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19to1_18_2.ClientboundPackets1_19;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19_1to1_19.ClientboundPackets1_19_1;
|
||||
import com.viaversion.viaversion.rewriter.BlockRewriter;
|
||||
import com.viaversion.viaversion.util.MathUtil;
|
||||
|
||||
@ -46,23 +46,23 @@ public final class BlockItemPackets1_19 extends ItemRewriter<Protocol1_18_2To1_1
|
||||
protected void registerPackets() {
|
||||
final BlockRewriter blockRewriter = new BlockRewriter(protocol, Type.POSITION1_14);
|
||||
|
||||
new RecipeRewriter1_16(protocol).registerDefaultHandler(ClientboundPackets1_19.DECLARE_RECIPES);
|
||||
new RecipeRewriter1_16(protocol).registerDefaultHandler(ClientboundPackets1_19_1.DECLARE_RECIPES);
|
||||
|
||||
registerSetCooldown(ClientboundPackets1_19.COOLDOWN);
|
||||
registerWindowItems1_17_1(ClientboundPackets1_19.WINDOW_ITEMS, Type.FLAT_VAR_INT_ITEM_ARRAY_VAR_INT, Type.FLAT_VAR_INT_ITEM);
|
||||
registerSetSlot1_17_1(ClientboundPackets1_19.SET_SLOT, Type.FLAT_VAR_INT_ITEM);
|
||||
registerEntityEquipmentArray(ClientboundPackets1_19.ENTITY_EQUIPMENT, Type.FLAT_VAR_INT_ITEM);
|
||||
registerAdvancements(ClientboundPackets1_19.ADVANCEMENTS, Type.FLAT_VAR_INT_ITEM);
|
||||
registerSetCooldown(ClientboundPackets1_19_1.COOLDOWN);
|
||||
registerWindowItems1_17_1(ClientboundPackets1_19_1.WINDOW_ITEMS, Type.FLAT_VAR_INT_ITEM_ARRAY_VAR_INT, Type.FLAT_VAR_INT_ITEM);
|
||||
registerSetSlot1_17_1(ClientboundPackets1_19_1.SET_SLOT, Type.FLAT_VAR_INT_ITEM);
|
||||
registerEntityEquipmentArray(ClientboundPackets1_19_1.ENTITY_EQUIPMENT, Type.FLAT_VAR_INT_ITEM);
|
||||
registerAdvancements(ClientboundPackets1_19_1.ADVANCEMENTS, Type.FLAT_VAR_INT_ITEM);
|
||||
registerClickWindow1_17_1(ServerboundPackets1_17.CLICK_WINDOW, Type.FLAT_VAR_INT_ITEM);
|
||||
|
||||
blockRewriter.registerBlockAction(ClientboundPackets1_19.BLOCK_ACTION);
|
||||
blockRewriter.registerBlockChange(ClientboundPackets1_19.BLOCK_CHANGE);
|
||||
blockRewriter.registerVarLongMultiBlockChange(ClientboundPackets1_19.MULTI_BLOCK_CHANGE);
|
||||
blockRewriter.registerEffect(ClientboundPackets1_19.EFFECT, 1010, 2001);
|
||||
blockRewriter.registerBlockAction(ClientboundPackets1_19_1.BLOCK_ACTION);
|
||||
blockRewriter.registerBlockChange(ClientboundPackets1_19_1.BLOCK_CHANGE);
|
||||
blockRewriter.registerVarLongMultiBlockChange(ClientboundPackets1_19_1.MULTI_BLOCK_CHANGE);
|
||||
blockRewriter.registerEffect(ClientboundPackets1_19_1.EFFECT, 1010, 2001);
|
||||
|
||||
registerCreativeInvAction(ServerboundPackets1_17.CREATIVE_INVENTORY_ACTION, Type.FLAT_VAR_INT_ITEM);
|
||||
|
||||
protocol.registerClientbound(ClientboundPackets1_19.TRADE_LIST, new PacketRemapper() {
|
||||
protocol.registerClientbound(ClientboundPackets1_19_1.TRADE_LIST, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.VAR_INT); // Container id
|
||||
@ -94,9 +94,9 @@ public final class BlockItemPackets1_19 extends ItemRewriter<Protocol1_18_2To1_1
|
||||
}
|
||||
});
|
||||
|
||||
registerWindowPropertyEnchantmentHandler(ClientboundPackets1_19.WINDOW_PROPERTY);
|
||||
registerWindowPropertyEnchantmentHandler(ClientboundPackets1_19_1.WINDOW_PROPERTY);
|
||||
|
||||
protocol.registerClientbound(ClientboundPackets1_19.BLOCK_CHANGED_ACK, null, new PacketRemapper() {
|
||||
protocol.registerClientbound(ClientboundPackets1_19_1.BLOCK_CHANGED_ACK, null, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
read(Type.VAR_INT); // Sequence
|
||||
@ -104,7 +104,7 @@ public final class BlockItemPackets1_19 extends ItemRewriter<Protocol1_18_2To1_1
|
||||
}
|
||||
});
|
||||
|
||||
protocol.registerClientbound(ClientboundPackets1_19.SPAWN_PARTICLE, new PacketRemapper() {
|
||||
protocol.registerClientbound(ClientboundPackets1_19_1.SPAWN_PARTICLE, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.VAR_INT, Type.INT); // Particle id
|
||||
@ -139,7 +139,7 @@ public final class BlockItemPackets1_19 extends ItemRewriter<Protocol1_18_2To1_1
|
||||
});
|
||||
|
||||
|
||||
protocol.registerClientbound(ClientboundPackets1_19.CHUNK_DATA, new PacketRemapper() {
|
||||
protocol.registerClientbound(ClientboundPackets1_19_1.CHUNK_DATA, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
handler(wrapper -> {
|
||||
|
@ -39,7 +39,7 @@ import com.viaversion.viaversion.libs.opennbt.tag.builtin.NumberTag;
|
||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag;
|
||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.Tag;
|
||||
import com.viaversion.viaversion.protocols.protocol1_18to1_17_1.ClientboundPackets1_18;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19to1_18_2.ClientboundPackets1_19;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19_1to1_19.ClientboundPackets1_19_1;
|
||||
|
||||
public final class EntityPackets1_19 extends EntityRewriter<Protocol1_18_2To1_19_1> {
|
||||
|
||||
@ -49,12 +49,12 @@ public final class EntityPackets1_19 extends EntityRewriter<Protocol1_18_2To1_19
|
||||
|
||||
@Override
|
||||
protected void registerPackets() {
|
||||
registerTracker(ClientboundPackets1_19.SPAWN_EXPERIENCE_ORB, Entity1_19Types.EXPERIENCE_ORB);
|
||||
registerTracker(ClientboundPackets1_19.SPAWN_PLAYER, Entity1_19Types.PLAYER);
|
||||
registerMetadataRewriter(ClientboundPackets1_19.ENTITY_METADATA, Types1_19.METADATA_LIST, Types1_18.METADATA_LIST);
|
||||
registerRemoveEntities(ClientboundPackets1_19.REMOVE_ENTITIES);
|
||||
registerTracker(ClientboundPackets1_19_1.SPAWN_EXPERIENCE_ORB, Entity1_19Types.EXPERIENCE_ORB);
|
||||
registerTracker(ClientboundPackets1_19_1.SPAWN_PLAYER, Entity1_19Types.PLAYER);
|
||||
registerMetadataRewriter(ClientboundPackets1_19_1.ENTITY_METADATA, Types1_19.METADATA_LIST, Types1_18.METADATA_LIST);
|
||||
registerRemoveEntities(ClientboundPackets1_19_1.REMOVE_ENTITIES);
|
||||
|
||||
protocol.registerClientbound(ClientboundPackets1_19.SPAWN_ENTITY, new PacketRemapper() {
|
||||
protocol.registerClientbound(ClientboundPackets1_19_1.SPAWN_ENTITY, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.VAR_INT); // Entity id
|
||||
@ -98,7 +98,7 @@ public final class EntityPackets1_19 extends EntityRewriter<Protocol1_18_2To1_19
|
||||
}
|
||||
});
|
||||
|
||||
protocol.registerClientbound(ClientboundPackets1_19.ENTITY_EFFECT, new PacketRemapper() {
|
||||
protocol.registerClientbound(ClientboundPackets1_19_1.ENTITY_EFFECT, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.VAR_INT); // Entity id
|
||||
@ -115,7 +115,7 @@ public final class EntityPackets1_19 extends EntityRewriter<Protocol1_18_2To1_19
|
||||
}
|
||||
});
|
||||
|
||||
protocol.registerClientbound(ClientboundPackets1_19.JOIN_GAME, new PacketRemapper() {
|
||||
protocol.registerClientbound(ClientboundPackets1_19_1.JOIN_GAME, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.INT); // Entity ID
|
||||
@ -180,7 +180,7 @@ public final class EntityPackets1_19 extends EntityRewriter<Protocol1_18_2To1_19
|
||||
}
|
||||
});
|
||||
|
||||
protocol.registerClientbound(ClientboundPackets1_19.RESPAWN, new PacketRemapper() {
|
||||
protocol.registerClientbound(ClientboundPackets1_19_1.RESPAWN, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
handler(wrapper -> {
|
||||
@ -204,7 +204,7 @@ public final class EntityPackets1_19 extends EntityRewriter<Protocol1_18_2To1_19
|
||||
}
|
||||
});
|
||||
|
||||
protocol.registerClientbound(ClientboundPackets1_19.PLAYER_INFO, new PacketRemapper() {
|
||||
protocol.registerClientbound(ClientboundPackets1_19_1.PLAYER_INFO, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
handler(wrapper -> {
|
||||
|
@ -3,7 +3,7 @@ metadata.format.version = "1.1"
|
||||
[versions]
|
||||
|
||||
# ViaVersion
|
||||
viaver = "4.3.2-1.19.1-pre2-SNAPSHOT"
|
||||
viaver = "4.4.0-1.19.1-pre3-SNAPSHOT"
|
||||
|
||||
# Common provided
|
||||
netty = "4.0.20.Final"
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren