From ae4e4e79f50c9b2892abf98dbf2728505fd3347b Mon Sep 17 00:00:00 2001 From: IThundxr Date: Tue, 1 Oct 2024 21:06:00 -0400 Subject: [PATCH] post merge fixes --- .../java/dev/engine_room/flywheel/lib/model/ModelUtil.java | 2 +- .../dev/engine_room/flywheel/impl/compat/SodiumCompat.java | 1 + .../engine_room/flywheel/impl/mixin/LevelRendererMixin.java | 6 ++++-- forge/build.gradle.kts | 3 --- .../java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java | 2 +- forge/src/main/resources/META-INF/neoforge.mods.toml | 5 +++++ gradle.properties | 3 --- 7 files changed, 12 insertions(+), 10 deletions(-) diff --git a/common/src/lib/java/dev/engine_room/flywheel/lib/model/ModelUtil.java b/common/src/lib/java/dev/engine_room/flywheel/lib/model/ModelUtil.java index c559f66d0..e1557c784 100644 --- a/common/src/lib/java/dev/engine_room/flywheel/lib/model/ModelUtil.java +++ b/common/src/lib/java/dev/engine_room/flywheel/lib/model/ModelUtil.java @@ -60,7 +60,7 @@ public final class ModelUtil { if (renderType == Sheets.translucentCullBlockSheet() || renderType == Sheets.translucentItemSheet()) { return Materials.CUTOUT_BLOCK; } - if (renderType == RenderType.glint() || renderType == RenderType.glintDirect()) { + if (renderType == RenderType.glint() || renderType == RenderType.glintTranslucent()) { return Materials.GLINT; } if (renderType == RenderType.entityGlint() || renderType == RenderType.entityGlintDirect()) { diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/compat/SodiumCompat.java b/common/src/main/java/dev/engine_room/flywheel/impl/compat/SodiumCompat.java index 7b39a062b..2caf47486 100644 --- a/common/src/main/java/dev/engine_room/flywheel/impl/compat/SodiumCompat.java +++ b/common/src/main/java/dev/engine_room/flywheel/impl/compat/SodiumCompat.java @@ -6,6 +6,7 @@ import net.caffeinemc.mods.sodium.api.blockentity.BlockEntityRenderPredicate; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; +@SuppressWarnings({"unchecked", "UnstableApiUsage"}) public class SodiumCompat { public static Object forBlockEntityType(BlockEntityType type) { BlockEntityRenderPredicate predicate = (getter, pos, be) -> VisualizationHelper.tryAddBlockEntity(be); diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java index 52c32015f..0b9ae0249 100644 --- a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java +++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java @@ -14,6 +14,8 @@ import org.spongepowered.asm.mixin.injection.Group; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import com.mojang.blaze3d.vertex.PoseStack; + import dev.engine_room.flywheel.api.visualization.VisualizationManager; import dev.engine_room.flywheel.impl.FlwImplXplat; import dev.engine_room.flywheel.impl.event.RenderContextImpl; @@ -124,8 +126,8 @@ abstract class LevelRendererMixin { } @Inject(method = "renderEntity", at = @At("HEAD"), cancellable = true) - private void flywheel$decideNotToRenderEntity(Entity pEntity, double pCamX, double pCamY, double pCamZ, float pPartialTick, PoseStack pPoseStack, MultiBufferSource pBufferSource, CallbackInfo ci) { - if (VisualizationManager.supportsVisualization(pEntity.level()) && VisualizationHelper.skipVanillaRender(pEntity)) { + private void flywheel$decideNotToRenderEntity(Entity entity, double camX, double camY, double camZ, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, CallbackInfo ci) { + if (VisualizationManager.supportsVisualization(entity.level()) && VisualizationHelper.skipVanillaRender(entity)) { ci.cancel(); } } diff --git a/forge/build.gradle.kts b/forge/build.gradle.kts index 2bdcad863..af5bb02bb 100644 --- a/forge/build.gradle.kts +++ b/forge/build.gradle.kts @@ -85,9 +85,6 @@ dependencies { modCompileOnly(":sodium-neoforge-0.6.0-beta.2+mc1.21.1") modCompileOnly("maven.modrinth:iris:${property("iris_version")}-neoforge") - //modCompileOnly("maven.modrinth:embeddium:${property("embeddium_version")}") - //modCompileOnly("maven.modrinth:oculus:${property("oculus_version")}") - "forApi"(project(path = ":common", configuration = "commonApiOnly")) "forLib"(project(path = ":common", configuration = "commonLib")) "forBackend"(project(path = ":common", configuration = "commonBackend")) diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java b/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java index d7f67036a..6d476005b 100644 --- a/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java +++ b/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java @@ -101,7 +101,7 @@ public class ForgeFlwConfig implements FlwConfig { public static class ForgeBackendConfig implements BackendConfig { public final ModConfigSpec.EnumValue lightSmoothness; - public final ForgeConfigSpec.BooleanValue useLightDirections; + public final ModConfigSpec.BooleanValue useLightDirections; public ForgeBackendConfig(ModConfigSpec.Builder builder) { lightSmoothness = builder.comment("How smooth flywheel's shader-based lighting should be. May have a large performance impact.") diff --git a/forge/src/main/resources/META-INF/neoforge.mods.toml b/forge/src/main/resources/META-INF/neoforge.mods.toml index 4256c62e6..35a7234fb 100644 --- a/forge/src/main/resources/META-INF/neoforge.mods.toml +++ b/forge/src/main/resources/META-INF/neoforge.mods.toml @@ -30,3 +30,8 @@ modId = "neoforge" type = "required" versionRange = "${neoforge_version_range}" side = "CLIENT" + +[[dependencies.${mod_id}]] +modId = "embeddium" +type = "incompatible" +reason = "Remove Embeddium and install Sodium" diff --git a/gradle.properties b/gradle.properties index 77dbd3590..c0d0c3409 100644 --- a/gradle.properties +++ b/gradle.properties @@ -32,9 +32,6 @@ fabric_api_version = 0.100.6+1.21 # Build dependency mod versions sodium_version = mc1.21-0.6.0-beta.1 iris_version = 1.8.0-beta.1+1.21 -#embeddium_version = 1.0.4+mc1.21 -# no 1.21 :( -#oculus_version = 1.20.1-1.6.15a # Publication info group = dev.engine_room.flywheel