3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-08 17:20:24 +01:00
Dieser Commit ist enthalten in:
creeper123123321 2018-07-18 14:43:31 -03:00
Ursprung 8f7c090a23
Commit 5d19697004
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 0AC57D54786721D1

Datei anzeigen

@ -1,6 +1,8 @@
package us.myles.ViaVersion.protocols.protocol1_13to1_12_2.providers.blockentities; package us.myles.ViaVersion.protocols.protocol1_13to1_12_2.providers.blockentities;
import com.github.steveice10.opennbt.tag.builtin.CompoundTag; import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
import com.github.steveice10.opennbt.tag.builtin.IntTag;
import com.github.steveice10.opennbt.tag.builtin.ListTag;
import com.github.steveice10.opennbt.tag.builtin.Tag; import com.github.steveice10.opennbt.tag.builtin.Tag;
import us.myles.ViaVersion.api.data.UserConnection; import us.myles.ViaVersion.api.data.UserConnection;
import us.myles.ViaVersion.api.minecraft.Position; import us.myles.ViaVersion.api.minecraft.Position;
@ -36,6 +38,15 @@ public class BannerHandler implements BlockEntityProvider.BlockEntityHandler {
else else
System.out.println("Why does this block have the banner block entity? :(" + tag); System.out.println("Why does this block have the banner block entity? :(" + tag);
if (tag.get("Patterns") instanceof ListTag) {
for (Tag pattern : (ListTag) tag.get("Patterns")) {
if (pattern instanceof CompoundTag) {
IntTag c = ((CompoundTag) pattern).get("Color");
c.setValue(15 - c.getValue()); // Invert color id
}
}
}
return blockId; return blockId;
} }