Skip to content

Commit

Permalink
Fixed crash with sodium. Bump version to 1.2.0-beta.2
Browse files Browse the repository at this point in the history
  • Loading branch information
1foxy2 committed Dec 3, 2024
1 parent 0b77af7 commit 41ddf33
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies {
compileOnly group: 'io.github.llamalad7', name: 'mixinextras-common', version: '0.3.5'
annotationProcessor group: 'io.github.llamalad7', name: 'mixinextras-common', version: '0.3.5'

implementation "maven.modrinth:sodium:${project.sodium_version}-neoforge"
compileOnly "maven.modrinth:sodium:${project.sodium_version}-neoforge"
//implementation "maven.modrinth:client-tweaks:${project.clienttweaks_version}+neoforge-${project.minecraft_version}"

api "me.shedaniel.cloth:cloth-config-neoforge:${project.cloth_config_version}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class ItemRenderer_sodiumMixin {
opcode = 178 //Opcodes.GETSTATIC
)
)
private Direction[] moreculling$modifyDirections$Sodium() {
private static Direction[] moreculling$modifyDirections$Sodium() {
return ItemRendererStates.DIRECTIONS == null ? DirectionUtils.DIRECTIONS : ItemRendererStates.DIRECTIONS;
}

Expand All @@ -56,7 +56,7 @@ public class ItemRenderer_sodiumMixin {
"Lnet/minecraft/util/RandomSource;)Ljava/util/List;"
)
)
private List<BakedQuad> moreculling$onlySomeFaces$Sodium(BakedModel instance, BlockState blockState,
private static List<BakedQuad> moreculling$onlySomeFaces$Sodium(BakedModel instance, BlockState blockState,
Direction direction, RandomSource random,
Operation<List<BakedQuad>> original) {
if (ItemRendererStates.DIRECTIONS != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public static Optional<Boolean> shouldDrawFaceRandom(BlockGetter view, BlockStat

public static boolean shouldCullBack(ItemFrameRenderState frame) {
Direction dir = frame.direction;
BlockPos posBehind = new BlockPos((int) frame.x, (int) frame.y, (int) frame.z).relative(dir.getOpposite());
BlockPos posBehind = new BlockPos((int) Math.floor(frame.x), (int) Math.floor(frame.y), (int) Math.floor(frame.z)).relative(dir.getOpposite());
BlockState blockState = Minecraft.getInstance().level.getBlockState(posBehind);
return blockState.canOcclude() && blockState.isFaceSturdy(Minecraft.getInstance().level, posBehind, dir);
}
Expand Down
2 changes: 1 addition & 1 deletion fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies {
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"

modImplementation "maven.modrinth:modmenu:${project.modmenu_version}"
modCompileOnly "maven.modrinth:sodium:${project.sodium_version}-fabric"
modImplementation "maven.modrinth:sodium:${project.sodium_version}-fabric"
// ^ Change to `modCompileOnly` to test without sodium
//modImplementation "maven.modrinth:client-tweaks:${project.clienttweaks_version}+fabric-${project.minecraft_version}"
//modImplementation "maven.modrinth:balm:${project.clienttweaks_version}+fabric-${project.minecraft_version}"
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ neoforge_loader_version_range=[21.0.0-beta,)
fabric_loader_version=0.16.9

# Mod Properties
mod_version=1.2.0-beta.1
mod_version=1.2.0-beta.2
maven_group=ca.fxco.moreculling
archives_base_name=moreculling
license=GPL-3.0-only
Expand All @@ -38,7 +38,7 @@ modmenu_version=12.0.0-beta.1
fabric_version=0.110.5+1.21.4

# Sodium Compatibility
sodium_version=mc1.21.3-0.6.0-beta.4
sodium_version=mc1.21.4-0.6.2

# Client tweaks Compatibility
clienttweaks_version=21.3.1
Expand Down
2 changes: 1 addition & 1 deletion neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ neoForge {
}

dependencies {
compileOnly "maven.modrinth:sodium:${project.sodium_version}-neoforge"
implementation "maven.modrinth:sodium:${project.sodium_version}-neoforge"
runtimeOnly "me.shedaniel.cloth:cloth-config-neoforge:${project.cloth_config_version}"

//implementation "maven.modrinth:client-tweaks:${project.clienttweaks_version}+neoforge-${project.minecraft_version}"
Expand Down

0 comments on commit 41ddf33

Please sign in to comment.