-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
20 additions
and
23 deletions.
There are no files selected for viewing
34 changes: 17 additions & 17 deletions
34
...rc/main/java/com/oroarmor/netherite_plus/compatibility/NetheritePlusTrinketsRenderer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
package com.oroarmor.netherite_plus.compatibility; | ||
|
||
import com.oroarmor.netherite_plus.client.render.NetheriteElytraFeatureRenderer; | ||
import net.fabricmc.api.EnvType; | ||
import net.fabricmc.api.Environment; | ||
|
||
import net.minecraft.client.network.AbstractClientPlayerEntity; | ||
import net.minecraft.client.render.OverlayTexture; | ||
import net.minecraft.client.render.VertexConsumer; | ||
import net.minecraft.client.render.VertexConsumerProvider; | ||
import net.minecraft.client.render.entity.model.ElytraEntityModel; | ||
import net.minecraft.client.render.item.ItemRenderer; | ||
import net.minecraft.client.util.math.MatrixStack; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.item.ItemStack; | ||
|
||
import net.fabricmc.api.EnvType; | ||
import net.fabricmc.api.Environment; | ||
|
||
@Environment(EnvType.CLIENT) | ||
public class NetheritePlusTrinketsRenderer { | ||
@Environment(EnvType.CLIENT) | ||
@SuppressWarnings({"unchecked", "rawtypes"}) | ||
public final static ElytraEntityModel<AbstractClientPlayerEntity> elytra = new ElytraEntityModel(); | ||
|
||
@Environment(EnvType.CLIENT) | ||
@SuppressWarnings({ "unchecked", "rawtypes" }) | ||
public final static ElytraEntityModel<AbstractClientPlayerEntity> elytra = new ElytraEntityModel(); | ||
|
||
public static void renderTrinketsElytra(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int light, AbstractClientPlayerEntity livingEntity, Item item) { | ||
matrixStack.push(); | ||
matrixStack.scale(1.5f, 1.5f, 1.5f); | ||
matrixStack.translate(0.0D, -0.775D, 0.125D); | ||
elytra.setAngles(livingEntity, 0f, 0f, 0f, 0f, 0f); | ||
VertexConsumer vertexConsumer = ItemRenderer.getDirectItemGlintConsumer(vertexConsumerProvider, elytra.getLayer(NetheriteElytraFeatureRenderer.NETHERITE_ELYTRA_SKIN), false, item.getDefaultStack().hasGlint()); | ||
elytra.render(matrixStack, vertexConsumer, light, OverlayTexture.DEFAULT_UV, 1.0F, 1.0F, 1.0F, 1.0F); | ||
matrixStack.pop(); | ||
} | ||
|
||
public static void renderTrinketsElytra(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int light, AbstractClientPlayerEntity livingEntity, ItemStack item) { | ||
matrixStack.push(); | ||
matrixStack.scale(2f, 2f, 2f); | ||
matrixStack.translate(0.0D, -0.775D, 0.125D / 2D); | ||
elytra.setAngles(livingEntity, 0f, 0f, 0f, 0f, 0f); | ||
VertexConsumer vertexConsumer = ItemRenderer.getDirectItemGlintConsumer(vertexConsumerProvider, elytra.getLayer(NetheriteElytraFeatureRenderer.NETHERITE_ELYTRA_SKIN), false, item.hasGlint()); | ||
elytra.render(matrixStack, vertexConsumer, light, OverlayTexture.DEFAULT_UV, 1.0F, 1.0F, 1.0F, 1.0F); | ||
matrixStack.pop(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters