diff --git a/api/src/main/java/org/geysermc/geyser/api/item/custom/v2/predicate/CustomModelDataProperty.java b/api/src/main/java/org/geysermc/geyser/api/item/custom/v2/predicate/match/CustomModelDataString.java similarity index 90% rename from api/src/main/java/org/geysermc/geyser/api/item/custom/v2/predicate/CustomModelDataProperty.java rename to api/src/main/java/org/geysermc/geyser/api/item/custom/v2/predicate/match/CustomModelDataString.java index 799a0d91f..c40201058 100644 --- a/api/src/main/java/org/geysermc/geyser/api/item/custom/v2/predicate/CustomModelDataProperty.java +++ b/api/src/main/java/org/geysermc/geyser/api/item/custom/v2/predicate/match/CustomModelDataString.java @@ -23,7 +23,7 @@ * @link https://github.com/GeyserMC/Geyser */ -package org.geysermc.geyser.api.item.custom.v2.predicate; +package org.geysermc.geyser.api.item.custom.v2.predicate.match; -public record CustomModelDataProperty(T data, int index) { +public record CustomModelDataString(String value, int index) { } diff --git a/api/src/main/java/org/geysermc/geyser/api/item/custom/v2/predicate/match/MatchPredicateProperty.java b/api/src/main/java/org/geysermc/geyser/api/item/custom/v2/predicate/match/MatchPredicateProperty.java index b9f0ee3de..cd1348c55 100644 --- a/api/src/main/java/org/geysermc/geyser/api/item/custom/v2/predicate/match/MatchPredicateProperty.java +++ b/api/src/main/java/org/geysermc/geyser/api/item/custom/v2/predicate/match/MatchPredicateProperty.java @@ -26,7 +26,6 @@ package org.geysermc.geyser.api.item.custom.v2.predicate.match; import net.kyori.adventure.key.Key; -import org.geysermc.geyser.api.item.custom.v2.predicate.CustomModelDataProperty; // TODO can we do more? public class MatchPredicateProperty { @@ -34,7 +33,7 @@ public class MatchPredicateProperty { public static final MatchPredicateProperty CHARGE_TYPE = create(); public static final MatchPredicateProperty TRIM_MATERIAL = create(); public static final MatchPredicateProperty CONTEXT_DIMENSION = create(); - public static final MatchPredicateProperty> CUSTOM_MODEL_DATA = create(); + public static final MatchPredicateProperty CUSTOM_MODEL_DATA = create(); private MatchPredicateProperty() {} diff --git a/core/src/main/java/org/geysermc/geyser/registry/mappings/versions/MappingsReader_v2.java b/core/src/main/java/org/geysermc/geyser/registry/mappings/versions/MappingsReader_v2.java index 766a64b39..fd4399b06 100644 --- a/core/src/main/java/org/geysermc/geyser/registry/mappings/versions/MappingsReader_v2.java +++ b/core/src/main/java/org/geysermc/geyser/registry/mappings/versions/MappingsReader_v2.java @@ -36,7 +36,7 @@ import org.geysermc.geyser.api.item.custom.v2.BedrockCreativeTab; import org.geysermc.geyser.api.item.custom.v2.CustomItemBedrockOptions; import org.geysermc.geyser.api.item.custom.v2.CustomItemDefinition; import org.geysermc.geyser.api.item.custom.v2.predicate.ConditionPredicate; -import org.geysermc.geyser.api.item.custom.v2.predicate.CustomModelDataProperty; +import org.geysermc.geyser.api.item.custom.v2.predicate.match.CustomModelDataString; import org.geysermc.geyser.api.item.custom.v2.predicate.RangeDispatchPredicate; import org.geysermc.geyser.api.item.custom.v2.predicate.match.ChargeType; import org.geysermc.geyser.api.item.custom.v2.predicate.MatchPredicate; @@ -278,7 +278,7 @@ public class MappingsReader_v2 extends MappingsReader { if (indexNode != null && indexNode.isIntegralNumber()) { index = indexNode.asInt(); } - builder.predicate(new MatchPredicate<>(MatchPredicateProperty.CUSTOM_MODEL_DATA, new CustomModelDataProperty<>(value, index))); + builder.predicate(new MatchPredicate<>(MatchPredicateProperty.CUSTOM_MODEL_DATA, new CustomModelDataString(value, index))); } default -> throw new InvalidCustomMappingsFileException("Unknown property " + property); }