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

@ -377,6 +377,11 @@ public class BCLBiomeDef {
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() {
return customData;
}