aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.properties4
-rw-r--r--src/main/java/com/github/technus/tectech/TecTech.java1
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/classes/rElementalRecipe.java18
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/classes/rElementalRecipeTree.java45
-rw-r--r--src/main/java/com/github/technus/tectech/loader/GT_Loader_Machines.java15
-rw-r--r--src/main/java/com/github/technus/tectech/loader/GT_Loader_Recipes.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/CustomItemList.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/item/debug_container_EM.java9
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java (renamed from src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantifier.java)8
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java79
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java (renamed from src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantifier.java)8
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java51
12 files changed, 179 insertions, 65 deletions
diff --git a/build.properties b/build.properties
index ae249c84ff..baa074fd66 100644
--- a/build.properties
+++ b/build.properties
@@ -4,7 +4,7 @@ tectech.version=3.3.3
ic2.version=2.2.790-experimental
nei.version=1.0.3.74
-gregtech.jenkinsbuild=392
-gregtech.version=5.09.27.34
+gregtech.jenkinsbuild=401
+gregtech.version=5.09.27.35
yamcore.version=0.5.70 \ No newline at end of file
diff --git a/src/main/java/com/github/technus/tectech/TecTech.java b/src/main/java/com/github/technus/tectech/TecTech.java
index b9ce2ed5f9..1a74b762bb 100644
--- a/src/main/java/com/github/technus/tectech/TecTech.java
+++ b/src/main/java/com/github/technus/tectech/TecTech.java
@@ -98,6 +98,7 @@ public class TecTech {
super.displayAllReleventItems(stuffToShow);
}
};
+
RegisterThingsInTabs();
if (Loader.isModLoaded("dreamcraft")) ;//TODO init recipes for GTNH coremod
}
diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/classes/rElementalRecipe.java b/src/main/java/com/github/technus/tectech/elementalMatter/classes/rElementalRecipe.java
index b7abbd86fd..98f11cb4d4 100644
--- a/src/main/java/com/github/technus/tectech/elementalMatter/classes/rElementalRecipe.java
+++ b/src/main/java/com/github/technus/tectech/elementalMatter/classes/rElementalRecipe.java
@@ -7,29 +7,35 @@ import net.minecraftforge.fluids.FluidStack;
* Created by Tec on 02.03.2017.
*/
public class rElementalRecipe implements Comparable<rElementalRecipe> {
- public final cElementalDefinitionStackTree inEM;
- public final cElementalDefinitionStackTree outEM;
- public final ItemStack[] outItems;
- public final FluidStack[] outFluids;
+ public cElementalDefinitionStackTree inEM;
+ public cElementalDefinitionStackTree outEM;
+ public ItemStack[] outItems;
+ public FluidStack[] outFluids;
public Object[] extension = null;
+ private short comparableID=0;
public rElementalRecipe(
cElementalDefinitionStackTree inEMnotNull,
+ short comparableID,
cElementalDefinitionStackTree outEM,
ItemStack[] outItems,
FluidStack[] outFluids) {
this.inEM = inEMnotNull;
+ this.comparableID=comparableID;//allows multiple recipes with the same input EM
this.outEM = outEM;
this.outItems = outItems;
this.outFluids = outFluids;
}
- public void extend(Object... data) {
+ public rElementalRecipe extend(Object... data) {
extension = data;
+ return this;
}
@Override
public int compareTo(rElementalRecipe o) {
- return inEM.compareTo(o.inEM);
+ final int compare=inEM.compareTo(o.inEM);
+ if(compare!=0)return compare;
+ return (int)comparableID-o.comparableID;
}
}
diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/classes/rElementalRecipeTree.java b/src/main/java/com/github/technus/tectech/elementalMatter/classes/rElementalRecipeTree.java
index 92d9c5e05f..e2d9431432 100644
--- a/src/main/java/com/github/technus/tectech/elementalMatter/classes/rElementalRecipeTree.java
+++ b/src/main/java/com/github/technus/tectech/elementalMatter/classes/rElementalRecipeTree.java
@@ -6,57 +6,54 @@ import java.util.TreeMap;
* Created by Tec on 02.03.2017.
*/
public class rElementalRecipeTree {
- private TreeMap<cElementalDefinitionStackTree, rElementalRecipe> recipes = new TreeMap<>();
+ //Multimap for multiple recipes from the same thing - you know parameters might differ the output
+ private TreeMap<cElementalDefinitionStackTree, TreeMap<Short,rElementalRecipe> > recipes = new TreeMap<>();
- public rElementalRecipeTree(rElementalRecipe... contents) {
- for (rElementalRecipe recipe : contents)
- recipes.put(recipe.inEM, recipe);
- }
+ public rElementalRecipeTree() {}
public rElementalRecipe put(rElementalRecipe in) {
- return recipes.put(in.inEM, in);
+ TreeMap<Short, rElementalRecipe> r=recipes.get(in.inEM);
+ if(r==null){
+ r=new TreeMap<>();
+ recipes.put(in.inEM,r);
+ }
+ return r.put(in.comparableID, in);
}
public void putAll(rElementalRecipe... contents) {
for (rElementalRecipe recipe : contents)
- recipes.put(recipe.inEM, recipe);
+ put(recipe);
}
- public rElementalRecipe findExact(cElementalDefinitionStackTree in) {
+ public TreeMap<Short,rElementalRecipe> findExact(cElementalDefinitionStackTree in) {
return recipes.get(in);
}
- public rElementalRecipe findTopMatch(cElementalDefinitionStackTree in) {
- for (cElementalDefinitionStackTree requirement : recipes.descendingKeySet()) {
+ public TreeMap<Short,rElementalRecipe> findTopMatch(cElementalDefinitionStackTree in) {
+ for (cElementalDefinitionStackTree requirement : recipes.descendingKeySet())
if (in.removeAllAmounts(true, requirement))
return recipes.get(requirement);
- }
return null;
}
- public rElementalRecipe findTopMatch(cElementalInstanceStackTree in, boolean testOnly) {
- for (cElementalDefinitionStackTree requirement : recipes.descendingKeySet()) {
+ public TreeMap<Short,rElementalRecipe> findTopMatch(cElementalInstanceStackTree in, boolean testOnly) {
+ for (cElementalDefinitionStackTree requirement : recipes.descendingKeySet())
if (in.removeAllAmounts(testOnly, requirement))
return recipes.get(requirement);
- }
return null;
}
- public rElementalRecipe findBottomMatch(cElementalDefinitionStackTree in) {
- for (cElementalDefinitionStackTree requirement : recipes.keySet()) {
- if (in.removeAllAmounts(true, requirement)) {
+ public TreeMap<Short,rElementalRecipe> findBottomMatch(cElementalDefinitionStackTree in) {
+ for (cElementalDefinitionStackTree requirement : recipes.keySet())
+ if (in.removeAllAmounts(true, requirement))
return recipes.get(requirement);
- }
- }
return null;
}
- public rElementalRecipe findBottomMatch(cElementalInstanceStackTree in, boolean testOnly) {
- for (cElementalDefinitionStackTree requirement : recipes.keySet()) {
- if (in.removeAllAmounts(testOnly, requirement)) {
+ public TreeMap<Short,rElementalRecipe> findBottomMatch(cElementalInstanceStackTree in, boolean testOnly) {
+ for (cElementalDefinitionStackTree requirement : recipes.keySet())
+ if (in.removeAllAmounts(testOnly, requirement))
return recipes.get(requirement);
- }
- }
return null;
}
}
diff --git a/src/main/java/com/github/technus/tectech/loader/GT_Loader_Machines.java b/src/main/java/com/github/technus/tectech/loader/GT_Loader_Machines.java
index 0fe2512f0e..21824b4579 100644
--- a/src/main/java/com/github/technus/tectech/loader/GT_Loader_Machines.java
+++ b/src/main/java/com/github/technus/tectech/loader/GT_Loader_Machines.java
@@ -176,27 +176,28 @@ public class GT_Loader_Machines implements Runnable {
Machine_Multi_Transformer.set(new GT_MetaTileEntity_EM_transformer(12160, "multimachine.em.transformer", "Active Transformer").getStackForm(1L));
Machine_Multi_Infuser.set(new GT_MetaTileEntity_EM_infuser(12161,"multimachine.em.infuser","Energy infuser").getStackForm(1));
- Machine_Multi_MatterToEM.set(new GT_MetaTileEntity_EM_quantifier(12162, "multimachine.em.mattertoem", "Matter Quantifier").getStackForm(1L));
- Machine_Multi_EMToMatter.set(new GT_MetaTileEntity_EM_dequantifier(12163, "multimachine.em.emtomatter", "Matter De-quantifier").getStackForm(1L));
+ Machine_Multi_MatterToEM.set(new GT_MetaTileEntity_EM_quantizer(12162, "multimachine.em.mattertoem", "Matter Quantizer").getStackForm(1L));
+ Machine_Multi_EMToMatter.set(new GT_MetaTileEntity_EM_dequantizer(12163, "multimachine.em.emtomatter", "Matter Dequantizer").getStackForm(1L));
Machine_Multi_EMjunction.set(new GT_MetaTileEntity_EM_junction(12164, "multimachine.em.junction", "Matter junction").getStackForm(1L));
Machine_Multi_EMmachine.set(new GT_MetaTileEntity_EM_machine(12165, "multimachine.em.processing", "Quantum Processing Machine").getStackForm(1L));
Machine_Multi_EMCrafter.set(new GT_MetaTileEntity_EM_crafter(12166, "multimachine.em.crafter", "Matter Assembler").getStackForm(1L));
Machine_Multi_Collider.set(new GT_MetaTileEntity_EM_collider(12167, "multimachine.em.collider", "Matter Collider").getStackForm(1L));
Machine_Multi_BHG.set(new GT_MetaTileEntity_EM_bhg(12168, "multimachine.em.blackholegenerator", "Black Hole Generator").getStackForm(1L));
Machine_Multi_Wormhole.set(new GT_MetaTileEntity_EM_wormhole(12169, "multimachine.em.wormhole", "Wormhole").getStackForm(1L));
- Machine_Multi_Scanner.set(new GT_MetaTileEntity_EM_scanner(12170, "multimachine.em.scanner", "Elemental Scanner").getStackForm(1L));
- Machine_Multi_Computer.set(new GT_MetaTileEntity_EM_computer(12171, "multimachine.em.computer", "Quantum computer").getStackForm(1L));
+ Machine_Multi_Stabilizer.set(new GT_MetaTileEntity_EM_stabilizer(12170, "multimachine.em.stabilizer", "Elemental Stabilizer").getStackForm(1L));
+ Machine_Multi_Scanner.set(new GT_MetaTileEntity_EM_scanner(12171, "multimachine.em.scanner", "Elemental Scanner").getStackForm(1L));
+ Machine_Multi_Computer.set(new GT_MetaTileEntity_EM_computer(12172, "multimachine.em.computer", "Quantum computer").getStackForm(1L));
// ===================================================================================================
// Hatches EM
// ===================================================================================================
Parametrizer_Hatch.set(new GT_MetaTileEntity_Hatch_Param(12180, "hatch.param.tier.06", "Parametrizer for machines", 6).getStackForm(1L));
- Uncertainty_Hatch.set(new GT_MetaTileEntity_Hatch_Uncertainty(12181, "hatch.emcertain.tier.06", "Uncertainty resolver", 6).getStackForm(1L));
- UncertaintyX_Hatch.set(new GT_MetaTileEntity_Hatch_Uncertainty(12182, "hatch.emcertain.tier.10", "Uncertainty resolver X", 10).getStackForm(1L));
+ Uncertainty_Hatch.set(new GT_MetaTileEntity_Hatch_Uncertainty(12181, "hatch.certain.tier.06", "Uncertainty resolver", 6).getStackForm(1L));
+ UncertaintyX_Hatch.set(new GT_MetaTileEntity_Hatch_Uncertainty(12182, "hatch.certain.tier.10", "Uncertainty resolver X", 10).getStackForm(1L));
// ===================================================================================================
// EM pipe
// ===================================================================================================
- EMpipe.set(new GT_MetaTileEntity_Pipe_EM(12179, "pipe.elementalmatter", "Quantum tunnel").getStackForm(1L));
+ EMpipe.set(new GT_MetaTileEntity_Pipe_EM(12199, "pipe.elementalmatter", "Quantum tunnel").getStackForm(1L));
}
}
diff --git a/src/main/java/com/github/technus/tectech/loader/GT_Loader_Recipes.java b/src/main/java/com/github/technus/tectech/loader/GT_Loader_Recipes.java
index a4885f5401..d4c76198d2 100644
--- a/src/main/java/com/github/technus/tectech/loader/GT_Loader_Recipes.java
+++ b/src/main/java/com/github/technus/tectech/loader/GT_Loader_Recipes.java
@@ -2,7 +2,7 @@ package com.github.technus.tectech.loader;
import com.github.technus.tectech.elementalMatter.classes.cElementalPrimitive;
import com.github.technus.tectech.elementalMatter.definitions.*;
-import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_quantifier;
+import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_quantizer;
/**
* Created by danie_000 on 16.11.2016.
@@ -30,6 +30,6 @@ public class GT_Loader_Recipes implements Runnable {
// Recipe init
// ===================================================================================================
- GT_MetaTileEntity_EM_quantifier.run();
+ GT_MetaTileEntity_EM_quantizer.run();
}
}
diff --git a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java
index fa47c10b87..e40b478325 100644
--- a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java
+++ b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java
@@ -32,7 +32,7 @@ public enum CustomItemList implements IItemContainer {
debugBlock,
Machine_Multi_MatterToEM, Machine_Multi_EMToMatter, Machine_Multi_EMjunction,
Machine_Multi_Transformer, Machine_Multi_Computer, Machine_Multi_Infuser,
- Machine_Multi_BHG, Machine_Multi_EMmachine, Machine_Multi_Collider, Machine_Multi_Wormhole, Machine_Multi_EMCrafter, Machine_Multi_Scanner;
+ Machine_Multi_BHG, Machine_Multi_EMmachine, Machine_Multi_Stabilizer, Machine_Multi_Collider, Machine_Multi_Wormhole, Machine_Multi_EMCrafter, Machine_Multi_Scanner;
private ItemStack mStack = null;
diff --git a/src/main/java/com/github/technus/tectech/thing/item/debug_container_EM.java b/src/main/java/com/github/technus/tectech/thing/item/debug_container_EM.java
index d828a672aa..01e55898b5 100644
--- a/src/main/java/com/github/technus/tectech/thing/item/debug_container_EM.java
+++ b/src/main/java/com/github/technus/tectech/thing/item/debug_container_EM.java
@@ -37,11 +37,7 @@ public class debug_container_EM extends Item {
@Override
public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- NBTTagCompound tNBT;
- //if(aStack.getTagCompound()==null){
- // aStack.setTagCompound(new NBTTagCompound());
- //}
- tNBT = aStack.getTagCompound();
+ NBTTagCompound tNBT = aStack.getTagCompound();
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if (aPlayer instanceof EntityPlayerMP) {
aStack.stackSize = 1;
@@ -75,13 +71,12 @@ public class debug_container_EM extends Item {
@Override
public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) {
aList.add(commonValues.tecMark);
- aList.add("Container for elemental matter");
try {
NBTTagCompound tNBT = aStack.getTagCompound();
if (tNBT!=null && tNBT.hasKey("info")) {
aList.add("Contains:");
Collections.addAll(aList, cElementalInstanceStackTree.infoFromNBT(tNBT.getCompoundTag("info")));
- }
+ }else aList.add("Container for elemental matter");
} catch (Exception e) {
aList.add("---Unexpected Termination---");
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantifier.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java
index 9df5fbe8e3..5b4405ce4f 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantifier.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java
@@ -13,18 +13,18 @@ import net.minecraftforge.common.util.ForgeDirection;
/**
* Created by danie_000 on 17.12.2016.
*/
-public class GT_MetaTileEntity_EM_dequantifier extends GT_MetaTileEntity_MultiblockBase_EM {
+public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_MultiblockBase_EM {
- public GT_MetaTileEntity_EM_dequantifier(int aID, String aName, String aNameRegional) {
+ public GT_MetaTileEntity_EM_dequantizer(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
}
- public GT_MetaTileEntity_EM_dequantifier(String aName) {
+ public GT_MetaTileEntity_EM_dequantizer(String aName) {
super(aName);
}
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_EM_dequantifier(this.mName);
+ return new GT_MetaTileEntity_EM_dequantizer(this.mName);
}
@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 3dfb088b27..90e1bd655c 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
@@ -1,18 +1,25 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
+import cofh.api.energy.IEnergyContainerItem;
+import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.elementalMatter.commonValues;
import com.github.technus.tectech.thing.metaTileEntity.GT_MetaTileEntity_MultiblockBase_EM;
import com.github.technus.tectech.thing.metaTileEntity.multi.gui.GT_GUIContainer_MultiMachineEM;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import ic2.api.item.ElectricItem;
+import ic2.api.item.IElectricItem;
+import ic2.api.item.IElectricItemManager;
+import ic2.api.item.ISpecialElectricItem;
import net.minecraft.block.Block;
import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.common.util.ForgeDirection;
-import static com.github.technus.tectech.elementalMatter.commonValues.multiCheckAt;
import static com.github.technus.tectech.thing.casing.GT_Container_CasingsTT.sBlockCasingsTT;
+import static gregtech.api.GregTech_API.mEUtoRF;
/**
* Created by danie_000 on 17.12.2016.
@@ -59,7 +66,8 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa
for (int h = -1; h < 2; h++) {
if ((i != 0 || j != 0 || h != 0)/*exclude center*/ && (xDir + i != 0 || yDir + h != 0 || zDir + j != 0)/*exclude this*/) {
IGregTechTileEntity tTileEntity = iGregTechTileEntity.getIGregTechTileEntityOffset(xDir + i, yDir + h, zDir + j);
- if (!addEnergyIOToMachineList(tTileEntity, 99)) {
+ if ((!addMaintenanceToMachineList(tTileEntity, 99)) &&
+ (!addEnergyIOToMachineList(tTileEntity, 99))) {
if (iGregTechTileEntity.getBlockOffset(xDir + i, yDir + h, zDir + j) != sBlockCasingsTT ||
iGregTechTileEntity.getMetaIDOffset(xDir + i, yDir + h, zDir + j) != 3) {
return false;
@@ -74,9 +82,15 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa
@Override
public boolean EM_checkRecipe(ItemStack itemStack) {
- if (getBaseMetaTileEntity().isAllowedToWork()) {
-
-
+ if (getBaseMetaTileEntity().isAllowedToWork() && getRepairStatus()==getIdealStatus() && itemStack!=null && itemStack.stackSize==1) {
+ Item ofThis=itemStack.getItem();
+ if(itemStack.getItem() instanceof ISpecialElectricItem){
+ doChargeItemStackSpecial((ISpecialElectricItem) ofThis,itemStack);
+ }else if(itemStack.getItem() instanceof IElectricItem){
+ doChargeItemStack((IElectricItem) ofThis,itemStack);
+ }else if(itemStack.getItem() instanceof IEnergyContainerItem){
+ doChargeItemStackRF((IEnergyContainerItem) ofThis,itemStack);
+ }
mEfficiencyIncrease = 10000;
mMaxProgresstime = 20;
eDismatleBoom=true;
@@ -94,9 +108,58 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa
public String[] getDescription() {
return new String[]{
commonValues.tecMark,
- "Power substation",
- EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "All the transformation!",
- EnumChatFormatting.BLUE + "Insanely fast lossy charging, HAYO!",
+ "Power Transfer Extreme!",
+ EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Insanely fast charging!",
+ EnumChatFormatting.BLUE + "Doesn't work while broken!",
+ EnumChatFormatting.BLUE + "Power loss is a thing."
};
}
+
+ private void doChargeItemStack(IElectricItem item, ItemStack stack )
+ {
+ try {
+ double euDiff=item.getMaxCharge(stack) - ElectricItem.manager.getCharge(stack);
+ if(euDiff>0)this.setEUVar(this.getEUVar()-this.getEUVar()>>5);
+ this.setEUVar(
+ this.getEUVar()-(long)Math.ceil(
+ ElectricItem.manager.charge(stack,
+ Math.min(euDiff,this.getEUVar())
+ ,item.getTier(stack),true,false)
+ ));
+ } catch( Exception e ) {
+ if(TecTech.ModConfig.DEBUG_MODE)
+ e.printStackTrace();
+ }
+ }
+
+ private void doChargeItemStackSpecial(ISpecialElectricItem item, ItemStack stack )
+ {
+ try {
+ final IElectricItemManager manager=item.getManager(stack);
+ double euDiff=item.getMaxCharge(stack) - manager.getCharge(stack);
+ if(euDiff>0)this.setEUVar(this.getEUVar()-this.getEUVar()>>5);
+ this.setEUVar(
+ this.getEUVar()-(long)Math.ceil(
+ manager.charge(stack,
+ Math.min(euDiff,this.getEUVar())
+ ,item.getTier(stack),true,false)
+ ));
+ } catch( Exception e ) {
+ if(TecTech.ModConfig.DEBUG_MODE)
+ e.printStackTrace();
+ }
+ }
+
+ private void doChargeItemStackRF(IEnergyContainerItem item, ItemStack stack )
+ {
+ try {
+ long RF=Math.min(item.getMaxEnergyStored(stack)-item.getEnergyStored(stack),this.getEUVar()*mEUtoRF/100L);
+ //if(RF>0)this.setEUVar(this.getEUVar()-this.getEUVar()>>10);
+ RF=item.receiveEnergy(stack,RF>Integer.MAX_VALUE?Integer.MAX_VALUE:(int)RF,false);
+ this.setEUVar(this.getEUVar()-(RF*100L/mEUtoRF));
+ } catch( Exception e ) {
+ if (TecTech.ModConfig.DEBUG_MODE)
+ e.printStackTrace();
+ }
+ }
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantifier.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java
index b39cc9c5e0..15535e8a20 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantifier.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java
@@ -32,21 +32,21 @@ import static gregtech.api.enums.GT_Values.V;
/**
* Created by danie_000 on 17.12.2016.
*/
-public class GT_MetaTileEntity_EM_quantifier extends GT_MetaTileEntity_MultiblockBase_EM {
+public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_MultiblockBase_EM {
public static HashMap<Integer, cElementalDefinitionStack> itemBinds = new HashMap<>(32);
public static HashMap<Integer, cElementalDefinitionStack> fluidBind = new HashMap<>(8);
private static float refMass, refUnstableMass;
- public GT_MetaTileEntity_EM_quantifier(int aID, String aName, String aNameRegional) {
+ public GT_MetaTileEntity_EM_quantizer(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
}
- public GT_MetaTileEntity_EM_quantifier(String aName) {
+ public GT_MetaTileEntity_EM_quantizer(String aName) {
super(aName);
}
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_EM_quantifier(this.mName);
+ return new GT_MetaTileEntity_EM_quantizer(this.mName);
}
@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
new file mode 100644
index 0000000000..f108020e0e
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java
@@ -0,0 +1,51 @@
+package com.github.technus.tectech.thing.metaTileEntity.multi;
+
+import com.github.technus.tectech.elementalMatter.commonValues;
+import com.github.technus.tectech.thing.metaTileEntity.GT_MetaTileEntity_MultiblockBase_EM;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
+
+/**
+ * Created by danie_000 on 17.12.2016.
+ */
+public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_MultiblockBase_EM {
+ private static final String[][] shape = new String[][]{
+ {"",//left to right top
+ "",
+ ""},//front
+ {},//behind front
+ {} //behind
+ };
+ private static final int[] casingRequirements = new int[]{};
+ private static final Block[] blockType = new Block[]{};
+ private static final byte[] blockMeta = new byte[]{};
+
+ public GT_MetaTileEntity_EM_stabilizer(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_MetaTileEntity_EM_stabilizer(String aName) {
+ super(aName);
+ }
+
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_EM_stabilizer(this.mName);
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
+ return false;
+ }
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{
+ commonValues.tecMark,
+ "Processing quantum matter since...",
+ EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "the time u started using it."
+ };
+ }
+}