mirror of https://github.com/PaperMC/Paper.git
tag and map colors
This commit is contained in:
parent
46ebbaa434
commit
020e09968f
|
@ -0,0 +1,658 @@
|
|||
package org.bukkit;
|
||||
|
||||
import java.util.Set;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Represents a tag that may be defined by the server or a resource pack to
|
||||
* group like things together.
|
||||
*
|
||||
* Note that whilst all tags defined within this interface must be present in
|
||||
* implementations, their existence is not guaranteed across future versions.
|
||||
*
|
||||
* <p>Custom tags defined by Paper are not present (as constants) in this class.
|
||||
* To access them please refer to {@link com.destroystokyo.paper.MaterialTags}
|
||||
* and {@link io.papermc.paper.tag.EntityTags}.</p>
|
||||
*
|
||||
* @param <T> the type of things grouped by this tag
|
||||
*/
|
||||
public interface Tag<T extends Keyed> extends Keyed {
|
||||
|
||||
// Paper start - Generated/Tag
|
||||
// @GeneratedFrom 1.20.4
|
||||
String REGISTRY_BLOCKS = "blocks";
|
||||
|
||||
Tag<Material> ACACIA_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("acacia_logs"), Material.class);
|
||||
|
||||
Tag<Material> ALL_HANGING_SIGNS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("all_hanging_signs"), Material.class);
|
||||
|
||||
Tag<Material> ALL_SIGNS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("all_signs"), Material.class);
|
||||
|
||||
Tag<Material> ANCIENT_CITY_REPLACEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("ancient_city_replaceable"), Material.class);
|
||||
|
||||
Tag<Material> ANIMALS_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("animals_spawnable_on"), Material.class);
|
||||
|
||||
Tag<Material> ANVIL = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("anvil"), Material.class);
|
||||
|
||||
Tag<Material> AXOLOTLS_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("axolotls_spawnable_on"), Material.class);
|
||||
|
||||
Tag<Material> AZALEA_GROWS_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("azalea_grows_on"), Material.class);
|
||||
|
||||
Tag<Material> AZALEA_ROOT_REPLACEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("azalea_root_replaceable"), Material.class);
|
||||
|
||||
Tag<Material> BAMBOO_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("bamboo_blocks"), Material.class);
|
||||
|
||||
Tag<Material> BAMBOO_PLANTABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("bamboo_plantable_on"), Material.class);
|
||||
|
||||
Tag<Material> BANNERS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("banners"), Material.class);
|
||||
|
||||
Tag<Material> BASE_STONE_NETHER = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("base_stone_nether"), Material.class);
|
||||
|
||||
Tag<Material> BASE_STONE_OVERWORLD = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("base_stone_overworld"), Material.class);
|
||||
|
||||
Tag<Material> BEACON_BASE_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("beacon_base_blocks"), Material.class);
|
||||
|
||||
Tag<Material> BEDS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("beds"), Material.class);
|
||||
|
||||
Tag<Material> BEE_GROWABLES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("bee_growables"), Material.class);
|
||||
|
||||
Tag<Material> BEEHIVES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("beehives"), Material.class);
|
||||
|
||||
Tag<Material> BIG_DRIPLEAF_PLACEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("big_dripleaf_placeable"), Material.class);
|
||||
|
||||
Tag<Material> BIRCH_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("birch_logs"), Material.class);
|
||||
|
||||
Tag<Material> BUTTONS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("buttons"), Material.class);
|
||||
|
||||
Tag<Material> CAMEL_SAND_STEP_SOUND_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("camel_sand_step_sound_blocks"), Material.class);
|
||||
|
||||
Tag<Material> CAMPFIRES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("campfires"), Material.class);
|
||||
|
||||
Tag<Material> CANDLE_CAKES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("candle_cakes"), Material.class);
|
||||
|
||||
Tag<Material> CANDLES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("candles"), Material.class);
|
||||
|
||||
Tag<Material> CAULDRONS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("cauldrons"), Material.class);
|
||||
|
||||
Tag<Material> CAVE_VINES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("cave_vines"), Material.class);
|
||||
|
||||
Tag<Material> CEILING_HANGING_SIGNS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("ceiling_hanging_signs"), Material.class);
|
||||
|
||||
Tag<Material> CHERRY_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("cherry_logs"), Material.class);
|
||||
|
||||
Tag<Material> CLIMBABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("climbable"), Material.class);
|
||||
|
||||
Tag<Material> COAL_ORES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("coal_ores"), Material.class);
|
||||
|
||||
Tag<Material> COMBINATION_STEP_SOUND_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("combination_step_sound_blocks"), Material.class);
|
||||
|
||||
Tag<Material> COMPLETES_FIND_TREE_TUTORIAL = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("completes_find_tree_tutorial"), Material.class);
|
||||
|
||||
Tag<Material> CONCRETE_POWDER = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("concrete_powder"), Material.class);
|
||||
|
||||
Tag<Material> CONVERTABLE_TO_MUD = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("convertable_to_mud"), Material.class);
|
||||
|
||||
Tag<Material> COPPER_ORES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("copper_ores"), Material.class);
|
||||
|
||||
Tag<Material> CORAL_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("coral_blocks"), Material.class);
|
||||
|
||||
Tag<Material> CORAL_PLANTS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("coral_plants"), Material.class);
|
||||
|
||||
Tag<Material> CORALS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("corals"), Material.class);
|
||||
|
||||
Tag<Material> CRIMSON_STEMS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("crimson_stems"), Material.class);
|
||||
|
||||
Tag<Material> CROPS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("crops"), Material.class);
|
||||
|
||||
Tag<Material> CRYSTAL_SOUND_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("crystal_sound_blocks"), Material.class);
|
||||
|
||||
Tag<Material> DAMPENS_VIBRATIONS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("dampens_vibrations"), Material.class);
|
||||
|
||||
Tag<Material> DARK_OAK_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("dark_oak_logs"), Material.class);
|
||||
|
||||
Tag<Material> DEAD_BUSH_MAY_PLACE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("dead_bush_may_place_on"), Material.class);
|
||||
|
||||
Tag<Material> DEEPSLATE_ORE_REPLACEABLES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("deepslate_ore_replaceables"), Material.class);
|
||||
|
||||
Tag<Material> DIAMOND_ORES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("diamond_ores"), Material.class);
|
||||
|
||||
Tag<Material> DIRT = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("dirt"), Material.class);
|
||||
|
||||
Tag<Material> DOORS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("doors"), Material.class);
|
||||
|
||||
Tag<Material> DRAGON_IMMUNE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("dragon_immune"), Material.class);
|
||||
|
||||
Tag<Material> DRAGON_TRANSPARENT = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("dragon_transparent"), Material.class);
|
||||
|
||||
Tag<Material> DRIPSTONE_REPLACEABLE_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("dripstone_replaceable_blocks"), Material.class);
|
||||
|
||||
Tag<Material> EMERALD_ORES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("emerald_ores"), Material.class);
|
||||
|
||||
Tag<Material> ENCHANTMENT_POWER_PROVIDER = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("enchantment_power_provider"), Material.class);
|
||||
|
||||
Tag<Material> ENCHANTMENT_POWER_TRANSMITTER = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("enchantment_power_transmitter"), Material.class);
|
||||
|
||||
Tag<Material> ENDERMAN_HOLDABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("enderman_holdable"), Material.class);
|
||||
|
||||
Tag<Material> FALL_DAMAGE_RESETTING = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("fall_damage_resetting"), Material.class);
|
||||
|
||||
Tag<Material> FEATURES_CANNOT_REPLACE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("features_cannot_replace"), Material.class);
|
||||
|
||||
Tag<Material> FENCE_GATES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("fence_gates"), Material.class);
|
||||
|
||||
Tag<Material> FENCES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("fences"), Material.class);
|
||||
|
||||
Tag<Material> FIRE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("fire"), Material.class);
|
||||
|
||||
Tag<Material> FLOWER_POTS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("flower_pots"), Material.class);
|
||||
|
||||
Tag<Material> FLOWERS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("flowers"), Material.class);
|
||||
|
||||
Tag<Material> FOXES_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("foxes_spawnable_on"), Material.class);
|
||||
|
||||
Tag<Material> FROG_PREFER_JUMP_TO = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("frog_prefer_jump_to"), Material.class);
|
||||
|
||||
Tag<Material> FROGS_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("frogs_spawnable_on"), Material.class);
|
||||
|
||||
Tag<Material> GEODE_INVALID_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("geode_invalid_blocks"), Material.class);
|
||||
|
||||
Tag<Material> GOATS_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("goats_spawnable_on"), Material.class);
|
||||
|
||||
Tag<Material> GOLD_ORES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("gold_ores"), Material.class);
|
||||
|
||||
Tag<Material> GUARDED_BY_PIGLINS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("guarded_by_piglins"), Material.class);
|
||||
|
||||
Tag<Material> HOGLIN_REPELLENTS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("hoglin_repellents"), Material.class);
|
||||
|
||||
Tag<Material> ICE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("ice"), Material.class);
|
||||
|
||||
Tag<Material> IMPERMEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("impermeable"), Material.class);
|
||||
|
||||
Tag<Material> INFINIBURN_END = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("infiniburn_end"), Material.class);
|
||||
|
||||
Tag<Material> INFINIBURN_NETHER = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("infiniburn_nether"), Material.class);
|
||||
|
||||
Tag<Material> INFINIBURN_OVERWORLD = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("infiniburn_overworld"), Material.class);
|
||||
|
||||
Tag<Material> INSIDE_STEP_SOUND_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("inside_step_sound_blocks"), Material.class);
|
||||
|
||||
Tag<Material> INVALID_SPAWN_INSIDE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("invalid_spawn_inside"), Material.class);
|
||||
|
||||
Tag<Material> IRON_ORES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("iron_ores"), Material.class);
|
||||
|
||||
Tag<Material> JUNGLE_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("jungle_logs"), Material.class);
|
||||
|
||||
Tag<Material> LAPIS_ORES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("lapis_ores"), Material.class);
|
||||
|
||||
Tag<Material> LAVA_POOL_STONE_CANNOT_REPLACE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("lava_pool_stone_cannot_replace"), Material.class);
|
||||
|
||||
Tag<Material> LEAVES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("leaves"), Material.class);
|
||||
|
||||
Tag<Material> LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("logs"), Material.class);
|
||||
|
||||
Tag<Material> LOGS_THAT_BURN = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("logs_that_burn"), Material.class);
|
||||
|
||||
Tag<Material> LUSH_GROUND_REPLACEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("lush_ground_replaceable"), Material.class);
|
||||
|
||||
Tag<Material> MAINTAINS_FARMLAND = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("maintains_farmland"), Material.class);
|
||||
|
||||
Tag<Material> MANGROVE_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("mangrove_logs"), Material.class);
|
||||
|
||||
Tag<Material> MANGROVE_LOGS_CAN_GROW_THROUGH = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("mangrove_logs_can_grow_through"), Material.class);
|
||||
|
||||
Tag<Material> MANGROVE_ROOTS_CAN_GROW_THROUGH = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("mangrove_roots_can_grow_through"), Material.class);
|
||||
|
||||
Tag<Material> MINEABLE_AXE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("mineable/axe"), Material.class);
|
||||
|
||||
Tag<Material> MINEABLE_HOE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("mineable/hoe"), Material.class);
|
||||
|
||||
Tag<Material> MINEABLE_PICKAXE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("mineable/pickaxe"), Material.class);
|
||||
|
||||
Tag<Material> MINEABLE_SHOVEL = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("mineable/shovel"), Material.class);
|
||||
|
||||
Tag<Material> MOOSHROOMS_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("mooshrooms_spawnable_on"), Material.class);
|
||||
|
||||
Tag<Material> MOSS_REPLACEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("moss_replaceable"), Material.class);
|
||||
|
||||
Tag<Material> MUSHROOM_GROW_BLOCK = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("mushroom_grow_block"), Material.class);
|
||||
|
||||
Tag<Material> NEEDS_DIAMOND_TOOL = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("needs_diamond_tool"), Material.class);
|
||||
|
||||
Tag<Material> NEEDS_IRON_TOOL = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("needs_iron_tool"), Material.class);
|
||||
|
||||
Tag<Material> NEEDS_STONE_TOOL = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("needs_stone_tool"), Material.class);
|
||||
|
||||
Tag<Material> NETHER_CARVER_REPLACEABLES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("nether_carver_replaceables"), Material.class);
|
||||
|
||||
Tag<Material> NYLIUM = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("nylium"), Material.class);
|
||||
|
||||
Tag<Material> OAK_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("oak_logs"), Material.class);
|
||||
|
||||
Tag<Material> OCCLUDES_VIBRATION_SIGNALS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("occludes_vibration_signals"), Material.class);
|
||||
|
||||
Tag<Material> OVERWORLD_CARVER_REPLACEABLES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("overworld_carver_replaceables"), Material.class);
|
||||
|
||||
Tag<Material> OVERWORLD_NATURAL_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("overworld_natural_logs"), Material.class);
|
||||
|
||||
Tag<Material> PARROTS_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("parrots_spawnable_on"), Material.class);
|
||||
|
||||
Tag<Material> PIGLIN_REPELLENTS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("piglin_repellents"), Material.class);
|
||||
|
||||
Tag<Material> PLANKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("planks"), Material.class);
|
||||
|
||||
Tag<Material> POLAR_BEARS_SPAWNABLE_ON_ALTERNATE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("polar_bears_spawnable_on_alternate"), Material.class);
|
||||
|
||||
Tag<Material> PORTALS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("portals"), Material.class);
|
||||
|
||||
Tag<Material> PRESSURE_PLATES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("pressure_plates"), Material.class);
|
||||
|
||||
Tag<Material> PREVENT_MOB_SPAWNING_INSIDE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("prevent_mob_spawning_inside"), Material.class);
|
||||
|
||||
Tag<Material> RABBITS_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("rabbits_spawnable_on"), Material.class);
|
||||
|
||||
Tag<Material> RAILS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("rails"), Material.class);
|
||||
|
||||
Tag<Material> REDSTONE_ORES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("redstone_ores"), Material.class);
|
||||
|
||||
Tag<Material> REPLACEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("replaceable"), Material.class);
|
||||
|
||||
Tag<Material> REPLACEABLE_BY_TREES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("replaceable_by_trees"), Material.class);
|
||||
|
||||
Tag<Material> SAND = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("sand"), Material.class);
|
||||
|
||||
Tag<Material> SAPLINGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("saplings"), Material.class);
|
||||
|
||||
Tag<Material> SCULK_REPLACEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("sculk_replaceable"), Material.class);
|
||||
|
||||
Tag<Material> SCULK_REPLACEABLE_WORLD_GEN = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("sculk_replaceable_world_gen"), Material.class);
|
||||
|
||||
Tag<Material> SHULKER_BOXES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("shulker_boxes"), Material.class);
|
||||
|
||||
Tag<Material> SIGNS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("signs"), Material.class);
|
||||
|
||||
Tag<Material> SLABS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("slabs"), Material.class);
|
||||
|
||||
Tag<Material> SMALL_DRIPLEAF_PLACEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("small_dripleaf_placeable"), Material.class);
|
||||
|
||||
Tag<Material> SMALL_FLOWERS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("small_flowers"), Material.class);
|
||||
|
||||
Tag<Material> SMELTS_TO_GLASS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("smelts_to_glass"), Material.class);
|
||||
|
||||
Tag<Material> SNAPS_GOAT_HORN = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("snaps_goat_horn"), Material.class);
|
||||
|
||||
Tag<Material> SNIFFER_DIGGABLE_BLOCK = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("sniffer_diggable_block"), Material.class);
|
||||
|
||||
Tag<Material> SNIFFER_EGG_HATCH_BOOST = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("sniffer_egg_hatch_boost"), Material.class);
|
||||
|
||||
Tag<Material> SNOW = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("snow"), Material.class);
|
||||
|
||||
Tag<Material> SNOW_LAYER_CAN_SURVIVE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("snow_layer_can_survive_on"), Material.class);
|
||||
|
||||
Tag<Material> SNOW_LAYER_CANNOT_SURVIVE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("snow_layer_cannot_survive_on"), Material.class);
|
||||
|
||||
Tag<Material> SOUL_FIRE_BASE_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("soul_fire_base_blocks"), Material.class);
|
||||
|
||||
Tag<Material> SOUL_SPEED_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("soul_speed_blocks"), Material.class);
|
||||
|
||||
Tag<Material> SPRUCE_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("spruce_logs"), Material.class);
|
||||
|
||||
Tag<Material> STAIRS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("stairs"), Material.class);
|
||||
|
||||
Tag<Material> STANDING_SIGNS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("standing_signs"), Material.class);
|
||||
|
||||
Tag<Material> STONE_BRICKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("stone_bricks"), Material.class);
|
||||
|
||||
Tag<Material> STONE_BUTTONS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("stone_buttons"), Material.class);
|
||||
|
||||
Tag<Material> STONE_ORE_REPLACEABLES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("stone_ore_replaceables"), Material.class);
|
||||
|
||||
Tag<Material> STONE_PRESSURE_PLATES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("stone_pressure_plates"), Material.class);
|
||||
|
||||
Tag<Material> STRIDER_WARM_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("strider_warm_blocks"), Material.class);
|
||||
|
||||
Tag<Material> SWORD_EFFICIENT = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("sword_efficient"), Material.class);
|
||||
|
||||
Tag<Material> TALL_FLOWERS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("tall_flowers"), Material.class);
|
||||
|
||||
Tag<Material> TERRACOTTA = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("terracotta"), Material.class);
|
||||
|
||||
Tag<Material> TRAIL_RUINS_REPLACEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("trail_ruins_replaceable"), Material.class);
|
||||
|
||||
Tag<Material> TRAPDOORS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("trapdoors"), Material.class);
|
||||
|
||||
Tag<Material> UNDERWATER_BONEMEALS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("underwater_bonemeals"), Material.class);
|
||||
|
||||
Tag<Material> UNSTABLE_BOTTOM_CENTER = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("unstable_bottom_center"), Material.class);
|
||||
|
||||
Tag<Material> VALID_SPAWN = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("valid_spawn"), Material.class);
|
||||
|
||||
Tag<Material> VIBRATION_RESONATORS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("vibration_resonators"), Material.class);
|
||||
|
||||
Tag<Material> WALL_CORALS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wall_corals"), Material.class);
|
||||
|
||||
Tag<Material> WALL_HANGING_SIGNS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wall_hanging_signs"), Material.class);
|
||||
|
||||
Tag<Material> WALL_POST_OVERRIDE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wall_post_override"), Material.class);
|
||||
|
||||
Tag<Material> WALL_SIGNS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wall_signs"), Material.class);
|
||||
|
||||
Tag<Material> WALLS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("walls"), Material.class);
|
||||
|
||||
Tag<Material> WARPED_STEMS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("warped_stems"), Material.class);
|
||||
|
||||
Tag<Material> WART_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wart_blocks"), Material.class);
|
||||
|
||||
Tag<Material> WITHER_IMMUNE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wither_immune"), Material.class);
|
||||
|
||||
Tag<Material> WITHER_SUMMON_BASE_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wither_summon_base_blocks"), Material.class);
|
||||
|
||||
Tag<Material> WOLVES_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wolves_spawnable_on"), Material.class);
|
||||
|
||||
Tag<Material> WOODEN_BUTTONS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wooden_buttons"), Material.class);
|
||||
|
||||
Tag<Material> WOODEN_DOORS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wooden_doors"), Material.class);
|
||||
|
||||
Tag<Material> WOODEN_FENCES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wooden_fences"), Material.class);
|
||||
|
||||
Tag<Material> WOODEN_PRESSURE_PLATES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wooden_pressure_plates"), Material.class);
|
||||
|
||||
Tag<Material> WOODEN_SLABS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wooden_slabs"), Material.class);
|
||||
|
||||
Tag<Material> WOODEN_STAIRS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wooden_stairs"), Material.class);
|
||||
|
||||
Tag<Material> WOODEN_TRAPDOORS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wooden_trapdoors"), Material.class);
|
||||
|
||||
Tag<Material> WOOL = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wool"), Material.class);
|
||||
|
||||
Tag<Material> WOOL_CARPETS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wool_carpets"), Material.class);
|
||||
|
||||
String REGISTRY_ITEMS = "items";
|
||||
|
||||
Tag<Material> ITEMS_ACACIA_LOGS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("acacia_logs"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_ANVIL = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("anvil"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_ARROWS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("arrows"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_AXES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("axes"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_AXOLOTL_TEMPT_ITEMS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("axolotl_tempt_items"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_BAMBOO_BLOCKS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("bamboo_blocks"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_BANNERS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("banners"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_BEACON_PAYMENT_ITEMS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("beacon_payment_items"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_BEDS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("beds"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_BIRCH_LOGS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("birch_logs"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_BOATS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("boats"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_BOOKSHELF_BOOKS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("bookshelf_books"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_BREAKS_DECORATED_POTS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("breaks_decorated_pots"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_BUTTONS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("buttons"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_CANDLES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("candles"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_CHERRY_LOGS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("cherry_logs"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_CHEST_BOATS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("chest_boats"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_CLUSTER_MAX_HARVESTABLES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("cluster_max_harvestables"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_COAL_ORES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("coal_ores"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_COALS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("coals"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_COMPASSES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("compasses"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_COMPLETES_FIND_TREE_TUTORIAL = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("completes_find_tree_tutorial"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_COPPER_ORES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("copper_ores"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_CREEPER_DROP_MUSIC_DISCS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("creeper_drop_music_discs"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_CREEPER_IGNITERS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("creeper_igniters"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_CRIMSON_STEMS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("crimson_stems"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_DAMPENS_VIBRATIONS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("dampens_vibrations"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_DARK_OAK_LOGS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("dark_oak_logs"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_DECORATED_POT_INGREDIENTS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("decorated_pot_ingredients"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_DECORATED_POT_SHERDS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("decorated_pot_sherds"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_DIAMOND_ORES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("diamond_ores"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_DIRT = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("dirt"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_DOORS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("doors"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_EMERALD_ORES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("emerald_ores"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_FENCE_GATES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("fence_gates"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_FENCES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("fences"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_FISHES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("fishes"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_FLOWERS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("flowers"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_FOX_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("fox_food"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_FREEZE_IMMUNE_WEARABLES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("freeze_immune_wearables"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_GOLD_ORES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("gold_ores"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_HANGING_SIGNS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("hanging_signs"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_HOES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("hoes"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_IGNORED_BY_PIGLIN_BABIES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("ignored_by_piglin_babies"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_IRON_ORES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("iron_ores"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_JUNGLE_LOGS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("jungle_logs"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_LAPIS_ORES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("lapis_ores"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_LEAVES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("leaves"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_LECTERN_BOOKS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("lectern_books"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_LOGS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("logs"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_LOGS_THAT_BURN = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("logs_that_burn"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_MANGROVE_LOGS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("mangrove_logs"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_MUSIC_DISCS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("music_discs"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_NON_FLAMMABLE_WOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("non_flammable_wood"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_NOTEBLOCK_TOP_INSTRUMENTS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("noteblock_top_instruments"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_OAK_LOGS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("oak_logs"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_PICKAXES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("pickaxes"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_PIGLIN_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("piglin_food"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_PIGLIN_LOVED = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("piglin_loved"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_PIGLIN_REPELLENTS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("piglin_repellents"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_PLANKS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("planks"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_RAILS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("rails"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_REDSTONE_ORES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("redstone_ores"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_SAND = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("sand"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_SAPLINGS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("saplings"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_SHOVELS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("shovels"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_SIGNS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("signs"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_SLABS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("slabs"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_SMALL_FLOWERS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("small_flowers"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_SMELTS_TO_GLASS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("smelts_to_glass"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_SNIFFER_FOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("sniffer_food"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_SOUL_FIRE_BASE_BLOCKS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("soul_fire_base_blocks"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_SPRUCE_LOGS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("spruce_logs"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_STAIRS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("stairs"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_STONE_BRICKS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("stone_bricks"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_STONE_BUTTONS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("stone_buttons"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_STONE_CRAFTING_MATERIALS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("stone_crafting_materials"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_STONE_TOOL_MATERIALS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("stone_tool_materials"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_SWORDS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("swords"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_TALL_FLOWERS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("tall_flowers"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_TERRACOTTA = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("terracotta"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_TOOLS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("tools"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_TRAPDOORS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("trapdoors"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_TRIM_MATERIALS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("trim_materials"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_TRIM_TEMPLATES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("trim_templates"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_TRIMMABLE_ARMOR = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("trimmable_armor"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_VILLAGER_PLANTABLE_SEEDS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("villager_plantable_seeds"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_WALLS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("walls"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_WARPED_STEMS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("warped_stems"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_WART_BLOCKS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("wart_blocks"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_WOODEN_BUTTONS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("wooden_buttons"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_WOODEN_DOORS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("wooden_doors"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_WOODEN_FENCES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("wooden_fences"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_WOODEN_PRESSURE_PLATES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("wooden_pressure_plates"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_WOODEN_SLABS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("wooden_slabs"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_WOODEN_STAIRS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("wooden_stairs"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_WOODEN_TRAPDOORS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("wooden_trapdoors"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_WOOL = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("wool"), Material.class);
|
||||
|
||||
Tag<Material> ITEMS_WOOL_CARPETS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("wool_carpets"), Material.class);
|
||||
|
||||
String REGISTRY_FLUIDS = "fluids";
|
||||
|
||||
Tag<Fluid> FLUIDS_LAVA = Bukkit.getTag(REGISTRY_FLUIDS, NamespacedKey.minecraft("lava"), Fluid.class);
|
||||
|
||||
Tag<Fluid> FLUIDS_WATER = Bukkit.getTag(REGISTRY_FLUIDS, NamespacedKey.minecraft("water"), Fluid.class);
|
||||
|
||||
String REGISTRY_ENTITY_TYPES = "entity_types";
|
||||
|
||||
Tag<EntityType> ENTITY_TYPES_ARROWS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("arrows"), EntityType.class);
|
||||
|
||||
Tag<EntityType> ENTITY_TYPES_AXOLOTL_ALWAYS_HOSTILES = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("axolotl_always_hostiles"), EntityType.class);
|
||||
|
||||
Tag<EntityType> ENTITY_TYPES_AXOLOTL_HUNT_TARGETS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("axolotl_hunt_targets"), EntityType.class);
|
||||
|
||||
Tag<EntityType> ENTITY_TYPES_BEEHIVE_INHABITORS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("beehive_inhabitors"), EntityType.class);
|
||||
|
||||
Tag<EntityType> ENTITY_TYPES_CAN_BREATHE_UNDER_WATER = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_breathe_under_water"), EntityType.class);
|
||||
|
||||
@MinecraftExperimental("update 1.21")
|
||||
@org.jetbrains.annotations.ApiStatus.Experimental
|
||||
Tag<EntityType> ENTITY_TYPES_CAN_TURN_IN_BOATS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_turn_in_boats"), EntityType.class);
|
||||
|
||||
@MinecraftExperimental("update 1.21")
|
||||
@org.jetbrains.annotations.ApiStatus.Experimental
|
||||
Tag<EntityType> ENTITY_TYPES_DEFLECTS_ARROWS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("deflects_arrows"), EntityType.class);
|
||||
|
||||
@MinecraftExperimental("update 1.21")
|
||||
@org.jetbrains.annotations.ApiStatus.Experimental
|
||||
Tag<EntityType> ENTITY_TYPES_DEFLECTS_TRIDENTS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("deflects_tridents"), EntityType.class);
|
||||
|
||||
Tag<EntityType> ENTITY_TYPES_DISMOUNTS_UNDERWATER = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("dismounts_underwater"), EntityType.class);
|
||||
|
||||
Tag<EntityType> ENTITY_TYPES_FALL_DAMAGE_IMMUNE = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("fall_damage_immune"), EntityType.class);
|
||||
|
||||
Tag<EntityType> ENTITY_TYPES_FREEZE_HURTS_EXTRA_TYPES = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("freeze_hurts_extra_types"), EntityType.class);
|
||||
|
||||
Tag<EntityType> ENTITY_TYPES_FREEZE_IMMUNE_ENTITY_TYPES = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("freeze_immune_entity_types"), EntityType.class);
|
||||
|
||||
Tag<EntityType> ENTITY_TYPES_FROG_FOOD = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("frog_food"), EntityType.class);
|
||||
|
||||
Tag<EntityType> ENTITY_TYPES_IMPACT_PROJECTILES = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("impact_projectiles"), EntityType.class);
|
||||
|
||||
Tag<EntityType> ENTITY_TYPES_NON_CONTROLLING_RIDER = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("non_controlling_rider"), EntityType.class);
|
||||
|
||||
Tag<EntityType> ENTITY_TYPES_POWDER_SNOW_WALKABLE_MOBS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("powder_snow_walkable_mobs"), EntityType.class);
|
||||
|
||||
Tag<EntityType> ENTITY_TYPES_RAIDERS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("raiders"), EntityType.class);
|
||||
|
||||
Tag<EntityType> ENTITY_TYPES_SKELETONS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("skeletons"), EntityType.class);
|
||||
|
||||
Tag<EntityType> ENTITY_TYPES_UNDEAD = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("undead"), EntityType.class);
|
||||
|
||||
Tag<EntityType> ENTITY_TYPES_ZOMBIES = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("zombies"), EntityType.class);
|
||||
|
||||
String REGISTRY_GAME_EVENTS = "game_events";
|
||||
|
||||
Tag<GameEvent> GAME_EVENT_ALLAY_CAN_LISTEN = Bukkit.getTag(REGISTRY_GAME_EVENTS, NamespacedKey.minecraft("allay_can_listen"), GameEvent.class);
|
||||
|
||||
Tag<GameEvent> GAME_EVENT_IGNORE_VIBRATIONS_SNEAKING = Bukkit.getTag(REGISTRY_GAME_EVENTS, NamespacedKey.minecraft("ignore_vibrations_sneaking"), GameEvent.class);
|
||||
|
||||
Tag<GameEvent> GAME_EVENT_SHRIEKER_CAN_LISTEN = Bukkit.getTag(REGISTRY_GAME_EVENTS, NamespacedKey.minecraft("shrieker_can_listen"), GameEvent.class);
|
||||
|
||||
Tag<GameEvent> GAME_EVENT_VIBRATIONS = Bukkit.getTag(REGISTRY_GAME_EVENTS, NamespacedKey.minecraft("vibrations"), GameEvent.class);
|
||||
|
||||
Tag<GameEvent> GAME_EVENT_WARDEN_CAN_LISTEN = Bukkit.getTag(REGISTRY_GAME_EVENTS, NamespacedKey.minecraft("warden_can_listen"), GameEvent.class);
|
||||
// Paper end - Generated/Tag
|
||||
/**
|
||||
* @deprecated {@link #WOOL_CARPETS}.
|
||||
*/
|
||||
@Deprecated
|
||||
Tag<Material> CARPETS = WOOL_CARPETS;
|
||||
|
||||
/**
|
||||
* Returns whether or not this tag has an entry for the specified item.
|
||||
*
|
||||
* @param item to check
|
||||
* @return if it is tagged
|
||||
*/
|
||||
boolean isTagged(@NotNull T item);
|
||||
|
||||
/**
|
||||
* Gets an immutable set of all tagged items.
|
||||
*
|
||||
* @return set of tagged items
|
||||
*/
|
||||
@NotNull
|
||||
Set<T> getValues();
|
||||
|
||||
}
|
|
@ -0,0 +1,508 @@
|
|||
package org.bukkit.map;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import java.awt.Color;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Image;
|
||||
import java.awt.image.BufferedImage;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Represents the palette that map items use.
|
||||
* <p>
|
||||
* These fields are hee base color ranges. Each entry corresponds to four
|
||||
* colors of varying shades with values entry to entry + 3.
|
||||
*/
|
||||
public final class MapPalette {
|
||||
// Internal mechanisms
|
||||
private MapPalette() {}
|
||||
|
||||
@NotNull
|
||||
private static Color c(int r, int g, int b) {
|
||||
return new Color(r, g, b);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static Color c(int r, int g, int b, int a) {
|
||||
return new Color(r, g, b, a);
|
||||
}
|
||||
|
||||
private static double getDistance(@NotNull Color c1, @NotNull Color c2) {
|
||||
double rmean = (c1.getRed() + c2.getRed()) / 2.0;
|
||||
double r = c1.getRed() - c2.getRed();
|
||||
double g = c1.getGreen() - c2.getGreen();
|
||||
int b = c1.getBlue() - c2.getBlue();
|
||||
double weightR = 2 + rmean / 256.0;
|
||||
double weightG = 4.0;
|
||||
double weightB = 2 + (255 - rmean) / 256.0;
|
||||
return weightR * r * r + weightG * g * g + weightB * b * b;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
static final Color[] colors = {
|
||||
// Paper start - Generated/MapPalette#colors
|
||||
// @GeneratedFrom 1.20.4
|
||||
new Color(0, 0, 0),
|
||||
new Color(0, 0, 0),
|
||||
new Color(0, 0, 0),
|
||||
new Color(0, 0, 0),
|
||||
new Color(89, 125, 39),
|
||||
new Color(109, 153, 48),
|
||||
new Color(127, 178, 56),
|
||||
new Color(67, 94, 29),
|
||||
new Color(174, 164, 115),
|
||||
new Color(213, 201, 140),
|
||||
new Color(247, 233, 163),
|
||||
new Color(130, 123, 86),
|
||||
new Color(140, 140, 140),
|
||||
new Color(171, 171, 171),
|
||||
new Color(199, 199, 199),
|
||||
new Color(105, 105, 105),
|
||||
new Color(180, 0, 0),
|
||||
new Color(220, 0, 0),
|
||||
new Color(255, 0, 0),
|
||||
new Color(135, 0, 0),
|
||||
new Color(112, 112, 180),
|
||||
new Color(138, 138, 220),
|
||||
new Color(160, 160, 255),
|
||||
new Color(84, 84, 135),
|
||||
new Color(117, 117, 117),
|
||||
new Color(144, 144, 144),
|
||||
new Color(167, 167, 167),
|
||||
new Color(88, 88, 88),
|
||||
new Color(0, 87, 0),
|
||||
new Color(0, 106, 0),
|
||||
new Color(0, 124, 0),
|
||||
new Color(0, 65, 0),
|
||||
new Color(180, 180, 180),
|
||||
new Color(220, 220, 220),
|
||||
new Color(255, 255, 255),
|
||||
new Color(135, 135, 135),
|
||||
new Color(115, 118, 129),
|
||||
new Color(141, 144, 158),
|
||||
new Color(164, 168, 184),
|
||||
new Color(86, 88, 97),
|
||||
new Color(106, 76, 54),
|
||||
new Color(130, 94, 66),
|
||||
new Color(151, 109, 77),
|
||||
new Color(79, 57, 40),
|
||||
new Color(79, 79, 79),
|
||||
new Color(96, 96, 96),
|
||||
new Color(112, 112, 112),
|
||||
new Color(59, 59, 59),
|
||||
new Color(45, 45, 180),
|
||||
new Color(55, 55, 220),
|
||||
new Color(64, 64, 255),
|
||||
new Color(33, 33, 135),
|
||||
new Color(100, 84, 50),
|
||||
new Color(123, 102, 62),
|
||||
new Color(143, 119, 72),
|
||||
new Color(75, 63, 38),
|
||||
new Color(180, 177, 172),
|
||||
new Color(220, 217, 211),
|
||||
new Color(255, 252, 245),
|
||||
new Color(135, 133, 129),
|
||||
new Color(152, 89, 36),
|
||||
new Color(186, 109, 44),
|
||||
new Color(216, 127, 51),
|
||||
new Color(114, 67, 27),
|
||||
new Color(125, 53, 152),
|
||||
new Color(153, 65, 186),
|
||||
new Color(178, 76, 216),
|
||||
new Color(94, 40, 114),
|
||||
new Color(72, 108, 152),
|
||||
new Color(88, 132, 186),
|
||||
new Color(102, 153, 216),
|
||||
new Color(54, 81, 114),
|
||||
new Color(161, 161, 36),
|
||||
new Color(197, 197, 44),
|
||||
new Color(229, 229, 51),
|
||||
new Color(121, 121, 27),
|
||||
new Color(89, 144, 17),
|
||||
new Color(109, 176, 21),
|
||||
new Color(127, 204, 25),
|
||||
new Color(67, 108, 13),
|
||||
new Color(170, 89, 116),
|
||||
new Color(208, 109, 142),
|
||||
new Color(242, 127, 165),
|
||||
new Color(128, 67, 87),
|
||||
new Color(53, 53, 53),
|
||||
new Color(65, 65, 65),
|
||||
new Color(76, 76, 76),
|
||||
new Color(40, 40, 40),
|
||||
new Color(108, 108, 108),
|
||||
new Color(132, 132, 132),
|
||||
new Color(153, 153, 153),
|
||||
new Color(81, 81, 81),
|
||||
new Color(53, 89, 108),
|
||||
new Color(65, 109, 132),
|
||||
new Color(76, 127, 153),
|
||||
new Color(40, 67, 81),
|
||||
new Color(89, 44, 125),
|
||||
new Color(109, 54, 153),
|
||||
new Color(127, 63, 178),
|
||||
new Color(67, 33, 94),
|
||||
new Color(36, 53, 125),
|
||||
new Color(44, 65, 153),
|
||||
new Color(51, 76, 178),
|
||||
new Color(27, 40, 94),
|
||||
new Color(72, 53, 36),
|
||||
new Color(88, 65, 44),
|
||||
new Color(102, 76, 51),
|
||||
new Color(54, 40, 27),
|
||||
new Color(72, 89, 36),
|
||||
new Color(88, 109, 44),
|
||||
new Color(102, 127, 51),
|
||||
new Color(54, 67, 27),
|
||||
new Color(108, 36, 36),
|
||||
new Color(132, 44, 44),
|
||||
new Color(153, 51, 51),
|
||||
new Color(81, 27, 27),
|
||||
new Color(17, 17, 17),
|
||||
new Color(21, 21, 21),
|
||||
new Color(25, 25, 25),
|
||||
new Color(13, 13, 13),
|
||||
new Color(176, 168, 54),
|
||||
new Color(215, 205, 66),
|
||||
new Color(250, 238, 77),
|
||||
new Color(132, 126, 40),
|
||||
new Color(64, 154, 150),
|
||||
new Color(79, 188, 183),
|
||||
new Color(92, 219, 213),
|
||||
new Color(48, 115, 112),
|
||||
new Color(52, 90, 180),
|
||||
new Color(63, 110, 220),
|
||||
new Color(74, 128, 255),
|
||||
new Color(39, 67, 135),
|
||||
new Color(0, 153, 40),
|
||||
new Color(0, 187, 50),
|
||||
new Color(0, 217, 58),
|
||||
new Color(0, 114, 30),
|
||||
new Color(91, 60, 34),
|
||||
new Color(111, 74, 42),
|
||||
new Color(129, 86, 49),
|
||||
new Color(68, 45, 25),
|
||||
new Color(79, 1, 0),
|
||||
new Color(96, 1, 0),
|
||||
new Color(112, 2, 0),
|
||||
new Color(59, 1, 0),
|
||||
new Color(147, 124, 113),
|
||||
new Color(180, 152, 138),
|
||||
new Color(209, 177, 161),
|
||||
new Color(110, 93, 85),
|
||||
new Color(112, 57, 25),
|
||||
new Color(137, 70, 31),
|
||||
new Color(159, 82, 36),
|
||||
new Color(84, 43, 19),
|
||||
new Color(105, 61, 76),
|
||||
new Color(128, 75, 93),
|
||||
new Color(149, 87, 108),
|
||||
new Color(78, 46, 57),
|
||||
new Color(79, 76, 97),
|
||||
new Color(96, 93, 119),
|
||||
new Color(112, 108, 138),
|
||||
new Color(59, 57, 73),
|
||||
new Color(131, 93, 25),
|
||||
new Color(160, 114, 31),
|
||||
new Color(186, 133, 36),
|
||||
new Color(98, 70, 19),
|
||||
new Color(72, 82, 37),
|
||||
new Color(88, 100, 45),
|
||||
new Color(103, 117, 53),
|
||||
new Color(54, 61, 28),
|
||||
new Color(112, 54, 55),
|
||||
new Color(138, 66, 67),
|
||||
new Color(160, 77, 78),
|
||||
new Color(84, 40, 41),
|
||||
new Color(40, 28, 24),
|
||||
new Color(49, 35, 30),
|
||||
new Color(57, 41, 35),
|
||||
new Color(30, 21, 18),
|
||||
new Color(95, 75, 69),
|
||||
new Color(116, 92, 84),
|
||||
new Color(135, 107, 98),
|
||||
new Color(71, 56, 51),
|
||||
new Color(61, 64, 64),
|
||||
new Color(75, 79, 79),
|
||||
new Color(87, 92, 92),
|
||||
new Color(46, 48, 48),
|
||||
new Color(86, 51, 62),
|
||||
new Color(105, 62, 75),
|
||||
new Color(122, 73, 88),
|
||||
new Color(64, 38, 46),
|
||||
new Color(53, 43, 64),
|
||||
new Color(65, 53, 79),
|
||||
new Color(76, 62, 92),
|
||||
new Color(40, 32, 48),
|
||||
new Color(53, 35, 24),
|
||||
new Color(65, 43, 30),
|
||||
new Color(76, 50, 35),
|
||||
new Color(40, 26, 18),
|
||||
new Color(53, 57, 29),
|
||||
new Color(65, 70, 36),
|
||||
new Color(76, 82, 42),
|
||||
new Color(40, 43, 22),
|
||||
new Color(100, 42, 32),
|
||||
new Color(122, 51, 39),
|
||||
new Color(142, 60, 46),
|
||||
new Color(75, 31, 24),
|
||||
new Color(26, 15, 11),
|
||||
new Color(31, 18, 13),
|
||||
new Color(37, 22, 16),
|
||||
new Color(19, 11, 8),
|
||||
new Color(133, 33, 34),
|
||||
new Color(163, 41, 42),
|
||||
new Color(189, 48, 49),
|
||||
new Color(100, 25, 25),
|
||||
new Color(104, 44, 68),
|
||||
new Color(127, 54, 83),
|
||||
new Color(148, 63, 97),
|
||||
new Color(78, 33, 51),
|
||||
new Color(64, 17, 20),
|
||||
new Color(79, 21, 25),
|
||||
new Color(92, 25, 29),
|
||||
new Color(48, 13, 15),
|
||||
new Color(15, 88, 94),
|
||||
new Color(18, 108, 115),
|
||||
new Color(22, 126, 134),
|
||||
new Color(11, 66, 70),
|
||||
new Color(40, 100, 98),
|
||||
new Color(50, 122, 120),
|
||||
new Color(58, 142, 140),
|
||||
new Color(30, 75, 74),
|
||||
new Color(60, 31, 43),
|
||||
new Color(74, 37, 53),
|
||||
new Color(86, 44, 62),
|
||||
new Color(45, 23, 32),
|
||||
new Color(14, 127, 93),
|
||||
new Color(17, 155, 114),
|
||||
new Color(20, 180, 133),
|
||||
new Color(10, 95, 70),
|
||||
new Color(70, 70, 70),
|
||||
new Color(86, 86, 86),
|
||||
new Color(100, 100, 100),
|
||||
new Color(52, 52, 52),
|
||||
new Color(152, 123, 103),
|
||||
new Color(186, 150, 126),
|
||||
new Color(216, 175, 147),
|
||||
new Color(114, 92, 77),
|
||||
new Color(89, 117, 105),
|
||||
new Color(109, 144, 129),
|
||||
new Color(127, 167, 150),
|
||||
new Color(67, 88, 79),
|
||||
// Paper end - Generated/MapPalette#colors
|
||||
};
|
||||
|
||||
// Interface
|
||||
/**
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public static final byte TRANSPARENT = 0;
|
||||
/**
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public static final byte LIGHT_GREEN = 4;
|
||||
/**
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public static final byte LIGHT_BROWN = 8;
|
||||
/**
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public static final byte GRAY_1 = 12;
|
||||
/**
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public static final byte RED = 16;
|
||||
/**
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public static final byte PALE_BLUE = 20;
|
||||
/**
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public static final byte GRAY_2 = 24;
|
||||
/**
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public static final byte DARK_GREEN = 28;
|
||||
/**
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public static final byte WHITE = 32;
|
||||
/**
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public static final byte LIGHT_GRAY = 36;
|
||||
/**
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public static final byte BROWN = 40;
|
||||
/**
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public static final byte DARK_GRAY = 44;
|
||||
/**
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public static final byte BLUE = 48;
|
||||
/**
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public static final byte DARK_BROWN = 52;
|
||||
|
||||
/**
|
||||
* Resize an image to 128x128.
|
||||
*
|
||||
* @param image The image to resize.
|
||||
* @return The resized image.
|
||||
*/
|
||||
@NotNull
|
||||
public static BufferedImage resizeImage(@Nullable Image image) {
|
||||
BufferedImage result = new BufferedImage(128, 128, BufferedImage.TYPE_INT_ARGB);
|
||||
Graphics2D graphics = result.createGraphics();
|
||||
graphics.drawImage(image, 0, 0, 128, 128, null);
|
||||
graphics.dispose();
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an Image to a byte[] using the palette.
|
||||
*
|
||||
* @param image The image to convert.
|
||||
* @return A byte[] containing the pixels of the image.
|
||||
* @deprecated use color-related methods
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "1.20.2") // Paper
|
||||
@NotNull
|
||||
public static byte[] imageToBytes(@NotNull Image image) {
|
||||
BufferedImage temp = new BufferedImage(image.getWidth(null), image.getHeight(null), BufferedImage.TYPE_INT_ARGB);
|
||||
Graphics2D graphics = temp.createGraphics();
|
||||
graphics.drawImage(image, 0, 0, null);
|
||||
graphics.dispose();
|
||||
|
||||
int[] pixels = new int[temp.getWidth() * temp.getHeight()];
|
||||
temp.getRGB(0, 0, temp.getWidth(), temp.getHeight(), pixels, 0, temp.getWidth());
|
||||
|
||||
byte[] result = new byte[temp.getWidth() * temp.getHeight()];
|
||||
for (int i = 0; i < pixels.length; i++) {
|
||||
result[i] = matchColor(new Color(pixels[i], true));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the index of the closest matching color in the palette to the given
|
||||
* color.
|
||||
*
|
||||
* @param r The red component of the color.
|
||||
* @param b The blue component of the color.
|
||||
* @param g The green component of the color.
|
||||
* @return The index in the palette.
|
||||
* @deprecated use color-related methods
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "1.20.2") // Paper
|
||||
public static byte matchColor(int r, int g, int b) {
|
||||
return matchColor(new Color(r, g, b));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the index of the closest matching color in the palette to the given
|
||||
* color.
|
||||
*
|
||||
* @param color The Color to match.
|
||||
* @return The index in the palette.
|
||||
* @deprecated use color-related methods
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "1.20.2") // Paper
|
||||
public static byte matchColor(@NotNull Color color) {
|
||||
if (color.getAlpha() < 128) return 0;
|
||||
|
||||
if (mapColorCache != null && mapColorCache.isCached()) {
|
||||
return mapColorCache.matchColor(color);
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
double best = -1;
|
||||
|
||||
for (int i = 4; i < colors.length; i++) {
|
||||
double distance = getDistance(color, colors[i]);
|
||||
if (distance < best || best == -1) {
|
||||
best = distance;
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
|
||||
// Minecraft has 143 colors, some of which have negative byte representations
|
||||
return (byte) (index < 128 ? index : -129 + (index - 127));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of the given color in the palette.
|
||||
*
|
||||
* @param index The index in the palette.
|
||||
* @return The Color of the palette entry.
|
||||
* @deprecated use color directly
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "1.20.2") // Paper
|
||||
@NotNull
|
||||
public static Color getColor(byte index) {
|
||||
// Minecraft has 143 colors, some of which have negative byte representations
|
||||
return colors[index >= 0 ? index : index + 256];
|
||||
}
|
||||
|
||||
private static MapColorCache mapColorCache;
|
||||
|
||||
/**
|
||||
* Sets the given MapColorCache.
|
||||
*
|
||||
* @param mapColorCache The map color cache to set
|
||||
*/
|
||||
public static void setMapColorCache(@NotNull MapColorCache mapColorCache) {
|
||||
Preconditions.checkState(MapPalette.mapColorCache == null, "Map color cache already set");
|
||||
|
||||
MapPalette.mapColorCache = mapColorCache;
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds cached information for matching map colors of a given RBG color.
|
||||
*/
|
||||
public interface MapColorCache {
|
||||
|
||||
/**
|
||||
* Returns true if the MapColorCache has values cached, if not it will
|
||||
* return false.
|
||||
* A case where it might return false is when the cache is not build jet.
|
||||
*
|
||||
* @return true if this MapColorCache has values cached otherwise false
|
||||
*/
|
||||
boolean isCached();
|
||||
|
||||
/**
|
||||
* Get the cached index of the closest matching color in the palette to the given
|
||||
* color.
|
||||
*
|
||||
* @param color The Color to match.
|
||||
* @return The index in the palette.
|
||||
* @throws IllegalStateException if {@link #isCached()} returns false
|
||||
* @apiNote Internal Use Only
|
||||
*/
|
||||
@org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
byte matchColor(@NotNull Color color);
|
||||
}
|
||||
}
|
|
@ -2,7 +2,9 @@ package io.papermc.generator;
|
|||
|
||||
import io.papermc.generator.rewriter.SourceRewriter;
|
||||
import io.papermc.generator.rewriter.types.EnumRegistryRewriter;
|
||||
import io.papermc.generator.rewriter.types.MapPaletteRewriter;
|
||||
import io.papermc.generator.rewriter.types.RegistryFieldRewriter;
|
||||
import io.papermc.generator.rewriter.types.TagRewriter;
|
||||
import io.papermc.generator.utils.ExperimentalSounds;
|
||||
import io.papermc.generator.types.registry.GeneratedKeyType;
|
||||
import io.papermc.generator.types.SourceGenerator;
|
||||
|
@ -17,6 +19,7 @@ import org.bukkit.Fluid;
|
|||
import org.bukkit.GameEvent;
|
||||
import org.bukkit.MusicInstrument;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.Tag;
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.damage.DamageType;
|
||||
|
@ -30,6 +33,7 @@ import org.bukkit.generator.structure.StructureType;
|
|||
import org.bukkit.inventory.meta.trim.TrimMaterial;
|
||||
import org.bukkit.inventory.meta.trim.TrimPattern;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
import org.bukkit.map.MapPalette;
|
||||
import org.bukkit.potion.PotionType;
|
||||
|
||||
public interface Generators {
|
||||
|
@ -82,6 +86,8 @@ public interface Generators {
|
|||
new RegistryFieldRewriter<>(TrimPattern.class, Registries.TRIM_PATTERN, "TrimPattern", null),
|
||||
new RegistryFieldRewriter<>(TrimMaterial.class, Registries.TRIM_MATERIAL, "TrimMaterial", null),
|
||||
new RegistryFieldRewriter<>(DamageType.class, Registries.DAMAGE_TYPE, "DamageType", "getDamageType"),
|
||||
new TagRewriter(Tag.class, "Tag"),
|
||||
new MapPaletteRewriter(MapPalette.class, "MapPalette#colors"),
|
||||
};
|
||||
|
||||
private static <T, A> SourceGenerator simpleKey(final String className, final Class<A> apiType, final ResourceKey<? extends Registry<T>> registryKey, final RegistryKey<A> apiRegistryKey, final boolean publicCreateKeyMethod) {
|
||||
|
|
|
@ -36,10 +36,14 @@ public class SearchReplaceRewriter implements SourceRewriter {
|
|||
// only when equalsSize = true
|
||||
protected void replaceLine(SearchMetadata metadata, StringBuilder builder) {}
|
||||
|
||||
protected void checkFileState() {}
|
||||
|
||||
private boolean framed;
|
||||
|
||||
@Override
|
||||
public void writeToFile(Path parent) throws IOException {
|
||||
this.checkFileState();
|
||||
|
||||
String indent = Formatting.incrementalIndent(INDENT_UNIT, this.rewriteClass);
|
||||
String startPattern = String.format("// %s - Generated/%s", PAPER_START_FORMAT, this.pattern);
|
||||
String endPattern = String.format("// %s - Generated/%s", PAPER_END_FORMAT, this.pattern);
|
||||
|
|
|
@ -17,6 +17,8 @@ import java.util.List;
|
|||
import java.util.Set;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static io.papermc.generator.utils.Formatting.quoted;
|
||||
|
||||
public class EnumRegistryRewriter<T, A extends Enum<A>> extends SearchReplaceRewriter {
|
||||
|
||||
private final net.minecraft.core.Registry<T> registry;
|
||||
|
@ -50,7 +52,7 @@ public class EnumRegistryRewriter<T, A extends Enum<A>> extends SearchReplaceRew
|
|||
|
||||
builder.append(metadata.indent()).append(fieldName);
|
||||
if (this.keyedParam) {
|
||||
builder.append("(\"%s\")".formatted(pathKey));
|
||||
builder.append("(%s)".formatted(quoted(pathKey)));
|
||||
}
|
||||
if (reachEnd && i == size - 1) {
|
||||
builder.append(';');
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
package io.papermc.generator.rewriter.types;
|
||||
|
||||
import io.papermc.generator.rewriter.SearchMetadata;
|
||||
import io.papermc.generator.rewriter.SearchReplaceRewriter;
|
||||
import net.minecraft.world.level.material.MapColor;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
public class MapPaletteRewriter extends SearchReplaceRewriter {
|
||||
|
||||
public MapPaletteRewriter(final Class<?> rewriteClass, final String pattern) {
|
||||
super(rewriteClass, pattern, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void insert(final SearchMetadata metadata, final StringBuilder builder) {
|
||||
for (final MapColor mapColor : MapColor.MATERIAL_COLORS) {
|
||||
if (mapColor == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (final MapColor.Brightness brightness : MapColor.Brightness.values()) {
|
||||
builder.append(metadata.indent());
|
||||
Color color = new Color(mapColor.calculateRGBColor(brightness), true);
|
||||
if (color.getAlpha() != 0xff) {
|
||||
builder.append("new %s(%d, %d, %d, %d),".formatted(color.getClass().getSimpleName(), color.getBlue(), color.getGreen(), color.getRed(), color.getAlpha()));
|
||||
} else {
|
||||
builder.append("new %s(%d, %d, %d),".formatted(color.getClass().getSimpleName(), color.getBlue(), color.getGreen(), color.getRed())); // int is encoded as blue << 16 | green << 8 | red (BGR and not RGB)
|
||||
}
|
||||
builder.append('\n');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -24,6 +24,8 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static io.papermc.generator.utils.Formatting.quoted;
|
||||
|
||||
public class RegistryFieldRewriter<T, A> extends SearchReplaceRewriter {
|
||||
|
||||
private static final Map<Class<?>, String> REGISTRY_FIELD_NAMES;
|
||||
|
@ -57,6 +59,19 @@ public class RegistryFieldRewriter<T, A> extends SearchReplaceRewriter {
|
|||
this.fetchMethod = fetchMethod;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void checkFileState() {
|
||||
if (this.fetchMethod == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
this.rewriteClass.getDeclaredMethod(this.fetchMethod, String.class);
|
||||
} catch (NoSuchMethodException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void insert(final SearchMetadata metadata, final StringBuilder builder) {
|
||||
List<Holder.Reference<T>> references = this.registry.holders().sorted(Formatting.alphabeticKeyOrder(reference -> reference.key().location().getPath())).toList();
|
||||
|
@ -80,9 +95,9 @@ public class RegistryFieldRewriter<T, A> extends SearchReplaceRewriter {
|
|||
builder.append(this.rewriteClass.getSimpleName()).append(' ').append(fieldName);
|
||||
builder.append(" = ");
|
||||
if (this.fetchMethod == null) {
|
||||
builder.append("%s.%s.get(%s.minecraft(\"%s\"))".formatted(org.bukkit.Registry.class.getSimpleName(), REGISTRY_FIELD_NAMES.get(this.rewriteClass), NamespacedKey.class.getSimpleName(), pathKey));
|
||||
builder.append("%s.%s.get(%s.minecraft(%s))".formatted(org.bukkit.Registry.class.getSimpleName(), REGISTRY_FIELD_NAMES.get(this.rewriteClass), NamespacedKey.class.getSimpleName(), quoted(pathKey)));
|
||||
} else {
|
||||
builder.append("%s(\"%s\")".formatted(this.fetchMethod, pathKey)); // todo search with reflection or smth?
|
||||
builder.append("%s(%s)".formatted(this.fetchMethod, quoted(pathKey)));
|
||||
}
|
||||
builder.append(';');
|
||||
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
package io.papermc.generator.rewriter.types;
|
||||
|
||||
import io.papermc.generator.Main;
|
||||
import io.papermc.generator.rewriter.SearchMetadata;
|
||||
import io.papermc.generator.rewriter.SearchReplaceRewriter;
|
||||
import io.papermc.generator.rewriter.utils.Annotations;
|
||||
import io.papermc.generator.utils.Formatting;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import io.papermc.generator.utils.TagRegistry;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.tags.TagKey;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Fluid;
|
||||
import org.bukkit.GameEvent;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
import static io.papermc.generator.utils.Formatting.quoted;
|
||||
import static io.papermc.generator.utils.TagRegistry.registry;
|
||||
|
||||
public class TagRewriter extends SearchReplaceRewriter {
|
||||
|
||||
private static final List<TagRegistry> TAG_REGISTRIES = List.of(
|
||||
registry("blocks", Material.class, Registries.BLOCK),
|
||||
registry("items", Material.class, Registries.ITEM),
|
||||
registry("fluids", Fluid.class, Registries.FLUID),
|
||||
registry("entity_types", EntityType.class, Registries.ENTITY_TYPE),
|
||||
registry("game_events", GameEvent.class, Registries.GAME_EVENT)
|
||||
);
|
||||
|
||||
|
||||
public TagRewriter(final Class<?> rewriteClass, final String pattern) {
|
||||
super(rewriteClass, pattern, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void insert(final SearchMetadata metadata, final StringBuilder builder) {
|
||||
for (int i = 0, len = TAG_REGISTRIES.size(); i < len; i++) {
|
||||
final TagRegistry tagRegistry = TAG_REGISTRIES.get(i);
|
||||
|
||||
final ResourceKey<? extends Registry<?>> registryKey = tagRegistry.registryKey();
|
||||
final Registry<?> registry = Main.REGISTRY_ACCESS.registryOrThrow(registryKey);
|
||||
final Collection<String> experimentalTags = Main.EXPERIMENTAL_TAGS.perRegistry().get(registryKey);
|
||||
|
||||
final String fieldPrefix = Formatting.formatTagFieldPrefix(tagRegistry.name(), registryKey);
|
||||
final String registryFieldName = "REGISTRY_" + tagRegistry.name().toUpperCase(Locale.ENGLISH);
|
||||
|
||||
// registry name field
|
||||
builder.append(metadata.indent());
|
||||
builder.append("%s %s = %s;".formatted(String.class.getSimpleName(), registryFieldName, quoted(tagRegistry.name())));
|
||||
|
||||
builder.append('\n');
|
||||
builder.append('\n');
|
||||
|
||||
List<? extends TagKey<?>> tagKeys = registry.getTagNames().sorted(Formatting.alphabeticKeyOrder(tagKey -> tagKey.location().getPath())).toList();
|
||||
Iterator<? extends TagKey<?>> keyIterator = tagKeys.iterator();
|
||||
|
||||
while (keyIterator.hasNext()) {
|
||||
TagKey<?> tagKey = keyIterator.next();
|
||||
final String keyPath = tagKey.location().getPath();
|
||||
final String fieldName = fieldPrefix + Formatting.formatKeyAsField(keyPath);
|
||||
|
||||
// tag field
|
||||
if (experimentalTags.contains(keyPath)) {
|
||||
Annotations.experimentalAnnotations(builder, metadata, Formatting.formatFeatureFlagName(Main.EXPERIMENTAL_TAGS.perFeatureFlag().get(tagKey)));
|
||||
}
|
||||
|
||||
builder.append(metadata.indent());
|
||||
builder.append("%s<%s>".formatted(this.rewriteClass.getSimpleName(), tagRegistry.apiType().getSimpleName())).append(' ').append(fieldName);
|
||||
builder.append(" = ");
|
||||
builder.append("%s.getTag(%s, %s.minecraft(%s), %s.class)".formatted(Bukkit.class.getSimpleName(), registryFieldName, NamespacedKey.class.getSimpleName(), quoted(keyPath), tagRegistry.apiType().getSimpleName()));
|
||||
builder.append(';');
|
||||
|
||||
builder.append('\n');
|
||||
if (keyIterator.hasNext()) {
|
||||
builder.append('\n');
|
||||
}
|
||||
}
|
||||
|
||||
if (i != len - 1) {
|
||||
builder.append('\n'); // extra line before the registry field
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,6 +7,8 @@ import org.bukkit.MinecraftExperimental;
|
|||
import org.jetbrains.annotations.ApiStatus;
|
||||
import java.lang.annotation.Annotation;
|
||||
|
||||
import static io.papermc.generator.utils.Formatting.quoted;
|
||||
|
||||
public final class Annotations {
|
||||
|
||||
public static String annotation(Class<? extends Annotation> clazz, ImportCollector collector) {
|
||||
|
@ -38,7 +40,7 @@ public final class Annotations {
|
|||
}
|
||||
|
||||
public static void experimentalAnnotations(final StringBuilder builder, final SearchMetadata metadata, final String value) {
|
||||
builder.append(metadata.indent()).append(annotation(MinecraftExperimental.class, metadata.importCollector(), '"' + value + '"')).append('\n');
|
||||
builder.append(metadata.indent()).append(annotation(MinecraftExperimental.class, metadata.importCollector(), quoted(value))).append('\n');
|
||||
builder.append(metadata.indent()).append(annotation(ApiStatus.Experimental.class, metadata.importCollector())).append('\n');
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ import io.papermc.generator.types.SimpleGenerator;
|
|||
import io.papermc.generator.utils.Annotations;
|
||||
import io.papermc.generator.utils.Formatting;
|
||||
import io.papermc.generator.utils.Javadocs;
|
||||
import io.papermc.generator.utils.TagRegistry;
|
||||
import io.papermc.paper.tag.EntityTags;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
@ -37,6 +38,7 @@ import static com.squareup.javapoet.TypeSpec.interfaceBuilder;
|
|||
import static io.papermc.generator.utils.Annotations.NOT_NULL;
|
||||
import static io.papermc.generator.utils.Annotations.NULLABLE;
|
||||
import static io.papermc.generator.utils.Annotations.experimentalAnnotations;
|
||||
import static io.papermc.generator.utils.TagRegistry.registry;
|
||||
import static javax.lang.model.element.Modifier.ABSTRACT;
|
||||
import static javax.lang.model.element.Modifier.FINAL;
|
||||
import static javax.lang.model.element.Modifier.PUBLIC;
|
||||
|
@ -74,12 +76,6 @@ public class TagGenerator extends SimpleGenerator {
|
|||
|
||||
private static final String REGISTRY_FIELD_JAVADOC = "Key for the built-in $L registry.";
|
||||
|
||||
public record TagRegistry(String name, Class<?> apiType, ResourceKey<? extends Registry<?>> registryKey) {}
|
||||
|
||||
private static TagRegistry registry(final String name, final Class<?> apiType, final ResourceKey<? extends Registry<?>> registryKey) {
|
||||
return new TagRegistry(name, apiType, registryKey);
|
||||
}
|
||||
|
||||
private static final List<TagRegistry> TAG_REGISTRIES = List.of(
|
||||
registry("blocks", Material.class, Registries.BLOCK),
|
||||
registry("items", Material.class, Registries.ITEM),
|
||||
|
|
|
@ -90,6 +90,10 @@ public final class Formatting {
|
|||
return name;
|
||||
}
|
||||
|
||||
public static String quoted(String value) {
|
||||
return String.format("\"%s\"", value);
|
||||
}
|
||||
|
||||
public static Comparator<String> ALPHABETIC_KEY_ORDER = alphabeticKeyOrder(path -> path);
|
||||
|
||||
public static <T> Comparator<T> alphabeticKeyOrder(Function<T, String> mapper) {
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
package io.papermc.generator.utils;
|
||||
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
|
||||
public record TagRegistry(String name, Class<?> apiType, ResourceKey<? extends Registry<?>> registryKey) {
|
||||
|
||||
public static TagRegistry registry(final String name, final Class<?> apiType, final ResourceKey<? extends Registry<?>> registryKey) {
|
||||
return new TagRegistry(name, apiType, registryKey);
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
public net/minecraft/server/WorldLoader loadAndReplaceLayer(Lnet/minecraft/server/packs/resources/ResourceManager;Lnet/minecraft/core/LayeredRegistryAccess;Lnet/minecraft/server/RegistryLayer;Ljava/util/List;)Lnet/minecraft/core/LayeredRegistryAccess;
|
||||
public net/minecraft/world/level/material/MapColor MATERIAL_COLORS
|
||||
|
||||
# for auto-marking experimental stuff
|
||||
public net/minecraft/core/RegistrySetBuilder entries
|
||||
|
|
|
@ -44,6 +44,43 @@ index bb1b6bc9349af6dec369420035e860921da52589..98bdf175bea2f559655ccb96ceb90066
|
|||
|
||||
private final NamespacedKey key;
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Tag.java b/src/main/java/org/bukkit/Tag.java
|
||||
index 1137a21afa0283fa3d391415e98171e3c160aa1f..97d39786e5026dafd35ee285d2b8cc2928346fce 100644
|
||||
--- a/src/main/java/org/bukkit/Tag.java
|
||||
+++ b/src/main/java/org/bukkit/Tag.java
|
||||
@@ -19,6 +19,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
*/
|
||||
public interface Tag<T extends Keyed> extends Keyed {
|
||||
|
||||
+ // Paper start - Generated/Tag
|
||||
/**
|
||||
* Key for the built in block registry.
|
||||
*/
|
||||
@@ -53,11 +54,6 @@ public interface Tag<T extends Keyed> extends Keyed {
|
||||
* Vanilla block tag representing all colors of carpet.
|
||||
*/
|
||||
Tag<Material> WOOL_CARPETS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wool_carpets"), Material.class);
|
||||
- /**
|
||||
- * @deprecated {@link #WOOL_CARPETS}.
|
||||
- */
|
||||
- @Deprecated
|
||||
- Tag<Material> CARPETS = WOOL_CARPETS;
|
||||
/**
|
||||
* Vanilla block tag representing all wooden doors.
|
||||
*/
|
||||
@@ -1006,6 +1002,12 @@ public interface Tag<T extends Keyed> extends Keyed {
|
||||
*/
|
||||
Tag<GameEvent> GAME_EVENT_ALLAY_CAN_LISTEN = Bukkit.getTag(REGISTRY_GAME_EVENTS, NamespacedKey.minecraft("allay_can_listen"), GameEvent.class);
|
||||
// Paper end
|
||||
+ // Paper end - Generated/Tag
|
||||
+ /**
|
||||
+ * @deprecated {@link #WOOL_CARPETS}.
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ Tag<Material> CARPETS = WOOL_CARPETS;
|
||||
|
||||
/**
|
||||
* Returns whether or not this tag has an entry for the specified item.
|
||||
diff --git a/src/main/java/org/bukkit/attribute/Attribute.java b/src/main/java/org/bukkit/attribute/Attribute.java
|
||||
index 37f93b7e9f722e76631c3e7d3e770526ee0c3926..ee18e01cf5407ee1c6bd2626431bd283d0db56b2 100644
|
||||
--- a/src/main/java/org/bukkit/attribute/Attribute.java
|
||||
|
@ -244,6 +281,26 @@ index e29fc42ae2b9c555db63d10d20552748e28ba60e..ae7f73f391b514266371021e4171fde6
|
|||
// Paper start
|
||||
/**
|
||||
* @deprecated use {@link Registry#getKey(Keyed)} and {@link Registry#TRIM_PATTERN}. TrimPatterns
|
||||
diff --git a/src/main/java/org/bukkit/map/MapPalette.java b/src/main/java/org/bukkit/map/MapPalette.java
|
||||
index c80faa079eca1564847070f0338fc98024639829..825b6c7b4e6b24f8d49da7b44f37e8a5ddc2e2c1 100644
|
||||
--- a/src/main/java/org/bukkit/map/MapPalette.java
|
||||
+++ b/src/main/java/org/bukkit/map/MapPalette.java
|
||||
@@ -41,6 +41,7 @@ public final class MapPalette {
|
||||
|
||||
@NotNull
|
||||
static final Color[] colors = {
|
||||
+ // Paper start - Generated/MapPalette#colors
|
||||
c(0, 0, 0, 0), c(0, 0, 0, 0), c(0, 0, 0, 0), c(0, 0, 0, 0),
|
||||
c(89, 125, 39), c(109, 153, 48), c(127, 178, 56), c(67, 94, 29),
|
||||
c(174, 164, 115), c(213, 201, 140), c(247, 233, 163), c(130, 123, 86),
|
||||
@@ -103,6 +104,7 @@ public final class MapPalette {
|
||||
c(70, 70, 70), c(86, 86, 86), c(100, 100, 100), c(52, 52, 52),
|
||||
c(152, 123, 103), c(186, 150, 126), c(216, 175, 147), c(114, 92, 77),
|
||||
c(89, 117, 105), c(109, 144, 129), c(127, 167, 150), c(67, 88, 79)
|
||||
+ // Paper end - Generated/MapPalette#colors
|
||||
};
|
||||
|
||||
// Interface
|
||||
diff --git a/src/main/java/org/bukkit/potion/PotionType.java b/src/main/java/org/bukkit/potion/PotionType.java
|
||||
index 70456f08668733a9a2840be6b08b078ad63e6825..13e1db8778adea4591dbb85870ff366fd565aa9e 100644
|
||||
--- a/src/main/java/org/bukkit/potion/PotionType.java
|
||||
|
|
Loading…
Reference in New Issue