3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-12-27 08:30:10 +01:00

Recipes mostly work now

Dieser Commit ist enthalten in:
Nassim Jahnke 2024-10-08 17:43:23 +02:00
Ursprung 5646d04ba9
Commit c57b238b86
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F

Datei anzeigen

@ -37,6 +37,7 @@ import com.viaversion.viaversion.protocols.v1_21to1_21_2.packet.ClientboundPacke
import com.viaversion.viaversion.protocols.v1_21to1_21_2.packet.ClientboundPackets1_21_2; import com.viaversion.viaversion.protocols.v1_21to1_21_2.packet.ClientboundPackets1_21_2;
import com.viaversion.viaversion.rewriter.BlockRewriter; import com.viaversion.viaversion.rewriter.BlockRewriter;
import com.viaversion.viaversion.rewriter.SoundRewriter; import com.viaversion.viaversion.rewriter.SoundRewriter;
import com.viaversion.viaversion.util.Key;
import static com.viaversion.viaversion.protocols.v1_21to1_21_2.rewriter.BlockItemPacketRewriter1_21_2.downgradeItemData; import static com.viaversion.viaversion.protocols.v1_21to1_21_2.rewriter.BlockItemPacketRewriter1_21_2.downgradeItemData;
import static com.viaversion.viaversion.protocols.v1_21to1_21_2.rewriter.BlockItemPacketRewriter1_21_2.updateItemData; import static com.viaversion.viaversion.protocols.v1_21to1_21_2.rewriter.BlockItemPacketRewriter1_21_2.updateItemData;
@ -224,15 +225,17 @@ public final class BlockItemPacketRewriter1_21_2 extends BackwardsStructuredItem
}); });
protocol.registerClientbound(ClientboundPackets1_21_2.PLACE_GHOST_RECIPE, wrapper -> { protocol.registerClientbound(ClientboundPackets1_21_2.PLACE_GHOST_RECIPE, wrapper -> {
this.updateContainerId(wrapper); this.updateContainerId(wrapper);
wrapper.cancel(); // TODO wrapper.cancel(); // Full recipe display, this doesn't look mappable
}); });
protocol.registerServerbound(ServerboundPackets1_20_5.PLACE_RECIPE, wrapper -> { protocol.registerServerbound(ServerboundPackets1_20_5.PLACE_RECIPE, wrapper -> {
this.updateContainerIdServerbound(wrapper); this.updateContainerIdServerbound(wrapper);
wrapper.cancel(); // TODO
final String recipe = Key.stripMinecraftNamespace(wrapper.read(Types.STRING));
wrapper.write(Types.VAR_INT, Integer.parseInt(recipe));
}); });
protocol.registerServerbound(ServerboundPackets1_20_5.RECIPE_BOOK_SEEN_RECIPE, wrapper -> { protocol.registerServerbound(ServerboundPackets1_20_5.RECIPE_BOOK_SEEN_RECIPE, wrapper -> {
this.updateContainerIdServerbound(wrapper); final String recipe = Key.stripMinecraftNamespace(wrapper.read(Types.STRING));
wrapper.cancel(); // TODO wrapper.write(Types.VAR_INT, Integer.parseInt(recipe));
}); });
} }