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-09-10 03:48:34 +02:00
|
|
|
import com.pahimar.ee3.core.util.EnergyStack;
|
2013-08-23 16:59:50 +02:00
|
|
|
import com.pahimar.ee3.item.CustomWrappedStack;
|
|
|
|
|
|
|
|
public class EmcDefaultValues {
|
2013-10-07 03:50:43 +02:00
|
|
|
|
2013-09-10 03:48:34 +02:00
|
|
|
private static EmcDefaultValues defaultValues = null;
|
2013-10-06 04:46:29 +02:00
|
|
|
private Map<CustomWrappedStack, EmcValue> defaultValueMap;
|
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-06 04:46:29 +02:00
|
|
|
defaultValueMap = new HashMap<CustomWrappedStack, EmcValue>();
|
2013-09-10 03:48:34 +02:00
|
|
|
}
|
2013-10-07 03:50:43 +02:00
|
|
|
|
2013-09-10 03:48:34 +02:00
|
|
|
public static EmcDefaultValues getInstance() {
|
2013-10-07 03:50:43 +02:00
|
|
|
|
2013-09-10 03:48:34 +02:00
|
|
|
if (defaultValues == null) {
|
|
|
|
defaultValues = new EmcDefaultValues();
|
|
|
|
defaultValues.init();
|
|
|
|
}
|
2013-10-07 03:50:43 +02:00
|
|
|
|
2013-09-10 03:48:34 +02:00
|
|
|
return defaultValues;
|
|
|
|
}
|
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
|
|
|
|
|
|
|
defaultValueMap.put(new CustomWrappedStack(Block.cobblestone), new EmcValue(1, EmcComponent.CORPOREAL_UNIT_COMPONENT));
|
|
|
|
defaultValueMap.put(new CustomWrappedStack(Block.wood), new EmcValue(32, Arrays.asList(new EmcComponent(EmcType.CORPOREAL, 4), new EmcComponent(EmcType.ESSENTIA, 1))));
|
|
|
|
defaultValueMap.put(new CustomWrappedStack(Block.oreIron), new EmcValue(256, EmcComponent.CORPOREAL_UNIT_COMPONENT));
|
|
|
|
defaultValueMap.put(new CustomWrappedStack(Block.oreGold), new EmcValue(2048, EmcComponent.CORPOREAL_UNIT_COMPONENT));
|
|
|
|
defaultValueMap.put(new CustomWrappedStack(Block.oreDiamond), new EmcValue(8192, EmcComponent.CORPOREAL_UNIT_COMPONENT));
|
|
|
|
defaultValueMap.put(new CustomWrappedStack(Block.oreCoal), new EmcValue(32, Arrays.asList(new EmcComponent(EmcType.CORPOREAL, 4), new EmcComponent(EmcType.KINETIC, 1))));
|
|
|
|
|
|
|
|
defaultValueMap.put(new CustomWrappedStack(new EnergyStack(EnergyStack.VANILLA_SMELTING_ENERGY_NAME)), new EmcValue(defaultValueMap.get(new CustomWrappedStack(Block.oreCoal)).getComponentValueByType(EmcType.KINETIC) / (8 * EnergyStack.VANILLA_SMELTING_ENERGY_THRESHOLD), EmcComponent.KINETIC_UNIT_COMPONENT));
|
2013-09-10 03:48:34 +02:00
|
|
|
}
|
2013-10-07 03:50:43 +02:00
|
|
|
|
2013-10-06 04:46:29 +02:00
|
|
|
public Map<CustomWrappedStack, EmcValue> getDefaultValueMap() {
|
2013-10-07 03:50:43 +02:00
|
|
|
|
2013-09-10 03:48:34 +02:00
|
|
|
return defaultValueMap;
|
2013-08-23 16:59:50 +02:00
|
|
|
}
|
|
|
|
}
|