3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-09-08 22:02:50 +02:00

Fix banner item color in 1.12->1.13

Fixes #1809
Dieser Commit ist enthalten in:
KennyTV 2020-06-22 10:20:00 +02:00
Ursprung 2ea3d60307
Commit 7ec9eb08d9
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B

Datei anzeigen

@ -274,12 +274,18 @@ public class InventoryPackets {
// NBT Changes
if (tag != null) {
// Invert shield color id
if (item.getIdentifier() == 442 || item.getIdentifier() == 425) {
// Invert banner/shield color id
boolean banner = item.getIdentifier() == 425;
if (banner || item.getIdentifier() == 442) {
if (tag.get("BlockEntityTag") instanceof CompoundTag) {
CompoundTag blockEntityTag = tag.get("BlockEntityTag");
if (blockEntityTag.get("Base") instanceof IntTag) {
IntTag base = blockEntityTag.get("Base");
// Set banner item id according to nbt
if (banner) {
rawId = 6800 + base.getValue();
}
base.setValue(15 - base.getValue());
}
if (blockEntityTag.get("Patterns") instanceof ListTag) {