aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSHsuperCM <shsupercm@gmail.com>2022-02-06 05:36:23 +0200
committerSHsuperCM <shsupercm@gmail.com>2022-02-06 05:36:23 +0200
commit31a31ef5a357bbf180ef9e438771cc8623317194 (patch)
tree7cb742e214007f9d00cc6de92565f8ef44e4fc1b /src
parent2a2ccd535ece8529b4c93922261d8ecbfe421b9e (diff)
downloadCITResewn-31a31ef5a357bbf180ef9e438771cc8623317194.tar.gz
CITResewn-31a31ef5a357bbf180ef9e438771cc8623317194.tar.bz2
CITResewn-31a31ef5a357bbf180ef9e438771cc8623317194.zip
Started runtime CIT structure
Diffstat (limited to 'src')
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/mixin/ModelLoaderMixin.java2
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/ActiveCITs.java (renamed from src/main/java/shcm/shsupercm/fabric/citresewn/pack/ActiveCITs.java)4
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CIT.java17
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CITCondition.java9
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CITContext.java4
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CITType.java4
6 files changed, 38 insertions, 2 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/ModelLoaderMixin.java b/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/ModelLoaderMixin.java
index f8b2979..e5e000d 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/ModelLoaderMixin.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/ModelLoaderMixin.java
@@ -8,7 +8,7 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import shcm.shsupercm.fabric.citresewn.pack.ActiveCITs;
+import shcm.shsupercm.fabric.citresewn.pack.cit.ActiveCITs;
@Mixin(ModelLoader.class)
public class ModelLoaderMixin {
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/ActiveCITs.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/ActiveCITs.java
index 642b950..f8df1ee 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/ActiveCITs.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/ActiveCITs.java
@@ -1,9 +1,11 @@
-package shcm.shsupercm.fabric.citresewn.pack;
+package shcm.shsupercm.fabric.citresewn.pack.cit;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.resource.ResourceManager;
import net.minecraft.util.profiler.Profiler;
import shcm.shsupercm.fabric.citresewn.api.Disposable;
+import shcm.shsupercm.fabric.citresewn.pack.GlobalProperties;
+import shcm.shsupercm.fabric.citresewn.pack.PackParser;
public class ActiveCITs implements Disposable { private ActiveCITs() {}
private static ActiveCITs active = null;
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CIT.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CIT.java
new file mode 100644
index 0000000..ee293ce
--- /dev/null
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CIT.java
@@ -0,0 +1,17 @@
+package shcm.shsupercm.fabric.citresewn.pack.cit;
+
+import net.minecraft.util.Identifier;
+
+public class CIT {
+ private final Identifier propertiesIdentifier;
+ private final String packName;
+ private final CITType type;
+ private final CITCondition[] conditions;
+
+ public CIT(Identifier propertiesIdentifier, String packName, CITType type, CITCondition[] conditions) {
+ this.propertiesIdentifier = propertiesIdentifier;
+ this.packName = packName;
+ this.type = type;
+ this.conditions = conditions;
+ }
+}
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CITCondition.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CITCondition.java
new file mode 100644
index 0000000..736afac
--- /dev/null
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CITCondition.java
@@ -0,0 +1,9 @@
+package shcm.shsupercm.fabric.citresewn.pack.cit;
+
+import shcm.shsupercm.fabric.citresewn.pack.format.PropertyValue;
+
+public abstract class CITCondition {
+ public abstract void load(String keyMetadata, PropertyValue value) throws Exception;
+
+ public abstract boolean test(CITContext context);
+}
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CITContext.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CITContext.java
new file mode 100644
index 0000000..a4e0d11
--- /dev/null
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CITContext.java
@@ -0,0 +1,4 @@
+package shcm.shsupercm.fabric.citresewn.pack.cit;
+
+public record CITContext() {
+}
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CITType.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CITType.java
new file mode 100644
index 0000000..c10e29f
--- /dev/null
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CITType.java
@@ -0,0 +1,4 @@
+package shcm.shsupercm.fabric.citresewn.pack.cit;
+
+public abstract class CITType {
+}