Download DerKaterCore — Minecraft Mods — MetaMods

DerKaterCore

Active

Downloads

1

Last update

2 years ago
Client
Libraries
Utils

DerKaterCore

Important Information

All DerKaterCore functionality is completely integrated into the ASJCore project by AlexSocol. Therefore, do not expect further updates to this project. For any questions, please contact the ASJCore issues section or reach out to KAIIIAK on the Discord server.

Main Features

This core module changes access to all fields and methods, making them PUBLIC during runtime. It provides a new API for creating transformers by extending KASMWorker methods with automatic change counting and registration via KASMLib.register(new YourWorker()) inside FMLCorePlugin.

Working with Private Fields

Allows using private fields during compilation through ReflectionLikeUtil.

Usage example:

ReflectionLikeUtil.SETFIELD(obj, 1, "tek/Gde.tut.Ljava/lang/Object;");
// transforms into "obj.tut = 1:" where obj is of type tek.Gde, and tut is of type java.lang.Object

Avoiding Null Checks

Added a way to avoid null checks using the Opt class.

Examples:

List listS = null;
for(String s: Opt.it(listS)) {}
// Will NOT throw NullPointerException
Object o = null;
Opt.it(o,o1 -> System.out.println("o is not null"));
// will print "o is not null" only if o is not null, otherwise does nothing
Project members
KAIIIAK

KAIIIAK

Created: 26 May 2023

ID: 37491