-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
25 additions
and
37 deletions.
There are no files selected for viewing
6 changes: 2 additions & 4 deletions
6
common/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplat.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
package dev.engine_room.flywheel.impl; | ||
|
||
import java.util.function.BooleanSupplier; | ||
|
||
import dev.engine_room.flywheel.api.internal.DependencyInjection; | ||
import net.minecraft.client.multiplayer.ClientLevel; | ||
|
||
public interface FlwImplXplat { | ||
FlwImplXplat INSTANCE = DependencyInjection.load(FlwImplXplat.class, "dev.engine_room.flywheel.impl.FlwImplXplatImpl"); | ||
|
||
boolean getModLoaded(String modId); | ||
|
||
void dispatchReloadLevelRendererEvent(ClientLevel level); | ||
|
||
String getVersionStr(); | ||
|
||
FlwConfig getConfig(); | ||
|
||
BooleanSupplier getModLoaded(String modId); | ||
} |
18 changes: 6 additions & 12 deletions
18
common/src/main/java/dev/engine_room/flywheel/impl/compat/CompatMods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,17 @@ | ||
package dev.engine_room.flywheel.impl.compat; | ||
|
||
import java.util.function.BooleanSupplier; | ||
|
||
import dev.engine_room.flywheel.impl.FlwImplXplat; | ||
|
||
public enum CompatMods { | ||
SODIUM("sodium"), | ||
RUBIDIUM("rubidium"), | ||
EMBEDDIUM("embeddium"), | ||
IRIS("iris"), | ||
OCULUS("oculus"); | ||
|
||
private final BooleanSupplier isLoaded; | ||
OCULUS("oculus"), | ||
RUBIDIUM("rubidium"), | ||
SODIUM("sodium"); | ||
|
||
CompatMods(String modid) { | ||
isLoaded = FlwImplXplat.INSTANCE.getModLoaded(modid); | ||
} | ||
public final boolean isLoaded; | ||
|
||
public boolean isLoaded() { | ||
return isLoaded.getAsBoolean(); | ||
CompatMods(String modId) { | ||
isLoaded = FlwImplXplat.INSTANCE.getModLoaded(modId); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters