Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 21 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,29 @@

![Infinite Client Icon](src/main/resources/assets/infinite/icon.svg)

**Infinite Client** is a simple Minecraft hack client designed for ease of use and a clean interface.
Infinite Client is a Fabric-based Minecraft client focused on a clean UI and lightweight feature set.

## Features
## Highlights
- Clean, simple interface with intuitive controls.
- Core feature categories (movement, rendering, fighting, automatic, server, utils) kept lean.
- Built-in theme system with several presets and easy user customization.

- **Simple Interface** — Clean and easy to navigate.
- **Intuitive Controls** — User-friendly design that’s easy to understand.
- **Minimal Features** — Lightweight with only the essentials (for now :) ).

## 🌐 Links

- [GitHub Repositories](https://github.com/Infinite-Client/)
- [Official Homepage](https://infinite-client.infinityon.com/)

---

<<<<<<< HEAD
> **Disclaimer:** This client is intended for educational or personal use. Use it responsibly and follow the rules of the servers you join.
=======
> **Disclaimer:** This client is intended for educational or personal use. Use it responsibly and follow the rules of the servers you join.
## Getting Started
1) Prerequisites: JDK 21 (Adoptium or similar) and Git.
2) Clone: `git clone https://github.com/Infinite-Client/infinite-client.git`
3) Run the client in dev: `./gradlew runClient`
4) Build a mod jar: `./gradlew build` (output in `build/libs`).

## Custom Themes

- Open in-game: `Options` → `Infinite Client Settings` → **Themes** tab → enable **Theme** and pick from the list.
- Built-in presets include: infinite, SME Clan, Hacker, Pastel, Minecraft, Cyber, plus bundled JSONs (ocean, sunset, modern, neon, forest).
- Add your own by dropping a JSON into `<minecraft dir>/infinite/themes/` (example files ship in `themes/` and are bundled in the mod).
- In-game: `Options` → `Infinite Client Settings` → `Themes` tab → enable **Theme** and pick from the list.
- Built-in presets: infinite, SME Clan, Hacker, Pastel, Minecraft, Cyber, plus bundled JSONs (ocean, sunset, modern, neon, forest).
- Add your own by placing a JSON in `<minecraft dir>/infinite/themes/`; sample files live in the repo `themes/` folder.
- JSON fields: `name`, `backgroundColor`, `foregroundColor`, `primaryColor`, `secondaryColor`, optional `icon` (`namespace:path`).
- Restart the client to pick new themes from the Theme setting.
>>>>>>> dev/noobyetpro
- Restart the client after adding a theme to load it.

## Links
- GitHub: https://github.com/Infinite-Client/
- Homepage: https://infinite-client.infinityon.com/

## Disclaimer
This client is intended for educational or personal use. Use it responsibly and respect the rules of any servers you join.
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ dependencies {
modImplementation("maven.modrinth:modmenu:${property("mod_menu_version")}")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0")
implementation("dev.babbaj:nether-pathfinder:${property("nether_pathfinder_version")}")
modImplementation("meteordevelopment:baritone:${property("baritone_version")}")
// Keep compile-only so sources still build, but do not ship or run Baritone until 1.21.11 is available.
modCompileOnly("meteordevelopment:baritone:${property("baritone_version")}")
implementation("org.lwjgl:lwjgl-stb:${property("lwjgl_version")}")
implementation("com.squareup.okhttp3:okhttp:${property("ok_http_version")}")
implementation("org.apache.maven:maven-artifact:${property("maven_artifact_version")}")
Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ org.gradle.parallel=true
kotlin.code.style=official
# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.21.10
yarn_mappings=1.21.10+build.2
minecraft_version=1.21.11
yarn_mappings=1.21.11+build.3
loader_version=0.17.3
# Fabric API
loomVersion=1.13-SNAPSHOT
fabric_api_version=0.136.0+1.21.10
fabric_api_version=0.140.2+1.21.11
fabric_kotlin_version=1.13.6+kotlin.2.2.20
# Mod Properties
mod_version=1.21.10-7-beta4
mod_version=1.21.11-7-beta4
maven_group=org.infinite
archives_base_name=infinite
# Thank you for meteor!
baritone_version=1.21.10-SNAPSHOT
nether_pathfinder_version=1.4.1
lwjgl_version=3.3.3
mod_menu_version=16.0.0-rc.1
mod_menu_version=17.0.0-beta.1
ok_http_version=5.3.0
maven_artifact_version=4.0.0-rc-5
maven_artifact_version=4.0.0-rc-5
82 changes: 0 additions & 82 deletions src/client/java/org/infinite/libs/graphics/TextRenderState.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private boolean wrapHasForwardMovement(Input input, Operation<Boolean> original)
}

