Skip to content

Commit

Permalink
Fix world loading state mixin + pre2
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Nov 22, 2023
1 parent e03eeef commit 5042bdc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ org.gradle.jvmargs=-Xmx2G

# Fabric Properties
# check these on https://fabricmc.net/develop/
minecraft_version=23w44a
yarn_mappings=23w44a+build.5
minecraft_version=1.20.3-pre2
yarn_mappings=1.20.3-pre2+build.2
loader_version=0.14.24
fabric_version=0.90.7+1.20.3
fabric_version=0.90.12+1.20.3

# Mod Properties
mod_version=0.5.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public ColorProviderRegistry(BlockColors blockColors) {
// TODO: Allow mods to install their own color resolvers here
private void installOverrides() {
this.registerBlocks(DefaultColorProviders.GrassColorProvider.BLOCKS,
Blocks.GRASS_BLOCK, Blocks.FERN, Blocks.GRASS, Blocks.POTTED_FERN,
Blocks.GRASS_BLOCK, Blocks.FERN, Blocks.SHORT_GRASS, Blocks.POTTED_FERN,
Blocks.PINK_PETALS, Blocks.SUGAR_CANE, Blocks.LARGE_FERN, Blocks.TALL_GRASS);

this.registerBlocks(DefaultColorProviders.FoliageColorProvider.BLOCKS,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package me.jellysquid.mods.sodium.mixin.core.gui;

import net.minecraft.client.gui.screen.DownloadingTerrainScreen;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.client.network.WorldLoadingState;
import net.minecraft.util.math.BlockPos;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;

@Mixin(DownloadingTerrainScreen.class)
public class DownloadingTerrainScreenMixin {
@Mixin(WorldLoadingState.class)
public class WorldLoadingStateMixin {
@Redirect(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;getBlockPos()Lnet/minecraft/util/math/BlockPos;"))
private BlockPos redirect$getPlayerBlockPosition(ClientPlayerEntity instance) {
// Ensure the "eye" position (which the chunk rendering code is actually concerned about) is used instead of
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/sodium.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"core.checks.VertexBufferMixin",
"core.checks.VertexFormatMixin",
"core.checks.WindowFramebufferMixin",
"core.gui.DownloadingTerrainScreenMixin",
"core.gui.WorldLoadingStateMixin",
"core.model.colors.BlockColorsMixin",
"core.model.colors.ItemColorsMixin",
"core.model.quad.BakedQuadMixin",
Expand Down

0 comments on commit 5042bdc

Please sign in to comment.