add custom categories to the liquid bounce mod menu (custom)
-
praise https://forum.ccbluex.net/thread.php?id=2604
henlo friend))
i back witcher another tuto XD i was show how make cool custom good click jui mod menu categorys with water jump slimeblock mod api ok???? i paste from uc mysef))
ok ok ok ok
fist uu need import class definition lmao heheheXDDDConstructor = Java.type("java.lang.reflect.Constructor"); Modifier = Java.type("java.lang.reflect.Modifier"); Field = Java.type("java.lang.reflect.Field"); ModuleCategory = Java.type("net.ccbluex.liquidbounce.features.module.ModuleCategory");
ok now you go got tcheese enum category valuables XDDD
valuablesField = ModuleCategory.class.getDeclaredField("$VALUES");
they is aber final!!!!! not good)))))))) need adjust heheheeh
fizzt get modifiers fieldDDDDDD
modifiersField = Field.class.getDeclaredField("modifiers") //how to remove final modifier is left out as an excercise for the reader, of course.
now you change it!!!!!!!!!!!))))))))))
you need made new enum valuable
you need get construction pfield (plant)DDDD
constructionField = ModuleCategory.class.getDeclaredConstructors()[0]
now you to delegation as an delegator and ackqire delegator via acesor)))))
akqirreMethod = Constructor.class.getDeclaredMethod("acquireConstructorAccessor");
now you delegate to the construction field XDDDDDDDDDDD
acesor = akqirreMethod.invoke(constructionField);
okokokokk)))))) time make new enum valuable final time!!!!!!!!
as sait 100 times new valuable make
delegation make new value in construction fieldvaluable = acesor.newInstance(["KUSTOM", 0, "lololoolool"]);
now you cat valuables)))))))
need convert to jsscript and back
jsscriptValuables = Java.from(valuablesField.get(null)); newValuables = jsscriptValuables.concat(valuable); newenumValuables = Java.to(newValuables, "net.ccbluex.liquidbounce.features.module.ModuleCategory[]");
set newenum valuables!!!!!!! and you've done]]]]]]
valuablesField.set(null, newenumValuables);
do before register modules else reload clickguinow you can make things like this
ok thank me for your read afteryt best devlopmen on earth ok??!!
some weird language
he has coronavirus(((((if you actually want to know how i did this
all fields and methods are inacesible you make acesible you self LLLLL
you trash can just do this with core 1.5.0+
-
well, if I edit src, it will only take 1 line to create a new category in clickgui and tabgui
simple & fast
-
@notautismatall lmao how would you distribute it
well if you use Core you don't even have to write any additional line, just set module category to one that doesn't exist and Core will create it
-
@MCHacks said in add custom categories to the liquid bounce mod menu (custom):
Can U make tutorial how to change Font ?
wdym change font
-