We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.86.11
Frames and text become black blocks in Minecraft MCP 1.21 when using custom fonts
Initialize called after game window initialized
createContext() ctx = getCurrentContext() val io = getIO() glfw.init(window, false) gl3.init() val fontAtlas = io.fonts val fontConfig = ImFontConfig() fontConfig.glyphRanges = fontAtlas.glyphRangesChineseFull fontConfig.mergeMode = true fontConfig.pixelSnapH = true fontAtlas.addFontDefault(fontConfig) fontAtlas.addFontFromMemoryTTF(loadResource("assets/h3x/NotoSansSC-Medium.otf")!!, 14f, fontConfig, fontAtlas.glyphRangesChineseFull) fontAtlas.build() fontConfig.destroy()
Render called after a GLFW.glfwPollEvents() call and before GLFW.glfwSwapBuffers
fun render(window: Long) { glfw.newFrame() newFrame() if (begin("test", ImGuiWindowFlags.MenuBar)) { text("test") } end() render() MemoryStack.stackPush().use { val dw = it.mallocInt(1) val dh = it.mallocInt(1) GLFW.glfwGetFramebufferSize(window, dw, dh) RenderSystem.viewport(0, 0, dw.get(), dh.get()) } gl3.renderDrawData(getDrawData()) updatePlatformWindows() renderPlatformWindowsDefault() }
loadResource method
fun loadResource(path: String) = Main.javaClass.classLoader.getResourceAsStream(path)?.readBytes()
No error in log except an asset (icons/icon_16x16.png) does not exists in MCP environment(its normal)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Version
1.86.11
What happened?
Frames and text become black blocks in Minecraft MCP 1.21 when using custom fonts
![image](https://private-user-images.githubusercontent.com/62649962/345344468-1a5247d8-0a66-4783-9608-4a5ddf8b28b4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3NDI4OTQsIm5iZiI6MTcyMTc0MjU5NCwicGF0aCI6Ii82MjY0OTk2Mi8zNDUzNDQ0NjgtMWE1MjQ3ZDgtMGE2Ni00NzgzLTk2MDgtNGE1ZGRmOGIyOGI0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIzVDEzNDk1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMyOTRiMjNlYmRlNzM0ZTY5YzRhOTc0ZTMzZDU2MGZkMDg0ZTI0NzNiNjg2YTY3MDg2ZmMzZDEwYWY3ODI3ZGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.gKkKTdtUoaLJZnMKC7U36sBMxrCGOcgJEHfle779gVs)
Reproduction
Initialize called after game window initialized
Render called after a GLFW.glfwPollEvents() call and before GLFW.glfwSwapBuffers
loadResource method
Relevant log output
The text was updated successfully, but these errors were encountered: