Adds Draconic Evolution Fusion Crafter (#17)

* Implements about 2/3 of the DE core crafter

* Fix block textures. Controller is disabled+not showing up anyway

* Block textures work, controller ingame, main structure check works

* Forgot

* Structure check finally fully works

* Structure

* Fix structure

* Casings

* Recipe map

* NEI

* No scala

* Assline recipe

* Nerf overclock

* Change the name to Draconic Evolution Fusion Crafter

* Fix

* tx

Co-authored-by: kuba6000 <kuba.123123.6000@gmail.com>
This commit is contained in:
Prometheus0000andkuba6000 authored and GitHub committed 2022-07-31 13:50:27 +07:00
1 parent 1715092471
commit dcb7f23091
20 files changed
+525 -54

No files matched your search

+3
View File
@@ -13,6 +13,7 @@ import cpw.mods.fml.relauncher.Side;
import emt.command.CommandOutputs;
import emt.init.EMTEntities;
import emt.init.Registry;
import emt.nei.NEI_Config;
import emt.network.PacketEMTKeys;
import emt.network.PacketNodeInfo;
import emt.proxy.CommonProxy;
@@ -83,6 +84,8 @@ public class EMT {
EMTDungeonChestGenerator.generateLoot();
EMTEntities.registerEMTEntities();
NetworkRegistry.INSTANCE.registerGuiHandler(this, proxy);
NEI_Config.Init();
}
@Mod.EventHandler
@@ -3,32 +3,34 @@ package emt.gthandler.common.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import net.minecraft.block.Block;
import emt.gthandler.common.items.EMT_CasingBlock;
import gregtech.api.enums.Textures;
import gregtech.api.render.TextureFactory;
import gregtech.common.blocks.GT_Block_Casings_Abstract;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import java.util.List;
public class EMT_GT_Block extends Block {
public class EMT_GT_Block extends GT_Block_Casings_Abstract {
@SideOnly(Side.CLIENT)
private IIcon[] texture;
private String[] textureNames;
private String name;
private final String[] textureNames;
public EMT_GT_Block(String name, String[] texture) {
super(Material.anvil);
public EMT_GT_Block(String[] texture) {
super(EMT_CasingBlock.class, "EMT_GTBLOCK_CASEING", Material.anvil);
this.setHardness(15.0F);
this.setResistance(30.0F);
this.name = name;
this.textureNames = texture;
this.setCreativeTab(EMT.TAB);
// Taking one texture slot :P
Textures.BlockIcons.setCasingTexture((byte) 1, (byte) (15 + 48), TextureFactory.of(this, 7));
}
@Override
@@ -58,23 +60,4 @@ public class EMT_GT_Block extends Block {
}
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public String getUnlocalizedName() {
return name;
}
@Override
public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) {
return false;
}
@Override
public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) {
return false;
}
}
@@ -5,28 +5,39 @@ import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import emt.gthandler.common.blocks.EMT_GT_Block;
import gregtech.api.util.GT_LanguageManager;
import gregtech.common.blocks.GT_Item_Casings_Abstract;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import java.util.List;
public class EMT_CasingBlock extends ItemBlock {
public class EMT_CasingBlock extends GT_Item_Casings_Abstract {
public static final Block[] EMT_GT_BLOCKS = {new EMT_GT_Block("EMT_GTBLOCK_CASEING", new String[]
{
EMT.TEXTURE_PATH + ":machines/side",
EMT.TEXTURE_PATH + ":machines/GT/inner",
EMT.TEXTURE_PATH + ":machines/GT/siderawI",
EMT.TEXTURE_PATH + ":machines/GT/rawcoreI",
EMT.TEXTURE_PATH + ":machines/GT/siderawII",
EMT.TEXTURE_PATH + ":machines/GT/rawcoreII",
}
public static final Block[] EMT_GT_BLOCKS = {new EMT_GT_Block(new String[]
{
EMT.TEXTURE_PATH + ":machines/side",
EMT.TEXTURE_PATH + ":machines/GT/inner",
EMT.TEXTURE_PATH + ":machines/GT/siderawI",
EMT.TEXTURE_PATH + ":machines/GT/rawcoreI",
EMT.TEXTURE_PATH + ":machines/GT/siderawII",
EMT.TEXTURE_PATH + ":machines/GT/rawcoreII",
EMT.TEXTURE_PATH + ":machines/GT/rawcoreII", //unused?
EMT.TEXTURE_PATH + ":machines/GT/ROBUST_NAQUADAH_ALLOY",
EMT.TEXTURE_PATH + ":machines/GT/BLOODY_ICHORIUM",
EMT.TEXTURE_PATH + ":machines/GT/DRACONIUM",
EMT.TEXTURE_PATH + ":machines/GT/WYVERN",
EMT.TEXTURE_PATH + ":machines/GT/AWAKENED_DRACONIUM",
EMT.TEXTURE_PATH + ":machines/GT/CHAOTIC",
}
)};
protected final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block");
protected final String mNoTileEntityToolTip = GT_LanguageManager.addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!");
protected final String deccCasing01Tooltip = GT_LanguageManager.addStringLocalization("gt.casing01tooltip", "Draconic Evolution Fusion Crafter Casing, Tier 1");
protected final String deccCasing02Tooltip = GT_LanguageManager.addStringLocalization("gt.casing02tooltip", "Draconic Evolution Fusion Crafter Casing, Tier 2");
protected final String deccCasing03Tooltip = GT_LanguageManager.addStringLocalization("gt.casing03tooltip", "Draconic Evolution Fusion Crafter Casing, Tier 3");
protected final String deccCasing04Tooltip = GT_LanguageManager.addStringLocalization("gt.casing04tooltip", "Draconic Evolution Fusion Crafter Casing, Tier 4");
protected final String deccCasing05Tooltip = GT_LanguageManager.addStringLocalization("gt.casing05tooltip", "Draconic Evolution Fusion Crafter Casing, Tier 5");
public EMT_CasingBlock(final Block par1) {
super(par1);
@@ -46,9 +57,29 @@ public class EMT_CasingBlock extends ItemBlock {
}
@Override
@SideOnly(Side.CLIENT) //so it only gets sent clientside?
public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) {
aList.add(this.mNoMobsToolTip);
aList.add(this.mNoTileEntityToolTip);
super.addInformation(aStack, aPlayer, aList, aF3_H);
switch (getDamage(aStack)) {
case 8:
aList.add(this.deccCasing01Tooltip);
break;
case 9:
aList.add(this.deccCasing02Tooltip);
break;
case 10:
aList.add(this.deccCasing03Tooltip);
break;
case 11:
aList.add(this.deccCasing04Tooltip);
break;
case 12:
aList.add(this.deccCasing05Tooltip);
break;
default:
break;
}
}
@Override
@@ -1,9 +1,9 @@
package emt.gthandler.common.loader;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.GameRegistry;
import emt.gthandler.common.implementations.EssentiaHatch;
import emt.gthandler.common.items.EMT_CasingBlock;
import emt.gthandler.common.tileentities.machines.multi.DE_Fusion_Crafter;
import emt.gthandler.common.tileentities.machines.multi.generator.EMT_Large_Essentia_Gen;
import emt.tile.GT_MetaTileEntity_ResearchCompleter;
import gregtech.api.enums.GT_Values;
@@ -14,6 +14,7 @@ import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.oredict.OreDictionary;
import thaumcraft.common.config.ConfigBlocks;
import thaumcraft.common.config.ConfigItems;
@@ -27,6 +28,7 @@ public class EMT_GT_Loader implements Runnable {
public static int aIDoffset = 13000 - TIERS - 1;
public static ItemStack[] EHatch = new ItemStack[TIERS];
public static ItemStack LEG;
public static ItemStack DECC;
public static ItemStack ResearchMultiblock;
@Override
@@ -35,18 +37,46 @@ public class EMT_GT_Loader implements Runnable {
for (int i = 0; i < TIERS; i++) {
EHatch[i] = new EssentiaHatch(aIDoffset + i, "Essentia Hatch " + GT_Values.VN[i], "Essentia Hatch " + GT_Values.VN[i], i).getStackForm(1L);
}
GameRegistry.registerBlock(EMT_CasingBlock.EMT_GT_BLOCKS[0], EMT_CasingBlock.class, "EMT_GTBLOCK_CASEING");
LEG = new EMT_Large_Essentia_Gen(aIDoffset + TIERS + 1, "Large Essentia Generator", "Large Essentia Generator").getStackForm(1L);
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Indium, 1L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Tungsten, 4L)}, Materials.SolderingAlloy.getMolten(576L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 3), 100, (int) (GT_Values.V[5] - (GT_Values.V[5] / 10)));
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 3), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 8L)}, Materials.Osmiridium.getMolten(576L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 5), 100, (int) (GT_Values.V[5] - (GT_Values.V[5] / 10)));
//Casing blocks
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Iridium, 1L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Osmiridium, 4L)}, Materials.SolderingAlloy.getMolten(576L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 2), 100, (int) (GT_Values.V[5] - (GT_Values.V[5] / 10)));
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Indium, 1L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Tungsten, 4L)}, Materials.SolderingAlloy.getMolten(576L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 3), 100, (int) (GT_Values.V[5] - (GT_Values.V[5] / 10)));
if (Loader.isModLoaded("ThaumicTinkerer"))
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 2), GT_ModHandler.getModItem("ThaumicTinkerer", "kamiResource", 2L, 2)}, Materials.Concrete.getMolten(2304L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 4), 100, (int) (GT_Values.V[5] - (GT_Values.V[5] / 10)));
else
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 2), Materials.ElectrumFlux.getPlates(8)}, Materials.Concrete.getMolten(2304L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 4), 100, (int) (GT_Values.V[5] - (GT_Values.V[5] / 10)));
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 3), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 8L)}, Materials.Osmiridium.getMolten(576L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 5), 100, (int) (GT_Values.V[5] - (GT_Values.V[5] / 10)));
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.NaquadahAlloy, 6L), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.NaquadahAlloy, 6L)}, Materials.Void.getMolten(1152L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 7), 24000, 491520);
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_ModHandler.getModItem("dreamcraft", "tile.BloodyIchorium", 1, 0), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Osmiridium, 6L)}, Materials.Void.getMolten(1152L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 8), 24000, 491520);
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 8), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Draconium, 6L), GT_ModHandler.getModItem("DraconicEvolution", "draconicCore", 1, 0)}, Materials.Void.getMolten(2304L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 9), 24000, 491520);//uv
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 9), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.CosmicNeutronium, 6L), GT_ModHandler.getModItem("DraconicEvolution", "wyvernCore", 2, 0)}, Materials.Void.getMolten(4608L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 10), 12000, 1996080);//uhv, you need uhv to get the thing anyway?
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 10), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.DraconiumAwakened, 6L), GT_ModHandler.getModItem("DraconicEvolution", "awakenedCore", 3, 0)}, Materials.Void.getMolten(9216L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 11), 12000, 7864320);//uev
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 11), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Infinity, 6L), GT_ModHandler.getModItem("DraconicEvolution", "chaoticCore", 4, 0)}, Materials.Void.getMolten(18432L), new ItemStack(EMT_CasingBlock.EMT_GT_BLOCKS[0], 1, 12), 12000, 31457280);//uiv, use the multi
for (int i = 0; i < ItemList.HATCHES_INPUT.length; i++)
EMT_RecipeAdder.Run();
DECC = new DE_Fusion_Crafter(5001, "de_fusion_crafter", "Draconic Evolution Fusion Crafter").getStackForm(1L);
GT_Values.RA.addAssemblylineRecipe(GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 10780), 144000, new Object[]{
GT_ModHandler.getModItem("gregtech", "gt.blockmachines", 1, 10780),
ItemList.Robot_Arm_LuV.get(2L),
ItemList.Electric_Motor_LuV.get(2L),
ItemList.Field_Generator_LuV.get(1L),
new Object[]{OrePrefixes.circuit.get(Materials.Master), 2},
ItemList.Casing_Coil_Naquadah.get(8L),
}, new FluidStack[]{
Materials.SolderingAlloy.getMolten(2304L),
Materials.Thaumium.getMolten(1440L),
}, DECC, 1500, 16384);
for (int i = 0; i < ItemList.HATCHES_INPUT.length; i++) {
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.HATCHES_INPUT[i].get(1L), new ItemStack(ConfigBlocks.blockTube, 1, 4)}, Materials.Thaumium.getMolten(288L), EHatch[i], 100, (int) (GT_Values.V[i] - (GT_Values.V[i] / 10)));
}
ResearchMultiblock = new GT_MetaTileEntity_ResearchCompleter(aIDoffset + TIERS + 2, "Research Completer", "Research Completer").getStackForm(1L);
}
@@ -0,0 +1,87 @@
package emt.gthandler.common.loader;
import emt.init.EMTItems;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import net.minecraft.item.ItemStack;
import java.util.HashSet;
import static gregtech.api.enums.GT_Values.E;
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
public class EMT_RecipeAdder {
public static final GT_Recipe.GT_Recipe_Map sFusionCraftingRecipes = new GT_Recipe.GT_Recipe_Map(new HashSet<>(4), "emt.recipe.fusioncrafting", "Draconic Evolution Fusion Crafter", null, RES_PATH_GUI + "basicmachines/Default", 6, 1, 1, 0, 1, "Tier Casing: ", 1, E, false, false);
public static void addFusionCraftingRecipe(ItemStack[] inputs, ItemStack output, int aDuration, int aEUt, int aTier) {
sFusionCraftingRecipes.addRecipe(true, inputs, new ItemStack[]{output}, null, null, null, aDuration, aEUt, aTier);
}
public static void Run() {
// CORES
addFusionCraftingRecipe(new ItemStack[]{
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmiridium, 4),
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Ichorium, 1),
GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderEye, 1),
new ItemStack(EMTItems.itemEMTItems, 0, 16)},
GT_ModHandler.getModItem("DraconicEvolution", "draconicCore", 1, 0),
400, 30720, 1);
addFusionCraftingRecipe(new ItemStack[]{
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Draconium, 6),
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2),
GT_ModHandler.getModItem("DraconicEvolution", "draconicCore", 4, 0),
GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherStar, 1),
new ItemStack(EMTItems.itemEMTItems, 0, 17)},
GT_ModHandler.getModItem("DraconicEvolution", "wyvernCore", 1, 0),
800, 65536, 2);
addFusionCraftingRecipe(new ItemStack[]{
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.DraconiumAwakened, 8),
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Draconium, 4),
GT_ModHandler.getModItem("DraconicEvolution", "wyvernCore", 4, 0),
GT_ModHandler.getModItem("dreamcraft", "ManyullynCrystal", 1, 0),
new ItemStack(EMTItems.itemEMTItems, 0, 18)},
GT_ModHandler.getModItem("DraconicEvolution", "awakenedCore", 1, 0),
1600, 122880, 3);
addFusionCraftingRecipe(new ItemStack[]{
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 12),
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.DraconiumAwakened, 6),
GT_ModHandler.getModItem("DraconicEvolution", "awakenedCore", 4, 0),
GT_ModHandler.getModItem("DraconicEvolution", "chaosShard", 1, 0),
new ItemStack(EMTItems.itemEMTItems, 0, 19)},
GT_ModHandler.getModItem("DraconicEvolution", "chaoticCore", 1, 0),
3200, 500000, 4);
// ENERGY CORES
addFusionCraftingRecipe(new ItemStack[]{
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Draconium, 8),
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedstoneAlloy, 4),
GT_ModHandler.getModItem("AdvancedSolarPanel", "asp_crafting_items", 4, 1),
GT_ModHandler.getModItem("DraconicEvolution", "draconicCore", 1, 0),
new ItemStack(EMTItems.itemEMTItems, 0, 17)},
GT_ModHandler.getModItem("DraconicEvolution", "draconiumEnergyCore", 1, 0),
1000, 65536, 2);
addFusionCraftingRecipe(new ItemStack[]{
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.DraconiumAwakened, 8),
GT_ModHandler.getModItem("DraconicEvolution", "draconiumEnergyCore", 4, 0),
GT_ModHandler.getModItem("AdvancedSolarPanel", "asp_crafting_items", 4, 4),
GT_ModHandler.getModItem("DraconicEvolution", "wyvernCore", 1, 0),
new ItemStack(EMTItems.itemEMTItems, 0, 18)},
GT_ModHandler.getModItem("DraconicEvolution", "draconiumEnergyCore", 1, 1),
2000, 122880, 3);
}
}
@@ -0,0 +1,219 @@
package emt.gthandler.common.tileentities.machines.multi;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
import emt.EMT;
import emt.gthandler.common.items.EMT_CasingBlock;
import emt.gthandler.common.loader.EMT_RecipeAdder;
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase;
import gregtech.api.render.TextureFactory;
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.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.fluids.FluidStack;
import org.apache.commons.lang3.tuple.Pair;
import java.util.Arrays;
import java.util.List;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
import static gregtech.api.enums.Textures.BlockIcons.*;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
public class DE_Fusion_Crafter extends GT_MetaTileEntity_EnhancedMultiBlockBase<DE_Fusion_Crafter> {
private static final int CASING_INDEX = (1 << 7) + (15 + 48);
private int mTierCasing = 0;
private int mFusionTierCasing = 0;
private int mCasing = 0;
public DE_Fusion_Crafter(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
}
public DE_Fusion_Crafter(String aName) {
super(aName);
}
@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new DE_Fusion_Crafter(mName);
}
private static final String STRUCTURE_PIECE_MAIN = "main";
private static final List<Pair<Block, Integer>> fusionCasingTiers = Arrays.asList(
Pair.of(GregTech_API.sBlockCasings4, 6),
Pair.of(GregTech_API.sBlockCasings4, 8)
);
private static final List<Pair<Block, Integer>> coreTiers = Arrays.asList(
Pair.of(EMT_CasingBlock.EMT_GT_BLOCKS[0], 8),
Pair.of(EMT_CasingBlock.EMT_GT_BLOCKS[0], 9),
Pair.of(EMT_CasingBlock.EMT_GT_BLOCKS[0], 10),
Pair.of(EMT_CasingBlock.EMT_GT_BLOCKS[0], 11),
Pair.of(EMT_CasingBlock.EMT_GT_BLOCKS[0], 12)
);
private static final IStructureDefinition<DE_Fusion_Crafter> STRUCTURE_DEFINITION = StructureDefinition.<DE_Fusion_Crafter>builder()
.addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][]{
{"nnnnn", "nnnnn", "nnnnn", "nnnnn", "nnnnn"},
{" ", " F ", " FfF ", " F ", " "},
{" ", " F ", " FfF ", " F ", " "},
{"RRRRR", "R F R", "RFfFR", "R F R", "RRRRR"},
{" ", " F ", " FfF ", " F ", " "},
{" ", " F ", " FfF ", " F ", " "},
{"RRRRR", "R F R", "RFfFR", "R F R", "RRRRR"},
{" ", " F ", " FfF ", " F ", " "},
{" ", " F ", " FfF ", " F ", " "},
{"NN~NN", "NNNNN", "NNNNN", "NNNNN", "NNNNN"}
}))
.addElement('N', ofChain(
onElementPass(e -> e.mCasing++, ofBlock(EMT_CasingBlock.EMT_GT_BLOCKS[0], 7)),
ofHatchAdder(DE_Fusion_Crafter::addEnergyInputToMachineList, CASING_INDEX, 1),
ofHatchAdder(DE_Fusion_Crafter::addInputToMachineList, CASING_INDEX, 1),
ofHatchAdder(DE_Fusion_Crafter::addOutputToMachineList, CASING_INDEX, 1),
ofHatchAdder(DE_Fusion_Crafter::addMaintenanceToMachineList, CASING_INDEX, 1)
))
.addElement('n', onElementPass(e -> e.mCasing++, ofBlock(EMT_CasingBlock.EMT_GT_BLOCKS[0], 7)))
.addElement('f', ofBlock(GregTech_API.sBlockCasings4, 7))
.addElement('F', ofBlocksTiered((Block b, int m) -> {
if (b != GregTech_API.sBlockCasings4 || (m != 6 && m != 8)) return -2;
return m == 6 ? 1 : 2;
}, fusionCasingTiers, -1, (e, i) -> e.mFusionTierCasing = i, e -> e.mFusionTierCasing))
.addElement('R', ofBlocksTiered((Block b, int m) -> {
if (b != EMT_CasingBlock.EMT_GT_BLOCKS[0] || m < 8 || m > 12) return -2;
return m - 7;
}, coreTiers, -1, (e, i) -> e.mTierCasing = i, e -> e.mTierCasing))
.build();
@Override
public IStructureDefinition<DE_Fusion_Crafter> getStructureDefinition() {
return STRUCTURE_DEFINITION;
}
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
mCasing = 0;
mTierCasing = -1;
mFusionTierCasing = -1;
if (!checkPiece(STRUCTURE_PIECE_MAIN, 2, 9, 0))
return false;
if (mCasing < 19) return false;
if (mTierCasing == -2 || mFusionTierCasing == -2) return false;
if (mTierCasing > 3 && mFusionTierCasing < 2) return false;
return mMaintenanceHatches.size() == 1;
}
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
tt.
addMachineType("Fusion Crafter").
addInfo("Controller Block for the Draconic Evolution Fusion Crafter").
addInfo("Machine can be overclocked by using casings above the recipe tier:").
addInfo("Recipe time is divided by number of tiers above the recipe").
addInfo("Normal EU OC still applies !").
addInfo("To see the structure, use a " + EnumChatFormatting.BLUE + "Tec" + EnumChatFormatting.DARK_BLUE + "Tech" + EnumChatFormatting.GRAY + " structure hologram on the Controller!").
addSeparator().
beginStructureBlock(5, 10, 5, false).
addController("Front bottom center").
addCasingInfo("Naquadah Alloy Fusion Casing", 19).
addOtherStructurePart("Fusion Coil Block", "Center pillar").
addOtherStructurePart("Fusion Machine Casing", "Touching Fusion Coil Block at every side").
addOtherStructurePart("Tiered Fusion Casing", "Rings (5x5 hollow) at layer 4 and 7").
addStructureInfo("Bloody Ichorium for tier 1, Draconium for tier 2, etc").
addStructureInfo("To use tier 3 + you have to use fusion casing MK II").
addMaintenanceHatch("Any bottom casing", 1).
addInputBus("Any bottom casing", 1).
addOutputBus("Any bottom casing", 1).
addInputHatch("Any bottom casing", 1).
addEnergyHatch("Any bottom casing", 1).
toolTipFinisher(EMT.NAME);
return tt;
}
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
if (aActive)
return new ITexture[]{
TextureFactory.of(MACHINE_CASING_MAGIC),
TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_ACTIVE).extFacing().build(),
TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW).extFacing().glow().build()};
return new ITexture[]{
TextureFactory.of(MACHINE_CASING_MAGIC),
TextureFactory.builder().addIcon(OVERLAY_TELEPORTER).extFacing().build(),
TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_GLOW).extFacing().glow().build()};
}
if (aActive)
return new ITexture[]{
TextureFactory.of(MACHINE_CASING_MAGIC),
TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE).extFacing().build(),
TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_ACTIVE_GLOW).extFacing().glow().build()};
return new ITexture[]{
TextureFactory.of(MACHINE_CASING_MAGIC),
TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC).extFacing().build(),
TextureFactory.builder().addIcon(MACHINE_CASING_MAGIC_GLOW).extFacing().glow().build()};
}
@Override
public boolean isCorrectMachinePart(ItemStack aStack) {
return true;
}
@Override
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
return EMT_RecipeAdder.sFusionCraftingRecipes;
}
@Override
public boolean checkRecipe(ItemStack aStack) {
ItemStack[] tInputs = getCompactedInputs();
//FluidStack[] tFluids = getCompactedFluids(); unused for now
if (tInputs.length > 0) {
long tVoltage = getMaxInputVoltage();
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
GT_Recipe tRecipe = EMT_RecipeAdder.sFusionCraftingRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], null, tInputs);
if ((tRecipe != null) && (this.mTierCasing >= tRecipe.mSpecialValue) && (tRecipe.isRecipeInputEqual(true, null, tInputs))) {
calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 2, tVoltage);
if (this.mEUt > 0)
this.mEUt = (-this.mEUt);
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
this.mMaxProgresstime /= ((mTierCasing - tRecipe.mSpecialValue) + 1);
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0), tRecipe.getOutput(1)};
this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)};
updateSlots();
return true;
}
}
return false;
}
public int getMaxEfficiency(ItemStack aStack) {
return 10000;
}
public int getPollutionPerTick(ItemStack aStack) {
return 0;
}
public int getDamageToComponent(ItemStack aStack) {
return 0;
}
public boolean explodesOnComponentBreak(ItemStack aStack) {
return false;
}
@Override
public void construct(ItemStack itemStack, boolean b) {
buildPiece(STRUCTURE_PIECE_MAIN, itemStack, b, 2, 9, 0);
}
}
+18 -2
View File
@@ -28,7 +28,7 @@ import java.util.List;
public class ItemMaterials extends Item {
public IIcon[] icon = new IIcon[16];
public IIcon[] icon = new IIcon[20];
public ItemMaterials() {
this.setCreativeTab(EMT.TAB);
@@ -89,6 +89,18 @@ public class ItemMaterials extends Item {
case 15:
name = "uumatterDrop";
break;
case 16:
name = "draconicSchematic";
break;
case 17:
name = "wyvernSchematic";
break;
case 18:
name = "awakenedSchematic";
break;
case 19:
name = "chaoticSchematic";
break;
default:
name = "nothing";
break;
@@ -114,6 +126,10 @@ public class ItemMaterials extends Item {
this.icon[13] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/taintedfeather");
this.icon[14] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/thaumiumWing");
this.icon[15] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/uumatterdrop");
this.icon[16] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/draconicSchematic");
this.icon[17] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/wyvernSchematic");
this.icon[18] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/awakenedSchematic");
this.icon[19] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/chaoticSchematic");
}
@SideOnly(Side.CLIENT)
@@ -123,7 +139,7 @@ public class ItemMaterials extends Item {
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) {
for (int i = 1; i <= 15; i++) {
for (int i = 1; i <= 19; i++) {
list.add(new ItemStack(this, 1, i));
}
}
@@ -0,0 +1,32 @@
package emt.nei;
import codechicken.nei.recipe.GuiCraftingRecipe;
import codechicken.nei.recipe.GuiUsageRecipe;
import codechicken.nei.recipe.TemplateRecipeHandler;
import cpw.mods.fml.common.event.FMLInterModComms;
import gregtech.api.enums.GT_Values;
import gregtech.api.util.GT_Recipe;
import gregtech.nei.GT_NEI_DefaultHandler;
import static emt.nei.NEI_Config.isAdded;
public class FusionCraftingHandler extends GT_NEI_DefaultHandler {
// TODO: BETTER GUI <3
public FusionCraftingHandler(GT_Recipe.GT_Recipe_Map aRecipeMap) {
super(aRecipeMap);
if (!isAdded) {
FMLInterModComms.sendRuntimeMessage(
GT_Values.GT,
"NEIPlugins",
"register-crafting-handler",
"emt@" + this.getRecipeName() + "@" + this.getOverlayIdentifier());
GuiCraftingRecipe.craftinghandlers.add(this);
GuiUsageRecipe.usagehandlers.add(this);
}
}
@Override
public TemplateRecipeHandler newInstance() {
return new FusionCraftingHandler(this.mRecipeMap);
}
}
+60
View File
@@ -0,0 +1,60 @@
package emt.nei;
import codechicken.nei.api.IConfigureNEI;
import cpw.mods.fml.common.event.FMLInterModComms;
import emt.EMT;
import emt.gthandler.common.loader.EMT_RecipeAdder;
import net.minecraft.nbt.NBTTagCompound;
public class NEI_Config implements IConfigureNEI {
public static boolean isAdded = true;
@Override
public void loadConfig() {
NEI_Config.isAdded = false;
new FusionCraftingHandler(EMT_RecipeAdder.sFusionCraftingRecipes);
NEI_Config.isAdded = true;
}
@Override
public String getName() {
return "EMT";
}
@Override
public String getVersion() {
return EMT.VERSION;
}
public static void Init() {
sendHandler("emt.nei.FusionCraftingHandler", "gregtech:gt.blockmachines:5001");
sendCatalyst("emt.recipe.fusioncrafting", "gregtech:gt.blockmachines:5001");
}
private static void sendHandler(String name, String block) {
NBTTagCompound aNBT = new NBTTagCompound();
aNBT.setString("handler", name);
aNBT.setString("modName", EMT.NAME);
aNBT.setString("modId", EMT.MOD_ID);
aNBT.setBoolean("modRequired", true);
aNBT.setString("itemName", block);
aNBT.setInteger("handlerHeight", 135);
aNBT.setInteger("handlerWidth", 166);
aNBT.setInteger("maxRecipesPerPage", 2);
aNBT.setInteger("yShift", 6);
FMLInterModComms.sendMessage("NotEnoughItems", "registerHandlerInfo", aNBT);
}
private static void sendCatalyst(String name, String stack, int priority) {
NBTTagCompound aNBT = new NBTTagCompound();
aNBT.setString("handlerID", name);
aNBT.setString("itemName", stack);
aNBT.setInteger("priority", priority);
FMLInterModComms.sendMessage("NotEnoughItems", "registerCatalystInfo", aNBT);
}
private static void sendCatalyst(String name, String stack) {
sendCatalyst(name, stack, 0);
}
}
+14 -4
View File
@@ -12,10 +12,10 @@ gui.EMT.inventory=Inventory
gui.EMT.book.aspect.output.eu.title=Essentia Outputs Book
gui.EMT.book.aspect.output.essentia.eu=EU Output per Essentia
gui.EMT.key.unequip=Unequip
emt.Output=Output:
emt.Storage=Storage:
emt.Output=Output:
emt.Storage=Storage:
emt.PressShift=<Press SHIFT>
emt.Generating=Generating:
emt.Generating=Generating:
emt.Fuel=Fuel
emt.OutputMax=Output at Max:
@@ -67,6 +67,10 @@ item.EMT.denseIronSheet.name=Dense Iron Sheet
item.EMT.taintedFeather.name=Tainted Feather
item.EMT.thaumiumWing.name=Thaumium Reinforced Wing
item.EMT.uumatterDrop.name=Crystallized UU-Matter Drop
item.EMT.draconicSchematic.name=Draconic Core Schematic
item.EMT.wyvernSchematic.name=Wyvern Core Schematic
item.EMT.awakenedSchematic.name=Awakened Core Schematic
item.EMT.chaoticSchematic.name=Chaotic Core Schematic
item.EMT.bauble.euMaker.armor.name=Armor Charging Ring
item.EMT.bauble.euMaker.inventory.name=Inventory Charging Ring
item.EMT.bauble.oneRing.name=The One Ring
@@ -180,6 +184,12 @@ EMT_GTBLOCK_CASEING.2.name=Iridium Ruridit Framebox
EMT_GTBLOCK_CASEING.3.name=Indium Tungsten Framebox
EMT_GTBLOCK_CASEING.4.name=Raw Magic Containing Casing
EMT_GTBLOCK_CASEING.5.name=Raw Essentia Diffusion Cell
EMT_GTBLOCK_CASEING.7.name=Naquadah Alloy Fusion Casing
EMT_GTBLOCK_CASEING.8.name=Bloody Ichorium Fusion Casing
EMT_GTBLOCK_CASEING.9.name=Draconium Fusion Casing
EMT_GTBLOCK_CASEING.10.name=Wyvern Fusion Casing
EMT_GTBLOCK_CASEING.11.name=Awakened Draconium Fusion Casing
EMT_GTBLOCK_CASEING.12.name=Chaotic Fusion Casing
#=============Thaumonomicon Texts=============
emt.rsname.Electric Magic Tools=Electric Magic Tools
@@ -417,4 +427,4 @@ emt.text.Infused Quantum Armor=You had been nothing to do and you decided to do
emt.rsname.ResearchCompleter=Automated Research
emt.tag.ResearchCompleter=No more ordo spam
emt.text.ResearchCompleter=It was fun at first, but you've decided it's time to find a better way to handle all this research. By mixing technology and magic you have come up with a multiblock that can complete a research note by itself.<BR><BR>To function, it needs nodes to be placed in the center of the structure and will slowly destroy them while running. Node stabilizers are optional but recommended for keeping so many nodes close together without them destroying each other.
emt.text.ResearchCompleter=It was fun at first, but you've decided it's time to find a better way to handle all this research. By mixing technology and magic you have come up with a multiblock that can complete a research note by itself.<BR><BR>To function, it needs nodes to be placed in the center of the structure and will slowly destroy them while running. Node stabilizers are optional but recommended for keeping so many nodes close together without them destroying each other.
Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB