chore: rename

This commit is contained in:
Discreater committed 2021-04-29 02:36:33 +08:00
1 parent f4b0d527aa
commit 82cdf8fbe2
31 files changed
+180 -197

No files matched your search

@@ -1,8 +1,6 @@
package me.towdium.jecalculation.client.gui;
import me.towdium.jecalculation.client.gui.JecGui;
public interface IDrawable {
public interface IWidget {
void onDraw(JecGui gui, int xMouse, int yMouse);
default boolean onClicked(JecGui gui, int xMouse, int yMouse, int button) {
@@ -2,7 +2,6 @@ package me.towdium.jecalculation.client.gui;
import cpw.mods.fml.client.config.GuiUtils;
import me.towdium.jecalculation.JustEnoughCalculation;
import me.towdium.jecalculation.client.gui.drawables.DContainer;
import me.towdium.jecalculation.core.labels.ILabel;
import me.towdium.jecalculation.nei.NEIPlugin;
import me.towdium.jecalculation.polyfill.mc.client.renderer.GlStateManager;
@@ -46,14 +45,14 @@ public class JecGui extends GuiContainer {
protected JecGui parent;
public ILabel hand = ILabel.EMPTY;
public IDrawable root;
public IWidget root;
protected List<Triple<Integer, Integer, List<String>>> tooltipBuffer = new ArrayList<>();
public JecGui(@Nullable JecGui parent, IDrawable root) {
public JecGui(@Nullable JecGui parent, IWidget root) {
this(parent, false, root);
}
public JecGui(@Nullable JecGui parent, boolean acceptsTransfer, IDrawable root) {
public JecGui(@Nullable JecGui parent, boolean acceptsTransfer, IWidget root) {
super(acceptsTransfer ? new ContainerTransfer() : new ContainerNonTransfer());
this.parent = parent;
this.root = root;
@@ -64,11 +63,11 @@ public class JecGui extends GuiContainer {
return xMouse > xPos && yMouse > yPos && xMouse <= xPos + xSize && yMouse <= yPos + ySize;
}
public static void displayGui(IDrawable root) {
public static void displayGui(IWidget root) {
displayGui(true, false, root);
}
public static void displayGui(boolean updateParent, boolean acceptsTransfer, IDrawable root) {
public static void displayGui(boolean updateParent, boolean acceptsTransfer, IWidget root) {
// isCallingFromMinecraftThread
if (Minecraft.getMinecraft().func_152345_ab())
displayGuiUnsafe(updateParent, acceptsTransfer, root);
@@ -86,7 +85,7 @@ public class JecGui extends GuiContainer {
return ret;
}
private static void displayGuiUnsafe(boolean updateParent, boolean acceptsTransfer, IDrawable root) {
private static void displayGuiUnsafe(boolean updateParent, boolean acceptsTransfer, IWidget root) {
Minecraft mc = Minecraft.getMinecraft();
JecGui parent;
if (mc.currentScreen == null) parent = null;
@@ -125,7 +124,7 @@ public class JecGui extends GuiContainer {
GlStateManager.popMatrix();
GlStateManager.pushMatrix();
GlStateManager.translate(mouseX - 8, mouseY - 8, 0);
hand.drawEntry(this);
hand.drawLabel(this);
GlStateManager.popMatrix();
drawBufferedTooltip();
GlStateManager.enableLighting();
@@ -145,7 +144,7 @@ public class JecGui extends GuiContainer {
if (Mouse.getEventButtonState()) {
if (Mouse.getEventButton() == 0) {
if (hand == ILabel.EMPTY) {
ILabel e = NEIPlugin.getEntryUnderMouse();
ILabel e = NEIPlugin.getLabelUnderMouse();
if (e != ILabel.EMPTY) {
hand = e;
return true;
@@ -2,7 +2,6 @@ package me.towdium.jecalculation.client.gui.drawables;
import me.towdium.jecalculation.client.gui.JecGui;
import me.towdium.jecalculation.client.gui.Resource;
import me.towdium.jecalculation.client.gui.IDrawable;
import me.towdium.jecalculation.utils.ClientUtils;
import me.towdium.jecalculation.utils.Utilities;
@@ -14,12 +13,12 @@ import javax.annotation.ParametersAreNonnullByDefault;
* Date: 17-8-17.
*/
@ParametersAreNonnullByDefault
public abstract class DButton extends DTooltip {
public abstract class WButton extends WTooltip {
protected int xPos, yPos, xSize, ySize;
protected Runnable lsnrLeft, lsnrRight;
protected Utilities.Timer timer = new Utilities.Timer();
public DButton(int xPos, int yPos, int xSize, int ySize, @Nullable String name) {
public WButton(int xPos, int yPos, int xSize, int ySize, @Nullable String name) {
super(name);
this.xPos = xPos;
this.yPos = yPos;
@@ -27,12 +26,12 @@ public abstract class DButton extends DTooltip {
this.ySize = ySize;
}
public DButton setListenerLeft(Runnable r) {
public WButton setListenerLeft(Runnable r) {
lsnrLeft = r;
return this;
}
public DButton setListenerRight(Runnable r) {
public WButton setListenerRight(Runnable r) {
lsnrRight = r;
return this;
}
@@ -11,14 +11,14 @@ import javax.annotation.ParametersAreNonnullByDefault;
* Date: 17-9-16.
*/
@ParametersAreNonnullByDefault
public class DButtonIcon extends DButton {
public class WButtonIcon extends WButton {
protected Resource normal, focused;
public DButtonIcon(int xPos, int yPos, int xSize, int ySize, Resource normal, Resource focused) {
public WButtonIcon(int xPos, int yPos, int xSize, int ySize, Resource normal, Resource focused) {
this(xPos, yPos, xSize, ySize, normal, focused, null);
}
public DButtonIcon(int xPos, int yPos, int xSize, int ySize, Resource normal, Resource focused, @Nullable String name) {
public WButtonIcon(int xPos, int yPos, int xSize, int ySize, Resource normal, Resource focused, @Nullable String name) {
super(xPos, yPos, xSize, ySize, name);
this.normal = normal;
this.focused = focused;
@@ -10,8 +10,8 @@ import javax.annotation.ParametersAreNonnullByDefault;
* Date: 17-9-16.
*/
@ParametersAreNonnullByDefault
public class DButtonText extends DButton {
public DButtonText(int xPos, int yPos, int xSize, int ySize, String name) {
public class WButtonText extends WButton {
public WButtonText(int xPos, int yPos, int xSize, int ySize, String name) {
super(xPos, yPos, xSize, ySize, name);
}
@@ -1,7 +1,7 @@
package me.towdium.jecalculation.client.gui.drawables;
import me.towdium.jecalculation.client.gui.JecGui;
import me.towdium.jecalculation.client.gui.IDrawable;
import me.towdium.jecalculation.client.gui.IWidget;
import javax.annotation.ParametersAreNonnullByDefault;
import java.util.ArrayList;
@@ -12,25 +12,25 @@ import java.util.List;
* Date: 17-9-14.
*/
@ParametersAreNonnullByDefault
public class DContainer implements IDrawable {
protected List<IDrawable> widgets = new ArrayList<>();
public class WContainer implements IWidget {
protected List<IWidget> widgets = new ArrayList<>();
protected JecGui gui;
public void add(IDrawable w) {
public void add(IWidget w) {
widgets.add(w);
}
public void addAll(IDrawable... w) {
for (IDrawable aw : w)
public void addAll(IWidget... w) {
for (IWidget aw : w)
add(aw);
}
public void remove(IDrawable w) {
public void remove(IWidget w) {
widgets.remove(w);
}
public void removeAll(IDrawable... w) {
for (IDrawable aw : w)
public void removeAll(IWidget... w) {
for (IWidget aw : w)
remove(aw);
}
@@ -45,19 +45,19 @@ public class DContainer implements IDrawable {
@Override
public boolean onClicked(JecGui gui, int xMouse, int yMouse, int button) {
for (IDrawable w : widgets) if (w.onClicked(gui, xMouse, yMouse, button)) return true;
for (IWidget w : widgets) if (w.onClicked(gui, xMouse, yMouse, button)) return true;
return false;
}
@Override
public boolean onKey(JecGui gui, char ch, int code) {
for (IDrawable w : widgets) if (w.onKey(gui, ch, code)) return true;
for (IWidget w : widgets) if (w.onKey(gui, ch, code)) return true;
return false;
}
@Override
public boolean onScroll(JecGui gui, int xMouse, int yMouse, int diff) {
for (IDrawable w : widgets) if (w.onScroll(gui, xMouse, yMouse, diff)) return true;
for (IWidget w : widgets) if (w.onScroll(gui, xMouse, yMouse, diff)) return true;
return false;
}
@@ -1,9 +1,7 @@
package me.towdium.jecalculation.client.gui.drawables;
import me.towdium.jecalculation.client.gui.IDrawable;
import me.towdium.jecalculation.client.gui.JecGui;
import me.towdium.jecalculation.client.gui.Resource;
import me.towdium.jecalculation.utils.Utilities.Timer;
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;
@@ -14,15 +12,15 @@ import javax.annotation.ParametersAreNonnullByDefault;
* Date: 17-8-18.
*/
@ParametersAreNonnullByDefault
public class DIcon extends DTooltip {
public class WIcon extends WTooltip {
public int xPos, yPos, xSize, ySize;
public Resource normal, focused;
public DIcon(int xPos, int yPos, int xSize, int ySize, Resource normal, Resource focused) {
public WIcon(int xPos, int yPos, int xSize, int ySize, Resource normal, Resource focused) {
this(xPos, yPos, xSize, ySize, normal, focused, null);
}
public DIcon(int xPos, int yPos, int xSize, int ySize,
public WIcon(int xPos, int yPos, int xSize, int ySize,
Resource normal, Resource focused, @Nullable String name) {
super(name);
this.xPos = xPos;
@@ -1,6 +1,6 @@
package me.towdium.jecalculation.client.gui.drawables;
import me.towdium.jecalculation.client.gui.IDrawable;
import me.towdium.jecalculation.client.gui.IWidget;
import me.towdium.jecalculation.client.gui.JecGui;
import me.towdium.jecalculation.client.gui.Resource;
import me.towdium.jecalculation.core.labels.ILabel;
@@ -14,7 +14,7 @@ import java.util.ArrayList;
* Date: 17-8-17.
*/
@ParametersAreNonnullByDefault
public class DLabel implements IDrawable {
public class WLabel implements IWidget {
static JecGui.Font font;
static {
@@ -26,7 +26,7 @@ public class DLabel implements IDrawable {
public ILabel label;
public enumMode mode;
public DLabel(int xPos, int yPos, int xSize, int ySize, enumMode mode) {
public WLabel(int xPos, int yPos, int xSize, int ySize, enumMode mode) {
this.xPos = xPos;
this.yPos = yPos;
this.xSize = xSize;
@@ -46,7 +46,7 @@ public class DLabel implements IDrawable {
@Override
public void onDraw(JecGui gui, int xMouse, int yMouse) {
gui.drawResourceContinuous(Resource.WGT_SLOT, xPos, yPos, xSize, ySize, 3, 3, 3, 3);
label.drawEntry(gui, xPos + xSize / 2, yPos + ySize / 2, true);
label.drawLabel(gui, xPos + xSize / 2, yPos + ySize / 2, true);
if (mode == enumMode.RESULT || mode == enumMode.EDITOR)
gui.drawText(xPos + xSize / 2 + 7.5f, yPos + ySize / 2 + 7 -
(int) (font.size * gui.getFontRenderer().FONT_HEIGHT), font, label.getAmountString());
@@ -1,6 +1,6 @@
package me.towdium.jecalculation.client.gui.drawables;
import me.towdium.jecalculation.client.gui.IDrawable;
import me.towdium.jecalculation.client.gui.IWidget;
import me.towdium.jecalculation.client.gui.JecGui;
import me.towdium.jecalculation.core.labels.ILabel;
import me.towdium.jecalculation.utils.wrappers.Single;
@@ -16,16 +16,16 @@ import java.util.stream.IntStream;
* Date: 17-8-17.
*/
@ParametersAreNonnullByDefault
public class DLabelGroup implements IDrawable {
ArrayList<DLabel> widgets = new ArrayList<>();
public class WLabelGroup implements IWidget {
ArrayList<WLabel> widgets = new ArrayList<>();
public DLabelGroup(int xPos, int yPos, int column, int row, DLabel.enumMode mode) {
public WLabelGroup(int xPos, int yPos, int column, int row, WLabel.enumMode mode) {
this(xPos, yPos, column, row, 18, 18, mode);
}
public DLabelGroup(int xPos, int yPos, int column, int row, int xSize, int ySize, DLabel.enumMode mode) {
public WLabelGroup(int xPos, int yPos, int column, int row, int xSize, int ySize, WLabel.enumMode mode) {
IntStream.range(0, row).forEach(r -> IntStream.range(0, column).forEach(
c -> widgets.add(new DLabel(xPos + c * xSize, yPos + r * ySize, xSize, ySize, mode))));
c -> widgets.add(new WLabel(xPos + c * xSize, yPos + r * ySize, xSize, ySize, mode))));
}
@Override
@@ -38,7 +38,7 @@ public class DLabelGroup implements IDrawable {
return widgets.stream().anyMatch(w -> w.onClicked(gui, xMouse, yMouse, button));
}
public Optional<DLabel> getEntryAt(int xMouse, int yMouse) {
public Optional<WLabel> getLabelAt(int xMouse, int yMouse) {
return widgets.stream().filter(w -> w.mouseIn(xMouse, yMouse)).findFirst();
}
@@ -14,24 +14,24 @@ import java.util.stream.Collectors;
* Date: 17-9-17.
*/
@ParametersAreNonnullByDefault
public class DLabelScroll extends DContainer {
public class WLabelScroll extends WContainer {
protected List<ILabel> labels = new ArrayList<>();
protected List<ILabel> filtered = new ArrayList<>();
protected DLabelGroup labelGroup;
protected DScroll scroll;
protected WLabelGroup labelGroup;
protected WScroll scroll;
protected int xPos, yPos, column, row, current;
protected String filter = "";
public DLabelScroll(int xPos, int yPos, int column, int row, DLabel.enumMode mode, boolean drawConnection) {
public WLabelScroll(int xPos, int yPos, int column, int row, WLabel.enumMode mode, boolean drawConnection) {
this.xPos = xPos;
this.yPos = yPos;
this.column = column;
this.row = row;
labelGroup = new DLabelGroup(xPos, yPos, column, row, mode);
scroll = new DScroll(xPos + column * 18 + 4, yPos, row * 18).setLsnrScroll(this::update);
labelGroup = new WLabelGroup(xPos, yPos, column, row, mode);
scroll = new WScroll(xPos + column * 18 + 4, yPos, row * 18).setLsnrScroll(this::update);
add(labelGroup);
add(scroll);
if (drawConnection) add(new DRectangle(xPos + column * 18, yPos, 4, row * 18, JecGui.COLOR_GUI_GREY));
if (drawConnection) add(new WRectangle(xPos + column * 18, yPos, 4, row * 18, JecGui.COLOR_GUI_GREY));
}
public void update(float f) {
@@ -52,7 +52,7 @@ public class DLabelScroll extends DContainer {
return 1f / (getStepAmount() - 1) * step;
}
public DLabelScroll setLabels(List<ILabel> labels) {
public WLabelScroll setLabels(List<ILabel> labels) {
this.labels = labels;
setFilter(filter);
return this;
@@ -1,6 +1,6 @@
package me.towdium.jecalculation.client.gui.drawables;
import me.towdium.jecalculation.client.gui.IDrawable;
import me.towdium.jecalculation.client.gui.IWidget;
import me.towdium.jecalculation.client.gui.JecGui;
import me.towdium.jecalculation.client.gui.Resource;
@@ -11,10 +11,10 @@ import javax.annotation.ParametersAreNonnullByDefault;
* Date: 17-8-18.
*/
@ParametersAreNonnullByDefault
public class DLine implements IDrawable {
public class WLine implements IWidget {
public int y;
public DLine(int y) {
public WLine(int y) {
this.y = y;
}
@@ -1,6 +1,6 @@
package me.towdium.jecalculation.client.gui.drawables;
import me.towdium.jecalculation.client.gui.IDrawable;
import me.towdium.jecalculation.client.gui.IWidget;
import me.towdium.jecalculation.client.gui.JecGui;
import me.towdium.jecalculation.client.gui.Resource;
import me.towdium.jecalculation.core.labels.ILabel;
@@ -13,7 +13,7 @@ import javax.annotation.ParametersAreNonnullByDefault;
* Date: 17-9-16.
*/
@ParametersAreNonnullByDefault
public class DPage implements IDrawable {
public class WPage implements IWidget {
protected int index;
@@ -22,7 +22,7 @@ public class DPage implements IDrawable {
protected boolean focused;
protected Runnable listener;
public DPage(int index, ILabel.RegistryEditor.Record record, boolean focused) {
public WPage(int index, ILabel.RegistryEditor.Record record, boolean focused) {
this.index = index;
this.record = record;
this.focused = focused;
@@ -33,7 +33,7 @@ public class DPage implements IDrawable {
Resource resource = focused ? (index == 0 ? Resource.WGT_PAGER_F0 : Resource.WGT_PAGER_FN)
: Resource.WGT_PAGER_N;
gui.drawResourceContinuous(resource, index * 24, -21, 24, 25, 4, 4, 4, 4);
record.representation.drawEntry(gui, index * 24 + 4, -17, false);
record.representation.drawLabel(gui, index * 24 + 4, -17, false);
timer.setState(JecGui.mouseIn(index * 24, -21, 24, 21, xMouse, yMouse));
if (timer.getTime() > 1000)
gui.drawTooltip(xMouse, yMouse, Utilities.L18n.format("gui." + record.localizeKey));
@@ -46,7 +46,7 @@ public class DPage implements IDrawable {
return ret;
}
public DPage setListener(Runnable r) {
public WPage setListener(Runnable r) {
listener = r;
return this;
}
@@ -1,6 +1,6 @@
package me.towdium.jecalculation.client.gui.drawables;
import me.towdium.jecalculation.client.gui.IDrawable;
import me.towdium.jecalculation.client.gui.IWidget;
import me.towdium.jecalculation.client.gui.JecGui;
import me.towdium.jecalculation.client.gui.Resource;
@@ -11,7 +11,7 @@ import javax.annotation.ParametersAreNonnullByDefault;
* Date: 17-9-15.
*/
@ParametersAreNonnullByDefault
public class DPanel implements IDrawable {
public class WPanel implements IWidget {
@Override
public void onDraw(JecGui gui, int xMouse, int yMouse) {
gui.drawResourceContinuous(Resource.WGT_PANEL, 0, 0, gui.getXSize(), gui.getYSize(), 5, 5, 5, 5);
@@ -1,6 +1,6 @@
package me.towdium.jecalculation.client.gui.drawables;
import me.towdium.jecalculation.client.gui.IDrawable;
import me.towdium.jecalculation.client.gui.IWidget;
import me.towdium.jecalculation.client.gui.JecGui;
import javax.annotation.ParametersAreNonnullByDefault;
@@ -10,10 +10,10 @@ import javax.annotation.ParametersAreNonnullByDefault;
* Date: 17-8-22.
*/
@ParametersAreNonnullByDefault
public class DRectangle implements IDrawable {
public class WRectangle implements IWidget {
public int xPos, yPos, xSize, ySize, color;
public DRectangle(int xPos, int yPos, int xSize, int ySize, int color) {
public WRectangle(int xPos, int yPos, int xSize, int ySize, int color) {
this.xPos = xPos;
this.yPos = yPos;
this.xSize = xSize;
@@ -1,29 +1,24 @@
package me.towdium.jecalculation.client.gui.drawables;
import me.towdium.jecalculation.client.gui.IDrawable;
import me.towdium.jecalculation.client.gui.IWidget;
import me.towdium.jecalculation.client.gui.JecGui;
import me.towdium.jecalculation.client.gui.Resource;
import me.towdium.jecalculation.utils.Utilities.Circulator;
import org.lwjgl.input.Mouse;
import javax.annotation.ParametersAreNonnullByDefault;
import java.util.List;
import java.util.function.Consumer;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;
/**
* Author: towdium
* Date: 17-8-19.
*/
@ParametersAreNonnullByDefault
public class DScroll implements IDrawable {
public class WScroll implements IWidget {
public int xPos, yPos, ySize, current;
public Consumer<Float> lsnrScroll;
protected boolean drag;
public DScroll(int xPos, int yPos, int ySize) {
public WScroll(int xPos, int yPos, int ySize) {
this.xPos = xPos;
this.yPos = yPos;
this.ySize = ySize;
@@ -60,7 +55,7 @@ public class DScroll implements IDrawable {
return JecGui.mouseIn(xPos + 1, yPos + 1, 12, ySize - 2, xMouse, yMouse);
}
public DScroll setLsnrScroll(Consumer<Float> lsnrScroll) {
public WScroll setLsnrScroll(Consumer<Float> lsnrScroll) {
this.lsnrScroll = lsnrScroll;
return this;
}
@@ -13,13 +13,13 @@ import java.util.function.Consumer;
* Date: 17-9-28.
*/
@ParametersAreNonnullByDefault
public class DSearch extends DContainer {
DTextField tf;
List<DLabelScroll> lss;
public class WSearch extends WContainer {
WTextField tf;
List<WLabelScroll> lss;
Consumer<ILabel> callback;
public DSearch(Consumer<ILabel> callback, DTextField tf, DLabelScroll... lss) {
List<DLabelScroll> lst = Arrays.asList(lss);
public WSearch(Consumer<ILabel> callback, WTextField tf, WLabelScroll... lss) {
List<WLabelScroll> lst = Arrays.asList(lss);
tf.setLsnrText(s -> tf.setColor(lst.stream().anyMatch(ls -> ls.setFilter(s)) ?
JecGui.COLOR_TEXT_WHITE : JecGui.COLOR_TEXT_RED));
add(tf);
@@ -1,6 +1,6 @@
package me.towdium.jecalculation.client.gui.drawables;
import me.towdium.jecalculation.client.gui.IDrawable;
import me.towdium.jecalculation.client.gui.IWidget;
import me.towdium.jecalculation.client.gui.JecGui;
import me.towdium.jecalculation.client.gui.Resource;
import me.towdium.jecalculation.utils.Utilities.Circulator;
@@ -16,39 +16,39 @@ import java.util.stream.Stream;
* Date: 17-8-19.
*/
@ParametersAreNonnullByDefault
public class DSwitcher implements IDrawable {
public class WSwitcher implements IWidget {
public static final int SIZE = 13;
protected int xPos, xSize, yPos;
protected DButton left, right;
protected DRectangle wRect;
protected DText dText;
protected WButton left, right;
protected WRectangle wRect;
protected WText wText;
protected List<String> keys;
protected Circulator index;
public DSwitcher(int xPos, int yPos, int xSize, int total) {
public WSwitcher(int xPos, int yPos, int xSize, int total) {
this(xPos, yPos, xSize, IntStream.rangeClosed(1, total)
.mapToObj(i -> i + "/" + total).collect(Collectors.toList()));
}
public DSwitcher(int xPos, int yPos, int xSize, List<String> keys) {
public WSwitcher(int xPos, int yPos, int xSize, List<String> keys) {
this.xPos = xPos;
this.xSize = xSize;
this.yPos = yPos;
this.keys = keys;
left = new DButtonIcon(xPos, yPos, SIZE, SIZE, Resource.WGT_ARR_L_N, Resource.WGT_ARR_L_F)
left = new WButtonIcon(xPos, yPos, SIZE, SIZE, Resource.WGT_ARR_L_N, Resource.WGT_ARR_L_F)
.setListenerLeft(() -> index.prev());
right = new DButtonIcon(xPos + xSize - SIZE, yPos, SIZE, SIZE, Resource.WGT_ARR_R_N, Resource.WGT_ARR_R_F)
right = new WButtonIcon(xPos + xSize - SIZE, yPos, SIZE, SIZE, Resource.WGT_ARR_R_N, Resource.WGT_ARR_R_F)
.setListenerLeft(() -> index.next());
wRect = new DRectangle(xPos + SIZE, yPos, xSize - 2 * SIZE, SIZE, JecGui.COLOR_GUI_GREY);
dText = new DText(xPos + SIZE, yPos, xSize - 2 * SIZE, SIZE, JecGui.Font.DEFAULT_SHADOW,
() -> keys.get(index.index()));
wRect = new WRectangle(xPos + SIZE, yPos, xSize - 2 * SIZE, SIZE, JecGui.COLOR_GUI_GREY);
wText = new WText(xPos + SIZE, yPos, xSize - 2 * SIZE, SIZE, JecGui.Font.DEFAULT_SHADOW,
() -> keys.get(index.index()));
index = new Circulator(keys.size());
}
@Override
public void onDraw(JecGui gui, int xMouse, int yMouse) {
Stream.of(left, right, wRect, dText).forEach(w -> w.onDraw(gui, xMouse, yMouse));
Stream.of(left, right, wRect, wText).forEach(w -> w.onDraw(gui, xMouse, yMouse));
}
@Override
@@ -1,6 +1,6 @@
package me.towdium.jecalculation.client.gui.drawables;
import me.towdium.jecalculation.client.gui.IDrawable;
import me.towdium.jecalculation.client.gui.IWidget;
import me.towdium.jecalculation.client.gui.JecGui;
import javax.annotation.ParametersAreNonnullByDefault;
@@ -11,35 +11,35 @@ import java.util.function.Supplier;
* Date: 17-8-21.
*/
@ParametersAreNonnullByDefault
public class DText implements IDrawable {
public class WText implements IWidget {
public static final int UNDEFINED = Integer.MAX_VALUE;
public int xPos, yPos, xSize, ySize;
public JecGui.Font font;
public Supplier<String> key;
public DText(int xPos, int yPos, JecGui.Font font, String key) {
public WText(int xPos, int yPos, JecGui.Font font, String key) {
this(xPos, yPos, UNDEFINED, UNDEFINED, font, key);
}
public DText(int xPos, int yPos, JecGui.Font font, Supplier<String> key) {
public WText(int xPos, int yPos, JecGui.Font font, Supplier<String> key) {
this(xPos, yPos, UNDEFINED, UNDEFINED, font, key);
}
public DText(int xPos, int yPos, int xSize, JecGui.Font font, String key) {
public WText(int xPos, int yPos, int xSize, JecGui.Font font, String key) {
this(xPos, yPos, xSize, UNDEFINED, font, key);
}
public DText(int xPos, int yPos, int xSize, JecGui.Font font, Supplier<String> key) {
public WText(int xPos, int yPos, int xSize, JecGui.Font font, Supplier<String> key) {
this(xPos, yPos, xSize, UNDEFINED, font, key);
}
public DText(int xPos, int yPos, int xSize, int ySize, JecGui.Font font, String key) {
public WText(int xPos, int yPos, int xSize, int ySize, JecGui.Font font, String key) {
this(xPos, yPos, xSize, UNDEFINED, font, () -> key);
}
public DText(int xPos, int yPos, int xSize, int ySize, JecGui.Font font, Supplier<String> key) {
public WText(int xPos, int yPos, int xSize, int ySize, JecGui.Font font, Supplier<String> key) {
this.xPos = xPos;
this.yPos = yPos;
this.xSize = xSize;
@@ -1,7 +1,7 @@
package me.towdium.jecalculation.client.gui.drawables;
import me.towdium.jecalculation.client.gui.JecGui;
import me.towdium.jecalculation.client.gui.IDrawable;
import me.towdium.jecalculation.client.gui.IWidget;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiTextField;
@@ -13,12 +13,12 @@ import java.util.function.Consumer;
* Date: 17-8-18.
*/
@ParametersAreNonnullByDefault
public class DTextField implements IDrawable {
public class WTextField implements IWidget {
protected int xPos, yPos, xSize;
GuiTextField textField;
public Consumer<String> lsnrText;
public DTextField(int xPos, int yPos, int xSize) {
public WTextField(int xPos, int yPos, int xSize) {
this.xPos = xPos;
this.yPos = yPos;
this.xSize = xSize;
@@ -46,12 +46,12 @@ public class DTextField implements IDrawable {
}
@SuppressWarnings("UnusedReturnValue")
public DTextField setLsnrText(Consumer<String> lsnrText) {
public WTextField setLsnrText(Consumer<String> lsnrText) {
this.lsnrText = lsnrText;
return this;
}
public DTextField setColor(int color) {
public WTextField setColor(int color) {
textField.setTextColor(color);
return this;
}
@@ -1,6 +1,6 @@
package me.towdium.jecalculation.client.gui.drawables;
import me.towdium.jecalculation.client.gui.IDrawable;
import me.towdium.jecalculation.client.gui.IWidget;
import me.towdium.jecalculation.client.gui.JecGui;
import me.towdium.jecalculation.utils.Utilities;
import me.towdium.jecalculation.utils.wrappers.Pair;
@@ -13,12 +13,12 @@ import javax.annotation.ParametersAreNonnullByDefault;
* Date: 17-9-16.
*/
@ParametersAreNonnullByDefault
public abstract class DTooltip implements IDrawable {
public abstract class WTooltip implements IWidget {
@Nullable
public String name;
Utilities.Timer timer = new Utilities.Timer();
public DTooltip(@Nullable String name) {
public WTooltip(@Nullable String name) {
this.name = name;
}
@@ -6,30 +6,30 @@ import me.towdium.jecalculation.client.gui.drawables.*;
import javax.annotation.ParametersAreNonnullByDefault;
import static me.towdium.jecalculation.client.gui.drawables.DLabel.enumMode.*;
import static me.towdium.jecalculation.client.gui.drawables.WLabel.enumMode.*;
/**
* Author: towdium
* Date: 8/14/17.
*/
@ParametersAreNonnullByDefault
public class GuiCalculator extends DContainer {
public class GuiCalculator extends WContainer {
public GuiCalculator() {
add(new DPanel());
add(new DTextField(61, 7, 64));
add(new DButtonIcon(7, 7, 20, 20, Resource.BTN_LABEL_N, Resource.BTN_LABEL_F, "calculator.label")
add(new WPanel());
add(new WTextField(61, 7, 64));
add(new WButtonIcon(7, 7, 20, 20, Resource.BTN_LABEL_N, Resource.BTN_LABEL_F, "calculator.label")
.setListenerLeft(() -> JecGui.displayGui(new GuiLabel(l -> {
JecGui.displayParent();
JecGui.getCurrent().hand = l;
}))));
add(new DButtonIcon(130, 7, 20, 20, Resource.BTN_NEW_N, Resource.BTN_NEW_F, "calculator.recipe")
add(new WButtonIcon(130, 7, 20, 20, Resource.BTN_NEW_N, Resource.BTN_NEW_F, "calculator.recipe")
.setListenerLeft(() -> JecGui.displayGui(true, true, new GuiRecipe())));
add(new DButtonIcon(149, 7, 20, 20, Resource.BTN_SEARCH_N, Resource.BTN_SEARCH_F, "calculator.search"));
add(new DLabelGroup(7, 87, 9, 4, RESULT));
add(new DLabelGroup(7, 31, 8, 1, PICKER));
add(new DLabel(31, 7, 20, 20, SELECTOR));
add(new DLine(52));
add(new DIcon(151, 31, 18, 18, Resource.ICN_RECENT_N, Resource.ICN_RECENT_F, "calculator.history"));
add(new DSwitcher(7, 56, 162, 5));
add(new WButtonIcon(149, 7, 20, 20, Resource.BTN_SEARCH_N, Resource.BTN_SEARCH_F, "calculator.search"));
add(new WLabelGroup(7, 87, 9, 4, RESULT));
add(new WLabelGroup(7, 31, 8, 1, PICKER));
add(new WLabel(31, 7, 20, 20, SELECTOR));
add(new WLine(52));
add(new WIcon(151, 31, 18, 18, Resource.ICN_RECENT_N, Resource.ICN_RECENT_F, "calculator.history"));
add(new WSwitcher(7, 56, 162, 5));
}
}
@@ -1,6 +1,5 @@
package me.towdium.jecalculation.client.gui.guis;
import me.towdium.jecalculation.client.gui.JecGui;
import me.towdium.jecalculation.client.gui.Resource;
import me.towdium.jecalculation.client.gui.drawables.*;
import me.towdium.jecalculation.core.labels.ILabel;
@@ -15,20 +14,20 @@ import java.util.stream.IntStream;
* Author: towdium
* Date: 17-9-16.
*/
public class GuiDisambiguation extends DContainer {
public class GuiDisambiguation extends WContainer {
public GuiDisambiguation(List<List<ItemStack>> iss) {
ArrayList<ILabel> labels = new ArrayList<>();
IntStream.range(0, 50).forEach(i -> labels.add(new LabelOreDict(i % 2 == 0 ? "plankWood" : "ingotIron", i)));
DLabelScroll lsUp = new DLabelScroll(25, 48, 7, 3, DLabel.enumMode.RESULT, true).setLabels(labels);
DLabelScroll lsDown = new DLabelScroll(25, 105, 7, 3, DLabel.enumMode.RESULT, true).setLabels(labels);
DTextField tf = new DTextField(25, 24, 90);
WLabelScroll lsUp = new WLabelScroll(25, 48, 7, 3, WLabel.enumMode.RESULT, true).setLabels(labels);
WLabelScroll lsDown = new WLabelScroll(25, 105, 7, 3, WLabel.enumMode.RESULT, true).setLabels(labels);
WTextField tf = new WTextField(25, 24, 90);
add(new DPanel());
add(new DSwitcher(7, 7, 162, 5));
add(new DIcon(149, 24, 20, 20, Resource.ICN_HELP_N, Resource.ICN_HELP_F, "disambiguation.help"));
add(new DIcon(7, 48, 18, 54, Resource.ICN_LIST_N, Resource.ICN_LIST_F, "disambiguation.list"));
add(new DIcon(7, 105, 18, 54, Resource.ICN_LABEL_N, Resource.ICN_LABEL_F, "disambiguation.label"));
add(new DSearch(i -> {
add(new WPanel());
add(new WSwitcher(7, 7, 162, 5));
add(new WIcon(149, 24, 20, 20, Resource.ICN_HELP_N, Resource.ICN_HELP_F, "disambiguation.help"));
add(new WIcon(7, 48, 18, 54, Resource.ICN_LIST_N, Resource.ICN_LIST_F, "disambiguation.list"));
add(new WIcon(7, 105, 18, 54, Resource.ICN_LABEL_N, Resource.ICN_LABEL_F, "disambiguation.label"));
add(new WSearch(i -> {
}, tf, lsUp, lsDown));
}
}
@@ -1,9 +1,9 @@
package me.towdium.jecalculation.client.gui.guis;
import me.towdium.jecalculation.client.gui.drawables.DLabel;
import me.towdium.jecalculation.client.gui.drawables.DLabelScroll;
import me.towdium.jecalculation.client.gui.drawables.DSearch;
import me.towdium.jecalculation.client.gui.drawables.DTextField;
import me.towdium.jecalculation.client.gui.drawables.WLabel;
import me.towdium.jecalculation.client.gui.drawables.WLabelScroll;
import me.towdium.jecalculation.client.gui.drawables.WSearch;
import me.towdium.jecalculation.client.gui.drawables.WTextField;
import me.towdium.jecalculation.core.labels.ILabel;
import me.towdium.jecalculation.core.labels.labels.LabelFluidStack;
import net.minecraftforge.fluids.FluidRegistry;
@@ -18,10 +18,10 @@ import java.util.stream.Collectors;
@ParametersAreNonnullByDefault
public class GuiEditorFluidStack extends ILabel.RegistryEditor.Editor {
public GuiEditorFluidStack() {
DLabelScroll ls = new DLabelScroll(7, 33, 8, 7, DLabel.enumMode.PICKER, true).setLabels(
WLabelScroll ls = new WLabelScroll(7, 33, 8, 7, WLabel.enumMode.PICKER, true).setLabels(
FluidRegistry.getRegisteredFluids().entrySet().stream()
.map(e -> new LabelFluidStack(e.getValue(), 1000)).collect(Collectors.toList()));
DTextField tf = new DTextField(25, 7, 90);
add(new DSearch(l -> callback.value.accept(l), tf, ls));
WTextField tf = new WTextField(25, 7, 90);
add(new WSearch(l -> callback.value.accept(l), tf, ls));
}
}
@@ -4,10 +4,10 @@ import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.google.common.cache.Weigher;
import me.towdium.jecalculation.client.gui.IDrawable;
import me.towdium.jecalculation.client.gui.drawables.DContainer;
import me.towdium.jecalculation.client.gui.drawables.DPage;
import me.towdium.jecalculation.client.gui.drawables.DPanel;
import me.towdium.jecalculation.client.gui.IWidget;
import me.towdium.jecalculation.client.gui.drawables.WContainer;
import me.towdium.jecalculation.client.gui.drawables.WPage;
import me.towdium.jecalculation.client.gui.drawables.WPanel;
import me.towdium.jecalculation.core.labels.ILabel;
import me.towdium.jecalculation.utils.wrappers.Single;
@@ -19,14 +19,14 @@ import java.util.function.Consumer;
* Date: 17-9-14.
*/
@ParametersAreNonnullByDefault
public class GuiLabel extends DContainer {
DContainer container = new DContainer();
public class GuiLabel extends WContainer {
WContainer container = new WContainer();
Consumer<ILabel> callback;
LoadingCache<Integer, IDrawable> cache = CacheBuilder.newBuilder().concurrencyLevel(1)
.maximumWeight(16).weigher((Weigher<Integer, IDrawable>) (key, value) -> 1)
.build(new CacheLoader<Integer, IDrawable>() {
LoadingCache<Integer, IWidget> cache = CacheBuilder.newBuilder().concurrencyLevel(1)
.maximumWeight(16).weigher((Weigher<Integer, IWidget>) (key, value) -> 1)
.build(new CacheLoader<Integer, IWidget>() {
@Override
public IDrawable load(Integer i) {
public IWidget load(Integer i) {
ILabel.RegistryEditor.Record record = ILabel.EDITOR.getRecords().get(i);
return record.editor.get().setCallback(callback);
}
@@ -37,10 +37,10 @@ public class GuiLabel extends DContainer {
Single<Integer> index = new Single<>(0);
ILabel.EDITOR.getRecords().forEach(r -> {
int i = index.value;
add(new DPage(i, r, false).setListener(() -> refresh(i)));
add(new WPage(i, r, false).setListener(() -> refresh(i)));
index.value += 1;
});
add(new DPanel());
add(new WPanel());
add(container);
refresh(0);
}
@@ -48,6 +48,6 @@ public class GuiLabel extends DContainer {
protected void refresh(int index) {
container.clear();
container.add(cache.getUnchecked(index));
container.add(new DPage(index, ILabel.EDITOR.getRecords().get(index), true));
container.add(new WPage(index, ILabel.EDITOR.getRecords().get(index), true));
}
}
@@ -5,39 +5,38 @@ import me.towdium.jecalculation.client.gui.Resource;
import me.towdium.jecalculation.client.gui.drawables.*;
import me.towdium.jecalculation.core.labels.ILabel;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import static me.towdium.jecalculation.client.gui.drawables.DLabel.enumMode.EDITOR;
import static me.towdium.jecalculation.client.gui.drawables.WLabel.enumMode.EDITOR;
/**
* Author: towdium
* Date: 17-9-8.
*/
public class GuiRecipe extends DContainer {
DButton buttonSave = new DButtonIcon(26, 33, 20, 20, Resource.BTN_SAVE_N, Resource.BTN_SAVE_F, "recipe.save");
DButton buttonCopy = new DButtonIcon(83, 33, 20, 20, Resource.BTN_COPY_N, Resource.BTN_COPY_F, "recipe.copy");
DButton buttonDel = new DButtonIcon(64, 33, 20, 20, Resource.BTN_DEL_N, Resource.BTN_DEL_F, "recipe.clear");
DButton buttonLabel = new DButtonIcon(45, 33, 20, 20, Resource.BTN_LABEL_N, Resource.BTN_LABEL_F, "recipe.label");
DButton buttonYes = new DButtonIcon(7, 33, 20, 20, Resource.BTN_YES_N, Resource.BTN_YES_F, "recipe.confirm");
DButton buttonNo = new DButtonIcon(26, 33, 20, 20, Resource.BTN_NO_N, Resource.BTN_NO_F, "recipe.abort");
DLabelGroup groupInput = new DLabelGroup(28, 111, 7, 2, 20, 20, EDITOR);
DLabelGroup groupCatalyst = new DLabelGroup(28, 87, 7, 1, 20, 20, EDITOR);
DLabelGroup groupOutput = new DLabelGroup(28, 63, 7, 1, 20, 20, EDITOR);
DTextField textField = new DTextField(49, 33, 119);
DButton buttonNew = new DButtonIcon(7, 33, 20, 20, Resource.BTN_NEW_N, Resource.BTN_NEW_F, "recipe.new")
public class GuiRecipe extends WContainer {
WButton buttonSave = new WButtonIcon(26, 33, 20, 20, Resource.BTN_SAVE_N, Resource.BTN_SAVE_F, "recipe.save");
WButton buttonCopy = new WButtonIcon(83, 33, 20, 20, Resource.BTN_COPY_N, Resource.BTN_COPY_F, "recipe.copy");
WButton buttonDel = new WButtonIcon(64, 33, 20, 20, Resource.BTN_DEL_N, Resource.BTN_DEL_F, "recipe.clear");
WButton buttonLabel = new WButtonIcon(45, 33, 20, 20, Resource.BTN_LABEL_N, Resource.BTN_LABEL_F, "recipe.label");
WButton buttonYes = new WButtonIcon(7, 33, 20, 20, Resource.BTN_YES_N, Resource.BTN_YES_F, "recipe.confirm");
WButton buttonNo = new WButtonIcon(26, 33, 20, 20, Resource.BTN_NO_N, Resource.BTN_NO_F, "recipe.abort");
WLabelGroup groupInput = new WLabelGroup(28, 111, 7, 2, 20, 20, EDITOR);
WLabelGroup groupCatalyst = new WLabelGroup(28, 87, 7, 1, 20, 20, EDITOR);
WLabelGroup groupOutput = new WLabelGroup(28, 63, 7, 1, 20, 20, EDITOR);
WTextField textField = new WTextField(49, 33, 119);
WButton buttonNew = new WButtonIcon(7, 33, 20, 20, Resource.BTN_NEW_N, Resource.BTN_NEW_F, "recipe.new")
.setListenerLeft(() -> setModeNewGroup(true));
public GuiRecipe() {
add(new DPanel());
add(new DSwitcher(7, 7, 162, 2));
add(new DIcon(7, 63, 21, 20, Resource.ICN_OUTPUT_N, Resource.ICN_OUTPUT_F, "recipe.output"));
add(new DIcon(7, 87, 21, 20, Resource.ICN_CATALYST_N, Resource.ICN_CATALYST_F, "recipe.catalyst"));
add(new DIcon(7, 111, 21, 40, Resource.ICN_INPUT_N, Resource.ICN_INPUT_F, "recipe.input"));
add(new DLine(57));
add(new WPanel());
add(new WSwitcher(7, 7, 162, 2));
add(new WIcon(7, 63, 21, 20, Resource.ICN_OUTPUT_N, Resource.ICN_OUTPUT_F, "recipe.output"));
add(new WIcon(7, 87, 21, 20, Resource.ICN_CATALYST_N, Resource.ICN_CATALYST_F, "recipe.catalyst"));
add(new WIcon(7, 111, 21, 40, Resource.ICN_INPUT_N, Resource.ICN_INPUT_F, "recipe.input"));
add(new WLine(57));
addAll(groupInput, groupCatalyst, groupOutput);
setModeNewGroup(false);
}
@@ -1,9 +1,9 @@
package me.towdium.jecalculation.core.labels;
import com.google.common.base.CaseFormat;
import me.towdium.jecalculation.client.gui.IDrawable;
import me.towdium.jecalculation.client.gui.IWidget;
import me.towdium.jecalculation.client.gui.JecGui;
import me.towdium.jecalculation.client.gui.drawables.DContainer;
import me.towdium.jecalculation.client.gui.drawables.WContainer;
import me.towdium.jecalculation.client.gui.guis.GuiEditorFluidStack;
import me.towdium.jecalculation.core.labels.labels.LabelFluidStack;
import me.towdium.jecalculation.core.labels.labels.LabelItemStack;
@@ -69,14 +69,14 @@ public interface ILabel {
NBTTagCompound toNBTTagCompound();
default void drawEntry(JecGui gui, int xPos, int yPos, boolean center) {
default void drawLabel(JecGui gui, int xPos, int yPos, boolean center) {
GlStateManager.pushMatrix();
GlStateManager.translate(center ? xPos - 8 : xPos, center ? yPos - 8 : yPos, 0);
drawEntry(gui);
drawLabel(gui);
GlStateManager.popMatrix();
}
void drawEntry(JecGui gui);
void drawLabel(JecGui gui);
/**
* Since {@link ILabel} merging is bidirectional, it is redundant to
@@ -264,11 +264,11 @@ public interface ILabel {
return records;
}
public interface IEditor extends IDrawable {
public interface IEditor extends IWidget {
IEditor setCallback(Consumer<ILabel> callback);
}
public static class Editor extends DContainer implements RegistryEditor.IEditor {
public static class Editor extends WContainer implements RegistryEditor.IEditor {
protected Single<Consumer<ILabel>> callback = new Single<>(null);
@Override
@@ -2,12 +2,10 @@ package me.towdium.jecalculation.core.labels.labels;
import me.towdium.jecalculation.client.gui.JecGui;
import me.towdium.jecalculation.client.gui.Resource;
import me.towdium.jecalculation.client.gui.drawables.DText;
import me.towdium.jecalculation.core.labels.ILabel;
import me.towdium.jecalculation.utils.Utilities;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import javax.annotation.ParametersAreNonnullByDefault;
@@ -89,7 +87,7 @@ public class LabelFluidStack implements ILabel {
}
@Override
public void drawEntry(JecGui gui) {
public void drawLabel(JecGui gui) {
gui.drawResource(Resource.LBL_FLUID, 0, 0);
gui.drawFluid(fluid.getFluid(), 2, 2, 12, 12);
}
@@ -67,7 +67,7 @@ public class LabelItemStack extends LabelSimpleAmount {
}
@Override
public void drawEntry(JecGui gui) {
public void drawLabel(JecGui gui) {
gui.drawItemStack(0, 0, itemStack, false);
}
@@ -3,8 +3,7 @@ package me.towdium.jecalculation.core.labels.labels;
import me.towdium.jecalculation.JustEnoughCalculation;
import me.towdium.jecalculation.client.gui.JecGui;
import me.towdium.jecalculation.client.gui.Resource;
import me.towdium.jecalculation.client.gui.drawables.DContainer;
import me.towdium.jecalculation.client.gui.drawables.DText;
import me.towdium.jecalculation.client.gui.drawables.WText;
import me.towdium.jecalculation.core.labels.ILabel;
import me.towdium.jecalculation.polyfill.mc.client.renderer.GlStateManager;
import me.towdium.jecalculation.polyfill.mc.util.NonNullList;
@@ -17,7 +16,6 @@ import net.minecraftforge.oredict.OreDictionary;
import javax.annotation.ParametersAreNonnullByDefault;
import java.util.HashSet;
import java.util.List;
import java.util.function.Consumer;
import java.util.stream.Collectors;
/**
@@ -72,7 +70,7 @@ public class LabelOreDict extends LabelSimpleAmount {
}
@Override
public void drawEntry(JecGui gui) {
public void drawLabel(JecGui gui) {
NonNullList<ItemStack> list = NonNullList.create();
OreDictionary.getOres(name).forEach(is -> {
if (is.getItemDamage() == OreDictionary.WILDCARD_VALUE) {
@@ -110,7 +108,7 @@ public class LabelOreDict extends LabelSimpleAmount {
public static class Editor extends RegistryEditor.Editor {
public Editor() {
add(new DText(5, 5, JecGui.Font.DEFAULT_NO_SHADOW, "hello"));
add(new WText(5, 5, JecGui.Font.DEFAULT_NO_SHADOW, "hello"));
}
@Override
@@ -25,7 +25,7 @@ public class JecaTooltipHandler implements IContainerTooltipHandler {
int mousey,
List<String> currenttip) {
if (gui instanceof JecGui) {
NEIPlugin.setEntryUnderMouse(itemstack);
NEIPlugin.setLabelUnderMouse(itemstack);
}
return currenttip;
}
@@ -14,12 +14,12 @@ public class NEIPlugin {
private static ItemStack currentItemStack;
public static ILabel getEntryUnderMouse() {
public static ILabel getLabelUnderMouse() {
if (NEIPlugin.currentItemStack == null) return ILabel.EMPTY;
else return registryItem.toLabel(NEIPlugin.currentItemStack);
}
public static void setEntryUnderMouse(ItemStack itemStack) {
public static void setLabelUnderMouse(ItemStack itemStack) {
NEIPlugin.currentItemStack = itemStack;
}
}