Ore Dict Support for Scribe! :D

This commit is contained in:
oitsjustjose 2015-12-16 07:21:37 -06:00
commit f9d911ccca
4 changed files with 62 additions and 20 deletions

38
Changelog.txt Normal file
View file

@ -0,0 +1,38 @@
1.31:
-Changed: Pouches are now made differently; they no longer store color in Metadata, instead they use NBT, and can be any hex color!
Note: Pouches can be dyed via Ore Dictionary Dyes! Unlike leather armor and sheep (might make a fix for that in V-Tweaks...)
-Added Crafting Handler to address new changes to pouches.
Take your "broken" pouch and put it in your crafting grid, you'll get a new one back, keeping all stored items
-Added ability to clear pouch of color like vanilla armor; use a cauldron with water
-Added the Scribe: new Tile Entity for crafting enchanted books. Only crafts Level I enchanted books; recipes and process times are non-configurable.
The Scribe only crafts enchanted books at Level I. This is for balance, since it does not require XP any other ways.
Scribe Recipes are as follows:
16 x Puffer Fish -> Aqua Affinity
8 x Spider Eye -> Bane of Arthropods
8 x Obsidian -> Blast Protection
16 x Prismarine Shard -> Depth Strider
8 x Redstone Blocks -> Efficiency
32 x Feather -> Feather Falling
8 x Blaze Rod -> Fire Aspect
16 x Blaze Powder -> Flame
12 x Lapis Block -> Fortune
8 x Diamond -> Infinity
4 x Piston -> Knockback
3 x Emerald -> Looting
16 x Prismarine Crystals -> Luck of the Sea
16 x Normal Fish -> Lure
16 x Quartz (item) -> Power
16 x Log (oreDict works) -> Projectile Protection
4 x Iron Block -> Protection
12 x Gold -> Punch
Potion of Water Breathing (8:00 duration) -> Respiration
16 x Quartz Block -> Sharpness
8 x Slime Block -> Silk Touch
48 x Rotten Flesh -> Smite
64 x Rose (double tall) -> Thorns
24 x Iron Ingot -> Unbreaking
Optionally, see this link: http://puu.sh/lXDTk/34d6366e88.gif

View file

@ -67,31 +67,30 @@ public class CCMachineRecipes
public static void initScribeRecipes()
{
ScribeRecipes.getInstance().addRecipe(new ItemStack(Items.potionitem, 1, 8269), getEnchantedBook(Enchantment.aquaAffinity));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Items.fish, 16, 3), getEnchantedBook(Enchantment.aquaAffinity));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Items.spider_eye, 8), getEnchantedBook(Enchantment.baneOfArthropods));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Blocks.obsidian, 8), getEnchantedBook(Enchantment.blastProtection));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Blocks.waterlily, 8), getEnchantedBook(Enchantment.depthStrider));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Blocks.redstone_block, 8), getEnchantedBook(Enchantment.efficiency));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Items.prismarine_shard, 16), getEnchantedBook(Enchantment.depthStrider));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Items.feather, 32), getEnchantedBook(Enchantment.featherFalling));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Items.blaze_rod, 8), getEnchantedBook(Enchantment.fireAspect));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Items.blaze_powder, 16), getEnchantedBook(Enchantment.flame));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Blocks.lapis_block, 12), getEnchantedBook(Enchantment.fortune));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Items.diamond, 8), getEnchantedBook(Enchantment.infinity));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Blocks.piston, 4), getEnchantedBook(Enchantment.knockback));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Items.golden_apple, 2, 0), getEnchantedBook(Enchantment.looting));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Items.fishing_rod), getEnchantedBook(Enchantment.luckOfTheSea));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Items.prismarine_crystals, 16), getEnchantedBook(Enchantment.luckOfTheSea));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Items.fish, 16, 0), getEnchantedBook(Enchantment.lure));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Items.quartz, 48), getEnchantedBook(Enchantment.power));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Blocks.log, 16, Short.MAX_VALUE), getEnchantedBook(Enchantment.projectileProtection));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Blocks.log2, 16, Short.MAX_VALUE), getEnchantedBook(Enchantment.projectileProtection));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Blocks.iron_block, 4), getEnchantedBook(Enchantment.protection));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Blocks.dropper, 4), getEnchantedBook(Enchantment.punch));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Items.fish, 16, 3), getEnchantedBook(Enchantment.respiration));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Blocks.quartz_block, 16), getEnchantedBook(Enchantment.sharpness));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Items.potionitem, 1, 8269), getEnchantedBook(Enchantment.respiration));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Blocks.slime_block, 8), getEnchantedBook(Enchantment.silkTouch));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Items.rotten_flesh, 48), getEnchantedBook(Enchantment.smite));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Blocks.vine, 64), getEnchantedBook(Enchantment.thorns));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Items.iron_ingot, 24), getEnchantedBook(Enchantment.unbreaking));
ScribeRecipes.getInstance().addRecipe(new ItemStack(Blocks.double_plant, 64, 4), getEnchantedBook(Enchantment.thorns));
ScribeRecipes.getInstance().addRecipe("ingotIron", 24, getEnchantedBook(Enchantment.unbreaking));
ScribeRecipes.getInstance().addRecipe("ingotGold", 12, getEnchantedBook(Enchantment.punch));
ScribeRecipes.getInstance().addRecipe("gemQuartz", 16, getEnchantedBook(Enchantment.power));
ScribeRecipes.getInstance().addRecipe("gemDiamond", 8, getEnchantedBook(Enchantment.infinity));
ScribeRecipes.getInstance().addRecipe("gemEmerald", 3, getEnchantedBook(Enchantment.looting));
ScribeRecipes.getInstance().addRecipe("logWood", 16, getEnchantedBook(Enchantment.projectileProtection));
ScribeRecipes.getInstance().addRecipe("blockIron", 4, getEnchantedBook(Enchantment.protection));
ScribeRecipes.getInstance().addRecipe("blockQuartz", 16, getEnchantedBook(Enchantment.sharpness));
ScribeRecipes.getInstance().addRecipe("blockLapis", 12, getEnchantedBook(Enchantment.fortune));
ScribeRecipes.getInstance().addRecipe("blockRedstone", 8, getEnchantedBook(Enchantment.efficiency));
}
public static void initCropomatorRecipes()

View file

@ -1,14 +1,12 @@
package com.oitsjustjose.criss_cross.recipes;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import com.google.common.collect.Maps;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
@ -27,6 +25,14 @@ public class ScribeRecipes
this.recipes.put(input, stack);
}
public void addRecipe(String oreDict, int qty, ItemStack stack)
{
List<ItemStack> itemstacks = OreDictionary.getOres(oreDict);
if (itemstacks.size() > 0)
for (ItemStack i : itemstacks)
this.recipes.put(new ItemStack(i.getItem(), qty, i.getMetadata()), stack);
}
public ItemStack getResult(ItemStack stack)
{
Iterator iterator = this.recipes.entrySet().iterator();

View file

@ -23,7 +23,6 @@ import net.minecraftforge.fml.relauncher.SideOnly;
public class TileScribe extends TileEntityLockable implements ITickable, ISidedInventory
{
// TODO: change this back to 700.
private static int proTicks = 700;
private static final int[] slotsTop = new int[] { 0 };
private static final int[] slotsBottom = new int[] { 2, 1 };