mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 08:14:23 +01:00
Fixed pony head textures
This commit is contained in:
parent
bb456f9e83
commit
1e843e56fd
2 changed files with 5 additions and 4 deletions
|
@ -9,6 +9,7 @@ import net.minecraft.client.render.block.entity.SkullBlockEntityModel;
|
|||
import net.minecraft.client.render.block.entity.SkullBlockEntityRenderer;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.component.type.ProfileComponent;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
@ -36,8 +37,8 @@ abstract class MixinSkullBlockEntityRenderer implements BlockEntityRenderer<Skul
|
|||
}
|
||||
}
|
||||
|
||||
@Inject(method = "getRenderLayer", at = @At("HEAD"), cancellable = true)
|
||||
private static void onGetRenderLayer(SkullBlock.SkullType skullType, @Nullable ProfileComponent profile, CallbackInfoReturnable<RenderLayer> info) {
|
||||
@Inject(method = "getRenderLayer(Lnet/minecraft/block/SkullBlock$SkullType;Lnet/minecraft/component/type/ProfileComponent;Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/render/RenderLayer;", at = @At("HEAD"), cancellable = true)
|
||||
private static void onGetRenderLayer(SkullBlock.SkullType skullType, @Nullable ProfileComponent profile, @Nullable Identifier texture, CallbackInfoReturnable<RenderLayer> info) {
|
||||
if (!info.isCancelled()) {
|
||||
RenderLayer result = PonySkullRenderer.INSTANCE.getSkullRenderLayer(skullType, profile);
|
||||
if (result != null) {
|
||||
|
|
|
@ -3,8 +3,7 @@ package com.minelittlepony.client.render.entity.state;
|
|||
import net.minecraft.block.BedBlock;
|
||||
import net.minecraft.client.render.entity.state.PlayerEntityRenderState;
|
||||
import net.minecraft.client.render.item.ItemRenderState;
|
||||
import net.minecraft.entity.EntityPose;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.mob.AbstractPiglinEntity;
|
||||
import net.minecraft.entity.mob.ZombifiedPiglinEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
@ -46,6 +45,7 @@ public class PonyRenderState extends PlayerEntityRenderState implements PonyMode
|
|||
public final ItemRenderState glintlessLeftHandItemState = new ItemRenderState();
|
||||
|
||||
public void updateState(LivingEntity entity, PonyModel<?> model, Pony pony, ModelAttributes.Mode mode) {
|
||||
this.equippedHeadStack = entity.getEquippedStack(EquipmentSlot.HEAD);
|
||||
this.pony = pony;
|
||||
attributes.updateLivingState(entity, pony, mode);
|
||||
attributes.checkRainboom(entity, model, age);
|
||||
|
|
Loading…
Reference in a new issue