aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/api/BaseBoundsHandler.java
blob: 7d311609f617b6db0eef08d6eb1f63fed29de0a3 (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
/*
 * 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
     */
    List<Rectangle> getCurrentExclusionZones(Class<?> currentScreenClass, boolean isOnRightSide);
    
    /**
     * Register an exclusion zone
     *
     * @param screenClass the screen
     * @param supplier    the exclusion zone supplier
     */
    void registerExclusionZones(Class<?> 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);
    }
}