aboutsummaryrefslogtreecommitdiff
path: root/defaults/src/main/java/shcm/shsupercm/fabric/citresewn
diff options
context:
space:
mode:
authorSHsuperCM <shsupercm@gmail.com>2022-02-16 14:42:15 +0200
committerSHsuperCM <shsupercm@gmail.com>2022-02-16 14:42:15 +0200
commit185dd9defbd5e0a511a6551e7857b01c5353dd5b (patch)
treeb91c092bd19427eab3759d200db601f2d4f824d2 /defaults/src/main/java/shcm/shsupercm/fabric/citresewn
parent2bda2f19a107f5a31e62b7c60e95035fcea3448e (diff)
downloadCITResewn-185dd9defbd5e0a511a6551e7857b01c5353dd5b.tar.gz
CITResewn-185dd9defbd5e0a511a6551e7857b01c5353dd5b.tar.bz2
CITResewn-185dd9defbd5e0a511a6551e7857b01c5353dd5b.zip
Implemented type-specific property acknowledgement
Diffstat (limited to 'defaults/src/main/java/shcm/shsupercm/fabric/citresewn')
-rw-r--r--defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeItem.java7
-rw-r--r--defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/mixin/types/item/ModelLoaderMixin.java6
2 files changed, 9 insertions, 4 deletions
diff --git a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeItem.java b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeItem.java
index d9f9ba6..9cb623e 100644
--- a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeItem.java
+++ b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeItem.java
@@ -17,7 +17,6 @@ import net.minecraft.item.Item;
import net.minecraft.item.Items;
import net.minecraft.resource.Resource;
import net.minecraft.resource.ResourceManager;
-import net.minecraft.resource.ResourceType;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import org.apache.commons.io.IOUtils;
@@ -30,6 +29,7 @@ import shcm.shsupercm.fabric.citresewn.defaults.common.ResewnTextureIdentifier;
import shcm.shsupercm.fabric.citresewn.defaults.mixin.types.item.JsonUnbakedModelAccessor;
import shcm.shsupercm.fabric.citresewn.ex.CITParsingException;
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 java.io.InputStream;
@@ -57,6 +57,11 @@ public class TypeItem extends CITType {
public CITOverrideList bakedSubModels = new CITOverrideList();
@Override
+ public Set<PropertyKey> typeProperties() {
+ return Set.of(PropertyKey.of("model"), PropertyKey.of("texture"), PropertyKey.of("tile"));
+ }
+
+ @Override
public void load(List<? extends CITCondition> conditions, PropertyGroup properties, ResourceManager resourceManager) throws CITParsingException {
for (CITCondition condition : conditions)
if (condition instanceof ConditionItems conditionItems)
diff --git a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/mixin/types/item/ModelLoaderMixin.java b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/mixin/types/item/ModelLoaderMixin.java
index adb4963..0c5f4f1 100644
--- a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/mixin/types/item/ModelLoaderMixin.java
+++ b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/mixin/types/item/ModelLoaderMixin.java
@@ -54,7 +54,7 @@ public class ModelLoaderMixin {
if (!ActiveCITs.isActive())
return;
- info("Loading CITItem models...");
+ info("Loading item CIT models...");
CONTAINER.loaded.values().stream() // todo remove streams usage
.flatMap(Collection::stream)
.distinct().forEach(cit -> {
@@ -80,8 +80,8 @@ public class ModelLoaderMixin {
if (!ActiveCITs.isActive())
return;
- profiler.push("citresewn:item_linking");
- info("Linking baked models to CITItems...");
+ profiler.push("citresewn:type_item_linking");
+ info("Linking baked models to item CITs...");
CONTAINER.loaded.values().stream() // todo remove streams usage
.flatMap(Collection::stream)