mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2026-11-04 17:00:16 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b63f50750d | ||
|
|
50e7c15db1 | ||
|
|
ef004cfa9c | ||
|
|
4f4fd5db8f | ||
|
|
57157fd521 | ||
|
|
db8d9ab411 | ||
|
|
f92a47df21 | ||
|
|
00a08e95ef | ||
|
|
1c652f82fc | ||
|
|
7bb2c3e188 | ||
|
|
92bbec9b73 | ||
|
|
2604f8e37f | ||
|
|
938164f22d | ||
|
|
2b6948cec3 | ||
|
|
9cfa44368a | ||
|
|
f86925d747 | ||
|
|
5a89919058 | ||
|
|
bf41b02718 | ||
|
|
593106ff79 | ||
|
|
0add20f841 | ||
|
|
dc521d9918 | ||
|
|
98c20752c3 | ||
|
|
bbd17ea7c8 | ||
|
|
b2902561bb | ||
|
|
010fc0bb13 | ||
|
|
d1a13c6f78 | ||
|
|
7be2b232d1 |
No files matched your search
@@ -8,7 +8,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
// version must be manually kept in sync with the one in root project settings.gradle.kts
|
||||
implementation("com.gradleup.shadow:shadow-gradle-plugin:9.3.1")
|
||||
implementation("com.gradleup.shadow:shadow-gradle-plugin:9.4.1")
|
||||
|
||||
// A nice no-conflict comment for patching in downgrading
|
||||
}
|
||||
@@ -67,6 +67,7 @@ import com.viaversion.viabackwards.protocol.v1_21_9to1_21_7.Protocol1_21_9To1_21
|
||||
import com.viaversion.viabackwards.protocol.v1_21to1_20_5.Protocol1_21To1_20_5;
|
||||
import com.viaversion.viabackwards.protocol.v1_9_1to1_9.Protocol1_9_1To1_9;
|
||||
import com.viaversion.viabackwards.protocol.v1_9_3to1_9_1.Protocol1_9_3To1_9_1;
|
||||
import com.viaversion.viabackwards.protocol.v26_1to1_21_11.Protocol26_1To1_21_11;
|
||||
import com.viaversion.viabackwards.utils.VersionInfo;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.protocol.ProtocolManager;
|
||||
@@ -78,7 +79,7 @@ import java.util.logging.Logger;
|
||||
|
||||
public interface ViaBackwardsPlatform {
|
||||
|
||||
String MINIMUM_VV_VERSION = "5.7.2";
|
||||
String MINIMUM_VV_VERSION = "5.8.1";
|
||||
|
||||
default void init(final File configFile) {
|
||||
init(new ViaBackwardsConfig(configFile, getLogger()));
|
||||
@@ -161,6 +162,8 @@ public interface ViaBackwardsPlatform {
|
||||
protocolManager.registerProtocol(new Protocol1_21_7To1_21_6(), ProtocolVersion.v1_21_6, ProtocolVersion.v1_21_7);
|
||||
protocolManager.registerProtocol(new Protocol1_21_9To1_21_7(), ProtocolVersion.v1_21_7, ProtocolVersion.v1_21_9);
|
||||
protocolManager.registerProtocol(new Protocol1_21_11To1_21_9(), ProtocolVersion.v1_21_9, ProtocolVersion.v1_21_11);
|
||||
|
||||
protocolManager.registerProtocol(new Protocol26_1To1_21_11(), ProtocolVersion.v1_21_11, ProtocolVersion.v26_1);
|
||||
}
|
||||
|
||||
default void enable() {
|
||||
|
||||
+28
-29
@@ -23,11 +23,11 @@ import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.data.StructuredDataContainer;
|
||||
import com.viaversion.viaversion.api.minecraft.item.Item;
|
||||
import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_21_5;
|
||||
import com.viaversion.viaversion.protocols.v1_21_2to1_21_4.packet.ServerboundPacket1_21_4;
|
||||
import com.viaversion.viaversion.protocols.v1_21_2to1_21_4.packet.ServerboundPackets1_21_4;
|
||||
import com.viaversion.viaversion.protocols.v1_21_11to26_1.packet.ClientboundPacket26_1;
|
||||
import com.viaversion.viaversion.protocols.v1_21_11to26_1.packet.ClientboundPackets26_1;
|
||||
import com.viaversion.viaversion.protocols.v1_21_4to1_21_5.rewriter.RecipeDisplayRewriter1_21_5;
|
||||
import com.viaversion.viaversion.protocols.v1_21to1_21_2.packet.ClientboundPacket1_21_2;
|
||||
import com.viaversion.viaversion.protocols.v1_21to1_21_2.packet.ClientboundPackets1_21_2;
|
||||
import com.viaversion.viaversion.protocols.v1_21_5to1_21_6.packet.ServerboundPackets1_21_6;
|
||||
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ServerboundPacket1_21_9;
|
||||
import com.viaversion.viaversion.rewriter.BlockRewriter;
|
||||
import com.viaversion.viaversion.rewriter.RecipeDisplayRewriter;
|
||||
import com.viaversion.viaversion.rewriter.block.BlockRewriter1_21_5;
|
||||
@@ -35,39 +35,38 @@ import com.viaversion.viaversion.rewriter.block.BlockRewriter1_21_5;
|
||||
// To replace if needed:
|
||||
// ChunkType1_21_5
|
||||
// RecipeDisplayRewriter
|
||||
// Types1_21_4
|
||||
final class BlockItemPacketRewriter1_99 extends BackwardsStructuredItemRewriter<ClientboundPacket1_21_2, ServerboundPacket1_21_4, Protocol1_99To1_98> {
|
||||
final class BlockItemPacketRewriter99_1 extends BackwardsStructuredItemRewriter<ClientboundPacket26_1, ServerboundPacket1_21_9, Protocol99_1To98_1> {
|
||||
|
||||
public BlockItemPacketRewriter1_99(final Protocol1_99To1_98 protocol) {
|
||||
public BlockItemPacketRewriter99_1(final Protocol99_1To98_1 protocol) {
|
||||
super(protocol);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerPackets() {
|
||||
final BlockRewriter<ClientboundPacket1_21_2> blockRewriter = new BlockRewriter1_21_5<>(protocol);
|
||||
blockRewriter.registerBlockEvent(ClientboundPackets1_21_2.BLOCK_EVENT);
|
||||
blockRewriter.registerBlockUpdate(ClientboundPackets1_21_2.BLOCK_UPDATE);
|
||||
blockRewriter.registerSectionBlocksUpdate1_20(ClientboundPackets1_21_2.SECTION_BLOCKS_UPDATE);
|
||||
blockRewriter.registerLevelEvent1_21(ClientboundPackets1_21_2.LEVEL_EVENT, 2001);
|
||||
blockRewriter.registerLevelChunk1_19(ClientboundPackets1_21_2.LEVEL_CHUNK_WITH_LIGHT, ChunkType1_21_5::new);
|
||||
blockRewriter.registerBlockEntityData(ClientboundPackets1_21_2.BLOCK_ENTITY_DATA);
|
||||
final BlockRewriter<ClientboundPacket26_1> blockRewriter = new BlockRewriter1_21_5<>(protocol);
|
||||
blockRewriter.registerBlockEvent(ClientboundPackets26_1.BLOCK_EVENT);
|
||||
blockRewriter.registerBlockUpdate(ClientboundPackets26_1.BLOCK_UPDATE);
|
||||
blockRewriter.registerSectionBlocksUpdate1_20(ClientboundPackets26_1.SECTION_BLOCKS_UPDATE);
|
||||
blockRewriter.registerLevelEvent1_21(ClientboundPackets26_1.LEVEL_EVENT, 2001);
|
||||
blockRewriter.registerLevelChunk1_19(ClientboundPackets26_1.LEVEL_CHUNK_WITH_LIGHT, ChunkType1_21_5::new);
|
||||
blockRewriter.registerBlockEntityData(ClientboundPackets26_1.BLOCK_ENTITY_DATA);
|
||||
|
||||
// registerOpenScreen(ClientboundPackets1_21_2.OPEN_SCREEN);
|
||||
registerSetCursorItem(ClientboundPackets1_21_2.SET_CURSOR_ITEM);
|
||||
registerSetPlayerInventory(ClientboundPackets1_21_2.SET_PLAYER_INVENTORY);
|
||||
registerCooldown1_21_2(ClientboundPackets1_21_2.COOLDOWN);
|
||||
registerSetContent1_21_2(ClientboundPackets1_21_2.CONTAINER_SET_CONTENT);
|
||||
registerSetSlot1_21_2(ClientboundPackets1_21_2.CONTAINER_SET_SLOT);
|
||||
registerAdvancements1_20_3(ClientboundPackets1_21_2.UPDATE_ADVANCEMENTS);
|
||||
registerSetEquipment(ClientboundPackets1_21_2.SET_EQUIPMENT);
|
||||
registerMerchantOffers1_20_5(ClientboundPackets1_21_2.MERCHANT_OFFERS);
|
||||
registerContainerClick1_21_5(ServerboundPackets1_21_4.CONTAINER_CLICK);
|
||||
registerSetCreativeModeSlot1_21_5(ServerboundPackets1_21_4.SET_CREATIVE_MODE_SLOT);
|
||||
// registerOpenScreen(ClientboundPackets26_1.OPEN_SCREEN);
|
||||
registerSetCursorItem(ClientboundPackets26_1.SET_CURSOR_ITEM);
|
||||
registerSetPlayerInventory(ClientboundPackets26_1.SET_PLAYER_INVENTORY);
|
||||
registerCooldown1_21_2(ClientboundPackets26_1.COOLDOWN);
|
||||
registerSetContent1_21_2(ClientboundPackets26_1.CONTAINER_SET_CONTENT);
|
||||
registerSetSlot1_21_2(ClientboundPackets26_1.CONTAINER_SET_SLOT);
|
||||
registerAdvancements1_20_3(ClientboundPackets26_1.UPDATE_ADVANCEMENTS);
|
||||
registerSetEquipment(ClientboundPackets26_1.SET_EQUIPMENT);
|
||||
registerMerchantOffers1_20_5(ClientboundPackets26_1.MERCHANT_OFFERS);
|
||||
registerContainerClick1_21_5(ServerboundPackets1_21_6.CONTAINER_CLICK);
|
||||
registerSetCreativeModeSlot1_21_5(ServerboundPackets1_21_6.SET_CREATIVE_MODE_SLOT);
|
||||
|
||||
final RecipeDisplayRewriter<ClientboundPacket1_21_2> recipeRewriter = new RecipeDisplayRewriter1_21_5<>(protocol);
|
||||
recipeRewriter.registerUpdateRecipes(ClientboundPackets1_21_2.UPDATE_RECIPES);
|
||||
recipeRewriter.registerRecipeBookAdd(ClientboundPackets1_21_2.RECIPE_BOOK_ADD);
|
||||
recipeRewriter.registerPlaceGhostRecipe(ClientboundPackets1_21_2.PLACE_GHOST_RECIPE);
|
||||
final RecipeDisplayRewriter<ClientboundPacket26_1> recipeRewriter = new RecipeDisplayRewriter1_21_5<>(protocol);
|
||||
recipeRewriter.registerUpdateRecipes(ClientboundPackets26_1.UPDATE_RECIPES);
|
||||
recipeRewriter.registerRecipeBookAdd(ClientboundPackets26_1.RECIPE_BOOK_ADD);
|
||||
recipeRewriter.registerPlaceGhostRecipe(ClientboundPackets26_1.PLACE_GHOST_RECIPE);
|
||||
}
|
||||
|
||||
@Override
|
||||
+3
-3
@@ -21,11 +21,11 @@ import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viabackwards.api.BackwardsProtocol;
|
||||
import com.viaversion.viabackwards.api.rewriters.text.NBTComponentRewriter;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.protocols.v1_21to1_21_2.packet.ClientboundPacket1_21_2;
|
||||
import com.viaversion.viaversion.protocols.v1_21_11to26_1.packet.ClientboundPacket26_1;
|
||||
|
||||
final class ComponentRewriter1_99 extends NBTComponentRewriter<ClientboundPacket1_21_2> {
|
||||
final class ComponentRewriter99_1 extends NBTComponentRewriter<ClientboundPacket26_1> {
|
||||
|
||||
public ComponentRewriter1_99(final BackwardsProtocol<ClientboundPacket1_21_2, ?, ?, ?> protocol) {
|
||||
public ComponentRewriter99_1(final BackwardsProtocol<ClientboundPacket26_1, ?, ?, ?> protocol) {
|
||||
super(protocol);
|
||||
}
|
||||
|
||||
+27
-26
@@ -19,34 +19,35 @@ package com.viaversion.viabackwards.protocol.template;
|
||||
|
||||
import com.viaversion.viabackwards.api.rewriters.EntityRewriter;
|
||||
import com.viaversion.viaversion.api.minecraft.entities.EntityType;
|
||||
import com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_21_4;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes1_21_2;
|
||||
import com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_21_11;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes1_21_11;
|
||||
import com.viaversion.viaversion.api.type.types.version.VersionedTypes;
|
||||
import com.viaversion.viaversion.protocols.v1_21to1_21_2.packet.ClientboundPacket1_21_2;
|
||||
import com.viaversion.viaversion.protocols.v1_21to1_21_2.packet.ClientboundPackets1_21_2;
|
||||
import com.viaversion.viaversion.protocols.v1_21_11to26_1.packet.ClientboundPacket26_1;
|
||||
import com.viaversion.viaversion.protocols.v1_21_11to26_1.packet.ClientboundPackets26_1;
|
||||
|
||||
// Replace if needed
|
||||
// VersionedTypes
|
||||
final class EntityPacketRewriter1_99 extends EntityRewriter<ClientboundPacket1_21_2, Protocol1_99To1_98> {
|
||||
final class EntityPacketRewriter99_1 extends EntityRewriter<ClientboundPacket26_1, Protocol99_1To98_1> {
|
||||
|
||||
public EntityPacketRewriter1_99(final Protocol1_99To1_98 protocol) {
|
||||
super(protocol, VersionedTypes.V1_21_4.entityDataTypes.optionalComponentType, VersionedTypes.V1_21_4.entityDataTypes.booleanType);
|
||||
private static final EntityDataTypes1_21_11 MAPPED_DATA_TYPES = VersionedTypes.V1_21_11.entityDataTypes;
|
||||
|
||||
public EntityPacketRewriter99_1(final Protocol99_1To98_1 protocol) {
|
||||
super(protocol, MAPPED_DATA_TYPES.optionalComponentType, MAPPED_DATA_TYPES.booleanType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerPackets() {
|
||||
registerTrackerWithData1_21_9(ClientboundPackets1_21_2.ADD_ENTITY, EntityTypes1_21_4.FALLING_BLOCK);
|
||||
registerSetEntityData(ClientboundPackets1_21_2.SET_ENTITY_DATA);
|
||||
registerRemoveEntities(ClientboundPackets1_21_2.REMOVE_ENTITIES);
|
||||
registerPlayerAbilities(ClientboundPackets1_21_2.PLAYER_ABILITIES);
|
||||
registerGameEvent(ClientboundPackets1_21_2.GAME_EVENT);
|
||||
registerLogin1_20_5(ClientboundPackets1_21_2.LOGIN);
|
||||
registerRespawn1_20_5(ClientboundPackets1_21_2.RESPAWN);
|
||||
registerTrackerWithData1_21_9(ClientboundPackets26_1.ADD_ENTITY, EntityTypes1_21_11.FALLING_BLOCK);
|
||||
registerSetEntityData(ClientboundPackets26_1.SET_ENTITY_DATA);
|
||||
registerRemoveEntities(ClientboundPackets26_1.REMOVE_ENTITIES);
|
||||
registerPlayerAbilities(ClientboundPackets26_1.PLAYER_ABILITIES);
|
||||
registerGameEvent(ClientboundPackets26_1.GAME_EVENT);
|
||||
registerLogin1_20_5(ClientboundPackets26_1.LOGIN);
|
||||
registerRespawn1_20_5(ClientboundPackets26_1.RESPAWN);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerRewrites() {
|
||||
final EntityDataTypes1_21_2 mappedEntityDataTypes = VersionedTypes.V1_21_4.entityDataTypes;
|
||||
/*filter().handler((event, data) -> {
|
||||
int id = data.dataType().typeId();
|
||||
if (id >= ac) {
|
||||
@@ -55,21 +56,21 @@ final class EntityPacketRewriter1_99 extends EntityRewriter<ClientboundPacket1_2
|
||||
id--;
|
||||
}
|
||||
|
||||
data.setDataType(mappedEntityDataTypess.byId(id));
|
||||
data.setDataType(MAPPED_DATA_TYPES.byId(id));
|
||||
});*/
|
||||
|
||||
registerEntityDataTypeHandler1_20_3(
|
||||
mappedEntityDataTypes.itemType,
|
||||
mappedEntityDataTypes.blockStateType,
|
||||
mappedEntityDataTypes.optionalBlockStateType,
|
||||
mappedEntityDataTypes.particleType,
|
||||
mappedEntityDataTypes.particlesType,
|
||||
mappedEntityDataTypes.componentType,
|
||||
mappedEntityDataTypes.optionalComponentType
|
||||
MAPPED_DATA_TYPES.itemType,
|
||||
MAPPED_DATA_TYPES.blockStateType,
|
||||
MAPPED_DATA_TYPES.optionalBlockStateType,
|
||||
MAPPED_DATA_TYPES.particleType,
|
||||
MAPPED_DATA_TYPES.particlesType,
|
||||
MAPPED_DATA_TYPES.componentType,
|
||||
MAPPED_DATA_TYPES.optionalComponentType
|
||||
);
|
||||
|
||||
// Remove entity data of new entity type
|
||||
// filter().type(EntityTypes1_21_4.SNIFFER).removeIndex(newIndex);
|
||||
// filter().type(EntityTypes1_21_11.SNIFFER).removeIndex(newIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -77,11 +78,11 @@ final class EntityPacketRewriter1_99 extends EntityRewriter<ClientboundPacket1_2
|
||||
// If types changed, uncomment to map them
|
||||
// mapTypes();
|
||||
|
||||
// mapEntityTypeWithData(EntityTypes1_21_4.SNIFFER, EntityTypes1_21_4.RAVAGER).tagName();
|
||||
// mapEntityTypeWithData(EntityTypes1_21_11.SNIFFER, EntityTypes1_21_11.RAVAGER).tagName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityType typeFromId(final int type) {
|
||||
return EntityTypes1_21_4.getTypeFromId(type);
|
||||
return EntityTypes1_21_11.getTypeFromId(type);
|
||||
}
|
||||
}
|
||||
+63
-64
@@ -23,20 +23,20 @@ import com.viaversion.viabackwards.api.rewriters.BackwardsRegistryRewriter;
|
||||
import com.viaversion.viabackwards.api.rewriters.SoundRewriter;
|
||||
import com.viaversion.viabackwards.api.rewriters.text.NBTComponentRewriter;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_21_4;
|
||||
import com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_21_11;
|
||||
import com.viaversion.viaversion.api.protocol.packet.provider.PacketTypesProvider;
|
||||
import com.viaversion.viaversion.api.protocol.packet.provider.SimplePacketTypesProvider;
|
||||
import com.viaversion.viaversion.api.type.types.version.VersionedTypes;
|
||||
import com.viaversion.viaversion.api.type.types.version.VersionedTypesHolder;
|
||||
import com.viaversion.viaversion.data.entity.EntityTrackerBase;
|
||||
import com.viaversion.viaversion.data.item.ItemHasherBase;
|
||||
import com.viaversion.viaversion.protocols.v1_20_3to1_20_5.packet.ServerboundConfigurationPackets1_20_5;
|
||||
import com.viaversion.viaversion.protocols.v1_20_5to1_21.Protocol1_20_5To1_21;
|
||||
import com.viaversion.viaversion.protocols.v1_20_5to1_21.packet.ClientboundConfigurationPackets1_21;
|
||||
import com.viaversion.viaversion.protocols.v1_21_2to1_21_4.packet.ServerboundPacket1_21_4;
|
||||
import com.viaversion.viaversion.protocols.v1_21_2to1_21_4.packet.ServerboundPackets1_21_4;
|
||||
import com.viaversion.viaversion.protocols.v1_21to1_21_2.packet.ClientboundPacket1_21_2;
|
||||
import com.viaversion.viaversion.protocols.v1_21to1_21_2.packet.ClientboundPackets1_21_2;
|
||||
import com.viaversion.viaversion.protocols.v1_21_11to26_1.Protocol1_21_11To26_1;
|
||||
import com.viaversion.viaversion.protocols.v1_21_11to26_1.packet.ClientboundPacket26_1;
|
||||
import com.viaversion.viaversion.protocols.v1_21_11to26_1.packet.ClientboundPackets26_1;
|
||||
import com.viaversion.viaversion.protocols.v1_21_5to1_21_6.packet.ServerboundPackets1_21_6;
|
||||
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ClientboundConfigurationPackets1_21_9;
|
||||
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ServerboundConfigurationPackets1_21_9;
|
||||
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ServerboundPacket1_21_9;
|
||||
import com.viaversion.viaversion.rewriter.ParticleRewriter;
|
||||
import com.viaversion.viaversion.rewriter.RegistryDataRewriter;
|
||||
import com.viaversion.viaversion.rewriter.StatisticsRewriter;
|
||||
@@ -45,74 +45,73 @@ import com.viaversion.viaversion.rewriter.TagRewriter;
|
||||
import static com.viaversion.viaversion.util.ProtocolUtil.packetTypeMap;
|
||||
|
||||
// Placeholders to replace (in the entire package):
|
||||
// Protocol1_98To1_99, EntityPacketRewriter1_99, BlockItemPacketRewriter1_99
|
||||
// Protocol1_20_5To1_21 (the ViaVersion protocol class the mappings depend on)
|
||||
// ClientboundPacket1_21_2
|
||||
// ServerboundPacket1_21_4
|
||||
// Protocol1_21_11To26_1 (the ViaVersion protocol class the mappings depend on)
|
||||
// ClientboundPacket26_1
|
||||
// ServerboundPacket1_21_9
|
||||
// ClientboundConfigurationPackets1_21
|
||||
// ServerboundConfigurationPackets1_20_5
|
||||
// EntityTypes1_21_4 (UNMAPPED type)
|
||||
// VersionedTypes.V1_21_5
|
||||
// 1.99, 1.98
|
||||
final class Protocol1_99To1_98 extends BackwardsProtocol<ClientboundPacket1_21_2, ClientboundPacket1_21_2, ServerboundPacket1_21_4, ServerboundPacket1_21_4> {
|
||||
// EntityTypes1_21_11 (UNMAPPED type)
|
||||
// VersionedTypes.V26_1
|
||||
// 99.1, 98.1
|
||||
final class Protocol99_1To98_1 extends BackwardsProtocol<ClientboundPacket26_1, ClientboundPacket26_1, ServerboundPacket1_21_9, ServerboundPacket1_21_9> {
|
||||
|
||||
// ViaBackwards uses its own mappings and also needs a translatablerewriter for translation mappings
|
||||
public static final BackwardsMappingData MAPPINGS = new BackwardsMappingData("1.99", "1.98", Protocol1_20_5To1_21.class); // Change the VV (!) protocol class
|
||||
private final EntityPacketRewriter1_99 entityRewriter = new EntityPacketRewriter1_99(this);
|
||||
private final BlockItemPacketRewriter1_99 itemRewriter = new BlockItemPacketRewriter1_99(this);
|
||||
private final ParticleRewriter<ClientboundPacket1_21_2> particleRewriter = new ParticleRewriter<>(this);
|
||||
private final NBTComponentRewriter<ClientboundPacket1_21_2> translatableRewriter = new ComponentRewriter1_99(this);
|
||||
private final TagRewriter<ClientboundPacket1_21_2> tagRewriter = new TagRewriter<>(this);
|
||||
public static final BackwardsMappingData MAPPINGS = new BackwardsMappingData("99.1", "98.1", Protocol1_21_11To26_1.class); // Change the VV (!) protocol class
|
||||
private final EntityPacketRewriter99_1 entityRewriter = new EntityPacketRewriter99_1(this);
|
||||
private final BlockItemPacketRewriter99_1 itemRewriter = new BlockItemPacketRewriter99_1(this);
|
||||
private final ParticleRewriter<ClientboundPacket26_1> particleRewriter = new ParticleRewriter<>(this);
|
||||
private final NBTComponentRewriter<ClientboundPacket26_1> translatableRewriter = new ComponentRewriter99_1(this);
|
||||
private final TagRewriter<ClientboundPacket26_1> tagRewriter = new TagRewriter<>(this);
|
||||
private final RegistryDataRewriter registryDataRewriter = new BackwardsRegistryRewriter(this);
|
||||
|
||||
public Protocol1_99To1_98() {
|
||||
super(ClientboundPacket1_21_2.class, ClientboundPacket1_21_2.class, ServerboundPacket1_21_4.class, ServerboundPacket1_21_4.class);
|
||||
public Protocol99_1To98_1() {
|
||||
super(ClientboundPacket26_1.class, ClientboundPacket26_1.class, ServerboundPacket1_21_9.class, ServerboundPacket1_21_9.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerPackets() {
|
||||
super.registerPackets();
|
||||
|
||||
registerClientbound(ClientboundConfigurationPackets1_21.REGISTRY_DATA, registryDataRewriter::handle);
|
||||
registerClientbound(ClientboundConfigurationPackets1_21_9.REGISTRY_DATA, registryDataRewriter::handle);
|
||||
|
||||
tagRewriter.registerGeneric(ClientboundPackets1_21_2.UPDATE_TAGS);
|
||||
tagRewriter.registerGeneric(ClientboundConfigurationPackets1_21.UPDATE_TAGS);
|
||||
tagRewriter.registerGeneric(ClientboundPackets26_1.UPDATE_TAGS);
|
||||
tagRewriter.registerGeneric(ClientboundConfigurationPackets1_21_9.UPDATE_TAGS);
|
||||
|
||||
final SoundRewriter<ClientboundPacket1_21_2> soundRewriter = new SoundRewriter<>(this);
|
||||
soundRewriter.registerSound1_19_3(ClientboundPackets1_21_2.SOUND);
|
||||
soundRewriter.registerSound1_19_3(ClientboundPackets1_21_2.SOUND_ENTITY);
|
||||
soundRewriter.registerStopSound(ClientboundPackets1_21_2.STOP_SOUND);
|
||||
final SoundRewriter<ClientboundPacket26_1> soundRewriter = new SoundRewriter<>(this);
|
||||
soundRewriter.registerSound1_19_3(ClientboundPackets26_1.SOUND);
|
||||
soundRewriter.registerSound1_19_3(ClientboundPackets26_1.SOUND_ENTITY);
|
||||
soundRewriter.registerStopSound(ClientboundPackets26_1.STOP_SOUND);
|
||||
|
||||
new StatisticsRewriter<>(this).register(ClientboundPackets1_21_2.AWARD_STATS);
|
||||
//new AttributeRewriter<>(this).register1_21(ClientboundPackets1_21_2.UPDATE_ATTRIBUTES);
|
||||
new StatisticsRewriter<>(this).register(ClientboundPackets26_1.AWARD_STATS);
|
||||
//new AttributeRewriter<>(this).register1_21(ClientboundPackets26_1.UPDATE_ATTRIBUTES);
|
||||
|
||||
// Registers translatable mappings (missing a whole bunch still)
|
||||
//translatableRewriter.registerOpenScreen1_14(ClientboundPackets1_21_2.OPEN_SCREEN); // Handled by registerOpenScreen in item rewriters
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets1_21_2.SET_ACTION_BAR_TEXT);
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets1_21_2.SET_TITLE_TEXT);
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets1_21_2.SET_SUBTITLE_TEXT);
|
||||
translatableRewriter.registerBossEvent(ClientboundPackets1_21_2.BOSS_EVENT);
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets1_21_2.DISCONNECT);
|
||||
translatableRewriter.registerComponentPacket(ClientboundConfigurationPackets1_21.DISCONNECT);
|
||||
translatableRewriter.registerTabList(ClientboundPackets1_21_2.TAB_LIST);
|
||||
translatableRewriter.registerSetPlayerTeam1_21_5(ClientboundPackets1_21_2.SET_PLAYER_TEAM);
|
||||
translatableRewriter.registerPlayerCombatKill1_20(ClientboundPackets1_21_2.PLAYER_COMBAT_KILL);
|
||||
translatableRewriter.registerPlayerInfoUpdate1_21_4(ClientboundPackets1_21_2.PLAYER_INFO_UPDATE);
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets1_21_2.SYSTEM_CHAT);
|
||||
translatableRewriter.registerDisguisedChat(ClientboundPackets1_21_2.DISGUISED_CHAT);
|
||||
translatableRewriter.registerPlayerChat1_21_5(ClientboundPackets1_21_2.PLAYER_CHAT);
|
||||
translatableRewriter.registerSetObjective(ClientboundPackets1_21_2.SET_OBJECTIVE);
|
||||
translatableRewriter.registerSetScore1_20_3(ClientboundPackets1_21_2.SET_SCORE);
|
||||
//translatableRewriter.registerOpenScreen1_14(ClientboundPackets26_1.OPEN_SCREEN); // Handled by registerOpenScreen in item rewriters
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets26_1.SET_ACTION_BAR_TEXT);
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets26_1.SET_TITLE_TEXT);
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets26_1.SET_SUBTITLE_TEXT);
|
||||
translatableRewriter.registerBossEvent(ClientboundPackets26_1.BOSS_EVENT);
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets26_1.DISCONNECT);
|
||||
translatableRewriter.registerComponentPacket(ClientboundConfigurationPackets1_21_9.DISCONNECT);
|
||||
translatableRewriter.registerTabList(ClientboundPackets26_1.TAB_LIST);
|
||||
translatableRewriter.registerSetPlayerTeam1_21_5(ClientboundPackets26_1.SET_PLAYER_TEAM);
|
||||
translatableRewriter.registerPlayerCombatKill1_20(ClientboundPackets26_1.PLAYER_COMBAT_KILL);
|
||||
translatableRewriter.registerPlayerInfoUpdate1_21_4(ClientboundPackets26_1.PLAYER_INFO_UPDATE);
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets26_1.SYSTEM_CHAT);
|
||||
translatableRewriter.registerDisguisedChat(ClientboundPackets26_1.DISGUISED_CHAT);
|
||||
translatableRewriter.registerPlayerChat1_21_5(ClientboundPackets26_1.PLAYER_CHAT);
|
||||
translatableRewriter.registerSetObjective(ClientboundPackets26_1.SET_OBJECTIVE);
|
||||
translatableRewriter.registerSetScore1_20_3(ClientboundPackets26_1.SET_SCORE);
|
||||
translatableRewriter.registerPing();
|
||||
|
||||
// If needed for any particle, item, or block changes. Extend ParticleRewriter for particle serializer changes
|
||||
particleRewriter.registerLevelParticles1_21_4(ClientboundPackets1_21_2.LEVEL_PARTICLES);
|
||||
particleRewriter.registerExplode1_21_9(ClientboundPackets1_21_2.EXPLODE);
|
||||
particleRewriter.registerLevelParticles1_21_4(ClientboundPackets26_1.LEVEL_PARTICLES);
|
||||
particleRewriter.registerExplode1_21_9(ClientboundPackets26_1.EXPLODE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(final UserConnection connection) {
|
||||
addEntityTracker(connection, new EntityTrackerBase(connection, EntityTypes1_21_4.PLAYER));
|
||||
addEntityTracker(connection, new EntityTrackerBase(connection, EntityTypes1_21_11.PLAYER));
|
||||
addItemHasher(connection, new ItemHasherBase(this, connection));
|
||||
}
|
||||
|
||||
@@ -122,12 +121,12 @@ final class Protocol1_99To1_98 extends BackwardsProtocol<ClientboundPacket1_21_2
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityPacketRewriter1_99 getEntityRewriter() {
|
||||
public EntityPacketRewriter99_1 getEntityRewriter() {
|
||||
return entityRewriter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockItemPacketRewriter1_99 getItemRewriter() {
|
||||
public BlockItemPacketRewriter99_1 getItemRewriter() {
|
||||
return itemRewriter;
|
||||
}
|
||||
|
||||
@@ -137,37 +136,37 @@ final class Protocol1_99To1_98 extends BackwardsProtocol<ClientboundPacket1_21_2
|
||||
}
|
||||
|
||||
@Override
|
||||
public ParticleRewriter<ClientboundPacket1_21_2> getParticleRewriter() {
|
||||
public ParticleRewriter<ClientboundPacket26_1> getParticleRewriter() {
|
||||
return particleRewriter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTComponentRewriter<ClientboundPacket1_21_2> getComponentRewriter() {
|
||||
public NBTComponentRewriter<ClientboundPacket26_1> getComponentRewriter() {
|
||||
return translatableRewriter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TagRewriter<ClientboundPacket1_21_2> getTagRewriter() {
|
||||
public TagRewriter<ClientboundPacket26_1> getTagRewriter() {
|
||||
return tagRewriter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VersionedTypesHolder types() {
|
||||
return VersionedTypes.V1_21_5;
|
||||
return VersionedTypes.V26_1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VersionedTypesHolder mappedTypes() {
|
||||
return VersionedTypes.V1_21_5;
|
||||
return VersionedTypes.V26_1;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PacketTypesProvider<ClientboundPacket1_21_2, ClientboundPacket1_21_2, ServerboundPacket1_21_4, ServerboundPacket1_21_4> createPacketTypesProvider() {
|
||||
protected PacketTypesProvider<ClientboundPacket26_1, ClientboundPacket26_1, ServerboundPacket1_21_9, ServerboundPacket1_21_9> createPacketTypesProvider() {
|
||||
return new SimplePacketTypesProvider<>(
|
||||
packetTypeMap(unmappedClientboundPacketType, ClientboundPackets1_21_2.class, ClientboundConfigurationPackets1_21.class),
|
||||
packetTypeMap(mappedClientboundPacketType, ClientboundPackets1_21_2.class, ClientboundConfigurationPackets1_21.class),
|
||||
packetTypeMap(mappedServerboundPacketType, ServerboundPackets1_21_4.class, ServerboundConfigurationPackets1_20_5.class),
|
||||
packetTypeMap(unmappedServerboundPacketType, ServerboundPackets1_21_4.class, ServerboundConfigurationPackets1_20_5.class)
|
||||
packetTypeMap(unmappedClientboundPacketType, ClientboundPackets26_1.class, ClientboundConfigurationPackets1_21_9.class),
|
||||
packetTypeMap(mappedClientboundPacketType, ClientboundPackets26_1.class, ClientboundConfigurationPackets1_21_9.class),
|
||||
packetTypeMap(mappedServerboundPacketType, ServerboundPackets1_21_6.class, ServerboundConfigurationPackets1_21_9.class),
|
||||
packetTypeMap(unmappedServerboundPacketType, ServerboundPackets1_21_6.class, ServerboundConfigurationPackets1_21_9.class)
|
||||
);
|
||||
}
|
||||
}
|
||||
+15
@@ -42,6 +42,21 @@ final class Types1_20_3 implements VersionedTypesHolder {
|
||||
return Types.ITEM1_20_2_ARRAY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type<Item> itemTemplate() {
|
||||
return item();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type<Item> optionalItemTemplate() {
|
||||
return item();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type<Item[]> itemTemplateArray() {
|
||||
return itemArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type<Item> itemCost() {
|
||||
return null;
|
||||
|
||||
+3
@@ -42,6 +42,7 @@ import com.viaversion.viaversion.api.type.types.version.VersionedTypes;
|
||||
import com.viaversion.viaversion.api.type.types.version.VersionedTypesHolder;
|
||||
import com.viaversion.viaversion.data.entity.EntityTrackerBase;
|
||||
import com.viaversion.viaversion.data.item.ItemHasherBase;
|
||||
import com.viaversion.viaversion.protocols.v1_19_3to1_19_4.rewriter.CommandRewriter1_19_4;
|
||||
import com.viaversion.viaversion.protocols.v1_21_5to1_21_6.packet.ServerboundPackets1_21_6;
|
||||
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ClientboundConfigurationPackets1_21_9;
|
||||
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ClientboundPacket1_21_9;
|
||||
@@ -264,6 +265,8 @@ public final class Protocol1_21_11To1_21_9 extends BackwardsProtocol<Clientbound
|
||||
|
||||
particleRewriter.registerLevelParticles1_21_4(ClientboundPackets1_21_11.LEVEL_PARTICLES);
|
||||
particleRewriter.registerExplode1_21_9(ClientboundPackets1_21_11.EXPLODE);
|
||||
|
||||
new CommandRewriter1_19_4<>(this).registerDeclareCommands1_19(ClientboundPackets1_21_11.COMMANDS);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+9
-6
@@ -40,6 +40,7 @@ import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_21_5;
|
||||
import com.viaversion.viaversion.protocols.v1_21_4to1_21_5.rewriter.RecipeDisplayRewriter1_21_5;
|
||||
import com.viaversion.viaversion.protocols.v1_21_5to1_21_6.packet.ServerboundPackets1_21_6;
|
||||
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ClientboundConfigurationPackets1_21_9;
|
||||
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ServerboundPacket1_21_9;
|
||||
import com.viaversion.viaversion.protocols.v1_21_9to1_21_11.packet.ClientboundPacket1_21_11;
|
||||
import com.viaversion.viaversion.protocols.v1_21_9to1_21_11.packet.ClientboundPackets1_21_11;
|
||||
@@ -77,6 +78,8 @@ public final class BlockItemPacketRewriter1_21_11 extends BackwardsStructuredIte
|
||||
registerMerchantOffers1_20_5(ClientboundPackets1_21_11.MERCHANT_OFFERS);
|
||||
registerContainerClick1_21_5(ServerboundPackets1_21_6.CONTAINER_CLICK);
|
||||
registerSetCreativeModeSlot1_21_5(ServerboundPackets1_21_6.SET_CREATIVE_MODE_SLOT);
|
||||
registerShowDialog(ClientboundPackets1_21_11.SHOW_DIALOG);
|
||||
registerShowDialogDirect(ClientboundConfigurationPackets1_21_9.SHOW_DIALOG);
|
||||
|
||||
final RecipeDisplayRewriter<ClientboundPacket1_21_11> recipeRewriter = new RecipeDisplayRewriter1_21_5<>(protocol);
|
||||
recipeRewriter.registerUpdateRecipes(ClientboundPackets1_21_11.UPDATE_RECIPES);
|
||||
@@ -157,9 +160,9 @@ public final class BlockItemPacketRewriter1_21_11 extends BackwardsStructuredIte
|
||||
final Tag damageTypeId = backupTag.get("damage_type_id");
|
||||
if (damageTypeId != null) {
|
||||
if (damageTypeId instanceof StringTag stringTag) {
|
||||
container.set(StructuredDataKey.DAMAGE_TYPE, new DamageType(Either.right(stringTag.getValue())));
|
||||
container.set(StructuredDataKey.DAMAGE_TYPE1_21_11, new DamageType(Either.right(stringTag.getValue())));
|
||||
} else if (damageTypeId instanceof IntTag intTag) {
|
||||
container.set(StructuredDataKey.DAMAGE_TYPE, new DamageType(Either.left(intTag.asInt())));
|
||||
container.set(StructuredDataKey.DAMAGE_TYPE1_21_11, new DamageType(Either.left(intTag.asInt())));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,9 +188,9 @@ public final class BlockItemPacketRewriter1_21_11 extends BackwardsStructuredIte
|
||||
final Tag zombieNautilusVariantTag = backupTag.get("zombie_nautilus_variant");
|
||||
if (zombieNautilusVariantTag != null) {
|
||||
if (zombieNautilusVariantTag instanceof StringTag stringTag) {
|
||||
container.set(StructuredDataKey.ZOMBIE_NAUTILUS_VARIANT, Either.right(stringTag.getValue()));
|
||||
container.set(StructuredDataKey.ZOMBIE_NAUTILUS_VARIANT1_21_11, Either.right(stringTag.getValue()));
|
||||
} else if (zombieNautilusVariantTag instanceof IntTag intTag) {
|
||||
container.set(StructuredDataKey.ZOMBIE_NAUTILUS_VARIANT, Either.left(intTag.asInt()));
|
||||
container.set(StructuredDataKey.ZOMBIE_NAUTILUS_VARIANT1_21_11, Either.left(intTag.asInt()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,7 +254,7 @@ public final class BlockItemPacketRewriter1_21_11 extends BackwardsStructuredIte
|
||||
backupTag.put("piercing_weapon", piercingTag);
|
||||
}
|
||||
|
||||
final DamageType damageType = dataContainer.get(StructuredDataKey.DAMAGE_TYPE);
|
||||
final DamageType damageType = dataContainer.get(StructuredDataKey.DAMAGE_TYPE1_21_11);
|
||||
if (damageType != null) {
|
||||
if (damageType.id().isLeft()) {
|
||||
backupTag.putInt("damage_type_id", damageType.id().left());
|
||||
@@ -281,7 +284,7 @@ public final class BlockItemPacketRewriter1_21_11 extends BackwardsStructuredIte
|
||||
backupTag.put("attack_range", attackRangeTag);
|
||||
}
|
||||
|
||||
final Either<Integer, String> zombieNautilusVariant = dataContainer.get(StructuredDataKey.ZOMBIE_NAUTILUS_VARIANT);
|
||||
final Either<Integer, String> zombieNautilusVariant = dataContainer.get(StructuredDataKey.ZOMBIE_NAUTILUS_VARIANT1_21_11);
|
||||
if (zombieNautilusVariant != null) {
|
||||
if (zombieNautilusVariant.isLeft()) {
|
||||
backupTag.putInt("zombie_nautilus_variant", zombieNautilusVariant.left());
|
||||
|
||||
+1
-1
@@ -38,6 +38,6 @@ public final class ComponentRewriter1_21_11 extends NBTComponentRewriter<Clientb
|
||||
}
|
||||
|
||||
removeDataComponents(componentsTag, StructuredDataKey.SWING_ANIMATION, StructuredDataKey.KINETIC_WEAPON, StructuredDataKey.PIERCING_WEAPON,
|
||||
StructuredDataKey.DAMAGE_TYPE, StructuredDataKey.MINIMUM_ATTACK_CHARGE, StructuredDataKey.USE_EFFECTS, StructuredDataKey.ZOMBIE_NAUTILUS_VARIANT, StructuredDataKey.ATTACK_RANGE);
|
||||
StructuredDataKey.DAMAGE_TYPE26_1, StructuredDataKey.MINIMUM_ATTACK_CHARGE, StructuredDataKey.USE_EFFECTS, StructuredDataKey.ZOMBIE_NAUTILUS_VARIANT1_21_11, StructuredDataKey.ATTACK_RANGE);
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -51,14 +51,14 @@ public final class EntityPacketRewriter1_21_11 extends EntityRewriter<Clientboun
|
||||
|
||||
protocol.registerClientbound(ClientboundPackets1_21_11.MOUNT_SCREEN_OPEN, ClientboundPackets1_21_9.HORSE_SCREEN_OPEN);
|
||||
|
||||
protocol.registerClientbound(ClientboundPackets1_21_11.UPDATE_MOB_EFFECT, wrapper -> {
|
||||
protocol.registerClientbound(ClientboundPackets1_21_11.UPDATE_MOB_EFFECT, wrapper -> {
|
||||
wrapper.passthrough(Types.VAR_INT); // entity id
|
||||
final int effectId = wrapper.passthrough(Types.VAR_INT);
|
||||
if (effectId == 39) { // breath_of_the_nautilus
|
||||
wrapper.cancel();
|
||||
}
|
||||
});
|
||||
protocol.registerClientbound(ClientboundPackets1_21_11.REMOVE_MOB_EFFECT, wrapper -> {
|
||||
protocol.registerClientbound(ClientboundPackets1_21_11.REMOVE_MOB_EFFECT, wrapper -> {
|
||||
wrapper.passthrough(Types.VAR_INT); // entity id
|
||||
final int effectId = wrapper.passthrough(Types.VAR_INT);
|
||||
if (effectId == 39) { // breath_of_the_nautilus
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ public final class ComponentRewriter1_21_2 extends JsonNBTComponentRewriter<Clie
|
||||
}
|
||||
|
||||
removeDataComponents(componentsTag, BlockItemPacketRewriter1_21_2.NEW_DATA_TO_REMOVE);
|
||||
removeDataComponents(componentsTag, StructuredDataKey.DAMAGE_RESISTANT, StructuredDataKey.LOCK1_21_2); // No point in updating these
|
||||
removeDataComponents(componentsTag, StructuredDataKey.DAMAGE_RESISTANT1_21_2, StructuredDataKey.LOCK1_21_2); // No point in updating these
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+14
-11
@@ -362,7 +362,7 @@ public final class BlockItemPacketRewriter1_21_5 extends BackwardsStructuredItem
|
||||
weaponTag.putFloat("disable_blocking_for_seconds", weapon.disableBlockingForSeconds());
|
||||
}
|
||||
|
||||
final ProvidesTrimMaterial providesTrimMaterial = dataContainer.get(StructuredDataKey.PROVIDES_TRIM_MATERIAL);
|
||||
final ProvidesTrimMaterial providesTrimMaterial = dataContainer.get(StructuredDataKey.PROVIDES_TRIM_MATERIAL1_21_5);
|
||||
if (providesTrimMaterial != null) {
|
||||
final Tag materialTag = eitherHolderToTag(providesTrimMaterial.material(), (material, tag) -> {
|
||||
tag.putString("asset_name", material.assetName());
|
||||
@@ -376,7 +376,7 @@ public final class BlockItemPacketRewriter1_21_5 extends BackwardsStructuredItem
|
||||
backupTag.put("provides_trim_material", materialTag);
|
||||
}
|
||||
|
||||
final BlocksAttacks blocksAttacks = dataContainer.get(StructuredDataKey.BLOCKS_ATTACKS);
|
||||
final BlocksAttacks blocksAttacks = dataContainer.get(StructuredDataKey.BLOCKS_ATTACKS1_21_5);
|
||||
if (blocksAttacks != null) {
|
||||
final CompoundTag blocksAttackTag = new CompoundTag();
|
||||
backupTag.put("blocks_attack", blocksAttackTag);
|
||||
@@ -401,8 +401,8 @@ public final class BlockItemPacketRewriter1_21_5 extends BackwardsStructuredItem
|
||||
itemDamageTag.putFloat("threshold", blocksAttacks.itemDamage().threshold());
|
||||
itemDamageTag.putFloat("base", blocksAttacks.itemDamage().base());
|
||||
itemDamageTag.putFloat("factor", blocksAttacks.itemDamage().factor());
|
||||
if (blocksAttacks.bypassedByTag() != null) {
|
||||
itemDamageTag.putString("bypassed_by", blocksAttacks.bypassedByTag());
|
||||
if (blocksAttacks.bypassedBy() != null) {
|
||||
itemDamageTag.putString("bypassed_by", blocksAttacks.bypassedBy().tagKey());
|
||||
}
|
||||
if (blocksAttacks.blockSound() != null) {
|
||||
blocksAttackTag.put("block_sound", holderToTag(blocksAttacks.blockSound(), this::saveSoundEvent));
|
||||
@@ -422,7 +422,7 @@ public final class BlockItemPacketRewriter1_21_5 extends BackwardsStructuredItem
|
||||
backupTag.putInt("tropical_fish_pattern", tropicalFishPattern.packedId());
|
||||
}
|
||||
|
||||
saveKeyData(StructuredDataKey.PROVIDES_BANNER_PATTERNS, dataContainer, backupTag);
|
||||
saveKeyData(StructuredDataKey.PROVIDES_BANNER_PATTERNS1_21_5, dataContainer, backupTag);
|
||||
saveFloatData(StructuredDataKey.POTION_DURATION_SCALE, dataContainer, backupTag);
|
||||
saveIntData(StructuredDataKey.VILLAGER_VARIANT, dataContainer, backupTag);
|
||||
saveIntData(StructuredDataKey.FOX_VARIANT, dataContainer, backupTag);
|
||||
@@ -445,7 +445,7 @@ public final class BlockItemPacketRewriter1_21_5 extends BackwardsStructuredItem
|
||||
saveIntData(StructuredDataKey.PIG_VARIANT, dataContainer, backupTag);
|
||||
saveIntData(StructuredDataKey.WOLF_VARIANT, dataContainer, backupTag);
|
||||
|
||||
final Either<Integer, String> chickenVariant = dataContainer.get(StructuredDataKey.CHICKEN_VARIANT);
|
||||
final Either<Integer, String> chickenVariant = dataContainer.get(StructuredDataKey.CHICKEN_VARIANT1_21_5);
|
||||
if (chickenVariant != null) {
|
||||
if (chickenVariant.isLeft()) {
|
||||
backupTag.putInt("chicken_variant", chickenVariant.left());
|
||||
@@ -508,7 +508,7 @@ public final class BlockItemPacketRewriter1_21_5 extends BackwardsStructuredItem
|
||||
|
||||
final Tag materialTag = backupTag.get("provides_trim_material");
|
||||
if (materialTag != null) {
|
||||
data.set(StructuredDataKey.PROVIDES_TRIM_MATERIAL, new ProvidesTrimMaterial(restoreEitherHolder(backupTag, "provides_trim_material", tag -> {
|
||||
data.set(StructuredDataKey.PROVIDES_TRIM_MATERIAL1_21_5, new ProvidesTrimMaterial(restoreEitherHolder(backupTag, "provides_trim_material", tag -> {
|
||||
final String assetName = tag.getString("asset_name");
|
||||
final int itemId = tag.getInt("item_id");
|
||||
final float itemModelIndex = tag.getFloat("item_model_index");
|
||||
@@ -541,16 +541,19 @@ public final class BlockItemPacketRewriter1_21_5 extends BackwardsStructuredItem
|
||||
damageReductions.add(new DamageReduction(horizontalBlockingAngle, type, base, factor));
|
||||
}
|
||||
|
||||
data.set(StructuredDataKey.BLOCKS_ATTACKS, new BlocksAttacks(blockDelaySeconds, disableCooldownScale, damageReductions.toArray(new DamageReduction[0]), itemDamage, bypassedBy, blockSound, disableSound));
|
||||
data.set(StructuredDataKey.BLOCKS_ATTACKS1_21_5, new BlocksAttacks(
|
||||
blockDelaySeconds, disableCooldownScale, damageReductions.toArray(new DamageReduction[0]),
|
||||
itemDamage, bypassedBy != null ? HolderSet.of(bypassedBy) : null, blockSound, disableSound
|
||||
));
|
||||
}
|
||||
|
||||
final IntTag chickenVariant = backupTag.getIntTag("chicken_variant");
|
||||
if (chickenVariant != null) {
|
||||
data.set(StructuredDataKey.CHICKEN_VARIANT, Either.left(chickenVariant.asInt()));
|
||||
data.set(StructuredDataKey.CHICKEN_VARIANT1_21_5, Either.left(chickenVariant.asInt()));
|
||||
} else {
|
||||
final String chickenVariantKey = backupTag.getString("chicken_variant");
|
||||
if (chickenVariantKey != null) {
|
||||
data.set(StructuredDataKey.CHICKEN_VARIANT, Either.right(chickenVariantKey));
|
||||
data.set(StructuredDataKey.CHICKEN_VARIANT1_21_5, Either.right(chickenVariantKey));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -559,7 +562,7 @@ public final class BlockItemPacketRewriter1_21_5 extends BackwardsStructuredItem
|
||||
data.set(StructuredDataKey.TROPICAL_FISH_PATTERN, new TropicalFishPattern(tropicalFishPattern.asInt()));
|
||||
}
|
||||
|
||||
restoreKeyData(StructuredDataKey.PROVIDES_BANNER_PATTERNS, data, backupTag);
|
||||
restoreKeyData(StructuredDataKey.PROVIDES_BANNER_PATTERNS1_21_5, data, backupTag);
|
||||
restoreFloatData(StructuredDataKey.POTION_DURATION_SCALE, data, backupTag);
|
||||
restoreIntData(StructuredDataKey.VILLAGER_VARIANT, data, backupTag);
|
||||
restoreIntData(StructuredDataKey.FOX_VARIANT, data, backupTag);
|
||||
|
||||
+13
-21
@@ -43,31 +43,23 @@ public final class RegistryDataRewriter1_21_5 extends BackwardsRegistryRewriter
|
||||
final boolean trimPatternRegistry = key.equals("trim_pattern");
|
||||
if (trimPatternRegistry || key.equals("trim_material")) {
|
||||
updateTrim(entries, trimPatternRegistry ? "template_item" : "ingredient");
|
||||
return super.handle(connection, key, entries);
|
||||
}
|
||||
|
||||
if (key.equals("enchantment")) {
|
||||
} else if (key.equals("enchantment")) {
|
||||
updateEnchantment(entries);
|
||||
return super.handle(connection, key, entries);
|
||||
}
|
||||
} else if (key.equals("wolf_variant")) {
|
||||
for (final RegistryEntry entry : entries) {
|
||||
if (entry.tag() == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!key.equals("wolf_variant")) {
|
||||
return super.handle(connection, key, entries);
|
||||
}
|
||||
|
||||
for (final RegistryEntry entry : entries) {
|
||||
if (entry.tag() == null) {
|
||||
continue;
|
||||
final CompoundTag variant = (CompoundTag) entry.tag();
|
||||
final CompoundTag assets = (CompoundTag) variant.remove("assets");
|
||||
variant.put("wild_texture", assets.get("wild"));
|
||||
variant.put("tame_texture", assets.get("tame"));
|
||||
variant.put("angry_texture", assets.get("angry"));
|
||||
variant.put("biomes", new ListTag<>(StringTag.class));
|
||||
}
|
||||
|
||||
final CompoundTag variant = (CompoundTag) entry.tag();
|
||||
final CompoundTag assets = (CompoundTag) variant.remove("assets");
|
||||
variant.put("wild_texture", assets.get("wild"));
|
||||
variant.put("tame_texture", assets.get("tame"));
|
||||
variant.put("angry_texture", assets.get("angry"));
|
||||
variant.put("biomes", new ListTag<>(StringTag.class));
|
||||
}
|
||||
return entries;
|
||||
return super.handle(connection, key, entries);
|
||||
}
|
||||
|
||||
private void updateTrim(final RegistryEntry[] entries, final String itemKey) {
|
||||
|
||||
+3
@@ -21,6 +21,7 @@ import com.viaversion.viabackwards.api.rewriters.BackwardsStructuredItemRewriter
|
||||
import com.viaversion.viabackwards.protocol.v1_21_7to1_21_6.Protocol1_21_7To1_21_6;
|
||||
import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_21_5;
|
||||
import com.viaversion.viaversion.protocols.v1_21_4to1_21_5.rewriter.RecipeDisplayRewriter1_21_5;
|
||||
import com.viaversion.viaversion.protocols.v1_21_5to1_21_6.packet.ClientboundConfigurationPackets1_21_6;
|
||||
import com.viaversion.viaversion.protocols.v1_21_5to1_21_6.packet.ClientboundPacket1_21_6;
|
||||
import com.viaversion.viaversion.protocols.v1_21_5to1_21_6.packet.ClientboundPackets1_21_6;
|
||||
import com.viaversion.viaversion.protocols.v1_21_5to1_21_6.packet.ServerboundPacket1_21_6;
|
||||
@@ -54,6 +55,8 @@ public final class BlockItemPacketRewriter1_21_7 extends BackwardsStructuredItem
|
||||
registerMerchantOffers1_20_5(ClientboundPackets1_21_6.MERCHANT_OFFERS);
|
||||
registerContainerClick1_21_5(ServerboundPackets1_21_6.CONTAINER_CLICK);
|
||||
registerSetCreativeModeSlot1_21_5(ServerboundPackets1_21_6.SET_CREATIVE_MODE_SLOT);
|
||||
registerShowDialog(ClientboundPackets1_21_6.SHOW_DIALOG);
|
||||
registerShowDialogDirect(ClientboundConfigurationPackets1_21_6.SHOW_DIALOG);
|
||||
|
||||
final RecipeDisplayRewriter<ClientboundPacket1_21_6> recipeRewriter = new RecipeDisplayRewriter1_21_5<>(protocol);
|
||||
recipeRewriter.registerUpdateRecipes(ClientboundPackets1_21_6.UPDATE_RECIPES);
|
||||
|
||||
+3
@@ -33,6 +33,7 @@ import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_21_5;
|
||||
import com.viaversion.viaversion.protocols.v1_21_4to1_21_5.rewriter.RecipeDisplayRewriter1_21_5;
|
||||
import com.viaversion.viaversion.protocols.v1_21_5to1_21_6.packet.ServerboundPacket1_21_6;
|
||||
import com.viaversion.viaversion.protocols.v1_21_5to1_21_6.packet.ServerboundPackets1_21_6;
|
||||
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ClientboundConfigurationPackets1_21_9;
|
||||
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ClientboundPacket1_21_9;
|
||||
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ClientboundPackets1_21_9;
|
||||
import com.viaversion.viaversion.rewriter.BlockRewriter;
|
||||
@@ -67,6 +68,8 @@ public final class BlockItemPacketRewriter1_21_9 extends BackwardsStructuredItem
|
||||
registerMerchantOffers1_20_5(ClientboundPackets1_21_9.MERCHANT_OFFERS);
|
||||
registerContainerClick1_21_5(ServerboundPackets1_21_6.CONTAINER_CLICK);
|
||||
registerSetCreativeModeSlot1_21_5(ServerboundPackets1_21_6.SET_CREATIVE_MODE_SLOT);
|
||||
registerShowDialog(ClientboundPackets1_21_9.SHOW_DIALOG);
|
||||
registerShowDialogDirect(ClientboundConfigurationPackets1_21_9.SHOW_DIALOG);
|
||||
|
||||
final RecipeDisplayRewriter<ClientboundPacket1_21_9> recipeRewriter = new RecipeDisplayRewriter1_21_5<>(protocol);
|
||||
recipeRewriter.registerUpdateRecipes(ClientboundPackets1_21_9.UPDATE_RECIPES);
|
||||
|
||||
+12
-3
@@ -18,6 +18,8 @@
|
||||
package com.viaversion.viabackwards.protocol.v1_21_9to1_21_7.rewriter;
|
||||
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.nbt.tag.StringTag;
|
||||
import com.viaversion.nbt.tag.Tag;
|
||||
import com.viaversion.viabackwards.api.BackwardsProtocol;
|
||||
import com.viaversion.viabackwards.api.rewriters.text.NBTComponentRewriter;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
@@ -36,15 +38,22 @@ public final class ComponentRewriter1_21_9 extends NBTComponentRewriter<Clientbo
|
||||
|
||||
// Throw out the new object type and its properties
|
||||
final String type = tag.getString("type");
|
||||
|
||||
// Try to use the 26.1+ fallback value if present, otherwise just show an empty string
|
||||
Tag fallback = tag.get("fallback");
|
||||
if (fallback == null) {
|
||||
fallback = new StringTag("");
|
||||
}
|
||||
|
||||
if ("object".equals(type)) {
|
||||
tag.putString("text", "");
|
||||
tag.put("text", fallback);
|
||||
tag.remove("type");
|
||||
}
|
||||
if (tag.remove("sprite") != null) {
|
||||
tag.putString("text", "");
|
||||
tag.put("text", fallback);
|
||||
}
|
||||
if (tag.remove("player") != null) {
|
||||
tag.putString("text", "");
|
||||
tag.put("text", fallback);
|
||||
}
|
||||
tag.remove("atlas");
|
||||
}
|
||||
|
||||
+2
-2
@@ -81,7 +81,7 @@ public final class EntityPacketRewriter1_21_9 extends EntityRewriter<Clientbound
|
||||
final double y = wrapper.passthrough(Types.DOUBLE);
|
||||
final double z = wrapper.passthrough(Types.DOUBLE);
|
||||
|
||||
final Vector3d movement = wrapper.read(Types.MOVEMENT_VECTOR);
|
||||
final Vector3d movement = wrapper.read(Types.LOW_PRECISION_VECTOR);
|
||||
|
||||
final byte pitch = wrapper.passthrough(Types.BYTE);
|
||||
final byte yaw = wrapper.passthrough(Types.BYTE);
|
||||
@@ -167,7 +167,7 @@ public final class EntityPacketRewriter1_21_9 extends EntityRewriter<Clientbound
|
||||
// Back to more non-mannequin things
|
||||
protocol.registerClientbound(ClientboundPackets1_21_9.SET_ENTITY_MOTION, wrapper -> {
|
||||
wrapper.passthrough(Types.VAR_INT); // Entity ID
|
||||
writeMovementShorts(wrapper, wrapper.read(Types.MOVEMENT_VECTOR));
|
||||
writeMovementShorts(wrapper, wrapper.read(Types.LOW_PRECISION_VECTOR));
|
||||
});
|
||||
|
||||
protocol.registerClientbound(ClientboundPackets1_21_9.PLAYER_ROTATION, wrapper -> {
|
||||
|
||||
+251
@@ -0,0 +1,251 @@
|
||||
/*
|
||||
* This file is part of ViaBackwards - https://github.com/ViaVersion/ViaBackwards
|
||||
* Copyright (C) 2016-2025 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.viaversion.viabackwards.protocol.v26_1to1_21_11;
|
||||
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.nbt.tag.StringTag;
|
||||
import com.viaversion.viabackwards.api.BackwardsProtocol;
|
||||
import com.viaversion.viabackwards.api.data.BackwardsMappingData;
|
||||
import com.viaversion.viabackwards.api.rewriters.BackwardsRegistryRewriter;
|
||||
import com.viaversion.viabackwards.api.rewriters.SoundRewriter;
|
||||
import com.viaversion.viabackwards.api.rewriters.text.NBTComponentRewriter;
|
||||
import com.viaversion.viabackwards.protocol.v26_1to1_21_11.rewriter.BlockItemPacketRewriter26_1;
|
||||
import com.viaversion.viabackwards.protocol.v26_1to1_21_11.rewriter.ComponentRewriter26_1;
|
||||
import com.viaversion.viabackwards.protocol.v26_1to1_21_11.rewriter.EntityPacketRewriter26_1;
|
||||
import com.viaversion.viabackwards.protocol.v26_1to1_21_11.storage.DayTimeStorage;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.RegistryType;
|
||||
import com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_21_11;
|
||||
import com.viaversion.viaversion.api.protocol.packet.provider.PacketTypesProvider;
|
||||
import com.viaversion.viaversion.api.protocol.packet.provider.SimplePacketTypesProvider;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.version.VersionedTypes;
|
||||
import com.viaversion.viaversion.api.type.types.version.VersionedTypesHolder;
|
||||
import com.viaversion.viaversion.data.entity.EntityTrackerBase;
|
||||
import com.viaversion.viaversion.data.item.ItemHasherBase;
|
||||
import com.viaversion.viaversion.protocols.v1_19_3to1_19_4.rewriter.CommandRewriter1_19_4;
|
||||
import com.viaversion.viaversion.protocols.v1_21_11to26_1.Protocol1_21_11To26_1;
|
||||
import com.viaversion.viaversion.protocols.v1_21_11to26_1.packet.ClientboundPacket26_1;
|
||||
import com.viaversion.viaversion.protocols.v1_21_11to26_1.packet.ClientboundPackets26_1;
|
||||
import com.viaversion.viaversion.protocols.v1_21_11to26_1.packet.ServerboundPacket26_1;
|
||||
import com.viaversion.viaversion.protocols.v1_21_11to26_1.packet.ServerboundPackets26_1;
|
||||
import com.viaversion.viaversion.protocols.v1_21_5to1_21_6.packet.ServerboundPackets1_21_6;
|
||||
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ClientboundConfigurationPackets1_21_9;
|
||||
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ServerboundConfigurationPackets1_21_9;
|
||||
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ServerboundPacket1_21_9;
|
||||
import com.viaversion.viaversion.protocols.v1_21_9to1_21_11.packet.ClientboundPacket1_21_11;
|
||||
import com.viaversion.viaversion.protocols.v1_21_9to1_21_11.packet.ClientboundPackets1_21_11;
|
||||
import com.viaversion.viaversion.rewriter.AttributeRewriter;
|
||||
import com.viaversion.viaversion.rewriter.ParticleRewriter;
|
||||
import com.viaversion.viaversion.rewriter.RegistryDataRewriter;
|
||||
import com.viaversion.viaversion.rewriter.StatisticsRewriter;
|
||||
import com.viaversion.viaversion.rewriter.TagRewriter;
|
||||
import com.viaversion.viaversion.util.Key;
|
||||
|
||||
import static com.viaversion.viaversion.util.ProtocolUtil.packetTypeMap;
|
||||
import static com.viaversion.viaversion.util.TagUtil.removeNamespaced;
|
||||
|
||||
public final class Protocol26_1To1_21_11 extends BackwardsProtocol<ClientboundPacket26_1, ClientboundPacket1_21_11, ServerboundPacket26_1, ServerboundPacket1_21_9> {
|
||||
|
||||
public static final BackwardsMappingData MAPPINGS = new BackwardsMappingData("26.1", "1.21.11", Protocol1_21_11To26_1.class);
|
||||
private final EntityPacketRewriter26_1 entityRewriter = new EntityPacketRewriter26_1(this);
|
||||
private final BlockItemPacketRewriter26_1 itemRewriter = new BlockItemPacketRewriter26_1(this);
|
||||
private final ParticleRewriter<ClientboundPacket26_1> particleRewriter = new ParticleRewriter<>(this);
|
||||
private final NBTComponentRewriter<ClientboundPacket26_1> translatableRewriter = new ComponentRewriter26_1(this);
|
||||
private final TagRewriter<ClientboundPacket26_1> tagRewriter = new TagRewriter<>(this);
|
||||
private final RegistryDataRewriter registryDataRewriter = new BackwardsRegistryRewriter(this);
|
||||
|
||||
public Protocol26_1To1_21_11() {
|
||||
super(ClientboundPacket26_1.class, ClientboundPacket1_21_11.class, ServerboundPacket26_1.class, ServerboundPacket1_21_9.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerPackets() {
|
||||
super.registerPackets();
|
||||
|
||||
// Remove new environment attributes
|
||||
registryDataRewriter.addHandler("dimension_type", (key, tag) -> {
|
||||
final CompoundTag attributes = tag.getCompoundTag("attributes");
|
||||
removeNamespaced(attributes, "visual/block_light_tint");
|
||||
removeNamespaced(attributes, "visual/night_vision_color");
|
||||
removeNamespaced(attributes, "visual/ambient_light_color");
|
||||
});
|
||||
|
||||
// Move around entity variant names and sounds
|
||||
registryDataRewriter.addHandler("wolf_sound_variant", (key, tag) -> {
|
||||
final CompoundTag sounds = tag.getCompoundTag("adult_sounds");
|
||||
tag.remove("baby_sounds");
|
||||
tag.putAll(sounds);
|
||||
});
|
||||
registryDataRewriter.addHandler("frog_variant", (key, tag) -> swapEntityNameAffix("frog", tag));
|
||||
registryDataRewriter.addHandler("chicken_variant", (key, tag) -> swapEntityNameAffix("chicken", tag));
|
||||
registryDataRewriter.addHandler("cow_variant", (key, tag) -> swapEntityNameAffix("cow", tag));
|
||||
registryDataRewriter.addHandler("pig_variant", (key, tag) -> swapEntityNameAffix("pig", tag));
|
||||
registryDataRewriter.addHandler("cat_variant", (key, tag) -> removeEntityNamePrefix("cat", tag));
|
||||
registryDataRewriter.remove("world_clock");
|
||||
registryDataRewriter.remove("cat_sound_variant");
|
||||
registryDataRewriter.remove("cow_sound_variant");
|
||||
registryDataRewriter.remove("pig_sound_variant");
|
||||
registryDataRewriter.remove("chicken_sound_variant");
|
||||
registerClientbound(ClientboundConfigurationPackets1_21_9.REGISTRY_DATA, registryDataRewriter::handle);
|
||||
|
||||
tagRewriter.addEmptyTags(RegistryType.BLOCK, "big_dripleaf_placeable", "small_dripleaf_placeable", "mushroom_grow_block", "bamboo_plantable_on");
|
||||
tagRewriter.registerGeneric(ClientboundPackets26_1.UPDATE_TAGS);
|
||||
tagRewriter.registerGeneric(ClientboundConfigurationPackets1_21_9.UPDATE_TAGS);
|
||||
|
||||
final SoundRewriter<ClientboundPacket26_1> soundRewriter = new SoundRewriter<>(this);
|
||||
soundRewriter.registerSound1_19_3(ClientboundPackets26_1.SOUND);
|
||||
soundRewriter.registerSound1_19_3(ClientboundPackets26_1.SOUND_ENTITY);
|
||||
soundRewriter.registerStopSound(ClientboundPackets26_1.STOP_SOUND);
|
||||
|
||||
new StatisticsRewriter<>(this).register(ClientboundPackets26_1.AWARD_STATS);
|
||||
new AttributeRewriter<>(this).register1_21(ClientboundPackets26_1.UPDATE_ATTRIBUTES);
|
||||
|
||||
translatableRewriter.registerOpenScreen1_14(ClientboundPackets26_1.OPEN_SCREEN);
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets26_1.SET_ACTION_BAR_TEXT);
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets26_1.SET_TITLE_TEXT);
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets26_1.SET_SUBTITLE_TEXT);
|
||||
translatableRewriter.registerBossEvent(ClientboundPackets26_1.BOSS_EVENT);
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets26_1.DISCONNECT);
|
||||
translatableRewriter.registerTabList(ClientboundPackets26_1.TAB_LIST);
|
||||
translatableRewriter.registerSetPlayerTeam1_21_5(ClientboundPackets26_1.SET_PLAYER_TEAM);
|
||||
translatableRewriter.registerPlayerCombatKill1_20(ClientboundPackets26_1.PLAYER_COMBAT_KILL);
|
||||
translatableRewriter.registerPlayerInfoUpdate1_21_4(ClientboundPackets26_1.PLAYER_INFO_UPDATE);
|
||||
translatableRewriter.registerComponentPacket(ClientboundPackets26_1.SYSTEM_CHAT);
|
||||
translatableRewriter.registerDisguisedChat(ClientboundPackets26_1.DISGUISED_CHAT);
|
||||
translatableRewriter.registerPlayerChat1_21_5(ClientboundPackets26_1.PLAYER_CHAT);
|
||||
translatableRewriter.registerPing();
|
||||
|
||||
particleRewriter.registerLevelParticles1_21_4(ClientboundPackets26_1.LEVEL_PARTICLES);
|
||||
particleRewriter.registerExplode1_21_9(ClientboundPackets26_1.EXPLODE);
|
||||
|
||||
cancelClientbound(ClientboundPackets26_1.LOW_DISK_SPACE_WARNING);
|
||||
cancelClientbound(ClientboundPackets26_1.GAME_RULE_VALUES);
|
||||
|
||||
registerClientbound(ClientboundPackets26_1.SET_TIME, wrapper -> {
|
||||
final long gameTime = wrapper.passthrough(Types.LONG);
|
||||
|
||||
Long dayTime = null;
|
||||
boolean advanceTime = true;
|
||||
|
||||
final int count = wrapper.read(Types.VAR_INT);
|
||||
for (int i = 0; i < count; i++) {
|
||||
final int clockType = wrapper.read(Types.VAR_INT);
|
||||
final long totalTicks = wrapper.read(Types.VAR_LONG);
|
||||
wrapper.read(Types.FLOAT); // Partial tick
|
||||
final float tickRate = wrapper.read(Types.FLOAT);
|
||||
if (Key.equals(registryDataRewriter.getMappings("world_clock").idToKey(clockType), "overworld")) {
|
||||
dayTime = totalTicks;
|
||||
advanceTime = tickRate != 0;
|
||||
}
|
||||
}
|
||||
|
||||
final DayTimeStorage dayTimeStorage = wrapper.user().get(DayTimeStorage.class);
|
||||
if (dayTime == null) {
|
||||
// Determine from previously sent values based on the current game time
|
||||
dayTime = dayTimeStorage.setGameTimeAndUpdateDayTime(gameTime);
|
||||
advanceTime = dayTimeStorage.advanceTime();
|
||||
} else {
|
||||
dayTimeStorage.setGameTime(gameTime);
|
||||
dayTimeStorage.setDayTime(dayTime);
|
||||
dayTimeStorage.setAdvanceTime(advanceTime);
|
||||
}
|
||||
|
||||
wrapper.write(Types.LONG, dayTime);
|
||||
wrapper.write(Types.BOOLEAN, advanceTime);
|
||||
});
|
||||
|
||||
new CommandRewriter1_19_4<>(this).registerDeclareCommands1_19(ClientboundPackets26_1.COMMANDS);
|
||||
}
|
||||
|
||||
private void removeEntityNamePrefix(final String key, final CompoundTag tag) {
|
||||
final StringTag assetIdTag = tag.getStringTag("asset_id");
|
||||
final String assetId = assetIdTag.getValue();
|
||||
assetIdTag.setValue(assetId.replace(key + "_", ""));
|
||||
}
|
||||
|
||||
private void swapEntityNameAffix(final String key, final CompoundTag tag) {
|
||||
final StringTag assetIdTag = tag.getStringTag("asset_id");
|
||||
final String assetId = assetIdTag.getValue();
|
||||
if (assetId.contains(key + "_")) {
|
||||
assetIdTag.setValue(assetId.replace(key + "_", "") + "_" + key);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(final UserConnection connection) {
|
||||
addEntityTracker(connection, new EntityTrackerBase(connection, EntityTypes1_21_11.PLAYER));
|
||||
addItemHasher(connection, new ItemHasherBase(this, connection));
|
||||
connection.put(new DayTimeStorage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BackwardsMappingData getMappingData() {
|
||||
return MAPPINGS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityPacketRewriter26_1 getEntityRewriter() {
|
||||
return entityRewriter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockItemPacketRewriter26_1 getItemRewriter() {
|
||||
return itemRewriter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RegistryDataRewriter getRegistryDataRewriter() {
|
||||
return registryDataRewriter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ParticleRewriter<ClientboundPacket26_1> getParticleRewriter() {
|
||||
return particleRewriter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTComponentRewriter<ClientboundPacket26_1> getComponentRewriter() {
|
||||
return translatableRewriter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TagRewriter<ClientboundPacket26_1> getTagRewriter() {
|
||||
return tagRewriter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VersionedTypesHolder types() {
|
||||
return VersionedTypes.V26_1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VersionedTypesHolder mappedTypes() {
|
||||
return VersionedTypes.V1_21_11;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PacketTypesProvider<ClientboundPacket26_1, ClientboundPacket1_21_11, ServerboundPacket26_1, ServerboundPacket1_21_9> createPacketTypesProvider() {
|
||||
return new SimplePacketTypesProvider<>(
|
||||
packetTypeMap(unmappedClientboundPacketType, ClientboundPackets26_1.class, ClientboundConfigurationPackets1_21_9.class),
|
||||
packetTypeMap(mappedClientboundPacketType, ClientboundPackets1_21_11.class, ClientboundConfigurationPackets1_21_9.class),
|
||||
packetTypeMap(mappedServerboundPacketType, ServerboundPackets26_1.class, ServerboundConfigurationPackets1_21_9.class),
|
||||
packetTypeMap(unmappedServerboundPacketType, ServerboundPackets1_21_6.class, ServerboundConfigurationPackets1_21_9.class)
|
||||
);
|
||||
}
|
||||
}
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* This file is part of ViaBackwards - https://github.com/ViaVersion/ViaBackwards
|
||||
* Copyright (C) 2016-2025 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.viaversion.viabackwards.protocol.v26_1to1_21_11.rewriter;
|
||||
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viabackwards.api.rewriters.BackwardsStructuredItemRewriter;
|
||||
import com.viaversion.viabackwards.protocol.v26_1to1_21_11.Protocol26_1To1_21_11;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.Chunk;
|
||||
import com.viaversion.viaversion.api.minecraft.data.StructuredDataContainer;
|
||||
import com.viaversion.viaversion.api.minecraft.data.StructuredDataKey;
|
||||
import com.viaversion.viaversion.api.minecraft.item.Item;
|
||||
import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_21_5;
|
||||
import com.viaversion.viaversion.api.type.types.chunk.ChunkType26_1;
|
||||
import com.viaversion.viaversion.protocols.v1_21_11to26_1.packet.ClientboundPacket26_1;
|
||||
import com.viaversion.viaversion.protocols.v1_21_11to26_1.packet.ClientboundPackets26_1;
|
||||
import com.viaversion.viaversion.protocols.v1_21_4to1_21_5.rewriter.RecipeDisplayRewriter1_21_5;
|
||||
import com.viaversion.viaversion.protocols.v1_21_5to1_21_6.packet.ServerboundPackets1_21_6;
|
||||
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ClientboundConfigurationPackets1_21_9;
|
||||
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ServerboundPacket1_21_9;
|
||||
import com.viaversion.viaversion.rewriter.BlockRewriter;
|
||||
import com.viaversion.viaversion.rewriter.RecipeDisplayRewriter;
|
||||
import com.viaversion.viaversion.rewriter.block.BlockRewriter1_21_5;
|
||||
|
||||
import static com.viaversion.viaversion.protocols.v1_21_11to26_1.rewriter.BlockItemPacketRewriter26_1.downgradeData;
|
||||
import static com.viaversion.viaversion.protocols.v1_21_11to26_1.rewriter.BlockItemPacketRewriter26_1.upgradeData;
|
||||
|
||||
public final class BlockItemPacketRewriter26_1 extends BackwardsStructuredItemRewriter<ClientboundPacket26_1, ServerboundPacket1_21_9, Protocol26_1To1_21_11> {
|
||||
|
||||
public BlockItemPacketRewriter26_1(final Protocol26_1To1_21_11 protocol) {
|
||||
super(protocol);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerPackets() {
|
||||
final BlockRewriter<ClientboundPacket26_1> blockRewriter = new BlockRewriter1_21_5<>(protocol);
|
||||
blockRewriter.registerBlockEvent(ClientboundPackets26_1.BLOCK_EVENT);
|
||||
blockRewriter.registerBlockUpdate(ClientboundPackets26_1.BLOCK_UPDATE);
|
||||
blockRewriter.registerSectionBlocksUpdate1_20(ClientboundPackets26_1.SECTION_BLOCKS_UPDATE);
|
||||
blockRewriter.registerLevelEvent1_21(ClientboundPackets26_1.LEVEL_EVENT, 2001);
|
||||
blockRewriter.registerBlockEntityData(ClientboundPackets26_1.BLOCK_ENTITY_DATA);
|
||||
protocol.registerClientbound(ClientboundPackets26_1.LEVEL_CHUNK_WITH_LIGHT, wrapper -> {
|
||||
final Chunk chunk = blockRewriter.handleChunk1_19(wrapper, ChunkType26_1::new, ChunkType1_21_5::new);
|
||||
blockRewriter.handleBlockEntities(chunk, wrapper.user());
|
||||
});
|
||||
|
||||
registerSetCursorItem(ClientboundPackets26_1.SET_CURSOR_ITEM);
|
||||
registerSetPlayerInventory(ClientboundPackets26_1.SET_PLAYER_INVENTORY);
|
||||
registerCooldown1_21_2(ClientboundPackets26_1.COOLDOWN);
|
||||
registerSetContent1_21_2(ClientboundPackets26_1.CONTAINER_SET_CONTENT);
|
||||
registerSetSlot1_21_2(ClientboundPackets26_1.CONTAINER_SET_SLOT);
|
||||
registerAdvancements1_20_3(ClientboundPackets26_1.UPDATE_ADVANCEMENTS);
|
||||
registerSetEquipment(ClientboundPackets26_1.SET_EQUIPMENT);
|
||||
registerMerchantOffers1_20_5(ClientboundPackets26_1.MERCHANT_OFFERS);
|
||||
registerContainerClick1_21_5(ServerboundPackets1_21_6.CONTAINER_CLICK);
|
||||
registerSetCreativeModeSlot1_21_5(ServerboundPackets1_21_6.SET_CREATIVE_MODE_SLOT);
|
||||
registerShowDialog(ClientboundPackets26_1.SHOW_DIALOG);
|
||||
registerShowDialogDirect(ClientboundConfigurationPackets1_21_9.SHOW_DIALOG);
|
||||
|
||||
final RecipeDisplayRewriter<ClientboundPacket26_1> recipeRewriter = new RecipeDisplayRewriter1_21_5<>(protocol);
|
||||
recipeRewriter.registerUpdateRecipes(ClientboundPackets26_1.UPDATE_RECIPES);
|
||||
recipeRewriter.registerRecipeBookAdd(ClientboundPackets26_1.RECIPE_BOOK_ADD);
|
||||
recipeRewriter.registerPlaceGhostRecipe(ClientboundPackets26_1.PLACE_GHOST_RECIPE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleItemDataComponentsToClient(final UserConnection connection, final Item item, final StructuredDataContainer container) {
|
||||
super.handleItemDataComponentsToClient(connection, item, container);
|
||||
downgradeData(container);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleItemDataComponentsToServer(final UserConnection connection, final Item item, final StructuredDataContainer container) {
|
||||
super.handleItemDataComponentsToServer(connection, item, container);
|
||||
upgradeData(protocol, container);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void restoreBackupData(final Item item, final StructuredDataContainer container, final CompoundTag customData) {
|
||||
super.restoreBackupData(item, container, customData);
|
||||
if (!(customData.remove(nbtTagName("backup")) instanceof final CompoundTag backupTag)) {
|
||||
return;
|
||||
}
|
||||
|
||||
restoreIntData(StructuredDataKey.ADDITIONAL_TRADE_COST, container, backupTag);
|
||||
restoreIntData(StructuredDataKey.DYE, container, backupTag);
|
||||
restoreIntData(StructuredDataKey.CAT_SOUND_VARIANT, container, backupTag);
|
||||
restoreIntData(StructuredDataKey.CHICKEN_SOUND_VARIANT, container, backupTag);
|
||||
restoreIntData(StructuredDataKey.COW_SOUND_VARIANT, container, backupTag);
|
||||
restoreIntData(StructuredDataKey.PIG_SOUND_VARIANT, container, backupTag);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void backupInconvertibleData(final UserConnection connection, final Item item, final StructuredDataContainer dataContainer, final CompoundTag backupTag) {
|
||||
super.backupInconvertibleData(connection, item, dataContainer, backupTag);
|
||||
saveIntData(StructuredDataKey.ADDITIONAL_TRADE_COST, dataContainer, backupTag);
|
||||
saveIntData(StructuredDataKey.DYE, dataContainer, backupTag);
|
||||
saveIntData(StructuredDataKey.CAT_SOUND_VARIANT, dataContainer, backupTag);
|
||||
saveIntData(StructuredDataKey.CHICKEN_SOUND_VARIANT, dataContainer, backupTag);
|
||||
saveIntData(StructuredDataKey.COW_SOUND_VARIANT, dataContainer, backupTag);
|
||||
saveIntData(StructuredDataKey.PIG_SOUND_VARIANT, dataContainer, backupTag);
|
||||
}
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* This file is part of ViaBackwards - https://github.com/ViaVersion/ViaBackwards
|
||||
* Copyright (C) 2016-2025 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.viaversion.viabackwards.protocol.v26_1to1_21_11.rewriter;
|
||||
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viabackwards.api.BackwardsProtocol;
|
||||
import com.viaversion.viabackwards.api.rewriters.text.NBTComponentRewriter;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.data.StructuredDataKey;
|
||||
import com.viaversion.viaversion.protocols.v1_21_11to26_1.packet.ClientboundPacket26_1;
|
||||
|
||||
public final class ComponentRewriter26_1 extends NBTComponentRewriter<ClientboundPacket26_1> {
|
||||
|
||||
public ComponentRewriter26_1(final BackwardsProtocol<ClientboundPacket26_1, ?, ?, ?> protocol) {
|
||||
super(protocol);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleShowItem(final UserConnection connection, final CompoundTag itemTag, final CompoundTag componentsTag) {
|
||||
super.handleShowItem(connection, itemTag, componentsTag);
|
||||
if (componentsTag == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
removeDataComponents(componentsTag, StructuredDataKey.ADDITIONAL_TRADE_COST, StructuredDataKey.DAMAGE_RESISTANT26_1,
|
||||
StructuredDataKey.BLOCKS_ATTACKS26_1, StructuredDataKey.PROVIDES_BANNER_PATTERNS26_1, StructuredDataKey.DYE,
|
||||
StructuredDataKey.CAT_SOUND_VARIANT, StructuredDataKey.CHICKEN_SOUND_VARIANT, StructuredDataKey.COW_SOUND_VARIANT, StructuredDataKey.PIG_SOUND_VARIANT);
|
||||
}
|
||||
}
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* This file is part of ViaBackwards - https://github.com/ViaVersion/ViaBackwards
|
||||
* Copyright (C) 2016-2025 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.viaversion.viabackwards.protocol.v26_1to1_21_11.rewriter;
|
||||
|
||||
import com.viaversion.viabackwards.api.rewriters.EntityRewriter;
|
||||
import com.viaversion.viabackwards.protocol.v26_1to1_21_11.Protocol26_1To1_21_11;
|
||||
import com.viaversion.viaversion.api.minecraft.Vector3d;
|
||||
import com.viaversion.viaversion.api.minecraft.entities.EntityType;
|
||||
import com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_21_11;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes1_21_11;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes26_1;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.version.VersionedTypes;
|
||||
import com.viaversion.viaversion.protocols.v1_21_11to26_1.packet.ClientboundPacket26_1;
|
||||
import com.viaversion.viaversion.protocols.v1_21_11to26_1.packet.ClientboundPackets26_1;
|
||||
import com.viaversion.viaversion.protocols.v1_21_11to26_1.packet.ServerboundPackets26_1;
|
||||
import com.viaversion.viaversion.protocols.v1_21_5to1_21_6.packet.ServerboundPackets1_21_6;
|
||||
|
||||
public final class EntityPacketRewriter26_1 extends EntityRewriter<ClientboundPacket26_1, Protocol26_1To1_21_11> {
|
||||
|
||||
private static final int INTERACT_ACTION = 0;
|
||||
private static final int ATTACK_ACTION = 1;
|
||||
private static final int INTERACT_AT_ACTION = 2;
|
||||
|
||||
public EntityPacketRewriter26_1(final Protocol26_1To1_21_11 protocol) {
|
||||
super(protocol, VersionedTypes.V1_21_11.entityDataTypes.optionalComponentType, VersionedTypes.V1_21_11.entityDataTypes.booleanType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerPackets() {
|
||||
registerTrackerWithData1_21_9(ClientboundPackets26_1.ADD_ENTITY, EntityTypes1_21_11.FALLING_BLOCK);
|
||||
registerSetEntityData(ClientboundPackets26_1.SET_ENTITY_DATA);
|
||||
registerRemoveEntities(ClientboundPackets26_1.REMOVE_ENTITIES);
|
||||
registerPlayerAbilities(ClientboundPackets26_1.PLAYER_ABILITIES);
|
||||
registerGameEvent(ClientboundPackets26_1.GAME_EVENT);
|
||||
registerLogin1_20_5(ClientboundPackets26_1.LOGIN);
|
||||
registerRespawn1_20_5(ClientboundPackets26_1.RESPAWN);
|
||||
|
||||
protocol.registerServerbound(ServerboundPackets1_21_6.INTERACT, wrapper -> {
|
||||
wrapper.passthrough(Types.VAR_INT); // Entity ID
|
||||
final int action = wrapper.read(Types.VAR_INT);
|
||||
switch (action) {
|
||||
case INTERACT_ACTION -> wrapper.cancel(); // Drop "normal" interacts, as interact_at is always sent by Vanilla clients, and always sent first, with this following after
|
||||
case ATTACK_ACTION -> {
|
||||
wrapper.setPacketType(ServerboundPackets26_1.ATTACK);
|
||||
wrapper.read(Types.BOOLEAN); // Using secondary action
|
||||
}
|
||||
case INTERACT_AT_ACTION -> {
|
||||
final float x = wrapper.read(Types.FLOAT);
|
||||
final float y = wrapper.read(Types.FLOAT);
|
||||
final float z = wrapper.read(Types.FLOAT);
|
||||
wrapper.passthrough(Types.VAR_INT); // Hand
|
||||
wrapper.write(Types.LOW_PRECISION_VECTOR, new Vector3d(x, y, z));
|
||||
// Keep secondary action
|
||||
}
|
||||
default -> throw new IllegalArgumentException("Invalid interact action");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerRewrites() {
|
||||
final EntityDataTypes26_1 entityDataTypes = VersionedTypes.V26_1.entityDataTypes;
|
||||
final EntityDataTypes1_21_11 mappedEntityDataTypes = VersionedTypes.V1_21_11.entityDataTypes;
|
||||
filter().handler((event, data) -> {
|
||||
final int id = data.dataType().typeId();
|
||||
int mappedId = id;
|
||||
if (id == entityDataTypes.catSoundVariant.typeId()
|
||||
|| id == entityDataTypes.cowSoundVariant.typeId()
|
||||
|| id == entityDataTypes.pigSoundVariant.typeId()
|
||||
|| id == entityDataTypes.chickenSoundVariant.typeId()) {
|
||||
event.cancel();
|
||||
return;
|
||||
} else if (id > entityDataTypes.chickenSoundVariant.typeId()) {
|
||||
mappedId -= 4;
|
||||
} else if (id > entityDataTypes.pigSoundVariant.typeId()) {
|
||||
mappedId -= 3;
|
||||
} else if (id > entityDataTypes.cowSoundVariant.typeId()) {
|
||||
mappedId -= 2;
|
||||
} else if (id > entityDataTypes.catSoundVariant.typeId()) {
|
||||
mappedId -= 1;
|
||||
}
|
||||
data.setDataType(mappedEntityDataTypes.byId(mappedId));
|
||||
});
|
||||
registerEntityDataTypeHandler1_20_3(
|
||||
mappedEntityDataTypes.itemType,
|
||||
mappedEntityDataTypes.blockStateType,
|
||||
mappedEntityDataTypes.optionalBlockStateType,
|
||||
mappedEntityDataTypes.particleType,
|
||||
mappedEntityDataTypes.particlesType,
|
||||
mappedEntityDataTypes.componentType,
|
||||
mappedEntityDataTypes.optionalComponentType
|
||||
);
|
||||
|
||||
filter().type(EntityTypes1_21_11.ZOMBIE_VILLAGER).removeIndex(21); // Is villager data finalized
|
||||
filter().type(EntityTypes1_21_11.VILLAGER).removeIndex(20); // Is villager data finalized
|
||||
filter().type(EntityTypes1_21_11.CAT).removeIndex(24); // Sound variant
|
||||
filter().type(EntityTypes1_21_11.CHICKEN).removeIndex(19); // Sound variant
|
||||
filter().type(EntityTypes1_21_11.PIG).removeIndex(20); // Sound variant
|
||||
filter().type(EntityTypes1_21_11.COW).removeIndex(19); // Sound variant
|
||||
filter().type(EntityTypes1_21_11.TADPOLE).removeIndex(17); // Age locked
|
||||
filter().type(EntityTypes1_21_11.ABSTRACT_AGEABLE).removeIndex(17); // Age locked
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMappingDataLoaded() {
|
||||
mapTypes();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityType typeFromId(final int type) {
|
||||
return EntityTypes1_21_11.getTypeFromId(type);
|
||||
}
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* This file is part of ViaBackwards - https://github.com/ViaVersion/ViaBackwards
|
||||
* Copyright (C) 2016-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.viaversion.viabackwards.protocol.v26_1to1_21_11.storage;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.StorableObject;
|
||||
|
||||
public final class DayTimeStorage implements StorableObject {
|
||||
|
||||
private long gameTime;
|
||||
private long dayTime;
|
||||
private boolean advanceTime;
|
||||
|
||||
public long gameTime() {
|
||||
return gameTime;
|
||||
}
|
||||
|
||||
public void setGameTime(final long gameTime) {
|
||||
this.gameTime = gameTime;
|
||||
}
|
||||
|
||||
public long setGameTimeAndUpdateDayTime(final long gameTime) {
|
||||
this.dayTime += gameTime - this.gameTime;
|
||||
this.gameTime = gameTime;
|
||||
return dayTime;
|
||||
}
|
||||
|
||||
public long dayTime() {
|
||||
return dayTime;
|
||||
}
|
||||
|
||||
public void setDayTime(final long dayTime) {
|
||||
this.dayTime = dayTime;
|
||||
}
|
||||
|
||||
public boolean advanceTime() {
|
||||
return advanceTime;
|
||||
}
|
||||
|
||||
public void setAdvanceTime(final boolean advanceTime) {
|
||||
this.advanceTime = advanceTime;
|
||||
}
|
||||
}
|
||||
@@ -20,9 +20,85 @@
|
||||
"data": -1,
|
||||
"name": "1.12 %vb_color% Concrete Powder"
|
||||
},
|
||||
"235-250": {
|
||||
"235": {
|
||||
"id": 159,
|
||||
"name": "1.12 %color% Glazed Terracotta"
|
||||
"data": 0,
|
||||
"name": "1.12 White Glazed Terracotta"
|
||||
},
|
||||
"236": {
|
||||
"id": 159,
|
||||
"data": 1,
|
||||
"name": "1.12 Orange Glazed Terracotta"
|
||||
},
|
||||
"237": {
|
||||
"id": 159,
|
||||
"data": 2,
|
||||
"name": "1.12 Magenta Glazed Terracotta"
|
||||
},
|
||||
"238": {
|
||||
"id": 159,
|
||||
"data": 3,
|
||||
"name": "1.12 Light Blue Glazed Terracotta"
|
||||
},
|
||||
"239": {
|
||||
"id": 159,
|
||||
"data": 4,
|
||||
"name": "1.12 Yellow Glazed Terracotta"
|
||||
},
|
||||
"240": {
|
||||
"id": 159,
|
||||
"data": 5,
|
||||
"name": "1.12 Lime Glazed Terracotta"
|
||||
},
|
||||
"241": {
|
||||
"id": 159,
|
||||
"data": 6,
|
||||
"name": "1.12 Pink Glazed Terracotta"
|
||||
},
|
||||
"242": {
|
||||
"id": 159,
|
||||
"data": 7,
|
||||
"name": "1.12 Gray Glazed Terracotta"
|
||||
},
|
||||
"243": {
|
||||
"id": 159,
|
||||
"data": 8,
|
||||
"name": "1.12 Light Gray Glazed Terracotta"
|
||||
},
|
||||
"244": {
|
||||
"id": 159,
|
||||
"data": 9,
|
||||
"name": "1.12 Cyan Glazed Terracotta"
|
||||
},
|
||||
"245": {
|
||||
"id": 159,
|
||||
"data": 10,
|
||||
"name": "1.12 Purple Glazed Terracotta"
|
||||
},
|
||||
"246": {
|
||||
"id": 159,
|
||||
"data": 11,
|
||||
"name": "1.12 Blue Glazed Terracotta"
|
||||
},
|
||||
"247": {
|
||||
"id": 159,
|
||||
"data": 12,
|
||||
"name": "1.12 Brown Glazed Terracotta"
|
||||
},
|
||||
"248": {
|
||||
"id": 159,
|
||||
"data": 13,
|
||||
"name": "1.12 Green Glazed Terracotta"
|
||||
},
|
||||
"249": {
|
||||
"id": 159,
|
||||
"data": 14,
|
||||
"name": "1.12 Red Glazed Terracotta"
|
||||
},
|
||||
"250": {
|
||||
"id": 159,
|
||||
"data": 15,
|
||||
"name": "1.12 Black Glazed Terracotta"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,115 @@
|
||||
{
|
||||
"26.1": {
|
||||
"block.minecraft.golden_dandelion": "Golden Dandelion",
|
||||
"block.minecraft.potted_golden_dandelion": "Potted Golden Dandelion",
|
||||
"build.tooLow": "Minimum height for building is %s",
|
||||
"chat_restriction.chat_and_commands_disabled_by_options": "Chat is restricted in client settings.",
|
||||
"chat_restriction.chat_disabled_by_options": "Player chat is restricted in client settings.",
|
||||
"chat_restriction.chat_disabled_by_options.action": "Go to the Chat Settings screen",
|
||||
"chat_restriction.disabled_by_launcher": "Chat is restricted by the launcher",
|
||||
"chat_restriction.disabled_by_profile": "Chat is restricted by profile settings.",
|
||||
"chat_restriction.disabled_by_profile.action": "Go to your profile settings",
|
||||
"chat_screen.commands_not_allowed": "Sending commands is not allowed",
|
||||
"chat_screen.messages_not_allowed": "Sending chat messages is not allowed",
|
||||
"chat_screen.restricted": "Chat is restricted. Click this message for details.",
|
||||
"chat_screen.restricted.narration": "Chat is restricted. Go to the Restrictions screen in World Options.",
|
||||
"command.trailing_data": "Trailing data found: %s",
|
||||
"commands.fetchprofile.entity.success": "Resolved profile for entity %s: %s",
|
||||
"commands.fetchprofile.no_profile": "Entity %s has no profile",
|
||||
"commands.swing.failed.notliving": "No living entities were found to swing",
|
||||
"commands.swing.success.multiple": "Made %s entities swing their arms",
|
||||
"commands.swing.success.single": "Made %s swing an arm",
|
||||
"commands.time.no_default_clock": "There is no default clock in dimension %s",
|
||||
"commands.time.no_time_marker_found": "Time marker %s does not exist for clock %s",
|
||||
"commands.time.pause": "Paused clock %s",
|
||||
"commands.time.query.absolute": "Clock %s is at %s tick(s)",
|
||||
"commands.time.query.gametime": "The game time is %s tick(s)",
|
||||
"commands.time.query.timeline": "Timeline %s is at %s tick(s)",
|
||||
"commands.time.query.timeline.repetitions": "Timeline %s has passed %s repetition(s)",
|
||||
"commands.time.resume": "Resumed clock %s",
|
||||
"commands.time.set.absolute": "Set %s to %s tick(s)",
|
||||
"commands.time.set.time_marker": "Set %s to time marker %s",
|
||||
"commands.time.wrong_timeline_for_clock": "Timeline %s is not valid for clock %s",
|
||||
"editGamerule.inGame.button": "Edit Game Rules...",
|
||||
"editGamerule.inGame.disabled.tooltip": "Updating game rules requires operator permissions.",
|
||||
"editGamerule.inGame.discardChanges.message": "Are you sure you want to discard your pending game rule changes?",
|
||||
"editGamerule.inGame.discardChanges.title": "Game rule Changes",
|
||||
"editGamerule.inGame.downloadingGamerules": "Retrieving game rules...",
|
||||
"gamerule.minecraft.universal_anger.description": "Angered neutral mobs attack any nearby player, not just the player that angered them. Works best if forgive_dead_players is disabled.",
|
||||
"gui.socialInteractions.tooltip.report.chat_disabled_or_blocked": "This player can't be reported because chat is disabled or blocked",
|
||||
"key.debug.lightmapTexture": "Lightmap Texture",
|
||||
"options.worldOptions.button": "World Options...",
|
||||
"restrictions_screen.button": "Restrictions...",
|
||||
"restrictions_screen.permission.receive_player_messages.allowed": "You can receive messages from players",
|
||||
"restrictions_screen.permission.receive_player_messages.denied": "You can't receive messages from players",
|
||||
"restrictions_screen.permission.receive_system_messages.allowed": "You can receive system messages from the server",
|
||||
"restrictions_screen.permission.receive_system_messages.denied": "You can't receive system messages from the server",
|
||||
"restrictions_screen.permission.send_commands.allowed": "You can send commands",
|
||||
"restrictions_screen.permission.send_commands.denied": "You can't send commands",
|
||||
"restrictions_screen.permission.send_messages.allowed": "You can send chat messages",
|
||||
"restrictions_screen.permission.send_messages.denied": "You can't send chat messages",
|
||||
"restrictions_screen.title": "Restrictions",
|
||||
"selecteWorld.backupRequiredTooltip": "Loading the world requires taking a backup first",
|
||||
"selectWorld.backupQuestion.file_fixing_required": "Create a backup before upgrading this world?",
|
||||
"selectWorld.backupWarning.file_fixing_required": "This world needs to be upgraded before you can play it. We strongly suggest creating a backup before continuing in case you experience world corruption.",
|
||||
"selectWorld.requiresFileFixingTooltip.edit": "This world needs to be upgraded to the latest version before you can edit it due to underlying changes to the world format.",
|
||||
"selectWorld.requiresFileFixingTooltip.play": "This world needs to be upgraded to the latest version before you can play it due to underlying changes to the world format.",
|
||||
"selectWorld.requiresFileFixingTooltip.recreate": "This world needs to be upgraded to the latest version before you can recreate it due to underlying changes to the world format.",
|
||||
"selectWorld.upgrade_and_play": "Upgrade and Play",
|
||||
"selectWorld.waitingForBackup.message": "Depending on the size of your world, this may take a while. Please do not close the game or shut off your device.",
|
||||
"selectWorld.waitingForBackup.title": "Creating Backup",
|
||||
"selectWorld.world_gen_settings_access": "Unable to read or access the world gen settings file! %s",
|
||||
"subtitles.entity.baby_cat.ambient": "Kitten meows",
|
||||
"subtitles.entity.baby_cat.beg_for_food": "Kitten begs",
|
||||
"subtitles.entity.baby_cat.death": "Kitten dies",
|
||||
"subtitles.entity.baby_cat.eat": "Kitten eats",
|
||||
"subtitles.entity.baby_cat.hiss": "Kitten hisses",
|
||||
"subtitles.entity.baby_cat.hurt": "Kitten hurts",
|
||||
"subtitles.entity.baby_cat.purr": "Kitten purrs",
|
||||
"subtitles.entity.baby_chicken.ambient": "Chick peeps",
|
||||
"subtitles.entity.baby_chicken.death": "Chick dies",
|
||||
"subtitles.entity.baby_chicken.hurts": "Chick hurts",
|
||||
"subtitles.entity.baby_horse.ambient": "Foal neighs",
|
||||
"subtitles.entity.baby_horse.angry": "Foal neighs",
|
||||
"subtitles.entity.baby_horse.breathe": "Foal breathes",
|
||||
"subtitles.entity.baby_horse.death": "Foal dies",
|
||||
"subtitles.entity.baby_horse.eat": "Foal eats",
|
||||
"subtitles.entity.baby_horse.hurt": "Foal hurts",
|
||||
"subtitles.entity.baby_horse.land": "Foal lands",
|
||||
"subtitles.entity.baby_pig.ambient": "Baby Pig oinks",
|
||||
"subtitles.entity.baby_pig.death": "Baby Pig dies",
|
||||
"subtitles.entity.baby_pig.eat": "Baby Pig eats",
|
||||
"subtitles.entity.baby_pig.hurt": "Baby Pig hurts",
|
||||
"subtitles.entity.baby_wolf.ambient": "Puppy yips",
|
||||
"subtitles.entity.baby_wolf.death": "Puppy dies",
|
||||
"subtitles.entity.baby_wolf.growl": "Puppy growls",
|
||||
"subtitles.entity.baby_wolf.hurt": "Puppy hurts",
|
||||
"subtitles.entity.baby_wolf.pant": "Puppy pants",
|
||||
"subtitles.entity.baby_wolf.whine": "Puppy whines",
|
||||
"subtitles.entity.pig.eat": "Pig eats",
|
||||
"subtitles.item.golden_dandelion.unuse": "Golden Dandelion starts aging",
|
||||
"subtitles.item.golden_dandelion.use": "Golden Dandelion halts aging",
|
||||
"test.error.expected_block_present": "Expected block %s to be present",
|
||||
"test.error.sequence.minimum_tick": "Succeeded before expected tick: expected to wait %s",
|
||||
"upgradeWorld.aborted.message": "This may happen if another program accessed the world during the upgrade.\nIt may help to restart your computer and try again. If the issue persists, please consider reporting a bug.",
|
||||
"upgradeWorld.aborted.title": "Failed to upgrade the world",
|
||||
"upgradeWorld.canceled.message": "Your world remains as it was before.",
|
||||
"upgradeWorld.canceled.title": "World upgrade canceled",
|
||||
"upgradeWorld.done": "Upgrading World Completed",
|
||||
"upgradeWorld.failed_cleanup.message": "The world was successfully upgraded to the current version and is now available in the world list.\nWe encountered issues when cleaning up outdated data, therefore the name of the world folder has changed to %s.",
|
||||
"upgradeWorld.failed_cleanup.title": "Successfully upgraded the world",
|
||||
"upgradeWorld.info.converted": "Upgraded: %s",
|
||||
"upgradeWorld.info.file_fix_stage": "Stage: %s/%s",
|
||||
"upgradeWorld.info.scanning": "Scanning files...",
|
||||
"upgradeWorld.info.total": "Total: %s",
|
||||
"upgradeWorld.joinNow": "Do you want to join the world now?",
|
||||
"upgradeWorld.progress.type.files": "Moving files",
|
||||
"upgradeWorld.progress.type.legacy_structures": "Upgrading legacy structures",
|
||||
"upgradeWorld.progress.type.region": "Upgrading regions",
|
||||
"upgradeWorld.symlink.message": "The selected world contains symbolic links.\nThe required steps to upgrade the world to the current version do not support the use of symbolic links. To upgrade the world, the links need to be resolved first.",
|
||||
"upgradeWorld.symlink.title": "Can't upgrade the world",
|
||||
"upgradeWorld.title": "Upgrading World Files"
|
||||
},
|
||||
"1.21.11": {
|
||||
"advancements.adventure.spear_many_mobs.description": "Hit five mobs in the same Charge attack using the Spear",
|
||||
"advancements.adventure.spear_many_mobs.title": "Mob Kabob",
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
projectVersion=5.7.2
|
||||
projectVersion=5.8.1
|
||||
|
||||
# Smile emoji (note that modrinth may not have added the version on release yet)
|
||||
mcVersions=1.21.11, 1.21.10, 1.21.9, 1.21.8, 1.21.7, 1.21.6, 1.21.5, 1.21.4, 1.21.3, 1.21.2, 1.21.1, 1.21, 1.20.6, 1.20.5, 1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5, 1.16.4, 1.16.3, 1.16.2, 1.16.1, 1.16, 1.15.2, 1.15.1, 1.15, 1.14.4, 1.14.3, 1.14.2, 1.14.1, 1.14, 1.13.2, 1.13.1, 1.13, 1.12.2, 1.12.1, 1.12, 1.11.2, 1.11.1, 1.11, 1.10.2, 1.10.1, 1.10
|
||||
mcVersionRange=1.10-1.21.11
|
||||
mcVersions=26.1, 1.21.11, 1.21.10, 1.21.9, 1.21.8, 1.21.7, 1.21.6, 1.21.5, 1.21.4, 1.21.3, 1.21.2, 1.21.1, 1.21, 1.20.6, 1.20.5, 1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5, 1.16.4, 1.16.3, 1.16.2, 1.16.1, 1.16, 1.15.2, 1.15.1, 1.15, 1.14.4, 1.14.3, 1.14.2, 1.14.1, 1.14, 1.13.2, 1.13.1, 1.13, 1.12.2, 1.12.1, 1.12, 1.11.2, 1.11.1, 1.11, 1.10.2, 1.10.1, 1.10
|
||||
mcVersionRange=1.10-26.1
|
||||
velocityVersion=3.4-3.5
|
||||
|
||||
org.gradle.configureondemand=true
|
||||
|
||||
@@ -3,14 +3,14 @@ metadata.format.version = "1.1"
|
||||
[versions]
|
||||
|
||||
# ViaVersion
|
||||
viaver = "5.7.2-SNAPSHOT"
|
||||
viaver = "5.8.1-SNAPSHOT"
|
||||
|
||||
# Common provided
|
||||
netty = "4.0.20.Final"
|
||||
guava = "17.0"
|
||||
log4j = "2.8.1"
|
||||
|
||||
checkerQual = "3.52.1"
|
||||
checkerQual = "3.53.1"
|
||||
|
||||
# Platforms
|
||||
paper = "1.16.5-R0.1-SNAPSHOT"
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+2
-2
@@ -1,7 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=b266d5ff6b90eada6dc3b20cb090e3731302e553a27c5d3e4df1f0d76beaff06
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
|
||||
distributionSha256Sum=2ab2958f2a1e51120c326cad6f385153bb11ee93b3c216c5fccebfdfbb7ec6cb
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/2d6327017519d23b96af35865dc997fcb544fb40/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
|
||||
+2
-2
@@ -12,9 +12,9 @@ dependencyResolutionManagement {
|
||||
|
||||
pluginManagement {
|
||||
plugins {
|
||||
id("com.gradleup.shadow") version "9.3.1"
|
||||
id("com.gradleup.shadow") version "9.4.1"
|
||||
id("net.kyori.blossom") version "2.2.0"
|
||||
id("org.jetbrains.gradle.plugin.idea-ext") version "1.3"
|
||||
id("org.jetbrains.gradle.plugin.idea-ext") version "1.4.1"
|
||||
|
||||
// A nice no-conflict comment for patching in downgrading
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
},
|
||||
{
|
||||
"id": "viaversion",
|
||||
"version": "[5.7.2-SNAPSHOT,)"
|
||||
"version": "[5.8.1-SNAPSHOT,)"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user