Add combat job with safe target filtering

This commit is contained in:
Tanner committed 2026-11-17 22:37:12 +00:00
1 parent 2ecaa9a30a
commit 1b9f973db3
12 files changed
+486 -7

No files matched your search

+4
View File
@@ -45,6 +45,10 @@ BED_IDS = get_set(BEDS)
SHOVEL_IDS = get_set(SHOVELS)
AXE_IDS = get_set(AXES)
FOOD_IDS = get_set(FOOD)
SWORD_IDS = {
item['protocol_id'] for name, item in ITEMS.items()
if name.endswith('_sword')
}
SAPLING_IDS = get_set(SAPLINGS)
LOG_IDS = get_set(LOGS)
_LOG_FAMILY_ITEM_IDS = {}
+29
View File
@@ -46,3 +46,32 @@ EVIL_IDS = {
}
MOB_NAMES = {entity['protocol_id']: name.removeprefix('minecraft:')
for name, entity in MOBS.items()}
# Entity registry entries that are not living mobs and cannot be valid melee
# targets (projectiles can otherwise remain in the entity map after launch).
_BOAT_TYPES = (
'acacia', 'bamboo', 'birch', 'cherry', 'dark_oak', 'jungle',
'mangrove', 'oak', 'pale_oak', 'poplar', 'spruce',
)
NON_MOB_ENTITY_NAMES = {
*(name + suffix for name in _BOAT_TYPES
for suffix in ('_boat', '_chest_boat')),
'bamboo_raft', 'bamboo_chest_raft',
'area_effect_cloud', 'armor_stand', 'arrow', 'block_display',
'breeze_wind_charge', 'chest_minecart', 'command_block_minecart',
'dragon_fireball', 'egg', 'end_crystal', 'ender_pearl', 'evoker_fangs',
'experience_bottle', 'experience_orb', 'eye_of_ender', 'falling_block',
'fireball', 'firework_rocket', 'fishing_bobber', 'furnace_minecart',
'glow_item_frame', 'hopper_minecart', 'interaction', 'item',
'item_display', 'item_frame', 'leash_knot', 'lightning_bolt',
'lingering_potion', 'llama_spit', 'mannequin', 'marker', 'minecart',
'ominous_item_spawner', 'painting', 'player', 'shulker_bullet',
'small_fireball', 'snowball', 'spawner_minecart', 'spectral_arrow',
'splash_potion', 'text_display', 'tnt', 'tnt_minecart', 'trident',
'wind_charge', 'wither_skull',
}
NON_MOB_ENTITY_IDS = {
MOBS['minecraft:' + name]['protocol_id']
for name in NON_MOB_ENTITY_NAMES
if 'minecraft:' + name in MOBS
}