mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-20 15:39:21 +00:00
check enable state of fertilized pots
This commit is contained in:
@@ -372,6 +372,7 @@ 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) {
|
||||||
|
if (section.getBoolean("enable")) {
|
||||||
for (Map.Entry<String, Object> entry : section.getStringRouteMappedValues(false).entrySet()) {
|
for (Map.Entry<String, Object> entry : section.getStringRouteMappedValues(false).entrySet()) {
|
||||||
if (entry.getValue() instanceof Section innerSection) {
|
if (entry.getValue() instanceof Section innerSection) {
|
||||||
FertilizerType type = Registries.FERTILIZER_TYPE.get(entry.getKey().replace("-", "_"));
|
FertilizerType type = Registries.FERTILIZER_TYPE.get(entry.getKey().replace("-", "_"));
|
||||||
@@ -384,6 +385,7 @@ public abstract class ConfigManager implements ConfigLoader, Reloadable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user