Fixed wrong tab page when page exceeds max pages
This commit is contained in:
@@ -132,7 +132,7 @@ public class WirelessGrid implements IGrid {
|
||||
|
||||
@Override
|
||||
public int getTabPage() {
|
||||
return tabPage;
|
||||
return Math.min(tabPage, getTotalTabPages());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -238,7 +238,7 @@ public class PortableGrid implements IGrid, IPortableGrid {
|
||||
|
||||
@Override
|
||||
public int getTabPage() {
|
||||
return tabPage;
|
||||
return Math.min(tabPage, getTotalTabPages());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user