2024-02-10 08:02:04 -06:00
|
|
|
package net.eaglerforge;
|
|
|
|
|
|
|
|
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
|
|
|
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
2024-03-06 06:11:37 -06:00
|
|
|
import net.minecraft.client.Minecraft;
|
2024-02-13 04:19:11 -06:00
|
|
|
import org.teavm.jso.JSBody;
|
2024-05-29 10:56:04 -05:00
|
|
|
import org.teavm.jso.browser.Window;
|
|
|
|
import org.teavm.jso.dom.html.HTMLBodyElement;
|
|
|
|
import org.teavm.jso.dom.html.HTMLElement;
|
|
|
|
import org.teavm.jso.dom.html.HTMLImageElement;
|
|
|
|
|
2024-03-06 06:11:37 -06:00
|
|
|
import static net.minecraft.client.Minecraft.mojangLogo;
|
2024-02-10 23:54:25 -06:00
|
|
|
|
2024-02-15 06:00:47 -06:00
|
|
|
|
2024-02-10 08:02:04 -06:00
|
|
|
public class EaglerForge {
|
2024-03-06 06:11:37 -06:00
|
|
|
private static Minecraft mc;
|
2024-02-10 08:02:04 -06:00
|
|
|
public static final Logger log = LogManager.getLogger();
|
2024-02-13 04:19:11 -06:00
|
|
|
@JSBody(params = { "message" }, script = "alert(message)")
|
|
|
|
public static native void jsalert(String message);
|
|
|
|
|
|
|
|
@JSBody(params = { "message" }, script = "console.log(message)")
|
|
|
|
public static native void jsconsolelog(String message);
|
|
|
|
|
|
|
|
@JSBody(params = { "message" }, script = "prompt(message)")
|
|
|
|
public static native void jsprompt(String message);
|
|
|
|
@JSBody(params = { "message", "default_text" }, script = "prompt(message, default_text)")
|
|
|
|
public static native void jspromptdt(String message, String default_text);
|
2024-05-29 10:56:04 -05:00
|
|
|
|
|
|
|
public static void displayanvil() {
|
|
|
|
HTMLImageElement img = (HTMLImageElement) Window.current().getDocument().createElement("img");
|
|
|
|
img.setAttribute("id", "anvil");
|
|
|
|
img.setSrc(src);
|
|
|
|
img.setAttribute("draggable", "false");
|
|
|
|
img.getStyle().setProperty("position", "fixed");
|
|
|
|
img.getStyle().setProperty("bottom", "0");
|
|
|
|
img.getStyle().setProperty("right", "0");
|
|
|
|
img.getStyle().setProperty("width", "200px");
|
|
|
|
img.getStyle().setProperty("height", "auto");
|
|
|
|
|
|
|
|
HTMLBodyElement body = (HTMLBodyElement) Window.current().getDocument().getBody();
|
|
|
|
body.appendChild(img);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void removeanvil() {
|
|
|
|
HTMLElement element = Window.current().getDocument().getElementById("anvil");
|
|
|
|
|
|
|
|
if (element != null) {
|
|
|
|
element.getParentNode().removeChild(element);
|
|
|
|
}
|
|
|
|
}
|
2024-02-13 04:19:11 -06:00
|
|
|
|
2024-02-10 08:02:04 -06:00
|
|
|
public static void init() {
|
|
|
|
log.info("Starting EaglerForge!");
|
2024-03-06 06:11:37 -06:00
|
|
|
displayanvil();
|
2024-02-10 08:02:04 -06:00
|
|
|
log.info("Loading Mods...");
|
|
|
|
}
|
2024-05-29 10:56:04 -05:00
|
|
|
|
|
|
|
public static String src = "data:image/gif;base64,R0lGODlhkAGQAff+AAAAAAEBAQQEBAUFBQYGBQ4NDhoaGhsbGx0dHSQkJCUlJSYmJicnJygoKCkpKS8vLzAwMDU1NQABBgADBgEAAQEAAgEAAwEABAEBAAEBAgECAAECAwIAAQIAAwICAgIDAAMAAgMABQMBAAMBAgMBBAMDAwQAAQQAAwQCBAQEAQUAAAUDBQYAAAYBBwYCAQcBAwgFBggICAkJCQoBAAoKCwsIAwwMDA0AAA0EAQ0KBg8PDxAQEBERERIFARMBABMTExQLBRQUFBUGAhYRDhYWFhcXFxgMBRkOBxkYGR4PBB4SCh4eHh8fHyAWEiAgICIiIiQaFSYUBCYdGCkXCCofGysrKywaCy0tLS8iGTEdDTEmIjIjGDIyMjMzMzQ0NDYoHjYrJTY2NjgkEzg4ODovKjo6Ojw8PD4oFj4xJT4yKz4+PkEtHEFBQUI2MENDQ0YwHEZGRkhISEk9Nko1IUpKSk9CO09PT1A7JlBQUFJSUl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