aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/GoodGenerator/Blocks/RegularBlock/Casing.java2
-rw-r--r--src/main/java/GoodGenerator/Blocks/RegularBlock/Frame.java36
-rw-r--r--src/main/java/GoodGenerator/Blocks/TEs/MultiNqGenerator.java207
-rw-r--r--src/main/java/GoodGenerator/Loader/Loaders.java7
-rw-r--r--src/main/java/GoodGenerator/Loader/RecipeLoader.java17
-rw-r--r--src/main/resources/assets/goodgenerator/lang/en_US.lang5
-rw-r--r--src/main/resources/assets/goodgenerator/textures/blocks/radiationProtectionSteelFrame.pngbin0 -> 1748 bytes
7 files changed, 215 insertions, 59 deletions
diff --git a/src/main/java/GoodGenerator/Blocks/RegularBlock/Casing.java b/src/main/java/GoodGenerator/Blocks/RegularBlock/Casing.java
index 87320bc523..1f856da921 100644
--- a/src/main/java/GoodGenerator/Blocks/RegularBlock/Casing.java
+++ b/src/main/java/GoodGenerator/Blocks/RegularBlock/Casing.java
@@ -40,7 +40,7 @@ public class Casing extends Block {
GregTech_API.registerMachineBlock(this, -1);
}
- public Casing(String name, String[] texture, CreativeTabs Tab,Material material){
+ public Casing(String name, String[] texture, Material material){
super(material);
this.setHardness(9.0F);
this.setResistance(5.0F);
diff --git a/src/main/java/GoodGenerator/Blocks/RegularBlock/Frame.java b/src/main/java/GoodGenerator/Blocks/RegularBlock/Frame.java
new file mode 100644
index 0000000000..63ddd7c552
--- /dev/null
+++ b/src/main/java/GoodGenerator/Blocks/RegularBlock/Frame.java
@@ -0,0 +1,36 @@
+package GoodGenerator.Blocks.RegularBlock;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.block.material.Material;
+import net.minecraft.world.IBlockAccess;
+
+public class Frame extends Casing{
+ public Frame(String name,String[] texture){
+ super(name,texture, Material.glass);
+ }
+
+ @Override
+ public boolean isOpaqueCube() {
+ return false;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public boolean shouldSideBeRendered(IBlockAccess worldClient, int xCoord, int yCoord, int zCoord, int aSide) {
+ if (worldClient.getBlock(xCoord, yCoord, zCoord) instanceof Frame)
+ return false;
+ return super.shouldSideBeRendered(worldClient, xCoord, yCoord, zCoord, aSide);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public int getRenderBlockPass() {
+ return 1;
+ }
+
+ @Override
+ public boolean renderAsNormalBlock() {
+ return false;
+ }
+}
diff --git a/src/main/java/GoodGenerator/Blocks/TEs/MultiNqGenerator.java b/src/main/java/GoodGenerator/Blocks/TEs/MultiNqGenerator.java
index cd1cbf41c3..e5aec8de86 100644
--- a/src/main/java/GoodGenerator/Blocks/TEs/MultiNqGenerator.java
+++ b/src/main/java/GoodGenerator/Blocks/TEs/MultiNqGenerator.java
@@ -1,9 +1,14 @@
package GoodGenerator.Blocks.TEs;
-import GoodGenerator.Items.MyMaterial;
import GoodGenerator.Loader.Loaders;
import GoodGenerator.Main.GoodGenerator;
import GoodGenerator.util.MyRecipeAdder;
+import com.github.bartimaeusnek.crossmod.tectech.TecTechEnabledMulti;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
+import com.github.technus.tectech.mechanics.structure.IStructureDefinition;
+import com.github.technus.tectech.mechanics.structure.StructureDefinition;
+import com.github.technus.tectech.thing.metaTileEntity.hatch.*;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.GregTech_API;
@@ -12,27 +17,129 @@ import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
+import gregtech.api.metatileentity.implementations.*;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
-import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import org.lwjgl.input.Keyboard;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.List;
-public class MultiNqGenerator extends GT_MetaTileEntity_MultiBlockBase {
+import static com.github.technus.tectech.mechanics.structure.StructureUtility.*;
+
+public class MultiNqGenerator extends GT_MetaTileEntity_MultiblockBase_EM implements TecTechEnabledMulti, IConstructable {
@SideOnly(Side.CLIENT)
protected String textureNames;
protected String name;
+ private IStructureDefinition<MultiNqGenerator> multiDefinition = null;
+ private int ticker = 0;
+
+ @Override
+ public void construct(ItemStack itemStack, boolean hintsOnly) {
+ structureBuild_EM(name, 3,7,0, hintsOnly, itemStack);
+ }
+
+ @Override
+ public String[] getStructureDescription(ItemStack itemStack) {
+ return new String[]{
+ "6x Tungstensteel Pipe Casing",
+ "48x Field Restricting Casing",
+ "36x Radiation Protection Steel Frame Box",
+ "At least 77x Radiation Proof Machine Casing",
+ "1~3x Input Hatch",
+ "0~1x Output Hatch",
+ "1x Maintenance Hatch",
+ "1x Dynamo Hatch"
+ };
+ }
+
+ public final boolean addToGeneratorList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex){
+ if (aTileEntity == null) {
+ return false;
+ } else {
+ IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) {
+ return false;
+ } else {
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) {
+ ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
+ }
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
+ return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input)aMetaTileEntity);
+ } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
+ return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output)aMetaTileEntity);
+ } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) {
+ return this.mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo)aMetaTileEntity);
+ } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) {
+ return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DynamoMulti) {
+ return this.eDynamoMulti.add((GT_MetaTileEntity_Hatch_DynamoMulti)aMetaTileEntity);
+ } else {
+ return false;
+ }
+ }
+ }
+ }
+
+ @Override
+ public IStructureDefinition<MultiNqGenerator> getStructure_EM() {
+ if(multiDefinition == null) {
+ multiDefinition = StructureDefinition
+ .<MultiNqGenerator>builder()
+ .addShape(name,
+ transpose(new String[][]{
+ {"AAAAAAA","AAAAAAA","AAAAAAA","AAAAAAA","AAAAAAA","AAAAAAA","AAAAAAA"},
+ {"N N"," "," CCC "," CPC "," CCC "," ","N N"},
+ {"N N"," "," CCC "," CPC "," CCC "," ","N N"},
+ {"N N"," "," CCC "," CPC "," CCC "," ","N N"},
+ {"N N"," "," CCC "," CPC "," CCC "," ","N N"},
+ {"AAAAAAA","A A","A CCC A","A CPC A","A CCC A","A A","AAAAAAA"},
+ {"ANNNNNA","N N","N CCC N","N CPC N","N CCC N","N N","ANNNNNA"},
+ {"XXX~XXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX","XXXXXXX"},
+ })
+ ).addElement(
+ 'X',
+ ofChain(
+ ofHatchAdder(
+ MultiNqGenerator::addToGeneratorList, 44,
+ GregTech_API.sBlockCasings3, 12
+ ),
+ ofBlock(
+ GregTech_API.sBlockCasings3, 12
+ )
+ )
+ ).addElement(
+ 'A',
+ ofBlockAnyMeta(
+ GregTech_API.sBlockCasings3, 12
+ )
+ ).addElement(
+ 'N',
+ ofBlockAnyMeta(
+ Loaders.radiationProtectionSteelFrame
+ )
+ ).addElement(
+ 'C',
+ ofBlockAnyMeta(
+ Loaders.MAR_Casing
+ )
+ ).addElement(
+ 'P',
+ ofBlockAnyMeta(
+ GregTech_API.sBlockCasings2,15
+ )
+ )
+ .build();
+ }
+ return multiDefinition;
+ }
public MultiNqGenerator(String name){super(name);}
@@ -48,7 +155,7 @@ public class MultiNqGenerator extends GT_MetaTileEntity_MultiBlockBase {
}
@Override
- public boolean checkRecipe(ItemStack aStack) {
+ public boolean checkRecipe_EM(ItemStack aStack) {
ArrayList<FluidStack> tFluids = getStoredFluids();
Collection<GT_Recipe> tRecipes = MyRecipeAdder.instance.NqGFuels.mRecipeList;
@@ -112,18 +219,18 @@ public class MultiNqGenerator extends GT_MetaTileEntity_MultiBlockBase {
depleteInput(f1);
if(f2 != null)
depleteInput(f2);
- if (mRuntime == 0 || mRuntime%lasting == 0){
+ if (ticker == 0 || ticker%lasting == 0){
depleteInput(recipeFluid);
this.mOutputFluids = new FluidStack[]{recipeFluidOut};
}
else this.mOutputFluids = null;
if (tFluids.contains(Materials.LiquidAir.getFluid(120)) && tFluids.get(tFluids.indexOf(Materials.LiquidAir.getFluid(120))).amount >= 120){
depleteInput(Materials.LiquidAir.getFluid(120));
- addEnergyOutput((long)(outputEU*times*booster));
+ addEnergyOutput_EM((long)(outputEU*booster),times);
this.mEUt = (int)(outputEU*times*booster);
}
else{
- addEnergyOutput(0);
+ addEnergyOutput_EM(0,0);
this.mEUt = 0;
}
this.mProgresstime = 1;
@@ -137,42 +244,22 @@ public class MultiNqGenerator extends GT_MetaTileEntity_MultiBlockBase {
}
@Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 2;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 2;
- int casingAmount = 0;
- for (int x = -2; x <= 2; x++) {
- for (int z = -2; z <= 2; z++) {
- for (int y = 0; y <= 8; y++) {
- if (x + xDir == 0 && y == 0 && z + zDir == 0) {
- continue;
- }
- IGregTechTileEntity tileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(x + xDir, y, z + zDir);
- Block block = aBaseMetaTileEntity.getBlockOffset(x + xDir, y, z + zDir);
-
- if (y != 0 && y != 8 && x != -2 && x != 2 && z != -2 && z != 2) {
- if (block == Blocks.air) continue;
- else return false;
- }
-
- if (y != 0){
- if(block == Loaders.MAR_Casing) continue;
- else return false;
- }
-
- if (!addInputToMachineList(tileEntity, 44) && !addOutputToMachineList(tileEntity, 44)
- && !addMaintenanceToMachineList(tileEntity, 44)
- && !addDynamoToMachineList(tileEntity,44)) {
- if (block == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(xDir + x, y, zDir + z) == 12) {
- casingAmount++;
- } else {
- return false;
- }
- }
- }
- }
+ public boolean onRunningTick(ItemStack stack) {
+ if (getBaseMetaTileEntity().isAllowedToWork()) {
+ mRuntime ++;
+ ticker ++;
}
- return casingAmount >= 10 && mDynamoHatches.size() == 1 ;
+ if (!getBaseMetaTileEntity().isActive()) {
+ mRuntime = 0;
+ ticker = 0;
+ }
+ if (ticker > 100000000) ticker = 0;
+ return true;
+ }
+
+ @Override
+ public boolean checkMachine_EM(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ return structureCheck_EM(name, 3, 7, 0) && mMaintenanceHatches.size() == 1;
}
@Override
@@ -210,15 +297,15 @@ public class MultiNqGenerator extends GT_MetaTileEntity_MultiBlockBase {
.addInfo("Input molten naquadria or enriched naquadah.")
.addInfo("Consume coolant 50mb/t to increase the efficiency:")
.addInfo("IC2 Coolant 105%, Super Coolant 150%, Cryotheum 275%")
- .addInfo("Consume excited liquid to increase the output voltage:")
- .addInfo("molten caesium | 2x output | 9mb/t ")
- .addInfo("molten uranium-235 | 3x output | 9mb/t")
- .addInfo("molten naquadah | 4x output | 1mb/t")
+ .addInfo("Consume excited liquid to increase the output ampere:")
+ .addInfo("molten caesium | 2x ampere | 9mb/t ")
+ .addInfo("molten uranium-235 | 3x ampere | 9mb/t")
+ .addInfo("molten naquadah | 4x ampere | 1mb/t")
.addSeparator()
- .beginStructureBlock(5, 9, 5, true)
+ .beginStructureBlock(7, 8, 7, true)
.addController("Front bottom")
- .addOtherStructurePart("Radiation Proof Machine Casing","Bottom, at least 10")
- .addOtherStructurePart("Field Restricting Casing Block","The rest part of the machine")
+ .addInfo("The structure is too complex!")
+ .addInfo("Follow the TecTech blueprint to build the main structure.")
.addEnergyHatch("Any bottom layer casing, only accept ONE!")
.addInputHatch("Any bottom layer casing")
.addOutputHatch("Any bottom layer casing")
@@ -240,4 +327,20 @@ public class MultiNqGenerator extends GT_MetaTileEntity_MultiBlockBase {
}
return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[44]};
}
+
+ @Override
+ public List<GT_MetaTileEntity_Hatch_Energy> getVanillaEnergyHatches() {
+ return this.mEnergyHatches;
+ }
+
+ @Override
+ public List<GT_MetaTileEntity_Hatch_EnergyTunnel> getTecTechEnergyTunnels() {
+ return new ArrayList<>();
+ }
+
+ @Override
+ public List<GT_MetaTileEntity_Hatch_EnergyMulti> getTecTechEnergyMultis() {
+ return new ArrayList<>();
+ }
+
}
diff --git a/src/main/java/GoodGenerator/Loader/Loaders.java b/src/main/java/GoodGenerator/Loader/Loaders.java
index d8ab077c41..873f8f34af 100644
--- a/src/main/java/GoodGenerator/Loader/Loaders.java
+++ b/src/main/java/GoodGenerator/Loader/Loaders.java
@@ -1,6 +1,7 @@
package GoodGenerator.Loader;
import GoodGenerator.Blocks.RegularBlock.Casing;
+import GoodGenerator.Blocks.RegularBlock.Frame;
import GoodGenerator.Blocks.TEs.MultiNqGenerator;
import GoodGenerator.Items.MyItemBlocks;
import GoodGenerator.Items.MyItems;
@@ -21,12 +22,16 @@ public class Loaders {
public static final Item highDensityThorium = new MyItems("highDensityThorium",GoodGenerator.GG);
public static final Block MAR_Casing = new Casing("MAR_Casing",new String[]{
- GoodGenerator.MOD_ID+":MAR_Casing",
+ GoodGenerator.MOD_ID+":MAR_Casing"
+ });
+ public static final Block radiationProtectionSteelFrame = new Frame("radiationProtectionSteelFrame",new String[]{
+ GoodGenerator.MOD_ID+":radiationProtectionSteelFrame"
});
public static ItemStack MAR;
public static void Register(){
GameRegistry.registerBlock(MAR_Casing, MyItemBlocks.class,"MAR_Casing");
+ GameRegistry.registerBlock(radiationProtectionSteelFrame,MyItemBlocks.class,"radiationProtectionSteelFrame");
GameRegistry.registerItem(radiationProtectionPlate,"radiationProtectionPlate",GoodGenerator.MOD_ID);
GameRegistry.registerItem(wrappedUraniumIngot,"wrappedUraniumIngot",GoodGenerator.MOD_ID);
GameRegistry.registerItem(highDensityUraniumNugget,"highDensityUraniumNugget",GoodGenerator.MOD_ID);
diff --git a/src/main/java/GoodGenerator/Loader/RecipeLoader.java b/src/main/java/GoodGenerator/Loader/RecipeLoader.java
index 875f435692..d76e5949a0 100644
--- a/src/main/java/GoodGenerator/Loader/RecipeLoader.java
+++ b/src/main/java/GoodGenerator/Loader/RecipeLoader.java
@@ -1,9 +1,7 @@
package GoodGenerator.Loader;
import GoodGenerator.Items.MyMaterial;
-import com.github.bartimaeusnek.bartworks.system.material.BW_GT_MaterialReference;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
-import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.*;
import gregtech.api.util.GT_OreDictUnificator;
import net.minecraft.item.ItemStack;
@@ -64,6 +62,19 @@ public class RecipeLoader {
1920
);
+ //LNR Frame
+ GT_Values.RA.addAssemblerRecipe(
+ new ItemStack[]{
+ GT_OreDictUnificator.get(OrePrefixes.stickLong,Materials.NaquadahAlloy,8),
+ GT_OreDictUnificator.get(OrePrefixes.frameGt,Materials.HSSE,4),
+ GT_Utility.getIntegratedCircuit(24)
+ },
+ null,
+ new ItemStack(Loaders.radiationProtectionSteelFrame),
+ 320,
+ 1920
+ );
+
//Uranium Liquid Fuel Process Line
GT_Values.RA.addAssemblerRecipe(
new ItemStack[]{
@@ -176,7 +187,7 @@ public class RecipeLoader {
GT_Values.RA.addCentrifugeRecipe(
GT_Utility.getIntegratedCircuit(1),null,
- MyMaterial.uraniumBasedLiquidFuelDepleted.getFluidOrGas(1000),
+ MyMaterial.thoriumBasedLiquidFuelDepleted.getFluidOrGas(1000),
null,
GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Lutetium,8),
GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Lutetium,8),
diff --git a/src/main/resources/assets/goodgenerator/lang/en_US.lang b/src/main/resources/assets/goodgenerator/lang/en_US.lang
index 32affd6add..e1edaa7e09 100644
--- a/src/main/resources/assets/goodgenerator/lang/en_US.lang
+++ b/src/main/resources/assets/goodgenerator/lang/en_US.lang
@@ -1,5 +1,6 @@
-MAR_Casing.0.name=Field Restricting Casing Block
+MAR_Casing.0.name=Field Restricting Casing
+radiationProtectionSteelFrame.0.name=Radiation Protection Steel Frame Box
item.radiationProtectionPlate.name=Radiation Protection Plate
item.wrappedUraniumIngot.name=Wrapped Uranium Ingot
@@ -7,7 +8,7 @@ item.highDensityUraniumNugget.name=High Density Uranium Nugget
item.highDensityUranium.name=High Density Uranium
item.wrappedThoriumIngot.name=Wrapped Thorium Ingot
item.highDensityThoriumNugget.name=High Density Thorium Nugget
-item.highDensityThorium.name=High Thorium Uranium
+item.highDensityThorium.name=High Density Thorium
itemGroup.Good Generator=Good Generator
diff --git a/src/main/resources/assets/goodgenerator/textures/blocks/radiationProtectionSteelFrame.png b/src/main/resources/assets/goodgenerator/textures/blocks/radiationProtectionSteelFrame.png
new file mode 100644
index 0000000000..c32447ca5f
--- /dev/null
+++ b/src/main/resources/assets/goodgenerator/textures/blocks/radiationProtectionSteelFrame.png
Binary files differ