mirror of
https://github.com/GTNewHorizons/WirelessCraftingTerminal.git
synced 2026-11-26 06:42:55 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
089d2fc3c2 | ||
|
|
7a907225d6 | ||
|
|
bcd6fbbdf5 | ||
|
|
9188911cce | ||
|
|
44d039a517 | ||
|
|
b9ed4fadf1 | ||
|
|
f204823bd9 | ||
|
|
ed58556f48 | ||
|
|
8f10d413be | ||
|
|
9dcc47476c | ||
|
|
cf14b69af4 |
No files matched your search
+503
-174
File diff suppressed because it is too large.
Load diff
+6
-7
@@ -1,11 +1,10 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
compile("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-99-GTNH:dev")
|
||||
compile("com.github.GTNewHorizons:Baubles:1.0.1.14:dev")
|
||||
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 }
|
||||
implementation("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-243-GTNH:dev")
|
||||
implementation("com.github.GTNewHorizons:Baubles:1.0.1.16:dev")
|
||||
implementation("curse.maven:cofh-core-69162:2388751")
|
||||
implementation("com.github.GTNewHorizons:NotEnoughItems:2.3.79-GTNH:dev")
|
||||
compileOnly("com.github.GTNewHorizons:MouseTweaks:2.4.8-GTNH:dev") { transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:EnderIO:2.4.24:dev") { transitive = false }
|
||||
}
|
||||
@@ -21,6 +21,10 @@ forgeVersion = 10.13.4.1614
|
||||
# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty
|
||||
developmentEnvironmentUserName = Developer
|
||||
|
||||
# Enables using modern java syntax (up to version 17) via Jabel, while still targetting JVM 8.
|
||||
# See https://github.com/bsideup/jabel for details on how this works.
|
||||
enableModernJavaSyntax = true
|
||||
|
||||
# Define a source file of your project with:
|
||||
# public static final String VERSION = "GRADLETOKEN_VERSION";
|
||||
# The string's content will be replaced with your mods version when compiled. You should use this to specify your mod's
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -144,7 +144,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
# shellcheck disable=SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
@@ -152,7 +152,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
# shellcheck disable=SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
|
||||
+3
-3
@@ -30,7 +30,6 @@ import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import yalter.mousetweaks.api.IMTModGuiContainer;
|
||||
import appeng.api.config.ActionItems;
|
||||
import appeng.api.config.SearchBoxMode;
|
||||
import appeng.api.config.Settings;
|
||||
@@ -64,6 +63,7 @@ import codechicken.nei.TextField;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
import yalter.mousetweaks.api.IMTModGuiContainer;
|
||||
|
||||
@Optional.Interface(modid = "MouseTweaks", iface = "yalter.mousetweaks.api.IMTModGuiContainer")
|
||||
public class GuiWirelessCraftingTerminal extends AEBaseGui
|
||||
@@ -459,7 +459,7 @@ public class GuiWirelessCraftingTerminal extends AEBaseGui
|
||||
@Override
|
||||
public void updateScreen() {
|
||||
this.devicePowered = containerWCT.isPowered();
|
||||
this.repo.setPower(devicePowered);
|
||||
this.repo.setPowered(devicePowered);
|
||||
|
||||
super.updateScreen();
|
||||
if (this.init) {
|
||||
@@ -708,7 +708,7 @@ public class GuiWirelessCraftingTerminal extends AEBaseGui
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
protected void renderToolTip(final ItemStack stack, final int x, final int y) {
|
||||
public void renderToolTip(final ItemStack stack, final int x, final int y) {
|
||||
final Slot s = this.getSlot(x, y);
|
||||
if (s instanceof SlotME && stack != null) {
|
||||
final int BigNumber = AEConfig.instance.useTerminalUseLargeFont() ? 999 : 9999;
|
||||
|
||||
@@ -30,70 +30,61 @@ public class WCTGuiHandler implements IGuiHandler {
|
||||
|
||||
@Override
|
||||
public Object getServerGuiElement(int guiId, EntityPlayer player, World world, int x, int y, int z) {
|
||||
final IWirelessCraftingTermHandler wh = (IWirelessCraftingTermHandler) AEApi.instance().registries().wireless()
|
||||
.getWirelessTerminalHandler(RandomUtils.getWirelessTerm(player.inventory));
|
||||
if (wh != null) {
|
||||
final WirelessTerminalGuiObject obj = new WirelessTerminalGuiObject(
|
||||
wh,
|
||||
RandomUtils.getWirelessTerm(player.inventory),
|
||||
player,
|
||||
world,
|
||||
x,
|
||||
y,
|
||||
z);
|
||||
if (obj != null) {
|
||||
final IPortableCell terminal = obj;
|
||||
|
||||
if (guiId == Reference.GUI_WCT) {
|
||||
return updateGui(
|
||||
new ContainerWirelessCraftingTerminal(player, player.inventory),
|
||||
world,
|
||||
x,
|
||||
y,
|
||||
z,
|
||||
ForgeDirection.UNKNOWN,
|
||||
obj);
|
||||
}
|
||||
|
||||
if (guiId == Reference.GUI_CRAFTING_STATUS) {
|
||||
return updateGui(
|
||||
new ContainerCraftingStatus(player.inventory, terminal),
|
||||
world,
|
||||
x,
|
||||
y,
|
||||
z,
|
||||
ForgeDirection.UNKNOWN,
|
||||
obj);
|
||||
}
|
||||
|
||||
if (guiId == Reference.GUI_CRAFT_AMOUNT) {
|
||||
return updateGui(
|
||||
new ContainerCraftAmount(player, terminal),
|
||||
world,
|
||||
x,
|
||||
y,
|
||||
z,
|
||||
ForgeDirection.UNKNOWN,
|
||||
obj);
|
||||
}
|
||||
|
||||
if (guiId == Reference.GUI_CRAFT_CONFIRM) {
|
||||
return updateGui(
|
||||
new ContainerCraftConfirm(player, terminal),
|
||||
world,
|
||||
x,
|
||||
y,
|
||||
z,
|
||||
ForgeDirection.UNKNOWN,
|
||||
obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (guiId == Reference.GUI_MAGNET) {
|
||||
return new ContainerMagnet(player, player.inventory);
|
||||
}
|
||||
|
||||
return null;
|
||||
final IWirelessCraftingTermHandler wh = (IWirelessCraftingTermHandler) AEApi.instance().registries().wireless()
|
||||
.getWirelessTerminalHandler(RandomUtils.getWirelessTerm(player.inventory));
|
||||
if (wh == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
final WirelessTerminalGuiObject term = new WirelessTerminalGuiObject(
|
||||
wh,
|
||||
RandomUtils.getWirelessTerm(player.inventory),
|
||||
player,
|
||||
world,
|
||||
x,
|
||||
y,
|
||||
z);
|
||||
|
||||
return switch (guiId) {
|
||||
case Reference.GUI_WCT -> updateGui(
|
||||
new ContainerWirelessCraftingTerminal(player, player.inventory),
|
||||
world,
|
||||
x,
|
||||
y,
|
||||
z,
|
||||
ForgeDirection.UNKNOWN,
|
||||
term);
|
||||
case Reference.GUI_CRAFTING_STATUS -> updateGui(
|
||||
new ContainerCraftingStatus(player.inventory, term),
|
||||
world,
|
||||
x,
|
||||
y,
|
||||
z,
|
||||
ForgeDirection.UNKNOWN,
|
||||
term);
|
||||
|
||||
case Reference.GUI_CRAFT_AMOUNT -> updateGui(
|
||||
new ContainerCraftAmount(player, term),
|
||||
world,
|
||||
x,
|
||||
y,
|
||||
z,
|
||||
ForgeDirection.UNKNOWN,
|
||||
term);
|
||||
case Reference.GUI_CRAFT_CONFIRM -> updateGui(
|
||||
new ContainerCraftConfirm(player, term),
|
||||
world,
|
||||
x,
|
||||
y,
|
||||
z,
|
||||
ForgeDirection.UNKNOWN,
|
||||
term);
|
||||
default -> null;
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -29,6 +29,8 @@ import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
|
||||
import org.apache.commons.lang3.text.WordUtils;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import com.google.common.base.Splitter;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.implementations.guiobjects.IPortableCell;
|
||||
import appeng.api.networking.IGrid;
|
||||
@@ -40,9 +42,6 @@ import appeng.api.storage.IMEInventoryHandler;
|
||||
import appeng.api.storage.IMEMonitor;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.util.Platform;
|
||||
|
||||
import com.google.common.base.Splitter;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
+3
-4
@@ -22,6 +22,8 @@ import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import appeng.api.config.*;
|
||||
import appeng.api.features.IWirelessTermHandler;
|
||||
import appeng.api.util.IConfigManager;
|
||||
@@ -31,9 +33,6 @@ import appeng.util.IConfigManagerHost;
|
||||
import appeng.util.Platform;
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.IBauble;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -220,7 +219,7 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
||||
|
||||
@Override
|
||||
public boolean canHandle(final ItemStack is) {
|
||||
return is.getItem() instanceof IWirelessCraftingTerminalItem;
|
||||
return is != null && is.getItem() instanceof IWirelessCraftingTerminalItem;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -22,10 +22,9 @@ public class Reference {
|
||||
public static boolean WCT_HASCHECKEDVERSION = false;
|
||||
|
||||
// Gui IDs
|
||||
private static int ae2wctGuiIndex = 0;
|
||||
public static final int GUI_WCT = ++ae2wctGuiIndex;
|
||||
public static final int GUI_CRAFTING_STATUS = ++ae2wctGuiIndex;
|
||||
public static final int GUI_CRAFT_AMOUNT = ++ae2wctGuiIndex;
|
||||
public static final int GUI_CRAFT_CONFIRM = ++ae2wctGuiIndex;
|
||||
public static final int GUI_MAGNET = ++ae2wctGuiIndex;
|
||||
public static final int GUI_WCT = 0;
|
||||
public static final int GUI_CRAFTING_STATUS = 1;
|
||||
public static final int GUI_CRAFT_AMOUNT = 2;
|
||||
public static final int GUI_CRAFT_CONFIRM = 3;
|
||||
public static final int GUI_MAGNET = 4;
|
||||
}
|
||||
Reference in new issue
Block a user