Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 16:40:10 +01:00
Move occluding state ids to data file
Dieser Commit ist enthalten in:
Ursprung
75d86851ce
Commit
9fd40395eb
@ -178,7 +178,8 @@ public final class ConnectionData {
|
||||
if (!Via.getConfig().isReduceBlockStorageMemory()) {
|
||||
blockConnectionData = new Int2ObjectOpenHashMap<>(2048);
|
||||
|
||||
ListTag<CompoundTag> blockConnectionMappings = MappingDataLoader.INSTANCE.loadNBT("blockConnections.nbt").getListTag("data", CompoundTag.class);
|
||||
CompoundTag data = MappingDataLoader.INSTANCE.loadNBT("blockConnections.nbt");
|
||||
ListTag<CompoundTag> blockConnectionMappings = data.getListTag("data", CompoundTag.class);
|
||||
for (CompoundTag blockTag : blockConnectionMappings) {
|
||||
BlockData blockData = new BlockData();
|
||||
for (Entry<String, Tag> entry : blockTag.entrySet()) {
|
||||
@ -208,10 +209,11 @@ public final class ConnectionData {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (String state : occludingBlockStates()) {
|
||||
OCCLUDING_STATES.add(KEY_TO_ID.getInt(state));
|
||||
IntArrayTag occludingStatesArray = data.getIntArrayTag("occluding-states");
|
||||
for (final int blockStateId : occludingStatesArray.getValue()) {
|
||||
OCCLUDING_STATES.add(blockStateId);
|
||||
}
|
||||
}
|
||||
|
||||
List<ConnectorInitAction> initActions = new ArrayList<>();
|
||||
@ -268,388 +270,6 @@ public final class ConnectionData {
|
||||
return KEY_TO_ID.getOrDefault(Key.stripMinecraftNamespace(key), -1);
|
||||
}
|
||||
|
||||
private static String[] occludingBlockStates() {
|
||||
return new String[]{
|
||||
"stone",
|
||||
"granite",
|
||||
"polished_granite",
|
||||
"diorite",
|
||||
"polished_diorite",
|
||||
"andesite",
|
||||
"polished_andesite",
|
||||
"grass_block[snowy=false]",
|
||||
"dirt",
|
||||
"coarse_dirt",
|
||||
"podzol[snowy=false]",
|
||||
"cobblestone",
|
||||
"oak_planks",
|
||||
"spruce_planks",
|
||||
"birch_planks",
|
||||
"jungle_planks",
|
||||
"acacia_planks",
|
||||
"dark_oak_planks",
|
||||
"bedrock",
|
||||
"sand",
|
||||
"red_sand",
|
||||
"gravel",
|
||||
"gold_ore",
|
||||
"iron_ore",
|
||||
"coal_ore",
|
||||
"oak_log[axis=x]",
|
||||
"oak_log[axis=y]",
|
||||
"oak_log[axis=z]",
|
||||
"spruce_log[axis=x]",
|
||||
"spruce_log[axis=y]",
|
||||
"spruce_log[axis=z]",
|
||||
"birch_log[axis=x]",
|
||||
"birch_log[axis=y]",
|
||||
"birch_log[axis=z]",
|
||||
"jungle_log[axis=x]",
|
||||
"jungle_log[axis=y]",
|
||||
"jungle_log[axis=z]",
|
||||
"acacia_log[axis=x]",
|
||||
"acacia_log[axis=y]",
|
||||
"acacia_log[axis=z]",
|
||||
"dark_oak_log[axis=x]",
|
||||
"dark_oak_log[axis=y]",
|
||||
"dark_oak_log[axis=z]",
|
||||
"oak_wood[axis=y]",
|
||||
"spruce_wood[axis=y]",
|
||||
"birch_wood[axis=y]",
|
||||
"jungle_wood[axis=y]",
|
||||
"acacia_wood[axis=y]",
|
||||
"dark_oak_wood[axis=y]",
|
||||
"sponge",
|
||||
"wet_sponge",
|
||||
"lapis_ore",
|
||||
"lapis_block",
|
||||
"dispenser[facing=north,triggered=true]",
|
||||
"dispenser[facing=north,triggered=false]",
|
||||
"dispenser[facing=east,triggered=true]",
|
||||
"dispenser[facing=east,triggered=false]",
|
||||
"dispenser[facing=south,triggered=true]",
|
||||
"dispenser[facing=south,triggered=false]",
|
||||
"dispenser[facing=west,triggered=true]",
|
||||
"dispenser[facing=west,triggered=false]",
|
||||
"dispenser[facing=up,triggered=true]",
|
||||
"dispenser[facing=up,triggered=false]",
|
||||
"dispenser[facing=down,triggered=true]",
|
||||
"dispenser[facing=down,triggered=false]",
|
||||
"sandstone",
|
||||
"chiseled_sandstone",
|
||||
"cut_sandstone",
|
||||
"note_block[instrument=harp,note=0,powered=false]",
|
||||
"white_wool",
|
||||
"orange_wool",
|
||||
"magenta_wool",
|
||||
"light_blue_wool",
|
||||
"yellow_wool",
|
||||
"lime_wool",
|
||||
"pink_wool",
|
||||
"gray_wool",
|
||||
"light_gray_wool",
|
||||
"cyan_wool",
|
||||
"purple_wool",
|
||||
"blue_wool",
|
||||
"brown_wool",
|
||||
"green_wool",
|
||||
"red_wool",
|
||||
"black_wool",
|
||||
"gold_block",
|
||||
"iron_block",
|
||||
"bricks",
|
||||
"bookshelf",
|
||||
"mossy_cobblestone",
|
||||
"obsidian",
|
||||
"spawner",
|
||||
"diamond_ore",
|
||||
"diamond_block",
|
||||
"crafting_table",
|
||||
"furnace[facing=north,lit=true]",
|
||||
"furnace[facing=north,lit=false]",
|
||||
"furnace[facing=south,lit=true]",
|
||||
"furnace[facing=south,lit=false]",
|
||||
"furnace[facing=west,lit=true]",
|
||||
"furnace[facing=west,lit=false]",
|
||||
"furnace[facing=east,lit=true]",
|
||||
"furnace[facing=east,lit=false]",
|
||||
"redstone_ore[lit=true]",
|
||||
"redstone_ore[lit=false]",
|
||||
"snow_block",
|
||||
"clay",
|
||||
"jukebox[has_record=true]",
|
||||
"jukebox[has_record=false]",
|
||||
"netherrack",
|
||||
"soul_sand",
|
||||
"carved_pumpkin[facing=north]",
|
||||
"carved_pumpkin[facing=south]",
|
||||
"carved_pumpkin[facing=west]",
|
||||
"carved_pumpkin[facing=east]",
|
||||
"jack_o_lantern[facing=north]",
|
||||
"jack_o_lantern[facing=south]",
|
||||
"jack_o_lantern[facing=west]",
|
||||
"jack_o_lantern[facing=east]",
|
||||
"infested_stone",
|
||||
"infested_cobblestone",
|
||||
"infested_stone_bricks",
|
||||
"infested_mossy_stone_bricks",
|
||||
"infested_cracked_stone_bricks",
|
||||
"infested_chiseled_stone_bricks",
|
||||
"stone_bricks",
|
||||
"mossy_stone_bricks",
|
||||
"cracked_stone_bricks",
|
||||
"chiseled_stone_bricks",
|
||||
"brown_mushroom_block[down=true,east=true,north=true,south=true,up=true,west=true]",
|
||||
"brown_mushroom_block[down=false,east=true,north=true,south=false,up=true,west=false]",
|
||||
"brown_mushroom_block[down=false,east=true,north=false,south=true,up=true,west=false]",
|
||||
"brown_mushroom_block[down=false,east=true,north=false,south=false,up=true,west=false]",
|
||||
"brown_mushroom_block[down=false,east=false,north=true,south=false,up=true,west=true]",
|
||||
"brown_mushroom_block[down=false,east=false,north=true,south=false,up=true,west=false]",
|
||||
"brown_mushroom_block[down=false,east=false,north=false,south=true,up=true,west=true]",
|
||||
"brown_mushroom_block[down=false,east=false,north=false,south=true,up=true,west=false]",
|
||||
"brown_mushroom_block[down=false,east=false,north=false,south=false,up=true,west=true]",
|
||||
"brown_mushroom_block[down=false,east=false,north=false,south=false,up=true,west=false]",
|
||||
"brown_mushroom_block[down=false,east=false,north=false,south=false,up=false,west=false]",
|
||||
"red_mushroom_block[down=true,east=true,north=true,south=true,up=true,west=true]",
|
||||
"red_mushroom_block[down=false,east=true,north=true,south=false,up=true,west=false]",
|
||||
"red_mushroom_block[down=false,east=true,north=false,south=true,up=true,west=false]",
|
||||
"red_mushroom_block[down=false,east=true,north=false,south=false,up=true,west=false]",
|
||||
"red_mushroom_block[down=false,east=false,north=true,south=false,up=true,west=true]",
|
||||
"red_mushroom_block[down=false,east=false,north=true,south=false,up=true,west=false]",
|
||||
"red_mushroom_block[down=false,east=false,north=false,south=true,up=true,west=true]",
|
||||
"red_mushroom_block[down=false,east=false,north=false,south=true,up=true,west=false]",
|
||||
"red_mushroom_block[down=false,east=false,north=false,south=false,up=true,west=true]",
|
||||
"red_mushroom_block[down=false,east=false,north=false,south=false,up=true,west=false]",
|
||||
"red_mushroom_block[down=false,east=false,north=false,south=false,up=false,west=false]",
|
||||
"mushroom_stem[down=true,east=true,north=true,south=true,up=true,west=true]",
|
||||
"mushroom_stem[down=false,east=true,north=true,south=true,up=false,west=true]",
|
||||
"melon",
|
||||
"mycelium[snowy=false]",
|
||||
"nether_bricks",
|
||||
"end_stone",
|
||||
"redstone_lamp[lit=true]",
|
||||
"redstone_lamp[lit=false]",
|
||||
"emerald_ore",
|
||||
"emerald_block",
|
||||
"command_block[conditional=true,facing=north]",
|
||||
"command_block[conditional=true,facing=east]",
|
||||
"command_block[conditional=true,facing=south]",
|
||||
"command_block[conditional=true,facing=west]",
|
||||
"command_block[conditional=true,facing=up]",
|
||||
"command_block[conditional=true,facing=down]",
|
||||
"command_block[conditional=false,facing=north]",
|
||||
"command_block[conditional=false,facing=east]",
|
||||
"command_block[conditional=false,facing=south]",
|
||||
"command_block[conditional=false,facing=west]",
|
||||
"command_block[conditional=false,facing=up]",
|
||||
"command_block[conditional=false,facing=down]",
|
||||
"nether_quartz_ore",
|
||||
"quartz_block",
|
||||
"chiseled_quartz_block",
|
||||
"quartz_pillar[axis=x]",
|
||||
"quartz_pillar[axis=y]",
|
||||
"quartz_pillar[axis=z]",
|
||||
"dropper[facing=north,triggered=true]",
|
||||
"dropper[facing=north,triggered=false]",
|
||||
"dropper[facing=east,triggered=true]",
|
||||
"dropper[facing=east,triggered=false]",
|
||||
"dropper[facing=south,triggered=true]",
|
||||
"dropper[facing=south,triggered=false]",
|
||||
"dropper[facing=west,triggered=true]",
|
||||
"dropper[facing=west,triggered=false]",
|
||||
"dropper[facing=up,triggered=true]",
|
||||
"dropper[facing=up,triggered=false]",
|
||||
"dropper[facing=down,triggered=true]",
|
||||
"dropper[facing=down,triggered=false]",
|
||||
"white_terracotta",
|
||||
"orange_terracotta",
|
||||
"magenta_terracotta",
|
||||
"light_blue_terracotta",
|
||||
"yellow_terracotta",
|
||||
"lime_terracotta",
|
||||
"pink_terracotta",
|
||||
"gray_terracotta",
|
||||
"light_gray_terracotta",
|
||||
"cyan_terracotta",
|
||||
"purple_terracotta",
|
||||
"blue_terracotta",
|
||||
"brown_terracotta",
|
||||
"green_terracotta",
|
||||
"red_terracotta",
|
||||
"black_terracotta",
|
||||
"slime_block",
|
||||
"barrier",
|
||||
"prismarine",
|
||||
"prismarine_bricks",
|
||||
"dark_prismarine",
|
||||
"hay_block[axis=x]",
|
||||
"hay_block[axis=y]",
|
||||
"hay_block[axis=z]",
|
||||
"terracotta",
|
||||
"coal_block",
|
||||
"packed_ice",
|
||||
"red_sandstone",
|
||||
"chiseled_red_sandstone",
|
||||
"cut_red_sandstone",
|
||||
"oak_slab[type=double,waterlogged=false]",
|
||||
"spruce_slab[type=double,waterlogged=false]",
|
||||
"birch_slab[type=double,waterlogged=false]",
|
||||
"jungle_slab[type=double,waterlogged=false]",
|
||||
"acacia_slab[type=double,waterlogged=false]",
|
||||
"dark_oak_slab[type=double,waterlogged=false]",
|
||||
"stone_slab[type=double,waterlogged=false]",
|
||||
"sandstone_slab[type=double,waterlogged=false]",
|
||||
"petrified_oak_slab[type=double,waterlogged=false]",
|
||||
"cobblestone_slab[type=double,waterlogged=false]",
|
||||
"brick_slab[type=double,waterlogged=false]",
|
||||
"stone_brick_slab[type=double,waterlogged=false]",
|
||||
"nether_brick_slab[type=double,waterlogged=false]",
|
||||
"quartz_slab[type=double,waterlogged=false]",
|
||||
"red_sandstone_slab[type=double,waterlogged=false]",
|
||||
"purpur_slab[type=double,waterlogged=false]",
|
||||
"smooth_stone",
|
||||
"smooth_sandstone",
|
||||
"smooth_quartz",
|
||||
"smooth_red_sandstone",
|
||||
"purpur_block",
|
||||
"purpur_pillar[axis=x]",
|
||||
"purpur_pillar[axis=y]",
|
||||
"purpur_pillar[axis=z]",
|
||||
"end_stone_bricks",
|
||||
"repeating_command_block[conditional=true,facing=north]",
|
||||
"repeating_command_block[conditional=true,facing=east]",
|
||||
"repeating_command_block[conditional=true,facing=south]",
|
||||
"repeating_command_block[conditional=true,facing=west]",
|
||||
"repeating_command_block[conditional=true,facing=up]",
|
||||
"repeating_command_block[conditional=true,facing=down]",
|
||||
"repeating_command_block[conditional=false,facing=north]",
|
||||
"repeating_command_block[conditional=false,facing=east]",
|
||||
"repeating_command_block[conditional=false,facing=south]",
|
||||
"repeating_command_block[conditional=false,facing=west]",
|
||||
"repeating_command_block[conditional=false,facing=up]",
|
||||
"repeating_command_block[conditional=false,facing=down]",
|
||||
"chain_command_block[conditional=true,facing=north]",
|
||||
"chain_command_block[conditional=true,facing=east]",
|
||||
"chain_command_block[conditional=true,facing=south]",
|
||||
"chain_command_block[conditional=true,facing=west]",
|
||||
"chain_command_block[conditional=true,facing=up]",
|
||||
"chain_command_block[conditional=true,facing=down]",
|
||||
"chain_command_block[conditional=false,facing=north]",
|
||||
"chain_command_block[conditional=false,facing=east]",
|
||||
"chain_command_block[conditional=false,facing=south]",
|
||||
"chain_command_block[conditional=false,facing=west]",
|
||||
"chain_command_block[conditional=false,facing=up]",
|
||||
"chain_command_block[conditional=false,facing=down]",
|
||||
"magma_block",
|
||||
"nether_wart_block",
|
||||
"red_nether_bricks",
|
||||
"bone_block[axis=x]",
|
||||
"bone_block[axis=y]",
|
||||
"bone_block[axis=z]",
|
||||
"white_glazed_terracotta[facing=north]",
|
||||
"white_glazed_terracotta[facing=south]",
|
||||
"white_glazed_terracotta[facing=west]",
|
||||
"white_glazed_terracotta[facing=east]",
|
||||
"orange_glazed_terracotta[facing=north]",
|
||||
"orange_glazed_terracotta[facing=south]",
|
||||
"orange_glazed_terracotta[facing=west]",
|
||||
"orange_glazed_terracotta[facing=east]",
|
||||
"magenta_glazed_terracotta[facing=north]",
|
||||
"magenta_glazed_terracotta[facing=south]",
|
||||
"magenta_glazed_terracotta[facing=west]",
|
||||
"magenta_glazed_terracotta[facing=east]",
|
||||
"light_blue_glazed_terracotta[facing=north]",
|
||||
"light_blue_glazed_terracotta[facing=south]",
|
||||
"light_blue_glazed_terracotta[facing=west]",
|
||||
"light_blue_glazed_terracotta[facing=east]",
|
||||
"yellow_glazed_terracotta[facing=north]",
|
||||
"yellow_glazed_terracotta[facing=south]",
|
||||
"yellow_glazed_terracotta[facing=west]",
|
||||
"yellow_glazed_terracotta[facing=east]",
|
||||
"lime_glazed_terracotta[facing=north]",
|
||||
"lime_glazed_terracotta[facing=south]",
|
||||
"lime_glazed_terracotta[facing=west]",
|
||||
"lime_glazed_terracotta[facing=east]",
|
||||
"pink_glazed_terracotta[facing=north]",
|
||||
"pink_glazed_terracotta[facing=south]",
|
||||
"pink_glazed_terracotta[facing=west]",
|
||||
"pink_glazed_terracotta[facing=east]",
|
||||
"gray_glazed_terracotta[facing=north]",
|
||||
"gray_glazed_terracotta[facing=south]",
|
||||
"gray_glazed_terracotta[facing=west]",
|
||||
"gray_glazed_terracotta[facing=east]",
|
||||
"light_gray_glazed_terracotta[facing=north]",
|
||||
"light_gray_glazed_terracotta[facing=south]",
|
||||
"light_gray_glazed_terracotta[facing=west]",
|
||||
"light_gray_glazed_terracotta[facing=east]",
|
||||
"cyan_glazed_terracotta[facing=north]",
|
||||
"cyan_glazed_terracotta[facing=south]",
|
||||
"cyan_glazed_terracotta[facing=west]",
|
||||
"cyan_glazed_terracotta[facing=east]",
|
||||
"purple_glazed_terracotta[facing=north]",
|
||||
"purple_glazed_terracotta[facing=south]",
|
||||
"purple_glazed_terracotta[facing=west]",
|
||||
"purple_glazed_terracotta[facing=east]",
|
||||
"blue_glazed_terracotta[facing=north]",
|
||||
"blue_glazed_terracotta[facing=south]",
|
||||
"blue_glazed_terracotta[facing=west]",
|
||||
"blue_glazed_terracotta[facing=east]",
|
||||
"brown_glazed_terracotta[facing=north]",
|
||||
"brown_glazed_terracotta[facing=south]",
|
||||
"brown_glazed_terracotta[facing=west]",
|
||||
"brown_glazed_terracotta[facing=east]",
|
||||
"green_glazed_terracotta[facing=north]",
|
||||
"green_glazed_terracotta[facing=south]",
|
||||
"green_glazed_terracotta[facing=west]",
|
||||
"green_glazed_terracotta[facing=east]",
|
||||
"red_glazed_terracotta[facing=north]",
|
||||
"red_glazed_terracotta[facing=south]",
|
||||
"red_glazed_terracotta[facing=west]",
|
||||
"red_glazed_terracotta[facing=east]",
|
||||
"black_glazed_terracotta[facing=north]",
|
||||
"black_glazed_terracotta[facing=south]",
|
||||
"black_glazed_terracotta[facing=west]",
|
||||
"black_glazed_terracotta[facing=east]",
|
||||
"white_concrete",
|
||||
"orange_concrete",
|
||||
"magenta_concrete",
|
||||
"light_blue_concrete",
|
||||
"yellow_concrete",
|
||||
"lime_concrete",
|
||||
"pink_concrete",
|
||||
"gray_concrete",
|
||||
"light_gray_concrete",
|
||||
"cyan_concrete",
|
||||
"purple_concrete",
|
||||
"blue_concrete",
|
||||
"brown_concrete",
|
||||
"green_concrete",
|
||||
"red_concrete",
|
||||
"black_concrete",
|
||||
"white_concrete_powder",
|
||||
"orange_concrete_powder",
|
||||
"magenta_concrete_powder",
|
||||
"light_blue_concrete_powder",
|
||||
"yellow_concrete_powder",
|
||||
"lime_concrete_powder",
|
||||
"pink_concrete_powder",
|
||||
"gray_concrete_powder",
|
||||
"light_gray_concrete_powder",
|
||||
"cyan_concrete_powder",
|
||||
"purple_concrete_powder",
|
||||
"blue_concrete_powder",
|
||||
"brown_concrete_powder",
|
||||
"green_concrete_powder",
|
||||
"red_concrete_powder",
|
||||
"black_concrete_powder",
|
||||
"structure_block[mode=save]",
|
||||
"structure_block[mode=load]",
|
||||
"structure_block[mode=corner]",
|
||||
"structure_block[mode=data]",
|
||||
"glowstone"
|
||||
};
|
||||
}
|
||||
|
||||
@FunctionalInterface
|
||||
interface ConnectorInitAction {
|
||||
|
||||
|
Binäre Datei nicht angezeigt.
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren