blob: b93730a5147ad016e6fd0397323bd41ad52f3688 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
/*
* Roughly Enough Items by Danielshe.
* Licensed under the MIT License.
*/
package me.shedaniel.rei.api;
import net.minecraft.client.gui.screen.Screen;
import java.awt.*;
import java.util.List;
public interface BaseBoundsHandler extends DisplayHelper.DisplayBoundsHandler<Screen> {
/**
* Gets the exclusion zones by the screen class
*
* @param currentScreenClass the current screen class
* @param isOnRightSide whether the user has set the overlay to the right
* @return the list of exclusion zones
*/
default List<Rectangle> getCurrentExclusionZones(Class<? extends Screen> currentScreenClass, boolean isOnRightSide) {
return getCurrentExclusionZones(currentScreenClass, isOnRightSide, true);
}
List<Rectangle> getCurrentExclusionZones(Class<? extends Screen> currentScreenClass, boolean isOnRightSide, boolean sort);
/**
* Register an exclusion zone
*
* @param screenClass the screen
* @param supplier the exclusion zone supplier
*/
void registerExclusionZones(Class<? extends Screen> screenClass, ExclusionZoneSupplier supplier);
public static interface ExclusionZoneSupplier {
/**
* Gets the current exclusion zones
*
* @param isOnRightSide whether the user has set the overlay to the right
* @return the list of exclusion zones
*/
List<Rectangle> apply(boolean isOnRightSide);
}
}
|