VFXWeaver API 2.3.0 для Minecraft 1.21.11 (NeoForge)
Это не последняя версия. Последняя для 1.21.11 · NeoForge — 2.5.0Открыть 2.5.0 →
Файлы · 1
Что изменилось
Added
screen_image: draw a picture over the game frame. A new screen effect composites a resource-pack PNG - or an image a mod supplied from code withVFXAPI.registerImage- onto the game's own framebuffer inside an animatable rectangle.pos_x/pos_yplace it,size_w/size_hsize it and animate the picture's own proportions (size_w:size_his exactly the on-screen width:height, so equal values are a square on any window),opacityfades it, andframes/frame_timestep a strip or a vanilla.png.mcmetaanimation. The canvas is the Minecraft window, not the monitor, so the picture scales with the window and nothing outside the game frame is drawn;screen_layerpicks whether it draws under the GUI (the default), above the first-person hand, or over everything including chat and hotbar. A.mcmetasibling animation wins overframes/frame_time;interpolate: trueis not supported. An id that does not resolve draws nothing and warns once instead of blanking the frame. Additive: one new effect type and its optional params, no existing datapack field renamed, no UBO layout change,PROTOCOL_VERSIONunchanged. Documented in the guide. Asserted byscripts/check-screen-image.ps1; the GLSL/pixels cannot be verified headless here. Not verified in game.VFXAPI.registerImage/unregisterImage: show an image a mod renders itself, anywhere a texture is accepted. A mod hands over ARGB pixels (row-major, row 0 the top row,0xAARRGGBB, the orderNativeImage.getPixels()returns) under a resource id, and that id then works exactly like a packed texture id: effect fields (surface_pattern,sky_pattern, field textures) resolve it through the game's texture manager, and awindow_createpicture uploads it into the aux window's own GL context. This is the missing piece for an item icon, a live preview or a generated texture that does not exist as a.pngin any pack. The registry is a client singleton bounded at 256 images; registering an id again replaces it (the previous GPU texture is released). Additive:defaultmethods onVFXLocalDispatcher(a dispatcher compiled before this still links), no wire or UBO change,PROTOCOL_VERSIONunchanged. Documented in the API. Asserted byscripts/check-image-registry.ps1; the GLSL/pixels cannot be verified headless here. Not verified in game.- Two effects that open a real picture window on the desktop:
window_createandwindow_control. Awindow_createopens a named frameless, transparent, click-through window covering the work area of the monitor the game is on, and shows a picture in it;window_controlthen moves, resizes, fades and retitles that window by name. Neither is a post-processing pass nor world geometry, and nothing about the Minecraft window changes. The window is undecorated, non-resizable, always on top and click-through (GLFW_MOUSE_PASSTHROUGH) at all times, and never takes focus, so it cannot steal input from the game. It is created hidden, sized to the work area and shown last, and is never moved or resized afterwards - position and size animate the picture's rectangle inside the canvas, so an animation costs no OS call per frame. Up to 8 windows may be live at once; a secondwindow_createunder a name that is already live is a no-op (first one wins).titlesplus an animatedtitle_indexpick the title (clamped),opacityanimates, and a frame sheet steps onframe_time. Wayland is best-effort. Additive: two new effect types and their optional params, noVFXAPIchange, no wire or UBO layout change,PROTOCOL_VERSIONunchanged. Documented in the guide. Not verified in game - in particular the game must keep presenting normally on 26.2 with an aux GL window open, which a green build cannot prove.