Fix some whitespace issues, and some renames for EMC types
This commit is contained in:
parent
eeadd08ef0
commit
e666b0f546
3 changed files with 24 additions and 29 deletions
|
@ -9,7 +9,7 @@ public class EMCEntry {
|
|||
private float cost, recoveryPercentage;
|
||||
private boolean learnable, recoverable;
|
||||
private Map<EMCType, Float> breakdown;
|
||||
|
||||
|
||||
public EMCEntry(float cost) {
|
||||
this.cost = cost;
|
||||
recoveryPercentage = 1F;
|
||||
|
@ -17,67 +17,68 @@ public class EMCEntry {
|
|||
recoverable = true;
|
||||
breakdown = Collections.synchronizedMap(new HashMap<EMCType, Float>());
|
||||
}
|
||||
|
||||
public EMCEntry(float cost, float recoveryPercentage, boolean learnable, boolean recoverable) {
|
||||
|
||||
public EMCEntry(float cost, float recoveryPercentage, boolean learnable,
|
||||
boolean recoverable) {
|
||||
this.cost = cost;
|
||||
this.recoveryPercentage = recoveryPercentage;
|
||||
this.learnable = learnable;
|
||||
this.recoverable = recoverable;
|
||||
breakdown = Collections.synchronizedMap(new HashMap<EMCType, Float>());
|
||||
}
|
||||
|
||||
|
||||
public float getCost() {
|
||||
return cost;
|
||||
}
|
||||
|
||||
|
||||
public float getRecoveryPercentage() {
|
||||
return recoveryPercentage;
|
||||
}
|
||||
|
||||
|
||||
public boolean isLearnable() {
|
||||
return learnable;
|
||||
}
|
||||
|
||||
|
||||
public boolean isRecoverable() {
|
||||
return recoverable;
|
||||
}
|
||||
|
||||
|
||||
public Map<EMCType, Float> getEMCBreakDown() {
|
||||
return breakdown;
|
||||
}
|
||||
|
||||
|
||||
public float getEMCBreakdownByType(EMCType emcType) {
|
||||
if (breakdown.containsKey(emcType)) {
|
||||
if (breakdown.get(emcType) != null) {
|
||||
return breakdown.get(emcType).floatValue();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return -1F;
|
||||
}
|
||||
|
||||
|
||||
public void setCost(float cost) {
|
||||
this.cost = cost;
|
||||
}
|
||||
|
||||
|
||||
public void setRecoveryPercentage(float recoveryPercentage) {
|
||||
this.recoveryPercentage = recoveryPercentage;
|
||||
}
|
||||
|
||||
|
||||
public void setLearnable(boolean learnable) {
|
||||
this.learnable = learnable;
|
||||
}
|
||||
|
||||
|
||||
public void setRecoverable(boolean recoverable) {
|
||||
this.recoverable = recoverable;
|
||||
}
|
||||
|
||||
|
||||
public void addEMCBreakDown(EMCType emcType, Float breakdownPercentage) {
|
||||
if (!(breakdown.containsKey(emcType))) {
|
||||
if (!(breakdown.containsKey(emcType))) {
|
||||
breakdown.put(emcType, breakdownPercentage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void setEMCBreakDown(EMCType emcType, Float breakdownPercentage) {
|
||||
if (breakdown.containsKey(emcType)) {
|
||||
breakdown.put(emcType, breakdownPercentage);
|
||||
|
|
|
@ -8,16 +8,16 @@ import net.minecraft.src.ItemStack;
|
|||
public class EMCRegistry {
|
||||
|
||||
private static final EMCRegistry emcRegistry = new EMCRegistry();
|
||||
|
||||
|
||||
private HashMap<Integer, HashMap<Integer, EMCEntry>> emcMap = new HashMap<Integer, HashMap<Integer, EMCEntry>>();
|
||||
|
||||
|
||||
public EMCRegistry instance() {
|
||||
return emcRegistry;
|
||||
}
|
||||
|
||||
|
||||
public EMCEntry getEMCEntry(ItemStack item) {
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
package ee3.common.emc;
|
||||
|
||||
public enum EMCType {
|
||||
WATER,
|
||||
EARTH,
|
||||
FIRE,
|
||||
AIR,
|
||||
VOID,
|
||||
BLOOD,
|
||||
PURE
|
||||
FLUID, TERRA, FERVOR, HEAVENLY, VOID, BLOOD, PURE
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue