mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-19 23:19:19 +00:00
check enable state of fertilized pots
This commit is contained in:
@@ -372,14 +372,16 @@ public abstract class ConfigManager implements ConfigLoader, Reloadable {
|
|||||||
public HashMap<FertilizerType, Pair<String, String>> getFertilizedPotMap(Section section) {
|
public HashMap<FertilizerType, Pair<String, String>> getFertilizedPotMap(Section section) {
|
||||||
HashMap<FertilizerType, Pair<String, String>> map = new HashMap<>();
|
HashMap<FertilizerType, Pair<String, String>> map = new HashMap<>();
|
||||||
if (section != null) {
|
if (section != null) {
|
||||||
for (Map.Entry<String, Object> entry : section.getStringRouteMappedValues(false).entrySet()) {
|
if (section.getBoolean("enable")) {
|
||||||
if (entry.getValue() instanceof Section innerSection) {
|
for (Map.Entry<String, Object> entry : section.getStringRouteMappedValues(false).entrySet()) {
|
||||||
FertilizerType type = Registries.FERTILIZER_TYPE.get(entry.getKey().replace("-", "_"));
|
if (entry.getValue() instanceof Section innerSection) {
|
||||||
if (type != null) {
|
FertilizerType type = Registries.FERTILIZER_TYPE.get(entry.getKey().replace("-", "_"));
|
||||||
map.put(type, Pair.of(
|
if (type != null) {
|
||||||
Preconditions.checkNotNull(innerSection.getString("dry"), entry.getKey() + ".dry should not be null"),
|
map.put(type, Pair.of(
|
||||||
Preconditions.checkNotNull(innerSection.getString("wet"), entry.getKey() + ".wet should not be null")
|
Preconditions.checkNotNull(innerSection.getString("dry"), entry.getKey() + ".dry should not be null"),
|
||||||
));
|
Preconditions.checkNotNull(innerSection.getString("wet"), entry.getKey() + ".wet should not be null")
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user