Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-03 14:50:30 +01:00
Fix patterns
Dieser Commit ist enthalten in:
Ursprung
8f7c090a23
Commit
5d19697004
@ -1,6 +1,8 @@
|
||||
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.IntTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.ListTag;
|
||||
import com.github.steveice10.opennbt.tag.builtin.Tag;
|
||||
import us.myles.ViaVersion.api.data.UserConnection;
|
||||
import us.myles.ViaVersion.api.minecraft.Position;
|
||||
@ -36,6 +38,15 @@ public class BannerHandler implements BlockEntityProvider.BlockEntityHandler {
|
||||
else
|
||||
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;
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren