9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-26 10:29:20 +00:00

Merge pull request #293 from Halogly/dev

添加自定义物品右键的判断逻辑
This commit is contained in:
XiaoMoMi
2025-07-26 16:30:42 +08:00
committed by GitHub
7 changed files with 327 additions and 17 deletions

View File

@@ -41,7 +41,25 @@ public final class BlockKeys {
public static final Key COMMAND_BLOCK = Key.of("minecraft:command_block");
public static final Key CHAIN_COMMAND_BLOCK = Key.of("minecraft:chain_command_block");
public static final Key REPEATING_COMMAND_BLOCK = Key.of("minecraft:repeating_command_block");
public static final Key JIGSAW = Key.of("minecraft:jigsaw");
public static final Key STRUCTURE_BLOCK = Key.of("minecraft:structure_block");
public static final Key TEST_INSTANCE_BLOCK = Key.of("minecraft:test_instance_block");
public static final Key TEST_BLOCK = Key.of("minecraft:test_block");
public static final Key LIGHT = Key.of("minecraft:light");
public static final Key DECORATED_POT = Key.of("minecraft:decorated_pot");
public static final Key FLOWER_POT = Key.of("minecraft:flower_pot");
public static final Key CHISELED_BOOKSHELF = Key.of("minecraft:chiseled_bookshelf");
public static final Key REDSTONE_ORE = Key.of("minecraft:redstone_ore");
public static final Key DEEPSLATE_REDSTONE_ORE = Key.of("minecraft:deepslate_redstone_ore");
public static final Key BEE_NEST = Key.of("minecraft:bee_nest");
public static final Key BEEHIVE = Key.of("minecraft:beehive");
public static final Key POWDER_SNOW = Key.of("minecraft:powder_snow");
public static final Key COMPOSTER = Key.of("minecraft:composter");
public static final Key CAULDRON = Key.of("minecraft:cauldron");
public static final Key WATER_CAULDRON = Key.of("minecraft:water_cauldron");
public static final Key LAVA_CAULDRON = Key.of("minecraft:lava_cauldron");
public static final Key RESPAWN_ANCHOR = Key.of("minecraft:respawn_anchor");
public static final Key LODESTONE = Key.of("minecraft:lodestone");
public static final Key CAKE = Key.of("minecraft:cake");
public static final Key CANDLE_CAKE = Key.of("minecraft:candle_cake");
@@ -158,6 +176,8 @@ public final class BlockKeys {
public static final Key WAXED_OXIDIZED_COPPER_TRAPDOOR = Key.of("minecraft:waxed_oxidized_copper_trapdoor");
public static final Key WAXED_WEATHERED_COPPER_TRAPDOOR = Key.of("minecraft:waxed_weathered_copper_trapdoor");
public static final Key OAK_FENCE_GATE = Key.of("minecraft:oak_fence_gate");
public static final Key SPRUCE_FENCE_GATE = Key.of("minecraft:spruce_fence_gate");
public static final Key BIRCH_FENCE_GATE = Key.of("minecraft:birch_fence_gate");

View File

@@ -0,0 +1,81 @@
package net.momirealms.craftengine.core.entity;
import net.momirealms.craftengine.core.util.Key;
public class EntityTypeKeys {
private EntityTypeKeys() {}
public static final Key BEE = Key.of("minecraft:BEE");
public static final Key FOX = Key.of("minecraft:FOX");
public static final Key FROG = Key.of("minecraft:FROG");
public static final Key PANDA = Key.of("minecraft:PANDA");
public static final Key SHEEP = Key.of("minecraft:SHEEP");
public static final Key BOGGED = Key.of("minecraft:BOGGED");
public static final Key SNOW_GOLEM = Key.of("minecraft:SNOW_GOLEM");
public static final Key HOGLIN = Key.of("minecraft:HOGLIN");
public static final Key OCELOT = Key.of("minecraft:OCELOT");
public static final Key RABBIT = Key.of("minecraft:RABBIT");
public static final Key TURTLE = Key.of("minecraft:TURTLE");
public static final Key AXOLOTL = Key.of("minecraft:AXOLOTL");
public static final Key CHICKEN = Key.of("minecraft:CHICKEN");
public static final Key SNIFFER = Key.of("minecraft:SNIFFER");
public static final Key ARMADILLO = Key.of("minecraft:ARMADILLO");
public static final Key COD = Key.of("minecraft:COD");
public static final Key SALMON = Key.of("minecraft:SALMON");
public static final Key TROPICAL_FISH = Key.of("minecraft:TROPICAL_FISH");
public static final Key PUFFERFISH = Key.of("minecraft:PUFFERFISH");
public static final Key TADPOLE = Key.of("minecraft:TADPOLE");
public static final Key COW = Key.of("minecraft:COW");
public static final Key MOOSHROOM = Key.of("minecraft:MOOSHROOM");
public static final Key GOAT = Key.of("minecraft:GOAT");
public static final Key PIG = Key.of("minecraft:PIG");
public static final Key STRIDER = Key.of("minecraft:STRIDER");
public static final Key WOLF = Key.of("minecraft:WOLF");
public static final Key CAT = Key.of("minecraft:CAT");
public static final Key PARROT = Key.of("minecraft:PARROT");
public static final Key ACACIA_BOAT = Key.of("minecraft:ACACIA_BOAT");
public static final Key BAMBOO_BOAT = Key.of("minecraft:BAMBOO_BOAT");
public static final Key BIRCH_BOAT = Key.of("minecraft:BIRCH_BOAT");
public static final Key CHERRY_BOAT = Key.of("minecraft:CHERRY_BOAT");
public static final Key DARK_OAK_BOAT = Key.of("minecraft:DARK_OAK_BOAT");
public static final Key JUNGLE_BOAT = Key.of("minecraft:JUNGLE_BOAT");
public static final Key MANGROVE_BOAT = Key.of("minecraft:MANGROVE_BOAT");
public static final Key OAK_BOAT = Key.of("minecraft:OAK_BOAT");
public static final Key SPRUCE_BOAT = Key.of("minecraft:SPRUCE_BOAT");
public static final Key MINECART = Key.of("minecraft:MINECART");
public static final Key HAPPY_GHAST = Key.of("minecraft:HAPPY_GHAST");
public static final Key PIGLIN = Key.of("minecraft:PIGLIN");
public static final Key CREEPER = Key.of("minecraft:CREEPER");
public static final Key ALLAY = Key.of("minecraft:ALLAY");
public static final Key HORSE = Key.of("minecraft:HORSE");
public static final Key ZOMBIE_HORSE = Key.of("minecraft:ZOMBIE_HORSE");
public static final Key SKELETON_HORSE = Key.of("minecraft:SKELETON_HORSE");
public static final Key DONKEY = Key.of("minecraft:DONKEY");
public static final Key MULE = Key.of("minecraft:MULE");
public static final Key VILLAGER = Key.of("minecraft:VILLAGER");
public static final Key WANDERING_TRADER = Key.of("minecraft:WANDERING_TRADER");
public static final Key LLAMA = Key.of("minecraft:LLAMA");
public static final Key TRADER_LLAMA = Key.of("minecraft:TRADER_LLAMA");
public static final Key CAMEL = Key.of("minecraft:CAMEL");
public static final Key ITEM_FRAME = Key.of("minecraft:ITEM_FRAME");
public static final Key GLOW_ITEM_FRAME = Key.of("minecraft:GLOW_ITEM_FRAME");
public static final Key INTERACTION = Key.of("minecraft:INTERACTION");
public static final Key ACACIA_CHEST_BOAT = Key.of("minecraft:ACACIA_CHEST_BOAT");
public static final Key BAMBOO_CHEST_BOAT = Key.of("minecraft:BAMBOO_CHEST_BOAT");
public static final Key BIRCH_CHEST_BOAT = Key.of("minecraft:BIRCH_CHEST_BOAT");
public static final Key CHERRY_CHEST_BOAT = Key.of("minecraft:CHERRY_CHEST_BOAT");
public static final Key DARK_OAK_CHEST_BOAT = Key.of("minecraft:DARK_OAK_CHEST_BOAT");
public static final Key JUNGLE_CHEST_BOAT = Key.of("minecraft:JUNGLE_CHEST_BOAT");
public static final Key MANGROVE_CHEST_BOAT = Key.of("minecraft:MANGROVE_CHEST_BOAT");
public static final Key OAK_CHEST_BOAT = Key.of("minecraft:OAK_CHEST_BOAT");
public static final Key SPRUCE_CHEST_BOAT = Key.of("minecraft:SPRUCE_CHEST_BOAT");
public static final Key CHEST_MINECART = Key.of("minecraft:CHEST_MINECART");
public static final Key FURNACE_MINECART = Key.of("minecraft:FURNACE_MINECART");
public static final Key HOPPER_MINECART = Key.of("minecraft:HOPPER_MINECART");
public static final Key COMMAND_BLOCK_MINECART = Key.of("minecraft:COMMAND_BLOCK_MINECART");
//1.20.5
public static final Key MINECART_CHEST = Key.of("minecraft:MINECART_CHEST");
public static final Key MINECART_FURNACE = Key.of("minecraft:MINECART_FURNACE");
public static final Key MINECART_HOPPER = Key.of("minecraft:MINECART_HOPPER");
public static final Key MINECART_COMMAND = Key.of("minecraft:MINECART_COMMAND");
}

View File

@@ -26,6 +26,7 @@ public class ItemKeys {
public static final Key TROPICAL_FISH_BUCKET = Key.of("minecraft:tropical_fish_bucket");
public static final Key PUFFERFISH_BUCKET = Key.of("minecraft:pufferfish_bucket");
public static final Key AXOLOTL_BUCKET = Key.of("minecraft:axolotl_bucket");
public static final Key LAVA_BUCKET = Key.of("minecraft:lava_bucket");
public static final Key BUCKET = Key.of("minecraft:bucket");
public static final Key BONE_MEAL = Key.of("minecraft:bone_meal");
public static final Key ENCHANTED_BOOK = Key.of("minecraft:enchanted_book");
@@ -33,6 +34,14 @@ public class ItemKeys {
public static final Key BARRIER = Key.of("minecraft:barrier");
public static final Key CACTUS = Key.of("minecraft:cactus");
public static final Key REDSTONE = Key.of("minecraft:redstone");
public static final Key GOLD_INGOT = Key.of("minecraft:gold_ingot");
public static final Key SHEARS = Key.of("minecraft:shears");
public static final Key BRUSH = Key.of("minecraft:brush");
public static final Key BOWL = Key.of("minecraft:bowl");
public static final Key COMPASS = Key.of("minecraft:compass");
public static final Key GLASS_BOTTLE = Key.of("minecraft:glass_bottle");
public static final Key LIGHT = Key.of("minecraft:light");
public static final Key GLOWSTONE = Key.of("minecraft:glowstone");
public static final Key[] AXES = new Key[] {
WOODEN_AXE, STONE_AXE, IRON_AXE, GOLDEN_AXE, DIAMOND_AXE, NETHERITE_AXE