fixes #55
This commit is contained in:
parent
9ae298eacc
commit
40ca57331c
14 changed files with 76 additions and 5 deletions
|
@ -38,6 +38,13 @@ public interface IBaseRecipeType {
|
|||
*/
|
||||
public String getRecipeName();
|
||||
|
||||
/**
|
||||
* This should be a user friendly name
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getUserFreindlyName();
|
||||
|
||||
/**
|
||||
* This is how long the recipe needs to tick for the crafting operation to complete
|
||||
*
|
||||
|
|
|
@ -32,6 +32,15 @@ public class RecipeHandler {
|
|||
return baseRecipeList;
|
||||
}
|
||||
|
||||
public static String getUserFreindlyName(String name) {
|
||||
for (IBaseRecipeType baseRecipe : recipeList) {
|
||||
if (baseRecipe.getRecipeName().equals(name)) {
|
||||
return baseRecipe.getUserFreindlyName();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a recipe to the system
|
||||
*
|
||||
|
|
|
@ -14,4 +14,9 @@ public class AlloySmelterRecipe extends BaseRecipe {
|
|||
if (output1 != null)
|
||||
addOutput(output1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUserFreindlyName() {
|
||||
return "Alloy Smelter";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,4 +14,9 @@ public class AssemblingMachineRecipe extends BaseRecipe {
|
|||
if (output1 != null)
|
||||
addOutput(output1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUserFreindlyName() {
|
||||
return "Assembling Machine";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,11 @@ public class BlastFurnaceRecipe extends BaseRecipe {
|
|||
this.neededHeat = neededHeat;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUserFreindlyName() {
|
||||
return "Blast Furnace";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canCraft(TileEntity tile) {
|
||||
if(tile instanceof TileBlastFurnace){
|
||||
|
|
|
@ -20,4 +20,9 @@ public class CentrifugeRecipe extends BaseRecipe {
|
|||
if (output4 != null)
|
||||
addOutput(output4);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUserFreindlyName() {
|
||||
return "Centrifuge";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,4 +14,9 @@ public class ChemicalReactorRecipe extends BaseRecipe {
|
|||
if (output1 != null)
|
||||
addOutput(output1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUserFreindlyName() {
|
||||
return "Chemical Reactor";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,12 @@ public class GrinderRecipe extends BaseRecipe {
|
|||
this.fluidStack = fluidStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public String getUserFreindlyName() {
|
||||
return "Grinder";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canCraft(TileEntity tile) {
|
||||
if (fluidStack == null) {
|
||||
return true;
|
||||
|
|
|
@ -16,4 +16,9 @@ public class ImplosionCompressorRecipe extends BaseRecipe {
|
|||
if (output2 != null)
|
||||
addOutput(output2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUserFreindlyName() {
|
||||
return "Implosion Compressor";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,8 +28,13 @@ public class IndustrialElectrolyzerRecipe extends BaseRecipe {
|
|||
addOutput(output4);
|
||||
this.fluidStack = fluidStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
public String getUserFreindlyName() {
|
||||
return "Industrial Electrolyzer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canCraft(TileEntity tile) {
|
||||
if (fluidStack == null) {
|
||||
return true;
|
||||
|
|
|
@ -43,7 +43,12 @@ public class IndustrialSawmillRecipe extends BaseRecipe {
|
|||
this.canUseOreDict = canUseOreDict;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public String getUserFreindlyName() {
|
||||
return "Industrial Sawmill";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canCraft(TileEntity tile) {
|
||||
if (fluidStack == null) {
|
||||
return true;
|
||||
|
|
|
@ -12,4 +12,9 @@ public class LatheRecipe extends BaseRecipe {
|
|||
if (output1 != null)
|
||||
addOutput(output1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUserFreindlyName() {
|
||||
return "Lathe";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,4 +12,9 @@ public class PlateCuttingMachineRecipe extends BaseRecipe {
|
|||
if (output1 != null)
|
||||
addOutput(output1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUserFreindlyName() {
|
||||
return "Plate Cutting Machine";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ public abstract class GenericRecipeHander extends TemplateRecipeHandler {
|
|||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return getNeiBaseRecipe().getRecipeName();
|
||||
return RecipeHandler.getUserFreindlyName(getNeiBaseRecipe().getRecipeName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue