#Obfuscated library mod
21 messages · Page 1 of 1 (latest)
what's videoManager?
That isn't obfuscation. Just compiled code without mappings 
yeah since Identifier is mapped, it seems like whatever video manager is coming from isn't
So ye. Main question now is where is VideoManager come from
share your build.gradle file @soft shale
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
}
}
that is, I need to use mojange mappigs instead of yarn?
Which dependency is videoManager.getOrCreate from?
It is there and import it into the code, the fact is that it contains class_2910 instead of Identifier
this is a library for working with video in a game
// Получаем 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();
}
}
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
Sorry, I'm using a translator, maybe he's missing some nuances
You understand what my problem is?
the library's code isn't being remapped. when you use modImplementation, loom should remap (doesn't matter yarn or mojmap)
thanks I'll try
Вы должны выполнить эту команду в вашем проекте: ./gradlew --refresh-dependencies
Если с VideoLib что-то не так, она загрузит его снова. Проблема, с которой вы столкнулись, связана с тем, что Loom не переименовал class_2960 в Identifier. Он должен это сделать, но возникла проблема, которую можно устранить, загрузив VideoLib снова. Если это не сработает, вы можете удалить папку «.gradle» в вашем проекте.