CraftTweaker Java Library

Java libraries for crafttweaker

This mod was created in order to expand the capabilities of CraftTweaker for experienced users.

The mod offers java libraries for implementing more complex scenarios

The purpose of fashion

 

IO support

Network support

Asynchrony

Multithreading

And much more, but these are the initial tasks

 

Examples

 

 

Also, if you need to add specific functionality, you can write to me about it in my Discord

If you want to support me Boosty

MultiThread

val tread = thread.createTread(() => {
    var i = 0;
    while (i < 5000){
        println("Thread 1: " + i);
        i++;
    }
});

thread.createRunThread(() => {
    var i = 0;
    while (i < 5000){
        println("Thread 2: " + i);
        i++;
    }
});

tread.start();

Async

import stdlib.Exception;
import mods.ctjl.java.lang.ExecutionException;
import mods.ctjl.java.lang.InterruptedException;

var async_1 = async.supplyAsync(() => {
  var i = 0;
  println("Async 1 Start");
  while(i < 2000){
    println(i);
    i++;
  }
  return 1;
});

var async_2 = async.runAsync(() => {
  var i = 0;
  println("Async 2 Start");
  while(i < 2000){
    println(i);
    i++;
  }
});

try {
  async_1.getValue();
  println("Async 1 End");
} catch ex as ExecutionException {
  println(ex.toString());
} catch ex as InterruptedException {
  println(ex.toString());
}

try {
  async_2.getValue();
  println("Async 2 End");
} catch ex as Exception {
  println("Some Error");
  println(ex.toString());
}

The CraftTweaker Java Library Team

HighCrafter tier frameprofile avatar
Owner
HighCrafter tier icon
  • 25
    Followers
  • 33
    Projects
  • 8.7M
    Downloads

More from SixikView all

  • Assembler Table project image

    Assembler Table

    • 54
    • Mods

    BuildCraft-inspired Assembly Table with FE lasers, queued crafting, and KubeJS/CraftTweaker support.

    • 54
    • June 27, 2026
    • Mods
    • +4
  • SDM Recipe Machine Stages project image

    SDM Recipe Machine Stages

    • 58.5K
    • Mods

    The ultimate progression tool for tech-based modpacks. Lock machine recipes behind stages with seamless KubeJS and CraftTweaker integration.

    • 58.5K
    • June 23, 2026
    • Mods
    • +4
  • Generator Accelerator project image

    Generator Accelerator

    • 18.1K
    • Mods

    Optimizes the Minecraft worldgen and chunk management by introducing better calculations.

    • 18.1K
    • June 10, 2026
    • Mods
    • +3
  • Bauble Dragons project image

    Bauble Dragons

    • 12.2K
    • Mods

    A mod that allow you to "carry" your mythic creatures from Ice and Fire with you!

    • 12.2K
    • June 1, 2026
    • Mods
    • +1
  • Assembler Table project image

    Assembler Table

    • 54
    • Mods

    BuildCraft-inspired Assembly Table with FE lasers, queued crafting, and KubeJS/CraftTweaker support.

    • 54
    • June 27, 2026
    • Mods
    • +4
  • SDM Recipe Machine Stages project image

    SDM Recipe Machine Stages

    • 58.5K
    • Mods

    The ultimate progression tool for tech-based modpacks. Lock machine recipes behind stages with seamless KubeJS and CraftTweaker integration.

    • 58.5K
    • June 23, 2026
    • Mods
    • +4
  • Generator Accelerator project image

    Generator Accelerator

    • 18.1K
    • Mods

    Optimizes the Minecraft worldgen and chunk management by introducing better calculations.

    • 18.1K
    • June 10, 2026
    • Mods
    • +3
  • Bauble Dragons project image

    Bauble Dragons

    • 12.2K
    • Mods

    A mod that allow you to "carry" your mythic creatures from Ice and Fire with you!

    • 12.2K
    • June 1, 2026
    • Mods
    • +1