diff options
Diffstat (limited to 'src/main')
35 files changed, 127 insertions, 131 deletions
diff --git a/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java b/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java index 14c2034430..5ca890929c 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java @@ -1,6 +1,6 @@ package com.github.technus.tectech.compatibility.gtpp; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalDefinitionStack; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalDefinitionStack; import gregtech.api.enums.OrePrefixes; import gtPlusPlus.core.material.ELEMENT; import gtPlusPlus.core.material.MaterialGenerator; diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/EssentiaCompat.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/EssentiaCompat.java index 06fa753763..f82c9e5225 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/EssentiaCompat.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/EssentiaCompat.java @@ -1,6 +1,6 @@ package com.github.technus.tectech.compatibility.thaumcraft; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalInstanceStack; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalInstanceStack; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_MultiblockBase_EM; import net.minecraft.tileentity.TileEntity; diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/EssentiaCompatEnabled.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/EssentiaCompatEnabled.java index 86e2934c9f..d55485dfe0 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/EssentiaCompatEnabled.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/EssentiaCompatEnabled.java @@ -1,7 +1,7 @@ package com.github.technus.tectech.compatibility.thaumcraft; import com.github.technus.tectech.compatibility.thaumcraft.definitions.iElementalAspect; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalInstanceStack; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalInstanceStack; import com.github.technus.tectech.elementalMatter.core.templates.cElementalDefinition; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_MultiblockBase_EM; import net.minecraft.tileentity.TileEntity; diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/AspectDefinitionCompat.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/AspectDefinitionCompat.java index a054946942..8715e33dd8 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/AspectDefinitionCompat.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/AspectDefinitionCompat.java @@ -1,8 +1,8 @@ package com.github.technus.tectech.compatibility.thaumcraft.definitions; -import com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition; import com.github.technus.tectech.elementalMatter.core.templates.cElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition; import java.util.HashMap; diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/AspectDefinitionCompatEnabled.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/AspectDefinitionCompatEnabled.java index 07603114ed..210b88cb9e 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/AspectDefinitionCompatEnabled.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/AspectDefinitionCompatEnabled.java @@ -1,8 +1,8 @@ package com.github.technus.tectech.compatibility.thaumcraft.definitions; -import com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition; import com.github.technus.tectech.elementalMatter.core.tElementalException; import com.github.technus.tectech.elementalMatter.core.templates.cElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition; import thaumcraft.api.aspects.Aspect; import java.util.ArrayList; diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/dComplexAspectDefinition.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/dComplexAspectDefinition.java index 29a3a714b8..0a43ec6790 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/dComplexAspectDefinition.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/dComplexAspectDefinition.java @@ -4,10 +4,10 @@ import com.github.technus.tectech.TecTech; import com.github.technus.tectech.Util; import com.github.technus.tectech.elementalMatter.core.cElementalDecay; import com.github.technus.tectech.elementalMatter.core.cElementalDefinitionStackMap; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalDefinitionStack; -import com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalDefinitionStack; import com.github.technus.tectech.elementalMatter.core.tElementalException; import com.github.technus.tectech.elementalMatter.core.templates.cElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition; import com.github.technus.tectech.elementalMatter.core.transformations.aFluidDequantizationInfo; import com.github.technus.tectech.elementalMatter.core.transformations.aItemDequantizationInfo; import com.github.technus.tectech.elementalMatter.core.transformations.aOredictDequantizationInfo; 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 d59b26f294..00717007c1 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 @@ -4,7 +4,7 @@ import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.compatibility.thaumcraft.definitions.ePrimalAspectDefinition; import com.github.technus.tectech.elementalMatter.core.cElementalInstanceStackMap; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalInstanceStack; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalInstanceStack; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.casing.TT_Container_Casings; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; 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 88aa0801df..b9b674f880 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 @@ -4,7 +4,7 @@ import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.compatibility.thaumcraft.definitions.ePrimalAspectDefinition; import com.github.technus.tectech.elementalMatter.core.cElementalInstanceStackMap; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalInstanceStack; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalInstanceStack; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.casing.TT_Container_Casings; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalDecay.java b/src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalDecay.java index b6a8b4c2d0..d80a2b4ccd 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalDecay.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalDecay.java @@ -1,8 +1,8 @@ package com.github.technus.tectech.elementalMatter.core; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalDefinitionStack; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalInstanceStack; -import com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalDefinitionStack; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalInstanceStack; +import com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition; /** * Created by danie_000 on 22.10.2016. diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalDefinitionStackMap.java b/src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalDefinitionStackMap.java index 823dbfecdf..b3c66e42ce 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalDefinitionStackMap.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalDefinitionStackMap.java @@ -1,7 +1,7 @@ package com.github.technus.tectech.elementalMatter.core; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalDefinitionStack; -import com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalDefinitionStack; +import com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition; import net.minecraft.nbt.NBTTagCompound; import java.util.TreeMap; diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalInstanceStackMap.java b/src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalInstanceStackMap.java index 347836764b..ee8a81dbd1 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalInstanceStackMap.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalInstanceStackMap.java @@ -1,9 +1,9 @@ package com.github.technus.tectech.elementalMatter.core; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalDefinitionStack; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalInstanceStack; -import com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition; import com.github.technus.tectech.elementalMatter.core.interfaces.iHasElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalDefinitionStack; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalInstanceStack; +import com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalMutableDefinitionStackMap.java b/src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalMutableDefinitionStackMap.java index 846a1cf410..f8814c7861 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalMutableDefinitionStackMap.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalMutableDefinitionStackMap.java @@ -1,9 +1,9 @@ package com.github.technus.tectech.elementalMatter.core; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalDefinitionStack; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalInstanceStack; -import com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition; import com.github.technus.tectech.elementalMatter.core.interfaces.iHasElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalDefinitionStack; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalInstanceStack; +import com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition; import net.minecraft.nbt.NBTTagCompound; import java.util.Iterator; diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalStackMap.java b/src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalStackMap.java index c95427d906..0234e59f30 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalStackMap.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalStackMap.java @@ -1,7 +1,7 @@ package com.github.technus.tectech.elementalMatter.core; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalDefinitionStack; -import com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalDefinitionStack; +import com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/core/interfaces/iElementalDefinition.java b/src/main/java/com/github/technus/tectech/elementalMatter/core/interfaces/iElementalDefinition.java deleted file mode 100644 index fd44addbb6..0000000000 --- a/src/main/java/com/github/technus/tectech/elementalMatter/core/interfaces/iElementalDefinition.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.github.technus.tectech.elementalMatter.core.interfaces; - -import com.github.technus.tectech.elementalMatter.core.cElementalDecay; -import com.github.technus.tectech.elementalMatter.core.cElementalDefinitionStackMap; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalDefinitionStack; -import com.github.technus.tectech.elementalMatter.core.transformations.aFluidDequantizationInfo; -import com.github.technus.tectech.elementalMatter.core.transformations.aItemDequantizationInfo; -import com.github.technus.tectech.elementalMatter.core.transformations.aOredictDequantizationInfo; -import net.minecraft.nbt.NBTTagCompound; - -import java.util.ArrayList; - -/** - * Created by danie_000 on 11.11.2016. - */ -public interface iElementalDefinition extends Comparable<iElementalDefinition>,Cloneable {//IMMUTABLE - float STABLE_RAW_LIFE_TIME =1.5e36f; - float NO_DECAY_RAW_LIFE_TIME=-1; - long DEFAULT_ENERGY_LEVEL=0; - float DEFAULT_ENERGY_REQUIREMENT=25000f; - - //Nomenclature - String getName(); - - String getSymbol(); - - void addScanResults(ArrayList<String> lines, int capabilities, long energyLevel); - - byte getType(); - - byte getClassType();//bigger number means bigger things usually, but it is just used to differentiate between classes of iED - - //Not dynamically changing stuff - iElementalDefinition getAnti();//gives new anti particle def - - cElementalDecay[] getDecayArray();//possible decays - - cElementalDecay[] getNaturalDecayInstant();//natural decay if lifespan <1tick - - cElementalDecay[] getEnergyInducedDecay(long energyLevel);//energetic decay - - boolean usesSpecialEnergeticDecayHandling(); - - float getEnergyDiffBetweenStates(long currentEnergy, long newEnergyLevel);//positive or negative - - float getMass();//mass... MeV/c^2 - - int getCharge();//charge 1/3 electron charge - - //dynamically changing stuff - byte getColor();//-1 nope cannot 0 it can but undefined - - float getRawTimeSpan(long currentEnergy);//defined in static fields or generated - - boolean isTimeSpanHalfLife(); - - cElementalDefinitionStackMap getSubParticles();//contents... null if none - - aFluidDequantizationInfo someAmountIntoFluidStack(); - - aItemDequantizationInfo someAmountIntoItemsStack(); - - aOredictDequantizationInfo someAmountIntoOredictStack(); - - NBTTagCompound toNBT(); - - cElementalDefinitionStack getStackForm(int i); - - iElementalDefinition clone(); -} diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/core/interfaces/iHasElementalDefinition.java b/src/main/java/com/github/technus/tectech/elementalMatter/core/interfaces/iHasElementalDefinition.java index 92aac40bf8..2659898d62 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/core/interfaces/iHasElementalDefinition.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/core/interfaces/iHasElementalDefinition.java @@ -1,5 +1,7 @@ package com.github.technus.tectech.elementalMatter.core.interfaces; +import com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition; + /** * Created by danie_000 on 30.01.2017. */ diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/core/containers/cElementalDefinitionStack.java b/src/main/java/com/github/technus/tectech/elementalMatter/core/stacks/cElementalDefinitionStack.java index 1e3f79573e..8a119e356c 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/core/containers/cElementalDefinitionStack.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/core/stacks/cElementalDefinitionStack.java @@ -1,8 +1,8 @@ -package com.github.technus.tectech.elementalMatter.core.containers; +package com.github.technus.tectech.elementalMatter.core.stacks; -import com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition; import com.github.technus.tectech.elementalMatter.core.interfaces.iHasElementalDefinition; import com.github.technus.tectech.elementalMatter.core.templates.cElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition; import net.minecraft.nbt.NBTTagCompound; import static com.github.technus.tectech.elementalMatter.definitions.primitive.cPrimitiveDefinition.null__; diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/core/containers/cElementalInstanceStack.java b/src/main/java/com/github/technus/tectech/elementalMatter/core/stacks/cElementalInstanceStack.java index 5a79eeee42..e9de353597 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/core/containers/cElementalInstanceStack.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/core/stacks/cElementalInstanceStack.java @@ -1,13 +1,13 @@ -package com.github.technus.tectech.elementalMatter.core.containers; +package com.github.technus.tectech.elementalMatter.core.stacks; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.Util; import com.github.technus.tectech.elementalMatter.core.cElementalDecay; import com.github.technus.tectech.elementalMatter.core.cElementalDefinitionStackMap; import com.github.technus.tectech.elementalMatter.core.cElementalInstanceStackMap; -import com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition; import com.github.technus.tectech.elementalMatter.core.interfaces.iHasElementalDefinition; import com.github.technus.tectech.elementalMatter.core.templates.cElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition; import net.minecraft.nbt.NBTTagCompound; import java.util.ArrayList; diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/core/templates/cElementalDefinition.java b/src/main/java/com/github/technus/tectech/elementalMatter/core/templates/cElementalDefinition.java index 4b5c581c6f..9eb682f4b8 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/core/templates/cElementalDefinition.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/core/templates/cElementalDefinition.java @@ -1,8 +1,7 @@ package com.github.technus.tectech.elementalMatter.core.templates; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalDefinitionStack; -import com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition; import com.github.technus.tectech.elementalMatter.core.interfaces.iHasElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalDefinitionStack; import net.minecraft.nbt.NBTTagCompound; import java.lang.reflect.Method; @@ -16,7 +15,7 @@ import static com.github.technus.tectech.elementalMatter.definitions.primitive.c /** * Created by danie_000 on 23.01.2017. */ -public abstract class cElementalDefinition implements iElementalDefinition { +public abstract class cElementalDefinition extends iElementalDefinition { //Nothing array public static final iElementalDefinition[] nothing = new cElementalPrimitive[0]; @@ -54,10 +53,6 @@ public abstract class cElementalDefinition implements iElementalDefinition { return compareInnerContentsWithAmounts(getSubParticles().values(), o.getSubParticles().values()); } - private int compareClassID(iElementalDefinition obj) { - return ((int) getClassType()) - obj.getClassType(); - } - //use only for nested operations! private static int compareInnerContentsWithAmounts(cElementalDefinitionStack[] tc, cElementalDefinitionStack[] sc) { if (tc == null) { diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/core/templates/cElementalPrimitive.java b/src/main/java/com/github/technus/tectech/elementalMatter/core/templates/cElementalPrimitive.java index 558ad3d4a1..2f8ae329c2 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/core/templates/cElementalPrimitive.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/core/templates/cElementalPrimitive.java @@ -4,7 +4,6 @@ import com.github.technus.tectech.TecTech; import com.github.technus.tectech.Util; import com.github.technus.tectech.elementalMatter.core.cElementalDecay; import com.github.technus.tectech.elementalMatter.core.cElementalDefinitionStackMap; -import com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition; import com.github.technus.tectech.elementalMatter.core.tElementalException; import com.github.technus.tectech.elementalMatter.core.transformations.aFluidDequantizationInfo; import com.github.technus.tectech.elementalMatter.core.transformations.aItemDequantizationInfo; @@ -222,10 +221,6 @@ public abstract class cElementalPrimitive extends cElementalDefinition { return compareClassID(o); } - private int compareClassID(iElementalDefinition obj) { - return ((int) getClassType()) - obj.getClassType(); - } - @Override public final int hashCode() { return ID; diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/core/templates/iElementalDefinition.java b/src/main/java/com/github/technus/tectech/elementalMatter/core/templates/iElementalDefinition.java new file mode 100644 index 0000000000..bbdd90589d --- /dev/null +++ b/src/main/java/com/github/technus/tectech/elementalMatter/core/templates/iElementalDefinition.java @@ -0,0 +1,74 @@ +package com.github.technus.tectech.elementalMatter.core.templates; + +import com.github.technus.tectech.elementalMatter.core.cElementalDecay; +import com.github.technus.tectech.elementalMatter.core.cElementalDefinitionStackMap; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalDefinitionStack; +import com.github.technus.tectech.elementalMatter.core.transformations.aFluidDequantizationInfo; +import com.github.technus.tectech.elementalMatter.core.transformations.aItemDequantizationInfo; +import com.github.technus.tectech.elementalMatter.core.transformations.aOredictDequantizationInfo; +import net.minecraft.nbt.NBTTagCompound; + +import java.util.ArrayList; + +/** + * Created by danie_000 on 11.11.2016. + */ +public abstract class iElementalDefinition implements Comparable<iElementalDefinition>,Cloneable {//IMMUTABLE + public static final float STABLE_RAW_LIFE_TIME =1.5e36f; + public static final float NO_DECAY_RAW_LIFE_TIME=-1; + public static final long DEFAULT_ENERGY_LEVEL=0; + public static final float DEFAULT_ENERGY_REQUIREMENT=25000f; + + //Nomenclature + public abstract String getName(); + + public abstract String getSymbol(); + + public abstract void addScanResults(ArrayList<String> lines, int capabilities, long energyLevel); + + public abstract byte getType(); + + public abstract byte getClassType();//bigger number means bigger things usually, but it is just used to differentiate between classes of iED + + //Not dynamically changing stuff + public abstract iElementalDefinition getAnti();//gives new anti particle def + + public abstract cElementalDecay[] getDecayArray();//possible decays + + public abstract cElementalDecay[] getNaturalDecayInstant();//natural decay if lifespan <1tick + + public abstract cElementalDecay[] getEnergyInducedDecay(long energyLevel);//energetic decay + + public abstract boolean usesSpecialEnergeticDecayHandling(); + + public abstract float getEnergyDiffBetweenStates(long currentEnergy, long newEnergyLevel);//positive or negative + + public abstract float getMass();//mass... MeV/c^2 + + public abstract int getCharge();//charge 1/3 electron charge + + //dynamically changing stuff + public abstract byte getColor();//-1 nope cannot 0 it can but undefined + + public abstract float getRawTimeSpan(long currentEnergy);//defined in static fields or generated + + public abstract boolean isTimeSpanHalfLife(); + + public abstract cElementalDefinitionStackMap getSubParticles();//contents... null if none + + public abstract aFluidDequantizationInfo someAmountIntoFluidStack(); + + public abstract aItemDequantizationInfo someAmountIntoItemsStack(); + + public abstract aOredictDequantizationInfo someAmountIntoOredictStack(); + + public abstract NBTTagCompound toNBT(); + + public abstract cElementalDefinitionStack getStackForm(int i); + + public abstract iElementalDefinition clone(); + + public final int compareClassID(iElementalDefinition obj) { + return ((int) getClassType()) - obj.getClassType(); + } +} diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/core/transformations/bTransformationInfo.java b/src/main/java/com/github/technus/tectech/elementalMatter/core/transformations/bTransformationInfo.java index c9ae032a7e..e51142c841 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/core/transformations/bTransformationInfo.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/core/transformations/bTransformationInfo.java @@ -1,7 +1,7 @@ package com.github.technus.tectech.elementalMatter.core.transformations; -import com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition; import com.github.technus.tectech.elementalMatter.core.interfaces.iHasElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/definitions/complex/dAtomDefinition.java b/src/main/java/com/github/technus/tectech/elementalMatter/definitions/complex/dAtomDefinition.java index d8a04d16b3..935e4b89ab 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/definitions/complex/dAtomDefinition.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/definitions/complex/dAtomDefinition.java @@ -7,10 +7,10 @@ import com.github.technus.tectech.compatibility.gtpp.GtppAtomLoader; import com.github.technus.tectech.elementalMatter.core.cElementalDecay; import com.github.technus.tectech.elementalMatter.core.cElementalDefinitionStackMap; import com.github.technus.tectech.elementalMatter.core.cElementalMutableDefinitionStackMap; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalDefinitionStack; -import com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalDefinitionStack; import com.github.technus.tectech.elementalMatter.core.tElementalException; import com.github.technus.tectech.elementalMatter.core.templates.cElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition; import com.github.technus.tectech.elementalMatter.core.transformations.aFluidDequantizationInfo; import com.github.technus.tectech.elementalMatter.core.transformations.aItemDequantizationInfo; import com.github.technus.tectech.elementalMatter.core.transformations.aOredictDequantizationInfo; diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/definitions/complex/dHadronDefinition.java b/src/main/java/com/github/technus/tectech/elementalMatter/definitions/complex/dHadronDefinition.java index a2de430557..f0a46cb6d2 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/definitions/complex/dHadronDefinition.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/definitions/complex/dHadronDefinition.java @@ -6,10 +6,10 @@ import com.github.technus.tectech.auxiliary.TecTechConfig; import com.github.technus.tectech.elementalMatter.core.cElementalDecay; import com.github.technus.tectech.elementalMatter.core.cElementalDefinitionStackMap; import com.github.technus.tectech.elementalMatter.core.cElementalMutableDefinitionStackMap; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalDefinitionStack; -import com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalDefinitionStack; import com.github.technus.tectech.elementalMatter.core.tElementalException; import com.github.technus.tectech.elementalMatter.core.templates.cElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition; import com.github.technus.tectech.elementalMatter.core.transformations.*; import com.github.technus.tectech.elementalMatter.definitions.primitive.eBosonDefinition; import com.github.technus.tectech.elementalMatter.definitions.primitive.eQuarkDefinition; diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/definitions/complex/iaea/iaeaNuclide.java b/src/main/java/com/github/technus/tectech/elementalMatter/definitions/complex/iaea/iaeaNuclide.java index 04df78e289..c12ba37422 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/definitions/complex/iaea/iaeaNuclide.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/definitions/complex/iaea/iaeaNuclide.java @@ -12,7 +12,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.TreeMap; -import static com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition.STABLE_RAW_LIFE_TIME; +import static com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition.STABLE_RAW_LIFE_TIME; public final class iaeaNuclide { public static final double AMU_TO_EV_DIV_C_C=9.31494061E08D,MICRO_AMU_TO_EV_DIV_C_C=9.31494061E02D; diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/definitions/primitive/eBosonDefinition.java b/src/main/java/com/github/technus/tectech/elementalMatter/definitions/primitive/eBosonDefinition.java index 3b9ecc8433..636cd9b8fc 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/definitions/primitive/eBosonDefinition.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/definitions/primitive/eBosonDefinition.java @@ -1,7 +1,7 @@ package com.github.technus.tectech.elementalMatter.definitions.primitive; import com.github.technus.tectech.elementalMatter.core.cElementalDecay; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalDefinitionStack; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalDefinitionStack; import com.github.technus.tectech.elementalMatter.core.templates.cElementalPrimitive; /** diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/definitions/primitive/eLeptonDefinition.java b/src/main/java/com/github/technus/tectech/elementalMatter/definitions/primitive/eLeptonDefinition.java index 2f13fae24f..0e7abf4a42 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/definitions/primitive/eLeptonDefinition.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/definitions/primitive/eLeptonDefinition.java @@ -1,7 +1,7 @@ package com.github.technus.tectech.elementalMatter.definitions.primitive; import com.github.technus.tectech.elementalMatter.core.cElementalDecay; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalDefinitionStack; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalDefinitionStack; import com.github.technus.tectech.elementalMatter.core.templates.cElementalPrimitive; /** diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/definitions/primitive/eNeutrinoDefinition.java b/src/main/java/com/github/technus/tectech/elementalMatter/definitions/primitive/eNeutrinoDefinition.java index 673dba7b77..459719a8a4 100644 --- a/src/main/java/com/github/technus/tectech/elementalMatter/definitions/primitive/eNeutrinoDefinition.java +++ b/src/main/java/com/github/technus/tectech/elementalMatter/definitions/primitive/eNeutrinoDefinition.java @@ -1,7 +1,7 @@ package com.github.technus.tectech.elementalMatter.definitions.primitive; import com.github.technus.tectech.elementalMatter.core.cElementalDecay; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalDefinitionStack; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalDefinitionStack; import com.github.technus.tectech.elementalMatter.core.templates.cElementalPrimitive; /** diff --git a/src/main/java/com/github/technus/tectech/recipe/TT_recipe.java b/src/main/java/com/github/technus/tectech/recipe/TT_recipe.java index 05dbfeef77..439a28e384 100644 --- a/src/main/java/com/github/technus/tectech/recipe/TT_recipe.java +++ b/src/main/java/com/github/technus/tectech/recipe/TT_recipe.java @@ -2,8 +2,8 @@ package com.github.technus.tectech.recipe; import com.github.technus.tectech.elementalMatter.core.cElementalDefinitionStackMap; import com.github.technus.tectech.elementalMatter.core.cElementalInstanceStackMap; -import com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition; import com.github.technus.tectech.elementalMatter.core.templates.cElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.util.GT_Recipe; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java b/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java index 9238085a35..6324854082 100644 --- a/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java +++ b/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java @@ -2,8 +2,8 @@ package com.github.technus.tectech.recipe; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.elementalMatter.core.cElementalDefinitionStackMap; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalDefinitionStack; -import com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalDefinitionStack; +import com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition; import com.github.technus.tectech.thing.item.ElementalDefinitionContainer_EM; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_crafting; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_machine; 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 f00f182de1..477d573de8 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 @@ -2,7 +2,7 @@ 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.containers.cElementalInstanceStack; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalInstanceStack; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; import cpw.mods.fml.relauncher.Side; @@ -20,7 +20,7 @@ import net.minecraft.util.EnumChatFormatting; import static com.github.technus.tectech.Util.StructureBuilder; import static com.github.technus.tectech.Util.VN; -import static com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition.STABLE_RAW_LIFE_TIME; +import static com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition.STABLE_RAW_LIFE_TIME; 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; 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 92ff23b6bb..032095cefb 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,9 +2,9 @@ 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.containers.cElementalInstanceStack; import com.github.technus.tectech.elementalMatter.core.interfaces.iExchangeInfo; import com.github.technus.tectech.elementalMatter.core.interfaces.iHasElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalInstanceStack; import com.github.technus.tectech.elementalMatter.core.transformations.aOredictDequantizationInfo; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; @@ -21,7 +21,7 @@ import java.util.ArrayList; import static com.github.technus.tectech.Util.StructureBuilder; import static com.github.technus.tectech.Util.V; -import static com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition.STABLE_RAW_LIFE_TIME; +import static com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition.STABLE_RAW_LIFE_TIME; import static com.github.technus.tectech.elementalMatter.definitions.complex.dAtomDefinition.refMass; import static com.github.technus.tectech.elementalMatter.definitions.complex.dAtomDefinition.refUnstableMass; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; 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 4ebbc9438b..2de79cc6f2 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 @@ -3,8 +3,8 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.elementalMatter.core.cElementalInstanceStackMap; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalInstanceStack; import com.github.technus.tectech.elementalMatter.core.interfaces.iHasElementalDefinition; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalInstanceStack; import com.github.technus.tectech.elementalMatter.core.transformations.aFluidQuantizationInfo; import com.github.technus.tectech.elementalMatter.core.transformations.aItemQuantizationInfo; import com.github.technus.tectech.elementalMatter.core.transformations.aOredictQuantizationInfo; @@ -22,7 +22,7 @@ import net.minecraftforge.oredict.OreDictionary; import static com.github.technus.tectech.Util.*; import static com.github.technus.tectech.auxiliary.TecTechConfig.DEBUG_MODE; -import static com.github.technus.tectech.elementalMatter.core.interfaces.iElementalDefinition.DEFAULT_ENERGY_LEVEL; +import static com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition.DEFAULT_ENERGY_LEVEL; import static com.github.technus.tectech.elementalMatter.definitions.complex.dAtomDefinition.refMass; import static com.github.technus.tectech.elementalMatter.definitions.complex.dAtomDefinition.refUnstableMass; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; 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 19170a91f9..6a7dcf9dda 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 @@ -2,8 +2,8 @@ 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.containers.cElementalDefinitionStack; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalInstanceStack; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalDefinitionStack; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalInstanceStack; import com.github.technus.tectech.recipe.TT_recipe; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.block.QuantumStuffBlock; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java index e28e12069e..9dbb3845b0 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_MultiblockBase_EM.java @@ -5,8 +5,8 @@ import com.github.technus.tectech.TecTech; import com.github.technus.tectech.Util; import com.github.technus.tectech.Vec3pos; import com.github.technus.tectech.elementalMatter.core.cElementalInstanceStackMap; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalDefinitionStack; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalInstanceStack; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalDefinitionStack; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalInstanceStack; import com.github.technus.tectech.elementalMatter.core.tElementalException; import com.github.technus.tectech.thing.metaTileEntity.hatch.*; import com.github.technus.tectech.thing.metaTileEntity.multi.gui.GT_Container_MultiMachineEM; diff --git a/src/main/java/openmodularturrets/entity/projectiles/projectileEM.java b/src/main/java/openmodularturrets/entity/projectiles/projectileEM.java index 71fbaf33d0..e4efa6e8fb 100644 --- a/src/main/java/openmodularturrets/entity/projectiles/projectileEM.java +++ b/src/main/java/openmodularturrets/entity/projectiles/projectileEM.java @@ -2,7 +2,7 @@ package openmodularturrets.entity.projectiles; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.elementalMatter.core.cElementalInstanceStackMap; -import com.github.technus.tectech.elementalMatter.core.containers.cElementalInstanceStack; +import com.github.technus.tectech.elementalMatter.core.stacks.cElementalInstanceStack; import com.github.technus.tectech.elementalMatter.definitions.complex.dHadronDefinition; import com.github.technus.tectech.elementalMatter.definitions.primitive.eQuarkDefinition; import gregtech.api.GregTech_API; |