Skip to content

Commit

Permalink
sounds fix
Browse files Browse the repository at this point in the history
  • Loading branch information
EdusgprNetwork authored and Jeryn99 committed Dec 3, 2024
1 parent 115c86a commit 79351b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.jetbrains.annotations.NotNull;
import whocraft.tardis_refined.TardisRefined;
import whocraft.tardis_refined.client.renderer.RenderHelper;
import whocraft.tardis_refined.common.capability.player.TardisPlayerInfo;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down Expand Up @@ -269,8 +270,13 @@ public void renderQuad(PoseStack poseStack, float time_offset, float opacity) {
if (lightning && System.currentTimeMillis() % 5 == 0) if (lightning && Math.random() > 0.95f) {
lightning_a = 3;
if (tO > 0) lightning_strike = (opacity * (1 - Mth.abs(tO * tO)));
assert Minecraft.getInstance().player != null;
Minecraft.getInstance().player.playSound(RAND.nextBoolean() ? SoundEvents.LIGHTNING_BOLT_IMPACT : SoundEvents.LIGHTNING_BOLT_THUNDER, (opacity * (1 - Mth.abs(tO * tO))) * 0.5F, (float) (Math.random() * (1 - Mth.abs(tO))));
TardisPlayerInfo.get(Minecraft.getInstance().player).ifPresent(tardisPlayerInfo -> {
if (!tardisPlayerInfo.isViewingTardis()) return;
if (!tardisPlayerInfo.isRenderVortex()) return;
assert Minecraft.getInstance().player != null;
Minecraft.getInstance().player.playSound(RAND.nextBoolean() ? SoundEvents.LIGHTNING_BOLT_IMPACT : SoundEvents.LIGHTNING_BOLT_THUNDER, (opacity * (1 - Mth.abs(tO * tO))) * 0.5F, (float) (Math.random() * (1 - Mth.abs(tO))));
});

rndUV();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public void render(GuiGraphics guiGraphics, int i, int j, float f) {
RenderSystem.setProjectionMatrix(perspective, VertexSorting.DISTANCE_TO_ORIGIN);
poseStack.pushPose();
poseStack.mulPose(Axis.YP.rotationDegrees(20));
VortexOverlay.VORTEX.time.speed = 0.75;
VortexOverlay.VORTEX.time.speed = 0.3;
VortexOverlay.VORTEX.renderVortex(guiGraphics, 1, false);
RenderSystem.restoreProjectionMatrix();
poseStack.popPose();
Expand All @@ -167,6 +167,7 @@ public void render(GuiGraphics guiGraphics, int i, int j, float f) {
int l = leftPos + 3, t = topPos + 3, b = height - t, r = width - l;
int l1 = leftPos + imageWidth / 4, l2 = leftPos + imageWidth / 2;

guiGraphics.fill(l, t, r, b, 0x40000000);
guiGraphics.fill(l2, t, r, b, -1072689136);

poseStack.mulPose(Axis.ZP.rotationDegrees(-90));
Expand Down

0 comments on commit 79351b3

Please sign in to comment.