aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2017-10-08 19:55:35 +1000
committerJason Mitchell <mitchej@gmail.com>2018-02-05 18:14:59 -0800
commitdcefe92cfb20582cd9a6d083ebe35f1bb5f2ee32 (patch)
tree15f369861e2cbb62d102ac7810d9b5245167e16d /src/main/java/gregtech/api
parent989a6358597f3acff976b81383c6f19828364090 (diff)
downloadGT5-Unofficial-dcefe92cfb20582cd9a6d083ebe35f1bb5f2ee32.tar.gz
GT5-Unofficial-dcefe92cfb20582cd9a6d083ebe35f1bb5f2ee32.tar.bz2
GT5-Unofficial-dcefe92cfb20582cd9a6d083ebe35f1bb5f2ee32.zip
Added documentation to updateTexture in GT_MetaTileEntity_Hatch.
Added a function to GT_Utility called addTexturePage(byte page). Added information about who is using which texture page in GT_Block_Casings1. Updated GT_Block_Casings5 & GT_Block_Casings8 to utilise texture page 1. Updated Large Chemical Reactor to reflect this change, now also uses Page 1 Index 48. Moved the Pyrolyse oven casing index from 111 to 22, which is currently unused and within the Gregtech index space.
Diffstat (limited to 'src/main/java/gregtech/api')
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java8
-rw-r--r--src/main/java/gregtech/api/util/GT_Utility.java13
2 files changed, 21 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java
index 2c16ff73c9..d57aff8fc9 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java
@@ -76,6 +76,14 @@ public abstract class GT_MetaTileEntity_Hatch extends GT_MetaTileEntity_BasicTan
mMachineBlock=actualTexture;
}
+ /**
+ *
+ * @param textureIndex
+ * Index between 0-127.
+ * Add 128 per page, if texture index is not on first page.
+ *
+ */
+
public final void updateTexture(int textureIndex){
onValueUpdate((byte) textureIndex);
onTexturePageUpdate((byte) (textureIndex>>7));
diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java
index 57a115973e..fa7d96d0d6 100644
--- a/src/main/java/gregtech/api/util/GT_Utility.java
+++ b/src/main/java/gregtech/api/util/GT_Utility.java
@@ -9,9 +9,11 @@ import gregtech.api.enchants.Enchantment_Radioactivity;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.SubTag;
+import gregtech.api.enums.Textures;
import gregtech.api.events.BlockScanningEvent;
import gregtech.api.interfaces.IDebugableBlock;
import gregtech.api.interfaces.IProjectileItem;
+import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.*;
import gregtech.api.items.GT_EnergyArmor_Item;
import gregtech.api.items.GT_Generic_Item;
@@ -1126,6 +1128,17 @@ public class GT_Utility {
}
/**
+ * Initializes a new texture page.
+ */
+ public static boolean addTexturePage(byte page){
+ if(Textures.BlockIcons.casingTexturePages[page]==null){
+ Textures.BlockIcons.casingTexturePages[page]=new ITexture[128];
+ return true;
+ }
+ return false;
+ }
+
+ /**
* Converts a Number to a String
*/
public static String parseNumberToString(int aNumber) {