diff options
Diffstat (limited to 'src/main/java/shcm')
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); -} |