gáspár bence

Okay so make a stuctur that can only spawn in the plains biome make it out of the blocks you want. now make a hostile entity "Dragger" that only spawns in the structure it guards the chest that has the "Ancient Sword" in it now this ancient sword is stronger than the netherite sword it has a power when you crouch it drags an entity nearby to you. now the dragger can drag players to itself and is very strong its short black and purple eyes the ancient sword is an iron sword that is rusty

Kodari AI
KodariOct 29 at 1:09 pm 1
AncientDraggerRuins
Creates a rare plains-only structure containing a guarded chest with the Ancient Sword, a rusty iron blade stronger than netherite. The sword's crouch ability drags nearby entities toward the player. A hostile Dragger entity spawns exclusively in the structure, featuring short black-purple eyes and a powerful drag attack that pulls players to it.

The ruin is created by a plains-only function rather than natural world generation, which would require a structure template file. Dragger is represented by a small, dark cave spider; exact black-and-purple eyes would require a custom texture or model.

in aStand plains biome and run /function ancient:spawn_ruin to place the ruin; crouch while holding the Ancient Sword to pull nearby entities, including players, toward you.

Download the ZIP using the export button, then extract the ancient_ruin_datapack folder into world/datapacks/. Run /reload, use /datapack list to verify it loaded, and use /function ancient:spawn_ruin to test it.

Kodari can make mistakes. Review important code before using.
Files
ancient_ruin_datapack
Code
7 91
ancient_ruin_datapack/data/ancient/function/build_ruin.mcfunction
fill ~-4 ~-1 ~-4 ~4 ~-1 ~4 minecraft:deepslate_bricks
fill ~-4 ~ ~-4 ~4 ~3 ~4 minecraft:deepslate_bricks hollow
fill ~ ~ ~4 ~ ~1 ~4 minecraft:air
setblock ~ ~ ~-2 minecraft:chest[facing=south]
data merge block ~ ~ ~-2 {LootTable:"ancient:chest/ancient_cache"}
summon minecraft:cave_spider ~2 ~ ~-2 {CustomName:'{"text":"Dragger","color":"dark_purple","bold":true}',CustomNameVisible:1b,PersistenceRequired:1b,Tags:["ancient.guard"],Health:50.0f,attributes:[{id:"minecraft:max_health",base:50.0},{id:"minecraft:attack_damage",base:10.0},{id:"minecraft:movement_speed",base:0.3}]}