2013-08-23 16:59:50 +02:00
|
|
|
package com.pahimar.ee3.emc;
|
|
|
|
|
2013-10-07 03:50:43 +02:00
|
|
|
import java.util.Arrays;
|
2013-10-06 04:46:29 +02:00
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.Map;
|
2013-08-23 16:59:50 +02:00
|
|
|
|
2013-10-07 03:50:43 +02:00
|
|
|
import net.minecraft.block.Block;
|
2013-10-21 00:30:15 +02:00
|
|
|
import net.minecraft.item.Item;
|
2013-10-18 07:23:11 +02:00
|
|
|
import net.minecraft.item.ItemStack;
|
2013-10-21 00:30:15 +02:00
|
|
|
import net.minecraftforge.oredict.OreDictionary;
|
2013-10-07 03:50:43 +02:00
|
|
|
|
2013-08-23 16:59:50 +02:00
|
|
|
import com.pahimar.ee3.item.CustomWrappedStack;
|
2013-10-21 00:30:15 +02:00
|
|
|
import com.pahimar.ee3.item.OreStack;
|
2013-08-23 16:59:50 +02:00
|
|
|
|
|
|
|
public class EmcDefaultValues {
|
2013-10-07 03:50:43 +02:00
|
|
|
|
2013-10-17 04:27:07 +02:00
|
|
|
private static EmcDefaultValues emcDefaultValues = null;
|
|
|
|
private Map<CustomWrappedStack, EmcValue> valueMap;
|
2013-08-23 16:59:50 +02:00
|
|
|
|
2013-09-10 03:48:34 +02:00
|
|
|
private EmcDefaultValues() {
|
2013-10-07 03:50:43 +02:00
|
|
|
|
2013-10-17 04:27:07 +02:00
|
|
|
valueMap = new HashMap<CustomWrappedStack, EmcValue>();
|
2013-09-10 03:48:34 +02:00
|
|
|
}
|
2013-10-07 03:50:43 +02:00
|
|
|
|
2013-10-17 04:27:07 +02:00
|
|
|
private static void lazyInit() {
|
2013-10-07 03:50:43 +02:00
|
|
|
|
2013-10-17 04:27:07 +02:00
|
|
|
if (emcDefaultValues == null) {
|
|
|
|
emcDefaultValues = new EmcDefaultValues();
|
|
|
|
emcDefaultValues.init();
|
2013-09-10 03:48:34 +02:00
|
|
|
}
|
|
|
|
}
|
2013-10-07 03:50:43 +02:00
|
|
|
|
2013-09-10 03:48:34 +02:00
|
|
|
private void init() {
|
2013-10-07 03:50:43 +02:00
|
|
|
|
2013-10-28 00:55:53 +01:00
|
|
|
valueMap.put(new CustomWrappedStack(Block.stone), new EmcValue(1));
|
|
|
|
valueMap.put(new CustomWrappedStack(new OreStack(new ItemStack(Block.stone))), new EmcValue(1));
|
2013-10-27 22:42:29 +01:00
|
|
|
valueMap.put(new CustomWrappedStack(Block.waterStill), new EmcValue(0.1f, Arrays.asList(new EmcComponent(EmcType.CORPOREAL, 9), new EmcComponent(EmcType.AMORPHOUS, 1))));
|
2013-10-26 02:40:13 +02:00
|
|
|
valueMap.put(new CustomWrappedStack(Block.grass), new EmcValue(1, Arrays.asList(new EmcComponent(EmcType.CORPOREAL, 9), new EmcComponent(EmcType.ESSENTIA, 1))));
|
2013-10-28 00:55:53 +01:00
|
|
|
valueMap.put(new CustomWrappedStack(Block.dirt), new EmcValue(1));
|
|
|
|
valueMap.put(new CustomWrappedStack(new OreStack(new ItemStack(Block.cobblestone))), new EmcValue(1));
|
2013-10-27 22:42:29 +01:00
|
|
|
valueMap.put(new CustomWrappedStack(new ItemStack(Block.sand.blockID, 1, OreDictionary.WILDCARD_VALUE)), new EmcValue(1, Arrays.asList(new EmcComponent(EmcType.CORPOREAL, 9), new EmcComponent(EmcType.AMORPHOUS, 1))));
|
2013-10-26 02:40:13 +02:00
|
|
|
valueMap.put(new CustomWrappedStack(Block.leaves), new EmcValue(1, Arrays.asList(new EmcComponent(EmcType.CORPOREAL, 9), new EmcComponent(EmcType.ESSENTIA, 1))));
|
2013-10-28 00:55:53 +01:00
|
|
|
valueMap.put(new CustomWrappedStack(Block.glass), new EmcValue(1));
|
|
|
|
valueMap.put(new CustomWrappedStack(new ItemStack(Block.glass.blockID, 1, OreDictionary.WILDCARD_VALUE)), new EmcValue(1));
|
2013-10-26 02:40:13 +02:00
|
|
|
valueMap.put(new CustomWrappedStack(Block.tallGrass), new EmcValue(1, Arrays.asList(new EmcComponent(EmcType.CORPOREAL, 9), new EmcComponent(EmcType.ESSENTIA, 1))));
|
2013-10-27 22:42:29 +01:00
|
|
|
valueMap.put(new CustomWrappedStack(new ItemStack(Block.tallGrass.blockID, 1, OreDictionary.WILDCARD_VALUE)), new EmcValue(1, Arrays.asList(new EmcComponent(EmcType.CORPOREAL, 9), new EmcComponent(EmcType.ESSENTIA, 1))));
|
2013-10-28 00:55:53 +01:00
|
|
|
valueMap.put(new CustomWrappedStack(Block.deadBush), new EmcValue(1));
|
|
|
|
valueMap.put(new CustomWrappedStack(Block.ice), new EmcValue(1));
|
2013-10-27 22:42:29 +01:00
|
|
|
valueMap.put(new CustomWrappedStack(new ItemStack(Block.sandStone.blockID, 1, OreDictionary.WILDCARD_VALUE)), new EmcValue(4, EmcType.CORPOREAL));
|
2013-10-26 02:40:13 +02:00
|
|
|
valueMap.put(new CustomWrappedStack(new OreStack(new ItemStack(Block.wood))), new EmcValue(32, Arrays.asList(new EmcComponent(EmcType.CORPOREAL, 4), new EmcComponent(EmcType.ESSENTIA, 1))));
|
2013-10-28 00:55:53 +01:00
|
|
|
valueMap.put(new CustomWrappedStack(new OreStack(new ItemStack(Block.planks))), new EmcValue(8));
|
|
|
|
valueMap.put(new CustomWrappedStack(new OreStack(new ItemStack(Item.stick))), new EmcValue(4));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.ingotIron), new EmcValue(256));
|
|
|
|
valueMap.put(new CustomWrappedStack(Block.oreIron), new EmcValue(256));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.ingotGold), new EmcValue(2048));
|
|
|
|
valueMap.put(new CustomWrappedStack(Block.oreGold), new EmcValue(2048));
|
|
|
|
valueMap.put(new CustomWrappedStack(Block.oreDiamond), new EmcValue(8192));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.diamond), new EmcValue(8192));
|
2013-10-17 04:27:07 +02:00
|
|
|
valueMap.put(new CustomWrappedStack(Block.oreCoal), new EmcValue(32, Arrays.asList(new EmcComponent(EmcType.CORPOREAL, 4), new EmcComponent(EmcType.KINETIC, 1))));
|
2013-10-28 00:55:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.silk), new EmcValue(12));
|
|
|
|
valueMap.put(new CustomWrappedStack(new ItemStack(Block.cloth.blockID, 1, OreDictionary.WILDCARD_VALUE)), new EmcValue(48));
|
2013-10-27 22:42:29 +01:00
|
|
|
valueMap.put(new CustomWrappedStack(Block.gravel), new EmcValue(4, Arrays.asList(new EmcComponent(EmcType.CORPOREAL, 9), new EmcComponent(EmcType.AMORPHOUS, 1))));
|
|
|
|
|
2013-10-28 00:55:53 +01:00
|
|
|
valueMap.put(new CustomWrappedStack(Item.reed), new EmcValue(32));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.redstone), new EmcValue(32));
|
|
|
|
valueMap.put(new CustomWrappedStack(Block.oreRedstone), new EmcValue(32));
|
|
|
|
valueMap.put(new CustomWrappedStack(Block.oreRedstoneGlowing), new EmcValue(32));
|
2013-10-27 22:42:29 +01:00
|
|
|
|
2013-10-28 00:55:53 +01:00
|
|
|
valueMap.put(new CustomWrappedStack(Item.clay), new EmcValue(64));
|
2013-10-27 22:42:29 +01:00
|
|
|
|
2013-10-28 00:55:53 +01:00
|
|
|
valueMap.put(new CustomWrappedStack(Block.mushroomBrown), new EmcValue(32));
|
|
|
|
valueMap.put(new CustomWrappedStack(Block.mushroomRed), new EmcValue(32));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.blazeRod), new EmcValue(1536));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.slimeBall), new EmcValue(24));
|
2013-10-27 22:42:29 +01:00
|
|
|
|
2013-10-28 00:55:53 +01:00
|
|
|
// Foodstuffs
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.appleRed), new EmcValue(128));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.porkRaw), new EmcValue(64));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.porkCooked), new EmcValue(64));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.fishRaw), new EmcValue(64));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.fishCooked), new EmcValue(64));
|
|
|
|
// Cake
|
|
|
|
// Cookie
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.melon), new EmcValue(16));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.beefRaw), new EmcValue(64));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.beefCooked), new EmcValue(64));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.chickenRaw), new EmcValue(64));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.chickenCooked), new EmcValue(64));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.rottenFlesh), new EmcValue(24));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.spiderEye), new EmcValue(128));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.carrot), new EmcValue(24));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.potato), new EmcValue(24));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.bakedPotato), new EmcValue(64));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.poisonousPotato), new EmcValue(24));
|
|
|
|
|
|
|
|
// Brewing
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.ghastTear), new EmcValue(4096));
|
|
|
|
|
|
|
|
// Materials
|
|
|
|
valueMap.put(new CustomWrappedStack(new ItemStack(Item.coal, 1, 0)), new EmcValue(32));
|
|
|
|
valueMap.put(new CustomWrappedStack(new ItemStack(Item.coal, 1, 1)), new EmcValue(32));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.feather), new EmcValue(48));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.gunpowder), new EmcValue(192));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.seeds), new EmcValue(16));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.flint), new EmcValue(4));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.leather), new EmcValue(64));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.brick), new EmcValue(64));
|
|
|
|
for (int meta = 0; meta < 16; meta++) {
|
|
|
|
valueMap.put(new CustomWrappedStack(new OreStack(new ItemStack(Item.dyePowder, 1, meta))), new EmcValue(8));
|
|
|
|
}
|
|
|
|
valueMap.put(new CustomWrappedStack(new ItemStack(Item.dyePowder, 1, 4)), new EmcValue(864));
|
|
|
|
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.netherStalkSeeds), new EmcValue(24));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.wheat), new EmcValue(24));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.glowstone), new EmcValue(384));
|
|
|
|
valueMap.put(new CustomWrappedStack(Item.egg), new EmcValue(32));
|
2013-09-10 03:48:34 +02:00
|
|
|
}
|
2013-10-07 03:50:43 +02:00
|
|
|
|
2013-10-17 04:27:07 +02:00
|
|
|
public static Map<CustomWrappedStack, EmcValue> getDefaultValueMap() {
|
2013-10-07 03:50:43 +02:00
|
|
|
|
2013-10-17 04:27:07 +02:00
|
|
|
lazyInit();
|
|
|
|
return emcDefaultValues.valueMap;
|
2013-08-23 16:59:50 +02:00
|
|
|
}
|
|
|
|
}
|