use of com.irtimaled.bbor.client.models.Point in project BoundingBoxOutlineReloaded by irtimaled.
the class SpawningSphereRenderer method render.
@Override
public void render(BoundingBoxSpawningSphere boundingBox) {
Point point = boundingBox.getPoint();
OffsetPoint sphereCenter = new OffsetPoint(point);
Color safeAreaColor = ColorHelper.getColor(ConfigManager.colorAFKSpheresSafeArea);
renderSphere(point, BoundingBoxSpawningSphere.SAFE_RADIUS, safeAreaColor);
renderOuterSphere(boundingBox, point);
OffsetBox offsetBox = new OffsetBox(sphereCenter, sphereCenter).grow(0.5, 0, 0.5);
renderCuboid(offsetBox, safeAreaColor);
Integer spawnableSpacesCount = boundingBox.getSpawnableSpacesCount();
if (spawnableSpacesCount != null) {
renderText(sphereCenter, I18n.format("bbor.renderer.spawningSphere.spawnable"), spawnableSpacesCount == 0 ? I18n.format("bbor.renderer.spawningSphere.none") : String.format("%,d", spawnableSpacesCount));
}
renderSphere(point, BoundingBoxSpawningSphere.SAFE_RADIUS, safeAreaColor);
if (ConfigManager.renderAFKSpawnableBlocks.get() && boundingBox.isWithinSphere(Player.getPoint())) {
renderSpawnableSpaces(boundingBox);
}
}
use of com.irtimaled.bbor.client.models.Point in project BoundingBoxOutlineReloaded by irtimaled.
the class LineCommandBuilder method addLine.
private static int addLine(CommandContext<CommandSource> context) throws CommandSyntaxException {
Point from = Arguments.getPoint(context, ArgumentNames.FROM).snapXZ(0.5d);
Point to = Arguments.getPoint(context, ArgumentNames.TO).snapXZ(0.5d);
Double width = Arguments.getDouble(context, WIDTH);
CustomLineProvider.add(from, to, width);
CommandHelper.feedback(context, "bbor.commands.line.added", from.getX(), from.getY(), from.getZ(), to.getX(), to.getY(), to.getZ());
return 0;
}
Aggregations