47 lines
1.9 KiB
Java
47 lines
1.9 KiB
Java
package com.pahimar.ee3.emc;
|
|
|
|
import java.util.Arrays;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
import net.minecraft.block.Block;
|
|
|
|
import com.pahimar.ee3.item.CustomWrappedStack;
|
|
import com.pahimar.ee3.item.EnergyStack;
|
|
|
|
public class EmcDefaultValues {
|
|
|
|
private static EmcDefaultValues emcDefaultValues = null;
|
|
private Map<CustomWrappedStack, EmcValue> valueMap;
|
|
|
|
private EmcDefaultValues() {
|
|
|
|
valueMap = new HashMap<CustomWrappedStack, EmcValue>();
|
|
}
|
|
|
|
private static void lazyInit() {
|
|
|
|
if (emcDefaultValues == null) {
|
|
emcDefaultValues = new EmcDefaultValues();
|
|
emcDefaultValues.init();
|
|
}
|
|
}
|
|
|
|
private void init() {
|
|
|
|
valueMap.put(new CustomWrappedStack(Block.cobblestone), new EmcValue(1, EmcComponent.CORPOREAL_UNIT_COMPONENT));
|
|
valueMap.put(new CustomWrappedStack(Block.wood), new EmcValue(32, Arrays.asList(new EmcComponent(EmcType.CORPOREAL, 4), new EmcComponent(EmcType.ESSENTIA, 1))));
|
|
valueMap.put(new CustomWrappedStack(Block.oreIron), new EmcValue(256, EmcComponent.CORPOREAL_UNIT_COMPONENT));
|
|
valueMap.put(new CustomWrappedStack(Block.oreGold), new EmcValue(2048, EmcComponent.CORPOREAL_UNIT_COMPONENT));
|
|
valueMap.put(new CustomWrappedStack(Block.oreDiamond), new EmcValue(8192, EmcComponent.CORPOREAL_UNIT_COMPONENT));
|
|
valueMap.put(new CustomWrappedStack(Block.oreCoal), new EmcValue(32, Arrays.asList(new EmcComponent(EmcType.CORPOREAL, 4), new EmcComponent(EmcType.KINETIC, 1))));
|
|
|
|
valueMap.put(new CustomWrappedStack(new EnergyStack(EnergyStack.VANILLA_SMELTING_ENERGY_NAME)), new EmcValue(valueMap.get(new CustomWrappedStack(Block.oreCoal)).getComponentValueByType(EmcType.KINETIC) / (8 * EnergyStack.VANILLA_SMELTING_ENERGY_THRESHOLD), EmcComponent.KINETIC_UNIT_COMPONENT));
|
|
}
|
|
|
|
public static Map<CustomWrappedStack, EmcValue> getDefaultValueMap() {
|
|
|
|
lazyInit();
|
|
return emcDefaultValues.valueMap;
|
|
}
|
|
}
|