remove last bits of ForestryItem

This commit is contained in:
mezz committed 2015-11-19 01:04:36 -08:00
1 parent 60d5728ccb
commit 23fd664e34
5 files changed
+1 -94

No files matched your search

-6
View File
@@ -149,12 +149,6 @@ public class Forestry {
if (block != null) {
mapping.remap(Item.getItemFromBlock(block));
Log.warning("Remapping item " + mapping.name + " to " + StringUtil.cleanBlockName(block));
// } else {
// ForestryItem mappedItem = mappedItems.get(mapping.name);
// if (mappedItem != null) {
// mapping.remap(mappedItem.item());
// Log.warning("Remapping item " + mapping.name + " to " + mappedItem.name());
// }
}
}
}
@@ -54,10 +54,6 @@ public class AlleleFruit extends AlleleCategorized implements IAlleleFruit {
fruitCherry = new AlleleFruit("cherry", new FruitProviderRipening("cherry", EnumFruitFamily.PRUNES, ItemFruit.EnumFruit.CHERRY.getStack(), 1.0f).setColours(0xff2e2e, 0xc4d24a).setOverlay("berries"), true),
fruitDates = new AlleleFruit("dates", new FruitProviderPod("dates", EnumFruitFamily.JUNGLE, FruitProviderPod.EnumPodType.DATES, ItemFruit.EnumFruit.DATES.getStack(4))),
fruitPapaya = new AlleleFruit("papaya", new FruitProviderPod("papaya", EnumFruitFamily.JUNGLE, FruitProviderPod.EnumPodType.PAPAYA, ItemFruit.EnumFruit.PAPAYA.getStack())),
// Allele.fruitCoconut = new AlleleFruit("fruitCoconut", new
// FruitProviderPod("coconut", jungle, EnumPodType.COCONUT, new
// ItemStack[] { new ItemStack(
// ForestryItem.fruits, 1, EnumFruit.COCONUT.ordinal()) }));
fruitLemon = new AlleleFruit("lemon", new FruitProviderRipening("lemon", EnumFruitFamily.PRUNES, ItemFruit.EnumFruit.LEMON.getStack(), 1.0f).setColours(0xeeee00, 0x99ff00).setOverlay("citrus"), true),
fruitPlum = new AlleleFruit("plum", new FruitProviderRipening("plum", EnumFruitFamily.PRUNES, ItemFruit.EnumFruit.PLUM.getStack(), 1.0f).setColours(0x663446, 0xeeff1a).setOverlay("plums"), true)
);
@@ -1,77 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011-2014 SirSengir.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v3
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/lgpl-3.0.txt
*
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.core.config;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.registry.GameRegistry;
import forestry.core.utils.StringUtil;
import forestry.plugins.PluginManager;
import forestry.plugins.PluginManager.Stage;
/**
* Allows direct access to Forestry's items. Will be populated during
* preInit and Init.
*
* Most items with the exception of bees do not care for damage values.
*
* Make sure to only reference it in postInit or later.
*
* @author SirSengir
*/
public enum ForestryItem {
researchNote;
private Item item;
public void registerItem(Item item, String name) {
if (PluginManager.getStage() != Stage.SETUP) {
throw new RuntimeException("Tried to register Item outside of Setup");
}
this.item = item;
item.setUnlocalizedName("for." + name);
GameRegistry.registerItem(item, StringUtil.cleanItemName(item));
}
public boolean isItemEqual(ItemStack stack) {
return stack != null && this.item == stack.getItem();
}
public boolean isItemEqual(Item i) {
return i != null && this.item == i;
}
public Item item() {
return item;
}
public ItemStack getWildcard() {
return getItemStack(1, OreDictionary.WILDCARD_VALUE);
}
public ItemStack getItemStack() {
return getItemStack(1, 0);
}
public ItemStack getItemStack(int qty) {
return getItemStack(qty, 0);
}
public ItemStack getItemStack(int qty, int meta) {
if (item == null) {
return null;
}
return new ItemStack(item, qty, meta);
}
}
@@ -32,7 +32,6 @@ import cpw.mods.fml.common.registry.GameRegistry;
import forestry.api.recipes.IDescriptiveRecipe;
import forestry.api.recipes.RecipeManagers;
import forestry.core.config.ForestryBlock;
import forestry.core.config.ForestryItem;
import forestry.core.fluids.Fluids;
import forestry.core.utils.ItemStackUtil;
import forestry.core.utils.Log;
@@ -213,9 +212,7 @@ public abstract class RecipeUtil {
private static void cleanRecipe(Object... obj) {
for (int i = 0; i < obj.length; i++) {
if (obj[i] instanceof ForestryItem) {
obj[i] = ((ForestryItem) obj[i]).item();
} else if (obj[i] instanceof ForestryBlock) {
if (obj[i] instanceof ForestryBlock) {
obj[i] = ((ForestryBlock) obj[i]).block();
}
}
@@ -24,7 +24,6 @@ import net.minecraftforge.oredict.OreDictionary;
import forestry.api.recipes.IDescriptiveRecipe;
import forestry.core.config.ForestryBlock;
import forestry.core.config.ForestryItem;
public class ShapedRecipeCustom implements IDescriptiveRecipe {
@@ -118,8 +117,6 @@ public class ShapedRecipeCustom implements IDescriptiveRecipe {
// Item
if (materials[index + 1] instanceof Item) {
hashmap.put(character, new ItemStack((Item) materials[index + 1]));
} else if (materials[index + 1] instanceof ForestryItem) {
hashmap.put(character, ((ForestryItem) materials[index + 1]).getItemStack());
} else if (materials[index + 1] instanceof ForestryBlock) {
hashmap.put(character, ((ForestryBlock) materials[index + 1]).getItemStack());
} else if (materials[index + 1] instanceof Block) {