diff --git a/CompileLatestClient.sh b/CompileLatestClient.sh old mode 100644 new mode 100755 diff --git a/build_clean_tmp.sh b/build_clean_tmp.sh old mode 100644 new mode 100755 diff --git a/build_help.sh b/build_help.sh old mode 100644 new mode 100755 diff --git a/build_init.sh b/build_init.sh old mode 100644 new mode 100755 diff --git a/build_make_pullrequest.sh b/build_make_pullrequest.sh old mode 100644 new mode 100755 diff --git a/build_make_unpatched.sh b/build_make_unpatched.sh old mode 100644 new mode 100755 diff --git a/build_make_workspace.sh b/build_make_workspace.sh old mode 100644 new mode 100755 diff --git a/build_merge_direct.sh b/build_merge_direct.sh old mode 100644 new mode 100755 diff --git a/build_merge_pullrequest.sh b/build_merge_pullrequest.sh old mode 100644 new mode 100755 diff --git a/build_test_pullrequest.sh b/build_test_pullrequest.sh old mode 100644 new mode 100755 diff --git a/patches/resources/assets/minecraft/lang/en_US.edit.lang b/patches/resources/assets/minecraft/lang/en_US.edit.lang index bc0c3d6..3125d03 100644 --- a/patches/resources/assets/minecraft/lang/en_US.edit.lang +++ b/patches/resources/assets/minecraft/lang/en_US.edit.lang @@ -12,7 +12,7 @@ ~ eaglercraft.recording.start=Record Screen... ~ eaglercraft.soundCategory.voice=Recording Voice -> INSERT 1 : 245 @ 1 +> INSERT 1 : 246 @ 1 + eaglercraft.resourcePack.prompt.title=What do you want to do with '%s'? + eaglercraft.resourcePack.prompt.text=Tip: Hold Shift to skip this screen when selecting a resource pack! @@ -254,7 +254,8 @@ + eaglerforge.menu.mods=Mods + eaglerforge.menu.mods.title1=Available mods + eaglerforge.menu.mods.title2=Selected mods -+ eaglerforge.menu.mods.addmod=Add Mod ++ eaglerforge.menu.mods.addmod=Upload Mod ++ eaglerforge.menu.mods.addmodurl=Add Mod (URL) + eaglerforge.menu.mods.removemod=Remove Mod + eaglerforge.menu.mods.info=(Only .js files) + diff --git a/run_chmod.sh b/run_chmod.sh old mode 100644 new mode 100755 diff --git a/sources/main/java/me/otterdev/UwUAPI.java b/sources/main/java/me/otterdev/UwUAPI.java index 397a301..74eb6fd 100644 --- a/sources/main/java/me/otterdev/UwUAPI.java +++ b/sources/main/java/me/otterdev/UwUAPI.java @@ -10,5 +10,4 @@ public class UwUAPI { public static String uwuify(String stringToUwuify) { return stringToUwuify.toLowerCase().replaceAll("r|l","w").replaceAll("n([aeiou])", "ny$1").replaceAll("ove", "uve").replaceAll("uck", "uwq").replaceFirst("i", "i-i").replaceFirst("(?s)(.*)" + "i-i-i", "$1" + "i-i") + ((new Random().nextInt(10)) <= 2 ? " >_<" : ""); } - } diff --git a/sources/main/java/net/eaglerforge/api/GlobalsListener.java b/sources/main/java/net/eaglerforge/api/GlobalsListener.java index 03c699c..2d9d119 100644 --- a/sources/main/java/net/eaglerforge/api/GlobalsListener.java +++ b/sources/main/java/net/eaglerforge/api/GlobalsListener.java @@ -17,12 +17,12 @@ class GlobalsListener { void onUpdate(); } - @JSBody(params = { "handler" }, script = "window.ModAPI.globals.onGlobalsUpdate = handler;") + @JSBody(params = { "handler" }, script = "globalThis.ModAPI.globals.onGlobalsUpdate = handler;") static native void provideCallback(GlobalsHandler handler); - @JSBody(params = { "handler" }, script = "window.ModAPI.globals.onRequire = handler;") + @JSBody(params = { "handler" }, script = "globalThis.ModAPI.globals.onRequire = handler;") static native void provideRequireCallback(GlobalsHandler handler); - @JSBody(params = { "handler" }, script = "window.ModAPI.update = handler;") + @JSBody(params = { "handler" }, script = "globalThis.ModAPI.update = handler;") static native void provideUpdateCallback(UpdateHandler handler); } \ No newline at end of file diff --git a/sources/main/java/net/eaglerforge/api/ModAPI.java b/sources/main/java/net/eaglerforge/api/ModAPI.java index 715de07..36d8e06 100644 --- a/sources/main/java/net/eaglerforge/api/ModAPI.java +++ b/sources/main/java/net/eaglerforge/api/ModAPI.java @@ -36,8 +36,10 @@ public class ModAPI { public static final Logger log = LogManager.getLogger(); public static String version = projectForkVersion; public static boolean clientPacketSendEventsEnabled = true; + @JSBody(params = { "version" }, script = "initAPI(version)") public static native void initAPI(String version); + @JSBody(params = { "name" }, script = "ModAPI.events.newEvent(name);") private static native void newEvent(String name); @@ -56,7 +58,7 @@ public class ModAPI { @JSBody(params = { "data" }, script = "console.log(data);") public static native void logJSObj(JSObject data); - @JSBody(params = { "minecraft" }, script = "window.Minecraft = minecraft;") + @JSBody(params = { "minecraft" }, script = "globalThis.Minecraft = minecraft;") public static native void setMinecraftContext(BaseData minecraft); @@ -204,18 +206,6 @@ public class ModAPI { getModAPI().setCallbackVoidWithDataArg("displayToChat", (BaseData params) -> { mc.ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(params.getString("msg"))); }); - getModAPI().setCallbackStringWithDataArg("rate", (BaseData params) -> { - int hash = 0; - int counterRate = 0; - - for (i < params.getString('string').length(); i++) { - hash = (hash << 5) - hash + params.getString('string').codePointAt(); - } - - String res = (Math.abs(hash) % 100) + 1; - - return res; - }); getModAPI().setCallbackStringWithDataArg("uwuify", (BaseData params) -> { return UwUAPI.uwuify(params.getString("string")); }); @@ -326,20 +316,19 @@ public class ModAPI { setGlobal("platform", PlatformAPI.makeModData()); setGlobal("reflect", PLReflect.makeModData()); setGlobal("logger", LoggerAPI.makeModData()); - //setGlobal("emptygui", EmptyGui.makeModData()); setGlobal("ScaledResolution", ScaledResolution.makeModData()); setGlobal("GlStateManager", GlStateManager.makeModData()); setGlobal("sp", SingleplayerServerController.makeModData()); getModAPI().setCallbackString("currentScreen", () -> { return mc.currentScreen.toString(); }); - getModAPI().setCallbackInt("getdisplayHeight", () -> { + getModAPI().setCallbackInt("getDisplayHeight", () -> { return mc.displayHeight; }); - getModAPI().setCallbackInt("getdisplayWidth", () -> { + getModAPI().setCallbackInt("getDisplayWidth", () -> { return mc.displayWidth; }); - getModAPI().setCallbackInt("getdisplayWidth", () -> { + getModAPI().setCallbackInt("getDisplayWidth", () -> { return mc.displayWidth; }); getModAPI().setCallbackInt("getFONT_HEIGHT", () -> { @@ -355,9 +344,9 @@ public class ModAPI { mc.fontRendererObj.drawString(params.getString("msg"), params.getFloat("x"), params.getFloat("y"), params.getInt("color"), false); }); getModAPI().setCallbackVoidWithDataArg("drawRect", (BaseData params) -> { - gui.drawRect(params.getInt("left"), params.getInt("top"), params.getInt("right"), params.getInt("bottom"), params.getInt("color")); + Gui.drawRect(params.getInt("left"), params.getInt("top"), params.getInt("right"), params.getInt("bottom"), params.getInt("color")); }); - getModAPI().setCallbackVoid("reloadchunks", () -> { + getModAPI().setCallbackVoid("reloadChunks", () -> { mc.renderGlobal.loadRenderers(); }); getModAPI().setCallbackString("getProfileName", () -> { @@ -393,7 +382,7 @@ public class ModAPI { ModAPI.setGlobal("network", mc.thePlayer.sendQueue.makeModData()); } if (requiredList.contains("server") && mc.getCurrentServerData() != null) { - ModAPI.setGlobal("server", server.makeModData()); + ModAPI.setGlobal("server", ServerAPI.makeModData()); } ModAPI.callEvent("update", new ModData()); } diff --git a/sources/main/java/net/eaglerforge/api/ModLoader.java b/sources/main/java/net/eaglerforge/api/ModLoader.java index 6633c56..6db77c9 100644 --- a/sources/main/java/net/eaglerforge/api/ModLoader.java +++ b/sources/main/java/net/eaglerforge/api/ModLoader.java @@ -5,7 +5,7 @@ import org.teavm.jso.JSBody; public class ModLoader { public static String[] Mods = {}; - @JSBody(params = { "Mods" }, script = "window.ModLoader(Mods);") + @JSBody(params = { "Mods" }, script = "globalThis.ModLoader(Mods);") public static native void loadMods(String[] Mods); @JSBody(params = {}, script = "loadLoader();") @@ -17,8 +17,8 @@ public class ModLoader { @JSBody(params = {}, script = "try { return JSON.parse(localStorage.getItem('ml::Mods')||'[]') } catch(err) {return []}") private static native String[] retrieveMods(); - @JSBody(params = {}, script = "return returntotalloadedmods()") - public static native int returntotalloadedmods(); + @JSBody(params = {}, script = "return (returnTotalLoadedMods || (()=>{return 0}))();") + public static native int returnTotalLoadedMods(); public static void saveModsToLocalStorage() { diff --git a/sources/main/java/net/eaglerforge/api/ServerAPI.java b/sources/main/java/net/eaglerforge/api/ServerAPI.java new file mode 100644 index 0000000..d203cec --- /dev/null +++ b/sources/main/java/net/eaglerforge/api/ServerAPI.java @@ -0,0 +1,38 @@ +package net.eaglerforge.api; + + +import net.minecraft.client.Minecraft; + +public class ServerAPI extends ModData { + private static Minecraft mc; + + public static ModData makeModData() { + ModData serverGlobal = new ModData(); + serverGlobal.setCallbackString("getCurrentQuery", () -> { + return Minecraft.currentServerData.currentQuery.toString(); + }); + serverGlobal.setCallbackString("getServerIP", () -> { + return Minecraft.currentServerData.serverIP; + }); + serverGlobal.setCallbackString("getServerMOTD", () -> { + return Minecraft.currentServerData.serverMOTD; + }); + serverGlobal.setCallbackString("getServerName", () -> { + return Minecraft.currentServerData.serverName; + }); + serverGlobal.setCallbackString("getGameVersion", () -> { + return Minecraft.currentServerData.gameVersion; + }); + serverGlobal.setCallbackString("getPlayerListToString", () -> { + return Minecraft.currentServerData.playerList; + }); + serverGlobal.setCallbackDouble("getPingSentTime", () -> { + return Minecraft.currentServerData.pingSentTime; + }); + serverGlobal.setCallbackDouble("getPingToServer", () -> { + return Minecraft.currentServerData.pingToServer; + }); + + return serverGlobal; + } +} diff --git a/sources/main/java/net/eaglerforge/gui/GuiMods.java b/sources/main/java/net/eaglerforge/gui/GuiMods.java index 69421b2..949b8d1 100644 --- a/sources/main/java/net/eaglerforge/gui/GuiMods.java +++ b/sources/main/java/net/eaglerforge/gui/GuiMods.java @@ -1,13 +1,13 @@ package net.eaglerforge.gui; -// WIP -radmanplays - import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; +import org.teavm.jso.JSBody; + import com.google.common.collect.Lists; import net.lax1dude.eaglercraft.v1_8.EagRuntime; @@ -34,6 +34,9 @@ public class GuiMods extends GuiScreen { public Minecraft mc = Minecraft.getMinecraft(); private GuiButton deleteButton; + @JSBody(params = { "name" }, script = "return window.prompt(name, '') || '';") + private static native String prompt(String name); + public void updateModsList() { // what is this 'vfs' thing! doesn't even have ability to index a directory!! try { @@ -76,6 +79,9 @@ public class GuiMods extends GuiScreen { this.buttonList.add(deleteButton = new GuiOptionButton(3, this.width / 2 - 154, this.height - 48, I18n.format("selectWorld.delete" + "", new Object[0]))); + this.buttonList.add(btn = new GuiOptionButton(4, this.width / 2, this.height - 48, + I18n.format("eaglerforge.menu.mods.addmodurl" + + "", new Object[0]))); deleteButton.enabled = false; rows = new GuiModList(Minecraft.getMinecraft(), this.width, this.height, 48, this.height - 56, 14, this); rows.registerScrollButtons(4, 5); @@ -109,8 +115,30 @@ public class GuiMods extends GuiScreen { } } modListData.setAllChars(String.join("|", mods_new)); - modList.get(selectedModIdx).delete(); + + //After a bunch of debugging, I think this doesn't properly cleanup anything, as indexedDb is still polluted with deleted mods. + try { + modList.get(selectedModIdx).delete(); + } catch (Exception e) { + // remote mod (url) + } + updateModsList(); + } else if (parGuiButton.id == 4) { + String url = GuiMods.prompt("Enter the mod url: "); + if (url != "" && url != null) { + VFile2 modListData = new VFile2("mods.txt"); + String[] mods = modListData.getAllChars().split("\\|"); + String[] mods_new = new String[mods.length + 1]; + + for (int i = 0; i < mods.length; i++) { + mods_new[i] = mods[i]; + } + mods_new[mods.length] = "web@" + url; + + modListData.setAllChars(String.join("|", mods_new)); + updateModsList(); + } } else { rows.actionPerformed(parGuiButton); } @@ -131,7 +159,7 @@ public class GuiMods extends GuiScreen { this.width / 2, 8, 0xFFFFFF); mc.fontRendererObj.drawSplitString( - "Warning: malicious mods can download files to your device, potentially giving you a virus. They can also ip-grab you and wipe all saved Eaglercraft data.", + "Warning: Mods can run any Javascript code they want, potentially running malicious code. They can also ip-grab you and wipe all saved Eaglercraft data.", 0, 24, this.width - 20, 0xFF2200); // I18n.format("eaglerforge.menu.mods.info", new Object[0]) Don't // know where // to change this, so hardcoded for now :P @@ -205,4 +233,4 @@ public class GuiMods extends GuiScreen { mc.fontRendererObj.drawStringWithShadow(modList.get(entryID).getName(), x, y, 0xFFFFFF); } } -} \ No newline at end of file +} diff --git a/sources/main/java/net/eaglerforge/gui/WIP_GuiMods.java b/sources/main/java/net/eaglerforge/gui/WIP_GuiMods.java new file mode 100644 index 0000000..1f8187d --- /dev/null +++ b/sources/main/java/net/eaglerforge/gui/WIP_GuiMods.java @@ -0,0 +1,230 @@ +package net.eaglerforge.gui; + +// WIP -radmanplays + + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import com.google.common.collect.Lists; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.FileChooserResult; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiOptionButton; +import net.minecraft.client.gui.GuiResourcePackAvailable; +import net.minecraft.client.gui.GuiResourcePackSelected; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; +import net.minecraft.client.resources.ResourcePackListEntry; +import net.minecraft.client.resources.ResourcePackListEntryFound; +import net.minecraft.client.resources.ResourcePackRepository; + + +public class WIP_GuiMods extends GuiScreen { + private static final Logger logger = LogManager.getLogger(); + private final GuiScreen parentScreen; + private List availableResourcePacks; + private List selectedResourcePacks; + private GuiResourcePackAvailable availableResourcePacksList; + private GuiResourcePackSelected selectedResourcePacksList; + private boolean changed = false; + + public WIP_GuiMods(GuiScreen parentScreenIn) { + this.parentScreen = parentScreenIn; + } + + /**+ + * Adds the buttons (and other controls) to the screen in + * question. Called when the GUI is displayed and when the + * window resizes, the buttonList is cleared beforehand. + */ + public void initGui() { + GuiButton btn; + this.buttonList.add(btn = new GuiOptionButton(2, this.width / 2 - 154, this.height - 48, + I18n.format("eaglerforge.menu.mods.addmod" + + "", new Object[0]))); + this.buttonList.add( + new GuiOptionButton(1, this.width / 2 + 4, this.height - 48, I18n.format("gui.done", new Object[0]))); + if (!this.changed) { + this.availableResourcePacks = Lists.newArrayList(); + this.selectedResourcePacks = Lists.newArrayList(); + ResourcePackRepository resourcepackrepository = this.mc.getResourcePackRepository(); + resourcepackrepository.updateRepositoryEntriesAll(); + ArrayList arraylist = Lists.newArrayList(resourcepackrepository.getRepositoryEntriesAll()); + arraylist.removeAll(resourcepackrepository.getRepositoryEntries()); + + } + + this.availableResourcePacksList = new GuiResourcePackAvailable(this.mc, 200, this.height, + this.availableResourcePacks); + this.availableResourcePacksList.setSlotXBoundsFromLeft(this.width / 2 - 4 - 200); + this.availableResourcePacksList.registerScrollButtons(7, 8); + this.selectedResourcePacksList = new GuiResourcePackSelected(this.mc, 200, this.height, + this.selectedResourcePacks); + this.selectedResourcePacksList.setSlotXBoundsFromLeft(this.width / 2 + 4); + this.selectedResourcePacksList.registerScrollButtons(7, 8); + } + + /**+ + * Handles mouse input. + */ + public void handleMouseInput() throws IOException { + super.handleMouseInput(); + this.selectedResourcePacksList.handleMouseInput(); + this.availableResourcePacksList.handleMouseInput(); + } + + public boolean hasResourcePackEntry(ResourcePackListEntry parResourcePackListEntry) { + return this.selectedResourcePacks.contains(parResourcePackListEntry); + } + + /**+ + * Returns the list containing the resource pack entry, returns + * the selected list if it is selected, otherwise returns the + * available list + */ + public List getListContaining(ResourcePackListEntry parResourcePackListEntry) { + return this.hasResourcePackEntry(parResourcePackListEntry) ? this.selectedResourcePacks + : this.availableResourcePacks; + } + + /**+ + * Returns a list containing the available resource packs + */ + public List getAvailableResourcePacks() { + return this.availableResourcePacks; + } + + /**+ + * Returns a list containing the selected resource packs + */ + public List getSelectedResourcePacks() { + return this.selectedResourcePacks; + } + + /**+ + * Called by the controls from the buttonList when activated. + * (Mouse pressed for buttons) + */ + protected void actionPerformed(GuiButton parGuiButton) { + if (parGuiButton.enabled) { + if (parGuiButton.id == 2) { + EagRuntime.displayFileChooser("text/javascript", "js"); + } else if (parGuiButton.id == 1) { + if (this.changed) { + ArrayList arraylist = Lists.newArrayList(); + + for (ResourcePackListEntry resourcepacklistentry : this.selectedResourcePacks) { + if (resourcepacklistentry instanceof ResourcePackListEntryFound) { + arraylist.add(((ResourcePackListEntryFound) resourcepacklistentry).func_148318_i()); + } + } + + Collections.reverse(arraylist); + this.mc.getResourcePackRepository().setRepositories(arraylist); + this.mc.gameSettings.resourcePacks.clear(); + this.mc.gameSettings.field_183018_l.clear(); + + for (ResourcePackRepository.Entry resourcepackrepository$entry : (List) arraylist) { + this.mc.gameSettings.resourcePacks.add(resourcepackrepository$entry.getResourcePackName()); + if (resourcepackrepository$entry.func_183027_f() != 1) { + this.mc.gameSettings.field_183018_l.add(resourcepackrepository$entry.getResourcePackName()); + } + } + + this.mc.loadingScreen.eaglerShow(I18n.format("resourcePack.load.refreshing"), + I18n.format("resourcePack.load.pleaseWait")); + this.mc.gameSettings.saveOptions(); + this.mc.refreshResources(); + } + this.mc.displayGuiScreen(this.parentScreen); + } + + } + } + + public void updateScreen() { + FileChooserResult packFile = null; + if (EagRuntime.fileChooserHasResult()) { + packFile = EagRuntime.getFileChooserResult(); + } + if (packFile == null) + return; + logger.info("Loading resource pack: {}", packFile.fileName); + mc.loadingScreen.eaglerShow(I18n.format("resourcePack.load.loading"), packFile.fileName); + + ArrayList arraylist = Lists.newArrayList(); + + for (ResourcePackListEntry resourcepacklistentry : this.selectedResourcePacks) { + if (resourcepacklistentry instanceof ResourcePackListEntryFound) { + arraylist.add(((ResourcePackListEntryFound) resourcepacklistentry).func_148318_i()); + } + } + + Collections.reverse(arraylist); + this.mc.getResourcePackRepository().setRepositories(arraylist); + this.mc.gameSettings.resourcePacks.clear(); + this.mc.gameSettings.field_183018_l.clear(); + + for (ResourcePackRepository.Entry resourcepackrepository$entry : (List) arraylist) { + this.mc.gameSettings.resourcePacks.add(resourcepackrepository$entry.getResourcePackName()); + if (resourcepackrepository$entry.func_183027_f() != 1) { + this.mc.gameSettings.field_183018_l.add(resourcepackrepository$entry.getResourcePackName()); + } + } + + this.mc.gameSettings.saveOptions(); + + boolean wasChanged = this.changed; + this.changed = false; + this.initGui(); + this.changed = wasChanged; + } + + /**+ + * Called when the mouse is clicked. Args : mouseX, mouseY, + * clickedButton + */ + protected void mouseClicked(int parInt1, int parInt2, int parInt3) { + super.mouseClicked(parInt1, parInt2, parInt3); + this.availableResourcePacksList.mouseClicked(parInt1, parInt2, parInt3); + this.selectedResourcePacksList.mouseClicked(parInt1, parInt2, parInt3); + } + + /**+ + * Called when a mouse button is released. Args : mouseX, + * mouseY, releaseButton + */ + protected void mouseReleased(int i, int j, int k) { + super.mouseReleased(i, j, k); + } + + /**+ + * Draws the screen and all the components in it. Args : mouseX, + * mouseY, renderPartialTicks + */ + public void drawScreen(int i, int j, float f) { + this.drawBackground(0); + this.availableResourcePacksList.drawScreen(i, j, f); + this.selectedResourcePacksList.drawScreen(i, j, f); + this.drawCenteredString(this.fontRendererObj, I18n.format("eaglerforge.menu.mods", new Object[0]), this.width / 2, + 16, 16777215); + this.drawCenteredString(this.fontRendererObj, I18n.format("eaglerforge.menu.mods.info", new Object[0]), + this.width / 2 - 77, this.height - 26, 0xFF0000); + super.drawScreen(i, j, f); + } + + /**+ + * Marks the selected resource packs list as changed to trigger + * a resource reload when the screen is closed + */ + public void markChanged() { + this.changed = true; + } +} \ No newline at end of file diff --git a/sources/main/java/net/eaglerforge/reflect/PLReflect.java b/sources/main/java/net/eaglerforge/reflect/PLReflect.java index 952d293..f1e9fa5 100644 --- a/sources/main/java/net/eaglerforge/reflect/PLReflect.java +++ b/sources/main/java/net/eaglerforge/reflect/PLReflect.java @@ -158,6 +158,7 @@ import net.minecraft.world.World; import net.minecraft.world.WorldSettings.GameType; import java.util.Calendar; import java.lang.String; +import me.otterdev.UwUAPI; import net.minecraft.init.Items; import net.minecraft.init.Blocks; import net.minecraft.client.entity.AbstractClientPlayer; @@ -267,6 +268,7 @@ import org.teavm.jso.JSFunctor; public class PLReflect extends ModData { @JSBody(params = { "reflectInst" }, script = "reflectInst.getMethodMapFromClass = function(classObj) {var outMethodMap = {}; classObj.methods.forEach(method=>{outMethodMap[method.methodName]=method;}); return outMethodMap;}") public static native BaseData setMethodMapFn(BaseData reflectInst); + //classdef for World public static void reflect_World_generator(ArrayList reflectProfiles) { @@ -35994,13 +35996,30 @@ public class PLReflect extends ModData { reflect_EaglercraftGPU_methods.add(reflect_EaglercraftGPU_method_getNativeTexture_30); - BaseData reflect_EaglercraftGPU_method_drawHighPoly_31 = new ModData(); - reflect_EaglercraftGPU_method_drawHighPoly_31.set("methodName", "drawHighPoly"); - reflect_EaglercraftGPU_method_drawHighPoly_31.set("returnType", "void"); - reflect_EaglercraftGPU_method_drawHighPoly_31.set("static", false); - reflect_EaglercraftGPU_method_drawHighPoly_31.set("argnames", new String[]{"mesh"}); - reflect_EaglercraftGPU_method_drawHighPoly_31.set("argtypes", new String[]{"HighPolyMesh"}); - reflect_EaglercraftGPU_method_drawHighPoly_31.setCallbackVoidWithDataArg("exec", (BaseData params) -> { + BaseData reflect_EaglercraftGPU_method_regenerateTexture_31 = new ModData(); + reflect_EaglercraftGPU_method_regenerateTexture_31.set("methodName", "regenerateTexture"); + reflect_EaglercraftGPU_method_regenerateTexture_31.set("returnType", "void"); + reflect_EaglercraftGPU_method_regenerateTexture_31.set("static", false); + reflect_EaglercraftGPU_method_regenerateTexture_31.set("argnames", new String[]{"tex"}); + reflect_EaglercraftGPU_method_regenerateTexture_31.set("argtypes", new String[]{"int"}); + reflect_EaglercraftGPU_method_regenerateTexture_31.setCallbackVoidWithDataArg("exec", (BaseData params) -> { + try { + ((EaglercraftGPU) params.getReflective("_self")).regenerateTexture((int) params.getInt("tex")); + } catch (Exception _exception_reflect_) { + return; + } + }); + + reflect_EaglercraftGPU_methods.add(reflect_EaglercraftGPU_method_regenerateTexture_31); + + + BaseData reflect_EaglercraftGPU_method_drawHighPoly_32 = new ModData(); + reflect_EaglercraftGPU_method_drawHighPoly_32.set("methodName", "drawHighPoly"); + reflect_EaglercraftGPU_method_drawHighPoly_32.set("returnType", "void"); + reflect_EaglercraftGPU_method_drawHighPoly_32.set("static", false); + reflect_EaglercraftGPU_method_drawHighPoly_32.set("argnames", new String[]{"mesh"}); + reflect_EaglercraftGPU_method_drawHighPoly_32.set("argtypes", new String[]{"HighPolyMesh"}); + reflect_EaglercraftGPU_method_drawHighPoly_32.setCallbackVoidWithDataArg("exec", (BaseData params) -> { try { ((EaglercraftGPU) params.getReflective("_self")).drawHighPoly((HighPolyMesh) params.getReflective("mesh")); } catch (Exception _exception_reflect_) { @@ -36008,35 +36027,18 @@ public class PLReflect extends ModData { } }); - reflect_EaglercraftGPU_methods.add(reflect_EaglercraftGPU_method_drawHighPoly_31); - - - BaseData reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_32 = new ModData(); - reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_32.set("methodName", "createFramebufferHDR16FTexture"); - reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_32.set("returnType", "void"); - reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_32.set("static", false); - reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_32.set("argnames", new String[]{"target", "level", "w", "h", "format", "allow32bitFallback"}); - reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_32.set("argtypes", new String[]{"int", "int", "int", "int", "int", "boolean"}); - reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_32.setCallbackVoidWithDataArg("exec", (BaseData params) -> { - try { - ((EaglercraftGPU) params.getReflective("_self")).createFramebufferHDR16FTexture((int) params.getInt("target"), (int) params.getInt("level"), (int) params.getInt("w"), (int) params.getInt("h"), (int) params.getInt("format"), (boolean) params.getBoolean("allow32bitFallback")); - } catch (Exception _exception_reflect_) { - return; - } - }); - - reflect_EaglercraftGPU_methods.add(reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_32); + reflect_EaglercraftGPU_methods.add(reflect_EaglercraftGPU_method_drawHighPoly_32); BaseData reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_33 = new ModData(); reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_33.set("methodName", "createFramebufferHDR16FTexture"); reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_33.set("returnType", "void"); reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_33.set("static", false); - reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_33.set("argnames", new String[]{"target", "level", "w", "h", "format", "pixelData"}); - reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_33.set("argtypes", new String[]{"int", "int", "int", "int", "int", "ByteBuffer"}); + reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_33.set("argnames", new String[]{"target", "level", "w", "h", "format", "allow32bitFallback"}); + reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_33.set("argtypes", new String[]{"int", "int", "int", "int", "int", "boolean"}); reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_33.setCallbackVoidWithDataArg("exec", (BaseData params) -> { try { - ((EaglercraftGPU) params.getReflective("_self")).createFramebufferHDR16FTexture((int) params.getInt("target"), (int) params.getInt("level"), (int) params.getInt("w"), (int) params.getInt("h"), (int) params.getInt("format"), (ByteBuffer) params.getReflective("pixelData")); + ((EaglercraftGPU) params.getReflective("_self")).createFramebufferHDR16FTexture((int) params.getInt("target"), (int) params.getInt("level"), (int) params.getInt("w"), (int) params.getInt("h"), (int) params.getInt("format"), (boolean) params.getBoolean("allow32bitFallback")); } catch (Exception _exception_reflect_) { return; } @@ -36045,32 +36047,32 @@ public class PLReflect extends ModData { reflect_EaglercraftGPU_methods.add(reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_33); - BaseData reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_34 = new ModData(); - reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_34.set("methodName", "createFramebufferHDR32FTexture"); - reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_34.set("returnType", "void"); - reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_34.set("static", false); - reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_34.set("argnames", new String[]{"target", "level", "w", "h", "format", "allow16bitFallback"}); - reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_34.set("argtypes", new String[]{"int", "int", "int", "int", "int", "boolean"}); - reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_34.setCallbackVoidWithDataArg("exec", (BaseData params) -> { + BaseData reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_34 = new ModData(); + reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_34.set("methodName", "createFramebufferHDR16FTexture"); + reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_34.set("returnType", "void"); + reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_34.set("static", false); + reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_34.set("argnames", new String[]{"target", "level", "w", "h", "format", "pixelData"}); + reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_34.set("argtypes", new String[]{"int", "int", "int", "int", "int", "ByteBuffer"}); + reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_34.setCallbackVoidWithDataArg("exec", (BaseData params) -> { try { - ((EaglercraftGPU) params.getReflective("_self")).createFramebufferHDR32FTexture((int) params.getInt("target"), (int) params.getInt("level"), (int) params.getInt("w"), (int) params.getInt("h"), (int) params.getInt("format"), (boolean) params.getBoolean("allow16bitFallback")); + ((EaglercraftGPU) params.getReflective("_self")).createFramebufferHDR16FTexture((int) params.getInt("target"), (int) params.getInt("level"), (int) params.getInt("w"), (int) params.getInt("h"), (int) params.getInt("format"), (ByteBuffer) params.getReflective("pixelData")); } catch (Exception _exception_reflect_) { return; } }); - reflect_EaglercraftGPU_methods.add(reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_34); + reflect_EaglercraftGPU_methods.add(reflect_EaglercraftGPU_method_createFramebufferHDR16FTexture_34); BaseData reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_35 = new ModData(); reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_35.set("methodName", "createFramebufferHDR32FTexture"); reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_35.set("returnType", "void"); reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_35.set("static", false); - reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_35.set("argnames", new String[]{"target", "level", "w", "h", "format", "pixelData"}); - reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_35.set("argtypes", new String[]{"int", "int", "int", "int", "int", "ByteBuffer"}); + reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_35.set("argnames", new String[]{"target", "level", "w", "h", "format", "allow16bitFallback"}); + reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_35.set("argtypes", new String[]{"int", "int", "int", "int", "int", "boolean"}); reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_35.setCallbackVoidWithDataArg("exec", (BaseData params) -> { try { - ((EaglercraftGPU) params.getReflective("_self")).createFramebufferHDR32FTexture((int) params.getInt("target"), (int) params.getInt("level"), (int) params.getInt("w"), (int) params.getInt("h"), (int) params.getInt("format"), (ByteBuffer) params.getReflective("pixelData")); + ((EaglercraftGPU) params.getReflective("_self")).createFramebufferHDR32FTexture((int) params.getInt("target"), (int) params.getInt("level"), (int) params.getInt("w"), (int) params.getInt("h"), (int) params.getInt("format"), (boolean) params.getBoolean("allow16bitFallback")); } catch (Exception _exception_reflect_) { return; } @@ -36079,13 +36081,30 @@ public class PLReflect extends ModData { reflect_EaglercraftGPU_methods.add(reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_35); - BaseData reflect_EaglercraftGPU_method_warmUpCache_36 = new ModData(); - reflect_EaglercraftGPU_method_warmUpCache_36.set("methodName", "warmUpCache"); - reflect_EaglercraftGPU_method_warmUpCache_36.set("returnType", "void"); - reflect_EaglercraftGPU_method_warmUpCache_36.set("static", false); - reflect_EaglercraftGPU_method_warmUpCache_36.set("argnames", new String[]{}); - reflect_EaglercraftGPU_method_warmUpCache_36.set("argtypes", new String[]{}); - reflect_EaglercraftGPU_method_warmUpCache_36.setCallbackVoidWithDataArg("exec", (BaseData params) -> { + BaseData reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_36 = new ModData(); + reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_36.set("methodName", "createFramebufferHDR32FTexture"); + reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_36.set("returnType", "void"); + reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_36.set("static", false); + reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_36.set("argnames", new String[]{"target", "level", "w", "h", "format", "pixelData"}); + reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_36.set("argtypes", new String[]{"int", "int", "int", "int", "int", "ByteBuffer"}); + reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_36.setCallbackVoidWithDataArg("exec", (BaseData params) -> { + try { + ((EaglercraftGPU) params.getReflective("_self")).createFramebufferHDR32FTexture((int) params.getInt("target"), (int) params.getInt("level"), (int) params.getInt("w"), (int) params.getInt("h"), (int) params.getInt("format"), (ByteBuffer) params.getReflective("pixelData")); + } catch (Exception _exception_reflect_) { + return; + } + }); + + reflect_EaglercraftGPU_methods.add(reflect_EaglercraftGPU_method_createFramebufferHDR32FTexture_36); + + + BaseData reflect_EaglercraftGPU_method_warmUpCache_37 = new ModData(); + reflect_EaglercraftGPU_method_warmUpCache_37.set("methodName", "warmUpCache"); + reflect_EaglercraftGPU_method_warmUpCache_37.set("returnType", "void"); + reflect_EaglercraftGPU_method_warmUpCache_37.set("static", false); + reflect_EaglercraftGPU_method_warmUpCache_37.set("argnames", new String[]{}); + reflect_EaglercraftGPU_method_warmUpCache_37.set("argtypes", new String[]{}); + reflect_EaglercraftGPU_method_warmUpCache_37.setCallbackVoidWithDataArg("exec", (BaseData params) -> { try { ((EaglercraftGPU) params.getReflective("_self")).warmUpCache(); } catch (Exception _exception_reflect_) { @@ -36093,16 +36112,16 @@ public class PLReflect extends ModData { } }); - reflect_EaglercraftGPU_methods.add(reflect_EaglercraftGPU_method_warmUpCache_36); + reflect_EaglercraftGPU_methods.add(reflect_EaglercraftGPU_method_warmUpCache_37); - BaseData reflect_EaglercraftGPU_method_checkHDRFramebufferSupport_37 = new ModData(); - reflect_EaglercraftGPU_method_checkHDRFramebufferSupport_37.set("methodName", "checkHDRFramebufferSupport"); - reflect_EaglercraftGPU_method_checkHDRFramebufferSupport_37.set("returnType", "boolean"); - reflect_EaglercraftGPU_method_checkHDRFramebufferSupport_37.set("static", false); - reflect_EaglercraftGPU_method_checkHDRFramebufferSupport_37.set("argnames", new String[]{"bits"}); - reflect_EaglercraftGPU_method_checkHDRFramebufferSupport_37.set("argtypes", new String[]{"int"}); - reflect_EaglercraftGPU_method_checkHDRFramebufferSupport_37.setCallbackBooleanWithDataArg("exec", (BaseData params) -> { + BaseData reflect_EaglercraftGPU_method_checkHDRFramebufferSupport_38 = new ModData(); + reflect_EaglercraftGPU_method_checkHDRFramebufferSupport_38.set("methodName", "checkHDRFramebufferSupport"); + reflect_EaglercraftGPU_method_checkHDRFramebufferSupport_38.set("returnType", "boolean"); + reflect_EaglercraftGPU_method_checkHDRFramebufferSupport_38.set("static", false); + reflect_EaglercraftGPU_method_checkHDRFramebufferSupport_38.set("argnames", new String[]{"bits"}); + reflect_EaglercraftGPU_method_checkHDRFramebufferSupport_38.set("argtypes", new String[]{"int"}); + reflect_EaglercraftGPU_method_checkHDRFramebufferSupport_38.setCallbackBooleanWithDataArg("exec", (BaseData params) -> { try { return (boolean) ((EaglercraftGPU) params.getReflective("_self")).checkHDRFramebufferSupport((int) params.getInt("bits")); } catch (Exception _exception_reflect_) { @@ -36110,16 +36129,16 @@ public class PLReflect extends ModData { } }); - reflect_EaglercraftGPU_methods.add(reflect_EaglercraftGPU_method_checkHDRFramebufferSupport_37); + reflect_EaglercraftGPU_methods.add(reflect_EaglercraftGPU_method_checkHDRFramebufferSupport_38); - BaseData reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupport_38 = new ModData(); - reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupport_38.set("methodName", "checkHasHDRFramebufferSupport"); - reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupport_38.set("returnType", "boolean"); - reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupport_38.set("static", false); - reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupport_38.set("argnames", new String[]{}); - reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupport_38.set("argtypes", new String[]{}); - reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupport_38.setCallbackBooleanWithDataArg("exec", (BaseData params) -> { + BaseData reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupport_39 = new ModData(); + reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupport_39.set("methodName", "checkHasHDRFramebufferSupport"); + reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupport_39.set("returnType", "boolean"); + reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupport_39.set("static", false); + reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupport_39.set("argnames", new String[]{}); + reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupport_39.set("argtypes", new String[]{}); + reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupport_39.setCallbackBooleanWithDataArg("exec", (BaseData params) -> { try { return (boolean) ((EaglercraftGPU) params.getReflective("_self")).checkHasHDRFramebufferSupport(); } catch (Exception _exception_reflect_) { @@ -36127,16 +36146,16 @@ public class PLReflect extends ModData { } }); - reflect_EaglercraftGPU_methods.add(reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupport_38); + reflect_EaglercraftGPU_methods.add(reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupport_39); - BaseData reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupportWithFilter_39 = new ModData(); - reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupportWithFilter_39.set("methodName", "checkHasHDRFramebufferSupportWithFilter"); - reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupportWithFilter_39.set("returnType", "boolean"); - reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupportWithFilter_39.set("static", false); - reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupportWithFilter_39.set("argnames", new String[]{}); - reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupportWithFilter_39.set("argtypes", new String[]{}); - reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupportWithFilter_39.setCallbackBooleanWithDataArg("exec", (BaseData params) -> { + BaseData reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupportWithFilter_40 = new ModData(); + reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupportWithFilter_40.set("methodName", "checkHasHDRFramebufferSupportWithFilter"); + reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupportWithFilter_40.set("returnType", "boolean"); + reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupportWithFilter_40.set("static", false); + reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupportWithFilter_40.set("argnames", new String[]{}); + reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupportWithFilter_40.set("argtypes", new String[]{}); + reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupportWithFilter_40.setCallbackBooleanWithDataArg("exec", (BaseData params) -> { try { return (boolean) ((EaglercraftGPU) params.getReflective("_self")).checkHasHDRFramebufferSupportWithFilter(); } catch (Exception _exception_reflect_) { @@ -36144,16 +36163,16 @@ public class PLReflect extends ModData { } }); - reflect_EaglercraftGPU_methods.add(reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupportWithFilter_39); + reflect_EaglercraftGPU_methods.add(reflect_EaglercraftGPU_method_checkHasHDRFramebufferSupportWithFilter_40); - BaseData reflect_EaglercraftGPU_method_checkLinearHDR32FSupport_40 = new ModData(); - reflect_EaglercraftGPU_method_checkLinearHDR32FSupport_40.set("methodName", "checkLinearHDR32FSupport"); - reflect_EaglercraftGPU_method_checkLinearHDR32FSupport_40.set("returnType", "boolean"); - reflect_EaglercraftGPU_method_checkLinearHDR32FSupport_40.set("static", false); - reflect_EaglercraftGPU_method_checkLinearHDR32FSupport_40.set("argnames", new String[]{}); - reflect_EaglercraftGPU_method_checkLinearHDR32FSupport_40.set("argtypes", new String[]{}); - reflect_EaglercraftGPU_method_checkLinearHDR32FSupport_40.setCallbackBooleanWithDataArg("exec", (BaseData params) -> { + BaseData reflect_EaglercraftGPU_method_checkLinearHDR32FSupport_41 = new ModData(); + reflect_EaglercraftGPU_method_checkLinearHDR32FSupport_41.set("methodName", "checkLinearHDR32FSupport"); + reflect_EaglercraftGPU_method_checkLinearHDR32FSupport_41.set("returnType", "boolean"); + reflect_EaglercraftGPU_method_checkLinearHDR32FSupport_41.set("static", false); + reflect_EaglercraftGPU_method_checkLinearHDR32FSupport_41.set("argnames", new String[]{}); + reflect_EaglercraftGPU_method_checkLinearHDR32FSupport_41.set("argtypes", new String[]{}); + reflect_EaglercraftGPU_method_checkLinearHDR32FSupport_41.setCallbackBooleanWithDataArg("exec", (BaseData params) -> { try { return (boolean) ((EaglercraftGPU) params.getReflective("_self")).checkLinearHDR32FSupport(); } catch (Exception _exception_reflect_) { @@ -36161,7 +36180,7 @@ public class PLReflect extends ModData { } }); - reflect_EaglercraftGPU_methods.add(reflect_EaglercraftGPU_method_checkLinearHDR32FSupport_40); + reflect_EaglercraftGPU_methods.add(reflect_EaglercraftGPU_method_checkLinearHDR32FSupport_41); BaseData[] reflect_EaglercraftGPU_methods_arr = new BaseData[reflect_EaglercraftGPU_methods.size()]; @@ -38390,6 +38409,53 @@ public class PLReflect extends ModData { } + //classdef for UwUAPI + public static void reflect_UwUAPI_generator(ArrayList reflectProfiles) { + BaseData reflect_UwUAPI = new ModData(); + + ArrayList reflect_UwUAPI_constructors = new ArrayList(); + + BaseData[] reflect_UwUAPI_constructors_arr = new BaseData[reflect_UwUAPI_constructors.size()]; + for (int i = 0; i < reflect_UwUAPI_constructors_arr.length; i++) { + reflect_UwUAPI_constructors_arr[i] = reflect_UwUAPI_constructors.get(i); + } + + ArrayList reflect_UwUAPI_methods = new ArrayList(); + + BaseData reflect_UwUAPI_method_uwuify_0 = new ModData(); + reflect_UwUAPI_method_uwuify_0.set("methodName", "uwuify"); + reflect_UwUAPI_method_uwuify_0.set("returnType", "String"); + reflect_UwUAPI_method_uwuify_0.set("static", true); + reflect_UwUAPI_method_uwuify_0.set("argnames", new String[]{"stringToUwuify"}); + reflect_UwUAPI_method_uwuify_0.set("argtypes", new String[]{"String"}); + reflect_UwUAPI_method_uwuify_0.setCallbackStringWithDataArg("exec", (BaseData params) -> { + try { + return (String) UwUAPI.uwuify((String) params.getString("stringToUwuify")); + } catch (Exception _exception_reflect_) { + return ""; + } + }); + + reflect_UwUAPI_methods.add(reflect_UwUAPI_method_uwuify_0); + + + BaseData[] reflect_UwUAPI_methods_arr = new BaseData[reflect_UwUAPI_methods.size()]; + for (int i = 0; i < reflect_UwUAPI_methods_arr.length; i++) { + reflect_UwUAPI_methods_arr[i] = reflect_UwUAPI_methods.get(i); + } + + reflect_UwUAPI.set("constructors", reflect_UwUAPI_constructors_arr); + reflect_UwUAPI.set("methods", reflect_UwUAPI_methods_arr); + reflect_UwUAPI.set("className", "UwUAPI"); + reflect_UwUAPI.set("classId", "me.otterdev.UwUAPI"); + reflect_UwUAPI.set("class", UwUAPI.class); + reflect_UwUAPI.setCallbackBooleanWithDataArg("isObjInstanceOf", (args)->{ + return args.getReflective("obj") instanceof UwUAPI; + }); + reflectProfiles.add(reflect_UwUAPI); + } + + public static PLReflect makeModData() { PLReflect plReflectGlobal = new PLReflect(); @@ -38484,6 +38550,7 @@ public class PLReflect extends ModData { PLReflect.reflect_GlStateManager_generator(reflectProfiles); PLReflect.reflect_VertexFormat_generator(reflectProfiles); PLReflect.reflect_WorldRenderer_generator(reflectProfiles); + PLReflect.reflect_UwUAPI_generator(reflectProfiles); BaseData[] reflectProfilesArr = new BaseData[reflectProfiles.size()]; for (int i = 0; i < reflectProfilesArr.length; i++) { diff --git a/sources/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftVersion.java b/sources/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftVersion.java index 28799cf..c899287 100644 --- a/sources/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftVersion.java +++ b/sources/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftVersion.java @@ -3,7 +3,7 @@ package net.lax1dude.eaglercraft.v1_8; import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; import java.math.BigInteger; -import static net.eaglerforge.api.ModLoader.returntotalloadedmods; +import net.eaglerforge.api.ModLoader; public class EaglercraftVersion { @@ -46,7 +46,8 @@ public class EaglercraftVersion { public static final String mainMenuStringA = "Minecraft* 1.8.8"; public static String getMainMenuStringB() { - int loadedmods = returntotalloadedmods(); + //int loadedmods = ModLoader.returnTotalLoadedMods(); + int loadedmods = -1; String mainMenuStringB = projectForkName + " " + projectForkVersion; if(!PlatformRuntime.isDebugRuntime()) { if(loadedmods == 1) {