Backport some JEI features

* Licensed under LGPL
* Remove TMI style
* Remove Load/Save inventory state
* Reworked ItemPanel so it's no longer used statically
* BookmarkPanel inherits from ItemPanel
* Rework LayoutManager
* Bookmarks - including loading & saving
* Utility/Cheat buttons line up and wrap based on GUI size
This commit is contained in:
Jason Mitchell committed 2019-12-30 14:32:55 -08:00
1 parent 5087a95e02
commit 6d9ff9ea0a
54 files changed
+1604 -919

No files matched your search

@@ -5,7 +5,11 @@ import codechicken.nei.LayoutManager;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
import java.util.*;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import static codechicken.lib.gui.GuiDraw.drawString;
@@ -70,9 +74,9 @@ public abstract class OptionStringSet extends Option
public boolean clickButton(int mousex, int mousey, int button) {
int x = buttonX();
List<String> values = values();
for (int i = 0; i < options.size(); i++) {
for (String option : options) {
if (new Rectangle4i(x, 0, 20, 20).contains(mousex, mousey)) {
String s = options.get(i);
String s = option;
boolean set = values.contains(s);
if (button == 0 && !set) {
setValue(s);