3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-03 14:50:30 +01:00

Send remaining (empty) tags

Fixes #1830
Dieser Commit ist enthalten in:
KennyTV 2020-06-24 14:05:52 +02:00
Ursprung 50cb30b4fc
Commit 8b61d168f7
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
2 geänderte Dateien mit 16 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -34,6 +34,13 @@ public class TagRewriter {
getNewTags(tagType).add(new TagData(id, EMPTY_ARRAY));
}
public void addEmptyTags(TagType tagType, String... ids) {
List<TagData> tagList = getNewTags(tagType);
for (String id : ids) {
tagList.add(new TagData(id, EMPTY_ARRAY));
}
}
public void addTag(TagType tagType, String id, int... oldIds) {
List<TagData> newTags = getNewTags(tagType);
IdRewriteFunction rewriteFunction = getRewriter(tagType);

Datei anzeigen

@ -224,6 +224,15 @@ public class Protocol1_16To1_15_2 extends Protocol<ClientboundPackets1_15, Clien
tagRewriter.addEmptyTag(TagType.BLOCK, "minecraft:soul_fire_base_blocks");
tagRewriter.addEmptyTag(TagType.BLOCK, "minecraft:non_flammable_wood");
tagRewriter.addEmptyTag(TagType.ITEM, "minecraft:non_flammable_wood");
// The rest of not accessed tags added in older versions; #1830
tagRewriter.addEmptyTags(TagType.BLOCK, "minecraft:bamboo_plantable_on", "minecraft:beds", "minecraft:bee_growables",
"minecraft:beehives", "minecraft:coral_plants", "minecraft:crops", "minecraft:dragon_immune", "minecraft:flowers",
"minecraft:portals", "minecraft:shulker_boxes", "minecraft:small_flowers", "minecraft:tall_flowers", "minecraft:trapdoors",
"minecraft:underwater_bonemeals", "minecraft:wither_immune", "minecraft:wooden_fences", "minecraft:wooden_trapdoors");
tagRewriter.addEmptyTags(TagType.ENTITY, "minecraft:arrows", "minecraft:beehive_inhabitors", "minecraft:raiders", "minecraft:skeletons");
tagRewriter.addEmptyTags(TagType.ITEM, "minecraft:beds", "minecraft:coals", "minecraft:fences", "minecraft:flowers",
"minecraft:lectern_books", "minecraft:music_discs", "minecraft:small_flowers", "minecraft:tall_flowers", "minecraft:trapdoors", "minecraft:walls", "minecraft:wooden_fences");
}
public static int getNewBlockStateId(int id) {