-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite CTM predicate handling again, fix more bugs
- Loading branch information
Showing
2 changed files
with
60 additions
and
22 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
forge/src/main/java/org/embeddedt/modernfix/forge/dynresources/ModernFixCTMPredicate.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.embeddedt.modernfix.forge.dynresources; | ||
|
||
import net.minecraft.client.renderer.RenderType; | ||
|
||
import java.util.function.Predicate; | ||
|
||
public class ModernFixCTMPredicate implements Predicate<RenderType> { | ||
public Predicate<RenderType> ctmOverride; | ||
public Predicate<RenderType> defaultPredicate = type -> type == RenderType.solid(); | ||
|
||
@Override | ||
public boolean test(RenderType renderType) { | ||
Predicate<RenderType> override = ctmOverride; | ||
return override != null ? override.test(renderType) : defaultPredicate.test(renderType); | ||
} | ||
} |
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