Skip to content

Commit

Permalink
1.21.3 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fayer3 committed Jan 12, 2025
1 parent 635b0bf commit 836cd46
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -520,14 +520,17 @@ public void setupRenderConfiguration() throws RenderConfigException, IOException
this.reinitFrameBuffers("gfx setting changed to: " + this.previousGraphics);
}

if (minecraft.options.graphicsMode().get() == GraphicsStatus.FABULOUS &&
minecraft.getShaderManager().getProgram(VRShaders.VR_TRANSPARENCY_SHADER) == null)
{
// fabulous shader didn't compile
minecraft.gui.getChat().addMessage(Component.translatable("vivecraft.messages.fabulousFailed"));
minecraft.options.graphicsMode().set(GraphicsStatus.FAST);
minecraft.levelRenderer.allChanged();
this.reinitFrameBuffers("fabulous missing");
if (minecraft.options.graphicsMode().get() == GraphicsStatus.FABULOUS) {
try {
minecraft.getShaderManager().getProgramForLoading(VRShaders.VR_TRANSPARENCY_SHADER);
} catch (Exception e) {
// fabulous shader didn't compile
VRSettings.LOGGER.error("Failed to load fabulous vr shader program: ", e);
minecraft.gui.getChat().addMessage(Component.translatable("vivecraft.messages.fabulousFailed"));
minecraft.options.graphicsMode().set(GraphicsStatus.FAST);
minecraft.levelRenderer.allChanged();
this.reinitFrameBuffers("fabulous missing");
}
}

if (this.resizeFrameBuffers && !this.reinitFrameBuffers) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ protected LivingEntityRendererMixin(EntityRendererProvider.Context context) {
{
ItemStack otherStack = original.call(instance, humanoidArm.getOpposite());
if (ClimbTracker.isClaws(otherStack) &&
!ClientVRPlayers.getInstance().getRotationsForPlayer(instance.getUUID()).seated)
!ClientVRPlayers.getInstance().isVRAndSeated(instance.getUUID()))
{
return otherStack;
}
Expand Down
3 changes: 0 additions & 3 deletions common/src/main/resources/vivecraft.accesswidener
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,3 @@ accessible method net/minecraft/world/item/BrushItem spawnDustParticles (Lnet/mi

# do not kick climbing players
accessible field net/minecraft/server/network/ServerGamePacketListenerImpl aboveGroundTickCount I
# to let the vr transparancy shader fail to compile
accessible class net/minecraft/client/renderer/ShaderManager$CompilationCache
accessible field net/minecraft/client/renderer/ShaderManager$CompilationCache programs Ljava/util/Map;
1 change: 0 additions & 1 deletion common/src/main/resources/vivecraft.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"client.player.AbstractClientPlayerMixin",
"client.renderer.ItemBlockRenderTypesMixin",
"client.renderer.RenderStateShardAccessor",
"client.renderer.ShaderManagerMixin",
"client.renderer.block.LiquidBlockRendererMixin",
"client.renderer.entity.EntityRenderDispatcherMixin",
"client.renderer.entity.ItemRendererVRMixin",
Expand Down

0 comments on commit 836cd46

Please sign in to comment.