blob: 7efc6d19a5a86ae1453c7920ea298f202e363b5c (
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
|
/*
* Copyright (c) 2018, 2019, 2020 shedaniel
* Licensed under the MIT License (the "License").
*/
package me.shedaniel.rei.api;
import me.shedaniel.math.api.Rectangle;
import net.minecraft.client.gui.screen.Screen;
import java.util.List;
import java.util.function.Supplier;
public interface BaseBoundsHandler extends DisplayHelper.DisplayBoundsHandler<Screen> {
static BaseBoundsHandler getInstance() {
return DisplayHelper.getInstance().getBaseBoundsHandler();
}
/**
* Gets the exclusion zones by the screen class
*
* @param currentScreenClass the current screen class
* @return the list of exclusion zones
*/
default List<Rectangle> getExclusionZones(Class<?> currentScreenClass) {
return getExclusionZones(currentScreenClass, false);
}
List<Rectangle> getExclusionZones(Class<?> currentScreenClass, boolean sort);
int supplierSize();
/**
* Register an exclusion zone
*
* @param screenClass the screen
* @param supplier the exclusion zone supplier, returns the list of exclusion zones
*/
void registerExclusionZones(Class<?> screenClass, Supplier<List<Rectangle>> supplier);
}
|