mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-13 07:46:07 +01:00
Update virtual rendering workarounds
- Require Fabric API >=0.75.1 - Only wrap with CullingBakedModel if Indium is installed
This commit is contained in:
parent
95cf9dbe78
commit
dc43d22c8b
3 changed files with 4 additions and 4 deletions
|
@ -21,7 +21,7 @@ public class CullingBakedModel extends ForwardingBakedModel {
|
|||
protected final BlockPos.MutableBlockPos mutablePos = new BlockPos.MutableBlockPos();
|
||||
|
||||
public static BakedModel wrap(BakedModel model) {
|
||||
if (!FabricModelUtil.FREX_LOADED) {
|
||||
if (FabricModelUtil.INDIUM_LOADED) {
|
||||
CullingBakedModel wrapper = THREAD_LOCAL.get();
|
||||
wrapper.wrapped = model;
|
||||
return wrapper;
|
||||
|
|
|
@ -25,7 +25,7 @@ public class FabricModelUtil {
|
|||
private static final ShadedPredicate SHADED_PREDICATE = createShadedPredicate();
|
||||
|
||||
private static BlendModeGetter createBlendModeGetter() {
|
||||
if (FabricLoader.getInstance().isModLoaded("frex")) {
|
||||
if (FREX_LOADED) {
|
||||
try {
|
||||
Field frexQuadField = FabricQuadView.class.getDeclaredField("wrapped");
|
||||
frexQuadField.setAccessible(true);
|
||||
|
@ -57,7 +57,7 @@ public class FabricModelUtil {
|
|||
} catch (Exception e) {
|
||||
Flywheel.LOGGER.error("Detected FREX but failed to load quad wrapper field", e);
|
||||
}
|
||||
} else if (FabricLoader.getInstance().isModLoaded("indium")) {
|
||||
} else if (INDIUM_LOADED) {
|
||||
return quad -> ((link.infra.indium.renderer.RenderMaterialImpl) quad.material()).blendMode(0);
|
||||
} else if (RendererAccess.INSTANCE.getRenderer() instanceof IndigoRenderer) {
|
||||
return quad -> ((RenderMaterialImpl) quad.material()).blendMode(0);
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
"depends": {
|
||||
"fabricloader": ">=0.11.3",
|
||||
"fabric": "*",
|
||||
"fabric": ">=0.75.1",
|
||||
"minecraft": ">=1.18.2",
|
||||
"java": ">=17"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue