3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-12-24 15:20:19 +01:00

Fix 1.17->1.16 map data type reading

Fixes #646
Dieser Commit ist enthalten in:
Nassim Jahnke 2023-12-09 14:59:43 +01:00
Ursprung 2d57e8c212
Commit 7b8fd2b061
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F
4 geänderte Dateien mit 8 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -199,6 +199,7 @@ public abstract class EntityRewriterBase<C extends ClientboundPacketType, T exte
} else if (type == particleType) {
rewriteParticle(meta.value());
} else if (type == optionalComponentType || type == componentType) {
JsonElement text = meta.value();
if (text != null) {
protocol.getTranslatableRewriter().processText(text);

Datei anzeigen

@ -37,9 +37,7 @@ public final class MapColorRewriter {
wrapper.passthrough(Type.BYTE); // X
wrapper.passthrough(Type.BYTE); // Z
wrapper.passthrough(Type.BYTE); // Direction
if (wrapper.passthrough(Type.BOOLEAN)) {
wrapper.passthrough(Type.COMPONENT); // Display Name
}
wrapper.passthrough(Type.OPTIONAL_COMPONENT); // Display Name
}
short columns = wrapper.passthrough(Type.UNSIGNED_BYTE);

Datei anzeigen

@ -21,14 +21,14 @@ import com.viaversion.viabackwards.api.rewriters.ItemRewriter;
import com.viaversion.viabackwards.template.protocol.Protocol1_98To_99;
import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_20_2;
import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.rewriter.RecipeRewriter1_20_2;
import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ClientboundPackets1_20_3;
import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ServerboundPackets1_20_3;
import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.rewriter.RecipeRewriter1_20_3;
import com.viaversion.viaversion.rewriter.BlockRewriter;
// To replace if needed:
// ChunkType1_20_2
// RecipeRewriter1_20_2
// RecipeRewriter1_20_3
public final class BlockItemPacketRewriter1_99 extends ItemRewriter<ClientboundPackets1_20_3, ServerboundPackets1_20_3, Protocol1_98To_99> {
public BlockItemPacketRewriter1_99(final Protocol1_98To_99 protocol) {
@ -57,6 +57,8 @@ public final class BlockItemPacketRewriter1_99 extends ItemRewriter<ClientboundP
registerWindowPropertyEnchantmentHandler(ClientboundPackets1_20_3.WINDOW_PROPERTY);
registerSpawnParticle1_19(ClientboundPackets1_20_3.SPAWN_PARTICLE);
new RecipeRewriter1_20_2<>(protocol).register(ClientboundPackets1_20_3.DECLARE_RECIPES);
//TODO Particles in explosion packet
new RecipeRewriter1_20_3<>(protocol).register(ClientboundPackets1_20_3.DECLARE_RECIPES);
}
}

Datei anzeigen

@ -93,6 +93,7 @@ public final class EntityPacketRewriter1_99 extends EntityRewriter<ClientboundPa
meta.setMetaType(Types1_20_3.META_TYPES.byId(id));
});*/
//TODO Component needs to handle tags
registerMetaTypeHandler(
Types1_20_3.META_TYPES.itemType,
Types1_20_3.META_TYPES.blockStateType,