From dcf050a60465d170e69878da951b113f2243b71f Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Thu, 31 Oct 2024 09:57:04 +0100 Subject: [PATCH] Remove unneeded optional item type from Types1_21_2 Was only used in food properties up until 1.21.2 (luckily) --- .../api/minecraft/entitydata/types/EntityDataTypes1_21_2.java | 3 +-- .../viaversion/api/type/types/version/Types1_21_2.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/api/src/main/java/com/viaversion/viaversion/api/minecraft/entitydata/types/EntityDataTypes1_21_2.java b/api/src/main/java/com/viaversion/viaversion/api/minecraft/entitydata/types/EntityDataTypes1_21_2.java index fe35af0c2..6e9d13080 100644 --- a/api/src/main/java/com/viaversion/viaversion/api/minecraft/entitydata/types/EntityDataTypes1_21_2.java +++ b/api/src/main/java/com/viaversion/viaversion/api/minecraft/entitydata/types/EntityDataTypes1_21_2.java @@ -29,7 +29,6 @@ import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType; import com.viaversion.viaversion.api.minecraft.item.Item; import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Types; -import com.viaversion.viaversion.api.type.types.ArrayType; import com.viaversion.viaversion.api.type.types.misc.ParticleType; public final class EntityDataTypes1_21_2 extends AbstractEntityDataTypes { @@ -66,7 +65,7 @@ public final class EntityDataTypes1_21_2 extends AbstractEntityDataTypes { public final EntityDataType vector3FType = add(29, Types.VECTOR3F); public final EntityDataType quaternionType = add(30, Types.QUATERNION); - public EntityDataTypes1_21_2(final Type itemType, final ParticleType particleType, final ArrayType particlesType) { + public EntityDataTypes1_21_2(final Type itemType, final ParticleType particleType, final Type particlesType) { super(31); this.itemType = add(7, itemType); this.particleType = add(17, particleType); diff --git a/api/src/main/java/com/viaversion/viaversion/api/type/types/version/Types1_21_2.java b/api/src/main/java/com/viaversion/viaversion/api/type/types/version/Types1_21_2.java index 3cd74be96..c7c4f5f84 100644 --- a/api/src/main/java/com/viaversion/viaversion/api/type/types/version/Types1_21_2.java +++ b/api/src/main/java/com/viaversion/viaversion/api/type/types/version/Types1_21_2.java @@ -43,13 +43,12 @@ public final class Types1_21_2 { public static final StructuredDataType STRUCTURED_DATA = new StructuredDataType(); public static final Type[]> STRUCTURED_DATA_ARRAY = new ArrayType<>(STRUCTURED_DATA); public static final ItemType1_20_5 ITEM = new ItemType1_20_5(STRUCTURED_DATA); - public static final Type OPTIONAL_ITEM = ITEM.new OptionalItemType(); // Optional as in boolean prefixed, not via the amount public static final Type ITEM_ARRAY = new ArrayType<>(ITEM); public static final Type ITEM_COST = new ItemCostType1_20_5(STRUCTURED_DATA_ARRAY); public static final Type OPTIONAL_ITEM_COST = new ItemCostType1_20_5.OptionalItemCostType(ITEM_COST); public static final ParticleType PARTICLE = new ParticleType(); - public static final ArrayType PARTICLES = new ArrayType<>(PARTICLE); + public static final Type PARTICLES = new ArrayType<>(PARTICLE); public static final EntityDataTypes1_21_2 ENTITY_DATA_TYPES = new EntityDataTypes1_21_2(ITEM, PARTICLE, PARTICLES); public static final Type ENTITY_DATA = new EntityDataType(ENTITY_DATA_TYPES); public static final Type> ENTITY_DATA_LIST = new EntityDataListType(ENTITY_DATA);