Skip to content

Commit

Permalink
1.19.2 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fayer3 committed Feb 19, 2025
1 parent e8af64b commit 2b1952a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected void init() {
this.addRenderableWidget(
new Button(this.width / 2 + 5, this.height - 32, 150, 20,
Component.translatable("gui.back"),
(p) -> Minecraft.getInstance().setScreen(this.lastScreen)));
(p) -> onClose()));
this.addRenderableWidget(
new Button(this.width / 2 - 155, this.height - 32, 150, 20,
Component.translatable("chat.copy.click"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ public class ReloadListener implements ResourceManagerReloadListener {

@Override
public void onResourceManagerReload(ResourceManager resourceManager) {
List<String> newPacks = resourceManager.listPacks().map(PackResources::packId).toList();
List<String> newPacks = resourceManager.listPacks().map(PackResources::getName).toList();
if (this.resourcePacks == null) {
// first load
this.resourcePacks = resourceManager.listPacks().map(PackResources::packId).toList();
this.resourcePacks = resourceManager.listPacks().map(PackResources::getName).toList();
} else if (!this.resourcePacks.equals(newPacks) &&
ClientDataHolderVR.getInstance().menuWorldRenderer != null &&
ClientDataHolderVR.getInstance().menuWorldRenderer.isReady())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,9 @@ public static void drawSizedQuadWithLightmap(
com.mojang.math.Vector3f light0Old = RenderSystemAccessor.getShaderLightDirections()[0];
com.mojang.math.Vector3f light1Old = RenderSystemAccessor.getShaderLightDirections()[1];

Vector3f normal = new Matrix3f(matrix).transform(new Vector3f(0, 0, 1)).normalize();
com.mojang.math.Vector3f normal = new com.mojang.math.Vector3f(0, 0, 1);
normal.transform(new Matrix3f(matrix));
normal.normalize();

// set lights to front
RenderSystem.setShaderLights(normal, normal);
Expand All @@ -471,25 +473,25 @@ public static void drawSizedQuadWithLightmap(
.color(color[0], color[1], color[2], color[3])
.uv(0.0F, flipY ? 1.0F : 0.0F)
.overlayCoords(OverlayTexture.NO_OVERLAY).uv2(packedLight)
.normal(normal.x, normal.y, normal.z)
.normal(normal.x(), normal.y(), normal.z())
.endVertex();
bufferbuilder.vertex(matrix, sizeX, -sizeY, 0)
.color(color[0], color[1], color[2], color[3])
.uv(1.0F, flipY ? 1.0F : 0.0F)
.overlayCoords(OverlayTexture.NO_OVERLAY).uv2(packedLight)
.normal(normal.x, normal.y, normal.z)
.normal(normal.x(), normal.y(), normal.z())
.endVertex();
bufferbuilder.vertex(matrix, sizeX, sizeY, 0)
.color(color[0], color[1], color[2], color[3])
.uv(1.0F, flipY ? 0.0F : 1.0F)
.overlayCoords(OverlayTexture.NO_OVERLAY).uv2(packedLight)
.normal(normal.x, normal.y, normal.z)
.normal(normal.x(), normal.y(), normal.z())
.endVertex();
bufferbuilder.vertex(matrix, -sizeX, sizeY, 0)
.color(color[0], color[1], color[2], color[3])
.uv(0.0F, flipY ? 0.0F : 1.0F)
.overlayCoords(OverlayTexture.NO_OVERLAY).uv2(packedLight)
.normal(normal.x, normal.y, normal.z)
.normal(normal.x(), normal.y(), normal.z())
.endVertex();
BufferUploader.drawWithShader(bufferbuilder.end());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1298,13 +1298,13 @@ public static void renderCrosshairAtDepth(boolean depthAlways, PoseStack poseSta
switch (blockhitresult.getDirection()) {
case DOWN -> {
poseStack.mulPose(
Axis.YP.rotationDegrees(DATA_HOLDER.vrPlayer.vrdata_world_render.getAim().getYaw()));
poseStack.mulPose(Axis.XP.rotationDegrees(-90.0F));
Vector3f.YP.rotationDegrees(DATA_HOLDER.vrPlayer.vrdata_world_render.getAim().getYaw()));
poseStack.mulPose(Vector3f.XP.rotationDegrees(-90.0F));
}
case UP -> {
poseStack.mulPose(
Axis.YP.rotationDegrees(-DATA_HOLDER.vrPlayer.vrdata_world_render.getAim().getYaw()));
poseStack.mulPose(Axis.XP.rotationDegrees(90.0F));
Vector3f.YP.rotationDegrees(-DATA_HOLDER.vrPlayer.vrdata_world_render.getAim().getYaw()));
poseStack.mulPose(Vector3f.XP.rotationDegrees(90.0F));
}
case WEST -> poseStack.mulPose(Vector3f.YP.rotationDegrees(90.0F));
case EAST -> poseStack.mulPose(Vector3f.YP.rotationDegrees(-90.0F));
Expand All @@ -1313,9 +1313,9 @@ public static void renderCrosshairAtDepth(boolean depthAlways, PoseStack poseSta
} else {
// if there is no block hit, make it face the controller
poseStack.mulPose(
Axis.YP.rotationDegrees(-DATA_HOLDER.vrPlayer.vrdata_world_render.getAim().getYaw()));
Vector3f.YP.rotationDegrees(-DATA_HOLDER.vrPlayer.vrdata_world_render.getAim().getYaw()));
poseStack.mulPose(
Axis.XP.rotationDegrees(-DATA_HOLDER.vrPlayer.vrdata_world_render.getAim().getPitch()));
Vector3f.XP.rotationDegrees(-DATA_HOLDER.vrPlayer.vrdata_world_render.getAim().getPitch()));
}

float scale = (float) (0.125F * DATA_HOLDER.vrSettings.crosshairScale *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ public abstract class LocalPlayerVRMixin extends LocalPlayer_PlayerVRMixin imple
@Override
@Unique
public String vivecraft$getLastMsg() {
return vivecraft$lastMsg;
return this.vivecraft$lastMsg;
}

@Override
Expand Down

0 comments on commit 2b1952a

Please sign in to comment.