mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
1 parent
af5e9f7751
commit
b090622477
3 files changed
+79
-6
No files matched your search
@@ -28,13 +28,14 @@ import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
import org.apache.logging.log4j.Level;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.state.enums.FutureStoneVariant;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.ModFluffBlocks;
|
||||
import vazkii.botania.common.block.tile.TileCraftCrate;
|
||||
import vazkii.botania.common.core.handler.ConfigHandler;
|
||||
import vazkii.botania.common.crafting.recipe.ArmorUpgradeRecipe;
|
||||
import vazkii.botania.common.crafting.recipe.ManaUpgradeRecipe;
|
||||
import vazkii.botania.common.crafting.recipe.ShapelessManaUpgradeRecipe;
|
||||
import vazkii.botania.common.item.ItemSignalFlare;
|
||||
import vazkii.botania.common.item.ItemTwigWand;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
@@ -741,10 +742,10 @@ public final class ModCraftingRecipes {
|
||||
recipeTinyPlanet = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Mana Band Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.manaRing),
|
||||
GameRegistry.addRecipe(new ManaUpgradeRecipe(new ItemStack(ModItems.manaRing),
|
||||
"TI ", "I I", " I ",
|
||||
'T', new ItemStack(ModItems.manaTablet, 1, Short.MAX_VALUE),
|
||||
'I', LibOreDict.MANA_STEEL);
|
||||
'I', LibOreDict.MANA_STEEL));
|
||||
recipeManaRing = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Aura Band Recipe
|
||||
@@ -755,7 +756,7 @@ public final class ModCraftingRecipes {
|
||||
recipeAuraRing = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Greater Mana Band Recipe
|
||||
addShapelessOreDictRecipe(new ItemStack(ModItems.manaRingGreater), LibOreDict.TERRA_STEEL, new ItemStack(ModItems.manaRing));
|
||||
GameRegistry.addRecipe(new ShapelessManaUpgradeRecipe(new ItemStack(ModItems.manaRingGreater), LibOreDict.TERRA_STEEL, new ItemStack(ModItems.manaRing, 1, Short.MAX_VALUE)));
|
||||
recipeGreaterManaRing = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Greater Aura Band Recipe
|
||||
@@ -873,11 +874,11 @@ public final class ModCraftingRecipes {
|
||||
recipeMagnetRing = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Terra Shatterer Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.terraPick),
|
||||
GameRegistry.addRecipe(new ManaUpgradeRecipe(new ItemStack(ModItems.terraPick),
|
||||
"ITI", "ILI", " L ",
|
||||
'T', new ItemStack(ModItems.manaTablet, 1, Short.MAX_VALUE),
|
||||
'I', LibOreDict.TERRA_STEEL,
|
||||
'L', LibOreDict.LIVINGWOOD_TWIG);
|
||||
'L', LibOreDict.LIVINGWOOD_TWIG));
|
||||
recipeTerraPick = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Charm of the Diva Recipe
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* This class was created by <WireSegal>. 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 the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [Apr 4, 2016, 1:16:22 PM (EST)]
|
||||
*/
|
||||
package vazkii.botania.common.crafting.recipe;
|
||||
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import vazkii.botania.api.mana.IManaItem;
|
||||
|
||||
public class ManaUpgradeRecipe extends ShapedOreRecipe {
|
||||
public ManaUpgradeRecipe(ItemStack output, Object... inputs) {
|
||||
super(output, inputs);
|
||||
}
|
||||
|
||||
public static ItemStack output(ItemStack output, InventoryCrafting var1) {
|
||||
ItemStack out = output.copy();
|
||||
if (!(out.getItem() instanceof IManaItem))
|
||||
return out;
|
||||
IManaItem outItem = (IManaItem) out.getItem();
|
||||
for (int i = 0; i < var1.getSizeInventory(); i++) {
|
||||
ItemStack stack = var1.getStackInSlot(i);
|
||||
if (stack != null) {
|
||||
if (stack.getItem() instanceof IManaItem) {
|
||||
IManaItem item = (IManaItem) stack.getItem();
|
||||
outItem.addMana(out, item.getMana(stack));
|
||||
}
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getCraftingResult(InventoryCrafting var1) {
|
||||
return output(output, var1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* This class was created by <WireSegal>. 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 the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [Apr 4, 2016, 1:20:34 PM (EST)]
|
||||
*/
|
||||
package vazkii.botania.common.crafting.recipe;
|
||||
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
import vazkii.botania.api.mana.IManaItem;
|
||||
|
||||
public class ShapelessManaUpgradeRecipe extends ShapelessOreRecipe {
|
||||
public ShapelessManaUpgradeRecipe(ItemStack output, Object... inputs) {
|
||||
super(output, inputs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getCraftingResult(InventoryCrafting var1) {
|
||||
return ManaUpgradeRecipe.output(output, var1);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user