i113w's Camera Lib

Quick rating

i113w's Camera Lib

No reviews yet

A Lib that provides the RTS Style Camera System which is used by Better Mine Team.

Mod Loaders
Forge
NeoForge
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Dev Environment
Client Required
Server Unsupported

About

Project Details

Type
Mod
License
MIT License
Latest Version
i113w_camera_lib-2612-0.0.1-alpha1.jar
Authors
CurseForge
Modrinth

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID
Modrinth ID

Resources

External Links

About

Description

i113w's Camera Lib

A NeoForge 1.21.1 client-side library that provides a complete RTS-style camera system — including camera movement, entity box-selection, right-click command zones, ray casting, and highlight rendering.

Designed to be consumed by other mods (e.g., Better Mine Team) via a thin API layer.


Requirements

Item Version
Minecraft 1.21.1
NeoForge 21.1.209+
Java 21
Side Client-only

Importing the Library

Local JAR (place the JAR in your mod's libs/ directory):

dependencies {
    implementation files('libs/i113w_camera_lib-0.0.1.jar')
}

Declare the dependency in META-INF/neoforge.mods.toml:

[[dependencies."your_mod_id"]]
    modId = "i113w_camera_lib"
    type = "required"
    versionRange = "[0.0.1,)"
    ordering = "BEFORE"
    side = "CLIENT"

Key Interfaces & Classes

CameraLibAPI — singleton entry point

CameraLibAPI api = CameraLibAPI.get();

// Register your delegate
api.setInteractionDelegate(new MyDelegate());

// Sync selected entity IDs to the library (drives outline rendering)
api.setSelectedEntities(Set<Integer> ids);

// Query hovered entity (-1 if none)
int id = api.getHoveredEntityId();

// Clear selection and hover state
api.clearSelection();

IRTSInteractionDelegate — inject business logic

public interface IRTSInteractionDelegate {
    boolean isSelectable(Entity entity);
    ResourceLocation getCursorIcon(@Nullable Entity hoveredEntity, boolean isAttackDragging);
}

Register via CameraLibAPI.get().setInteractionDelegate(impl).


Events (fired on NeoForge.EVENT_BUS)

RTSBoxSelectEvent — left-click or drag-box completed

@SubscribeEvent
public static void onSelect(RTSBoxSelectEvent event) {
    List<Entity> candidates = event.getCandidates(); // pre-filtered by isSelectable()
}

RTSRightClickEvent — right-click or right-drag completed

@SubscribeEvent
public static void onRightClick(RTSRightClickEvent event) {
    if (event.isDrag()) {
        List<Entity> targets = event.getDragTargets();
    } else {
        HitResult hit = event.getSingleHitResult(); // BlockHitResult or EntityHitResult
    }
}

RTSCameraController — camera state

RTSCameraController cam = RTSCameraController.get();

cam.toggleRTSMode();      // activate / deactivate
cam.toggleCameraStyle();  // switch RTS <-> FREE (while active)
cam.isActive();           // boolean
cam.reset();              // force-exit, use on logout / level unload

Camera Modes

Mode FOV Zoom Yaw Rotation
RTS 25° (fixed) Scroll wheel Hold Left Ctrl + drag (snaps by rtsSnapAngle)
FREE Standard Scroll wheel (moves forward) Hold Left Ctrl + drag (continuous)

Highlight Rendering

The library automatically draws entity outlines when the camera is active. No rendering code is needed in the consumer mod — just keep CameraLibAPI.setSelectedEntities(...) in sync.

Color Condition
White Entity ID is in the selected set
Yellow Hovered entity (not in selected set)

Configuration

Player-adjustable values in .minecraft/config/i113w_camera_lib-client.toml:

Key Default Description
rtsPitchMin / Max 35 / 45 Pitch clamp range in RTS mode
freePitchMin / Max 10 / 90 Pitch clamp range in FREE mode
rtsZoomMin / Max 10 / 80 Zoom distance clamp in RTS mode
rtsZoomSpeedMultiplier 3.5 Scroll wheel zoom sensitivity
rtsSnapAngle 90 Degrees per yaw snap step
freeRotationSpeed 5.0 Mouse yaw sensitivity in FREE mode
thresholdPx 20 Edge-pan trigger distance (pixels from screen edge)
baseSpeed 1.0 WASD movement speed
sprintMultiplier 2.0 Speed multiplier when sprint key is held

License

MIT — see LICENSE

Author: i113w

i113w's Camera Lib

A NeoForge 1.21.1 client-side library that provides a complete RTS-style camera system — including camera movement, entity box-selection, right-click command zones, ray casting, and highlight rendering.

Designed to be consumed by other mods (e.g., Better Mine Team) via a thin API layer.


Requirements

Item Version
Minecraft 1.21.1
NeoForge 21.1.209+
Java 21
Side Client-only

Importing the Library

Local JAR (place the JAR in your mod's libs/ directory):

dependencies {
    implementation files('libs/i113w_camera_lib-0.0.1.jar')
}

Declare the dependency in META-INF/neoforge.mods.toml:

[[dependencies."your_mod_id"]]
    modId = "i113w_camera_lib"
    type = "required"
    versionRange = "[0.0.1,)"
    ordering = "BEFORE"
    side = "CLIENT"

Key Interfaces & Classes

CameraLibAPI — singleton entry point

CameraLibAPI api = CameraLibAPI.get();

// Register your delegate
api.setInteractionDelegate(new MyDelegate());

// Sync selected entity IDs to the library (drives outline rendering)
api.setSelectedEntities(Set<Integer> ids);

// Query hovered entity (-1 if none)
int id = api.getHoveredEntityId();

// Clear selection and hover state
api.clearSelection();

IRTSInteractionDelegate — inject business logic

public interface IRTSInteractionDelegate {
    boolean isSelectable(Entity entity);
    ResourceLocation getCursorIcon(@Nullable Entity hoveredEntity, boolean isAttackDragging);
}

Register via CameraLibAPI.get().setInteractionDelegate(impl).


Events (fired on NeoForge.EVENT_BUS)

RTSBoxSelectEvent — left-click or drag-box completed

@SubscribeEvent
public static void onSelect(RTSBoxSelectEvent event) {
    List<Entity> candidates = event.getCandidates(); // pre-filtered by isSelectable()
}

RTSRightClickEvent — right-click or right-drag completed

@SubscribeEvent
public static void onRightClick(RTSRightClickEvent event) {
    if (event.isDrag()) {
        List<Entity> targets = event.getDragTargets();
    } else {
        HitResult hit = event.getSingleHitResult(); // BlockHitResult or EntityHitResult
    }
}

RTSCameraController — camera state

RTSCameraController cam = RTSCameraController.get();

cam.toggleRTSMode();      // activate / deactivate
cam.toggleCameraStyle();  // switch RTS <-> FREE (while active)
cam.isActive();           // boolean
cam.reset();              // force-exit, use on logout / level unload

Camera Modes

Mode FOV Zoom Yaw Rotation
RTS 25° (fixed) Scroll wheel Hold Left Ctrl + drag (snaps by rtsSnapAngle)
FREE Standard Scroll wheel (moves forward) Hold Left Ctrl + drag (continuous)

Highlight Rendering

The library automatically draws entity outlines when the camera is active. No rendering code is needed in the consumer mod — just keep CameraLibAPI.setSelectedEntities(...) in sync.

Color Condition
White Entity ID is in the selected set
Yellow Hovered entity (not in selected set)

Configuration

Player-adjustable values in .minecraft/config/i113w_camera_lib-client.toml:

Key Default Description
rtsPitchMin / Max 35 / 45 Pitch clamp range in RTS mode
freePitchMin / Max 10 / 90 Pitch clamp range in FREE mode
rtsZoomMin / Max 10 / 80 Zoom distance clamp in RTS mode
rtsZoomSpeedMultiplier 3.5 Scroll wheel zoom sensitivity
rtsSnapAngle 90 Degrees per yaw snap step
freeRotationSpeed 5.0 Mouse yaw sensitivity in FREE mode
thresholdPx 20 Edge-pan trigger distance (pixels from screen edge)
baseSpeed 1.0 WASD movement speed
sprintMultiplier 2.0 Speed multiplier when sprint key is held

License

MIT — see LICENSE

Author: i113w

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Total Downloads
CurseForge
<1,000
Modrinth
<1,000
Last Updated
CurseForge
Created
CurseForge
Modrinth
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works