Fixed wrong tab page when page exceeds max pages

This commit is contained in:
raoulvdberge
2017-09-06 15:14:45 +02:00
parent fefdfcd491
commit f6786d7341
3 changed files with 3 additions and 3 deletions

View File

@@ -132,7 +132,7 @@ public class WirelessGrid implements IGrid {
@Override
public int getTabPage() {
return tabPage;
return Math.min(tabPage, getTotalTabPages());
}
@Override

View File

@@ -238,7 +238,7 @@ public class PortableGrid implements IGrid, IPortableGrid {
@Override
public int getTabPage() {
return tabPage;
return Math.min(tabPage, getTotalTabPages());
}
@Override

View File

@@ -309,7 +309,7 @@ public class TilePortableGrid extends TileBase implements IGrid, IPortableGrid,
@Override
public int getTabPage() {
return world.isRemote ? TAB_PAGE.getValue() : tabPage;
return world.isRemote ? TAB_PAGE.getValue() : Math.min(tabPage, getTotalTabPages());
}
@Override