mirror of
https://github.com/GTNewHorizons/WirelessCraftingTerminal.git
synced 2026-11-26 06:42:55 +00:00
Compare commits
14
Commits
1.11.8-pre
...
1.12.5-pre
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f52f3d0da | ||
|
|
26a1058f76 | ||
|
|
7e0208c0bf | ||
|
|
43ee6dab14 | ||
|
|
c8fc27211c | ||
|
|
b7518b4e47 | ||
|
|
3fcc50d1a1 | ||
|
|
bb979c569a | ||
|
|
0e2c9a88a4 | ||
|
|
8eae5ade43 | ||
|
|
c568f2dd29 | ||
|
|
0755a0d5f5 | ||
|
|
4e757686c6 | ||
|
|
4c491ba2cb |
No files matched your search
+5
-5
@@ -1,11 +1,11 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-464-GTNH:dev")
|
||||
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-637-GTNH-pre:dev")
|
||||
|
||||
implementation("com.github.GTNewHorizons:Baubles:1.0.4:dev")
|
||||
implementation("com.github.GTNewHorizons:Baubles-Expanded:2.1.9-GTNH:dev")
|
||||
compileOnly("curse.maven:cofh-core-69162:2388751")
|
||||
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.6.39-GTNH:dev")
|
||||
compileOnly("com.github.GTNewHorizons:MouseTweaks:2.4.17-GTNH:dev") { transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:EnderIO:2.8.18:dev") { transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.7.57-GTNH:dev")
|
||||
compileOnly("com.github.GTNewHorizons:MouseTweaks:2.4.20-GTNH:dev") { transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:EnderIO:2.9.18:dev") { transitive = false }
|
||||
}
|
||||
+1
-1
@@ -14,7 +14,7 @@ modId = ae2wct
|
||||
modGroup = net.p455w0rd.wirelesscraftingterminal
|
||||
|
||||
# Whether to use modGroup as the maven publishing group.
|
||||
# Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods.
|
||||
# When false, com.github.GTNewHorizons is used.
|
||||
useModGroupForPublishing = false
|
||||
|
||||
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
|
||||
|
||||
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-8.9-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -86,8 +86,7 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||
' "$PWD" ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -206,7 +205,7 @@ fi
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.27'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.38'
|
||||
}
|
||||
|
||||
|
||||
+14
-1
@@ -37,6 +37,7 @@ import appeng.api.config.TerminalFontSize;
|
||||
import appeng.api.config.TerminalStyle;
|
||||
import appeng.api.config.YesNo;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IDisplayRepo;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.api.util.IConfigurableObject;
|
||||
import appeng.client.ActionKey;
|
||||
@@ -88,7 +89,7 @@ public class GuiWirelessCraftingTerminal extends AEBaseGui
|
||||
public static int craftingGridOffsetX = 80;
|
||||
public static int craftingGridOffsetY;
|
||||
private static String memoryText = "";
|
||||
private final ItemRepo repo;
|
||||
private final IDisplayRepo repo;
|
||||
private final int offsetX = 8;
|
||||
private final IConfigManager configSrc;
|
||||
private GuiTabButton craftingStatusBtn;
|
||||
@@ -654,6 +655,18 @@ public class GuiWirelessCraftingTerminal extends AEBaseGui
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleKeyboardInput() {
|
||||
super.handleKeyboardInput();
|
||||
|
||||
// Pause the terminal when holding shift
|
||||
this.repo.setPaused(hasShiftDown());
|
||||
}
|
||||
|
||||
private boolean hasShiftDown() {
|
||||
return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT);
|
||||
}
|
||||
|
||||
protected boolean isPowered() {
|
||||
return this.repo.hasPower();
|
||||
}
|
||||
|
||||
@@ -10,11 +10,14 @@ import net.p455w0rd.wirelesscraftingterminal.api.IWirelessCraftingTerminalItem;
|
||||
import net.p455w0rd.wirelesscraftingterminal.items.ItemMagnet;
|
||||
|
||||
import baubles.api.BaublesApi;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class RandomUtils {
|
||||
|
||||
public static boolean isBaublesLoaded = Loader.isModLoaded("Baubles");
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static String color(String color) {
|
||||
switch (color) {
|
||||
@@ -62,20 +65,24 @@ public class RandomUtils {
|
||||
break;
|
||||
}
|
||||
}
|
||||
IInventory handler = BaublesApi.getBaubles(playerInv.player);
|
||||
if (handler != null) {
|
||||
invSize = handler.getSizeInventory();
|
||||
for (int i = 0; i < invSize; ++i) {
|
||||
ItemStack item = handler.getStackInSlot(i);
|
||||
if (item == null) {
|
||||
continue;
|
||||
}
|
||||
if (item.getItem() instanceof IWirelessCraftingTerminalItem) {
|
||||
wirelessTerm = item;
|
||||
break;
|
||||
|
||||
if (isBaublesLoaded) {
|
||||
IInventory handler = BaublesApi.getBaubles(playerInv.player);
|
||||
if (handler != null) {
|
||||
invSize = handler.getSizeInventory();
|
||||
for (int i = 0; i < invSize; ++i) {
|
||||
ItemStack item = handler.getStackInSlot(i);
|
||||
if (item == null) {
|
||||
continue;
|
||||
}
|
||||
if (item.getItem() instanceof IWirelessCraftingTerminalItem) {
|
||||
wirelessTerm = item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return wirelessTerm;
|
||||
}
|
||||
|
||||
|
||||
+19
-41
@@ -33,18 +33,20 @@ import appeng.api.config.SortOrder;
|
||||
import appeng.api.config.ViewItems;
|
||||
import appeng.api.features.IWirelessTermHandler;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.items.tools.powered.powersink.AERootPoweredItem;
|
||||
import appeng.util.ConfigManager;
|
||||
import appeng.util.IConfigManagerHost;
|
||||
import appeng.util.Platform;
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.IBauble;
|
||||
import baubles.api.expanded.IBaubleExpanded;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@cpw.mods.fml.common.Optional.Interface(iface = "baubles.api.expanded.IBaubleExpanded", modid = "Baubles|Expanded")
|
||||
public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
||||
implements IWirelessCraftingTerminalItem, IWirelessTermHandler, IBauble {
|
||||
implements IWirelessCraftingTerminalItem, IWirelessTermHandler, IBaubleExpanded {
|
||||
|
||||
public static final String LINK_KEY_STRING = "key";
|
||||
public static double GLOBAL_POWER_MULTIPLIER = PowerMultiplier.CONFIG.multiplier;
|
||||
@@ -89,61 +91,37 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method return the type of bauble this is. Type is used to determine the slots it can go into.
|
||||
*
|
||||
* @param itemstack
|
||||
*/
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack itemstack) {
|
||||
public String[] getBaubleTypes(ItemStack itemstack) {
|
||||
return new String[] { AppEng.BAUBLESLOT };
|
||||
}
|
||||
|
||||
@Override
|
||||
@cpw.mods.fml.common.Optional.Method(modid = "Baubles")
|
||||
public BaubleType getBaubleType(ItemStack itemStack) {
|
||||
return BaubleType.RING;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called once per tick if the bauble is being worn by a player
|
||||
*
|
||||
* @param itemstack
|
||||
* @param player
|
||||
*/
|
||||
@Override
|
||||
public void onWornTick(ItemStack itemstack, EntityLivingBase player) {}
|
||||
@cpw.mods.fml.common.Optional.Method(modid = "Baubles")
|
||||
public void onWornTick(ItemStack itemstack, EntityLivingBase player) { /**/ }
|
||||
|
||||
/**
|
||||
* This method is called when the bauble is equipped by a player
|
||||
*
|
||||
* @param itemstack
|
||||
* @param player
|
||||
*/
|
||||
@Override
|
||||
public void onEquipped(ItemStack itemstack, EntityLivingBase player) {}
|
||||
@cpw.mods.fml.common.Optional.Method(modid = "Baubles")
|
||||
public void onEquipped(ItemStack itemstack, EntityLivingBase player) { /**/ }
|
||||
|
||||
/**
|
||||
* This method is called when the bauble is unequipped by a player
|
||||
*
|
||||
* @param itemstack
|
||||
* @param player
|
||||
*/
|
||||
@Override
|
||||
public void onUnequipped(ItemStack itemstack, EntityLivingBase player) {}
|
||||
@cpw.mods.fml.common.Optional.Method(modid = "Baubles")
|
||||
public void onUnequipped(ItemStack itemstack, EntityLivingBase player) { /**/ }
|
||||
|
||||
/**
|
||||
* can this bauble be placed in a bauble slot
|
||||
*
|
||||
* @param itemstack
|
||||
* @param player
|
||||
*/
|
||||
@Override
|
||||
@cpw.mods.fml.common.Optional.Method(modid = "Baubles")
|
||||
public boolean canEquip(ItemStack itemstack, EntityLivingBase player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can this bauble be removed from a bauble slot
|
||||
*
|
||||
* @param itemstack
|
||||
* @param player
|
||||
*/
|
||||
@Override
|
||||
@cpw.mods.fml.common.Optional.Method(modid = "Baubles")
|
||||
public boolean canUnequip(ItemStack itemstack, EntityLivingBase player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package net.p455w0rd.wirelesscraftingterminal.proxy;
|
||||
|
||||
import static net.p455w0rd.wirelesscraftingterminal.common.utils.RandomUtils.isBaublesLoaded;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
@@ -74,19 +76,23 @@ public class CommonProxy {
|
||||
} else {
|
||||
playerInv = player.inventory;
|
||||
}
|
||||
IInventory handler = BaublesApi.getBaubles(player);
|
||||
if (handler != null) {
|
||||
for (int i = 0; i < handler.getSizeInventory(); ++i) {
|
||||
ItemStack item = handler.getStackInSlot(i);
|
||||
if (item == null) {
|
||||
continue;
|
||||
}
|
||||
if (item.getItem() instanceof IWirelessCraftingTerminalItem) {
|
||||
wirelessTerm = item;
|
||||
break;
|
||||
|
||||
if (isBaublesLoaded) {
|
||||
IInventory handler = BaublesApi.getBaubles(player);
|
||||
if (handler != null) {
|
||||
for (int i = 0; i < handler.getSizeInventory(); ++i) {
|
||||
ItemStack item = handler.getStackInSlot(i);
|
||||
if (item == null) {
|
||||
continue;
|
||||
}
|
||||
if (item.getItem() instanceof IWirelessCraftingTerminalItem) {
|
||||
wirelessTerm = item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (wirelessTerm == null) {
|
||||
int invSize = playerInv.getSizeInventory();
|
||||
if (invSize <= 0) {
|
||||
|
||||
Reference in new issue
Block a user