aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorTechnus <daniel112092@gmail.com>2017-05-13 21:34:22 +0200
committerTechnus <daniel112092@gmail.com>2017-05-13 21:34:22 +0200
commit60d5c5d814e3b0600c9052dad605aa801b69adab (patch)
tree861c2855f28758ccc7ffed865cd91d099471059b /src/main/java
parent11992faf1ea711a8eb56370b498259c48bfe4237 (diff)
downloadGT5-Unofficial-60d5c5d814e3b0600c9052dad605aa801b69adab.tar.gz
GT5-Unofficial-60d5c5d814e3b0600c9052dad605aa801b69adab.tar.bz2
GT5-Unofficial-60d5c5d814e3b0600c9052dad605aa801b69adab.zip
Near to finish another refactor.
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/github/technus/tectech/TecTech.java43
-rw-r--r--src/main/java/com/github/technus/tectech/Util.java399
-rw-r--r--src/main/java/com/github/technus/tectech/auxiliary/TecTechConfig.java2
-rw-r--r--src/main/java/com/github/technus/tectech/dataFramework/quantumDataPacket.java65
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/classes/cElementalDecay.java10
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/classes/cElementalDefinition.java50
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/classes/cElementalDefinitionStack.java46
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/classes/cElementalDefinitionStackMap.java26
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/classes/cElementalInstanceStack.java51
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/classes/cElementalInstanceStackMap.java72
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/classes/cElementalMutableDefinitionStackMap.java46
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/classes/cElementalPrimitive.java26
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/classes/cElementalStackMap.java64
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/classes/rElementalRecipe.java30
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/classes/rElementalRecipeMap.java64
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/classes/rElementalRecipeTree.java60
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/classes/tElementalRecipeCollision.java10
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/definitions/dAtomDefinition.java34
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/definitions/dHadronDefinition.java24
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/interfaces/iElementalDefinition.java6
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/magicAddon/definitions/dComplexAspectDefinition.java (renamed from src/main/java/com/github/technus/tectech/elementalMatter/definitions/dComplexAspectDefinition.java)13
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/magicAddon/definitions/ePrimalAspectDefinition.java (renamed from src/main/java/com/github/technus/tectech/elementalMatter/definitions/ePrimalAspectDefinition.java)2
-rw-r--r--src/main/java/com/github/technus/tectech/loader/MachineLoader.java12
-rw-r--r--src/main/java/com/github/technus/tectech/loader/MainLoader.java4
-rw-r--r--src/main/java/com/github/technus/tectech/loader/RecipeLoader.java2
-rw-r--r--src/main/java/com/github/technus/tectech/loader/ThingsLoader.java1
-rw-r--r--src/main/java/com/github/technus/tectech/thing/CustomItemList.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/block/QuantumGlassBlock.java8
-rw-r--r--src/main/java/com/github/technus/tectech/thing/block/QuantumGlassItem.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/item/DebugBuilder.java8
-rw-r--r--src/main/java/com/github/technus/tectech/thing/item/DebugContainer_EM.java12
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DataConnector.java22
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_ElementalContainer.java7
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Holder.java6
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_InputData.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OutputData.java35
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Rack.java203
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Uncertainty.java18
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Holder.java12
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Rack.java20
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Holder.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Rack.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.java50
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java167
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java32
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java22
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java84
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java18
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java22
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java49
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java26
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java28
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java2
-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_MultiblockBase_EM.java79
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/gui/GT_Container_MultiMachineEM.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/other todo4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/pipe/GT_MetaTileEntity_Pipe_Data.java55
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/pipe/GT_MetaTileEntity_Pipe_EM.java31
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java38
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/gui/GT_Container_DebugStructureWriter.java45
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/gui/GT_GUIContainer_DebugStructureWriter.java12
-rw-r--r--src/main/java/com/github/technus/tectech/vec3pos.java46
65 files changed, 1301 insertions, 1052 deletions
diff --git a/src/main/java/com/github/technus/tectech/TecTech.java b/src/main/java/com/github/technus/tectech/TecTech.java
index 78cc01eca9..01ac9077f3 100644
--- a/src/main/java/com/github/technus/tectech/TecTech.java
+++ b/src/main/java/com/github/technus/tectech/TecTech.java
@@ -44,9 +44,9 @@ public class TecTech {
public static TecTechConfig ModConfig;
public static XSTR Rnd = null;
public static CreativeTabs mainTab = null;
- private static boolean oneTimeFix=false;
+ private static boolean oneTimeFix = false;
- public static boolean hasCOFH=false;
+ public static boolean hasCOFH = false;
public static void AddLoginError(String pMessage) {
if (Module_AdminErrorLogs != null)
@@ -76,7 +76,7 @@ public class TecTech {
@EventHandler
public void PostLoad(FMLPostInitializationEvent PostEvent) {
- hasCOFH=Loader.isModLoaded(Reference.COFHCORE);
+ hasCOFH = Loader.isModLoaded(Reference.COFHCORE);
GTCustomLoader = new MainLoader();
GTCustomLoader.things();
@@ -111,37 +111,38 @@ public class TecTech {
}
@EventHandler
- public void onServerAboutToStart(FMLServerAboutToStartEvent ev){
- if(!oneTimeFix) {
- oneTimeFix=true;
+ public void onServerAboutToStart(FMLServerAboutToStartEvent ev) {
+ if (!oneTimeFix) {
+ oneTimeFix = true;
if (ModConfig.NERF_FUSION) FixBrokenFusionRecipes();
}
}
- private void FixBrokenFusionRecipes(){
- HashMap<Fluid,Fluid> binds=new HashMap<>();
- for(Materials m:Materials.values()){
- FluidStack p=m.getPlasma(1);
- if( p!=null) {
- if(TecTechConfig.DEBUG_MODE) TecTech.Logger.info("Found Plasma of "+m.name());
+ private void FixBrokenFusionRecipes() {
+ HashMap<Fluid, Fluid> binds = new HashMap<>();
+ for (Materials m : Materials.values()) {
+ FluidStack p = m.getPlasma(1);
+ if (p != null) {
+ if (TecTechConfig.DEBUG_MODE) TecTech.Logger.info("Found Plasma of " + m.name());
if (m.mElement != null &&
(m.mElement.mProtons >= Materials.Iron.mElement.mProtons ||
- -m.mElement.mProtons >= Materials.Iron.mElement.mProtons ||
- m.mElement.mNeutrons >= Materials.Iron.mElement.mNeutrons ||
- -m.mElement.mNeutrons >= Materials.Iron.mElement.mNeutrons)) {
+ -m.mElement.mProtons >= Materials.Iron.mElement.mProtons ||
+ m.mElement.mNeutrons >= Materials.Iron.mElement.mNeutrons ||
+ -m.mElement.mNeutrons >= Materials.Iron.mElement.mNeutrons)) {
if (TecTechConfig.DEBUG_MODE) TecTech.Logger.info("Attempting to bind " + m.name());
if (m.getMolten(1) != null) binds.put(p.getFluid(), m.getMolten(1).getFluid());
else if (m.getGas(1) != null) binds.put(p.getFluid(), m.getGas(1).getFluid());
else if (m.getFluid(1) != null) binds.put(p.getFluid(), m.getFluid(1).getFluid());
- else binds.put(p.getFluid(),Materials.Iron.getMolten(1).getFluid());
+ else binds.put(p.getFluid(), Materials.Iron.getMolten(1).getFluid());
}
}
}
- for(GT_Recipe r:GT_Recipe.GT_Recipe_Map.sFusionRecipes.mRecipeList){
- Fluid f=binds.get(r.mFluidOutputs[0].getFluid());
- if(f!=null){
- if(TecTechConfig.DEBUG_MODE) TecTech.Logger.info("Nerfing Recipe "+r.mFluidOutputs[0].getUnlocalizedName());
- r.mFluidOutputs[0]=new FluidStack(f,r.mFluidInputs[0].amount);
+ for (GT_Recipe r : GT_Recipe.GT_Recipe_Map.sFusionRecipes.mRecipeList) {
+ Fluid f = binds.get(r.mFluidOutputs[0].getFluid());
+ if (f != null) {
+ if (TecTechConfig.DEBUG_MODE)
+ TecTech.Logger.info("Nerfing Recipe " + r.mFluidOutputs[0].getUnlocalizedName());
+ r.mFluidOutputs[0] = new FluidStack(f, r.mFluidInputs[0].amount);
}
}
}
diff --git a/src/main/java/com/github/technus/tectech/Util.java b/src/main/java/com/github/technus/tectech/Util.java
index 154ed10eba..4335791e77 100644
--- a/src/main/java/com/github/technus/tectech/Util.java
+++ b/src/main/java/com/github/technus/tectech/Util.java
@@ -26,7 +26,7 @@ public class Util {
public static String intToString(int number, int groupSize) {
StringBuilder result = new StringBuilder();
- for(int i = 31; i >= 0 ; i--) {
+ for (int i = 31; i >= 0; i--) {
int mask = 1 << i;
result.append((number & mask) != 0 ? "1" : "0");
@@ -46,8 +46,8 @@ public class Util {
int horizontalOffset, int verticalOffset, int depthOffset,
IGregTechTileEntity aBaseMetaTileEntity,
boolean forceCheck) {
- World world=aBaseMetaTileEntity.getWorld();
- if(world.isRemote)return false;
+ World world = aBaseMetaTileEntity.getWorld();
+ if (world.isRemote) return false;
//TE Rotation
byte facing = aBaseMetaTileEntity.getFrontFacing();
@@ -70,21 +70,46 @@ public class Util {
} else {
//get x y z from rotation
switch (facing) {//translation
- case 4: x = aBaseMetaTileEntity.getXCoord()+c; z = aBaseMetaTileEntity.getZCoord()+a; y = aBaseMetaTileEntity.getYCoord()+b; break;
- case 3: x = aBaseMetaTileEntity.getXCoord()+a; z = aBaseMetaTileEntity.getZCoord()-c; y = aBaseMetaTileEntity.getYCoord()+b; break;
- case 5: x = aBaseMetaTileEntity.getXCoord()-c; z = aBaseMetaTileEntity.getZCoord()-a; y = aBaseMetaTileEntity.getYCoord()+b; break;
- case 2: x = aBaseMetaTileEntity.getXCoord()-a; z = aBaseMetaTileEntity.getZCoord()+c; y = aBaseMetaTileEntity.getYCoord()+b; break;
+ case 4:
+ x = aBaseMetaTileEntity.getXCoord() + c;
+ z = aBaseMetaTileEntity.getZCoord() + a;
+ y = aBaseMetaTileEntity.getYCoord() + b;
+ break;
+ case 3:
+ x = aBaseMetaTileEntity.getXCoord() + a;
+ z = aBaseMetaTileEntity.getZCoord() - c;
+ y = aBaseMetaTileEntity.getYCoord() + b;
+ break;
+ case 5:
+ x = aBaseMetaTileEntity.getXCoord() - c;
+ z = aBaseMetaTileEntity.getZCoord() - a;
+ y = aBaseMetaTileEntity.getYCoord() + b;
+ break;
+ case 2:
+ x = aBaseMetaTileEntity.getXCoord() - a;
+ z = aBaseMetaTileEntity.getZCoord() + c;
+ y = aBaseMetaTileEntity.getYCoord() + b;
+ break;
//Things get odd if the block faces up or down...
- case 1: x = aBaseMetaTileEntity.getXCoord()+a; z = aBaseMetaTileEntity.getZCoord()+b; y = aBaseMetaTileEntity.getYCoord()-c; break;//similar to 3
- case 0: x = aBaseMetaTileEntity.getXCoord()-a; z = aBaseMetaTileEntity.getZCoord()-b; y = aBaseMetaTileEntity.getYCoord()+c; break;//similar to 2
- default: return false;
+ case 1:
+ x = aBaseMetaTileEntity.getXCoord() + a;
+ z = aBaseMetaTileEntity.getZCoord() + b;
+ y = aBaseMetaTileEntity.getYCoord() - c;
+ break;//similar to 3
+ case 0:
+ x = aBaseMetaTileEntity.getXCoord() - a;
+ z = aBaseMetaTileEntity.getZCoord() - b;
+ y = aBaseMetaTileEntity.getYCoord() + c;
+ break;//similar to 2
+ default:
+ return false;
}
//that must be here since in some cases other axis (b,c) controls y
- if(y<0 || y>=256) return false;
+ if (y < 0 || y >= 256) return false;
//Check block
- if (world.blockExists(x,y,z)) {//this actually checks if the chunk is loaded at this pos
+ if (world.blockExists(x, y, z)) {//this actually checks if the chunk is loaded at this pos
switch (block) {
case '-'://must be air
if (world.getBlock(x, y, z).getMaterial() != Material.air)
@@ -108,7 +133,7 @@ public class Util {
return false;
}
}
- }else if (forceCheck) return false;
+ } else if (forceCheck) return false;
a++;//block in horizontal layer
}
}
@@ -133,13 +158,13 @@ public class Util {
int horizontalOffset, int verticalOffset, int depthOffset,
IGregTechTileEntity aBaseMetaTileEntity,
boolean forceCheck) {
- World world=aBaseMetaTileEntity.getWorld();
- if(world.isRemote)return false;
+ World world = aBaseMetaTileEntity.getWorld();
+ if (world.isRemote) return false;
//TE Rotation
byte facing = aBaseMetaTileEntity.getFrontFacing();
IGregTechTileEntity igt;
- IMetaTileEntity imt=aBaseMetaTileEntity.getMetaTileEntity();
+ IMetaTileEntity imt = aBaseMetaTileEntity.getMetaTileEntity();
int x, y, z, a, b, c, pointer;
//a,b,c - relative to block face!
@@ -155,26 +180,51 @@ public class Util {
for (char block : __structure.toCharArray()) {//left to right
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 < '+') {//used to mark THINGS
+ // a++;
} else {
//get x y z from rotation
switch (facing) {//translation
- case 4: x = aBaseMetaTileEntity.getXCoord()+c; z = aBaseMetaTileEntity.getZCoord()+a; y = aBaseMetaTileEntity.getYCoord()+b; break;
- case 3: x = aBaseMetaTileEntity.getXCoord()+a; z = aBaseMetaTileEntity.getZCoord()-c; y = aBaseMetaTileEntity.getYCoord()+b; break;
- case 5: x = aBaseMetaTileEntity.getXCoord()-c; z = aBaseMetaTileEntity.getZCoord()-a; y = aBaseMetaTileEntity.getYCoord()+b; break;
- case 2: x = aBaseMetaTileEntity.getXCoord()-a; z = aBaseMetaTileEntity.getZCoord()+c; y = aBaseMetaTileEntity.getYCoord()+b; break;
+ case 4:
+ x = aBaseMetaTileEntity.getXCoord() + c;
+ z = aBaseMetaTileEntity.getZCoord() + a;
+ y = aBaseMetaTileEntity.getYCoord() + b;
+ break;
+ case 3:
+ x = aBaseMetaTileEntity.getXCoord() + a;
+ z = aBaseMetaTileEntity.getZCoord() - c;
+ y = aBaseMetaTileEntity.getYCoord() + b;
+ break;
+ case 5:
+ x = aBaseMetaTileEntity.getXCoord() - c;
+ z = aBaseMetaTileEntity.getZCoord() - a;
+ y = aBaseMetaTileEntity.getYCoord() + b;
+ break;
+ case 2:
+ x = aBaseMetaTileEntity.getXCoord() - a;
+ z = aBaseMetaTileEntity.getZCoord() + c;
+ y = aBaseMetaTileEntity.getYCoord() + b;
+ break;
//Things get odd if the block faces up or down...
- case 1: x = aBaseMetaTileEntity.getXCoord()+a; z = aBaseMetaTileEntity.getZCoord()+b; y = aBaseMetaTileEntity.getYCoord()-c; break;//similar to 3
- case 0: x = aBaseMetaTileEntity.getXCoord()-a; z = aBaseMetaTileEntity.getZCoord()-b; y = aBaseMetaTileEntity.getYCoord()+c; break;//similar to 2
- default: return false;
+ case 1:
+ x = aBaseMetaTileEntity.getXCoord() + a;
+ z = aBaseMetaTileEntity.getZCoord() + b;
+ y = aBaseMetaTileEntity.getYCoord() - c;
+ break;//similar to 3
+ case 0:
+ x = aBaseMetaTileEntity.getXCoord() - a;
+ z = aBaseMetaTileEntity.getZCoord() - b;
+ y = aBaseMetaTileEntity.getYCoord() + c;
+ break;//similar to 2
+ default:
+ return false;
}
//that must be here since in some cases other axis (b,c) controls y
- if(y<0 || y>=256) return false;
+ if (y < 0 || y >= 256) return false;
//Check block
- if (world.blockExists(x,y,z)) {//this actually checks if the chunk is loaded at this pos
+ if (world.blockExists(x, y, z)) {//this actually checks if the chunk is loaded at this pos
switch (block) {
case '-'://must be air
if (world.getBlock(x, y, z).getMaterial() != Material.air)
@@ -185,7 +235,7 @@ public class Util {
return false;
break;
default://check for block (countable)
- if((pointer = block - '0') >= 0) {
+ if ((pointer = block - '0') >= 0) {
//countable air -> net.minecraft.block.BlockAir
if (world.getBlock(x, y, z) != blockType[pointer]) {
if (TecTechConfig.DEBUG_MODE)
@@ -197,10 +247,10 @@ public class Util {
TecTech.Logger.info("Struct-meta-id-error " + x + " " + y + " " + z + " / " + a + " " + b + " " + c + " / " + world.getBlockMetadata(x, y, z) + " " + blockM