Skip to content

Commit b9a6120

Browse files
authored
Fix BlockRenderManager using the wrong IDs
`blockRenders` is shifted by `FL_INITIAL_ID`
1 parent f5e9e93 commit b9a6120

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

loader/src/main/java/com/fox2code/foxloader/client/BlockRenderManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public final class BlockRenderManager {
3232
private static final int FL_MAX_RENDER_TYPES = 1024;
3333
private static final int FL_MAX_ID = FL_INITIAL_ID + FL_MAX_RENDER_TYPES - 1;
3434
private static final BlockRender[] blockRenders = new BlockRender[FL_MAX_RENDER_TYPES];
35-
private static int nextID = FL_INITIAL_ID;
35+
private static int nextID = 0;
3636

3737
private BlockRenderManager() {}
3838

@@ -49,7 +49,7 @@ public static void registerBlockRender(BlockRender blockRender) {
4949
throw new IllegalStateException("Max number of renders registered!");
5050
}
5151
blockRenders[newAssignedID] = blockRender;
52-
blockRender.assignedID = newAssignedID;
52+
blockRender.assignedID = newAssignedID + FL_INITIAL_ID;
5353
}
5454
}
5555

0 commit comments

Comments
 (0)