You gotta getcha getcha getcha getcha head in the game.

This commit is contained in:
Vasco Lavos committed 2014-07-23 16:24:10 +01:00
1 parent 8efc01931d
commit 595420fac6
5 files changed
+75 -1

No files matched your search

@@ -20,6 +20,7 @@ import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.recipe.RecipeRuneAltar;
import vazkii.botania.common.crafting.recipe.HeadRecipe;
import vazkii.botania.common.item.ModItems;
import vazkii.botania.common.lib.LibOreDict;
@@ -42,6 +43,8 @@ public final class ModRuneRecipes {
public static RecipeRuneAltar recipeEnvyRune;
public static RecipeRuneAltar recipePrideRune;
public static RecipeRuneAltar recipeHead;
public static void init() {
final int costTier1 = 2500;
final int costTier2 = 4000;
@@ -75,5 +78,8 @@ public final class ModRuneRecipes {
recipeWrathRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 2, 13), costTier3, LibOreDict.MANA_DIAMOND, LibOreDict.MANA_DIAMOND, LibOreDict.RUNE[7], LibOreDict.RUNE[2]);
recipeEnvyRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 2, 14), costTier3, LibOreDict.MANA_DIAMOND, LibOreDict.MANA_DIAMOND, LibOreDict.RUNE[7], LibOreDict.RUNE[0]);
recipePrideRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 2, 15), costTier3, LibOreDict.MANA_DIAMOND, LibOreDict.MANA_DIAMOND, LibOreDict.RUNE[5], LibOreDict.RUNE[1]);
recipeHead = new HeadRecipe(new ItemStack(Items.skull, 1, 3), 22500, new ItemStack(Items.skull), LibOreDict.PIXIE_DUST, LibOreDict.PRISMARINE_SHARD, new ItemStack(Items.name_tag), new ItemStack(Items.golden_apple));
BotaniaAPI.runeAltarRecipes.add(recipeHead);
}
}
@@ -0,0 +1,58 @@
/**
* 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 @ [Jul 23, 2014, 3:02:17 PM (GMT)]
*/
package vazkii.botania.common.crafting.recipe;
import net.minecraft.init.Items;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import vazkii.botania.api.recipe.RecipeRuneAltar;
import vazkii.botania.common.core.helper.ItemNBTHelper;
public class HeadRecipe extends RecipeRuneAltar {
String name = "";
public HeadRecipe(ItemStack output, int mana, Object... inputs) {
super(output, mana, inputs);
}
@Override
public boolean matches(IInventory inv) {
boolean matches = super.matches(inv);
if(matches) {
for(int i = 0; i < inv.getSizeInventory(); i++) {
ItemStack stack = inv.getStackInSlot(i);
if(stack == null)
break;
if(stack.getItem() == Items.name_tag) {
name = stack.getDisplayName();
if(name.equals(StatCollector.translateToLocal("item.nameTag.name")))
return false;
}
}
}
return matches;
}
@Override
public ItemStack getOutput() {
ItemStack stack = new ItemStack(Items.skull, 1, 3);
if(!name.isEmpty())
ItemNBTHelper.setString(stack, "SkullOwner", name);
return stack;
}
}
@@ -167,6 +167,7 @@ public final class LexiconData {
public static LexiconEntry prismarine;
public static LexiconEntry shedding;
public static LexiconEntry tinyPotato;
public static LexiconEntry headCreating;
public static void init() {
BotaniaAPI.addCategory(categoryBasics = new LexiconCategory(LibLexicon.CATEGORY_BASICS));
@@ -561,5 +562,8 @@ public final class LexiconData {
tinyPotato = new BLexiconEntry(LibLexicon.MISC_TINY_POTATO, categoryMisc);
tinyPotato.setLexiconPages(new PageText("0"), new PageManaInfusionRecipe("1", ModManaInfusionRecipes.tinyPotatoRecipe));
headCreating = new ALexiconEntry(LibLexicon.MISC_HEAD_CREATING, categoryMisc);
headCreating.setLexiconPages(new PageText("0"), new PageRuneRecipe("1", ModRuneRecipes.recipeHead));
}
}
@@ -144,5 +144,6 @@ public final class LibLexicon {
public static final String MISC_PRISMARINE = "prismarine";
public static final String MISC_SHEDDING = "shedding";
public static final String MISC_TINY_POTATO = "tinyPotato";
public static final String MISC_HEAD_CREATING = "headCreating";
}
+6 -1
View File
@@ -1417,4 +1417,9 @@ botania.page.shedding0=The living beings that inhabit our lands don't live in a
# -- TINY POTATO
botania.entry.tinyPotato=Tiny Potato
botania.page.tinyPotato0=It's a tiny potato, it believes in you, you can do the thing.<br>No really, that's it, by tossing a &1Potato&0 in a &1Mana Pool&0, the potato gains a little lively essence and happy feeling. It's a lively one, giving it a right click will make it even more so!
botania.page.tinyPotato1=Put it on Kickstarter, it'll work
botania.page.tinyPotato1=Put it on Kickstarter, it'll work
# -- HEAD CREATION
botania.entry.headCreating=Head Creation
botania.page.headCreating0=A typical incantation of the Elves, combining a few resources and a &1Name Tag&0 allows for the creation of a replica of sorts of the head of the person described in the tag. How it works isn't really known, but it seems to be possible to replicate it with a &1Runic Altar&0.
botania.page.headCreating1=Get your head in the game