aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/shcm
diff options
context:
space:
mode:
authorSHsuperCM <shsupercm@gmail.com>2022-02-05 08:32:41 +0200
committerSHsuperCM <shsupercm@gmail.com>2022-02-05 09:03:44 +0200
commitfcd73195b483075c962986994f32dc53dd2f91cd (patch)
tree60dcdb4fae0314fb4a9fbfb7dece0edbd3eeae5b /src/main/java/shcm
parent1a9e72178881ca41321c730eb69ce28f0b6ad171 (diff)
downloadCITResewn-fcd73195b483075c962986994f32dc53dd2f91cd.tar.gz
CITResewn-fcd73195b483075c962986994f32dc53dd2f91cd.tar.bz2
CITResewn-fcd73195b483075c962986994f32dc53dd2f91cd.zip
Moved some stuff around
Diffstat (limited to 'src/main/java/shcm')
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/api/Disposable.java (renamed from src/main/java/shcm/shsupercm/fabric/citresewn/util/Disposable.java)2
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/api/GlobalPropertiesHandler.java10
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/mixin/ModelLoaderMixin.java2
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/ActiveCITs.java2
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/GlobalProperties.java16
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertiesGroupAdapter.java (renamed from src/main/java/shcm/shsupercm/fabric/citresewn/format/PropertiesGroupAdapter.java)2
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertyGroup.java (renamed from src/main/java/shcm/shsupercm/fabric/citresewn/format/PropertyGroup.java)2
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertyKey.java (renamed from src/main/java/shcm/shsupercm/fabric/citresewn/format/PropertyKey.java)2
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertyValue.java (renamed from src/main/java/shcm/shsupercm/fabric/citresewn/format/PropertyValue.java)2
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/registry/api/GlobalPropertiesHandler.java10
10 files changed, 25 insertions, 25 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/util/Disposable.java b/src/main/java/shcm/shsupercm/fabric/citresewn/api/Disposable.java
index 7878e16..85b8849 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/util/Disposable.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/api/Disposable.java
@@ -1,4 +1,4 @@
-package shcm.shsupercm.fabric.citresewn.util;
+package shcm.shsupercm.fabric.citresewn.api;
@FunctionalInterface
public interface Disposable {
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/api/GlobalPropertiesHandler.java b/src/main/java/shcm/shsupercm/fabric/citresewn/api/GlobalPropertiesHandler.java
new file mode 100644
index 0000000..9955823
--- /dev/null
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/api/GlobalPropertiesHandler.java
@@ -0,0 +1,10 @@
+package shcm.shsupercm.fabric.citresewn.api;
+
+import shcm.shsupercm.fabric.citresewn.pack.format.PropertyValue;
+
+@FunctionalInterface
+public interface GlobalPropertiesHandler {
+ String ENTRYPOINT = "citresewn:global_property";
+
+ void globalProperty(String key, PropertyValue value);
+}
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 e37ea6d..f8b2979 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/ModelLoaderMixin.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/ModelLoaderMixin.java
@@ -14,7 +14,7 @@ import shcm.shsupercm.fabric.citresewn.pack.ActiveCITs;
public class ModelLoaderMixin {
@Inject(method = "<init>", at =
@At(value = "INVOKE", ordinal = 0, target = "Lnet/minecraft/util/profiler/Profiler;push(Ljava/lang/String;)V"))
- private void loadCITs(ResourceManager resourceManager, BlockColors blockColors, Profiler profiler, int i, CallbackInfo ci) {
+ private void citresewn$loadCITs(ResourceManager resourceManager, BlockColors blockColors, Profiler profiler, int i, CallbackInfo ci) {
profiler.push("citresewn:reloading_cits");
ActiveCITs.load(resourceManager, profiler);
profiler.pop();
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/ActiveCITs.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/ActiveCITs.java
index 5523c84..642b950 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/ActiveCITs.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/ActiveCITs.java
@@ -3,7 +3,7 @@ package shcm.shsupercm.fabric.citresewn.pack;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.resource.ResourceManager;
import net.minecraft.util.profiler.Profiler;
-import shcm.shsupercm.fabric.citresewn.util.Disposable;
+import shcm.shsupercm.fabric.citresewn.api.Disposable;
public class ActiveCITs implements Disposable { private ActiveCITs() {}
private static ActiveCITs active = null;
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/GlobalProperties.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/GlobalProperties.java
index 76f5d26..39d551a 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/GlobalProperties.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/GlobalProperties.java
@@ -4,10 +4,10 @@ import net.fabricmc.loader.api.FabricLoader;
import net.fabricmc.loader.api.entrypoint.EntrypointContainer;
import net.minecraft.util.Identifier;
import net.minecraft.util.InvalidIdentifierException;
-import shcm.shsupercm.fabric.citresewn.format.PropertyGroup;
-import shcm.shsupercm.fabric.citresewn.format.PropertyKey;
-import shcm.shsupercm.fabric.citresewn.format.PropertyValue;
-import shcm.shsupercm.fabric.citresewn.registry.api.GlobalPropertiesHandler;
+import shcm.shsupercm.fabric.citresewn.pack.format.PropertyGroup;
+import shcm.shsupercm.fabric.citresewn.pack.format.PropertyKey;
+import shcm.shsupercm.fabric.citresewn.pack.format.PropertyValue;
+import shcm.shsupercm.fabric.citresewn.api.GlobalPropertiesHandler;
import java.io.IOException;
import java.io.InputStream;
@@ -43,11 +43,11 @@ public class GlobalProperties extends PropertyGroup {
for (Map.Entry<PropertyKey, Set<PropertyValue>> entry : properties.entrySet())
if (entry.getKey().namespace().equals(containerNamespace)) {
- PropertyValue value = null;
- for (PropertyValue v : entry.getValue())
- value = v;
+ PropertyValue lastValue = null;
+ for (PropertyValue value : entry.getValue())
+ lastValue = value;
- container.getEntrypoint().globalProperty(entry.getKey().path(), value);
+ container.getEntrypoint().globalProperty(entry.getKey().path(), lastValue);
}
}
}
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/format/PropertiesGroupAdapter.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertiesGroupAdapter.java
index 7501057..896e81e 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/format/PropertiesGroupAdapter.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertiesGroupAdapter.java
@@ -1,4 +1,4 @@
-package shcm.shsupercm.fabric.citresewn.format;
+package shcm.shsupercm.fabric.citresewn.pack.format;
import net.minecraft.util.Identifier;
import net.minecraft.util.InvalidIdentifierException;
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/format/PropertyGroup.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertyGroup.java
index d2ff2a4..8fcb135 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/format/PropertyGroup.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertyGroup.java
@@ -1,4 +1,4 @@
-package shcm.shsupercm.fabric.citresewn.format;
+package shcm.shsupercm.fabric.citresewn.pack.format;
import net.minecraft.util.Identifier;
import net.minecraft.util.InvalidIdentifierException;
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/format/PropertyKey.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertyKey.java
index 9adcca2..b861a63 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/format/PropertyKey.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertyKey.java
@@ -1,4 +1,4 @@
-package shcm.shsupercm.fabric.citresewn.format;
+package shcm.shsupercm.fabric.citresewn.pack.format;
public record PropertyKey(String namespace, String path) {
public static PropertyKey of(String key) {
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/format/PropertyValue.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertyValue.java
index 4998803..9a0c4e3 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/format/PropertyValue.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertyValue.java
@@ -1,4 +1,4 @@
-package shcm.shsupercm.fabric.citresewn.format;
+package shcm.shsupercm.fabric.citresewn.pack.format;
public record PropertyValue(String keyMetadata, String value, String delimiter, int position) {
}
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/registry/api/GlobalPropertiesHandler.java b/src/main/java/shcm/shsupercm/fabric/citresewn/registry/api/GlobalPropertiesHandler.java
deleted file mode 100644
index 9b1ad6f..0000000
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/registry/api/GlobalPropertiesHandler.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package shcm.shsupercm.fabric.citresewn.registry.api;
-
-import shcm.shsupercm.fabric.citresewn.format.PropertyValue;
-
-@FunctionalInterface
-public interface GlobalPropertiesHandler {
- String ENTRYPOINT = "citresewn:global_property";
-
- boolean globalProperty(String key, PropertyValue value);
-}