Replace Constants.WILDCARD with OreDictionary.WILDCARD_VALUE

This commit is contained in:
mezz committed 2015-09-26 16:05:05 -07:00
1 parent 76b7ee6f50
commit 8b7d3e5d15
14 files changed
+42 -32

No files matched your search

@@ -23,6 +23,8 @@ import net.minecraft.village.MerchantRecipeList;
import net.minecraft.world.gen.structure.MapGenStructureIO;
import net.minecraft.world.gen.structure.StructureVillagePieces;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.registry.VillagerRegistry.IVillageCreationHandler;
import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler;
@@ -48,11 +50,11 @@ public class VillageHandlerApiculture implements IVillageCreationHandler, IVilla
@SuppressWarnings("unchecked")
@Override
public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) {
recipeList.add(new MerchantRecipe(ForestryItem.beePrincessGE.getItemStack(1, Constants.WILDCARD), new ItemStack(Items.emerald, 1)));
recipeList.add(new MerchantRecipe(ForestryItem.beePrincessGE.getItemStack(1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.emerald, 1)));
recipeList.add(new MerchantRecipe(new ItemStack(Items.wheat, 2), ItemHoneycomb.getRandomComb(1, random, false)));
recipeList.add(new MerchantRecipe(new ItemStack(Blocks.log, 24, Constants.WILDCARD), ForestryBlock.apiculture.getItemStack(1, Constants.DEFINITION_APIARY_META)));
recipeList.add(new MerchantRecipe(new ItemStack(Blocks.log, 24, OreDictionary.WILDCARD_VALUE), ForestryBlock.apiculture.getItemStack(1, Constants.DEFINITION_APIARY_META)));
recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 1), ForestryItem.frameProven.getItemStack(6)));
recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 12), ForestryItem.beePrincessGE.getItemStack(1, Constants.WILDCARD), BeeDefinition.MONASTIC.getMemberStack(EnumBeeType.DRONE)));
recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 12), ForestryItem.beePrincessGE.getItemStack(1, OreDictionary.WILDCARD_VALUE), BeeDefinition.MONASTIC.getMemberStack(EnumBeeType.DRONE)));
}
@Override
@@ -27,6 +27,8 @@ import net.minecraft.world.World;
import com.mojang.authlib.GameProfile;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.FMLCommonHandler;
import forestry.api.arboriculture.EnumGermlingType;
@@ -66,7 +68,7 @@ public class TreeHelper extends SpeciesRoot implements ITreeRoot {
private final ArrayList<ITreekeepingMode> treekeepingModes = new ArrayList<ITreekeepingMode>();
public TreeHelper() {
setResearchSuitability(new ItemStack(Blocks.sapling, 1, Constants.WILDCARD), 1.0f);
setResearchSuitability(new ItemStack(Blocks.sapling, 1, OreDictionary.WILDCARD_VALUE), 1.0f);
}
@Override
@@ -22,8 +22,6 @@ public class Constants implements IForestryConstants {
public static final String ID = MOD.toLowerCase(Locale.ENGLISH);
public static final String URL = "http://forestry.sengir.net/";
public static final int WILDCARD = OreDictionary.WILDCARD_VALUE;
public static final int WORLD_HEIGHT = 256;
public static final int FLAG_BLOCK_UPDATE = 1;
@@ -24,7 +24,6 @@ import net.minecraft.world.World;
import net.minecraftforge.oredict.OreDictionary;
import forestry.core.config.Constants;
import forestry.core.config.ForestryBlock;
import forestry.core.config.ForestryItem;
@@ -175,7 +174,7 @@ public class ShapedRecipeCustom implements IDescriptiveRecipe {
return false;
}
if (compare.getItemDamage() != Constants.WILDCARD && compare.getItemDamage() != resource.getItemDamage()) {
if (compare.getItemDamage() != OreDictionary.WILDCARD_VALUE && compare.getItemDamage() != resource.getItemDamage()) {
return false;
}
@@ -268,7 +267,7 @@ public class ShapedRecipeCustom implements IDescriptiveRecipe {
} else if (materials[index + 1] instanceof ForestryBlock) {
hashmap.put(character, ((ForestryBlock) materials[index + 1]).getItemStack());
} else if (materials[index + 1] instanceof Block) {
hashmap.put(character, new ItemStack((Block) materials[index + 1], 1, Constants.WILDCARD));
hashmap.put(character, new ItemStack((Block) materials[index + 1], 1, OreDictionary.WILDCARD_VALUE));
} else if (materials[index + 1] instanceof ItemStack) {
hashmap.put(character, materials[index + 1]);
} else if (materials[index + 1] instanceof String) {
@@ -25,8 +25,6 @@ import net.minecraft.world.World;
import net.minecraftforge.oredict.OreDictionary;
import forestry.core.config.Constants;
public abstract class ItemStackUtil {
public static final ItemStack[] EMPTY_STACK_ARRAY = new ItemStack[0];
@@ -43,7 +41,7 @@ public abstract class ItemStackUtil {
return false;
}
if (lhs.getItemDamage() != Constants.WILDCARD) {
if (lhs.getItemDamage() != OreDictionary.WILDCARD_VALUE) {
if (lhs.getItemDamage() != rhs.getItemDamage()) {
return false;
}
@@ -178,7 +176,7 @@ public abstract class ItemStackUtil {
return false;
}
if (base.getItemDamage() != Constants.WILDCARD) {
if (base.getItemDamage() != OreDictionary.WILDCARD_VALUE) {
if (base.getItemDamage() != comparison.getItemDamage()) {
return false;
}
@@ -22,11 +22,12 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraftforge.oredict.OreDictionary;
import forestry.api.farming.FarmDirection;
import forestry.api.farming.ICrop;
import forestry.api.farming.IFarmHousing;
import forestry.api.farming.IFarmable;
import forestry.core.config.Constants;
import forestry.core.utils.BlockUtil;
import forestry.core.utils.ItemStackUtil;
import forestry.core.utils.vect.IVect;
@@ -36,7 +37,7 @@ import forestry.core.utils.vect.VectUtil;
public abstract class FarmLogicCrops extends FarmLogicWatered {
private final Iterable<IFarmable> seeds;
private static final ItemStack farmland = new ItemStack(Blocks.farmland, 1, Constants.WILDCARD);
private static final ItemStack farmland = new ItemStack(Blocks.farmland, 1, OreDictionary.WILDCARD_VALUE);
protected FarmLogicCrops(IFarmHousing housing, Iterable<IFarmable> seeds) {
super(housing, new ItemStack(Blocks.dirt), new ItemStack(Blocks.farmland));
@@ -424,7 +424,7 @@ public class PluginCore extends ForestryPlugin {
Proxies.common.addRecipe(new ItemStack(Items.string), "#", "#", "#", '#', ForestryItem.craftingMaterial.getItemStack(1, 2));
// / Pipette
Proxies.common.addRecipe(ForestryItem.pipette.getItemStack(), " #", " X ", "X ", 'X', "paneGlass", '#', new ItemStack(Blocks.wool, 1, Constants.WILDCARD));
Proxies.common.addRecipe(ForestryItem.pipette.getItemStack(), " #", " X ", "X ", 'X', "paneGlass", '#', new ItemStack(Blocks.wool, 1, OreDictionary.WILDCARD_VALUE));
// Storage Blocks
Proxies.common.addRecipe(ForestryBlock.resourceStorage.getItemStack(1, 0), "###", "###", "###", '#', "gemApatite");
@@ -18,6 +18,7 @@ import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.network.IGuiHandler;
@@ -311,8 +312,8 @@ public class PluginFactory extends ForestryPlugin {
if (PluginManager.Module.APICULTURE.isEnabled()) {
FluidStack liquidGlass = Fluids.GLASS.getFluid(Constants.BUCKET_VOLUME);
for (int i = 0; i < 16; i++) {
RecipeManagers.fabricatorManager.addRecipe(ForestryItem.waxCast.getItemStack(1, Constants.WILDCARD), liquidGlass, new ItemStack(Blocks.stained_glass, 4, 15 - i), new Object[]{"#", "X", '#', dyes[i],
'X', ForestryItem.propolis.getItemStack(1, Constants.WILDCARD)});
RecipeManagers.fabricatorManager.addRecipe(ForestryItem.waxCast.getItemStack(1, OreDictionary.WILDCARD_VALUE), liquidGlass, new ItemStack(Blocks.stained_glass, 4, 15 - i), new Object[]{"#", "X", '#', dyes[i],
'X', ForestryItem.propolis.getItemStack(1, OreDictionary.WILDCARD_VALUE)});
}
}
@@ -17,6 +17,7 @@ import java.util.Locale;
import net.minecraft.block.material.Material;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.RecipeSorter;
import cpw.mods.fml.common.SidedProxy;
@@ -131,7 +132,7 @@ public class PluginLepidopterology extends ForestryPlugin {
"XYX",
"XXX",
'#', "blockGlass",
'X', ForestryItem.butterflyGE.getItemStack(1, Constants.WILDCARD),
'X', ForestryItem.butterflyGE.getItemStack(1, OreDictionary.WILDCARD_VALUE),
'Y', "chestWood"))
.setBoundingBox(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F));
definitionChest.register();
@@ -16,6 +16,8 @@ import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.registry.GameRegistry;
import forestry.api.farming.Farmables;
@@ -233,7 +235,7 @@ public class PluginMagicalCrops extends ForestryPlugin {
Item cropProduce = GameRegistry.findItem(MagCrop, MagCrop + "_CropProduce");
if (cropProduce != null) {
int juiceAmount = GameMode.getGameMode().getIntegerSetting("squeezer.liquid.apple");
ItemStack produce = new ItemStack(GameRegistry.findItem(MagCrop, MagCrop + "_CropProduce"), 1, Constants.WILDCARD);
ItemStack produce = new ItemStack(GameRegistry.findItem(MagCrop, MagCrop + "_CropProduce"), 1, OreDictionary.WILDCARD_VALUE);
RecipeUtil.addFermenterRecipes(produce, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{produce}, Fluids.JUICE.getFluid(juiceAmount));
}
@@ -15,6 +15,8 @@ import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.network.IGuiHandler;
import forestry.api.mail.EnumAddressee;
@@ -154,7 +156,7 @@ public class PluginMail extends ForestryPlugin {
Item stampGlue;
if (PluginManager.Module.APICULTURE.isEnabled()) {
Proxies.common.addShapelessRecipe(ForestryItem.letters.getItemStack(), Items.paper, ForestryItem.propolis.getItemStack(1, Constants.WILDCARD));
Proxies.common.addShapelessRecipe(ForestryItem.letters.getItemStack(), Items.paper, ForestryItem.propolis.getItemStack(1, OreDictionary.WILDCARD_VALUE));
stampGlue = ForestryItem.honeyDrop.item();
} else {
Proxies.common.addShapelessRecipe(ForestryItem.letters.getItemStack(), Items.paper, Items.slime_ball);
@@ -180,12 +182,12 @@ public class PluginMail extends ForestryPlugin {
}
// Recycling
Proxies.common.addRecipe(new ItemStack(Items.paper), "###", '#', ForestryItem.letters.getItemStack(1, Constants.WILDCARD));
Proxies.common.addRecipe(new ItemStack(Items.paper), "###", '#', ForestryItem.letters.getItemStack(1, OreDictionary.WILDCARD_VALUE));
// Carpenter
RecipeManagers.carpenterManager.addRecipe(10, Fluids.WATER.getFluid(250), null, ForestryItem.letters.getItemStack(), "###", "###", '#', ForestryItem.woodPulp);
Proxies.common.addShapelessRecipe(ForestryItem.catalogue.getItemStack(), ForestryItem.stamps.getItemStack(1, Constants.WILDCARD), new ItemStack(Items.book));
Proxies.common.addShapelessRecipe(ForestryItem.catalogue.getItemStack(), ForestryItem.stamps.getItemStack(1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.book));
}
@Override
@@ -18,6 +18,8 @@ import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.registry.GameData;
import cpw.mods.fml.common.registry.GameRegistry;
@@ -89,7 +91,7 @@ public class PluginNatura extends ForestryPlugin {
for (String key : saplingItemKeys) {
Item saplingItem = GameRegistry.findItem(NATURA, key);
ItemStack saplingWild = new ItemStack(saplingItem, 1, Constants.WILDCARD);
ItemStack saplingWild = new ItemStack(saplingItem, 1, OreDictionary.WILDCARD_VALUE);
RecipeUtil.addFermenterRecipes(saplingWild, GameMode.getGameMode().getIntegerSetting("fermenter.yield.sapling"), Fluids.BIOMASS);
String saplingName = GameData.getItemRegistry().getNameForObject(saplingItem);
@@ -314,7 +314,7 @@ public class PluginStorage extends ForestryPlugin {
digger.addValidOreDictNames(diggerOreDictNames);
digger.addValidItems(Arrays.asList(
new ItemStack(Blocks.dirt, 1, Constants.WILDCARD),
new ItemStack(Blocks.dirt, 1, OreDictionary.WILDCARD_VALUE),
new ItemStack(Blocks.gravel),
new ItemStack(Items.flint),
new ItemStack(Blocks.netherrack),
@@ -333,7 +333,7 @@ public class PluginStorage extends ForestryPlugin {
new ItemStack(Blocks.red_flower),
new ItemStack(Blocks.yellow_flower),
new ItemStack(Blocks.cactus),
new ItemStack(Blocks.tallgrass, 1, Constants.WILDCARD),
new ItemStack(Blocks.tallgrass, 1, OreDictionary.WILDCARD_VALUE),
new ItemStack(Blocks.vine),
new ItemStack(Blocks.pumpkin),
new ItemStack(Blocks.melon_block),
@@ -368,7 +368,7 @@ public class PluginStorage extends ForestryPlugin {
new ItemStack(Items.slime_ball),
new ItemStack(Items.dye, 1, 0),
new ItemStack(Blocks.hay_block),
new ItemStack(Blocks.wool, 1, Constants.WILDCARD),
new ItemStack(Blocks.wool, 1, OreDictionary.WILDCARD_VALUE),
new ItemStack(Items.ender_eye),
new ItemStack(Items.magma_cream),
new ItemStack(Items.speckled_melon),
@@ -388,13 +388,13 @@ public class PluginStorage extends ForestryPlugin {
new ItemStack(Blocks.torch),
new ItemStack(Blocks.redstone_torch),
new ItemStack(Blocks.redstone_lamp),
new ItemStack(Blocks.stonebrick, 1, Constants.WILDCARD),
new ItemStack(Blocks.stonebrick, 1, OreDictionary.WILDCARD_VALUE),
new ItemStack(Blocks.sandstone, 1, 1),
new ItemStack(Blocks.sandstone, 1, 2),
new ItemStack(Blocks.brick_block),
new ItemStack(Blocks.clay),
new ItemStack(Blocks.hardened_clay, 1, Constants.WILDCARD),
new ItemStack(Blocks.stained_hardened_clay, 1, Constants.WILDCARD),
new ItemStack(Blocks.hardened_clay, 1, OreDictionary.WILDCARD_VALUE),
new ItemStack(Blocks.stained_hardened_clay, 1, OreDictionary.WILDCARD_VALUE),
new ItemStack(Blocks.packed_ice),
new ItemStack(Blocks.nether_brick),
new ItemStack(Blocks.crafting_table),
@@ -404,7 +404,7 @@ public class PluginStorage extends ForestryPlugin {
new ItemStack(Blocks.dropper),
new ItemStack(Blocks.ladder),
new ItemStack(Blocks.iron_bars),
new ItemStack(Blocks.quartz_block, 1, Constants.WILDCARD),
new ItemStack(Blocks.quartz_block, 1, OreDictionary.WILDCARD_VALUE),
new ItemStack(Items.sign),
new ItemStack(Items.item_frame)
));
@@ -19,6 +19,8 @@ import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.registry.GameData;
import cpw.mods.fml.common.registry.GameRegistry;
@@ -72,7 +74,7 @@ public class PluginWitchery extends ForestryPlugin {
int seedamount = GameMode.getGameMode().getIntegerSetting("squeezer.liquid.seed");
Item saplingItem = GameRegistry.findItem(Witch, "witchsapling");
ItemStack saplingStack = new ItemStack(saplingItem, 1, Constants.WILDCARD);
ItemStack saplingStack = new ItemStack(saplingItem, 1, OreDictionary.WILDCARD_VALUE);
RecipeUtil.addFermenterRecipes(saplingStack, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
String saplingName = GameData.getItemRegistry().getNameForObject(saplingItem);
FMLInterModComms.sendMessage(Constants.MOD, "add-farmable-sapling", String.format("farmArboreal@%s.-1", saplingName));