summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2014-10-22 20:21:07 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2014-10-22 20:21:07 +0100
commit2390bae88b1719c0936fca6e513ad64e905be4e3 (patch)
treee3e6ebf09190eea09a31d850477ac1132cd5d2ec
parent41488e49c094712f06789359adb847424d67c01b (diff)
downloadnoctis-2390bae88b1719c0936fca6e513ad64e905be4e3.tar.bz2
Tidy things up and make the recipes respond to difficulty
-rw-r--r--src/main/java/net/flarn/noctis/client/gui/ModGuiConfig.java2
-rw-r--r--src/main/java/net/flarn/noctis/init/Recipes.java21
-rw-r--r--src/main/java/net/flarn/noctis/item/ItemCatalyst.java6
-rw-r--r--src/main/resources/assets/noctis/lang/en_GB.lang6
4 files changed, 25 insertions, 10 deletions
diff --git a/src/main/java/net/flarn/noctis/client/gui/ModGuiConfig.java b/src/main/java/net/flarn/noctis/client/gui/ModGuiConfig.java
index b4d4697..dc4ff09 100644
--- a/src/main/java/net/flarn/noctis/client/gui/ModGuiConfig.java
+++ b/src/main/java/net/flarn/noctis/client/gui/ModGuiConfig.java
@@ -11,7 +11,7 @@ public class ModGuiConfig extends GuiConfig {
public ModGuiConfig(GuiScreen guiScreen) {
super(guiScreen,
new ConfigElement(ConfigHandler.configuration.getCategory(Configuration.CATEGORY_GENERAL)).getChildElements(),
- Refs.MOD_ID, false, false,
+ Refs.MOD_ID, true, true,
GuiConfig.getAbridgedConfigPath(ConfigHandler.configuration.toString()));
}
}
diff --git a/src/main/java/net/flarn/noctis/init/Recipes.java b/src/main/java/net/flarn/noctis/init/Recipes.java
index 630cd11..acdfd76 100644
--- a/src/main/java/net/flarn/noctis/init/Recipes.java
+++ b/src/main/java/net/flarn/noctis/init/Recipes.java
@@ -2,7 +2,9 @@ package net.flarn.noctis.init;
import cpw.mods.fml.common.registry.GameRegistry;
import net.flarn.noctis.handler.ConfigHandler;
+import net.flarn.noctis.item.ItemCatalyst;
import net.flarn.noctis.recipes.CatalysedRecipe;
+import net.flarn.noctis.refs.Numbers;
import net.flarn.noctis.utils.CatalystType;
import net.flarn.noctis.utils.SkyAccess;
import net.flarn.noctis.utils.Times;
@@ -18,17 +20,24 @@ import net.minecraftforge.oredict.ShapedOreRecipe;
public class Recipes {
public static void init() {
- IRecipe glassSwordRecipe;
+ IRecipe lightCatalystRecipe;
+ ItemStack lightCatalystStack = ItemCatalyst.getStarterCatalyst();
+ ItemStack catalystMiddleItem;
if (ConfigHandler.cheapRecipes) {
- glassSwordRecipe = new ShapedOreRecipe(new ItemStack(ModItems.glassSword), " g ", " g ", " s ", 'g', "blockGlassColorless", 's', "stickWood");
+ catalystMiddleItem = new ItemStack(Blocks.redstone_block);
} else {
- glassSwordRecipe = new ShapedOreRecipe(new ItemStack(ModItems.glassSword), " g ", " g ", " s ", 'g', "blockGlassColorless", 's', new ItemStack(Items.diamond_sword));
+ catalystMiddleItem = new ItemStack(Items.ender_pearl);
}
- GameRegistry.addRecipe(glassSwordRecipe);
+ GameRegistry.addRecipe(new ShapedOreRecipe(lightCatalystStack, "pgp", "gmg", "pgp", 'g', "blockGlassWhite", 'p', "paneGlassWhite", 'm', catalystMiddleItem));
}
public static void initCatalysedRecipes() {
- CatalysedRecipe.newRecipe(CatalystType.LIGHT, new ItemStack(ModItems.glassSword),
- new ItemStack[] { new ItemStack(Blocks.glass, 2, 0), new ItemStack(Items.stick) }, 10, Times.NIGHT, SkyAccess.SKY);
+ if (ConfigHandler.cheapRecipes) {
+ CatalysedRecipe.newRecipe(CatalystType.LIGHT, new ItemStack(ModItems.glassSword),
+ new ItemStack[]{new ItemStack(Blocks.glass, 2, 0), new ItemStack(Items.stick)}, 10, Times.NIGHT, SkyAccess.SKY);
+ } else {
+ CatalysedRecipe.newRecipe(CatalystType.LIGHT, new ItemStack(ModItems.glassSword),
+ new ItemStack[]{new ItemStack(Blocks.glass, 2, 0), new ItemStack(Items.diamond_sword)}, 10, Times.NIGHT, SkyAccess.SKY);
+ }
}
}
diff --git a/src/main/java/net/flarn/noctis/item/ItemCatalyst.java b/src/main/java/net/flarn/noctis/item/ItemCatalyst.java
index 368dd59..6cfb43d 100644
--- a/src/main/java/net/flarn/noctis/item/ItemCatalyst.java
+++ b/src/main/java/net/flarn/noctis/item/ItemCatalyst.java
@@ -2,6 +2,7 @@ package net.flarn.noctis.item;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import net.flarn.noctis.init.ModItems;
import net.flarn.noctis.recipes.CatalysedRecipe;
import net.flarn.noctis.refs.*;
import net.flarn.noctis.utils.*;
@@ -164,4 +165,9 @@ public class ItemCatalyst extends ItemNoctisBase {
return NBTHelper.hasEntry(s, Tags.General.OWNER);
}
+ public static ItemStack getStarterCatalyst() {
+ ItemStack ret = new ItemStack(ModItems.catalyst, 1, (Numbers.MAX_CATALYST_POWER * 9) / 10);
+ NBTHelper.setInt(ret, Tags.General.TYPE, 0);
+ return ret;
+ }
}
diff --git a/src/main/resources/assets/noctis/lang/en_GB.lang b/src/main/resources/assets/noctis/lang/en_GB.lang
index 96b4cc2..82af7a0 100644
--- a/src/main/resources/assets/noctis/lang/en_GB.lang
+++ b/src/main/resources/assets/noctis/lang/en_GB.lang
@@ -1,6 +1,6 @@
# Creative Tab
itemGroup.noctis=Noctis - Spatio inter Stellarum
-itemGroup.noctis.creative=Noctis - Creative Mode Only Itemss
+itemGroup.noctis.creative=Noctis - Creative Mode Only Items
# Item localisations
item.noctis:glassSword.name=Un-attuned Glass Sword
@@ -9,5 +9,5 @@ item.noctis:darkCatalyst.name=Catalyst attuned to the space between the stars
item.noctis:mixedCatalyst.name=Catalyst attuned to all the night can provide
# Description localisations
-desc.noctis:catalyst.lifeless=This seems dull and lifeless
-desc.noctis:catalyst.thrums=This thrums with the power of %s
+desc.noctis:catalyst.lifeless=This seems dull somehow
+desc.noctis:catalyst.thrums=An aura of %s infuses this