/** This mixin allows AutoSprint to enable sprinting even when the player is too hungry. */
@Inject(at = @At("HEAD"), method = "canSprint()Z", cancellable = true)
@Inject(at = @At("HEAD"), method = "canSprint", cancellable = true)
private void onCanSprint(CallbackInfoReturnable<Boolean> cir) {
// Feature: SuperSprint (Setting: EvenIfHungry)
if (InfiniteClient.INSTANCE.isSettingEnabled(SuperSprint.class, "EvenIfHungry"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
public class NoFogMixin {
@WrapOperation(
method =
"applyFog(Lnet/minecraft/client/render/Camera;IZLnet/minecraft/client/render/RenderTickCounter;FLnet/minecraft/client/world/ClientWorld;)Lorg/joml/Vector4f;",
"applyFog(Lnet/minecraft/client/render/Camera;ILnet/minecraft/client/render/RenderTickCounter;FLnet/minecraft/client/world/ClientWorld;)Lorg/joml/Vector4f;",
at =
@At(
value = "INVOKE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import net.minecraft.client.render.Camera;
import net.minecraft.client.render.VertexConsumer;
import net.minecraft.client.render.WorldRenderer;
import net.minecraft.client.render.state.OutlineRenderState;
import net.minecraft.client.render.state.WorldRenderState;
import net.minecraft.client.util.math.MatrixStack;
import org.infinite.InfiniteClient;
import org.infinite.features.rendering.ui.HyperUi;
Expand All @@ -27,7 +29,7 @@ private boolean shouldCancel() {
@At(
value = "INVOKE",
target =
"Lnet/minecraft/client/render/WorldRenderer;drawBlockOutline(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumer;DDDLnet/minecraft/client/render/state/OutlineRenderState;I)V"),
"Lnet/minecraft/client/render/WorldRenderer;drawBlockOutline(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumer;DDDLnet/minecraft/client/render/state/OutlineRenderState;IF)V"),
method =
"renderTargetBlockOutline(Lnet/minecraft/client/render/VertexConsumerProvider$Immediate;Lnet/minecraft/client/util/math/MatrixStack;ZLnet/minecraft/client/render/state/WorldRenderState;)V")
private void cancelBlockOutline(
Expand All @@ -39,18 +41,20 @@ private void cancelBlockOutline(
double z,
OutlineRenderState state,
int i,
float lineWidth,
Operation<Void> original) {
if (shouldCancel()) {
InfiniteClient inf = InfiniteClient.INSTANCE;
int modifyColor = inf.theme(inf.getCurrentTheme()).getColors().getPrimaryColor();
original.call(instance, matrices, vertexConsumer, x, y, z, state, modifyColor);
original.call(instance, matrices, vertexConsumer, x, y, z, state, modifyColor, lineWidth);
} else {
original.call(instance, matrices, vertexConsumer, x, y, z, state, i);
original.call(instance, matrices, vertexConsumer, x, y, z, state, i, lineWidth);
}
}

@Inject(method = "fillBlockBreakingProgressRenderState", at = @At("HEAD"), cancellable = true)
private void cancelBlockBreakingProgress(CallbackInfo ci) {
private void cancelBlockBreakingProgress(
Camera camera, WorldRenderState worldRenderState, CallbackInfo ci) {
if (shouldCancel()) {
ci.cancel(); // 描画メソッドの実行をキャンセル
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import net.minecraft.text.Text
import net.minecraft.util.Identifier
import net.minecraft.util.Util
import net.minecraft.util.math.ColorHelper
import org.infinite.InfiniteClient
import org.infinite.libs.graphics.Graphics2D
import kotlin.math.min
import kotlin.math.roundToInt
Expand Down Expand Up @@ -33,9 +34,11 @@ object InfiniteLoadingScreenRenderer {
reloadCompleteTime: Long,
reloading: Boolean,
) {
val g2d = Graphics2D(context) // Graphics2Dインスタンスを作成
val g2d = Graphics2D(context) // wrapper for common drawing helpers
val colors = InfiniteClient.currentColors()

val now = Util.getMeasuringTimeMs()
// Track completion moment even when vanilla reloadCompleteTime is missing
val completeMark =
if (reloadCompleteTime > -1) {
fallbackCompleteTime = -1
Expand All @@ -54,17 +57,15 @@ object InfiniteLoadingScreenRenderer {
val alpha = (fadeIn * fadeOut).coerceIn(0f, 1f)
if (alpha <= 0f) return

val width = g2d.width // Graphics2Dから取得
val height = g2d.height // Graphics2Dから取得
val width = g2d.width
val height = g2d.height

// 1. 背景のグラデーション塗りつぶし
// Graphics2DにはfillGradientがないため、DrawContextのメソッドを直接使用するか、
// Graphics2D内にfillGradientを実装する必要があります。ここではDrawContextをラップしているため、直接使用します。
val topColor = ColorHelper.getArgb((255 * alpha).roundToInt(), 8, 10, 14)
val bottomColor = ColorHelper.getArgb((255 * alpha).roundToInt(), 0, 0, 0)
// Background gradient using themed colors
val topColor = withAlpha(colors.backgroundColor, (220 * alpha).roundToInt())
val bottomColor = withAlpha(colors.primaryColor, (140 * alpha).roundToInt())
context.fillGradient(0, 0, width, height, topColor, bottomColor)

// 2. アニメーション画像の描画
// Animated spinner frames
val currentFrameIndex = ((now / ANIMATION_FRAME_DURATION_MS) % ANIMATION_FRAMES_COUNT).toInt()
val texture = animationTextures[currentFrameIndex]

Expand All @@ -78,8 +79,8 @@ object InfiniteLoadingScreenRenderer {
y = textureY.toFloat(),
width = displaySize.toFloat(),
height = displaySize.toFloat(),
rotation = 0f, // 回転なし
color = ColorHelper.getArgb((255 * alpha).roundToInt(), 255, 255, 255), // アルファ値を適用
rotation = 0f,
color = ColorHelper.getArgb((255 * alpha).roundToInt(), 255, 255, 255),
u = 0f,
v = 0f,
uWidth = TEXTURE_SIZE.toFloat(),
Expand All @@ -88,8 +89,7 @@ object InfiniteLoadingScreenRenderer {
textureHeight = TEXTURE_SIZE.toFloat(),
)
val fontHeight = g2d.fontHeight()
// 3. タイトルテキストの描画
val titleAlpha = ColorHelper.getArgb((255 * alpha).roundToInt(), 255, 255, 255)
val titleAlpha = withAlpha(colors.foregroundColor, (255 * alpha).roundToInt())
val title = Text.literal("Infinite Client")
g2d.centeredText(
text = title,
Expand All @@ -99,14 +99,13 @@ object InfiniteLoadingScreenRenderer {
shadow = true,
)

// 4. サブタイトルテキストの描画 (Y座標を +26 から +38 に変更)
val subtitleText =
if (reloading) {
Text.literal("Loading resources...")
} else {
Text.literal("Finishing setup...")
}
val subtitleAlpha = ColorHelper.getArgb((210 * alpha).roundToInt(), 180, 180, 180)
val subtitleAlpha = withAlpha(colors.secondaryColor, (210 * alpha).roundToInt())
g2d.centeredText(
text = subtitleText,
x = width / 2,
Expand All @@ -115,13 +114,12 @@ object InfiniteLoadingScreenRenderer {
shadow = true,
)

// 5. プログレスバーの描画
// Progress bar
val progressBarWidth = (width * 0.55f).roundToInt()
val progressBarX = (width - progressBarWidth) / 2
val progressBarY = (height * 0.68f).roundToInt()

// ベースバーの描画 (rect)
val baseBarColor = ColorHelper.getArgb((80 * alpha).roundToInt(), 255, 255, 255)
val baseBarColor = withAlpha(colors.foregroundColor, (80 * alpha).roundToInt())
g2d.rect(
x1 = progressBarX.toFloat(),
y1 = progressBarY.toFloat(),
Expand All @@ -130,10 +128,9 @@ object InfiniteLoadingScreenRenderer {
color = baseBarColor,
)

// フィル部分の描画 (rect)
val clampedProgress = progress.coerceIn(0f, 1f)
val filledWidth = (progressBarWidth * clampedProgress).roundToInt()
val fillColor = ColorHelper.getArgb((230 * alpha).roundToInt(), 255, 255, 255)
val fillColor = withAlpha(colors.primaryColor, (230 * alpha).roundToInt())

if (filledWidth > 0) {
g2d.rect(
Expand All @@ -144,17 +141,21 @@ object InfiniteLoadingScreenRenderer {
color = fillColor,
)
}
// 6. パーセンテージテキストの描画 (Y座標は変更なし)
val percentText = "${(clampedProgress * 100f).roundToInt()}%"
val percentTitle = Text.literal("$percentText Infinite")
val percentAlpha = ColorHelper.getArgb((200 * alpha).roundToInt(), 210, 210, 210)
val percentTitle = Text.literal("${percentText} - Infinite")
val percentAlpha = withAlpha(colors.foregroundColor, (200 * alpha).roundToInt())

g2d.centeredText(
text = percentTitle,
x = width / 2,
y = progressBarY + 4 * fontHeight, // 変更なし
y = progressBarY + 4 * fontHeight,
color = percentAlpha,
shadow = true,
)
}

private fun withAlpha(color: Int, alpha: Int): Int {
val clampedAlpha = alpha.coerceIn(0, 255)
return (clampedAlpha shl 24) or (color and 0x00FFFFFF)
}
}
Loading
Loading