Skip to content

Commit

Permalink
Twas a snowy night full of scripting the builds
Browse files Browse the repository at this point in the history
- Post merge fixes
- Remove stubs
  • Loading branch information
IThundxr committed Nov 2, 2024
1 parent 6a71ed8 commit 90395f0
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 250 deletions.
1 change: 1 addition & 0 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ dependencies {
modCompileOnly("net.fabricmc:fabric-loader:${property("fabric_loader_version")}")

modCompileOnly("maven.modrinth:sodium:${property("sodium_version")}-fabric")
modCompileOnly("maven.modrinth:iris:${property("iris_version")}-fabric")

testImplementation("org.junit.jupiter:junit-jupiter:5.8.1")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,4 @@ public interface FlwImplXplat {
String getVersionStr();

FlwConfig getConfig();

boolean useSodium0_6Compat();

boolean useIrisCompat();
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package dev.engine_room.flywheel.impl.compat;

import dev.engine_room.flywheel.impl.FlwImpl;
import dev.engine_room.flywheel.impl.FlwImplXplat;
import net.irisshaders.iris.api.v0.IrisApi;

public final class IrisCompat {
public static final boolean ACTIVE = FlwImplXplat.INSTANCE.useIrisCompat();
public static final boolean ACTIVE = CompatMod.IRIS.isLoaded;

static {
if (ACTIVE) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@

import dev.engine_room.flywheel.api.visualization.BlockEntityVisualizer;
import dev.engine_room.flywheel.impl.FlwImpl;
import dev.engine_room.flywheel.impl.FlwImplXplat;
import dev.engine_room.flywheel.lib.visualization.VisualizationHelper;
import net.caffeinemc.mods.sodium.api.blockentity.BlockEntityRenderHandler;
import net.caffeinemc.mods.sodium.api.blockentity.BlockEntityRenderPredicate;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;

public final class SodiumCompat {
public static final boolean USE_0_6_COMPAT = FlwImplXplat.INSTANCE.useSodium0_6Compat();
public static final boolean ACTIVE = CompatMod.SODIUM.isLoaded;

static {
if (USE_0_6_COMPAT) {
FlwImpl.LOGGER.debug("Detected Sodium 0.6");
if (ACTIVE) {
FlwImpl.LOGGER.debug("Detected Sodium");
}
}

Expand All @@ -25,7 +24,7 @@ private SodiumCompat() {

@Nullable
public static <T extends BlockEntity> Object onSetBlockEntityVisualizer(BlockEntityType<T> type, @Nullable BlockEntityVisualizer<? super T> oldVisualizer, @Nullable BlockEntityVisualizer<? super T> newVisualizer, @Nullable Object predicate) {
if (!USE_0_6_COMPAT) {
if (!ACTIVE) {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ abstract class BlockEntityTypeMixin<T extends BlockEntity> implements BlockEntit

@Override
public void flywheel$setVisualizer(@Nullable BlockEntityVisualizer<? super T> visualizer) {
if (SodiumCompat.USE_0_6_COMPAT) {
if (SodiumCompat.ACTIVE) {
flywheel$sodiumPredicate = SodiumCompat.onSetBlockEntityVisualizer((BlockEntityType<T>) (Object) this, flywheel$visualizer, visualizer, flywheel$sodiumPredicate);
}

Expand Down

This file was deleted.

This file was deleted.

114 changes: 0 additions & 114 deletions common/src/stubs/java/net/irisshaders/iris/api/v0/IrisApi.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package dev.engine_room.flywheel.impl;

import dev.engine_room.flywheel.api.event.ReloadLevelRendererCallback;
import dev.engine_room.flywheel.impl.compat.CompatMod;
import dev.engine_room.flywheel.impl.compat.FabricSodiumCompat;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.client.multiplayer.ClientLevel;

Expand All @@ -26,14 +24,4 @@ public String getVersionStr() {
public FlwConfig getConfig() {
return FabricFlwConfig.INSTANCE;
}

@Override
public boolean useSodium0_6Compat() {
return FabricSodiumCompat.USE_0_6_COMPAT;
}

@Override
public boolean useIrisCompat() {
return CompatMod.IRIS.isLoaded;
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,4 @@ public String getVersionStr() {
public FlwConfig getConfig() {
return NeoForgeFlwConfig.INSTANCE;
}

@Override
public boolean useSodium0_6Compat() {
return CompatMod.SODIUM.isLoaded && !CompatMod.EMBEDDIUM.isLoaded;
}

@Override
public boolean useIrisCompat() {
return CompatMod.IRIS.isLoaded || CompatMod.OCULUS.isLoaded;
}
}

0 comments on commit 90395f0

Please sign in to comment.