Cleaned and generalised item loading/searching

Reimplemented subsets
Added regex searching
Fixed format error on delete all
Fixed GuiButton handling clicks before NEI widgets could override
Re-Implemented banned blocks implementation
Added brewing recipes again
note test obf ASM beacons
Fixed some calls being intercepted by item panel when mouse was over a gui element
Fixed crash on closing potion window with escape
Disabled fast transfer, scrolling, and drag 'n' drop in creative
Added item panel sorting
Removed TMI uninstaller
Fixed /give command
Updated to 1.7.10
This commit is contained in:
Chicken-Bomes committed 2014-06-29 20:42:02 +10:00
1 parent 3c9ebc6961
commit 3c84527806
67 files changed
+3251 -2319

No files matched your search

+21 -12
View File
@@ -28,6 +28,7 @@ public class NEIController implements IContainerSlotClickHandler, IContainerInpu
private static IInfiniteItemHandler heldStackInfinite;
private static int selectedItem;
private ItemStack firstheld;
public static void load() {
GuiContainerManager.addSlotClickHandler(instance);
@@ -47,7 +48,9 @@ public class NEIController implements IContainerSlotClickHandler, IContainerInpu
API.registerNEIGuiHandler((INEIGuiHandler) gui);
}
ItemStack firstheld;
public static boolean isSpreading(GuiContainer gui) {
return gui.field_147007_t && gui.field_147008_s.size() > 1;
}
public static void updateUnlimitedItems(InventoryPlayer inventory) {
if (!NEIClientConfig.canPerformAction("item") || !NEIClientConfig.hasSMPCounterPart())
@@ -104,7 +107,9 @@ public class NEIController implements IContainerSlotClickHandler, IContainerInpu
@Override
public boolean handleSlotClick(GuiContainer gui, int slotIndex, int button, Slot slot, int modifier, boolean eventconsumed) {
if (eventconsumed || !NEIClientConfig.isEnabled())
if (eventconsumed ||
!NEIClientConfig.isEnabled() ||
isSpreading(gui))
return eventconsumed;
if (deleteMode && slotIndex >= 0 && slot != null) {
@@ -127,6 +132,16 @@ public class NEIController implements IContainerSlotClickHandler, IContainerInpu
return true;
}
if (NEIClientUtils.controlKey()
&& slot != null && slot.getStack() != null
&& slot.isItemValid(slot.getStack())) {
NEIClientUtils.cheatItem(slot.getStack(), button, 1);
return true;
}
if(GuiInfo.hasCustomSlots(gui))
return false;
if (slotIndex >= 0 && NEIClientUtils.shiftKey() && NEIClientUtils.getHeldItem() != null && !slot.getHasStack()) {
ItemStack held = NEIClientUtils.getHeldItem();
manager.handleSlotClick(slot.slotNumber, button, 0);
@@ -136,14 +151,6 @@ public class NEIController implements IContainerSlotClickHandler, IContainerInpu
return true;
}
if (NEIClientUtils.controlKey()
&& slot != null && slot.getStack() != null
&& NEIClientConfig.canPerformAction("item")
&& slot.isItemValid(slot.getStack())) {
NEIClientUtils.cheatItem(slot.getStack(), button, 1);
return true;
}
if (slotIndex == -999 && NEIClientUtils.shiftKey() && button == 0) {
fastTransferManager.throwAll(gui, pickedUpFromSlot);
return true;
@@ -189,7 +196,9 @@ public class NEIController implements IContainerSlotClickHandler, IContainerInpu
@Override
public boolean lastKeyTyped(GuiContainer gui, char keyChar, int keyCode) {
if (!NEIClientConfig.isEnabled())
if (!NEIClientConfig.isEnabled() ||
GuiInfo.hasCustomSlots(gui) ||
isSpreading(gui))
return false;
Slot slot = GuiContainerManager.getSlotMouseOver(gui);
@@ -211,7 +220,7 @@ public class NEIController implements IContainerSlotClickHandler, IContainerInpu
@Override
public boolean mouseScrolled(GuiContainer gui, int mousex, int mousey, int scrolled) {
if (!NEIClientConfig.isEnabled())
if (!NEIClientConfig.isEnabled() || GuiInfo.hasCustomSlots(gui))
return false;
Point mousePos = getMousePosition();