MeepMeep

make it jar build it gradle

Kodari AI
KodariNov 11 at 6:47 am 1
  1. Click Compile in the top bar (on phone, tap ⋮ → Compile Project).

  2. Click Compile in the window that opens.

  3. When it succeeds, click Download on the build to get the JAR.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
README.md
settings.gradle
Code
10 554
src/main/java/com/ingamevideo/InGameVideoClient.java
package com.ingamevideo;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.util.InputUtil;
import org.lwjgl.glfw.GLFW;

public class InGameVideoClient implements ClientModInitializer {
    private static KeyBinding openKey;

    @Override
    public void onInitializeClient() {
        // Starts loading Chromium in the background (first launch downloads it).
        Mcef.initialize();

        openKey = KeyBindingHelper.registerKeyBinding(new KeyBinding(
                "key.ingamevideo.open",
                InputUtil.Type.KEYSYM,
                GLFW.GLFW_KEY_V,
                KeyBinding.Category.MISC
        ));

        ClientTickEvents.END_CLIENT_TICK.register(client -> {
            while (openKey.wasPressed()) {
                if (client.currentScreen == null) {
                    client.setScreen(new VideoScreen());
                }
            }
        });
    }
}