aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/github/technus/tectech/TecTech.java13
-rw-r--r--src/main/java/com/github/technus/tectech/Util.java231
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java4
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java4
-rw-r--r--src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java5
-rw-r--r--src/main/java/com/github/technus/tectech/proxy/ClientProxy.java25
-rw-r--r--src/main/java/com/github/technus/tectech/proxy/CommonProxy.java5
-rw-r--r--src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java25
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java6
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java11
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java17
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java13
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java8
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java9
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java86
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java173
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/gui/GT_GUIContainer_DebugStructureWriter.java2
-rw-r--r--src/main/resources/assets/tectech/lang/en_US.lang1
-rw-r--r--src/main/resources/assets/tectech/textures/items/itemFrontRotate.pngbin0 -> 439 bytes
29 files changed, 422 insertions, 252 deletions
diff --git a/src/main/java/com/github/technus/tectech/TecTech.java b/src/main/java/com/github/technus/tectech/TecTech.java
index 4616bf8671..84f2ddf58b 100644
--- a/src/main/java/com/github/technus/tectech/TecTech.java
+++ b/src/main/java/com/github/technus/tectech/TecTech.java
@@ -184,12 +184,15 @@ public class TecTech {
));
String modId;
for(Block block : GameData.getBlockRegistry().typeSafeIterable()) {
- modId = GameRegistry.findUniqueIdentifierFor(block).modId;
- if (modIDs.contains(modId)) {//Full Whitelisted Mods
- continue;
- } else if ("OpenBlocks".equals(modId)) {
- if ("grave".equals(GameRegistry.findUniqueIdentifierFor(block).name)) {
+ GameRegistry.UniqueIdentifier uniqueIdentifier=GameRegistry.findUniqueIdentifierFor(block);
+ if (uniqueIdentifier != null) {
+ modId = uniqueIdentifier.modId;
+ if (modIDs.contains(modId)) {//Full Whitelisted Mods
continue;
+ } else if ("OpenBlocks".equals(modId)) {
+ if ("grave".equals(GameRegistry.findUniqueIdentifierFor(block).name)) {
+ continue;
+ }
}
}
block.setResistance(6);
diff --git a/src/main/java/com/github/technus/tectech/Util.java b/src/main/java/com/github/technus/tectech/Util.java
index 87f3a2bebb..9d53689517 100644
--- a/src/main/java/com/github/technus/tectech/Util.java
+++ b/src/main/java/com/github/technus/tectech/Util.java
@@ -34,7 +34,8 @@ import static gregtech.api.enums.GT_Values.E;
* Created by Tec on 21.03.2017.
*/
public final class Util {
- private Util() {}
+ private Util() {
+ }
public static String intBitsToString(int number) {
StringBuilder result = new StringBuilder(16);
@@ -375,15 +376,15 @@ public final class Util {
return false;
}
//TE Rotation
- int facingAndRotation = aBaseMetaTileEntity.getFrontFacing() + (frontRotation==null?0:(frontRotation.getFrontRotation()<<3));
+ int facingAndRotation = aBaseMetaTileEntity.getFrontFacing() + (frontRotation == null ? 0 : (frontRotation.getFrontRotation() << 3));
IGregTechTileEntity igt;
IMetaTileEntity imt = aBaseMetaTileEntity.getMetaTileEntity();
int x, y, z, a, b, c, pointer;
- int baseX=aBaseMetaTileEntity.getXCoord(),
- baseZ=aBaseMetaTileEntity.getZCoord(),
- baseY=aBaseMetaTileEntity.getYCoord();
+ int baseX = aBaseMetaTileEntity.getXCoord(),
+ baseZ = aBaseMetaTileEntity.getZCoord(),
+ baseY = aBaseMetaTileEntity.getYCoord();
//a,b,c - relative to block face!
//x,y,z - relative to block position on map!
//yPos - absolute height of checked block
@@ -403,7 +404,7 @@ public final class Util {
a += block - '@';
}//else if (block < '+')//used to mark THINGS
// a++;
- else if (block=='.') {
+ else if (block == '.') {
a++;
} else {
//get x y z from rotation
@@ -534,7 +535,7 @@ public final class Util {
y = baseY + c;
break;
default:
- if(DEBUG_MODE) {
+ if (DEBUG_MODE) {
TecTech.Logger.info("facing = " + facingAndRotation);
}
return false;
@@ -617,38 +618,38 @@ public final class Util {
int horizontalOffset, int verticalOffset, int depthOffset,
IGregTechTileEntity aBaseMetaTileEntity, boolean hintsOnly) {
byte facing = aBaseMetaTileEntity.getFrontFacing();
- return StructureBuilderExtreme(structure,blockType,blockMeta,
- horizontalOffset,verticalOffset,depthOffset,
- aBaseMetaTileEntity.getWorld().getTileEntity(aBaseMetaTileEntity.getXCoord(),aBaseMetaTileEntity.getYCoord(),aBaseMetaTileEntity.getZCoord()),null,
- facing,hintsOnly);
+ return StructureBuilderExtreme(structure, blockType, blockMeta,
+ horizontalOffset, verticalOffset, depthOffset,
+ aBaseMetaTileEntity.getWorld().getTileEntity(aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord()), null,
+ facing, hintsOnly);
}
public static boolean StructureBuilderExtreme(String[][] structure,//0-9 casing, +- air no air, A... ignore 'A'-CHAR+1 blocks
- Block[] blockType,//use numbers 0-9 for casing types
- byte[] blockMeta,//use numbers 0-9 for casing types
- int horizontalOffset, int verticalOffset, int depthOffset,
- IGregTechTileEntity aBaseMetaTileEntity, IFrontRotation frontRotation, boolean hintsOnly) {
+ Block[] blockType,//use numbers 0-9 for casing types
+ byte[] blockMeta,//use numbers 0-9 for casing types
+ int horizontalOffset, int verticalOffset, int depthOffset,
+ IGregTechTileEntity aBaseMetaTileEntity, IFrontRotation frontRotation, boolean hintsOnly) {
byte facing = aBaseMetaTileEntity.getFrontFacing();
- return StructureBuilderExtreme(structure,blockType,blockMeta,
- horizontalOffset,verticalOffset,depthOffset,
- aBaseMetaTileEntity.getWorld().getTileEntity(aBaseMetaTileEntity.getXCoord(),aBaseMetaTileEntity.getYCoord(),aBaseMetaTileEntity.getZCoord()),frontRotation,
- facing,hintsOnly);
+ return StructureBuilderExtreme(structure, blockType, blockMeta,
+ horizontalOffset, verticalOffset, depthOffset,
+ aBaseMetaTileEntity.getWorld().getTileEntity(aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord()), frontRotation,
+ facing, hintsOnly);
}
public static boolean StructureBuilder(String[][] structure,//0-9 casing, +- air no air, A... ignore 'A'-CHAR+1 blocks
- Block[] blockType,//use numbers 0-9 for casing types
- byte[] blockMeta,//use numbers 0-9 for casing types
- int horizontalOffset, int verticalOffset, int depthOffset,
- TileEntity tileEntity, int facing, boolean hintsOnly){
- return StructureBuilderExtreme(structure,blockType,blockMeta,horizontalOffset,verticalOffset,depthOffset,tileEntity,null,facing,hintsOnly);
- }
-
- public static boolean StructureBuilderExtreme(String[][] structure,//0-9 casing, +- air no air, A... ignore 'A'-CHAR+1 blocks
Block[] blockType,//use numbers 0-9 for casing types
byte[] blockMeta,//use numbers 0-9 for casing types
int horizontalOffset, int verticalOffset, int depthOffset,
- TileEntity tileEntity, IFrontRotation frontRotation, int facing, boolean hintsOnly) {
- if(!tileEntity.hasWorldObj()) {
+ TileEntity tileEntity, int facing, boolean hintsOnly) {
+ return StructureBuilderExtreme(structure, blockType, blockMeta, horizontalOffset, verticalOffset, depthOffset, tileEntity, null, facing, hintsOnly);
+ }
+
+ public static boolean StructureBuilderExtreme(String[][] structure,//0-9 casing, +- air no air, A... ignore 'A'-CHAR+1 blocks
+ Block[] blockType,//use numbers 0-9 for casing types
+ byte[] blockMeta,//use numbers 0-9 for casing types
+ int horizontalOffset, int verticalOffset, int depthOffset,
+ TileEntity tileEntity, IFrontRotation frontRotation, int facing, boolean hintsOnly) {
+ if (!tileEntity.hasWorldObj()) {
return false;
}
World world = tileEntity.getWorldObj();
@@ -660,12 +661,12 @@ public final class Util {
int x, y, z, a, b, c, pointer;
int
- baseX=tileEntity.xCoord,
- baseZ=tileEntity.zCoord,
- baseY=tileEntity.yCoord;
+ baseX = tileEntity.xCoord,
+ baseZ = tileEntity.zCoord,
+ baseY = tileEntity.yCoord;
//a,b,c - relative to block face!
//x,y,z - relative to block position on map!
- if(frontRotation!=null) {
+ if (frontRotation != null) {
facing += frontRotation.getFrontRotation() << 3;
}
@@ -679,12 +680,13 @@ public final class Util {
if (block < ' ') {//Control chars allow skipping
b -= block;
break;
- } if (block > '@')//characters allow to skip check a-1 skip, b-2 skips etc.
+ }
+ if (block > '@')//characters allow to skip check a-1 skip, b-2 skips etc.
{
a += block - '@';
}//else if (block < '+')//used to mark THINGS
- // a++;
- else if (block=='.')// this TE
+ // a++;
+ else if (block == '.')// this TE
{
a++;
} else {
@@ -816,7 +818,7 @@ public final class Util {
y = baseY + c;
break;
default:
- if(DEBUG_MODE) {
+ if (DEBUG_MODE) {
TecTech.Logger.info("facing = " + facing);
}
return false;
@@ -829,49 +831,49 @@ public final class Util {
//Check block
if (world.blockExists(x, y, z)) {//this actually checks if the chunk is loaded
- if(hintsOnly){
+ if (hintsOnly) {
switch (block) {
- case '-'://must be air
- TecTech.proxy.hint_particle(world,x, y, z, TT_Container_Casings.sHintCasingsTT, 13);
- break;
- case '+'://must not be air
- TecTech.proxy.hint_particle(world,x, y, z, TT_Container_Casings.sHintCasingsTT, 14);
- break;
- default: //check for block
- if ((pointer = block - '0') >= 0) {
- if(world.getBlock(x,y,z)!=blockType[pointer] || world.getBlockMetadata(x,y,z)!=blockMeta[pointer]) {
- TecTech.proxy.hint_particle(world, x, y, z, blockType[pointer], blockMeta[pointer]);
- }
- } else if ((pointer = block - ' ') >= 0) {
- if(pointer>=0 && pointer<12) {
- TecTech.proxy.hint_particle(world, x, y, z, TT_Container_Casings.sHintCasingsTT, pointer);
+ case '-'://must be air
+ TecTech.proxy.hint_particle(world, x, y, z, TT_Container_Casings.sHintCasingsTT, 13);
+ break;
+ case '+'://must not be air
+ TecTech.proxy.hint_particle(world, x, y, z, TT_Container_Casings.sHintCasingsTT, 14);
+ break;
+ default: //check for block
+ if ((pointer = block - '0') >= 0) {
+ if (world.getBlock(x, y, z) != blockType[pointer] || world.getBlockMetadata(x, y, z) != blockMeta[pointer]) {
+ TecTech.proxy.hint_particle(world, x, y, z, blockType[pointer], blockMeta[pointer]);
+ }
+ } else if ((pointer = block - ' ') >= 0) {
+ if (pointer >= 0 && pointer < 12) {
+ TecTech.proxy.hint_particle(world, x, y, z, TT_Container_Casings.sHintCasingsTT, pointer);
+ } else {
+ TecTech.proxy.hint_particle(world, x, y, z, TT_Container_Casings.sHintCasingsTT, 12);
+ }
} else {
- TecTech.proxy.hint_particle(world, x, y, z, TT_Container_Casings.sHintCasingsTT, 12);
+ TecTech.proxy.hint_particle(world, x, y, z, TT_Container_Casings.sHintCasingsTT, 15);
}
- } else {
- TecTech.proxy.hint_particle(world, x, y, z, TT_Container_Casings.sHintCasingsTT, 15);
- }
}
- }else{
+ } else {
switch (block) {
- case '-'://must be air
- world.setBlock(x, y, z, Blocks.air, 0, 2);
- break;
- case '+'://must not be air
- world.setBlock(x, y, z, TT_Container_Casings.sBlockCasingsTT, 14, 2);
- break;
- default: //check for block
- if ((pointer = block - '0') >= 0) {
- world.setBlock(x, y, z, blockType[pointer], blockMeta[pointer], 2);
- } else if (block - ' ' < 0) {
- world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 15, 2);
- } //else {
+ case '-'://must be air
+ world.setBlock(x, y, z, Blocks.air, 0, 2);
+ break;
+ case '+'://must not be air
+ world.setBlock(x, y, z, TT_Container_Casings.sBlockCasingsTT, 14, 2);
+ break;
+ default: //check for block
+ if ((pointer = block - '0') >= 0) {
+ world.setBlock(x, y, z, blockType[pointer], blockMeta[pointer], 2);
+ } else if (block - ' ' < 0) {
+ world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 15, 2);
+ } //else {
//switch(pointer){
// case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11:
// world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, pointer, 2); break;
// default:world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 12, 2);
//}
- //}
+ //}
}
}
}
@@ -900,9 +902,9 @@ public final class Util {
int x, y, z, a, b, c;
int
- baseX=aBaseMetaTileEntity.getXCoord(),
- baseZ=aBaseMetaTileEntity.getZCoord(),
- baseY=aBaseMetaTileEntity.getYCoord();
+ baseX = aBaseMetaTileEntity.getXCoord(),
+ baseZ = aBaseMetaTileEntity.getZCoord(),
+ baseY = aBaseMetaTileEntity.getYCoord();
//a,b,c - relative to block face!
//x,y,z - relative to block position on map!
//yPos - absolute height of checked block
@@ -1081,7 +1083,7 @@ public final class Util {
if (ignoreAir) {
StringBuilder builder = new StringBuilder();
char temp = '@';
- for (char ch : line.toString().toCharArray()){
+ for (char ch : line.toString().toCharArray()) {
if (ch == '-') {
temp += 1;
if (temp == '~') {
@@ -1096,21 +1098,21 @@ public final class Util {
builder.append(ch);
}
}
- while (builder.length()>0 && builder.charAt(builder.length() - 1) == '~') {
+ while (builder.length() > 0 && builder.charAt(builder.length() - 1) == '~') {
builder.deleteCharAt(builder.length() - 1);
}
- if (builder.length()==0) {
+ if (builder.length() == 0) {
builder.append("E,");
} else {
- builder.insert(0,'"');
+ builder.insert(0, '"');
builder.append('"').append(',');
}
addMe.append(builder);
} else {
- if (line.length()==0) {
+ if (line.length() == 0) {
line.append("E,");
} else {
- line.insert(0,'"');
+ line.insert(0, '"');
line.append('"').append(',');
}
addMe.append(line);
@@ -1119,11 +1121,11 @@ public final class Util {
}
//region less verbose
addMe.append('}').append(',');
- String builtStr=addMe.toString().replaceAll("(E,)+(?=})",E/*Remove Empty strings at end*/);
+ String builtStr = addMe.toString().replaceAll("(E,)+(?=})", E/*Remove Empty strings at end*/);
Matcher matcher = matchE_.matcher(builtStr);
while (matcher.find()) {
- byte lenEE = (byte)(matcher.group(1).length()>>1);
- builtStr=builtStr.replaceFirst("E,(E,)+","\"\\\\u00"+String.format("%02X", lenEE-1)+"\",");
+ byte lenEE = (byte) (matcher.group(1).length() >> 1);
+ builtStr = builtStr.replaceFirst("E,(E,)+", "\"\\\\u00" + String.format("%02X", lenEE - 1) + "\",");
//builtStr=builtStr.replaceFirst("E,(E,)+\"","\"\\\\u00"+String.format("%02X", lenEE));
}
//endregion
@@ -1250,7 +1252,7 @@ public final class Util {
public static final String[] VN = new String[]{"ULV", "LV", "MV", "HV", "EV", "IV", "LuV", "ZPM", "UV", "UHV", "UEV", "UIV", "UMV", "UXV", "OpV", "MAX"};
- public static final long[] V = new long[]{8L, 32L, 128L, 512L, 2048L, 8192L, 32768L, 131072L, 524288L, 2097152L, 8388608L, 33554432L, 134217728L, 536870912L, 1073741824L, Integer.MAX_VALUE-7};
+ public static final long[] V = new long[]{8L, 32L, 128L, 512L, 2048L, 8192L, 32768L, 131072L, 524288L, 2097152L, 8388608L, 33554432L, 134217728L, 536870912L, 1073741824L, Integer.MAX_VALUE - 7};
public static byte getTier(long l) {
byte b = -1;
@@ -1260,20 +1262,20 @@ public final class Util {
if (b >= V.length) {
return b;
}
- } while(l > V[b]);
+ } while (l > V[b]);
return b;
}
- public static String[] splitButDifferent(String string,String delimiter){
- String[] strings= new String[StringUtils.countMatches(string,delimiter)+1];
- int lastEnd=0;
- for(int i=0;i<strings.length-1;i++){
- int nextEnd=string.indexOf(delimiter,lastEnd);
- strings[i]=string.substring(lastEnd,nextEnd);
- lastEnd=nextEnd+delimiter.length();
+ public static String[] splitButDifferent(String string, String delimiter) {
+ String[] strings = new String[StringUtils.countMatches(string, delimiter) + 1];
+ int lastEnd = 0;
+ for (int i = 0; i < strings.length - 1; i++) {
+ int nextEnd = string.indexOf(delimiter, lastEnd);
+ strings[i] = string.substring(lastEnd, nextEnd);
+ lastEnd = nextEnd + delimiter.length();
}
- strings[strings.length-1]=string.substring(lastEnd);
+ strings[strings.length - 1] = string.substring(lastEnd);
return strings;
}
@@ -1285,41 +1287,42 @@ public final class Util {
return strings;
}
- public static boolean areBitsSet(int setBits,int testedValue){
- return (testedValue&setBits)==setBits;
+ public static boolean areBitsSet(int setBits, int testedValue) {
+ return (testedValue & setBits) == setBits;
}
- public static class TT_ItemStack implements Comparable<TT_ItemStack>{
+ public static class TT_ItemStack implements Comparable<TT_ItemStack> {
public final Item mItem;
public final int mStackSize;
public final int mMetaData;
public TT_ItemStack(Item aItem, long aStackSize, long aMetaData) {
this.mItem = aItem;
- this.mStackSize = (byte)((int)aStackSize);
- this.mMetaData = (short)((int)aMetaData);
+ this.mStackSize = (byte) ((int) aStackSize);
+ this.mMetaData = (short) ((int) aMetaData);
}
public TT_ItemStack(ItemStack aStack) {
- if(aStack==null){
- mItem=null;
- mStackSize=mMetaData=0;
- }else{
- mItem=aStack.getItem();
- mStackSize=aStack.stackSize;
- mMetaData=Items.feather.getDamage(aStack);
+ if (aStack == null) {
+ mItem = null;
+ mStackSize = mMetaData = 0;
+ } else {
+ mItem = aStack.getItem();
+ mStackSize = aStack.stackSize;
+ mMetaData = Items.feather.getDamage(aStack);
}
}
@Override
public int compareTo(TT_ItemStack o) {
- if(mMetaData>o.mMetaData) return 1;
- if(mMetaData<o.mMetaData) return -1;
- if(mStackSize>o.mStackSize) return 1;
- if(mStackSize<o.mStackSize) return -1;
- if(mItem!=null && o.mItem!=null) return mItem.getUnlocalizedName().compareTo(o.mItem.getUnlocalizedName());
- if(mItem==null && o.mItem==null) return 0;
- if(mItem!=null) return 1;
+ if (mMetaData > o.mMetaData) return 1;
+ if (mMetaData < o.mMetaData) return -1;
+ if (mStackSize > o.mStackSize) return 1;
+ if (mStackSize < o.mStackSize) return -1;
+ if (mItem != null && o.mItem != null)
+ return mItem.getUnlocalizedName().compareTo(o.mItem.getUnlocalizedName());
+ if (mItem == null && o.mItem == null) return 0;
+ if (mItem != null) return 1;
return -1;
}
@@ -1327,19 +1330,19 @@ public final class Util {
public boolean equals(Object aStack) {
return aStack == this ||
(aStack instanceof TT_ItemStack &&
- ((mItem==((TT_ItemStack) aStack).mItem) || ((TT_ItemStack) aStack).mItem.getUnlocalizedName().equals(this.mItem.getUnlocalizedName())) &&
+ ((mItem == ((TT_ItemStack) aStack).mItem) || ((TT_ItemStack) aStack).mItem.getUnlocalizedName().equals(this.mItem.getUnlocalizedName())) &&
((TT_ItemStack) aStack).mStackSize == this.mStackSize &&
((TT_ItemStack) aStack).mMetaData == this.mMetaData);
}
@Override
public int hashCode() {
- return (mItem!=null?mItem.getUnlocalizedName().hashCode():0) ^ (mMetaData << 16) ^ (mStackSize<<24);
+ return (mItem != null ? mItem.getUnlocalizedName().hashCode() : 0) ^ (mMetaData << 16) ^ (mStackSize << 24);
}
@Override
public String toString() {
- return Integer.toString(hashCode())+' '+(mItem==null?"null":mItem.getUnlocalizedName())+' '+mMetaData+' '+mStackSize;
+ return Integer.toString(hashCode()) + ' ' + (mItem == null ? "null" : mItem.getUnlocalizedName()) + ' ' + mMetaData + ' ' + mStackSize;
}
}
}
diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java
index 9c0008ab07..db20de53c5 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java
@@ -22,7 +22,7 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.util.ForgeDirection;
-import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.Util.V;
import static com.github.technus.tectech.compatibility.thaumcraft.EssentiaCompat.essentiaContainerCompat;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
@@ -99,7 +99,7 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_
iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2);
}
}
- StructureBuilder(shape, blockType, blockMeta,1, 1, 0, iGregTechTileEntity,hintsOnly);
+ StructureBuilderExtreme(shape, blockType, blockMeta,1, 1, 0, iGregTechTileEntity,this,hintsOnly);
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java
index 085884b80a..8c5387160d 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java
@@ -22,7 +22,7 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.util.ForgeDirection;
-import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.Util.V;
import static com.github.technus.tectech.compatibility.thaumcraft.EssentiaCompat.essentiaContainerCompat;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
@@ -99,7 +99,7 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu
iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2);
}
}
- StructureBuilder(shape, blockType, blockMeta,1, 1, 0, iGregTechTileEntity,hintsOnly);
+ StructureBuilderExtreme(shape, blockType, blockMeta,1, 1, 0, iGregTechTileEntity,this,hintsOnly);
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java b/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java
index 29533c5a0a..6fa5b552e5 100644
--- a/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java
+++ b/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java
@@ -6,6 +6,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.init.Blocks;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
@@ -14,6 +15,10 @@ import org.lwjgl.opengl.GL11;
public class BlockHint extends EntityFX {
private IIcon[] icons = new IIcon[6];
+ public BlockHint(World world){
+ this(world,0,0,0, Blocks.stone,0);
+ }
+
public BlockHint(World world, int x, int y, int z, Block block, int meta) {
super(world, x+.25, y+.5, z+.25);
particleGravity = 0;
diff --git a/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java b/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java
index 92e0fa6822..8ed457ca79 100644
--- a/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java
+++ b/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java
@@ -18,6 +18,7 @@ import net.minecraft.client.gui.GuiNewChat;
import net.minecraft.client.particle.EntityExplodeFX;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChatComponentText;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@@ -64,6 +65,13 @@ public class ClientProxy extends CommonProxy {
}
@Override
+ public void em_particle(World w,double x,double y,double z) {//CUTE!
+ EntityFX particle = new EntityExplodeFX(w, x + TecTech.Rnd.nextFloat() * 0.5F, y + TecTech.Rnd.nextFloat() * 0.5F, z + TecTech.Rnd.nextFloat() * 0.5F, 0, 0, 0);
+ particle.setRBGColorF(0, 0.6F * TecTech.Rnd.nextFloat(), 0.8f);
+ Minecraft.getMinecraft().effectRenderer.addEffect(particle);
+ }
+
+ @Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
return null;
}
@@ -113,4 +121,21 @@ public class ClientProxy extends CommonProxy {
public void playSound(IGregTechTileEntity base,String name) {
base.getWorld().playSoundEffect(base.getXCoord(),base.getYCoord(),base.getZCoord(), Reference.MODID+':'+name, 1, 1);
}
+
+ @Override
+ public void renderAABB(World w,AxisAlignedBB box) {
+ em_particle(w,box.minX,box.minY,box.minZ);
+ em_particle(w,box.minX,box.minY,box.maxZ);
+ em_particle(w,box.minX,box.maxY,box.maxZ);
+ em_particle(w,box.minX,box.maxY,box.minZ);
+ em_particle(w,box.maxX,box.maxY,box.minZ);
+ em_particle(w,box.maxX,box.maxY,box.maxZ);
+ em_particle(w,box.maxX,box.minY,box.maxZ);
+ em_particle(w,box.maxX,box.minY,box.minZ);
+ }
+
+ @Override
+ public void renderAABB(AxisAlignedBB box) {
+ renderAABB(Minecraft.getMinecraft().theWorld,box);
+ }
}
diff --git a/src/main/java/com/github/technus/tectech/proxy/CommonProxy.java b/src/main/java/com/github/technus/tectech/proxy/CommonProxy.java
index 271887d579..7ccbe7472f 100644
--- a/src/main/java/com/github/technus/tectech/proxy/CommonProxy.java
+++ b/src/main/java/com/github/technus/tectech/proxy/CommonProxy.java
@@ -5,6 +5,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.server.MinecraftServer;
+import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChatComponentText;
import net.minecraft.world.World;
@@ -13,6 +14,7 @@ public class CommonProxy implements IGuiHandler {
public void hint_particle(World world, int x, int y, int z, Block block, int meta){}
public void em_particle(IGregTechTileEntity aMuffler, byte facing) {}//CUTE!
+ public void em_particle(World w,double x,double y,double z){}
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
@@ -42,4 +44,7 @@ public class CommonProxy implements IGuiHandler {
public void printInchat(String... strings){}
public void playSound(IGregTechTileEntity base,String name){}
+
+ public void renderAABB(AxisAlignedBB box){}
+ public void renderAABB(World w,AxisAlignedBB box){}
}
diff --git a/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java b/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java
index ab83518607..8e42e9a371 100644
--- a/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java
+++ b/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java
@@ -25,7 +25,6 @@ import java.util.List;
import static com.github.technus.tectech.Util.StructureBuilder;
import static com.github.technus.tectech.auxiliary.Reference.MODID;
-import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sHintCasingsTT;
import static gregtech.api.GregTech_API.sBlockCasings1;
/**
@@ -34,7 +33,7 @@ import static gregtech.api.GregTech_API.sBlockCasings1;
public final class ConstructableTriggerItem extends Item {
public static ConstructableTriggerItem INSTANCE;
- public static HashMap<String,MultiblockInfoContainer> multiblockMap= new HashMap<>();
+ private static HashMap<String,MultiblockInfoContainer> multiblockMap= new HashMap<>();
private ConstructableTriggerItem() {
setUnlocalizedName("em.debugBuilder");
@@ -122,20 +121,20 @@ public final class ConstructableTriggerItem extends Item {
INSTANCE = new ConstructableTriggerItem();
GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName());
- multiblockMap.put(GT_MetaTileEntity_ElectricBlastFurnace.class.getCanonicalName(), new MultiblockInfoContainer() {
+ registerMetaClass(GT_MetaTileEntity_ElectricBlastFurnace.class, new MultiblockInfoContainer() {
//region Structure
private final String[][] shape = new String[][]{
- {"000","111","111"," . ",},
- {"0!0","1A1","1A1"," ",},
- {"000","111","111"," ",},
+ {"000","\"\"\"","\"\"\""," . ",},
+ {"0!0","\"A\"","\"A\""," ",},
+ {"000","\"\"\"","\"\"\""," ",},
};
- private final Block[] blockType = new Block[]{sBlockCasings1, sHintCasingsTT};
- private final byte[] blockMeta = new byte[]{11, 12};
+ private final Block[] blockType = new Block[]{sBlockCasings1};
+ private final byte[] blockMeta = new byte[]{11};
private final String[] desc=new String[]{
EnumChatFormatting.AQUA+"Hint Details:",
"1 - Classic Hatches or Heat Proof Casing",
"2 - Muffler Hatch",
- "General - Coil blocks"
+ "3 - Coil blocks"
};
//endregion
@@ -156,4 +155,12 @@ public final class ConstructableTriggerItem extends Item {
@SideOnly(Side.CLIENT)
String[] getDescription(int stackSize);
}
+
+ public static void registerTileClass(Class<? extends TileEntity> clazz,MultiblockInfoContainer info){
+ multiblockMap.put(clazz.getCanonicalName(),info);
+ }
+
+ public static void registerMetaClass(Class<? extends IMetaTileEntity> clazz,MultiblockInfoContainer info){
+ multiblockMap.put(clazz.getCanonicalName(),info);
+ }
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java
index 4e7cb3e8b6..be9ff21e58 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java
@@ -16,7 +16,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
-import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
@@ -91,7 +91,7 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl
@Override
public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilder(shape, blockType, blockMeta, 5, 5, 0,getBaseMetaTileEntity(),hintsOnly);
+ StructureBuilderExtreme(shape, blockType, blockMeta, 5, 5, 0,getBaseMetaTileEntity(),this,hintsOnly);
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java
index 1f72f00c20..15e9628b7a 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java
@@ -16,7 +16,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
-import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
@@ -154,9 +154,9 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E
@Override
public void construct(int stackSize, boolean hintsOnly) {
if((stackSize &1)==1) {
- StructureBuilder(shape, blockType, blockMeta, 16, 16, 0, getBaseMetaTileEntity(), hintsOnly);
+ StructureBuilderExtreme(shape, blockType, blockMeta, 16, 16, 0, getBaseMetaTileEntity(),this, hintsOnly);
} else {
- StructureBuilder(shape2, blockType2, blockMeta2, 16, 16, 0, getBaseMetaTileEntity(), hintsOnly);
+ StructureBuilderExtreme(shape2, blockType2, blockMeta2, 16, 16, 0, getBaseMetaTileEntity(),this, hintsOnly);
}
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java
index c48cd143b2..fe3aba323d 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java
@@ -21,7 +21,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.common.util.ForgeDirection;
-import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
@@ -113,11 +113,6 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB
}
@Override
- public boolean isFacingValid_EM(byte aFacing) {
- return aFacing >= 2;
- }
-
- @Override
public void saveNBTData(NBTTagCompound aNBT) {
super.saveNBTData(aNBT);
aNBT.setByte("eTier", eTier);
@@ -183,9 +178,9 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB
}
}
if ((stackSize & 1) == 1) {
- StructureBuilder(shape, blockType, blockMeta1, 11, 1, 18, iGregTechTileEntity, hintsOnly);
+ StructureBuilderExtreme(shape, blockType, blockMeta1, 11, 1, 18, iGregTechTileEntity,this, hintsOnly);
} else {
- StructureBuilder(shape, blockType, blockMeta2, 11, 1, 18, iGregTechTileEntity, hintsOnly);
+ StructureBuilderExtreme(shape, blockType, blockMeta2, 11, 1, 18, iGregTechTileEntity,this, hintsOnly);
}
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
index 9ccdda3ca2..4ab25671b7 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
@@ -28,7 +28,7 @@ import net.minecraft.util.ResourceLocation;
import java.util.ArrayList;
-import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.Util.V;
import static com.github.technus.tectech.auxiliary.TecTechConfig.DEBUG_MODE;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
@@ -320,16 +320,16 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
@Override
public void construct(int stackSize, boolean hintsOnly) {
IGregTechTileEntity igt=getBaseMetaTileEntity();
- StructureBuilder(front, blockType, blockMeta, 1, 2, 0, igt,hintsOnly);
- StructureBuilder(cap, blockType, blockMeta, 1, 2, -1, igt,hintsOnly);
+ StructureBuilderExtreme(front, blockType, blockMeta, 1, 2, 0, igt,this,hintsOnly);
+ StructureBuilderExtreme(cap, blockType, blockMeta, 1, 2, -1, igt,this,hintsOnly);
byte offset=-2;
for (int rackSlices = stackSize >12?12: stackSize; rackSlices>0 ; rackSlices--) {
- StructureBuilder(slice, blockType, blockMeta, 1, 2, offset--, igt,hintsOnly);
+ StructureBuilderExtreme(slice, blockType, blockMeta, 1, 2, offset--, igt,this,hintsOnly);
}
- StructureBuilder(cap, blockType, blockMeta, 1, 2, offset--, igt,hintsOnly);
- StructureBuilder(terminator, blockType, blockMeta, 1, 2, offset,igt,hintsOnly);
+ StructureBuilderExtreme(cap, blockType, blockMeta, 1, 2, offset--, igt,this,hintsOnly);
+ StructureBuilderExtreme(terminator, blockType, blockMeta, 1, 2, offset,igt,this,hintsOnly);
}
@Override
@@ -353,11 +353,6 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
};
}
- @Override
- public boolean isFacingValid_EM(byte aFacing) {
- return aFacing >= 2;
- }
-
//NEW METHOD
public final boolean addRackToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
if (aTileEntity == null) {
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java
index e3e3ee4d71..c48f1fdbfe 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java
@@ -16,7 +16,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
-import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
@@ -92,7 +92,7 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB
@Override
public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilder(shape, blockType, blockMeta,2, 2, 0, getBaseMetaTileEntity(),hintsOnly);
+ StructureBuilderExtreme(shape, blockType, blockMeta,2, 2, 0, getBaseMetaTileEntity(),this,hintsOnly);
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java
index 780a2d30bd..e0f309d941 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java
@@ -21,7 +21,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
-import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.Util.VN;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
@@ -96,7 +96,7 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase
@Override
public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilder(shape, blockType, blockMeta,2, 2, 0, getBaseMetaTileEntity(),hintsOnly);
+ StructureBuilderExtreme(shape, blockType, blockMeta,2, 2, 0, getBaseMetaTileEntity(),this,hintsOnly);
}
@Override
@@ -124,17 +124,22 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase
}else if(eSafeVoid){
contents.clear();
}else if(contents.hasStacks()){
- startRecipe(null);
+ return startRecipe(null);
}
return false;
}
+ @Override
+ protected void afterRecipeCheckFailed() {
+ super.afterRecipeCheckFailed();
+ }
+
private boolean startRecipe(cElementalInstanceStack input) {
if(input!=null) {
contents.putUnify(input);
}
- mMaxProgresstime = 20;//(int)m3;
+ mMaxProgresstime = 20;
mEfficiencyIncrease = 10000;
float mass=contents.getMass();
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java
index 26793ba894..cf36547524 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java
@@ -2,10 +2,10 @@ package com.github.technus.tectech.thing.metaTileEntity.multi;
import com.github.technus.tectech.CommonValues;
import com.github.technus.tectech.elementalMatter.core.cElementalInstanceStackMap;
-import com.github.technus.tectech.elementalMatter.core.transformations.iExchangeInfo;
-import com.github.technus.tectech.elementalMatter.core.stacks.iHasElementalDefinition;
import com.github.technus.tectech.elementalMatter.core.stacks.cElementalInstanceStack;
+import com.github.technus.tectech.elementalMatter.core.stacks.iHasElementalDefinition;
import com.github.technus.tectech.elementalMatter.core.transformations.aOredictDequantizationInfo;
+import com.github.technus.tectech.elementalMatter.core.transformations.iExchangeInfo;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
import com.github.technus.tectech.thing.metaTileEntity.IConstructable;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental;
@@ -23,7 +23,7 @@ import net.minecraftforge.oredict.OreDictionary;
import java.util.ArrayList;
-import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.Util.V;
import static com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition.STABLE_RAW_LIFE_TIME;
import static com.github.technus.tectech.elementalMatter.definitions.complex.atom.dAtomDefinition.refMass;
@@ -84,7 +84,7 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo
@Override
public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), hintsOnly);
+ StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(),this, hintsOnly);
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java
index 3a7b64de0b..693ea770e4 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java
@@ -21,7 +21,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
-import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.auxiliary.TecTechConfig.DEBUG_MODE;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
@@ -71,11 +71,6 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa
}
@Override
- public boolean isFacingValid_EM(byte aFacing) {
- return aFacing >= 2;
- }
-
- @Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_EM_infuser(mName);
}
@@ -97,7 +92,7 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa
@Override
public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilder(shape, blockType, blockMeta,1, 2, 0, getBaseMetaTileEntity(),hintsOnly);
+ StructureBuilderExtreme(shape, blockType, blockMeta,1, 2, 0, getBaseMetaTileEntity(),this,hintsOnly);
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java
index c50caf132f..03649f190e 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java
@@ -11,7 +11,7 @@ import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
-import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.Util.V;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
@@ -61,7 +61,7 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB
@Override
public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilder(shape, blockType, blockMeta,1, 1, 0, getBaseMetaTileEntity(),hintsOnly);
+ StructureBuilderExtreme(shape, blockType, blockMeta,1, 1, 0, getBaseMetaTileEntity(),this,hintsOnly);
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java
index 7b90703749..7f1c553840 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java
@@ -89,7 +89,7 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock
@Override
public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(),hintsOnly);
+ StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(),this,hintsOnly);
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java
index b04a2d0cbd..1cf36476b3 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java
@@ -109,7 +109,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa
@Override
public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilder(shape, blockType, blockMeta,2, 2, 0, getBaseMetaTileEntity(),hintsOnly);
+ StructureBuilderExtreme(shape, blockType, blockMeta,2, 2, 0, getBaseMetaTileEntity(),this,hintsOnly);
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java
index c259a8b7fa..ce16d939cd 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java
@@ -10,7 +10,7 @@ import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
-import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
@@ -59,7 +59,7 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc
@Override
public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilder(shape, blockType, blockMeta,2, 2, 0, getBaseMetaTileEntity(),hintsOnly);
+ StructureBuilderExtreme(shape, blockType, blockMeta,2, 2, 0, getBaseMetaTileEntity(),this,hintsOnly);
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java
index bdc611434f..bc0f975b8f 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java
@@ -20,7 +20,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
-import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.Util.V;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
@@ -84,7 +84,7 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas
@Override
public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilder(shape, blockType, blockMeta,1, 1, 0, getBaseMetaTileEntity(),hintsOnly);
+ StructureBuilderExtreme(shape, blockType, blockMeta,1, 1, 0, getBaseMetaTileEntity(),this,hintsOnly);
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java
index b17d692068..50b19a2d68 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java
@@ -19,7 +19,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
-import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
@@ -89,7 +89,7 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo
@Override
public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilder(shape, blockType, blockMeta,1, 1, 0, getBaseMetaTileEntity(),hintsOnly);
+ StructureBuilderExtreme(shape, blockType, blockMeta,1, 1, 0, getBaseMetaTileEntity(),this,hintsOnly);
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java
index 555e3fecc3..5e60f59807 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java
@@ -16,7 +16,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
-import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
@@ -92,7 +92,7 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB
@Override
public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilder(shape, blockType, blockMeta,4, 4, 0, getBaseMetaTileEntity(),hintsOnly);
+ StructureBuilderExtreme(shape, blockType, blockMeta,4, 4, 0, getBaseMetaTileEntity(),this,hintsOnly);
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java
index a53c7f5469..68e6e53afc 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java
@@ -22,12 +22,11 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.EnumChatFormatting;
-import net.minecraftforge.common.util.ForgeDirection;
import java.util.ArrayList;
import java.util.HashSet;
-import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.loader.MainLoader.microwaving;
import static gregtech.api.GregTech_API.sBlockCasings4;
@@ -38,7 +37,6 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock
public static final int POWER_SETTING_DEFAULT=1000, TIMER_SETTING_DEFAULT=360;
private int powerSetting,timerSetting,timerValue;
private boolean hasBeenPausedThisCycle=false;
- private boolean flipped=false;
//region Structure
//use multi A energy inputs, use less power the longer it runs
@@ -49,13 +47,6 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock
{"0---0", "0---0", "0---0", " 000 ",},
{"00000", "00000", "00000", "0 0",},
};
- private static final String[][] shapeFlipped = new String[][]{
- {shape[0][3],shape[0][2],shape[0][1],shape[0][0],},
- {shape[1][3],shape[1][2],shape[1][1],shape[1][0],},
- {shape[2][3],shape[2][2],shape[2][1],shape[2][0],},
- {shape[3][3],shape[3][2],shape[3][1],shape[3][0],},
- {shape[4][3],shape[4][2],shape[4][1],shape[4][0],},
- };
private static final Block[] blockType = new Block[]{sBlockCasings4};
private static final byte[] blockMeta = new byte[]{1};
@@ -65,7 +56,7 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock
private static final byte[] blockMetaFallback = new byte[]{1};
private static final String[] description = new String[]{
EnumChatFormatting.AQUA+"Hint Details:",
- "1 - Classic Hatches or High Power Casing",
+ "1 - Classic Hatches or Clean Stainless Steel Casing",
"Also acts like a hopper so give it an Output Bus",
};
//endregion
@@ -95,50 +86,22 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock
@Override
public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_Container_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, false, false, true);
+ return new GT_Container_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, false, true, true);
}
@Override
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "EMDisplay.png", false, false, true);//todo texture
- }
-
- @Override
- public boolean isFacingValid_EM(byte aFacing) {
- return aFacing >= 2;
+ return new GT_GUIContainer_MultiMachineEM(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "EMDisplay.png", false, true, true);//todo texture
}
@Override
public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
- if(flipped){//some optimization
- if(structureCheck_EM(shapeFlipped, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 1, 0)){
- flipped=true;
- return true;
- }
- if(structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0)){
- flipped=false;
- return true;
- }
- }else{
- if(structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0)){
- flipped=false;
- return true;
- }
- if(structureCheck_EM(shapeFlipped, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 1, 0)){
- flipped=true;
- return true;
- }
- }
- return false;
+ return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0);
}
@Override
public void construct(int stackSize, boolean hintsOnly) {
- if((stackSize &0x1)==1) {
- StructureBuilder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), hintsOnly);
- } else {
- StructureBuilder(shapeFlipped, blockType, blockMeta, 2, 1, 0, getBaseMetaTileEntity(), hintsOnly);
- }
+ StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(),this, hintsOnly);
}
@Override
@@ -179,21 +142,16 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock
}
timerValue--;
IGregTechTileEntity mte=getBaseMetaTileEntity();
- int xDirShift = ForgeDirection.getOrientation(mte.getBackFacing()).offsetX*2;
- int zDirShift = ForgeDirection.getOrientation(mte.getBackFacing()).offsetZ*2;
- float xPos=mte.getXCoord()+0.5f;
- float yPos=mte.getYCoord()+0.5f;
- float zPos=mte.getZCoord()+0.5f;
- ArrayList<ItemStack> itemsToOutput=new ArrayList<>();
- HashSet<Entity> tickedStuff=new HashSet<>();
-
- AxisAlignedBB aabb=AxisAlignedBB.getBoundingBox(
- xPos-1.5+xDirShift,
- yPos-(flipped?2.5:.5),
- zPos-1.5+zDirShift,
- xPos+1.5+xDirShift,
- yPos+(flipped?.5:2.5),
- zPos+1.5+zDirShift);
+ double[] xyzOffsets= getTranslatedOffsets(0,-1,2);
+ double xPos=mte.getXCoord()+0.5f+xyzOffsets[0];
+ double yPos=mte.getYCoord()+0.5f+xyzOffsets[1];
+ double zPos=mte.getZCoord()+0.5f+xyzOffsets[2];
+ AxisAlignedBB aabb=getBoundingBox(-2,-2,-2,2,2,2).offset(xPos,yPos,zPos);
+ xyzOffsets= getTranslatedOffsets(0,-4,0);
+ double[] xyzExpansion= getTranslatedOffsets(1.5,0,1.5);
+ for(int i=0;i<3;i++){//gets ABS from translated to get expansion values
+ if(xyzExpansion[i]<0)xyzExpansion[i]=-xyzExpansion[i];
+ }
int damagingFactor =
Math.min(powerSetting >> 6,8)+
@@ -201,6 +159,9 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock
Math.min(powerSetting >> 12,48)+
(powerSetting >> 18);
+ ArrayList<ItemStack> itemsToOutput=new ArrayList<>();
+ HashSet<Entity> tickedStuff=new HashSet<>();
+
boolean inside=true;
do {
for (Object entity : mte.getWorld().getEntitiesWithinAABBExcludingEntity(null, aabb)) {
@@ -226,11 +187,8 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock
}
}
}
- aabb.offset(0,flipped?-3:3,0);
- aabb.minX-=.5f;
- aabb.maxX+=.5f;
- aabb.minZ-=.5f;
- aabb.maxZ+=.5f;
+ aabb.offset(xyzOffsets[0],xyzOffsets[1],xyzOffsets[2]);
+ aabb=aabb.expand(xyzExpansion[0],xyzExpansion[1],xyzExpansion[2]);
inside=false;
damagingFactor>>=1;
} while(damagingFactor>0);
@@ -277,7 +235,7 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock
if (timerParameter <= 1) {
setStatusOfParameterIn(0, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_TOO_LOW);
} else if (timerParameter <= 3000) {
- setStatusOfParameterIn(0, 0, GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK);
+ setStatusOfParameterIn(0, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_OK);
} else if (Double.isNaN(timerParameter)) {
setStatusOfParameterIn(0, 1, GT_MetaTileEntity_MultiblockBase_EM.STATUS_WRONG);
} else {
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java
index c9a12e49d2..17555e022a 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java
@@ -30,6 +30,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fluids.FluidStack;
@@ -198,6 +199,172 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
}
}
+ /**
+ * Gets AABB based on abc and not xyz, without offsetting to controller position!!!
+ * @param minA
+ * @param minB
+ * @param minC
+ * @param maxA
+ * @param maxB
+ * @param maxC
+ * @return
+ */
+ public final AxisAlignedBB getBoundingBox(int minA,int minB,int minC,int maxA,int maxB,int maxC){
+ double[] offSetsMin= getTranslatedOffsets(minA,minB,minC);
+ double[] offSetsMax= getTranslatedOffsets(maxA,maxB,maxC);
+ for (int i=0;i<3;i++){
+ if(offSetsMax[i]<offSetsMin[i]){
+ double temp=offSetsMax[i];
+ offSetsMax[i]=offSetsMin[i];
+ offSetsMin[i]=temp;
+ }
+ }
+ return AxisAlignedBB.getBoundingBox(
+ offSetsMin[0],offSetsMin[1],offSetsMin[2],
+ offSetsMax[0],offSetsMax[1],offSetsMax[2]
+ );
+ }
+
+ /**
+ * Translates relative axis coordinates abc to absolute axis coordinates xyz
+ * abc from the CONTROLLER!
+ * @param a
+ * @param b
+ * @param c
+ * @return
+ */
+ public final double[] getTranslatedOffsets(double a, double b, double c){
+ double[] result=new double[3];
+ switch (getBaseMetaTileEntity().getFrontFacing() +(frontRotation<<3)){
+ case 4:
+ result[0]= c;
+ result[2]= a;
+ result[1]=- b;
+ break;
+ case 12:
+ result[0]= c;
+ result[1]=- a;
+ result[2]=- b;
+ break;
+ case 20:
+ result[0]= c;
+ result[2]=- a;
+ result[1]= b;
+ break;
+ case 28:
+ result[0]= c;
+ result[1]= a;
+ result[2]= b;
+ break;
+
+ case 3:
+ result[0]= a;
+ result[2]=- c;
+ result[1]=- b;
+ break;
+ case 11:
+ result[1]=- a;
+ result[2]=- c;
+ result[0]=- b;
+ break;
+ case 19:
+ result[0]=- a;
+ result[2]=- c;
+ result[1]= b;
+ break;
+ case 27:
+ result[1]= a;
+ result[2]=- c;
+ result[0]= b;
+ break;
+
+ case 5:
+ result[0]=- c;
+ result[2]=- a;
+ result[1]=- b;
+ break;
+ case 13:
+ result[0]=- c;
+ result[1]=- a;
+ result[2]= b;
+ break;
+ case 21:
+ result[0]=- c;
+ result[2]= a;
+ result[1]= b;
+ break;
+ case 29:
+ result[0]=- c;
+ result[1]= a;
+ result[2]=- b;
+ break;
+
+ case 2:
+ result[0]=- a;
+ result[2]= c;
+ result[1]=- b;
+ break;
+ case 10:
+ result[1]=- a;
+ result[2]= c;
+ result[0]= b;
+ break;
+ case 18:
+ result[0]= a;
+ result[2]= c;
+ result[1]= b;
+ break;
+ case 26:
+ result[1]= a;
+ result[2]= c;
+ result[0]=- b;
+ break;
+ //Things get odd if the block faces up or down...
+ case 1:
+ result[0]= a;
+ result[2]= b;
+ result[1]=- c;
+ break;//similar to 3
+ case 9:
+ result[2]= a;
+ result[0]=- b;
+ result[1]=- c;
+ break;//similar to 3
+ case 17:
+ result[0]=- a;
+ result[2]=- b;
+ result[1]=- c;
+ break;//similar to 3
+ case 25:
+ result[2]=- a;
+ result[0]= b;
+ result[1]=- c;
+ break;//similar to 3
+
+ case 0:
+ result[0]=- a;
+ result[2]= b;
+ result[1]= c;
+ break;//similar to 2
+ case 8:
+ result[2]= a;
+ result[0]= b;
+ result[1]= c;
+ break;
+ case 16:
+ result[0]= a;
+ result[2]=- b;
+ result[1]= c;
+ break;
+ case 24:
+ result[2]=- a;
+ result[0]=- b;
+ result[1]=+ c;
+ break;
+ }
+ return result;
+ }
+
//can be used to check structures of multi-blocks larger than one chunk, but...
//ALL THE HATCHES AND THE CONTROLLER SHOULD BE IN ONE CHUNK OR IN LOADED CHUNKS
//@Deprecated
@@ -1974,6 +2141,12 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
@Override
public void doExplosion(long aExplosionPower) {
explodeMultiblock();
+ if (!TecTech.ModConfig.BOOM_ENABLE) {
+ TecTech.proxy.broadcast("Multi DoExplosion BOOM! " + getBaseMetaTileEntity().getXCoord() + ' ' + getBaseMetaTileEntity().getYCoord() + ' ' + getBaseMetaTileEntity().getZCoord());
+ StackTraceElement[] ste = Thread.currentThread().getStackTrace();
+ TecTech.proxy.broadcast("Multi DoExplosion BOOM! " + ste[2].toString());
+ return;
+ }
super.doExplosion(aExplosionPower);
}//Redirecting to explodemultiblock
//endregion
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java
index 7bc6bfcc77..e97f3a00b4 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java
@@ -21,7 +21,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import java.util.BitSet;
import java.util.HashMap;
-import static com.github.technus.tectech.Util.StructureBuilder;
+import static com.github.technus.tectech.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
@@ -73,7 +73,7 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa
@Override
public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilder(shape, blockType, blockMeta, 2, 2, 1, getBaseMetaTileEntity(), hintsOnly);
+ StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 1, getBaseMetaTileEntity(), this,hintsOnly);
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/gui/GT_GUIContainer_DebugStructureWriter.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/gui/GT_GUIContainer_DebugStructureWriter.java
index 340a25b5be..0f64c83d5e 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/gui/GT_GUIContainer_DebugStructureWriter.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/gui/GT_GUIContainer_DebugStructureWriter.java
@@ -20,7 +20,7 @@ public class GT_GUIContainer_DebugStructureWriter extends GT_GUIContainerMetaTil
return;
}
fontRendererObj.drawString(dsw.size ? "Structure size" : "My position", 46, 16, 16448255);
- fontRendererObj.drawString(dsw.size ? "(Changing scan size)" : "(Moving origin point)", 46,24, 16448255);
+ fontRendererObj.drawString(dsw.size ? "(Changing scan size)" : "(Moving origin)", 46,24, 16448255);
fontRendererObj.drawString("A: " + dsw.numbers[dsw.size ? 3 : 0], 46, 32, 16448255);
fontRendererObj.drawString("B: " + dsw.numbers[dsw.size ? 4 : 1], 46, 40, 16448255);
fontRendererObj.drawString("C: " + dsw.numbers[dsw.size ? 5 : 2], 46, 48, 16448255);
diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang
index 20160069e4..590a55ceaa 100644
--- a/src/main/resources/assets/tectech/lang/en_US.lang
+++ b/src/main/resources/assets/tectech/lang/en_US.lang
@@ -5,6 +5,7 @@ item.em.debugContainer.name=Debug EM Container
item.em.definitionContainer.name=EM Recipe Hint
item.em.definitionScanStorage.name=EM Scan Storage
item.em.debugBuilder.name=Multiblock Machine Blueprint
+item.em.frontRotate.name=Front Rotation Scrench
item.em.parametrizerMemoryCard.name=Parametrizer Memory Card
death.attack.microwaving=%1$s was dehydrated by radiation.
diff --git a/src/main/resources/assets/tectech/textures/items/itemFrontRotate.png b/src/main/resources/assets/tectech/textures/items/itemFrontRotate.png
new file mode 100644
index 0000000000..2d5d2b2ad9
--- /dev/null
+++ b/src/main/resources/assets/tectech/textures/items/itemFrontRotate.png
Binary files differ