mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 04:09:40 +00:00
Added the mana resource items, crafting mechanic will come next.
This commit is contained in:
1 parent
7737fa4b93
commit
1646dcd9ec
11 files changed
+79
-4
No files matched your search
@@ -46,6 +46,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
addItem(ModItems.pestleAndMortar);
|
||||
addItem(ModItems.dye);
|
||||
addItem(ModItems.twigWand);
|
||||
addItem(ModItems.manaResource);
|
||||
|
||||
addBlock(ModBlocks.livingrock);
|
||||
addBlock(ModBlocks.livingwood);
|
||||
|
||||
@@ -43,7 +43,8 @@ public final class ConfigHandler {
|
||||
LibItemIDs.idDye = loadItem(LibItemNames.DYE, LibItemIDs.idDye);
|
||||
LibItemIDs.idPestleAndMortar = loadItem(LibItemNames.PESTLE_AND_MORTAR, LibItemIDs.idPestleAndMortar);
|
||||
LibItemIDs.idTwigWand = loadItem(LibItemNames.TWIG_WAND, LibItemIDs.idTwigWand);
|
||||
|
||||
LibItemIDs.idManaResource = loadItem(LibItemNames.MANA_RESOURCE, LibItemIDs.idManaResource);
|
||||
|
||||
config.save();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Jan 30, 2014, 4:49:16 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.lib.LibItemIDs;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemManaResource extends ItemMod {
|
||||
|
||||
final int types = 3;
|
||||
Icon[] icons;
|
||||
|
||||
public ItemManaResource() {
|
||||
super(LibItemIDs.idManaResource);
|
||||
setUnlocalizedName(LibItemNames.MANA_RESOURCE);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
for(int i = 0; i < types; i++)
|
||||
par3List.add(new ItemStack(par1, 1, i));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
icons = new Icon[types];
|
||||
for(int i = 0; i < icons.length; i++)
|
||||
icons[i] = IconHelper.forNameRaw(par1IconRegister, LibItemNames.MANA_RESOURCE_NAMES[i]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack par1ItemStack) {
|
||||
return "item." + LibItemNames.MANA_RESOURCE_NAMES[Math.min(types - 1, par1ItemStack.getItemDamage())];
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIconFromDamage(int par1) {
|
||||
return icons[Math.min(icons.length - 1, par1)];
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ public final class ModItems {
|
||||
public static Item dye;
|
||||
public static Item pestleAndMortar;
|
||||
public static Item twigWand;
|
||||
public static Item manaResource;
|
||||
|
||||
public static void init() {
|
||||
lexicon = new ItemLexicon();
|
||||
@@ -30,6 +31,7 @@ public final class ModItems {
|
||||
dye = new ItemDye();
|
||||
pestleAndMortar = new ItemPestleAndMortar();
|
||||
twigWand = new ItemTwigWand();
|
||||
manaResource = new ItemManaResource();
|
||||
|
||||
OreDictionary.registerOre(LibOreDict.LEXICON, lexicon);
|
||||
for(int i = 0; i < 16; i++) {
|
||||
@@ -37,7 +39,8 @@ public final class ModItems {
|
||||
OreDictionary.registerOre(LibOreDict.DYE[i], new ItemStack(dye.itemID, 1, i));
|
||||
}
|
||||
OreDictionary.registerOre(LibOreDict.PESTLE_AND_MORTAR, pestleAndMortar);
|
||||
|
||||
OreDictionary.registerOre(LibOreDict.MANA_STEEL, new ItemStack(manaResource, 1, 0));
|
||||
OreDictionary.registerOre(LibOreDict.MANA_PEARL, new ItemStack(manaResource, 1, 1));
|
||||
OreDictionary.registerOre(LibOreDict.MANA_DIAMOND, new ItemStack(manaResource, 1, 1));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,5 +18,6 @@ public final class LibItemIDs {
|
||||
public static int idDye = 19557;
|
||||
public static int idPestleAndMortar = 19558;
|
||||
public static int idTwigWand = 19559;
|
||||
public static int idManaResource = 19560;
|
||||
|
||||
}
|
||||
@@ -20,5 +20,11 @@ public final class LibItemNames {
|
||||
public static final String DYE = LibResources.PREFIX_MOD + "dye";
|
||||
public static final String PESTLE_AND_MORTAR = LibResources.PREFIX_MOD + "pestleAndMortar";
|
||||
public static final String TWIG_WAND = LibResources.PREFIX_MOD + "twigWand";
|
||||
public static final String MANA_RESOURCE = LibResources.PREFIX_MOD + "manaResource";
|
||||
|
||||
public static final String[] MANA_RESOURCE_NAMES = new String[] {
|
||||
LibResources.PREFIX_MOD + "manasteel",
|
||||
LibResources.PREFIX_MOD + "manaPearl",
|
||||
LibResources.PREFIX_MOD + "manaDiamond"
|
||||
};
|
||||
}
|
||||
@@ -18,7 +18,10 @@ public final class LibOreDict {
|
||||
public static final String TWIG_WAND = "twigWand";
|
||||
public static final String LIVING_ROCK = "livingrock";
|
||||
public static final String LIVING_WOOD = "livingwood";
|
||||
|
||||
public static final String MANA_STEEL = "ingotManasteel";
|
||||
public static final String MANA_PEARL = "manaPearl";
|
||||
public static final String MANA_DIAMOND = "manaDiamond";
|
||||
|
||||
public static final String[] FLOWER = new String[] {
|
||||
"mysticFlowerWhite", "mysticFlowerOrange", "mysticFlowerMagenta", "mysticFlowerLightBlue", "mysticFlowerYellow", "mysticFlowerLime", "mysticFlowerPink", "mysticFlowerGray", "mysticFlowerLightGray", "mysticFlowerCyan", "mysticFlowerPurple", "mysticFlowerBlue", "mysticFlowerBrown", "mysticFlowerGreen", "mysticFlowerRed", "mysticFlowerBlack",
|
||||
};
|
||||
|
||||
@@ -76,6 +76,9 @@ item.botania:dye14.name=Floral Red Dye
|
||||
item.botania:dye15.name=Floral Black Dye
|
||||
item.botania:pestleAndMortar.name=Pestle and Mortar
|
||||
item.botania:twigWand.name=Wand of the Forest
|
||||
item.botania:manasteel.name=Manasteel Ingot
|
||||
item.botania:manaPearl.name=Mana Pearl
|
||||
item.botania:manaDiamond.name=Mana Diamond
|
||||
|
||||
# GUI TEXT
|
||||
botania.gui.lexicon.header=Lexica Botania Index - Pick which category you would like to study:
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
Reference in new issue
Block a user