Skip to content

Commit 55c7bf2

Browse files
Fix 26.2 pre-release renames
1 parent a2d82b1 commit 55c7bf2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

client/src/main/java/org/geysermc/rainbow/client/render/RenderedTextureHolder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ private static void writeAsPNG(PackSerializer serializer, Path path, GpuTexture
8686

8787
int width = texture.getWidth(0);
8888
int height = texture.getHeight(0);
89-
int bufferSize = texture.getFormat().pixelSize() * width * height;
89+
int bufferSize = texture.getFormat().blockSize() * width * height;
9090

9191
GpuBuffer buffer = RenderSystem.getDevice().createBuffer(() -> "Texture output buffer", GpuBuffer.USAGE_COPY_DST | GpuBuffer.USAGE_MAP_READ, bufferSize);
9292
CommandEncoder commandEncoder = RenderSystem.getDevice().createCommandEncoder();
@@ -97,7 +97,7 @@ private static void writeAsPNG(PackSerializer serializer, Path path, GpuTexture
9797
try (NativeImage image = new NativeImage(width, height, false)) {
9898
for (int y = 0; y < height; y++) {
9999
for (int x = 0; x < width; x++) {
100-
int colour = mappedView.data().getInt((x + y * width) * texture.getFormat().pixelSize());
100+
int colour = mappedView.data().getInt((x + y * width) * texture.getFormat().blockSize());
101101
image.setPixelABGR(x, height - y - 1, colour);
102102
}
103103
}

0 commit comments

Comments
 (0)