diff options
author | DoKM <mcazzyman@gmail.com> | 2021-07-14 21:40:02 +0200 |
---|---|---|
committer | DoKM <mcazzyman@gmail.com> | 2021-07-14 21:40:02 +0200 |
commit | 095a4425bd35a78a260d659e02349d58c0507d2c (patch) | |
tree | 1b2be579518a0583361d1aeba7ee137970e604b9 /src/main/java/io | |
parent | f29c2ff69569af9d80ec7b78b9fb484f3a566c11 (diff) | |
download | NotEnoughUpdates-095a4425bd35a78a260d659e02349d58c0507d2c.tar.gz NotEnoughUpdates-095a4425bd35a78a260d659e02349d58c0507d2c.tar.bz2 NotEnoughUpdates-095a4425bd35a78a260d659e02349d58c0507d2c.zip |
add specific divide size for wardrobe to eliminate missing rows
untested but should work
Diffstat (limited to 'src/main/java/io')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java index e0cf37fb..1822f630 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java @@ -1721,10 +1721,14 @@ public class GuiProfileViewer extends GuiScreen { jsonInvSize = (int)Math.ceil(jsonInv.size()/9f)*9;
} else {
jsonInvSize = 9*4;
+ float divideBy = 9f;
+ if(invName.equals("wardrobe_contents")){
+ divideBy = 36f;
+ }
for(int i=9*4; i<jsonInv.size(); i++) {
JsonElement item = jsonInv.get(i);
if(item != null && item.isJsonObject()) {
- jsonInvSize = (int) (Math.ceil((i+1)/9f)*9);
+ jsonInvSize = (int) (Math.ceil((i+1)/divideBy)*(int)divideBy);
}
}
}
|