diff --git a/build.gradle b/build.gradle index 57ad079..1619f83 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'maven-publish' -version = '1.16.5-1.8.2' +version = '1.16.5-1.8.3' group = 'com.dannyandson.tinyredstone' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'tinyredstone' diff --git a/src/main/java/com/dannyandson/tinyredstone/blocks/PanelCellPos.java b/src/main/java/com/dannyandson/tinyredstone/blocks/PanelCellPos.java index fa6a2b4..8743e28 100644 --- a/src/main/java/com/dannyandson/tinyredstone/blocks/PanelCellPos.java +++ b/src/main/java/com/dannyandson/tinyredstone/blocks/PanelCellPos.java @@ -13,6 +13,7 @@ public class PanelCellPos { private final int row; private final int column; private final int level; + private Integer index=null; private final PanelTile panelTile; protected PanelCellPos(PanelTile panelTile, int row, int column, int level) { @@ -47,7 +48,9 @@ public int getLevel(){ } public int getIndex() { - return (level*64) + (row * 8) + column; + if (this.index==null) + this.index=(level*64) + (row * 8) + column; + return this.index; } public PanelTile getPanelTile(){