Custom data getter

This commit is contained in:
paulevsGitch 2021-06-07 13:41:38 +03:00
parent a2a3671d20
commit 0f012d0886
2 changed files with 6 additions and 1 deletions

View file

@ -8,7 +8,7 @@ yarn_mappings=6
loader_version=0.11.3 loader_version=0.11.3
# Mod Properties # Mod Properties
mod_version = 0.1.22 mod_version = 0.1.23
maven_group = ru.bclib maven_group = ru.bclib
archives_base_name = bclib archives_base_name = bclib

View file

@ -377,6 +377,11 @@ public class BCLBiomeDef {
customData.put(name, value); customData.put(name, value);
} }
@SuppressWarnings("unchecked")
public <T> T getCustomData(String name, Object defaultValue) {
return (T) customData.getOrDefault(name, defaultValue);
}
protected Map<String, Object> getCustomData() { protected Map<String, Object> getCustomData() {
return customData; return customData;
} }