|
15 | 15 | import net.minecraft.core.component.DataComponents;
|
16 | 16 | import net.minecraft.resources.ResourceLocation;
|
17 | 17 | import net.minecraft.tags.ItemTags;
|
18 |
| -import net.minecraft.util.ARGB; |
19 | 18 | import net.minecraft.world.InteractionHand;
|
20 | 19 | import net.minecraft.world.entity.EquipmentSlot;
|
21 | 20 | import net.minecraft.world.entity.HumanoidArm;
|
|
25 | 24 | import net.minecraft.world.item.ItemStack;
|
26 | 25 | import net.minecraft.world.item.component.DyedItemColor;
|
27 | 26 | import net.neoforged.fml.LogicalSide;
|
| 27 | +import net.neoforged.neoforge.client.ClientHooks; |
28 | 28 | import net.neoforged.neoforge.client.IArmPoseTransformer;
|
29 | 29 | import org.jetbrains.annotations.Nullable;
|
30 | 30 |
|
@@ -116,8 +116,9 @@ default Model getHumanoidArmorModel(ItemStack itemStack, EquipmentClientInfo.Lay
|
116 | 116 | default Model getGenericArmorModel(ItemStack itemStack, EquipmentClientInfo.LayerType layerType, Model original) {
|
117 | 117 | Model replacement = getHumanoidArmorModel(itemStack, layerType, original);
|
118 | 118 | if (replacement != original) {
|
119 |
| - // FIXME: equipment rendering deals with a plain Model now |
120 |
| - //ClientHooks.copyModelProperties(original, replacement); |
| 119 | + if (original instanceof HumanoidModel<?> originalHumanoid && replacement instanceof HumanoidModel<?> replacementHumanoid) { |
| 120 | + ClientHooks.copyModelProperties(originalHumanoid, replacementHumanoid); |
| 121 | + } |
121 | 122 | return replacement;
|
122 | 123 | }
|
123 | 124 | return original;
|
@@ -203,7 +204,7 @@ default int getArmorLayerTintColor(ItemStack stack, EquipmentClientInfo.Layer la
|
203 | 204 | * @return a default color for the layer, in ARGB format
|
204 | 205 | */
|
205 | 206 | default int getDefaultDyeColor(ItemStack stack) {
|
206 |
| - return stack.is(ItemTags.DYEABLE) ? ARGB.opaque(DyedItemColor.getOrDefault(stack, 0)) : 0; |
| 207 | + return stack.is(ItemTags.DYEABLE) ? DyedItemColor.getOrDefault(stack, 0) : 0; |
207 | 208 | }
|
208 | 209 |
|
209 | 210 | /**
|
|
0 commit comments