Skip to content

Commit

Permalink
tweak: change world marker to glow a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
sekwah41 committed May 5, 2022
1 parent 2070459 commit c579372
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
public class WorldMarkerGUI extends GuiComponent implements PlayerGUI {

public static final ResourceLocation LOG_TEXTURE = new ResourceLocation(NarutoMod.MOD_ID, "textures/gui/jutsu/jutsu_substiutution.png");
public static final ResourceLocation LOG_TEXTURE = new ResourceLocation(NarutoMod.MOD_ID, "textures/gui/jutsu/jutsu_substiutution_marker.png");

private final Minecraft minecraft;
private int screenWidth;
Expand Down Expand Up @@ -53,16 +53,16 @@ public void render(PoseStack matrixStack, Matrix4f worldMatrix, Vec3 cameraPos)
float xPos = halfWidth;
float yOffset = halfHeight;

int textureWidth = 19;
int textureHeight = 18;
int textureWidth = 32;
int textureHeight = 32;

// stack, x, y, tx, ty, width, height, textureWidth, textureHeight
RenderSystem.setShader(GameRenderer::getPositionTexShader);
RenderSystem.enableDepthTest();
RenderSystem.enableBlend();
RenderSystem.setShaderTexture(0, LOG_TEXTURE);

Vector4f vec = new Vector4f((float) (substitutionLoc.x - cameraPos.x), (float) (substitutionLoc.y - cameraPos.y), (float) (substitutionLoc.z - cameraPos.z), 1F);
Vector4f vec = new Vector4f((float) (substitutionLoc.x - cameraPos.x), (float) (substitutionLoc.y - cameraPos.y + 1.5), (float) (substitutionLoc.z - cameraPos.z), 1F);
double distance = cameraPos.distanceTo(substitutionLoc);
vec.transform(worldMatrix);
vec.perspectiveDivide();
Expand All @@ -79,8 +79,8 @@ public void render(PoseStack matrixStack, Matrix4f worldMatrix, Vec3 cameraPos)
matrixStack.translate(xPos, yOffset, 0);
matrixStack.scale(scale, scale, scale);
blit(matrixStack, -textureWidth/2, -textureHeight/2,
6, 7,
textureWidth, textureHeight,
0, 0,
32, 32,
32, 32);
matrixStack.popPose();
}
Expand Down
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 c579372

Please sign in to comment.