Skip to content

Commit

Permalink
texture tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
seabassjh committed Aug 28, 2022
1 parent 4adb9c6 commit cd9d521
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

@OnlyIn(Dist.CLIENT)
public class FallenStarRenderer extends EntityRenderer<FallenStar> {
private static final ResourceLocation TEXTURE = new ResourceLocation(ManaMod.MOD_ID, "textures/entity/fallen_star/fallen_star.png");
private static final RenderType RENDER_TYPE = RenderType.entitySolid(TEXTURE);
private static final ResourceLocation TEXTURE = new ResourceLocation(ManaMod.MOD_ID,
"textures/entity/fallen_star/fallen_star.png");
private static final float SIN_45 = (float) Math.sin((Math.PI / 4D));
private final ModelPart glass;
private final ModelPart cube;
Expand All @@ -45,17 +45,20 @@ public FallenStarRenderer(EntityRendererProvider.Context manager) {
public static LayerDefinition createBodyLayer() {
MeshDefinition meshdefinition = new MeshDefinition();
PartDefinition partdefinition = meshdefinition.getRoot();
partdefinition.addOrReplaceChild("glass", CubeListBuilder.create().texOffs(0, 0).addBox(-4.0F, -4.0F, -4.0F, 8.0F, 8.0F, 8.0F), PartPose.ZERO);
partdefinition.addOrReplaceChild("cube", CubeListBuilder.create().texOffs(32, 0).addBox(-4.0F, -4.0F, -4.0F, 8.0F, 8.0F, 8.0F), PartPose.ZERO);
partdefinition.addOrReplaceChild("glass",
CubeListBuilder.create().texOffs(0, 0).addBox(-4.0F, -4.0F, -4.0F, 8.0F, 8.0F, 8.0F), PartPose.ZERO);
partdefinition.addOrReplaceChild("cube",
CubeListBuilder.create().texOffs(32, 0).addBox(-4.0F, -4.0F, -4.0F, 8.0F, 8.0F, 8.0F), PartPose.ZERO);
return LayerDefinition.create(meshdefinition, 64, 32);
}

public void render(FallenStar p_114162_, float p_114163_, float p_114164_, PoseStack p_114165_, MultiBufferSource p_114166_, int p_114167_) {
public void render(FallenStar p_114162_, float p_114163_, float p_114164_, PoseStack p_114165_,
MultiBufferSource p_114166_, int p_114167_) {
float animSpeed = 3.0F;
p_114165_.pushPose();
float f = getY(p_114162_, p_114164_);
float f1 = ((float) p_114162_.getAge() * animSpeed + p_114164_) * 3.0F;
VertexConsumer vertexconsumer = p_114166_.getBuffer(RenderType.entityTranslucent(TEXTURE,true));
VertexConsumer vertexconsumer = p_114166_.getBuffer(RenderType.entityTranslucent(TEXTURE, true));
p_114165_.pushPose();
p_114165_.scale(1.0F, 1.0F, 1.0F);
p_114165_.translate(0.0D, -0.25D, 0.0D);
Expand All @@ -72,13 +75,14 @@ public void render(FallenStar p_114162_, float p_114163_, float p_114164_, PoseS
// this.glass.render(p_114165_, vertexconsumer, 6029544, i);
this.cube.render(p_114165_, vertexconsumer, 6029544, i);

// p_114165_.mulPose(new Quaternion(new Vector3f(SIN_45, 0.0F, SIN_45), 60.0F, true));
// p_114165_.mulPose(new Quaternion(new Vector3f(SIN_45, 0.0F, SIN_45), 60.0F,
// true));
// p_114165_.mulPose(Vector3f.YP.rotationDegrees(f1));
// p_114165_.scale(0.675F, 0.675F, 0.675F);

p_114165_.popPose();
p_114165_.popPose();

super.render(p_114162_, p_114163_, p_114164_, p_114165_, p_114166_, p_114167_);
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/resources/assets/mana/textures/gui/mana_star_full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cd9d521

Please sign in to comment.