Having trouble with the tablist #2749
Replies: 1 comment
-
|
Hi, @TheJavaHacker The main thing to understand is that the Minecraft tablist is essentially a grid of 80 slots arranged as 4 rows and 20 columns (4×20), and it doesn't directly support splitting into custom columns. Instead, you place entries by slot index (0 to 79). To create a layout with 3 vertical columns like you want (left: player profile, middle: online staff, right: online players), you need to calculate the slot index based on row and column like this:
For example, if you want 4 rows and 3 columns, the slots for each column are: Left column (column 0): slots 0, 1, 2, 3 → Actually 0, 20, 40, 60 (row + 0*20) Middle column (column 1): slots 20, 21, 22, 23 → Actually 1, 21, 41, 61 (row + 1*20) Right column (column 2): slots 40, 41, 42, 43 → Actually 2, 22, 42, 62 (row + 2*20) So your code should iterate over rows and columns and calculate the slot index accordingly, for example:
} Also, make sure your createTabEntry uses this slotIndex as the position parameter in the PlayerInfoUpdatePacket entry. Your current approach seems to use rowIndex from 0 to 11, but that won't position entries correctly because you need to use the full 0–79 index range based on the slot position in the 4×20 grid. If you apply this slot calculation logic, your tablist will properly display the 3 vertical columns side by side. Let me know if you want me to help you write a more complete example! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey guys,
I'm not sure how absolutely brain-dead I'm being, however I'm trying to create a specific layout in my tablist that splits it into 3 columns, left column is player profile, middle column is online staff and right column is online players.
I've started with something simple, just adding stuff to the tablist, and I'm trying to place them in order, however I'm stumped.
Here's the relevant code:
And the result is

Any chance I've broken how I'm doing the display or is this something that's obvious to most people that I'm just being stupid with?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions