Research Completer - Langfile text and block texture

This commit is contained in:
KiloJoel committed 2021-10-12 05:00:31 +01:00
1 parent 070a86e9ea
commit fc1a7e9e9f
9 files changed
+21 -22

No files matched your search

+2 -2
View File
@@ -368,9 +368,9 @@ public class EMTRecipes {
thaumiumWings = addArcaneCraftingRecipe("Thaumium Reinforced Wings", new ItemStack(EMTItems.thaumiumWing), EMTCraftingAspects.thaumiumWing, "XX", 'X', new ItemStack(EMTItems.itemEMTItems, 1, 14));
magicalMachineCasing = addArcaneCraftingRecipe("ResearchCompleter", new ItemStack(GregTech_API.sBlockCasings8, 1, 5), EMTCraftingAspects.magicalMachineCasing, "XYX", "XZX", "XYX", 'X', GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1), 'Y', new ItemStack(ConfigItems.itemResource, 1, 14) , 'Z', GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Thaumium, 1));
magicalMachineCasing = addArcaneCraftingRecipe("ResearchCompleter", new ItemStack(GregTech_API.sBlockCasings8, 1, 6), EMTCraftingAspects.magicalMachineCasing, "XYX", "XZX", "XYX", 'X', GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1), 'Y', new ItemStack(ConfigItems.itemResource, 1, 14) , 'Z', GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Thaumium, 1));
researchCompleter = addArcaneCraftingRecipe("ResearchCompleter", new ItemStack(GregTech_API.sBlockMachines, 1, 13001), EMTCraftingAspects.researchCompleter, "XYX", "YZY", "XAX", 'X', GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Good), 1L), 'Y', new ItemStack(ConfigBlocks.blockCosmeticOpaque, 1, 2), 'Z', new ItemStack(GregTech_API.sBlockCasings8, 1, 5), 'A', new ItemStack(ConfigBlocks.blockStoneDevice, 1, 5));
researchCompleter = addArcaneCraftingRecipe("ResearchCompleter", new ItemStack(GregTech_API.sBlockMachines, 1, 13001), EMTCraftingAspects.researchCompleter, "XYX", "YZY", "XAX", 'X', GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Good), 1L), 'Y', new ItemStack(ConfigBlocks.blockCosmeticOpaque, 1, 2), 'Z', new ItemStack(GregTech_API.sBlockCasings8, 1, 6), 'A', new ItemStack(ConfigBlocks.blockStoneDevice, 1, 5));
/** Crucible Recipes **/
+1 -1
View File
@@ -33,7 +33,7 @@ public class EMTResearches {
new EMTResearchItem("The One Ring", 6, -7, 0, new ItemStack(EMTItems.onering)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage(""));
new EMTResearchItem("Electric Cloud", 4, -7, 0, new ItemStack(EMTBlocks.electricCloud)).setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage("1"), new ResearchPage("2"));
new EMTResearchItem("Feather Wings", 0, 2, 0, new ItemStack(EMTItems.featherWing)).setParents("Electric Magic Tools").setRound().setAutoUnlock().registerResearchItem().setPages(new ResearchPage(EMTRecipes.cardboard), new ResearchPage(EMTRecipes.featherWing), new ResearchPage(EMTRecipes.featherWings));
new EMTResearchItem("ResearchCompleter", EMTResearchAspects.researchCompleter, -4, -2, 0, new ItemStack(GregTech_API.sBlockMachines, 1, 13001)).setParents("Electric Magic Tools").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.magicalMachineCasing), new ResearchPage(EMTRecipes.researchCompleter));
new EMTResearchItem("ResearchCompleter", EMTResearchAspects.researchCompleter, -4, -2, 0, new ItemStack(GregTech_API.sBlockMachines, 1, 13001)).setParents("Electric Magic Tools").setParentsHidden("WANDPED").registerResearchItem().setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.magicalMachineCasing), new ResearchPage(EMTRecipes.researchCompleter));
/*************************************/
/** Research that can be disabled **/
@@ -58,7 +58,6 @@ public class TileEntityResearchMultiblockController extends GT_MetaTileEntity_Mu
@Override
public boolean onRunningTick(ItemStack aStack) {
//TODO consider only doing this every x ticks and make sure it finishes x ticks before the end of the recipe
float progressAmount = ((float) this.mProgresstime) / this.mMaxProgresstime;
int requiredVis = (int)Math.ceil(progressAmount * recipeAspectCost - aspectsAbsorbed);
@@ -153,7 +152,7 @@ public class TileEntityResearchMultiblockController extends GT_MetaTileEntity_Mu
public boolean checkMachine(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX;
int zDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetZ;
//TODO add minimum casing number
int casingAmount = 0;
this.length = findLength(iGregTechTileEntity, xDir, zDir);
if (this.length < 2)
return false;
@@ -184,9 +183,11 @@ public class TileEntityResearchMultiblockController extends GT_MetaTileEntity_Mu
} else { //Check for machine casings and buses etc.
if (sidewaysOffset != 0 || forwardsOffset == 0 || Math.abs(forwardsOffset) == this.length - 1) { //Check ring shapes on top and bottom
//TODO change casing index to correct for this multi
if (!this.addMaintenanceToMachineList(tTileEntity, 16) && !this.addInputToMachineList(tTileEntity, 16) && !this.addOutputToMachineList(tTileEntity, 16) && !this.addEnergyInputToMachineList(tTileEntity, 16)) {
if ((tBlock != GregTech_API.sBlockCasings8 || tMeta != 5))
if (!this.addMaintenanceToMachineList(tTileEntity, 182) && !this.addInputToMachineList(tTileEntity, 182) && !this.addOutputToMachineList(tTileEntity, 182) && !this.addEnergyInputToMachineList(tTileEntity, 182)) {
if ((tBlock != GregTech_API.sBlockCasings8 || tMeta != 6))
return false;
else
casingAmount++;
}
}
}
@@ -194,7 +195,7 @@ public class TileEntityResearchMultiblockController extends GT_MetaTileEntity_Mu
}
}
return true;
return casingAmount >= length * 3;
}
private int findLength(final IGregTechTileEntity iGregTechTileEntity, final int xDir, final int zDir) {
@@ -257,7 +258,7 @@ public class TileEntityResearchMultiblockController extends GT_MetaTileEntity_Mu
.addSeparator()
.beginVariableStructureBlock(3, 3, 3, 3, 3, MAX_LENGTH, true)
.addController("Front center")
.addOtherStructurePart("[x] machine casing", "Top and bottom layers outside")
.addOtherStructurePart("Magical machine casing", "Top and bottom layers outside. 3 x L minimum")
.addOtherStructurePart("Warded glass", "Middle layer outside")
.addEnergyHatch("Any casing")
.addMaintenanceHatch("Any casing")
@@ -271,24 +272,18 @@ public class TileEntityResearchMultiblockController extends GT_MetaTileEntity_Mu
}
}
//TODO texture
/*@Override
public ITexture[] getTexture(IGregTechTileEntity iGregTechTileEntity, byte b, byte b1, byte b2, boolean b3, boolean b4) {
return new ITexture[0];
}*/
//Temp copied from implosion compressor
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
if (aActive) return new ITexture[]{
Textures.BlockIcons.casingTexturePages[0][16],
TextureFactory.of(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE),
TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE_GLOW).glow().build()};
Textures.BlockIcons.casingTexturePages[1][54],
TextureFactory.of(OVERLAY_FRONT_RESEARCH_COMPLETER_ACTIVE),
TextureFactory.builder().addIcon(OVERLAY_FRONT_RESEARCH_COMPLETER_ACTIVE_GLOW).extFacing().glow().build()};
return new ITexture[]{
Textures.BlockIcons.casingTexturePages[0][16],
TextureFactory.of(OVERLAY_FRONT_IMPLOSION_COMPRESSOR),
TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_GLOW).glow().build()};
Textures.BlockIcons.casingTexturePages[1][54],
TextureFactory.of(OVERLAY_FRONT_RESEARCH_COMPLETER),
TextureFactory.builder().addIcon(OVERLAY_FRONT_RESEARCH_COMPLETER_GLOW).extFacing().glow().build()};
}
return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][16]};
return new ITexture[]{Textures.BlockIcons.casingTexturePages[1][54]};
}
}