Don't remap, and throw early

This commit is contained in:
Jason Mitchell authored and Jason Mitchell committed 2024-01-06 20:50:49 -08:00
1 parent b100652a7d
commit ad533bcae9
2 files changed
+2 -1

No files matched your search

@@ -31,6 +31,7 @@ public class VBOManager {
}
public static VertexBuffer registerVBO(int displayList, VertexBuffer vertexBuffer) {
if(displayList > 0) throw new IllegalArgumentException("Display list must be negative!");
displayList -= Integer.MIN_VALUE;
final int requestedSize = displayList + 1;
if(requestedSize + 1 > vertexBuffers.size()) {
@@ -28,7 +28,7 @@ public class MixinRenderGlobal implements IRenderGlobalVBOCapture {
@Shadow public Minecraft mc;
@Shadow private int cloudTickCounter;
@Redirect(method="<init>", at = @At(value="INVOKE", target="Lnet/minecraft/client/renderer/GLAllocation;generateDisplayLists(I)I", ordinal = 0), remap = false)
@Redirect(method="<init>", at = @At(value="INVOKE", target="Lnet/minecraft/client/renderer/GLAllocation;generateDisplayLists(I)I", ordinal = 0))
private int generateGLRenderListBaseDisplayLists(int range) {
return AngelicaConfig.enableSodium ? -1 : GLAllocation.generateDisplayLists(range);
}