aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/shcm/shsupercm/fabric/citresewn/api/CITGlobalProperties.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/shcm/shsupercm/fabric/citresewn/api/CITGlobalProperties.java')
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/api/CITGlobalProperties.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/api/CITGlobalProperties.java b/src/main/java/shcm/shsupercm/fabric/citresewn/api/CITGlobalProperties.java
index ada5147..a3d78ae 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/api/CITGlobalProperties.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/api/CITGlobalProperties.java
@@ -2,9 +2,24 @@ package shcm.shsupercm.fabric.citresewn.api;
import shcm.shsupercm.fabric.citresewn.pack.format.PropertyValue;
+/**
+ * @see #globalProperty(String, PropertyValue)
+ */
@FunctionalInterface
public interface CITGlobalProperties {
+ /**
+ * Entrypoint for handlers of global properties.
+ * @see #globalProperty(String, PropertyValue)
+ */
String ENTRYPOINT = "citresewn:global_property";
+ /**
+ * Invoked before CIT parsing for any global property name associated with the handler's modid.<br>
+ * May be called multiple times for a key to overwrite its global property with higher-priority resourcepacks.<br>
+ * Handlers should take care to reset back any changes global properties make by listening to CIT disposal.
+ * @see CITDisposable#dispose()
+ * @param key name of the property key stripped of its modid
+ * @param value the value it's been set to
+ */
void globalProperty(String key, PropertyValue value) throws Exception;
}