CraftTweaker Java Library
Modby Sixik
Java libraries for crafttweaker
Description
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());
}
Recommended Gear
AffiliateHardware and extras that pair well with this mod.
As an Amazon Associate I earn from qualifying purchases.
Similar Mods
Future Fireproof
Backports fireproof item logic to 1.12.2. Includes per-item fireproof configuration and a new Fireproof enchantment.
CinematicZoom Original
Not just another zoom a full CinematicZoom tooltip for your modpacks
Bakeries
Bake! Bake!
Easy Name Tags - Rename Nametags!
Allows for easy naming of nametags without an anvil using a stylish GUI.
Create - Xaero's map
See your Create: Aeronautics airships & Sable craft rendered live on Xaero's Minimap and Xaero's World Map.
Elytra Swapper
Details on Github. (This is a forked and updated mod) Fabric Mod to Swap the Elytra and Chestplate using a Keybind.