Box Outlines Api
Controll the client-tweaks' box outlines with server-side commands
About this Mod
This is an api for one of my other mod client-tweaks.
It allows the server to summon box outlines from client-tweaks for a tick to those with both mods installed.
Usage
Commands
/boxoutline 0.0 0.0 0.0 1.0 1.0 1.0 red
this draws a box for a single tick from 0 0 0 to 1 1 1. Be aware that box outlines api, unlike client tweaks, uses decimals for the coordinates.
Java Code
first publish this mod's source code to your local maven
# clone the repo
git clone [email protected]:Spit365/box-outlines-api-1.21.6.git
# publish to maven
cd box-outlines-api-1.21.6
./gradlew publishToMavenLocal
then include Box Outlines Api in your mod
build.gradle:
repositories {
mavenLocal()
}
dependencies {
modImplementation("net.spit365:box-outlines-api:1.0.0")
}
fabric.mod.json:
"depends": {
"client-tweaks": "*"
}
Finally, you can use the following methods in your mod:
import net.spit365.boa.BoxOutline;
import net.minecraft.util.math.Box;
import java.util.Collection;
BoxOutline.add(Box box, int color /* argb */)
BoxOutline.addAll(Collection<Box> box, int color /* argb */)
This acts the same way, first specify a box, and then a color in hexadecimal format (0xFFFF0000 -> red, full opacity). Again, this will persist a single tick, so for continuous rendering put it in a tick callback
Building
to build this mod from scratch, first clone both this mod's and client-tweaks' repositories. Then, in the directory of client-tweaks run
./gradlew publishToMavenLocal
This will publish it to your local maven. Then run
./gradlew build
in the box outlines api directory
Why this extra step before building? Box Outlines Api needs the source code of client-tweaks available to compile. I did not set up a global maven, hosting client-tweaks, so you need to do it locally.
Other
Install this mod, if you find any of the above features intriguing.
If you dont know how to install mods / the fabric loader / anithing else fabric modding related visit this amazing page from the official fabric wiki.
If you have any issues, wishes, etc, go to the source code on github and open up an issue.
Available Versions
How to Install Box Outlines Api on Your Server
Order Server
Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).
Set fabric Loader
In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21.11).
Install Mod
Open the mod browser in the dashboard and search for "Box Outlines Api". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.
Compatibility
Mod Loaders
Minecraft Versions
1.21.11, 1.21.10, 1.21.9 (+3 more)
Server-side
✓ RequiredRecommended RAM
4 GB(min. 3 GB)Frequently Asked Questions
Box Outlines Api server crashes on startup – what to do?
Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.11). You can switch loaders with one click in the panel.
Is Box Outlines Api compatible with fabric?
Box Outlines Api officially supports fabric for Minecraft 1.21.11, 1.21.10, 1.21.9. The Mado dashboard automatically detects incompatible loader combinations.
Server lagging with Box Outlines Api – how to optimize performance?
Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Box Outlines Api consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.
Rent Modded Server
Install Box Outlines Api with just one click on your server.