Advanced Entity & LivingEntity API
PotatoMC provides deep control over entity visual flags, scoreboard tags, glowing shaders, invulnerability, gravity, and living entity camera geometry without touching core server internals.
1. Entity Flags & Visual Shaders
// Glowing highlight outline (visible through solid blocks)
entity.set_glowing(true);
// Make entity invulnerable to all damage sources
entity.set_invulnerable(true);
// Silence all footsteps, breathing, and ambient entity noises
entity.set_silent(true);
// Disable gravity (makes entity hover in place without falling)
entity.set_gravity(false);2. Scoreboard Tags
Attach arbitrary string tags to entities for easy querying (used extensively in datapacks, minigames, and custom dungeon mobs):
// Add tags
entity.add_scoreboard_tag("boss");
entity.add_scoreboard_tag("phase_2");
// Query tags
let tags = entity.scoreboard_tags();
if tags.contains(&"boss".to_string()) {
println!("Found boss entity!");
}
// Remove tag
entity.remove_scoreboard_tag("phase_2");3. LivingEntity Camera & Attributes
if let Some(living) = entity.as_living() {
let eye = living.eye_location();
let height = living.eye_height();
println!("Living entity eye at Y: {:.2} (offset: {:.2}m)", eye.y, height);
}