From 1f82ebe89c0e98eaea141eea9a493547b9093dac Mon Sep 17 00:00:00 2001 From: SHsuperCM Date: Fri, 4 Mar 2022 11:05:49 +0200 Subject: Modified elytra type item condition warning --- .../fabric/citresewn/defaults/cit/types/TypeElytra.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'defaults') diff --git a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeElytra.java b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeElytra.java index d50d084..40e6fbe 100644 --- a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeElytra.java +++ b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeElytra.java @@ -1,6 +1,8 @@ package shcm.shsupercm.fabric.citresewn.defaults.cit.types; import io.shcm.shsupercm.fabric.fletchingtable.api.Entrypoint; +import net.minecraft.item.ElytraItem; +import net.minecraft.item.Item; import net.minecraft.resource.ResourceManager; import net.minecraft.util.Identifier; import shcm.shsupercm.fabric.citresewn.api.CITTypeContainer; @@ -27,8 +29,11 @@ public class TypeElytra extends CITType { @Override public void load(List conditions, PropertyGroup properties, ResourceManager resourceManager) throws CITParsingException { - if (conditions.removeIf(condition -> condition instanceof ConditionItems)) - warn("Type elytra does not support the items condition", null, properties); + for (CITCondition condition : conditions) + if (condition instanceof ConditionItems items) + for (Item item : items.items) + if (!(item instanceof ElytraItem)) + warn("Non elytra item type condition", null, properties); texture = resolveAsset(properties.identifier, properties.getLastWithoutMetadata("citresewn", "texture"), "textures", ".png", resourceManager); if (texture == null) -- cgit