mirror of
https://github.com/GTNewHorizons/WirelessCraftingTerminal.git
synced 2026-11-25 14:24:38 +00:00
Turn off mousetweaks in the WCT gui.
It'd be better to fix it, but I can't figure out why the ME slots behave weird here so this is an easy patch for now. fixes https://github.com/GTNewHorizons/NotEnoughItems/issues/88 fixes https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/8828 fixes https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/6388 fixes https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/11079
This commit is contained in:
1 parent
a6cbdc4b5d
commit
8d02e38d9c
3 files changed
+72
-2
No files matched your search
@@ -6,5 +6,6 @@ dependencies {
|
||||
compile("curse.maven:cofh-core-69162:2388751")
|
||||
compile("com.github.GTNewHorizons:NotEnoughItems:2.2.27-GTNH:dev")
|
||||
compile("com.github.GTNewHorizons:CodeChickenLib:1.1.5.4:dev")
|
||||
compileOnly("com.github.GTNewHorizons:MouseTweaks:2.4.5-GTNH:dev") { transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:EnderIO:2.3.1.43:dev") { transitive = false }
|
||||
}
|
||||
+70
-1
@@ -31,6 +31,7 @@ import appeng.util.IConfigManagerHost;
|
||||
import appeng.util.Platform;
|
||||
import codechicken.nei.TextField;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
@@ -59,8 +60,11 @@ import net.p455w0rd.wirelesscraftingterminal.handlers.LocaleHandler;
|
||||
import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
import yalter.mousetweaks.api.IMTModGuiContainer;
|
||||
|
||||
public class GuiWirelessCraftingTerminal extends AEBaseGui implements ISortSource, IConfigManagerHost {
|
||||
@Optional.Interface(modid = "MouseTweaks", iface = "yalter.mousetweaks.api.IMTModGuiContainer")
|
||||
public class GuiWirelessCraftingTerminal extends AEBaseGui
|
||||
implements ISortSource, IConfigManagerHost, IMTModGuiContainer {
|
||||
|
||||
private float xSize_lo;
|
||||
private float ySize_lo;
|
||||
@@ -832,4 +836,69 @@ public class GuiWirelessCraftingTerminal extends AEBaseGui implements ISortSourc
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// MouseTweaks compat
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "MouseTweaks")
|
||||
public int getAPIVersion() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "MouseTweaks")
|
||||
public String getModName() {
|
||||
return Reference.NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "MouseTweaks")
|
||||
public boolean isMouseTweaksDisabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "MouseTweaks")
|
||||
public boolean isWheelTweakDisabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "MouseTweaks")
|
||||
public boolean isCraftingOutputSlot(Object modContainer, Object slot) {
|
||||
return slot == containerWCT.getSlot(ContainerWirelessCraftingTerminal.CRAFT_RESULT);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "MouseTweaks")
|
||||
public Object getModContainer() {
|
||||
return containerWCT;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "MouseTweaks")
|
||||
public int getModSlotCount(Object modContainer) {
|
||||
return containerWCT.inventorySlots.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "MouseTweaks")
|
||||
public Object getModSlot(Object modContainer, int slotNumber) {
|
||||
return slotNumber < containerWCT.inventorySlots.size() ? containerWCT.inventorySlots.get(slotNumber) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "MouseTweaks")
|
||||
public Object getModSelectedSlot(Object modContainer, int slotCount) {
|
||||
Slot s = getSlot(currentMouseX, currentMouseY);
|
||||
return s;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "MouseTweaks")
|
||||
public void clickModSlot(Object modContainer, Object slotO, int mouseButton, boolean shiftPressed) {}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "MouseTweaks")
|
||||
public void disableRMBDragIfRequired(Object modContainer, Object firstSlot, boolean shouldClick) {}
|
||||
}
|
||||
+1
-1
@@ -113,7 +113,7 @@ public class ContainerWirelessCraftingTerminal extends AEBaseContainer
|
||||
public ItemStack[] craftMatrixInventory;
|
||||
private final World worldObj;
|
||||
private final EntityPlayer player;
|
||||
private static final int HOTBAR_START = 1,
|
||||
public static final int HOTBAR_START = 1,
|
||||
HOTBAR_END = HOTBAR_START + 8,
|
||||
INV_START = HOTBAR_END + 1,
|
||||
INV_END = INV_START + 26,
|
||||
|
||||
Reference in new issue
Block a user