Send remaining (empty) tags

Fixes #1830
This commit is contained in:
KennyTV 2020-06-24 14:05:52 +02:00
parent 50cb30b4fc
commit 8b61d168f7
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
2 changed files with 16 additions and 0 deletions

View File

@ -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);

View File

@ -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) {