Skip to content

Commit

Permalink
post merge fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Oct 29, 2024
1 parent 07e66bb commit ad93839
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ public enum CompatMods {
public final boolean isLoaded;

CompatMods(String modId) {
isLoaded = FlwImplXplat.INSTANCE.getModLoaded(modId);
isLoaded = FlwImplXplat.INSTANCE.isModLoaded(modId);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package dev.engine_room.flywheel.impl;

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

Expand Down Expand Up @@ -32,6 +34,6 @@ public boolean useSodium0_6Compat() {

@Override
public boolean useIrisCompat() {
return CompatMod.IRIS.isLoaded;
return CompatMods.IRIS.isLoaded;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@

import org.jetbrains.annotations.UnknownNullability;

import dev.engine_room.flywheel.impl.compat.CompatMods;
import dev.engine_room.flywheel.lib.internal.FlwLibXplat;
import dev.engine_room.flywheel.lib.model.baked.BakedModelBuilder;
import dev.engine_room.flywheel.lib.model.baked.BlockModelBuilder;
import dev.engine_room.flywheel.lib.model.baked.FabricBakedModelBuilder;
import dev.engine_room.flywheel.lib.model.baked.FabricBlockModelBuilder;
import dev.engine_room.flywheel.lib.model.baked.FabricMultiBlockModelBuilder;
import dev.engine_room.flywheel.lib.model.baked.MultiBlockModelBuilder;
import dev.engine_room.flywheel.lib.util.ShadersModHandler;
import net.irisshaders.iris.api.v0.IrisApi;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.BlockRenderDispatcher;
import net.minecraft.client.resources.model.BakedModel;
Expand Down Expand Up @@ -47,26 +44,4 @@ public BlockModelBuilder createBlockModelBuilder(BlockState state) {
public MultiBlockModelBuilder createMultiBlockModelBuilder(BlockAndTintGetter level, Iterable<BlockPos> positions) {
return new FabricMultiBlockModelBuilder(level, positions);
}

@Override
@Nullable
public ShadersModHandler.InternalHandler createIrisHandler() {
if (!CompatMods.IRIS.isLoaded) {
return null;
}

return new ShadersModHandler.InternalHandler() {
@Override
public boolean isShaderPackInUse() {
return IrisApi.getInstance()
.isShaderPackInUse();
}

@Override
public boolean isRenderingShadowPass() {
return IrisApi.getInstance()
.isRenderingShadowPass();
}
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import net.minecraft.client.multiplayer.ClientLevel;
import net.neoforged.fml.loading.LoadingModList;
import net.neoforged.neoforge.common.NeoForge;
import net.minecraftforge.fml.loading.LoadingModList;

public class FlwImplXplatImpl implements FlwImplXplat {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@

import org.jetbrains.annotations.UnknownNullability;

import dev.engine_room.flywheel.impl.compat.CompatMods;
import dev.engine_room.flywheel.lib.internal.FlwLibXplat;
import dev.engine_room.flywheel.lib.model.baked.BakedModelBuilder;
import dev.engine_room.flywheel.lib.model.baked.BlockModelBuilder;
import dev.engine_room.flywheel.lib.model.baked.MultiBlockModelBuilder;
import dev.engine_room.flywheel.lib.model.baked.NeoForgeBakedModelBuilder;
import dev.engine_room.flywheel.lib.model.baked.NeoForgeBlockModelBuilder;
import dev.engine_room.flywheel.lib.model.baked.NeoForgeMultiBlockModelBuilder;
import dev.engine_room.flywheel.lib.util.ShadersModHandler;
import net.irisshaders.iris.api.v0.IrisApi;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.BlockRenderDispatcher;
import net.minecraft.client.renderer.block.ModelBlockRenderer;
Expand Down Expand Up @@ -64,26 +61,4 @@ public BlockModelBuilder createBlockModelBuilder(BlockState state) {
public MultiBlockModelBuilder createMultiBlockModelBuilder(BlockAndTintGetter level, Iterable<BlockPos> positions) {
return new NeoForgeMultiBlockModelBuilder(level, positions);
}

@Override
@Nullable
public ShadersModHandler.InternalHandler createIrisHandler() {
if (!CompatMods.IRIS.isLoaded) {
return null;
}

return new ShadersModHandler.InternalHandler() {
@Override
public boolean isShaderPackInUse() {
return IrisApi.getInstance()
.isShaderPackInUse();
}

@Override
public boolean isRenderingShadowPass() {
return IrisApi.getInstance()
.isRenderingShadowPass();
}
};
}
}

This file was deleted.

0 comments on commit ad93839

Please sign in to comment.