aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/client/ConfigObject.java
blob: 5363e672c20bd0bf918639df4555030808df05d4 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
 * Roughly Enough Items by Danielshe.
 * Licensed under the MIT License.
 */

package me.shedaniel.rei.client;

import blue.endless.jankson.Comment;
import me.shedaniel.rei.gui.config.ItemCheatingMode;
import me.shedaniel.rei.gui.config.ItemListOrdering;
import me.shedaniel.rei.gui.config.RecipeScreenType;

public class ConfigObject {
    
    public boolean cheating = false;
    
    @Comment("The ordering of the items on the item panel.")
    public ItemListOrdering itemListOrdering = ItemListOrdering.registry;
    
    @Comment("The ordering of the items on the item panel.")
    public boolean isAscending = true;
    
    @Comment("To toggle the craftable button next to the search field.")
    public boolean enableCraftableOnlyButton = false;
    
    @Comment("True: search field will be on the side (left / right), false: in the middle")
    public boolean sideSearchField = false;
    
    @Comment("The command used in servers to cheat items")
    public String giveCommand = "/minecraft:give {player_name} {item_identifier}{nbt} {count}";
    
    @Comment("The command used to change gamemode")
    public String gamemodeCommand = "/gamemode {gamemode}";
    
    @Comment("The command used to change weather")
    public String weatherCommand = "/weather {weather}";
    
    @Comment("True: item panel on the left, false: on the right")
    public boolean mirrorItemPanel = false;
    
    @Comment("To disable REI's default plugin, don't change this unless you understand what you are doing")
    public boolean loadDefaultPlugin = true;
    
    @Comment("Maximum recipes viewed at one time.")
    public int maxRecipePerPage = 3;
    
    @Comment("Toggle utils buttons")
    public boolean showUtilsButtons = false;
    
    @Comment("Disable Recipe Book")
    public boolean disableRecipeBook = false;
    
    public boolean clickableRecipeArrows = true;
    
    public ItemCheatingMode itemCheatingMode = ItemCheatingMode.REI_LIKE;
    
    public boolean lightGrayRecipeBorder = false;
    
    public boolean villagerScreenPermanentScrollBar = false;
    
    public boolean darkTheme = false;
    
    public boolean registerRecipesInAnotherThread = true;
    
    public RecipeScreenType screenType = RecipeScreenType.UNSET;
    
    @Comment(
            "The location of choose page dialog, will automatically be set to your last location so there is no need to change this.")
    public RelativePoint choosePageDialogPoint = new RelativePoint(.5, .5);
    
    public static class RelativePoint {
        
        private double relativeX, relativeY;
        
        public RelativePoint(double relativeX, double relativeY) {
            this.relativeX = relativeX;
            this.relativeY = relativeY;
        }
        
        public double getRelativeX() {
            return relativeX;
        }
        
        public double getRelativeY() {
            return relativeY;
        }
        
        public double getX(double width) {
            return width * relativeX;
        }
        
        public double getY(double height) {
            return height * relativeY;
        }
        
    }
    
}