Zergatul / cheatutils

MIT License
33 stars 11 forks source link

Feature request #55

Closed normalUserKarn closed 5 months ago

normalUserKarn commented 7 months ago

Add a way to get the coordinates of entities or the closest entity of a specific type around you as a float or integer.

Zergatul commented 5 months ago

Can be done like this:

int id = game.entities.findClosestEntityById("minecraft:player");
// or
// int id = game.entities.findClosestEntityByClass("net.minecraft.world.entity.monster.Monster");
if (id > 0) {
    float x = game.entities.getX(id);
    // ...
}