#Obfuscated library mod

21 messages · Page 1 of 1 (latest)

soft shale
jolly lava
#

what's videoManager?

fierce patio
#

That isn't obfuscation. Just compiled code without mappings concern

jolly lava
#

yeah since Identifier is mapped, it seems like whatever video manager is coming from isn't

fierce patio
#

So ye. Main question now is where is VideoManager come from

tidal birch
#

share your build.gradle file @soft shale

soft shale
# tidal birch share your build.gradle file <@598433362373509131>
plugins {
    id 'fabric-loom' version '1.8-SNAPSHOT'
    id 'maven-publish'
}

version = project.mod_version
group = project.maven_group

base {
    archivesName = project.archives_base_name
}

repositories {
    maven { url 'https://jitpack.io' }
    // Add repositories to retrieve artifacts from in here.
    // You should only use this when depending on other mods because
    // Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
    // See https://docs.gradle.org/current/userguide/declaring_repositories.html
    // for more information about repositories.
}

dependencies {
    //modApi("dev.polv.VLCVideo-API-PolCinematics:vlcvideoapi-fabric:2.1.0")
    //implementation("dev.polv.VLCVideo-API-PolCinematics:vlcvideoapi:2.1.0")
    modImplementation 'com.github.Igrium:VideoLib:0.1.2-SNAPSHOT'
    //include 'com.github.Igrium:VideoLib:0.1.2-SNAPSHOT'
    
    // To change the versions see the gradle.properties file
    minecraft "com.mojang:minecraft:${project.minecraft_version}"
    mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
    modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

    // Fabric API. This is technically optional, but you probably want it anyway.
    modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
    
}

processResources {
    inputs.property "version", project.version

    filesMatching("fabric.mod.json") {
        expand "version": project.version
    }
}
soft shale
tidal birch
soft shale
#

this is a library for working with video in a game

tidal birch
#

What is the type of videoManager?

#

Which library is it from?

soft shale
# tidal birch What is the type of videoManager?
        // Получаем VideoManager
        /*videoManager = VideoLib.getInstance().getVideoManager();

        // Создаем VideoPlayer с уникальным ID
        videoPlayer = videoManager.getOrCreate(new Identifier(MOD_ID, "main_player"));

        // Регистрируем обработчик клавиш
        ClientTickEvents.END_CLIENT_TICK.register(client -> {
            // Проверяем нажатие клавиши V для воспроизведения видео
            if (client.options.keyInventory.wasPressed() && !hasInitialized) {
                playVideo();
                hasInitialized = true;
            }
        });
    }

    private void playVideo() {
        try {
            // Создаем VideoHandle для локального файла
            VideoHandle handle = videoManager.getVideoHandleFactory()
                    .getVideoHandle(new Identifier(MOD_ID, "videos/file.mp4"));

            // Создаем экран для отображения видео
            VideoScreen screen = new VideoScreen(videoPlayer);

            // Воспроизводим видео и показываем экран
            screen.playAndShow(handle);

            // Устанавливаем текущий экран
            MinecraftClient.getInstance().setScreen(screen);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
tidal birch
#

I see. I don't see an error in the library which causes this. You can try to refresh the gradle dependencies, which may fix the problem. Use this command:
./gradlew --refresh-dependencies

soft shale
#

Sorry, I'm using a translator, maybe he's missing some nuances

#

You understand what my problem is?

jolly lava
#

the library's code isn't being remapped. when you use modImplementation, loom should remap (doesn't matter yarn or mojmap)

tidal birch
# soft shale Sorry, I'm using a translator, maybe he's missing some nuances

Вы должны выполнить эту команду в вашем проекте: ./gradlew --refresh-dependencies
Если с VideoLib что-то не так, она загрузит его снова. Проблема, с которой вы столкнулись, связана с тем, что Loom не переименовал class_2960 в Identifier. Он должен это сделать, но возникла проблема, которую можно устранить, загрузив VideoLib снова. Если это не сработает, вы можете удалить папку «.gradle» в вашем проекте.