2626import net .minecraftforge .common .data .ExistingFileHelper ;
2727import net .minecraftforge .registries .ForgeRegistries ;
2828
29+ import java .util .Arrays ;
2930import java .util .Objects ;
3031import java .util .function .BiFunction ;
3132
@@ -36,6 +37,8 @@ public HexItemModels(PackOutput output, ExistingFileHelper existingFileHelper) {
3637
3738 private static final String [] PHIAL_SIZES = {"small" , "medium" , "large" , "larger" , "largest" };
3839
40+ private static final Integer [] PACKAGED_SPELL_HANDHELD_VARIANTS = {5 };
41+
3942 private static String getPath (Item item ) {
4043 return Objects .requireNonNull (ForgeRegistries .ITEMS .getKey (item )).getPath ();
4144 }
@@ -276,11 +279,14 @@ private void buildPackagedSpell(Item item, String stub, int numVariants) {
276279 var name = getPath (item );
277280 var builder = getBuilder (name );
278281 for (int i = 0 ; i < numVariants ; i ++) {
279- var plain = i == 0 ? singleTexture (name , new ResourceLocation ("item/generated" ),
282+
283+ var parent_tag = Arrays .asList (PACKAGED_SPELL_HANDHELD_VARIANTS ).contains (i ) ? "item/handheld_rod" : "item/generated" ;
284+
285+ var plain = i == 0 ? singleTexture (name , new ResourceLocation (parent_tag ),
280286 "layer0" , modLoc ("item/cad/" + i + "_" + stub ))
281- : withExistingParent (name + "_" + i , new ResourceLocation ("item/generated" ))
287+ : withExistingParent (name + "_" + i , new ResourceLocation (parent_tag ))
282288 .texture ("layer0" , modLoc ("item/cad/" + i + "_" + stub ));
283- var filled = withExistingParent (name + "_" + i + "_filled" , new ResourceLocation ("item/generated" ))
289+ var filled = withExistingParent (name + "_" + i + "_filled" , new ResourceLocation (parent_tag ))
284290 .texture ("layer0" , modLoc ("item/cad/" + i + "_" + stub ))
285291 .texture ("layer1" , modLoc ("item/cad/" + i + "_" + stub + "_overlay" ));
286292 builder .override ().predicate (ItemFocus .VARIANT_PRED , i ).predicate (ItemPackagedHex .HAS_PATTERNS_PRED , -0.01f )
0 commit comments