1.19 data updates

This commit is contained in:
Octavia Togami 2022-06-07 21:29:03 -07:00
parent 69b5d661f0
commit d3ab1e5783
No known key found for this signature in database
GPG Key ID: CC364524D1983C99
15 changed files with 258 additions and 91 deletions

File diff suppressed because one or more lines are too long

View File

@ -30,6 +30,7 @@
import com.sk89q.worldedit.util.collection.BlockMap;
import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockCategories;
import com.sk89q.worldedit.world.block.BlockCategory;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockType;
@ -60,7 +61,11 @@ public class MultiStageReorder extends AbstractBufferingExtent implements Reorde
BlockCategories.BUTTONS.getAll().forEach(type -> priorityMap.put(type, PlacementPriority.LAST));
BlockCategories.ANVIL.getAll().forEach(type -> priorityMap.put(type, PlacementPriority.LAST));
BlockCategories.WOODEN_PRESSURE_PLATES.getAll().forEach(type -> priorityMap.put(type, PlacementPriority.LAST));
BlockCategories.CARPETS.getAll().forEach(type -> priorityMap.put(type, PlacementPriority.LAST));
// Keeping CARPETS for pre-1.19 compatibility
@SuppressWarnings("deprecation")
BlockCategory carpets = BlockCategories.CARPETS;
carpets.getAll().forEach(type -> priorityMap.put(type, PlacementPriority.LAST));
BlockCategories.WOOL_CARPETS.getAll().forEach(type -> priorityMap.put(type, PlacementPriority.LAST));
BlockCategories.RAILS.getAll().forEach(type -> priorityMap.put(type, PlacementPriority.LAST));
BlockCategories.BEDS.getAll().forEach(type -> priorityMap.put(type, PlacementPriority.LAST));
BlockCategories.SMALL_FLOWERS.getAll().forEach(type -> priorityMap.put(type, PlacementPriority.LAST));
@ -132,6 +137,7 @@ public class MultiStageReorder extends AbstractBufferingExtent implements Reorde
BlockCategories.DOORS.getAll().forEach(type -> priorityMap.put(type, PlacementPriority.FINAL));
BlockCategories.BANNERS.getAll().forEach(type -> priorityMap.put(type, PlacementPriority.FINAL));
BlockCategories.SIGNS.getAll().forEach(type -> priorityMap.put(type, PlacementPriority.FINAL));
// Keeping sign and wall_sign for 1.13 compatibility
@SuppressWarnings("deprecation")
BlockType sign = BlockTypes.SIGN;
priorityMap.put(sign, PlacementPriority.FINAL);

View File

@ -76,4 +76,9 @@ private Constants() {
* The DataVersion for Minecraft 1.18
*/
public static final int DATA_VERSION_MC_1_18 = 2860;
/**
* The DataVersion for Minecraft 1.19
*/
public static final int DATA_VERSION_MC_1_19 = 3105;
}

View File

