summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/net/flarn/noctis/Noctis.java2
-rw-r--r--src/main/java/net/flarn/noctis/block/BlockInfusedStone.java35
-rw-r--r--src/main/java/net/flarn/noctis/block/BlockNoctisBase.java25
-rw-r--r--src/main/java/net/flarn/noctis/init/ModBlocks.java16
-rw-r--r--src/main/java/net/flarn/noctis/init/ModItems.java7
-rw-r--r--src/main/java/net/flarn/noctis/init/Recipes.java8
-rw-r--r--src/main/java/net/flarn/noctis/item/ItemShard.java66
-rw-r--r--src/main/java/net/flarn/noctis/knowledge/InternalKnowledgeTree.java2
-rw-r--r--src/main/java/net/flarn/noctis/refs/Names.java8
-rw-r--r--src/main/resources/assets/noctis/journal/en_GB.yaml41
-rw-r--r--src/main/resources/assets/noctis/lang/en_GB.lang8
-rw-r--r--src/main/resources/assets/noctis/textures/blocks/darkStone.pngbin0 -> 557 bytes
-rw-r--r--src/main/resources/assets/noctis/textures/blocks/lightStone.pngbin0 -> 548 bytes
-rw-r--r--src/main/resources/assets/noctis/textures/blocks/mixedStone.pngbin0 -> 619 bytes
-rw-r--r--src/main/resources/assets/noctis/textures/items/darkShard.pngbin0 -> 267 bytes
-rw-r--r--src/main/resources/assets/noctis/textures/items/lightShard.pngbin0 -> 290 bytes
-rw-r--r--src/main/resources/assets/noctis/textures/items/mixedShard.pngbin0 -> 261 bytes
17 files changed, 212 insertions, 6 deletions
diff --git a/src/main/java/net/flarn/noctis/Noctis.java b/src/main/java/net/flarn/noctis/Noctis.java
index 1b5d622..05020b2 100644
--- a/src/main/java/net/flarn/noctis/Noctis.java
+++ b/src/main/java/net/flarn/noctis/Noctis.java
@@ -13,6 +13,7 @@ import net.flarn.noctis.client.gui.GuiHandler;
import net.flarn.noctis.commands.CommandTimeFixed;
import net.flarn.noctis.handler.ConfigHandler;
import net.flarn.noctis.handler.PlayerHandler;
+import net.flarn.noctis.init.ModBlocks;
import net.flarn.noctis.init.ModItems;
import net.flarn.noctis.init.Recipes;
import net.flarn.noctis.journal.JournalParser;
@@ -37,6 +38,7 @@ public class Noctis {
FMLCommonHandler.instance().bus().register(new ConfigHandler());
FMLCommonHandler.instance().bus().register(new PlayerHandler());
ModItems.init();
+ ModBlocks.init();
PacketRegistry.registerPackets();
InternalKnowledgeTree.init();
}
diff --git a/src/main/java/net/flarn/noctis/block/BlockInfusedStone.java b/src/main/java/net/flarn/noctis/block/BlockInfusedStone.java
new file mode 100644
index 0000000..806ee07
--- /dev/null
+++ b/src/main/java/net/flarn/noctis/block/BlockInfusedStone.java
@@ -0,0 +1,35 @@
+package net.flarn.noctis.block;
+
+import net.flarn.noctis.refs.Names;
+import net.minecraft.block.material.Material;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.Item;
+import net.minecraft.world.IBlockAccess;
+
+import java.util.Random;
+
+public class BlockInfusedStone extends BlockNoctisBase {
+
+ private int whichKind;
+
+ public BlockInfusedStone(int which) {
+ super(Material.rock, Names.Blocks.STONES[which]);
+ whichKind = which;
+ }
+
+ @Override
+ protected boolean canSilkHarvest() { return true; }
+
+ @Override
+ public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
+ {
+ return Item.getItemFromBlock(Blocks.cobblestone);
+ }
+
+ @Override
+ public int getLightValue(IBlockAccess world, int x, int y, int z)
+ {
+ return (whichKind == 0) ? 9 : (whichKind == 2) ? 7 : 0;
+ }
+
+}
diff --git a/src/main/java/net/flarn/noctis/block/BlockNoctisBase.java b/src/main/java/net/flarn/noctis/block/BlockNoctisBase.java
new file mode 100644
index 0000000..f305fee
--- /dev/null
+++ b/src/main/java/net/flarn/noctis/block/BlockNoctisBase.java
@@ -0,0 +1,25 @@
+package net.flarn.noctis.block;
+
+import net.flarn.noctis.creative.CreativeTabNoctis;
+import net.flarn.noctis.refs.Names;
+import net.flarn.noctis.refs.Textures;
+import net.minecraft.block.BlockBreakable;
+import net.minecraft.block.material.Material;
+
+public class BlockNoctisBase extends BlockBreakable {
+ public BlockNoctisBase(Material material, String name) {
+ super(Names.Blocks.NOCTIS_PREFIX + name, material, false);
+ setBlockName(name);
+ this.setCreativeTab(CreativeTabNoctis.NoctisTab);
+ }
+
+ @Override
+ public String getUnlocalizedName() {
+ return String.format("tile.%s%s", Textures.RESOURCE_PREFIX, getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
+ }
+
+ protected String getUnwrappedUnlocalizedName(String unLocalizedName) {
+ return unLocalizedName.substring(unLocalizedName.indexOf(".") + 1);
+ }
+
+}
diff --git a/src/main/java/net/flarn/noctis/init/ModBlocks.java b/src/main/java/net/flarn/noctis/init/ModBlocks.java
new file mode 100644
index 0000000..5d4da77
--- /dev/null
+++ b/src/main/java/net/flarn/noctis/init/ModBlocks.java
@@ -0,0 +1,16 @@
+package net.flarn.noctis.init;
+
+import cpw.mods.fml.common.registry.GameRegistry;
+import net.flarn.noctis.block.BlockInfusedStone;
+
+public class ModBlocks {
+ public static final BlockInfusedStone lightStone = new BlockInfusedStone(0);
+ public static final BlockInfusedStone darkStone = new BlockInfusedStone(1);
+ public static final BlockInfusedStone mixedStone = new BlockInfusedStone(2);
+
+ public static void init() {
+ GameRegistry.registerBlock(lightStone, lightStone.getUnlocalizedName());
+ GameRegistry.registerBlock(darkStone, darkStone.getUnlocalizedName());
+ GameRegistry.registerBlock(mixedStone, mixedStone.getUnlocalizedName());
+ }
+}
diff --git a/src/main/java/net/flarn/noctis/init/ModItems.java b/src/main/java/net/flarn/noctis/init/ModItems.java
index 251dc3e..0b5218b 100644
--- a/src/main/java/net/flarn/noctis/init/ModItems.java
+++ b/src/main/java/net/flarn/noctis/init/ModItems.java
@@ -2,21 +2,20 @@ package net.flarn.noctis.init;
import cpw.mods.fml.common.registry.GameRegistry;
-import net.flarn.noctis.item.ItemCatalyst;
-import net.flarn.noctis.item.ItemGlassSword;
-import net.flarn.noctis.item.ItemJournal;
-import net.flarn.noctis.item.ItemNoctisBase;
+import net.flarn.noctis.item.*;
import net.flarn.noctis.refs.Names;
public class ModItems {
public static final ItemNoctisBase glassSword = new ItemGlassSword();
public static final ItemCatalyst catalyst = new ItemCatalyst();
public static final ItemJournal journal = new ItemJournal();
+ public static final ItemShard shard = new ItemShard();
public static void init() {
GameRegistry.registerItem(glassSword, Names.Items.GLASS_SWORD);
GameRegistry.registerItem(catalyst, Names.Items.CATALYST);
GameRegistry.registerItem(journal, Names.Items.JOURNAL);
+ GameRegistry.registerItem(shard, Names.Items.SHARD);
}
}
diff --git a/src/main/java/net/flarn/noctis/init/Recipes.java b/src/main/java/net/flarn/noctis/init/Recipes.java
index 736c8eb..d752b3a 100644
--- a/src/main/java/net/flarn/noctis/init/Recipes.java
+++ b/src/main/java/net/flarn/noctis/init/Recipes.java
@@ -6,12 +6,14 @@ import net.flarn.noctis.item.ItemCatalyst;
import net.flarn.noctis.knowledge.KnowledgeItem;
import net.flarn.noctis.recipes.CatalysedRecipe;
import net.flarn.noctis.refs.Names;
+import net.flarn.noctis.refs.Numbers;
import net.flarn.noctis.utils.CatalystType;
import net.flarn.noctis.utils.SkyAccess;
import net.flarn.noctis.utils.Times;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
+import net.minecraft.item.crafting.ShapedRecipes;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
@@ -31,7 +33,7 @@ public class Recipes {
GameRegistry.addRecipe(new ShapedOreRecipe(lightCatalystStack, "pgp", "gmg", "pgp", 'g', "blockGlassWhite", 'p', "paneGlassWhite", 'm', catalystMiddleItem));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.journal), new ItemStack(Items.book), "dyeBlack", new ItemStack(Items.feather),
"blockGlassWhite", "blockGlassBlack"));
-
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.lightStone, 8, 0), "sss", "sSs", "sss", 's', new ItemStack(Blocks.stone), 'S', new ItemStack(ModItems.shard, 1, 0)));
}
public static void initCatalysedRecipes() {
@@ -42,7 +44,9 @@ public class Recipes {
CatalysedRecipe.newRecipe(Names.Recipes.HEALTH_POTION, CatalystType.LIGHT, new ItemStack(Items.potionitem, 1, 8197),
new ItemStack[]{new ItemStack(Items.potionitem, 1, 0), new ItemStack(Items.speckled_melon, 1, 0)}, 10, Times.NIGHT, SkyAccess.SKY,
KnowledgeItem.findKnowledgeItem("noctis.potion.health"), KnowledgeItem.findKnowledgeItem("noctis.potion.health"));
-
+ CatalysedRecipe.newRecipe(Names.Recipes.SHARD_OF_MOONLIGHT, CatalystType.LIGHT, new ItemStack(ModItems.shard, 8, 0),
+ new ItemStack[]{new ItemStack(Blocks.stained_glass, 1, 0), new ItemStack(Items.feather, 1, 0)},
+ Numbers.MAX_CATALYST_POWER / 4, Times.NIGHT, SkyAccess.SKY, KnowledgeItem.findKnowledgeItem("noctis.shard.moonlight"), null);
/*
if (ConfigHandler.cheapRecipes) {
CatalysedRecipe.newRecipe(CatalystType.LIGHT, new ItemStack(ModItems.glassSword),
diff --git a/src/main/java/net/flarn/noctis/item/ItemShard.java b/src/main/java/net/flarn/noctis/item/ItemShard.java
new file mode 100644
index 0000000..226cd66
--- /dev/null
+++ b/src/main/java/net/flarn/noctis/item/ItemShard.java
@@ -0,0 +1,66 @@
+package net.flarn.noctis.item;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.flarn.noctis.refs.Names;
+import net.flarn.noctis.refs.Textures;
+import net.flarn.noctis.utils.MathsUtil;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+
+import java.util.List;
+
+public class ItemShard extends ItemNoctisBase {
+ @SideOnly(Side.CLIENT)
+ private IIcon[] icons;
+
+ public ItemShard() {
+ super();
+ this.setUnlocalizedName(Names.Items.SHARD);
+ this.setMaxStackSize(16);
+ }
+
+ @Override
+ public String getUnlocalizedName() {
+ return String.format("item.%s%s", Textures.RESOURCE_PREFIX, Names.Items.SHARD);
+ }
+
+ @Override
+ public String getUnlocalizedName(ItemStack itemStack) {
+ return String.format("item.%s%s", Textures.RESOURCE_PREFIX,
+ Names.Items.SHARDS[MathsUtil.clampInt(0, Names.Items.SHARDS.length - 1, itemStack.getItemDamage())]);
+ }
+
+ @Override
+ public void getSubItems(Item item, CreativeTabs creativeTab, List list) {
+ for (int meta = 0; meta < Names.Items.SHARDS.length; ++meta) {
+ ItemStack s = new ItemStack(this, 1, meta);
+ list.add(s);
+ }
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIconIndex(ItemStack itemStack) {
+ return icons[MathsUtil.clampInt(0, Names.Items.SHARDS.length - 1, itemStack.getItemDamage())];
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIcon(ItemStack stack, int pass) {
+ return getIconIndex(stack);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IIconRegister iconRegister) {
+ icons = new IIcon[Names.Items.SHARDS.length];
+ for (int i = 0; i < Names.Items.SHARDS.length; ++i) {
+ icons[i] = iconRegister.registerIcon(Textures.RESOURCE_PREFIX + Names.Items.SHARDS[i]);
+ }
+ }
+
+}
diff --git a/src/main/java/net/flarn/noctis/knowledge/InternalKnowledgeTree.java b/src/main/java/net/flarn/noctis/knowledge/InternalKnowledgeTree.java
index 54bfc23..463e94d 100644
--- a/src/main/java/net/flarn/noctis/knowledge/InternalKnowledgeTree.java
+++ b/src/main/java/net/flarn/noctis/knowledge/InternalKnowledgeTree.java
@@ -10,5 +10,7 @@ public class InternalKnowledgeTree {
KnowledgeItem POTION_SPEED = KnowledgeItem.addKnowledgeItem("noctis.potion.speed", true, KnowledgeVisibility.THEORY, LIGHT_BOUND_CATALYST);
KnowledgeItem POTION_HEALTH = KnowledgeItem.addKnowledgeItem("noctis.potion.health", true, KnowledgeVisibility.HIDDEN, POTION_SPEED);
KnowledgeItem LIGHT_CATALYST_CHARGED = KnowledgeItem.addKnowledgeItem("noctis.catalyst.light.charged", true, KnowledgeVisibility.THEORY, POTION_SPEED);
+ KnowledgeItem SHARDS_OF_MOONLIGHT = KnowledgeItem.addKnowledgeItem("noctis.shard.moonlight", true, KnowledgeVisibility.KNOWN, LIGHT_CATALYST_CHARGED);
+ KnowledgeItem MOONLIGHT_INFUSED_STONE = KnowledgeItem.addKnowledgeItem("noctis.stone.moonlight", true, KnowledgeVisibility.KNOWN, SHARDS_OF_MOONLIGHT);
}
}
diff --git a/src/main/java/net/flarn/noctis/refs/Names.java b/src/main/java/net/flarn/noctis/refs/Names.java
index 85398dd..a742204 100644
--- a/src/main/java/net/flarn/noctis/refs/Names.java
+++ b/src/main/java/net/flarn/noctis/refs/Names.java
@@ -12,12 +12,20 @@ public class Names {
public static final String CATALYST_KNOWLEDGE[] = new String[] { "noctis.catalyst.light", "noctis.catalyst.dark", "noctis.catalyst.mixed" };
public static final String CATALYST_BOUND_KNOWLEDGE[] = new String[] { "noctis.catalyst.light.bound", "noctis.catalyst.dark.bound", "noctis.catalyst.mixed.bound" };
public static final String[] CATALYST_CHARGE_KNOWLEDGE = new String[] { "noctis.catalyst.light.charged", "noctis.catalyst.dark.charged", "noctis.catalyst.mixed.charged" };
+ public static final String SHARD = "shard";
+ public static final String SHARDS[] = new String[] { "lightShard", "darkShard", "mixedShard" };
}
+ public static final class Blocks {
+ public static final String NOCTIS_PREFIX = "noctis:";
+ public static final String STONES[] = new String[] { "lightStone", "darkStone", "mixedStone" };
+ }
+
public static final class Recipes {
public static final String NOCTIS_PREFIX = "noctis:";
public static final String SPEED_POTION = NOCTIS_PREFIX + "potion.speed";
public static final String HEALTH_POTION = NOCTIS_PREFIX + "potion.health";
+ public static final String SHARD_OF_MOONLIGHT = NOCTIS_PREFIX + "shard.moonlight";
}
}
diff --git a/src/main/resources/assets/noctis/journal/en_GB.yaml b/src/main/resources/assets/noctis/journal/en_GB.yaml
index cc6da4a..9b30823 100644
--- a/src/main/resources/assets/noctis/journal/en_GB.yaml
+++ b/src/main/resources/assets/noctis/journal/en_GB.yaml
@@ -192,3 +192,44 @@ pagestack:
my catalyst as it sat under the stars and I have learned something wonderful. It seems to grow more
energetic simply as it bathes in the light of the moon. I must take care however as I fear that the
sunlight has a less salubrious effect, seeming to drain energy from my catalyst instead.
+
+---
+
+item: noctis.shard.moonlight
+start: KNOWN
+pagestack:
+ KNOWN:
+ - kind: text
+ body: |
+ I noticed that where 'ere my catalyst lay, it seemed to infuse small glimmers of the moonlight it had
+ so readily absorbed into the items around it. Those glimmers fading almost as rapidly as they appeared,
+ glittering in the dark. The most affected items were those gossamer items such as feathers or the smaller
+ pieces of string. Sadly none of those items seemed to be able to hold the power infused into them, their
+ energies fading as fast as I could persuade my catalyst to infuse them.
+
+ Further thought has led me to the inescapable conclusion that fusing glass into these items will be the only
+ way to properly trap the power. After all, glass is what allowed me to create my catalyst in the first place.
+
+ I have determined that only feathers are diaphanous enough to accept the energies and also strong enough
+ to have the glass fused to them without losing their inherent properties. With this knowledge I have managed
+ to create shards of the very moonlight which has so far powered my experiments and haunted my dreams.
+
+ The shards seem stable and definitely pulse with the power they were infused with. Sadly they seem unable to
+ catalyse reactions of the forms I have thus-far discovered. I believe they will be useful for other things
+ though.
+ - kind: catalysedrecipe
+ goal: "noctis:shard.moonlight"
+
+---
+
+item: noctis.stone.moonlight
+start: KNOWN
+pagestack:
+ KNOWN:
+ - kind: text
+ body: |
+ These shards of moonlight are stable enough to imbue other items with their power and one of the options I have
+ discovered is to infuse moonlight into stone. While the stone is not shining with immense power, it certainly
+ seems to have enough moonlight within it to affect the flora and fauna around it.
+ - kind: recipe
+ goal: "tile.noctis:lightStone"
diff --git a/src/main/resources/assets/noctis/lang/en_GB.lang b/src/main/resources/assets/noctis/lang/en_GB.lang
index db997df..eab577a 100644
--- a/src/main/resources/assets/noctis/lang/en_GB.lang
+++ b/src/main/resources/assets/noctis/lang/en_GB.lang
@@ -8,12 +8,20 @@ item.noctis:glassSword.name=Un-attuned Glass Sword
item.noctis:lightCatalyst.name=Catalyst attuned to the light of the moon
item.noctis:darkCatalyst.name=Catalyst attuned to the space between the stars
item.noctis:mixedCatalyst.name=Catalyst attuned to all the night can provide
+item.noctis:lightShard.name=Shard of moonlight
+item.noctis:darkShard.name=Shard of the rift
+item.noctis:mixedShard.name=Shard of mixed energies
# Description localisations
desc.noctis:journal=Everything I know about the power of the night is in here.
desc.noctis:catalyst.lifeless=This seems dull somehow
desc.noctis:catalyst.thrums=An aura of %s infuses this
+# Block localisations
+tile.noctis:lightStone.name=Stone infused with moonlight
+tile.noctis:darkStone.name=Stone infused with rift energy
+tile.noctis:mixedStone.name=Stone infused with mixed energies
+
# Stuff for the journal
noctis:journal.dayfmt=Day %d
diff --git a/src/main/resources/assets/noctis/textures/blocks/darkStone.png b/src/main/resources/assets/noctis/textures/blocks/darkStone.png
new file mode 100644
index 0000000..7ad4cc0
--- /dev/null
+++ b/src/main/resources/assets/noctis/textures/blocks/darkStone.png
Binary files differ
diff --git a/src/main/resources/assets/noctis/textures/blocks/lightStone.png b/src/main/resources/assets/noctis/textures/blocks/lightStone.png
new file mode 100644
index 0000000..a9626c9
--- /dev/null
+++ b/src/main/resources/assets/noctis/textures/blocks/lightStone.png
Binary files differ
diff --git a/src/main/resources/assets/noctis/textures/blocks/mixedStone.png b/src/main/resources/assets/noctis/textures/blocks/mixedStone.png
new file mode 100644
index 0000000..24a6356
--- /dev/null
+++ b/src/main/resources/assets/noctis/textures/blocks/mixedStone.png
Binary files differ
diff --git a/src/main/resources/assets/noctis/textures/items/darkShard.png b/src/main/resources/assets/noctis/textures/items/darkShard.png
new file mode 100644
index 0000000..fa5a083
--- /dev/null
+++ b/src/main/resources/assets/noctis/textures/items/darkShard.png
Binary files differ
diff --git a/src/main/resources/assets/noctis/textures/items/lightShard.png b/src/main/resources/assets/noctis/textures/items/lightShard.png
new file mode 100644
index 0000000..7f04b9c
--- /dev/null
+++ b/src/main/resources/assets/noctis/textures/items/lightShard.png
Binary files differ
diff --git a/src/main/resources/assets/noctis/textures/items/mixedShard.png b/src/main/resources/assets/noctis/textures/items/mixedShard.png
new file mode 100644
index 0000000..1db519b
--- /dev/null
+++ b/src/main/resources/assets/noctis/textures/items/mixedShard.png
Binary files differ