Browse Source

stream bad

Signed-off-by: shedaniel <daniel@shedaniel.me>
shedaniel 5 years ago
parent
commit
3a48467856

+ 1 - 1
gradle.properties

@@ -2,6 +2,6 @@ minecraft_version=20w12a
 yarn_mappings=20w12a+build.3
 loader_version=0.7.8+build.186
 fabric_version=0.5.4+build.310-1.16
-mod_version=3.2.0-unstable
+mod_version=3.2.1-unstable
 modmenu_version=1.11.0+build.2
 nec_version=1.2.3+1.15.1

+ 3 - 1
src/main/java/me/shedaniel/clothconfig2/impl/ScissorsHandlerImpl.java

@@ -70,7 +70,9 @@ public final class ScissorsHandlerImpl implements ScissorsHandler {
     public void applyScissors() {
         if (!scissorsAreas.isEmpty()) {
             Rectangle r = scissorsAreas.get(0).clone();
-            scissorsAreas.stream().skip(1L).forEach(rectangle -> r.setBounds(r.intersects(rectangle) ? r.intersection(rectangle) : new Rectangle()));
+            for (int i = 1; i < scissorsAreas.size(); i++) {
+                r.setBounds(r.intersection(scissorsAreas.get(i)));
+            }
             Window window = MinecraftClient.getInstance().getWindow();
             double scaleFactor = window.getScaleFactor();
             GL11.glEnable(GL11.GL_SCISSOR_TEST);