top of page

/centerEntity

This is a simple command that lets you center an entity on the block they are currently standing on moving them exactly to the middle of it.

/centerEntity <targets> <x|y>

Syntax:

Target <Entity>

This selector lets you call both players and entities.

This is the target that this command will be applied too.

x | y

This lets you choose which axis the entity is centered on

x: This will center the entity in the middle of the block

y: This will move the entity down to the nearest .0 making them flat on the block they're standing on

/centerEntity @s x

/centerEntity @n[type=pig] y

/centerEntity @a x

Examples:
bottom of page