1.19.4 -> 23w13a_or_b

This commit is contained in:
Sollace 2023-04-01 12:26:31 +01:00
parent 97fda0ed86
commit f6dc4dce36
2 changed files with 10 additions and 13 deletions

View file

@ -3,9 +3,9 @@ org.gradle.daemon=false
# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.19.4
yarn_mappings=1.19.4+build.1
loader_version=0.14.17
minecraft_version=23w13a_or_b
yarn_mappings=23w13a_or_b+build.1
loader_version=0.14.19
fabric_version=0.76.0+1.19.4
# Mod Properties

View file

@ -19,7 +19,6 @@ import net.minecraft.entity.EquipmentSlot;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.*;
import net.minecraft.item.trim.ArmorTrim;
import net.minecraft.resource.featuretoggle.FeatureFlags;
import net.minecraft.util.Identifier;
public class ArmourFeature<T extends LivingEntity, M extends EntityModel<T> & IPonyModel<T>> extends AbstractPonyFeature<T, M> {
@ -85,16 +84,14 @@ public class ArmourFeature<T extends LivingEntity, M extends EntityModel<T> & IP
});
}
if (entity.world.getEnabledFeatures().contains(FeatureFlags.UPDATE_1_20)) {
if (stack.getItem() instanceof ArmorItem armor) {
ArmorTrim.getTrim(entity.world.getRegistryManager(), stack).ifPresent(trim -> {
pony.getArmourModel(stack, layer, ArmourVariant.TRIM)
.filter(m -> m.poseModel(entity, limbAngle, limbDistance, age, headYaw, headPitch, armorSlot, layer, pony.body()))
.ifPresent(m -> {
m.render(matrices, getTrimConsumer(renderContext, armor.getMaterial(), trim, layer, glint), light, OverlayTexture.DEFAULT_UV, 1, 1, 1, 1);
});
if (stack.getItem() instanceof ArmorItem armor) {
ArmorTrim.getTrim(entity.world.getRegistryManager(), stack).ifPresent(trim -> {
pony.getArmourModel(stack, layer, ArmourVariant.TRIM)
.filter(m -> m.poseModel(entity, limbAngle, limbDistance, age, headYaw, headPitch, armorSlot, layer, pony.body()))
.ifPresent(m -> {
m.render(matrices, getTrimConsumer(renderContext, armor.getMaterial(), trim, layer, glint), light, OverlayTexture.DEFAULT_UV, 1, 1, 1, 1);
});
}
});
}
});
}