diff options
author | Jason Mitchell <mitchej@gmail.com> | 2022-04-18 11:16:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-18 20:16:31 +0200 |
commit | 44a1027dfa51af1864364c391e67686590ce347f (patch) | |
tree | 5f2fa25724841885d9e0cb721a7806812aca8016 /src/main/java/gregtech/api/enums | |
parent | bb4cec9a73ec6c50199de6c48119ddd85e23b013 (diff) | |
download | GT5-Unofficial-44a1027dfa51af1864364c391e67686590ce347f.tar.gz GT5-Unofficial-44a1027dfa51af1864364c391e67686590ce347f.tar.bz2 GT5-Unofficial-44a1027dfa51af1864364c391e67686590ce347f.zip |
Multitileentity precursor (#963)
* Refactors
* Refactor CoverableTileEntity a bit more, pull out a CommonMetaTileEntity
* Add an IDebugableTileEntity interface instead of checking various subclasses
* Move more redstone related things to CoverableTileEntity
* Add IGTENet
* Final and dead code removal
* Address a few comments, fix a few comments, remove some more dead code, and add some more finals.
* fix bad rebase
Diffstat (limited to 'src/main/java/gregtech/api/enums')
-rw-r--r-- | src/main/java/gregtech/api/enums/GT_Values.java | 96 | ||||
-rw-r--r-- | src/main/java/gregtech/api/enums/ItemList.java | 1 | ||||
-rw-r--r-- | src/main/java/gregtech/api/enums/Textures.java | 17 |
3 files changed, 104 insertions, 10 deletions
diff --git a/src/main/java/gregtech/api/enums/GT_Values.java b/src/main/java/gregtech/api/enums/GT_Values.java index e41eafab78..6dca327429 100644 --- a/src/main/java/gregtech/api/enums/GT_Values.java +++ b/src/main/java/gregtech/api/enums/GT_Values.java @@ -55,7 +55,7 @@ public class GT_Values { * This is worth exactly one normal Item. * This Constant can be divided by many commonly used Numbers such as * 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, ... 64 or 81 - * without loosing precision and is for that reason used as Unit of Amount. + * without losing precision and is for that reason used as Unit of Amount. * But it is also small enough to be multiplied with larger Numbers. * <p/> * This is used to determine the amount of Material contained inside a prefixed Ore. @@ -195,6 +195,98 @@ public class GT_Values { RES_PATH_ASPECTS = MOD_ID + ":" + TEX_DIR_ASPECTS, RES_PATH_IC2 = MOD_ID_IC2.toLowerCase(Locale.ENGLISH) + ":", RES_PATH_MODEL = MOD_ID + ":" + TEX_DIR + "models/"; + + /** + * NBT String Keys + */ + public static class NBT { + public static final String + COLOR = "gt.color", // Integer + CUSTOM_NAME = "name", // String + DISPAY = "gt.display", // String + FACING = "gt.facing", // Byte + HIDDEN = "gt.hidden", // Boolean + LOCK_UPGRADE = "gt.locked", // Boolean + MATERIAL = "gt.material", // String containing the Material Name. + MODE = "gt.mode", // Number + ALLOWED_MODES = "gt.amode", // Number + MTE_ID = "gt.mte.id", // Containing the MTE ID + MTE_REG = "gt.mte.reg", // Containing the MTE Registry ID + OWNER = "gt.owner", // String + OWNER_UUID = "gt.ownerUuid", // UUID (String) + + // Machines + FLUID_OUT = "gt.fluidout", // Output Fluid + INV_OUT = "gt.invout", // ItemStack + PARALLEL = "gt.parallel", // Number + TANK_CAPACITY = "gt.tankcap", // Number + TANK_IN = "gt.tank.in.", // FluidStack + TANK_OUT = "gt.tank.out.", // FluidStack + TEXTURE = "gt.texture", // String + INV_SIZE = "gt.invsize", // Number + INV_LIST = "gt.invlist", // NBT List + + // MultiBlock + STRUCTURE_OK = "gt.structure.ok", + ROTATION = "gt.eRotation", + FLIP = "gt.eFlip", + TARGET = "gt.target", // Boolean + TARGET_X = "gt.target.x", // Number + TARGET_Y = "gt.target.y", // Number + TARGET_Z = "gt.target.z", // Number + + empty_ = ""; + } + + + public static final int UNCOLORED = 0x00ffffff; + + /** + * Sides + */ + public static final byte + SIDE_BOTTOM = 0, SIDE_DOWN = 0, + SIDE_TOP = 1, SIDE_UP = 1, + SIDE_NORTH = 2, // Also a Side with a stupidly mirrored Texture + SIDE_SOUTH = 3, + SIDE_WEST = 4, + SIDE_EAST = 5, // Also a Side with a stupidly mirrored Texture + SIDE_ANY = 6, SIDE_UNKNOWN = 6, SIDE_INVALID = 6, SIDE_INSIDE = 6, SIDE_UNDEFINED = 6; + + /** Compass alike Array for the proper ordering of North, East, South and West. */ + public static final byte[] COMPASS_DIRECTIONS = {SIDE_NORTH, SIDE_EAST, SIDE_SOUTH, SIDE_WEST}; + + + /** + * An Array containing all Sides which follow the Condition, in order to iterate over them for example. + */ + public static final byte[] + ALL_SIDES = {0,1,2,3,4,5,6}, + ALL_VALID_SIDES = {0,1,2,3,4,5 }; + + /** + * For Facing Checks. + */ + + public static final boolean[] + INVALID_SIDES = { false, false, false, false, false, false, true }, + VALID_SIDES = { true, true, true, true, true, true, false }; + + + /** + * Side->Offset Mappings. + */ + public static final byte[] + OFFX = { 0, 0, 0, 0,-1,+1, 0}, + OFFY = {-1,+1, 0, 0, 0, 0, 0}, + OFFZ = { 0, 0,-1,+1, 0, 0, 0}; + + /** + * Side->Opposite Mappings. + **/ + public static final byte[] + OPOS = { 1, 0, 3, 2, 5, 4, 6}; + /** * The Mod Object itself. That is the GT_Mod-Object. It's needed to open GUI's and similar. */ @@ -316,4 +408,6 @@ public class GT_Values { public static boolean disableDigitalChestsExternalAccess = false; public static boolean lateConfigSave = true; public static boolean worldTickHappened = false; + + public static final int[] emptyIntArray = new int[0]; } diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index b874f1df2e..a14691f4b3 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -63,6 +63,7 @@ public enum ItemList implements IItemContainer { RC_Bed_Wood, RC_Bed_Stone, RC_Rebar, + TC_Thaumometer, IC2_Item_Casing_Tin, IC2_Item_Casing_Copper, IC2_Item_Casing_Iron, diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index e7fb1e9af8..5730be05e9 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -1681,14 +1681,13 @@ public class Textures { BLOCK_BLAZE, BLOCK_CRYOLITE }; - public static ITexture[] HIDDEN_TEXTURE = { + public static final ITexture[] HIDDEN_TEXTURE = { TextureFactory.builder().addIcon(HIDDEN_FACE).stdOrient().build() }; - public static ITexture[] - ERROR_RENDERING = { + public static final ITexture[] ERROR_RENDERING = { TextureFactory.of(RENDERING_ERROR) }; - public static ITexture[] OVERLAYS_ENERGY_IN = { + public static final ITexture[] OVERLAYS_ENERGY_IN = { TextureFactory.of(OVERLAY_ENERGY_IN, new short[]{180, 180, 180, 0}), TextureFactory.of(OVERLAY_ENERGY_IN, new short[]{220, 220, 220, 0}), TextureFactory.of(OVERLAY_ENERGY_IN, new short[]{255, 100, 0, 0}), @@ -1724,7 +1723,7 @@ public class Textures { TextureFactory.of(OVERLAY_ENERGY_OUT, new short[]{60, 60, 245, 0}), TextureFactory.of(OVERLAY_ENERGY_OUT, new short[]{40, 40, 245, 0}), }; - public static ITexture[] OVERLAYS_ENERGY_IN_MULTI = { + public static final ITexture[] OVERLAYS_ENERGY_IN_MULTI = { TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{180, 180, 180, 0}), TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{220, 220, 220, 0}), TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{255, 100, 0, 0}), @@ -1742,7 +1741,7 @@ public class Textures { TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{60, 60, 245, 0}), TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{40, 40, 245, 0}), }; - public static ITexture[] OVERLAYS_ENERGY_OUT_MULTI = { + public static final ITexture[] OVERLAYS_ENERGY_OUT_MULTI = { TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{180, 180, 180, 0}), TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{220, 220, 220, 0}), TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{255, 100, 0, 0}), @@ -1760,7 +1759,7 @@ public class Textures { TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{60, 60, 245, 0}), TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{40, 40, 245, 0}), }; - public static ITexture[] OVERLAYS_ENERGY_IN_POWER = { + public static final ITexture[] OVERLAYS_ENERGY_IN_POWER = { TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{180, 180, 180, 0}), TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{220, 220, 220, 0}), TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{255, 100, 0, 0}), @@ -1778,7 +1777,7 @@ public class Textures { TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{60, 60, 245, 0}), TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{40, 40, 245, 0}), }; - public static ITexture[] OVERLAYS_ENERGY_OUT_POWER = { + public static final ITexture[] OVERLAYS_ENERGY_OUT_POWER = { TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{180, 180, 180, 0}), TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{220, 220, 220, 0}), TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{255, 100, 0, 0}), @@ -1796,7 +1795,7 @@ public class Textures { TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{60, 60, 245, 0}), TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{40, 40, 245, 0}), }; - public static ITexture[] LOCKERS = { + public static final ITexture[] LOCKERS = { TextureFactory.of(OVERLAY_LOCKER_000), TextureFactory.of(OVERLAY_LOCKER_001), TextureFactory.of(OVERLAY_LOCKER_002), |