Fixed Bug in ExNihilo recipe handlers
This commit is contained in:
parent
3d71e17b66
commit
3c7d6c120e
|
@ -83,7 +83,7 @@ public class Hammer {
|
||||||
for(Entry<ItemInfo, ArrayList<Smashable>> entry : recipes.entrySet()) {
|
for(Entry<ItemInfo, ArrayList<Smashable>> entry : recipes.entrySet()) {
|
||||||
if(!map.containsKey(entry.getKey())) {
|
if(!map.containsKey(entry.getKey())) {
|
||||||
// no recipe for input available, add new entry
|
// no recipe for input available, add new entry
|
||||||
map.put(entry.getKey(), entry.getValue());
|
map.put(entry.getKey(), new ArrayList<Smashable>(entry.getValue()));
|
||||||
} else {
|
} else {
|
||||||
// recipes already available, add to present list
|
// recipes already available, add to present list
|
||||||
ArrayList<Smashable> list = map.get(entry.getKey());
|
ArrayList<Smashable> list = map.get(entry.getKey());
|
||||||
|
@ -216,7 +216,7 @@ public class Hammer {
|
||||||
public void undo() {
|
public void undo() {
|
||||||
for(Entry<ItemInfo, ArrayList<Smashable>> entry : successful.entrySet()) {
|
for(Entry<ItemInfo, ArrayList<Smashable>> entry : successful.entrySet()) {
|
||||||
if(!map.containsKey(entry.getKey())) {
|
if(!map.containsKey(entry.getKey())) {
|
||||||
map.put(entry.getKey(), entry.getValue());
|
map.put(entry.getKey(), new ArrayList<Smashable>(entry.getValue()));
|
||||||
} else {
|
} else {
|
||||||
map.get(entry.getKey()).addAll(entry.getValue());
|
map.get(entry.getKey()).addAll(entry.getValue());
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ public class Sieve {
|
||||||
for(Entry<ItemInfo, ArrayList<SiftingResult>> entry : recipes.entrySet()) {
|
for(Entry<ItemInfo, ArrayList<SiftingResult>> entry : recipes.entrySet()) {
|
||||||
if(!map.containsKey(entry.getKey())) {
|
if(!map.containsKey(entry.getKey())) {
|
||||||
// no recipe for input available, add new entry
|
// no recipe for input available, add new entry
|
||||||
map.put(entry.getKey(), entry.getValue());
|
map.put(entry.getKey(), new ArrayList<SiftingResult>(entry.getValue()));
|
||||||
} else {
|
} else {
|
||||||
// recipes already available, add to present list
|
// recipes already available, add to present list
|
||||||
ArrayList<SiftingResult> list = map.get(entry.getKey());
|
ArrayList<SiftingResult> list = map.get(entry.getKey());
|
||||||
|
@ -233,7 +233,7 @@ public class Sieve {
|
||||||
public void undo() {
|
public void undo() {
|
||||||
for(Entry<ItemInfo, ArrayList<SiftingResult>> entry : successful.entrySet()) {
|
for(Entry<ItemInfo, ArrayList<SiftingResult>> entry : successful.entrySet()) {
|
||||||
if(!map.containsKey(entry.getKey())) {
|
if(!map.containsKey(entry.getKey())) {
|
||||||
map.put(entry.getKey(), entry.getValue());
|
map.put(entry.getKey(), new ArrayList<SiftingResult>(entry.getValue()));
|
||||||
} else {
|
} else {
|
||||||
map.get(entry.getKey()).addAll(entry.getValue());
|
map.get(entry.getKey()).addAll(entry.getValue());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue