mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-14 14:34:16 +01:00
Goggles are on your eyes if you wear something on your head.
This commit is contained in:
parent
5af222a99b
commit
2ed5ee9f3b
@ -18,6 +18,7 @@ import net.minecraft.client.renderer.block.model.ItemTransforms;
|
|||||||
import net.minecraft.client.renderer.entity.RenderLayerParent;
|
import net.minecraft.client.renderer.entity.RenderLayerParent;
|
||||||
import net.minecraft.client.renderer.texture.OverlayTexture;
|
import net.minecraft.client.renderer.texture.OverlayTexture;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.world.entity.EquipmentSlot;
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
@ -53,6 +54,11 @@ public class GogglesCurioRenderer implements ICurioRenderer {
|
|||||||
matrixStack.mulPose(Vector3f.ZP.rotationDegrees(180.0f));
|
matrixStack.mulPose(Vector3f.ZP.rotationDegrees(180.0f));
|
||||||
matrixStack.scale(0.625f, 0.625f, 0.625f);
|
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
|
// Render
|
||||||
Minecraft.getInstance().getItemRenderer().renderStatic(stack, ItemTransforms.TransformType.HEAD, light, OverlayTexture.NO_OVERLAY, matrixStack, renderTypeBuffer, 0);
|
Minecraft.getInstance().getItemRenderer().renderStatic(stack, ItemTransforms.TransformType.HEAD, light, OverlayTexture.NO_OVERLAY, matrixStack, renderTypeBuffer, 0);
|
||||||
matrixStack.popPose();
|
matrixStack.popPose();
|
||||||
|
Loading…
Reference in New Issue
Block a user