mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-27 23:47:38 +01:00
Goggles are on your eyes if you wear something on your head.
This commit is contained in:
parent
5af222a99b
commit
2ed5ee9f3b
1 changed files with 6 additions and 0 deletions
|
@ -18,6 +18,7 @@ import net.minecraft.client.renderer.block.model.ItemTransforms;
|
|||
import net.minecraft.client.renderer.entity.RenderLayerParent;
|
||||
import net.minecraft.client.renderer.texture.OverlayTexture;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
|
@ -53,6 +54,11 @@ public class GogglesCurioRenderer implements ICurioRenderer {
|
|||
matrixStack.mulPose(Vector3f.ZP.rotationDegrees(180.0f));
|
||||
matrixStack.scale(0.625f, 0.625f, 0.625f);
|
||||
|
||||
if(!slotContext.entity().getItemBySlot(EquipmentSlot.HEAD).isEmpty()) {
|
||||
matrixStack.mulPose(Vector3f.ZP.rotationDegrees(180.0f));
|
||||
matrixStack.translate(0, -0.25, 0);
|
||||
}
|
||||
|
||||
// Render
|
||||
Minecraft.getInstance().getItemRenderer().renderStatic(stack, ItemTransforms.TransformType.HEAD, light, OverlayTexture.NO_OVERLAY, matrixStack, renderTypeBuffer, 0);
|
||||
matrixStack.popPose();
|
||||
|
|
Loading…
Reference in a new issue