Everything Clings

Quick rating

Community listing page, reviews may not be monitored by the author.

Everything Clings

By SansrusOwner

No reviews yet

Everything within 40 blocks is pulled toward the nearest player

Mod Loaders
Minecraft
26.3 26.2

About

Description

Everything Clings

Every entity within 40 blocks of a player slides toward the nearest one: mobs, dropped items, arrows, minecarts, TNT, everything except other players.

How it works

  • Every tick the pack sets the horizontal velocity of each entity toward the nearest player.
  • It's real movement, not teleportation: entities collide with walls and keep falling and jumping normally, since only horizontal velocity is touched.
  • The pull speed is constant: 0.35 blocks per tick (7 blocks per second), regardless of distance.
  • Nothing is pulled while a player is within 2 blocks of it. Without this dead zone, mobs would keep ramming into the player and pushing them around.
  • Players in spectator mode don't attract anything.

Configuration

The speed is set in data/everything_clings/function/pull.mcfunction, in two lines:

execute store result entity @s Motion[0] double 0.00035 run scoreboard players get #x everything_clings.calc
execute store result entity @s Motion[2] double 0.00035 run scoreboard players get #z everything_clings.calc

The multiplier is the speed in blocks per tick divided by 1000: 0.00035 = 0.35, 0.00015 = 0.15. Change both lines.

The radius and the dead zone are set in data/everything_clings/function/tick.mcfunction: distance=..40 and distance=..2.

Run /reload after editing.

Limitations

  • Bows, crossbows, tridents, snowballs and ender pearls barely work: a projectile's nearest player is usually whoever threw it, so it turns back almost immediately.
  • Mobs' own AI still runs. Skeletons trying to keep their distance and fleeing animals fight against the pull.
  • The pack touches every entity near players every tick. Hundreds of dropped items in one place can cost noticeable server performance.