@ -29,25 +29,26 @@
@SuppressWarnings("unused")
public final class BiomeTypes {
@Nullable public static final BiomeType BADLANDS = get("minecraft:badlands");
@Nullable public static final BiomeType BADLANDS_PLATEAU = get("minecraft:badlands_plateau");
@Deprecated @Nullable public static final BiomeType BADLANDS_PLATEAU = get("minecraft:badlands_plateau");
@Nullable public static final BiomeType BAMBOO_JUNGLE = get("minecraft:bamboo_jungle");
@Nullable public static final BiomeType BAMBOO_JUNGLE_HILLS = get("minecraft:bamboo_jungle_hills");
@Deprecated @Nullable public static final BiomeType BAMBOO_JUNGLE_HILLS = get("minecraft:bamboo_jungle_hills");
@Nullable public static final BiomeType BASALT_DELTAS = get("minecraft:basalt_deltas");
@Nullable public static final BiomeType BEACH = get("minecraft:beach");
@Nullable public static final BiomeType BIRCH_FOREST = get("minecraft:birch_forest");
@Nullable public static final BiomeType BIRCH_FOREST_HILLS = get("minecraft:birch_forest_hills");
@Deprecated @Nullable public static final BiomeType BIRCH_FOREST_HILLS = get("minecraft:birch_forest_hills");
@Nullable public static final BiomeType COLD_OCEAN = get("minecraft:cold_ocean");
@Nullable public static final BiomeType CRIMSON_FOREST = get("minecraft:crimson_forest");
@Nullable public static final BiomeType DARK_FOREST = get("minecraft:dark_forest");
@Nullable public static final BiomeType DARK_FOREST_HILLS = get("minecraft:dark_forest_hills");
@Deprecated @Nullable public static final BiomeType DARK_FOREST_HILLS = get("minecraft:dark_forest_hills");
@Nullable public static final BiomeType DEEP_COLD_OCEAN = get("minecraft:deep_cold_ocean");
@Nullable public static final BiomeType DEEP_DARK = get("minecraft:deep_dark");
@Nullable public static final BiomeType DEEP_FROZEN_OCEAN = get("minecraft:deep_frozen_ocean");
@Nullable public static final BiomeType DEEP_LUKEWARM_OCEAN = get("minecraft:deep_lukewarm_ocean");
@Nullable public static final BiomeType DEEP_OCEAN = get("minecraft:deep_ocean");
@Nullable public static final BiomeType DEEP_WARM_OCEAN = get("minecraft:deep_warm_ocean");
@Deprecated @Nullable public static final BiomeType DEEP_WARM_OCEAN = get("minecraft:deep_warm_ocean");
@Nullable public static final BiomeType DESERT = get("minecraft:desert");
@Nullable public static final BiomeType DESERT_HILLS = get("minecraft:desert_hills");
@Nullable public static final BiomeType DESERT_LAKES = get("minecraft:desert_lakes");
@Deprecated @Nullable public static final BiomeType DESERT_HILLS = get("minecraft:desert_hills");
@Deprecated @Nullable public static final BiomeType DESERT_LAKES = get("minecraft:desert_lakes");
@Nullable public static final BiomeType DRIPSTONE_CAVES = get("minecraft:dripstone_caves");
@Nullable public static final BiomeType END_BARRENS = get("minecraft:end_barrens");
@Nullable public static final BiomeType END_HIGHLANDS = get("minecraft:end_highlands");
@ -56,60 +57,78 @@ public final class BiomeTypes {
@Nullable public static final BiomeType FLOWER_FOREST = get("minecraft:flower_forest");
@Nullable public static final BiomeType FOREST = get("minecraft:forest");
@Nullable public static final BiomeType FROZEN_OCEAN = get("minecraft:frozen_ocean");
@Nullable public static final BiomeType FROZEN_PEAKS = get("minecraft:frozen_peaks");
@Nullable public static final BiomeType FROZEN_RIVER = get("minecraft:frozen_river");
@Nullable public static final BiomeType GIANT_SPRUCE_TAIGA = get("minecraft:giant_spruce_taiga");
@Nullable public static final BiomeType GIANT_SPRUCE_TAIGA_HILLS = get("minecraft:giant_spruce_taiga_hills");
@Nullable public static final BiomeType GIANT_TREE_TAIGA = get("minecraft:giant_tree_taiga");
@Nullable public static final BiomeType GIANT_TREE_TAIGA_HILLS = get("minecraft:giant_tree_taiga_hills");
@Nullable public static final BiomeType GRAVELLY_MOUNTAINS = get("minecraft:gravelly_mountains");
@Deprecated @Nullable public static final BiomeType GIANT_SPRUCE_TAIGA = get("minecraft:giant_spruce_taiga");
@Deprecated @Nullable public static final BiomeType GIANT_SPRUCE_TAIGA_HILLS = get("minecraft:giant_spruce_taiga_hills");
@Deprecated @Nullable public static final BiomeType GIANT_TREE_TAIGA = get("minecraft:giant_tree_taiga");
@Deprecated @Nullable public static final BiomeType GIANT_TREE_TAIGA_HILLS = get("minecraft:giant_tree_taiga_hills");
@Deprecated @Nullable public static final BiomeType GRAVELLY_MOUNTAINS = get("minecraft:gravelly_mountains");
@Nullable public static final BiomeType GROVE = get("minecraft:grove");
@Nullable public static final BiomeType ICE_SPIKES = get("minecraft:ice_spikes");
@Nullable public static final BiomeType JAGGED_PEAKS = get("minecraft:jagged_peaks");
@Nullable public static final BiomeType JUNGLE = get("minecraft:jungle");
@Nullable public static final BiomeType JUNGLE_EDGE = get("minecraft:jungle_edge");
@Nullable public static final BiomeType JUNGLE_HILLS = get("minecraft:jungle_hills");
@Deprecated @Nullable public static final BiomeType JUNGLE_EDGE = get("minecraft:jungle_edge");
@Deprecated @Nullable public static final BiomeType JUNGLE_HILLS = get("minecraft:jungle_hills");
@Nullable public static final BiomeType LUKEWARM_OCEAN = get("minecraft:lukewarm_ocean");
@Nullable public static final BiomeType LUSH_CAVES = get("minecraft:lush_caves");
@Nullable public static final BiomeType MODIFIED_BADLANDS_PLATEAU = get("minecraft:modified_badlands_plateau");
@Nullable public static final BiomeType MODIFIED_GRAVELLY_MOUNTAINS = get("minecraft:modified_gravelly_mountains");
@Nullable public static final BiomeType MODIFIED_JUNGLE = get("minecraft:modified_jungle");
@Nullable public static final BiomeType MODIFIED_JUNGLE_EDGE = get("minecraft:modified_jungle_edge");
@Nullable public static final BiomeType MODIFIED_WOODED_BADLANDS_PLATEAU = get("minecraft:modified_wooded_badlands_plateau");
@Nullable public static final BiomeType MOUNTAIN_EDGE = get("minecraft:mountain_edge");
@Nullable public static final BiomeType MOUNTAINS = get("minecraft:mountains");
@Nullable public static final BiomeType MUSHROOM_FIELD_SHORE = get("minecraft:mushroom_field_shore");
@Nullable public static final BiomeType MANGROVE_SWAMP = get("minecraft:mangrove_swamp");
@Nullable public static final BiomeType MEADOW = get("minecraft:meadow");
@Deprecated @Nullable public static final BiomeType MODIFIED_BADLANDS_PLATEAU = get("minecraft:modified_badlands_plateau");
@Deprecated @Nullable public static final BiomeType MODIFIED_GRAVELLY_HILLS = get("minecraft:modified_gravelly_hills");
@Deprecated @Nullable public static final BiomeType MODIFIED_JUNGLE = get("minecraft:modified_jungle");
@Deprecated @Nullable public static final BiomeType MODIFIED_JUNGLE_EDGE = get("minecraft:modified_jungle_edge");
@Deprecated @Nullable public static final BiomeType MODIFIED_WOODED_BADLANDS_PLATEAU = get("minecraft:modified_wooded_badlands_plateau");
@Deprecated @Nullable public static final BiomeType MOUNTAIN_EDGE = get("minecraft:mountain_edge");
@Deprecated @Nullable public static final BiomeType MOUNTAINS = get("minecraft:mountains");
@Deprecated @Nullable public static final BiomeType MUSHROOM_FIELD_SHORE = get("minecraft:mushroom_field_shore");
@Nullable public static final BiomeType MUSHROOM_FIELDS = get("minecraft:mushroom_fields");
@Deprecated @Nullable public static final BiomeType NETHER = get("minecraft:nether");
@Nullable public static final BiomeType NETHER_WASTES = get("minecraft:nether_wastes");
@Nullable public static final BiomeType OCEAN = get("minecraft:ocean");
@Nullable public static final BiomeType OLD_GROWTH_BIRCH_FOREST = get("minecraft:old_growth_birch_forest");
@Nullable public static final BiomeType OLD_GROWTH_PINE_TAIGA = get("minecraft:old_growth_pine_taiga");
@Nullable public static final BiomeType OLD_GROWTH_SPRUCE_TAIGA = get("minecraft:old_growth_spruce_taiga");
@Nullable public static final BiomeType PLAINS = get("minecraft:plains");
@Nullable public static final BiomeType RIVER = get("minecraft:river");
@Nullable public static final BiomeType SAVANNA = get("minecraft:savanna");
@Nullable public static final BiomeType SAVANNA_PLATEAU = get("minecraft:savanna_plateau");
@Nullable public static final BiomeType SHATTERED_SAVANNA = get("minecraft:shattered_savanna");
@Nullable public static final BiomeType SHATTERED_SAVANNA_PLATEAU = get("minecraft:shattered_savanna_plateau");
@Deprecated @Nullable public static final BiomeType SHATTERED_SAVANNA = get("minecraft:shattered_savanna");
@Deprecated @Nullable public static final BiomeType SHATTERED_SAVANNA_PLATEAU = get("minecraft:shattered_savanna_plateau");
@Nullable public static final BiomeType SMALL_END_ISLANDS = get("minecraft:small_end_islands");
@Nullable public static final BiomeType SNOWY_BEACH = get("minecraft:snowy_beach");
@Nullable public static final BiomeType SNOWY_MOUNTAINS = get("minecraft:snowy_mountains");
@Deprecated @Nullable public static final BiomeType SNOWY_MOUNTAINS = get("minecraft:snowy_mountains");
@Nullable public static final BiomeType SNOWY_PLAINS = get("minecraft:snowy_plains");
@Nullable public static final BiomeType SNOWY_SLOPES = get("minecraft:snowy_slopes");
@Nullable public static final BiomeType SNOWY_TAIGA = get("minecraft:snowy_taiga");
@Nullable public static final BiomeType SNOWY_TAIGA_HILLS = get("minecraft:snowy_taiga_hills");
@Nullable public static final BiomeType SNOWY_TAIGA_MOUNTAINS = get("minecraft:snowy_taiga_mountains");
@Nullable public static final BiomeType SNOWY_TUNDRA = get("minecraft:snowy_tundra");
@Deprecated @Nullable public static final BiomeType SNOWY_TAIGA_HILLS = get("minecraft:snowy_taiga_hills");
@Deprecated @Nullable public static final BiomeType SNOWY_TAIGA_MOUNTAINS = get("minecraft:snowy_taiga_mountains");
@Deprecated @Nullable public static final BiomeType SNOWY_TUNDRA = get("minecraft:snowy_tundra");
@Nullable public static final BiomeType SOUL_SAND_VALLEY = get("minecraft:soul_sand_valley");
@Nullable public static final BiomeType STONE_SHORE = get("minecraft:stone_shore");
@Nullable public static final BiomeType SPARSE_JUNGLE = get("minecraft:sparse_jungle");
@Deprecated @Nullable public static final BiomeType STONE_SHORE = get("minecraft:stone_shore");
@Nullable public static final BiomeType STONY_PEAKS = get("minecraft:stony_peaks");
@Nullable public static final BiomeType STONY_SHORE = get("minecraft:stony_shore");
@Nullable public static final BiomeType SUNFLOWER_PLAINS = get("minecraft:sunflower_plains");
@Nullable public static final BiomeType SWAMP = get("minecraft:swamp");
@Nullable public static final BiomeType SWAMP_HILLS = get("minecraft:swamp_hills");
@Deprecated @Nullable public static final BiomeType SWAMP_HILLS = get("minecraft:swamp_hills");
@Nullable public static final BiomeType TAIGA = get("minecraft:taiga");
@Nullable public static final BiomeType TAIGA_HILLS = get("minecraft:taiga_hills");
@Nullable public static final BiomeType TAIGA_MOUNTAINS = get("minecraft:taiga_mountains");
@Nullable public static final BiomeType TALL_BIRCH_FOREST = get("minecraft:tall_birch_forest");
@Nullable public static final BiomeType TALL_BIRCH_HILLS = get("minecraft:tall_birch_hills");
@Deprecated @Nullable public static final BiomeType TAIGA_HILLS = get("minecraft:taiga_hills");
@Deprecated @Nullable public static final BiomeType TAIGA_MOUNTAINS = get("minecraft:taiga_mountains");
@Deprecated @Nullable public static final BiomeType TALL_BIRCH_FOREST = get("minecraft:tall_birch_forest");
@Deprecated @Nullable public static final BiomeType TALL_BIRCH_HILLS = get("minecraft:tall_birch_hills");
@Nullable public static final BiomeType THE_END = get("minecraft:the_end");
@Nullable public static final BiomeType THE_VOID = get("minecraft:the_void");
@Nullable public static final BiomeType WARM_OCEAN = get("minecraft:warm_ocean");
@Nullable public static final BiomeType WARPED_FOREST = get("minecraft:warped_forest");
@Nullable public static final BiomeType WOODED_BADLANDS_PLATEAU = get("minecraft:wooded_badlands_plateau");
@Nullable public static final BiomeType WOODED_HILLS = get("minecraft:wooded_hills");
@Nullable public static final BiomeType WOODED_MOUNTAINS = get("minecraft:wooded_mountains");
@Nullable public static final BiomeType WINDSWEPT_FOREST = get("minecraft:windswept_forest");
@Nullable public static final BiomeType WINDSWEPT_GRAVELLY_HILLS = get("minecraft:windswept_gravelly_hills");
@Nullable public static final BiomeType WINDSWEPT_HILLS = get("minecraft:windswept_hills");
@Nullable public static final BiomeType WINDSWEPT_SAVANNA = get("minecraft:windswept_savanna");
@Nullable public static final BiomeType WOODED_BADLANDS = get("minecraft:wooded_badlands");
@Deprecated @Nullable public static final BiomeType WOODED_BADLANDS_PLATEAU = get("minecraft:wooded_badlands_plateau");
@Deprecated @Nullable public static final BiomeType WOODED_HILLS = get("minecraft:wooded_hills");
@Deprecated @Nullable public static final BiomeType WOODED_MOUNTAINS = get("minecraft:wooded_mountains");
private BiomeTypes() {
}

View File

@ -27,7 +27,12 @@
@SuppressWarnings("unused")
public final class BlockCategories {
public static final BlockCategory ACACIA_LOGS = get("minecraft:acacia_logs");
public static final BlockCategory ANCIENT_CITY_REPLACEABLE = get("minecraft:ancient_city_replaceable");
public static final BlockCategory ANIMALS_SPAWNABLE_ON = get("minecraft:animals_spawnable_on");
public static final BlockCategory ANVIL = get("minecraft:anvil");
public static final BlockCategory AXOLOTLS_SPAWNABLE_ON = get("minecraft:axolotls_spawnable_on");
public static final BlockCategory AZALEA_GROWS_ON = get("minecraft:azalea_grows_on");
public static final BlockCategory AZALEA_ROOT_REPLACEABLE = get("minecraft:azalea_root_replaceable");
public static final BlockCategory BAMBOO_PLANTABLE_ON = get("minecraft:bamboo_plantable_on");
public static final BlockCategory BANNERS = get("minecraft:banners");
public static final BlockCategory BASE_STONE_NETHER = get("minecraft:base_stone_nether");
@ -36,16 +41,19 @@ public final class BlockCategories {
public static final BlockCategory BEDS = get("minecraft:beds");
public static final BlockCategory BEE_GROWABLES = get("minecraft:bee_growables");
public static final BlockCategory BEEHIVES = get("minecraft:beehives");
public static final BlockCategory BIG_DRIPLEAF_PLACEABLE = get("minecraft:big_dripleaf_placeable");
public static final BlockCategory BIRCH_LOGS = get("minecraft:birch_logs");
public static final BlockCategory BUTTONS = get("minecraft:buttons");
public static final BlockCategory CAMPFIRES = get("minecraft:campfires");
public static final BlockCategory CANDLE_CAKES = get("minecraft:candle_cakes");
public static final BlockCategory CANDLES = get("minecraft:candles");
public static final BlockCategory CARPETS = get("minecraft:carpets");
@Deprecated public static final BlockCategory CARPETS = get("minecraft:carpets");
public static final BlockCategory CAULDRONS = get("minecraft:cauldrons");
public static final BlockCategory CAVE_VINES = get("minecraft:cave_vines");
public static final BlockCategory CLIMBABLE = get("minecraft:climbable");
public static final BlockCategory COAL_ORES = get("minecraft:coal_ores");
public static final BlockCategory COMPLETES_FIND_TREE_TUTORIAL = get("minecraft:completes_find_tree_tutorial");
public static final BlockCategory CONVERTABLE_TO_MUD = get("minecraft:convertable_to_mud");
public static final BlockCategory COPPER_ORES = get("minecraft:copper_ores");
public static final BlockCategory CORAL_BLOCKS = get("minecraft:coral_blocks");
public static final BlockCategory CORAL_PLANTS = get("minecraft:coral_plants");
@ -53,23 +61,31 @@ public final class BlockCategories {
public static final BlockCategory CRIMSON_STEMS = get("minecraft:crimson_stems");
public static final BlockCategory CROPS = get("minecraft:crops");
public static final BlockCategory CRYSTAL_SOUND_BLOCKS = get("minecraft:crystal_sound_blocks");
public static final BlockCategory DAMPENS_VIBRATIONS = get("minecraft:dampens_vibrations");
public static final BlockCategory DARK_OAK_LOGS = get("minecraft:dark_oak_logs");
public static final BlockCategory DEAD_BUSH_MAY_PLACE_ON = get("minecraft:dead_bush_may_place_on");
public static final BlockCategory DEEPSLATE_ORE_REPLACEABLES = get("minecraft:deepslate_ore_replaceables");
public static final BlockCategory DIAMOND_ORES = get("minecraft:diamond_ores");
public static final BlockCategory DIRT = get("minecraft:dirt");
@Deprecated public static final BlockCategory DIRT_LIKE = get("minecraft:dirt_like");
public static final BlockCategory DOORS = get("minecraft:doors");
public static final BlockCategory DRAGON_IMMUNE = get("minecraft:dragon_immune");
public static final BlockCategory DRAGON_TRANSPARENT = get("minecraft:dragon_transparent");
public static final BlockCategory DRIPSTONE_REPLACEABLE_BLOCKS = get("minecraft:dripstone_replaceable_blocks");
public static final BlockCategory EMERALD_ORES = get("minecraft:emerald_ores");
public static final BlockCategory ENDERMAN_HOLDABLE = get("minecraft:enderman_holdable");
public static final BlockCategory FALL_DAMAGE_RESETTING = get("minecraft:fall_damage_resetting");
public static final BlockCategory FEATURES_CANNOT_REPLACE = get("minecraft:features_cannot_replace");
public static final BlockCategory FENCE_GATES = get("minecraft:fence_gates");
public static final BlockCategory FENCES = get("minecraft:fences");
public static final BlockCategory FIRE = get("minecraft:fire");
public static final BlockCategory FLOWER_POTS = get("minecraft:flower_pots");
public static final BlockCategory FLOWERS = get("minecraft:flowers");
public static final BlockCategory FOXES_SPAWNABLE_ON = get("minecraft:foxes_spawnable_on");
public static final BlockCategory FROG_PREFER_JUMP_TO = get("minecraft:frog_prefer_jump_to");
public static final BlockCategory FROGS_SPAWNABLE_ON = get("minecraft:frogs_spawnable_on");
public static final BlockCategory GEODE_INVALID_BLOCKS = get("minecraft:geode_invalid_blocks");
public static final BlockCategory GOATS_SPAWNABLE_ON = get("minecraft:goats_spawnable_on");
public static final BlockCategory GOLD_ORES = get("minecraft:gold_ores");
public static final BlockCategory GUARDED_BY_PIGLINS = get("minecraft:guarded_by_piglins");
public static final BlockCategory HOGLIN_REPELLENTS = get("minecraft:hoglin_repellents");
@ -82,39 +98,56 @@ public final class BlockCategories {
public static final BlockCategory IRON_ORES = get("minecraft:iron_ores");
public static final BlockCategory JUNGLE_LOGS = get("minecraft:jungle_logs");
public static final BlockCategory LAPIS_ORES = get("minecraft:lapis_ores");
public static final BlockCategory LAVA_POOL_STONE_REPLACEABLES = get("minecraft:lava_pool_stone_replaceables");
public static final BlockCategory LAVA_POOL_STONE_CANNOT_REPLACE = get("minecraft:lava_pool_stone_cannot_replace");
@Deprecated public static final BlockCategory LAVA_POOL_STONE_REPLACEABLES = get("minecraft:lava_pool_stone_replaceables");
public static final BlockCategory LEAVES = get("minecraft:leaves");
public static final BlockCategory LOGS = get("minecraft:logs");
public static final BlockCategory LOGS_THAT_BURN = get("minecraft:logs_that_burn");
public static final BlockCategory LUSH_GROUND_REPLACEABLE = get("minecraft:lush_ground_replaceable");
public static final BlockCategory MANGROVE_LOGS = get("minecraft:mangrove_logs");
public static final BlockCategory MANGROVE_LOGS_CAN_GROW_THROUGH = get("minecraft:mangrove_logs_can_grow_through");
public static final BlockCategory MANGROVE_ROOTS_CAN_GROW_THROUGH = get("minecraft:mangrove_roots_can_grow_through");
public static final BlockCategory MINEABLE_AXE = get("minecraft:mineable/axe");
public static final BlockCategory MINEABLE_HOE = get("minecraft:mineable/hoe");
public static final BlockCategory MINEABLE_PICKAXE = get("minecraft:mineable/pickaxe");
public static final BlockCategory MINEABLE_SHOVEL = get("minecraft:mineable/shovel");
public static final BlockCategory MOOSHROOMS_SPAWNABLE_ON = get("minecraft:mooshrooms_spawnable_on");
public static final BlockCategory MOSS_REPLACEABLE = get("minecraft:moss_replaceable");
public static final BlockCategory MUSHROOM_GROW_BLOCK = get("minecraft:mushroom_grow_block");
public static final BlockCategory NEEDS_DIAMOND_TOOL = get("minecraft:needs_diamond_tool");
public static final BlockCategory NEEDS_IRON_TOOL = get("minecraft:needs_iron_tool");
public static final BlockCategory NEEDS_STONE_TOOL = get("minecraft:needs_stone_tool");
public static final BlockCategory NETHER_CARVER_REPLACEABLES = get("minecraft:nether_carver_replaceables");
public static final BlockCategory NON_FLAMMABLE_WOOD = get("minecraft:non_flammable_wood");
public static final BlockCategory NYLIUM = get("minecraft:nylium");
public static final BlockCategory OAK_LOGS = get("minecraft:oak_logs");
public static final BlockCategory OCCLUDES_VIBRATION_SIGNALS = get("minecraft:occludes_vibration_signals");
public static final BlockCategory OVERWORLD_CARVER_REPLACEABLES = get("minecraft:overworld_carver_replaceables");
public static final BlockCategory OVERWORLD_NATURAL_LOGS = get("minecraft:overworld_natural_logs");
public static final BlockCategory PARROTS_SPAWNABLE_ON = get("minecraft:parrots_spawnable_on");
public static final BlockCategory PIGLIN_REPELLENTS = get("minecraft:piglin_repellents");
public static final BlockCategory PLANKS = get("minecraft:planks");
public static final BlockCategory POLAR_BEARS_SPAWNABLE_ON_ALTERNATE = get("minecraft:polar_bears_spawnable_on_alternate");
public static final BlockCategory PORTALS = get("minecraft:portals");
public static final BlockCategory PRESSURE_PLATES = get("minecraft:pressure_plates");
public static final BlockCategory PREVENT_MOB_SPAWNING_INSIDE = get("minecraft:prevent_mob_spawning_inside");
public static final BlockCategory RABBITS_SPAWNABLE_ON = get("minecraft:rabbits_spawnable_on");
public static final BlockCategory RAILS = get("minecraft:rails");
public static final BlockCategory REDSTONE_ORES = get("minecraft:redstone_ores");
public static final BlockCategory REPLACEABLE_PLANTS = get("minecraft:replaceable_plants");
public static final BlockCategory SAND = get("minecraft:sand");
public static final BlockCategory SAPLINGS = get("minecraft:saplings");
public static final BlockCategory SCULK_REPLACEABLE = get("minecraft:sculk_replaceable");
public static final BlockCategory SCULK_REPLACEABLE_WORLD_GEN = get("minecraft:sculk_replaceable_world_gen");
public static final BlockCategory SHULKER_BOXES = get("minecraft:shulker_boxes");
public static final BlockCategory SIGNS = get("minecraft:signs");
public static final BlockCategory SLABS = get("minecraft:slabs");
public static final BlockCategory SMALL_DRIPLEAF_PLACEABLE = get("minecraft:small_dripleaf_placeable");
public static final BlockCategory SMALL_FLOWERS = get("minecraft:small_flowers");
public static final BlockCategory SNAPS_GOAT_HORN = get("minecraft:snaps_goat_horn");
public static final BlockCategory SNOW = get("minecraft:snow");
public static final BlockCategory SNOW_LAYER_CAN_SURVIVE_ON = get("minecraft:snow_layer_can_survive_on");
public static final BlockCategory SNOW_LAYER_CANNOT_SURVIVE_ON = get("minecraft:snow_layer_cannot_survive_on");
public static final BlockCategory SOUL_FIRE_BASE_BLOCKS = get("minecraft:soul_fire_base_blocks");
public static final BlockCategory SOUL_SPEED_BLOCKS = get("minecraft:soul_speed_blocks");
public static final BlockCategory SPRUCE_LOGS = get("minecraft:spruce_logs");
@ -125,6 +158,7 @@ public final class BlockCategories {
public static final BlockCategory STONE_PRESSURE_PLATES = get("minecraft:stone_pressure_plates");
public static final BlockCategory STRIDER_WARM_BLOCKS = get("minecraft:strider_warm_blocks");
public static final BlockCategory TALL_FLOWERS = get("minecraft:tall_flowers");
public static final BlockCategory TERRACOTTA = get("minecraft:terracotta");
public static final BlockCategory TRAPDOORS = get("minecraft:trapdoors");
public static final BlockCategory UNDERWATER_BONEMEALS = get("minecraft:underwater_bonemeals");
public static final BlockCategory UNSTABLE_BOTTOM_CENTER = get("minecraft:unstable_bottom_center");
@ -137,6 +171,7 @@ public final class BlockCategories {
public static final BlockCategory WART_BLOCKS = get("minecraft:wart_blocks");
public static final BlockCategory WITHER_IMMUNE = get("minecraft:wither_immune");
public static final BlockCategory WITHER_SUMMON_BASE_BLOCKS = get("minecraft:wither_summon_base_blocks");
public static final BlockCategory WOLVES_SPAWNABLE_ON = get("minecraft:wolves_spawnable_on");
public static final BlockCategory WOODEN_BUTTONS = get("minecraft:wooden_buttons");
public static final BlockCategory WOODEN_DOORS = get("minecraft:wooden_doors");
public static final BlockCategory WOODEN_FENCES = get("minecraft:wooden_fences");
@ -145,6 +180,7 @@ public final class BlockCategories {
public static final BlockCategory WOODEN_STAIRS = get("minecraft:wooden_stairs");
public static final BlockCategory WOODEN_TRAPDOORS = get("minecraft:wooden_trapdoors");
public static final BlockCategory WOOL = get("minecraft:wool");
public static final BlockCategory WOOL_CARPETS = get("minecraft:wool_carpets");
private BlockCategories() {
}

View File

@ -351,6 +351,7 @@ public final class BlockTypes {
@Nullable public static final BlockType FLOWER_POT = get("minecraft:flower_pot");
@Nullable public static final BlockType FLOWERING_AZALEA = get("minecraft:flowering_azalea");
@Nullable public static final BlockType FLOWERING_AZALEA_LEAVES = get("minecraft:flowering_azalea_leaves");
@Nullable public static final BlockType FROGSPAWN = get("minecraft:frogspawn");
@Nullable public static final BlockType FROSTED_ICE = get("minecraft:frosted_ice");
@Nullable public static final BlockType FURNACE = get("minecraft:furnace");
@Nullable public static final BlockType GILDED_BLACKSTONE = get("minecraft:gilded_blackstone");
@ -515,6 +516,22 @@ public final class BlockTypes {
@Nullable public static final BlockType MAGENTA_WALL_BANNER = get("minecraft:magenta_wall_banner");
@Nullable public static final BlockType MAGENTA_WOOL = get("minecraft:magenta_wool");
@Nullable public static final BlockType MAGMA_BLOCK = get("minecraft:magma_block");
@Nullable public static final BlockType MANGROVE_BUTTON = get("minecraft:mangrove_button");
@Nullable public static final BlockType MANGROVE_DOOR = get("minecraft:mangrove_door");
@Nullable public static final BlockType MANGROVE_FENCE = get("minecraft:mangrove_fence");
@Nullable public static final BlockType MANGROVE_FENCE_GATE = get("minecraft:mangrove_fence_gate");
@Nullable public static final BlockType MANGROVE_LEAVES = get("minecraft:mangrove_leaves");
@Nullable public static final BlockType MANGROVE_LOG = get("minecraft:mangrove_log");
@Nullable public static final BlockType MANGROVE_PLANKS = get("minecraft:mangrove_planks");
@Nullable public static final BlockType MANGROVE_PRESSURE_PLATE = get("minecraft:mangrove_pressure_plate");
@Nullable public static final BlockType MANGROVE_PROPAGULE = get("minecraft:mangrove_propagule");
@Nullable public static final BlockType MANGROVE_ROOTS = get("minecraft:mangrove_roots");
@Nullable public static final BlockType MANGROVE_SIGN = get("minecraft:mangrove_sign");
@Nullable public static final BlockType MANGROVE_SLAB = get("minecraft:mangrove_slab");
@Nullable public static final BlockType MANGROVE_STAIRS = get("minecraft:mangrove_stairs");
@Nullable public static final BlockType MANGROVE_TRAPDOOR = get("minecraft:mangrove_trapdoor");
@Nullable public static final BlockType MANGROVE_WALL_SIGN = get("minecraft:mangrove_wall_sign");
@Nullable public static final BlockType MANGROVE_WOOD = get("minecraft:mangrove_wood");
@Nullable public static final BlockType MEDIUM_AMETHYST_BUD = get("minecraft:medium_amethyst_bud");
@Nullable public static final BlockType MELON = get("minecraft:melon");
@Nullable public static final BlockType MELON_STEM = get("minecraft:melon_stem");
@ -529,6 +546,12 @@ public final class BlockTypes {
@Nullable public static final BlockType MOSSY_STONE_BRICK_WALL = get("minecraft:mossy_stone_brick_wall");
@Nullable public static final BlockType MOSSY_STONE_BRICKS = get("minecraft:mossy_stone_bricks");
@Nullable public static final BlockType MOVING_PISTON = get("minecraft:moving_piston");
@Nullable public static final BlockType MUD = get("minecraft:mud");
@Nullable public static final BlockType MUD_BRICK_SLAB = get("minecraft:mud_brick_slab");
@Nullable public static final BlockType MUD_BRICK_STAIRS = get("minecraft:mud_brick_stairs");
@Nullable public static final BlockType MUD_BRICK_WALL = get("minecraft:mud_brick_wall");
@Nullable public static final BlockType MUD_BRICKS = get("minecraft:mud_bricks");
@Nullable public static final BlockType MUDDY_MANGROVE_ROOTS = get("minecraft:muddy_mangrove_roots");
@Nullable public static final BlockType MUSHROOM_STEM = get("minecraft:mushroom_stem");
@Nullable public static final BlockType MYCELIUM = get("minecraft:mycelium");
@Nullable public static final BlockType NETHER_BRICK_FENCE = get("minecraft:nether_brick_fence");
@ -562,6 +585,7 @@ public final class BlockTypes {
@Nullable public static final BlockType OAK_WOOD = get("minecraft:oak_wood");
@Nullable public static final BlockType OBSERVER = get("minecraft:observer");
@Nullable public static final BlockType OBSIDIAN = get("minecraft:obsidian");
@Nullable public static final BlockType OCHRE_FROGLIGHT = get("minecraft:ochre_froglight");
@Nullable public static final BlockType ORANGE_BANNER = get("minecraft:orange_banner");
@Nullable public static final BlockType ORANGE_BED = get("minecraft:orange_bed");
@Nullable public static final BlockType ORANGE_CANDLE = get("minecraft:orange_candle");
@ -583,6 +607,8 @@ public final class BlockTypes {
@Nullable public static final BlockType OXIDIZED_CUT_COPPER_SLAB = get("minecraft:oxidized_cut_copper_slab");
@Nullable public static final BlockType OXIDIZED_CUT_COPPER_STAIRS = get("minecraft:oxidized_cut_copper_stairs");
@Nullable public static final BlockType PACKED_ICE = get("minecraft:packed_ice");
@Nullable public static final BlockType PACKED_MUD = get("minecraft:packed_mud");
@Nullable public static final BlockType PEARLESCENT_FROGLIGHT = get("minecraft:pearlescent_froglight");
@Nullable public static final BlockType PEONY = get("minecraft:peony");
@Nullable public static final BlockType PETRIFIED_OAK_SLAB = get("minecraft:petrified_oak_slab");
@Nullable public static final BlockType PINK_BANNER = get("minecraft:pink_banner");
@ -651,6 +677,7 @@ public final class BlockTypes {
@Nullable public static final BlockType POTTED_FLOWERING_AZALEA_BUSH = get("minecraft:potted_flowering_azalea_bush");
@Nullable public static final BlockType POTTED_JUNGLE_SAPLING = get("minecraft:potted_jungle_sapling");
@Nullable public static final BlockType POTTED_LILY_OF_THE_VALLEY = get("minecraft:potted_lily_of_the_valley");
@Nullable public static final BlockType POTTED_MANGROVE_PROPAGULE = get("minecraft:potted_mangrove_propagule");
@Nullable public static final BlockType POTTED_OAK_SAPLING = get("minecraft:potted_oak_sapling");
@Nullable public static final BlockType POTTED_ORANGE_TULIP = get("minecraft:potted_orange_tulip");
@Nullable public static final BlockType POTTED_OXEYE_DAISY = get("minecraft:potted_oxeye_daisy");
@ -734,6 +761,7 @@ public final class BlockTypes {
@Nullable public static final BlockType REDSTONE_TORCH = get("minecraft:redstone_torch");
@Nullable public static final BlockType REDSTONE_WALL_TORCH = get("minecraft:redstone_wall_torch");
@Nullable public static final BlockType REDSTONE_WIRE = get("minecraft:redstone_wire");
@Nullable public static final BlockType REINFORCED_DEEPSLATE = get("minecraft:reinforced_deepslate");
@Nullable public static final BlockType REPEATER = get("minecraft:repeater");
@Nullable public static final BlockType REPEATING_COMMAND_BLOCK = get("minecraft:repeating_command_block");
@Nullable public static final BlockType RESPAWN_ANCHOR = get("minecraft:respawn_anchor");
@ -745,7 +773,11 @@ public final class BlockTypes {
@Nullable public static final BlockType SANDSTONE_STAIRS = get("minecraft:sandstone_stairs");
@Nullable public static final BlockType SANDSTONE_WALL = get("minecraft:sandstone_wall");
@Nullable public static final BlockType SCAFFOLDING = get("minecraft:scaffolding");
@Nullable public static final BlockType SCULK = get("minecraft:sculk");
@Nullable public static final BlockType SCULK_CATALYST = get("minecraft:sculk_catalyst");
@Nullable public static final BlockType SCULK_SENSOR = get("minecraft:sculk_sensor");
@Nullable public static final BlockType SCULK_SHRIEKER = get("minecraft:sculk_shrieker");
@Nullable public static final BlockType SCULK_VEIN = get("minecraft:sculk_vein");
@Nullable public static final BlockType SEA_LANTERN = get("minecraft:sea_lantern");
@Nullable public static final BlockType SEA_PICKLE = get("minecraft:sea_pickle");
@Nullable public static final BlockType SEAGRASS = get("minecraft:seagrass");
@ -819,6 +851,8 @@ public final class BlockTypes {
@Nullable public static final BlockType STRIPPED_DARK_OAK_WOOD = get("minecraft:stripped_dark_oak_wood");
@Nullable public static final BlockType STRIPPED_JUNGLE_LOG = get("minecraft:stripped_jungle_log");
@Nullable public static final BlockType STRIPPED_JUNGLE_WOOD = get("minecraft:stripped_jungle_wood");
@Nullable public static final BlockType STRIPPED_MANGROVE_LOG = get("minecraft:stripped_mangrove_log");
@Nullable public static final BlockType STRIPPED_MANGROVE_WOOD = get("minecraft:stripped_mangrove_wood");
@Nullable public static final BlockType STRIPPED_OAK_LOG = get("minecraft:stripped_oak_log");
@Nullable public static final BlockType STRIPPED_OAK_WOOD = get("minecraft:stripped_oak_wood");
@Nullable public static final BlockType STRIPPED_SPRUCE_LOG = get("minecraft:stripped_spruce_log");
@ -848,6 +882,7 @@ public final class BlockTypes {
@Nullable public static final BlockType TURTLE_EGG = get("minecraft:turtle_egg");
@Nullable public static final BlockType TWISTING_VINES = get("minecraft:twisting_vines");
@Nullable public static final BlockType TWISTING_VINES_PLANT = get("minecraft:twisting_vines_plant");
@Nullable public static final BlockType VERDANT_FROGLIGHT = get("minecraft:verdant_froglight");
@Nullable public static final BlockType VINE = get("minecraft:vine");
@Nullable public static final BlockType VOID_AIR = get("minecraft:void_air");
@Deprecated @Nullable public static final BlockType WALL_SIGN = get("minecraft:wall_sign");

View File

@ -28,6 +28,7 @@
*/
@SuppressWarnings("unused")
public final class EntityTypes {
@Nullable public static final EntityType ALLAY = get("minecraft:allay");
@Nullable public static final EntityType AREA_EFFECT_CLOUD = get("minecraft:area_effect_cloud");
@Nullable public static final EntityType ARMOR_STAND = get("minecraft:armor_stand");
@Nullable public static final EntityType ARROW = get("minecraft:arrow");
@ -38,6 +39,7 @@ public final class EntityTypes {
@Nullable public static final EntityType BOAT = get("minecraft:boat");
@Nullable public static final EntityType CAT = get("minecraft:cat");
@Nullable public static final EntityType CAVE_SPIDER = get("minecraft:cave_spider");
@Nullable public static final EntityType CHEST_BOAT = get("minecraft:chest_boat");
@Nullable public static final EntityType CHEST_MINECART = get("minecraft:chest_minecart");
@Nullable public static final EntityType CHICKEN = get("minecraft:chicken");
@Nullable public static final EntityType COD = get("minecraft:cod");
@ -65,6 +67,7 @@ public final class EntityTypes {
@Nullable public static final EntityType FIREWORK_ROCKET = get("minecraft:firework_rocket");
@Nullable public static final EntityType FISHING_BOBBER = get("minecraft:fishing_bobber");
@Nullable public static final EntityType FOX = get("minecraft:fox");
@Nullable public static final EntityType FROG = get("minecraft:frog");
@Nullable public static final EntityType FURNACE_MINECART = get("minecraft:furnace_minecart");
@Nullable public static final EntityType GHAST = get("minecraft:ghast");
@Nullable public static final EntityType GIANT = get("minecraft:giant");
@ -121,6 +124,7 @@ public final class EntityTypes {
@Nullable public static final EntityType SQUID = get("minecraft:squid");
@Nullable public static final EntityType STRAY = get("minecraft:stray");
@Nullable public static final EntityType STRIDER = get("minecraft:strider");
@Nullable public static final EntityType TADPOLE = get("minecraft:tadpole");
@Nullable public static final EntityType TNT = get("minecraft:tnt");
@Nullable public static final EntityType TNT_MINECART = get("minecraft:tnt_minecart");
@Nullable public static final EntityType TRADER_LLAMA = get("minecraft:trader_llama");
@ -131,6 +135,7 @@ public final class EntityTypes {
@Nullable public static final EntityType VILLAGER = get("minecraft:villager");
@Nullable public static final EntityType VINDICATOR = get("minecraft:vindicator");
@Nullable public static final EntityType WANDERING_TRADER = get("minecraft:wandering_trader");
@Nullable public static final EntityType WARDEN = get("minecraft:warden");
@Nullable public static final EntityType WITCH = get("minecraft:witch");
@Nullable public static final EntityType WITHER = get("minecraft:wither");
@Nullable public static final EntityType WITHER_SKELETON = get("minecraft:wither_skeleton");

View File

@ -37,15 +37,20 @@ public final class ItemCategories {
public static final ItemCategory BOATS = get("minecraft:boats");
public static final ItemCategory BUTTONS = get("minecraft:buttons");
public static final ItemCategory CANDLES = get("minecraft:candles");
public static final ItemCategory CARPETS = get("minecraft:carpets");
@Deprecated public static final ItemCategory CARPETS = get("minecraft:carpets");
public static final ItemCategory CHEST_BOATS = get("minecraft:chest_boats");
public static final ItemCategory CLUSTER_MAX_HARVESTABLES = get("minecraft:cluster_max_harvestables");
public static final ItemCategory COAL_ORES = get("minecraft:coal_ores");
public static final ItemCategory COALS = get("minecraft:coals");
public static final ItemCategory COMPASSES = get("minecraft:compasses");
public static final ItemCategory COMPLETES_FIND_TREE_TUTORIAL = get("minecraft:completes_find_tree_tutorial");
public static final ItemCategory COPPER_ORES = get("minecraft:copper_ores");
public static final ItemCategory CREEPER_DROP_MUSIC_DISCS = get("minecraft:creeper_drop_music_discs");
public static final ItemCategory CRIMSON_STEMS = get("minecraft:crimson_stems");
public static final ItemCategory DAMPENS_VIBRATIONS = get("minecraft:dampens_vibrations");
public static final ItemCategory DARK_OAK_LOGS = get("minecraft:dark_oak_logs");
public static final ItemCategory DIAMOND_ORES = get("minecraft:diamond_ores");
public static final ItemCategory DIRT = get("minecraft:dirt");
public static final ItemCategory DOORS = get("minecraft:doors");
public static final ItemCategory EMERALD_ORES = get("minecraft:emerald_ores");
public static final ItemCategory FENCES = get("minecraft:fences");
@ -63,10 +68,12 @@ public final class ItemCategories {
public static final ItemCategory LECTERN_BOOKS = get("minecraft:lectern_books");
public static final ItemCategory LOGS = get("minecraft:logs");
public static final ItemCategory LOGS_THAT_BURN = get("minecraft:logs_that_burn");
public static final ItemCategory MANGROVE_LOGS = get("minecraft:mangrove_logs");
public static final ItemCategory MUSIC_DISCS = get("minecraft:music_discs");
public static final ItemCategory NON_FLAMMABLE_WOOD = get("minecraft:non_flammable_wood");
public static final ItemCategory OAK_LOGS = get("minecraft:oak_logs");
public static final ItemCategory OCCLUDES_VIBRATION_SIGNALS = get("minecraft:occludes_vibration_signals");
@Deprecated public static final ItemCategory OCCLUDES_VIBRATION_SIGNALS = get("minecraft:occludes_vibration_signals");
public static final ItemCategory OVERWORLD_NATURAL_LOGS = get("minecraft:overworld_natural_logs");
public static final ItemCategory PIGLIN_FOOD = get("minecraft:piglin_food");
public static final ItemCategory PIGLIN_LOVED = get("minecraft:piglin_loved");
public static final ItemCategory PIGLIN_REPELLENTS = get("minecraft:piglin_repellents");
@ -85,9 +92,11 @@ public final class ItemCategories {
public static final ItemCategory STONE_CRAFTING_MATERIALS = get("minecraft:stone_crafting_materials");
public static final ItemCategory STONE_TOOL_MATERIALS = get("minecraft:stone_tool_materials");
public static final ItemCategory TALL_FLOWERS = get("minecraft:tall_flowers");
public static final ItemCategory TERRACOTTA = get("minecraft:terracotta");
public static final ItemCategory TRAPDOORS = get("minecraft:trapdoors");
public static final ItemCategory WALLS = get("minecraft:walls");
public static final ItemCategory WARPED_STEMS = get("minecraft:warped_stems");
public static final ItemCategory WART_BLOCKS = get("minecraft:wart_blocks");
public static final ItemCategory WOODEN_BUTTONS = get("minecraft:wooden_buttons");
public static final ItemCategory WOODEN_DOORS = get("minecraft:wooden_doors");
public static final ItemCategory WOODEN_FENCES = get("minecraft:wooden_fences");
@ -96,6 +105,7 @@ public final class ItemCategories {
public static final ItemCategory WOODEN_STAIRS = get("minecraft:wooden_stairs");
public static final ItemCategory WOODEN_TRAPDOORS = get("minecraft:wooden_trapdoors");
public static final ItemCategory WOOL = get("minecraft:wool");
public static final ItemCategory WOOL_CARPETS = get("minecraft:wool_carpets");
private ItemCategories() {
}

View File

@ -30,6 +30,7 @@
public final class ItemTypes {
@Nullable public static final ItemType ACACIA_BOAT = get("minecraft:acacia_boat");
@Nullable public static final ItemType ACACIA_BUTTON = get("minecraft:acacia_button");
@Nullable public static final ItemType ACACIA_CHEST_BOAT = get("minecraft:acacia_chest_boat");
@Nullable public static final ItemType ACACIA_DOOR = get("minecraft:acacia_door");
@Nullable public static final ItemType ACACIA_FENCE = get("minecraft:acacia_fence");
@Nullable public static final ItemType ACACIA_FENCE_GATE = get("minecraft:acacia_fence_gate");
@ -45,6 +46,7 @@ public final class ItemTypes {
@Nullable public static final ItemType ACACIA_WOOD = get("minecraft:acacia_wood");
@Nullable public static final ItemType ACTIVATOR_RAIL = get("minecraft:activator_rail");
@Nullable public static final ItemType AIR = get("minecraft:air");
@Nullable public static final ItemType ALLAY_SPAWN_EGG = get("minecraft:allay_spawn_egg");
@Nullable public static final ItemType ALLIUM = get("minecraft:allium");
@Nullable public static final ItemType AMETHYST_BLOCK = get("minecraft:amethyst_block");
@Nullable public static final ItemType AMETHYST_CLUSTER = get("minecraft:amethyst_cluster");
@ -82,6 +84,7 @@ public final class ItemTypes {
@Nullable public static final ItemType BIG_DRIPLEAF = get("minecraft:big_dripleaf");
@Nullable public static final ItemType BIRCH_BOAT = get("minecraft:birch_boat");
@Nullable public static final ItemType BIRCH_BUTTON = get("minecraft:birch_button");
@Nullable public static final ItemType BIRCH_CHEST_BOAT = get("minecraft:birch_chest_boat");
@Nullable public static final ItemType BIRCH_DOOR = get("minecraft:birch_door");
@Nullable public static final ItemType BIRCH_FENCE = get("minecraft:birch_fence");
@Nullable public static final ItemType BIRCH_FENCE_GATE = get("minecraft:birch_fence_gate");
@ -294,6 +297,7 @@ public final class ItemTypes {
@Deprecated @Nullable public static final ItemType DANDELION_YELLOW = get("minecraft:dandelion_yellow");
@Nullable public static final ItemType DARK_OAK_BOAT = get("minecraft:dark_oak_boat");
@Nullable public static final ItemType DARK_OAK_BUTTON = get("minecraft:dark_oak_button");
@Nullable public static final ItemType DARK_OAK_CHEST_BOAT = get("minecraft:dark_oak_chest_boat");
@Nullable public static final ItemType DARK_OAK_DOOR = get("minecraft:dark_oak_door");
@Nullable public static final ItemType DARK_OAK_FENCE = get("minecraft:dark_oak_fence");
@Nullable public static final ItemType DARK_OAK_FENCE_GATE = get("minecraft:dark_oak_fence_gate");
@ -365,6 +369,7 @@ public final class ItemTypes {
@Nullable public static final ItemType DIORITE_WALL = get("minecraft:diorite_wall");
@Nullable public static final ItemType DIRT = get("minecraft:dirt");
@Nullable public static final ItemType DIRT_PATH = get("minecraft:dirt_path");
@Nullable public static final ItemType DISC_FRAGMENT_5 = get("minecraft:disc_fragment_5");
@Nullable public static final ItemType DISPENSER = get("minecraft:dispenser");
@Nullable public static final ItemType DOLPHIN_SPAWN_EGG = get("minecraft:dolphin_spawn_egg");
@Nullable public static final ItemType DONKEY_SPAWN_EGG = get("minecraft:donkey_spawn_egg");
@ -376,6 +381,7 @@ public final class ItemTypes {
@Nullable public static final ItemType DRIPSTONE_BLOCK = get("minecraft:dripstone_block");
@Nullable public static final ItemType DROPPER = get("minecraft:dropper");
@Nullable public static final ItemType DROWNED_SPAWN_EGG = get("minecraft:drowned_spawn_egg");
@Nullable public static final ItemType ECHO_SHARD = get("minecraft:echo_shard");
@Nullable public static final ItemType EGG = get("minecraft:egg");
@Nullable public static final ItemType ELDER_GUARDIAN_SPAWN_EGG = get("minecraft:elder_guardian_spawn_egg");
@Nullable public static final ItemType ELYTRA = get("minecraft:elytra");
@ -424,6 +430,8 @@ public final class ItemTypes {
@Nullable public static final ItemType FLOWERING_AZALEA = get("minecraft:flowering_azalea");
@Nullable public static final ItemType FLOWERING_AZALEA_LEAVES = get("minecraft:flowering_azalea_leaves");
@Nullable public static final ItemType FOX_SPAWN_EGG = get("minecraft:fox_spawn_egg");
@Nullable public static final ItemType FROG_SPAWN_EGG = get("minecraft:frog_spawn_egg");
@Nullable public static final ItemType FROGSPAWN = get("minecraft:frogspawn");
@Nullable public static final ItemType FURNACE = get("minecraft:furnace");
@Nullable public static final ItemType FURNACE_MINECART = get("minecraft:furnace_minecart");
@Nullable public static final ItemType GHAST_SPAWN_EGG = get("minecraft:ghast_spawn_egg");
@ -441,6 +449,7 @@ public final class ItemTypes {
@Nullable public static final ItemType GLOW_SQUID_SPAWN_EGG = get("minecraft:glow_squid_spawn_egg");
@Nullable public static final ItemType GLOWSTONE = get("minecraft:glowstone");
@Nullable public static final ItemType GLOWSTONE_DUST = get("minecraft:glowstone_dust");
@Nullable public static final ItemType GOAT_HORN = get("minecraft:goat_horn");
@Nullable public static final ItemType GOAT_SPAWN_EGG = get("minecraft:goat_spawn_egg");
@Nullable public static final ItemType GOLD_BLOCK = get("minecraft:gold_block");
@Nullable public static final ItemType GOLD_INGOT = get("minecraft:gold_ingot");
@ -543,6 +552,7 @@ public final class ItemTypes {
@Nullable public static final ItemType JUKEBOX = get("minecraft:jukebox");
@Nullable public static final ItemType JUNGLE_BOAT = get("minecraft:jungle_boat");
@Nullable public static final ItemType JUNGLE_BUTTON = get("minecraft:jungle_button");
@Nullable public static final ItemType JUNGLE_CHEST_BOAT = get("minecraft:jungle_chest_boat");
@Nullable public static final ItemType JUNGLE_DOOR = get("minecraft:jungle_door");
@Nullable public static final ItemType JUNGLE_FENCE = get("minecraft:jungle_fence");
@Nullable public static final ItemType JUNGLE_FENCE_GATE = get("minecraft:jungle_fence_gate");
@ -640,6 +650,23 @@ public final class ItemTypes {
@Nullable public static final ItemType MAGMA_BLOCK = get("minecraft:magma_block");
@Nullable public static final ItemType MAGMA_CREAM = get("minecraft:magma_cream");
@Nullable public static final ItemType MAGMA_CUBE_SPAWN_EGG = get("minecraft:magma_cube_spawn_egg");
@Nullable public static final ItemType MANGROVE_BOAT = get("minecraft:mangrove_boat");
@Nullable public static final ItemType MANGROVE_BUTTON = get("minecraft:mangrove_button");
@Nullable public static final ItemType MANGROVE_CHEST_BOAT = get("minecraft:mangrove_chest_boat");
@Nullable public static final ItemType MANGROVE_DOOR = get("minecraft:mangrove_door");
@Nullable public static final ItemType MANGROVE_FENCE = get("minecraft:mangrove_fence");
@Nullable public static final ItemType MANGROVE_FENCE_GATE = get("minecraft:mangrove_fence_gate");
@Nullable public static final ItemType MANGROVE_LEAVES = get("minecraft:mangrove_leaves");
@Nullable public static final ItemType MANGROVE_LOG = get("minecraft:mangrove_log");
@Nullable public static final ItemType MANGROVE_PLANKS = get("minecraft:mangrove_planks");
@Nullable public static final ItemType MANGROVE_PRESSURE_PLATE = get("minecraft:mangrove_pressure_plate");
@Nullable public static final ItemType MANGROVE_PROPAGULE = get("minecraft:mangrove_propagule");
@Nullable public static final ItemType MANGROVE_ROOTS = get("minecraft:mangrove_roots");
@Nullable public static final ItemType MANGROVE_SIGN = get("minecraft:mangrove_sign");
@Nullable public static final ItemType MANGROVE_SLAB = get("minecraft:mangrove_slab");
@Nullable public static final ItemType MANGROVE_STAIRS = get("minecraft:mangrove_stairs");
@Nullable public static final ItemType MANGROVE_TRAPDOOR = get("minecraft:mangrove_trapdoor");
@Nullable public static final ItemType MANGROVE_WOOD = get("minecraft:mangrove_wood");
@Nullable public static final ItemType MAP = get("minecraft:map");
@Nullable public static final ItemType MEDIUM_AMETHYST_BUD = get("minecraft:medium_amethyst_bud");
@Nullable public static final ItemType MELON = get("minecraft:melon");
@ -659,17 +686,25 @@ public final class ItemTypes {
@Nullable public static final ItemType MOSSY_STONE_BRICK_STAIRS = get("minecraft:mossy_stone_brick_stairs");
@Nullable public static final ItemType MOSSY_STONE_BRICK_WALL = get("minecraft:mossy_stone_brick_wall");
@Nullable public static final ItemType MOSSY_STONE_BRICKS = get("minecraft:mossy_stone_bricks");
@Nullable public static final ItemType MUD = get("minecraft:mud");
@Nullable public static final ItemType MUD_BRICK_SLAB = get("minecraft:mud_brick_slab");
@Nullable public static final ItemType MUD_BRICK_STAIRS = get("minecraft:mud_brick_stairs");
@Nullable public static final ItemType MUD_BRICK_WALL = get("minecraft:mud_brick_wall");
@Nullable public static final ItemType MUD_BRICKS = get("minecraft:mud_bricks");
@Nullable public static final ItemType MUDDY_MANGROVE_ROOTS = get("minecraft:muddy_mangrove_roots");
@Nullable public static final ItemType MULE_SPAWN_EGG = get("minecraft:mule_spawn_egg");
@Nullable public static final ItemType MUSHROOM_STEM = get("minecraft:mushroom_stem");
@Nullable public static final ItemType MUSHROOM_STEW = get("minecraft:mushroom_stew");
@Nullable public static final ItemType MUSIC_DISC_11 = get("minecraft:music_disc_11");
@Nullable public static final ItemType MUSIC_DISC_13 = get("minecraft:music_disc_13");
@Nullable public static final ItemType MUSIC_DISC_5 = get("minecraft:music_disc_5");
@Nullable public static final ItemType MUSIC_DISC_BLOCKS = get("minecraft:music_disc_blocks");
@Nullable public static final ItemType MUSIC_DISC_CAT = get("minecraft:music_disc_cat");
@Nullable public static final ItemType MUSIC_DISC_CHIRP = get("minecraft:music_disc_chirp");
@Nullable public static final ItemType MUSIC_DISC_FAR = get("minecraft:music_disc_far");
@Nullable public static final ItemType MUSIC_DISC_MALL = get("minecraft:music_disc_mall");
@Nullable public static final ItemType MUSIC_DISC_MELLOHI = get("minecraft:music_disc_mellohi");
@Nullable public static final ItemType MUSIC_DISC_OTHERSIDE = get("minecraft:music_disc_otherside");
@Nullable public static final ItemType MUSIC_DISC_PIGSTEP = get("minecraft:music_disc_pigstep");
@Nullable public static final ItemType MUSIC_DISC_STAL = get("minecraft:music_disc_stal");
@Nullable public static final ItemType MUSIC_DISC_STRAD = get("minecraft:music_disc_strad");
@ -707,6 +742,7 @@ public final class ItemTypes {
@Nullable public static final ItemType NOTE_BLOCK = get("minecraft:note_block");
@Nullable public static final ItemType OAK_BOAT = get("minecraft:oak_boat");
@Nullable public static final ItemType OAK_BUTTON = get("minecraft:oak_button");
@Nullable public static final ItemType OAK_CHEST_BOAT = get("minecraft:oak_chest_boat");
@Nullable public static final ItemType OAK_DOOR = get("minecraft:oak_door");
@Nullable public static final ItemType OAK_FENCE = get("minecraft:oak_fence");
@Nullable public static final ItemType OAK_FENCE_GATE = get("minecraft:oak_fence_gate");
@ -723,6 +759,7 @@ public final class ItemTypes {
@Nullable public static final ItemType OBSERVER = get("minecraft:observer");
@Nullable public static final ItemType OBSIDIAN = get("minecraft:obsidian");
@Nullable public static final ItemType OCELOT_SPAWN_EGG = get("minecraft:ocelot_spawn_egg");
@Nullable public static final ItemType OCHRE_FROGLIGHT = get("minecraft:ochre_froglight");
@Nullable public static final ItemType ORANGE_BANNER = get("minecraft:orange_banner");
@Nullable public static final ItemType ORANGE_BED = get("minecraft:orange_bed");
@Nullable public static final ItemType ORANGE_CANDLE = get("minecraft:orange_candle");
@ -743,10 +780,12 @@ public final class ItemTypes {
@Nullable public static final ItemType OXIDIZED_CUT_COPPER_SLAB = get("minecraft:oxidized_cut_copper_slab");
@Nullable public static final ItemType OXIDIZED_CUT_COPPER_STAIRS = get("minecraft:oxidized_cut_copper_stairs");
@Nullable public static final ItemType PACKED_ICE = get("minecraft:packed_ice");
@Nullable public static final ItemType PACKED_MUD = get("minecraft:packed_mud");
@Nullable public static final ItemType PAINTING = get("minecraft:painting");
@Nullable public static final ItemType PANDA_SPAWN_EGG = get("minecraft:panda_spawn_egg");
@Nullable public static final ItemType PAPER = get("minecraft:paper");
@Nullable public static final ItemType PARROT_SPAWN_EGG = get("minecraft:parrot_spawn_egg");
@Nullable public static final ItemType PEARLESCENT_FROGLIGHT = get("minecraft:pearlescent_froglight");
@Nullable public static final ItemType PEONY = get("minecraft:peony");
@Nullable public static final ItemType PETRIFIED_OAK_SLAB = get("minecraft:petrified_oak_slab");
@Nullable public static final ItemType PHANTOM_MEMBRANE = get("minecraft:phantom_membrane");
@ -858,6 +897,7 @@ public final class ItemTypes {
@Nullable public static final ItemType RAW_GOLD_BLOCK = get("minecraft:raw_gold_block");
@Nullable public static final ItemType RAW_IRON = get("minecraft:raw_iron");
@Nullable public static final ItemType RAW_IRON_BLOCK = get("minecraft:raw_iron_block");
@Nullable public static final ItemType RECOVERY_COMPASS = get("minecraft:recovery_compass");
@Nullable public static final ItemType RED_BANNER = get("minecraft:red_banner");
@Nullable public static final ItemType RED_BED = get("minecraft:red_bed");
@Nullable public static final ItemType RED_CANDLE = get("minecraft:red_candle");
@ -888,6 +928,7 @@ public final class ItemTypes {
@Nullable public static final ItemType REDSTONE_LAMP = get("minecraft:redstone_lamp");
@Nullable public static final ItemType REDSTONE_ORE = get("minecraft:redstone_ore");
@Nullable public static final ItemType REDSTONE_TORCH = get("minecraft:redstone_torch");
@Nullable public static final ItemType REINFORCED_DEEPSLATE = get("minecraft:reinforced_deepslate");
@Nullable public static final ItemType REPEATER = get("minecraft:repeater");
@Nullable public static final ItemType REPEATING_COMMAND_BLOCK = get("minecraft:repeating_command_block");
@Nullable public static final ItemType RESPAWN_ANCHOR = get("minecraft:respawn_anchor");
@ -905,7 +946,11 @@ public final class ItemTypes {
@Nullable public static final ItemType SANDSTONE_STAIRS = get("minecraft:sandstone_stairs");
@Nullable public static final ItemType SANDSTONE_WALL = get("minecraft:sandstone_wall");
@Nullable public static final ItemType SCAFFOLDING = get("minecraft:scaffolding");
@Nullable public static final ItemType SCULK = get("minecraft:sculk");
@Nullable public static final ItemType SCULK_CATALYST = get("minecraft:sculk_catalyst");
@Nullable public static final ItemType SCULK_SENSOR = get("minecraft:sculk_sensor");
@Nullable public static final ItemType SCULK_SHRIEKER = get("minecraft:sculk_shrieker");
@Nullable public static final ItemType SCULK_VEIN = get("minecraft:sculk_vein");
@Nullable public static final ItemType SCUTE = get("minecraft:scute");
@Nullable public static final ItemType SEA_LANTERN = get("minecraft:sea_lantern");
@Nullable public static final ItemType SEA_PICKLE = get("minecraft:sea_pickle");
@ -959,6 +1004,7 @@ public final class ItemTypes {
@Nullable public static final ItemType SPORE_BLOSSOM = get("minecraft:spore_blossom");
@Nullable public static final ItemType SPRUCE_BOAT = get("minecraft:spruce_boat");
@Nullable public static final ItemType SPRUCE_BUTTON = get("minecraft:spruce_button");
@Nullable public static final ItemType SPRUCE_CHEST_BOAT = get("minecraft:spruce_chest_boat");
@Nullable public static final ItemType SPRUCE_DOOR = get("minecraft:spruce_door");
@Nullable public static final ItemType SPRUCE_FENCE = get("minecraft:spruce_fence");
@Nullable public static final ItemType SPRUCE_FENCE_GATE = get("minecraft:spruce_fence_gate");
@ -1004,6 +1050,8 @@ public final class ItemTypes {
@Nullable public static final ItemType STRIPPED_DARK_OAK_WOOD = get("minecraft:stripped_dark_oak_wood");
@Nullable public static final ItemType STRIPPED_JUNGLE_LOG = get("minecraft:stripped_jungle_log");
@Nullable public static final ItemType STRIPPED_JUNGLE_WOOD = get("minecraft:stripped_jungle_wood");
@Nullable public static final ItemType STRIPPED_MANGROVE_LOG = get("minecraft:stripped_mangrove_log");
@Nullable public static final ItemType STRIPPED_MANGROVE_WOOD = get("minecraft:stripped_mangrove_wood");
@Nullable public static final ItemType STRIPPED_OAK_LOG = get("minecraft:stripped_oak_log");
@Nullable public static final ItemType STRIPPED_OAK_WOOD = get("minecraft:stripped_oak_wood");
@Nullable public static final ItemType STRIPPED_SPRUCE_LOG = get("minecraft:stripped_spruce_log");
@ -1017,6 +1065,8 @@ public final class ItemTypes {
@Nullable public static final ItemType SUNFLOWER = get("minecraft:sunflower");
@Nullable public static final ItemType SUSPICIOUS_STEW = get("minecraft:suspicious_stew");
@Nullable public static final ItemType SWEET_BERRIES = get("minecraft:sweet_berries");
@Nullable public static final ItemType TADPOLE_BUCKET = get("minecraft:tadpole_bucket");
@Nullable public static final ItemType TADPOLE_SPAWN_EGG = get("minecraft:tadpole_spawn_egg");
@Nullable public static final ItemType TALL_GRASS = get("minecraft:tall_grass");
@Nullable public static final ItemType TARGET = get("minecraft:target");
@Nullable public static final ItemType TERRACOTTA = get("minecraft:terracotta");
@ -1041,11 +1091,13 @@ public final class ItemTypes {
@Nullable public static final ItemType TURTLE_HELMET = get("minecraft:turtle_helmet");
@Nullable public static final ItemType TURTLE_SPAWN_EGG = get("minecraft:turtle_spawn_egg");
@Nullable public static final ItemType TWISTING_VINES = get("minecraft:twisting_vines");
@Nullable public static final ItemType VERDANT_FROGLIGHT = get("minecraft:verdant_froglight");
@Nullable public static final ItemType VEX_SPAWN_EGG = get("minecraft:vex_spawn_egg");
@Nullable public static final ItemType VILLAGER_SPAWN_EGG = get("minecraft:villager_spawn_egg");
@Nullable public static final ItemType VINDICATOR_SPAWN_EGG = get("minecraft:vindicator_spawn_egg");
@Nullable public static final ItemType VINE = get("minecraft:vine");
@Nullable public static final ItemType WANDERING_TRADER_SPAWN_EGG = get("minecraft:wandering_trader_spawn_egg");
@Nullable public static final ItemType WARDEN_SPAWN_EGG = get("minecraft:warden_spawn_egg");
@Nullable public static final ItemType WARPED_BUTTON = get("minecraft:warped_button");
@Nullable public static final ItemType WARPED_DOOR = get("minecraft:warped_door");
@Nullable public static final ItemType WARPED_FENCE = get("minecraft:warped_fence");

View File

@ -23,13 +23,9 @@
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.extension.platform.Capability;
import com.sk89q.worldedit.internal.Constants;
import com.sk89q.worldedit.internal.util.LogManagerCompat;
import com.sk89q.worldedit.math.Vector3;
import com.sk89q.worldedit.util.gson.VectorAdapter;
import com.sk89q.worldedit.util.io.ResourceLoader;
import org.apache.logging.log4j.Logger;
import java.io.IOException;
@ -55,7 +51,6 @@ public final class BundledBlockData {
private static final Logger LOGGER = LogManagerCompat.getLogger();
private static BundledBlockData INSTANCE;
private final ResourceLoader resourceLoader;
private final Map<String, BlockEntry> idMap = new HashMap<>();
@ -63,8 +58,6 @@ public final class BundledBlockData {
* Create a new instance.
*/
private BundledBlockData() {
this.resourceLoader = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.CONFIGURATION).getResourceLoader();
try {
loadFromResource();
} catch (Throwable e) {
@ -81,23 +74,7 @@ private void loadFromResource() throws IOException {
GsonBuilder gsonBuilder = new GsonBuilder();
gsonBuilder.registerTypeAdapter(Vector3.class, new VectorAdapter());
Gson gson = gsonBuilder.create();
URL url = null;
final int dataVersion = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getDataVersion();
if (dataVersion >= Constants.DATA_VERSION_MC_1_17) {
url = resourceLoader.getResource(BundledBlockData.class, "blocks.117.json");
} else if (dataVersion >= Constants.DATA_VERSION_MC_1_16) {
url = resourceLoader.getResource(BundledBlockData.class, "blocks.116.json");
} else if (dataVersion >= Constants.DATA_VERSION_MC_1_15) {
url = resourceLoader.getResource(BundledBlockData.class, "blocks.115.json");
} else if (dataVersion >= Constants.DATA_VERSION_MC_1_14) {
url = resourceLoader.getResource(BundledBlockData.class, "blocks.114.json");
}
if (url == null) {
url = resourceLoader.getResource(BundledBlockData.class, "blocks.json");
}
if (url == null) {
throw new IOException("Could not find blocks.json");
}
URL url = BundledRegistries.loadRegistry("blocks");
LOGGER.debug("Using {} for bundled block data.", url);
String data = Resources.toString(url, Charset.defaultCharset());
List<BlockEntry> entries = gson.fromJson(data, new TypeToken<List<BlockEntry>>() {}.getType());

View File

@ -23,13 +23,9 @@
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.extension.platform.Capability;
import com.sk89q.worldedit.internal.Constants;
import com.sk89q.worldedit.internal.util.LogManagerCompat;
import com.sk89q.worldedit.math.Vector3;
import com.sk89q.worldedit.util.gson.VectorAdapter;
import com.sk89q.worldedit.util.io.ResourceLoader;
import org.apache.logging.log4j.Logger;
import java.io.IOException;
@ -55,7 +51,6 @@ public final class BundledItemData {
private static final Logger LOGGER = LogManagerCompat.getLogger();
private static BundledItemData INSTANCE;
private final ResourceLoader resourceLoader;
private final Map<String, ItemEntry> idMap = new HashMap<>();
@ -63,8 +58,6 @@ public final class BundledItemData {
* Create a new instance.
*/
private BundledItemData() {
this.resourceLoader = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.CONFIGURATION).getResourceLoader();
try {
loadFromResource();
} catch (Throwable e) {
@ -81,23 +74,7 @@ private void loadFromResource() throws IOException {
GsonBuilder gsonBuilder = new GsonBuilder();
gsonBuilder.registerTypeAdapter(Vector3.class, new VectorAdapter());
Gson gson = gsonBuilder.create();
URL url = null;
final int dataVersion = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING).getDataVersion();
if (dataVersion >= Constants.DATA_VERSION_MC_1_17) {
url = resourceLoader.getResource(BundledBlockData.class, "items.117.json");
} else if (dataVersion >= Constants.DATA_VERSION_MC_1_16) {
url = resourceLoader.getResource(BundledBlockData.class, "items.116.json");
} else if (dataVersion >= Constants.DATA_VERSION_MC_1_15) {
url = resourceLoader.getResource(BundledBlockData.class, "items.115.json");
} else if (dataVersion >= Constants.DATA_VERSION_MC_1_14) {
url = resourceLoader.getResource(BundledBlockData.class, "items.114.json");
}
if (url == null) {
url = resourceLoader.getResource(BundledBlockData.class, "items.json");
}
if (url == null) {
throw new IOException("Could not find items.json");
}
URL url = BundledRegistries.loadRegistry("items");
LOGGER.debug("Using {} for bundled item data.", url);
String data = Resources.toString(url, Charset.defaultCharset());
List<ItemEntry> entries = gson.fromJson(data, new TypeToken<List<ItemEntry>>() {}.getType());

View File

@ -19,6 +19,18 @@
package com.sk89q.worldedit.world.registry;
import com.google.common.collect.ImmutableRangeMap;
import com.google.common.collect.Range;
import com.google.common.collect.RangeMap;
import com.google.common.collect.TreeRangeMap;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.extension.platform.Capability;
import com.sk89q.worldedit.internal.Constants;
import com.sk89q.worldedit.util.io.ResourceLoader;
import java.io.IOException;
import java.net.URL;
/**
* An implementation of {@link Registries} that converts legacy numeric IDs and
* a contains a built-in block and item database.
@ -26,6 +38,36 @@
public class BundledRegistries implements Registries {
private static final BundledRegistries INSTANCE = new BundledRegistries();
private static final RangeMap<Integer, String> VERSION_MAP;
static {
TreeRangeMap<Integer, String> versionMap = TreeRangeMap.create();
versionMap.put(Range.atLeast(Constants.DATA_VERSION_MC_1_14), "114");
versionMap.put(Range.atLeast(Constants.DATA_VERSION_MC_1_15), "115");
versionMap.put(Range.atLeast(Constants.DATA_VERSION_MC_1_16), "116");
versionMap.put(Range.atLeast(Constants.DATA_VERSION_MC_1_17), "117");
// 1.18 did have one item change, but we didn't get it. It's fine.
versionMap.put(Range.atLeast(Constants.DATA_VERSION_MC_1_19), "119");
VERSION_MAP = ImmutableRangeMap.copyOf(versionMap);
}
static URL loadRegistry(String name) throws IOException {
ResourceLoader resourceLoader = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.CONFIGURATION)
.getResourceLoader();
int dataVersion = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.WORLD_EDITING)
.getDataVersion();
String version = VERSION_MAP.get(dataVersion);
URL url = resourceLoader.getResource(BundledRegistries.class, name + "." + version + ".json");
if (url == null) {
url = resourceLoader.getResource(BundledRegistries.class, name + ".json");
}
if (url == null) {
throw new IOException("Could not find " + name + ".json");
}
return url;
}
private final BundledBlockRegistry blockRegistry = new BundledBlockRegistry();
private final BundledItemRegistry itemRegistry = new BundledItemRegistry();
private final NullEntityRegistry entityRegistry = new NullEntityRegistry();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long