Compare commits

...
48 Commits
Author SHA1 Message Date
Martin Robertz a5960bad61 update 2025-11-04 20:37:22 +01:00
Martin Robertz e96a8452b9 update 2025-11-04 18:58:26 +01:00
lc-1337 eeeb37fce7 update interfaces path 2025-11-01 10:00:57 +02:00
Kogepan229 44f648549f Fix pin button position 2025-10-30 16:17:52 +09:00
Kogepan229 c6b3a66707 Fix view cell slots 2025-10-30 16:17:31 +09:00
Kogepan229 edb7622056 Delete unused things 2025-10-30 15:46:52 +09:00
Kogepan229 49646337b3 Universal Gui 2025-10-30 15:30:04 +09:00
Dream Master 1b0ecf0e80 update 2025-07-15 22:04:23 +07:00
NeOzay b2187bd961 fix and port the new Localization message system and update AE2 dependency. (#43) 2025-07-15 21:37:13 +07:00
ba9df5d3cd Added the Wireless Terminal to the new Baubles Terminal Slot. (#41)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Martin Robertz <[email protected]>
2025-06-21 00:43:22 +02:00
Martin Robertz 43ee6dab14 update 2025-06-20 23:59:49 +02:00
lordIcocain 8eae5ade43 make baubles optional (#40) 2025-05-25 15:20:00 +02:00
Martin Robertz c568f2dd29 update 2025-05-16 22:12:23 +02:00
Caedis 0755a0d5f5 Replace Baubles with Baubles Expanded (#38) 2025-05-13 14:18:01 +02:00
Martin Robertz 4e757686c6 update 2025-01-31 20:21:19 +01:00
Michael Doyle 4c491ba2cb [Feature] Shift to pause wireless crafting terminal item movement (#37) 2025-01-28 18:49:55 -06:00
Martin Robertz 2f00f8d5d8 update 2024-10-02 22:40:05 +02:00
Alexdoru 0a761be328 Merge pull request #36 from GTNewHorizons/log
Remove logging that logs time it takes to load each part of the mod
2024-10-02 16:21:37 +02:00
Alexdoru c8fee02cdc remove timing logging 2024-09-30 22:30:57 +02:00
Martin Robertz 9d1e6e9310 Merge pull request #34 from pashabou/master
setItemToCraft (crash fix)
2024-08-04 19:04:36 +07:00
Martin Robertz cbad80517a Merge branch 'master' into master 2024-08-04 19:00:32 +07:00
Martin Robertz 095924d6e5 Merge pull request #35 from Demiu/master
Adjust to AE2 api changes
2024-07-30 23:56:16 +07:00
Dream Master d109fcc774 update 2024-07-30 23:51:48 +07:00
pashabou 76aa7af49b Properly Setup GUI
Don't override away setting the item to craft
2024-07-26 23:40:11 -07:00
Martin Robertz a63db463a7 Merge branch 'master' into master 2024-07-27 09:16:05 +07:00
Demiu e605503e74 Adjust to AE2 api changes 2024-07-26 21:11:43 +02:00
Dream Master d26e3cf04b update 2024-07-25 17:11:34 +07:00
pashabou 12b3381ae5 setItemToCraft (crash fix)
Fixes GTNewHorizons/GT-New-Horizons-Modpack#16769 for change GTNewHorizons/Applied-Energistics-2-Unofficial#523
2024-07-23 01:15:14 -07:00
Martin Robertz 18712943ed update 2024-03-24 13:38:23 +01:00
Martin Robertz 79f601ce0b Merge pull request #33 from nikita23830/master
Update ItemMagnet.java
2024-03-24 13:35:00 +01:00
nikita23830 cace0fcb06 Update ItemMagnet.java
Ordnungsgemäße Trennung in Server und Client. Sonst geht die Logik verloren, wenn "!world.isRemote" ein Paket an den Server sendet...
Es bringt den Server zum Absturz.
2024-03-16 19:02:34 +01:00
Martin Robertz 038b072683 update 2024-02-28 08:34:37 +01:00
Martin Robertz 5508a91b9a Merge pull request #32 from slprime/fix-dynamic-font-size
Fix Dynamic Font Size
2024-02-28 08:34:04 +01:00
Martin Robertz ac219ae225 Update WirelessCraftingTerminal.java 2024-02-28 08:31:03 +01:00
slprime f35eaf95d8 Fix Dynamic Font Size 2024-02-28 08:09:11 +02:00
Raven Szewczyk 0cc9b63f84 [ci skip] upgraded build system 2024-02-04 20:03:04 +00:00
Martin Robertz 529c6a651c update deps + bs 2024-01-08 23:43:23 +01:00
Raven Szewczyk c61f7542a4 [ci skip] upgraded build system 2024-01-08 21:30:36 +00:00
Martin Robertz 8f2f060345 update bs+deps 2023-10-13 16:02:09 +02:00
Martin Robertz 35820c2dd0 update bs+deps 2023-09-27 22:24:05 +02:00
Martin Robertz 14ff6649c1 cleanup wildcard imports 2023-09-27 22:23:55 +02:00
Pilzinsel64 075d77b14e rename keybinds to be uniquie across mods
(cherry picked from commit c5a61e4316)
2023-09-27 22:19:58 +02:00
Martin Robertz f1fb01f8c7 Merge pull request #30 from GTNewHorizons/fix/keybind-lang
Fix lang key for keybind
2023-08-08 13:45:22 +02:00
miozune 07688d5d51 Fix lang key for keybind 2023-08-08 18:36:27 +09:00
miozune 88b764a8a3 Fix formatting in lang files 2023-08-08 18:35:31 +09:00
miozune a0191c1527 Update dependencies 2023-08-08 18:35:11 +09:00
miozune 7ee36e544f updateBuildScript 2023-08-08 18:34:53 +09:00
miozune dd02423102 Remove outdated script 2023-08-08 18:34:31 +09:00
43 changed files with 535 additions and 4632 deletions

No files matched your search

-51
View File
@@ -1,51 +0,0 @@
#!/usr/bin/env bash
# bashsupport disable=BP5006 # Global environment variables
RUNDIR="run" \
CRASH="crash-reports" \
SERVERLOG="server.log"
# enable nullglob to get 0 results when no match rather than the pattern
shopt -s nullglob
# store matches in array
crash_reports=("$RUNDIR/$CRASH/crash"*.txt)
# if array not empty there are crash_reports
if [ "${#crash_reports[@]}" -gt 0 ]; then
# get the latest crash_report from array
latest_crash_report="${crash_reports[-1]}"
{
printf 'Latest crash report detected %s:\n' "${latest_crash_report##*/}"
cat "$latest_crash_report"
} >&2
exit 1
fi
if grep --quiet --fixed-strings 'Fatal errors were detected' "$SERVERLOG"; then
{
printf 'Fatal errors detected:\n'
cat server.log
} >&2
exit 1
fi
if grep --quiet --fixed-strings 'The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED' \
"$SERVERLOG"; then
{
printf 'Server force stopped:'
cat server.log
} >&2
exit 1
fi
if ! grep --quiet --perl-regexp --only-matching '.+Done \(.+\)\! For help, type "help" or "\?"' "$SERVERLOG"; then
{
printf 'Server did not finish startup:'
cat server.log
} >&2
exit 1
fi
printf 'No crash reports detected'
exit 0
+2 -1588
View File
File diff suppressed because it is too large. Load diff
+7 -6
View File
@@ -1,10 +1,11 @@
// Add your dependencies here
dependencies {
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 }
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-731-GTNH-pre:dev")
implementation("com.github.GTNewHorizons:Baubles-Expanded:2.2.2-GTNH:dev")
compileOnly("curse.maven:cofh-core-69162:2388751")
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.8.26-GTNH:dev")
compileOnly("com.github.GTNewHorizons:MouseTweaks:2.4.20-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:EnderIO:2.10.3:dev") { transitive = false }
}
+169 -26
View File
@@ -1,68 +1,211 @@
# ExampleMod tag to use as Blowdryer (Spotless, etc.) settings version, leave empty to disable.
# LOCAL to test local config updates.
gtnh.settings.blowdryerTag = 0.2.0
# Human-readable mod name, available for mcmod.info population.
modName = AE2 Wireless Crafting Terminal
# This is a case-sensitive string to identify your mod. Convention is to use lower case.
# Case-sensitive identifier string, available for mcmod.info population and used for automatic mixin JSON generation.
# Conventionally lowercase.
modId = ae2wct
# Root package of the mod, used to find various classes in other properties,
# mcmod.info substitution, enabling assertions in run tasks, etc.
modGroup = net.p455w0rd.wirelesscraftingterminal
# WHY is there no version field?
# The build script relies on git to provide a version via tags. It is super easy and will enable you to always know the
# code base or your binary. Check out this tutorial: https://blog.mattclemente.com/2017/10/13/versioning-with-git-tags/
# Whether to use modGroup as the maven publishing group.
# When false, com.github.GTNewHorizons is used.
useModGroupForPublishing = false
# Will update your build.gradle automatically whenever an update is available
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
autoUpdateBuildScript = false
# Version of Minecraft to target
minecraftVersion = 1.7.10
# Version of Minecraft Forge to target
forgeVersion = 10.13.4.1614
# Select a username for testing your mod with breakpoints. You may leave this empty for a random user name each time you
# restart Minecraft in development. Choose this dependent on your mod:
# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name
# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty
# Specify an MCP channel for dependency deobfuscation and the deobfParams task.
channel = stable
# Specify an MCP mappings version for dependency deobfuscation and the deobfParams task.
mappingsVersion = 12
# Defines other MCP mappings for dependency deobfuscation.
remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
# Select a default username for testing your mod. You can always override this per-run by running
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
developmentEnvironmentUserName = Developer
# Enables using modern java syntax (up to version 17) via Jabel, while still targetting JVM 8.
# Enables using modern Java syntax (up to version 17) via Jabel, while still targeting 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
# version in @Mod([...], version = VERSION, [...])
# Leave these properties empty to skip individual token replacements
replaceGradleTokenInFile = Reference.java
gradleTokenModId =
gradleTokenModName =
# Enables injecting missing generics into the decompiled source code for a better coding experience.
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
enableGenericInjection = false
# Generate a class with a String field for the mod version named as defined below.
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
generateGradleTokenClass =
# Name of the token containing the project's current version to generate/replace.
gradleTokenVersion = GRADLETOKEN_VERSION
# [DEPRECATED] Mod ID replacement token.
gradleTokenModId =
# [DEPRECATED] Mod name replacement token.
gradleTokenModName =
# [DEPRECATED] Mod Group replacement token.
gradleTokenGroupName =
# [DEPRECATED]
# Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java
# public static final String VERSION = "GRADLETOKEN_VERSION";
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
# version in @Mod([...], version = VERSION, [...]).
# Leave these properties empty to skip individual token replacements.
replaceGradleTokenInFile = Reference.java
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
# leave this property empty.
# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api
# Example value: (apiPackage = api) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.api
apiPackage = api
# Specify the configuration file for Forge's access transformers here. I must be placed into /src/main/resources/META-INF/
# Example value: mymodid_at.cfg
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
# There can be multiple files in a space-separated list.
# Example value: mymodid_at.cfg nei_at.cfg
accessTransformersFile =
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins = false
# Set to a non-empty string to configure mixins in a separate source set under src/VALUE, instead of src/main.
# This can speed up compile times thanks to not running the mixin annotation processor on all input sources.
# Mixin classes will have access to "main" classes, but not the other way around.
separateMixinSourceSet =
# Adds some debug arguments like verbose output and class export.
usesMixinDebug = false
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
mixinPlugin =
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
# Specify the package that contains all of your Mixins. The package must exist or
# the build will fail. If you have a package property defined in your mixins.<modid>.json,
# it must match with this or the build will fail.
mixinsPackage =
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
# This parameter is for legacy compatibility only
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
# Example value: (coreModClass = asm.FMLPlugin) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.asm.FMLPlugin
coreModClass =
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
containsMixinsAndOrCoreModOnly = false
# If enabled, you may use 'shadowImplementation' for dependencies. They will be integrated in your jar. It is your
# responsibility check the licence and request permission for distribution, if required.
# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
forceEnableMixins = false
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated into your jar. It is your
# responsibility to check the license and request permission for distribution if required.
usesShadowedDependencies = false
# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older
# If disabled, won't remove unused classes from shadowed dependencies. Some libraries use reflection to access
# their own classes, making the minimization unreliable.
minimizeShadowedDependencies = true
# If disabled, won't rename the shadowed classes.
relocateShadowedDependencies = true
# Adds CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
includeWellKnownRepositories = true
# A list of repositories to exclude from the includeWellKnownRepositories setting. Should be a space separated
# list of strings, with the acceptable keys being(case does not matter):
# cursemaven
# modrinth
excludeWellKnownRepositories =
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables.
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
usesMavenPublishing = true
# Maven repository to publish the mod to.
# mavenPublishUrl = https\://nexus.gtnewhorizons.com/repository/releases/
# Publishing to Modrinth requires you to set the MODRINTH_TOKEN environment variable to your current Modrinth API token.
#
# The project's ID on Modrinth. Can be either the slug or the ID.
# Leave this empty if you don't want to publish to Modrinth.
modrinthProjectId =
# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth.
# Syntax: scope1-type1:name1;scope2-type2:name2;...
# Where scope can be one of [required, optional, incompatible, embedded],
# type can be one of [project, version],
# and the name is the Modrinth project or version slug/id of the other mod.
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
modrinthRelations =
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
#
# The project's numeric ID on CurseForge. You can find this in the About Project box.
# Leave this empty if you don't want to publish on CurseForge.
curseForgeProjectId =
# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge.
# Syntax: type1:name1;type2:name2;...
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
# and the name is the CurseForge project slug of the other mod.
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
curseForgeRelations =
# Optional parameter to customize the produced artifacts. Use this to preserve artifact naming when migrating older
# projects. New projects should not use this parameter.
customArchiveBaseName = WirelessCraftingTerminal
# Optional parameter to customize the default working directory used by the runClient* tasks. Relative to the project directory.
# runClientWorkingDirectory = run/client
# Optional parameter to customize the default working directory used by the runServer* tasks. Relative to the project directory.
# runServerWorkingDirectory = run/server
# Optional parameter to have the build automatically fail if an illegal version is used.
# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'.
# The check is ONLY performed if the version is a git tag.
# Note: the specified string must be escaped, so e.g. 1\\.1\\.\\d+ instead of 1\.1\.\d+
# versionPattern =
# Uncomment to prevent the source code from being published.
# noPublishedSources = true
# Uncomment this to disable Spotless checks.
# This should only be uncommented to keep it easier to sync with upstream/other forks.
# That is, if there is no other active fork/upstream, NEVER change this.
# disableSpotless = true
# Uncomment this to disable Checkstyle checks (currently wildcard import check).
# disableCheckstyle = true
# Override the IDEA build type. Valid values are: "" (leave blank, do not override), "idea" (force use native IDEA build), "gradle"
# (force use delegated build).
# This is meant to be set in $HOME/.gradle/gradle.properties.
# e.g. add "systemProp.org.gradle.project.ideaOverrideBuildType=idea" will override the build type to be native build.
# WARNING: If you do use this option, it will overwrite whatever you have in your existing projects. This might not be what you want!
# Usually there is no need to uncomment this here as other developers do not necessarily use the same build type as you.
# ideaOverrideBuildType = idea
# Whether IDEA should run spotless checks when pressing the Build button.
# This is meant to be set in $HOME/.gradle/gradle.properties.
# ideaCheckSpotlessOnBuild = true
Binary file not shown.
+2 -1
View File
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored
+22 -15
View File
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -83,10 +85,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# 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\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -114,7 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
@@ -133,10 +133,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
@@ -144,7 +147,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=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@@ -152,7 +155,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=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@@ -197,16 +200,20 @@ if "$cygwin" || "$msys" ; then
done
fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * 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.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.
Vendored
+14 -12
View File
@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
@@ -57,22 +59,22 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
set CLASSPATH=
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
+1 -10
View File
@@ -1,14 +1,5 @@
// Add any additional repositories for your dependencies here
repositories {
maven {
name = "GTNH Maven"
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
}
maven {
url "https://cursemaven.com"
}
maven {
url = "https://jitpack.io"
}
mavenLocal()
}
+5 -10
View File
@@ -4,10 +4,10 @@ pluginManagement {
maven {
// RetroFuturaGradle
name "GTNH Maven"
url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
allowInsecureProtocol = true
url "https://nexus.gtnewhorizons.com/repository/public/"
mavenContent {
includeGroup("com.gtnewhorizons.retrofuturagradle")
includeGroup("com.gtnewhorizons")
includeGroupByRegex("com\\.gtnewhorizons\\..+")
}
}
gradlePluginPortal()
@@ -17,12 +17,7 @@ pluginManagement {
}
plugins {
id 'com.diffplug.blowdryerSetup' version '1.6.0'
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0' // Provides java toolchains
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.48'
}
blowdryerSetup {
repoSubfolder 'gtnhShared'
github('GTNewHorizons/ExampleMod1.7.10', 'tag', '0.2.0')
//devLocal '.' // Use this when testing config updates locally
}
@@ -1,73 +0,0 @@
package net.p455w0rd.wirelesscraftingterminal.client.gui;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.p455w0rd.wirelesscraftingterminal.core.sync.network.NetworkHandler;
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketSwitchGuis;
import net.p455w0rd.wirelesscraftingterminal.helpers.WirelessTerminalGuiObject;
import net.p455w0rd.wirelesscraftingterminal.items.ItemEnum;
import net.p455w0rd.wirelesscraftingterminal.items.ItemWirelessCraftingTerminal;
import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
import appeng.api.AEApi;
import appeng.api.definitions.IDefinitions;
import appeng.api.definitions.IParts;
import appeng.api.storage.ITerminalHost;
import appeng.client.gui.widgets.GuiTabButton;
import appeng.container.implementations.ContainerCraftAmount;
import appeng.helpers.Reflected;
public class GuiCraftAmount extends appeng.client.gui.implementations.GuiCraftAmount {
private GuiTabButton originalGuiBtn;
private ItemStack myIcon;
private int originalGui;
@Reflected
public GuiCraftAmount(final InventoryPlayer inventoryPlayer, final ITerminalHost te) {
super(inventoryPlayer, te);
ItemStack is = new ItemStack(ItemEnum.WIRELESS_CRAFTING_TERMINAL.getItem());
((ItemWirelessCraftingTerminal) is.getItem()).injectAEPower(is, 6400001);
myIcon = is;
}
@SuppressWarnings({ "unchecked", "unused" })
@Override
public void initGui() {
super.initGui();
// Remove the autogenerated button which takes you to the AE2 wireless terminal GUI
if (this.buttonList.get(this.buttonList.size() - 1) instanceof GuiTabButton) {
this.buttonList.remove(this.buttonList.size() - 1);
}
final Object target = ((ContainerCraftAmount) this.inventorySlots).getTarget();
final IDefinitions definitions = AEApi.instance().definitions();
final IParts parts = definitions.parts();
if (target instanceof WirelessTerminalGuiObject) {
this.originalGui = Reference.GUI_WCT;
}
if (this.originalGui > 0 && myIcon != null) {
this.buttonList.add(
this.originalGuiBtn = new GuiTabButton(
this.guiLeft + 154,
this.guiTop - 4,
myIcon,
myIcon.getDisplayName(),
itemRender));
}
}
@Override
protected void actionPerformed(final GuiButton btn) {
super.actionPerformed(btn);
if (btn == this.originalGuiBtn) {
NetworkHandler.instance.sendToServer(new PacketSwitchGuis(this.originalGui));
}
}
}
@@ -1,20 +0,0 @@
package net.p455w0rd.wirelesscraftingterminal.client.gui;
import net.minecraft.entity.player.InventoryPlayer;
import net.p455w0rd.wirelesscraftingterminal.core.sync.network.NetworkHandler;
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketSwitchGuis;
import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
import appeng.api.storage.ITerminalHost;
public class GuiCraftConfirm extends appeng.client.gui.implementations.GuiCraftConfirm {
public GuiCraftConfirm(final InventoryPlayer inventoryPlayer, final ITerminalHost te) {
super(inventoryPlayer, te);
}
@Override
public void switchToOriginalGUI() {
NetworkHandler.instance.sendToServer(new PacketSwitchGuis(Reference.GUI_WCT));
}
}
@@ -1,73 +0,0 @@
package net.p455w0rd.wirelesscraftingterminal.client.gui;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.p455w0rd.wirelesscraftingterminal.core.sync.network.NetworkHandler;
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketSwitchGuis;
import net.p455w0rd.wirelesscraftingterminal.helpers.WirelessTerminalGuiObject;
import net.p455w0rd.wirelesscraftingterminal.items.ItemEnum;
import net.p455w0rd.wirelesscraftingterminal.items.ItemWirelessCraftingTerminal;
import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
import appeng.api.AEApi;
import appeng.api.definitions.IDefinitions;
import appeng.api.definitions.IParts;
import appeng.api.storage.ITerminalHost;
import appeng.client.gui.widgets.GuiTabButton;
import appeng.container.implementations.ContainerCraftingStatus;
public class GuiCraftingStatus extends appeng.client.gui.implementations.GuiCraftingStatus {
private GuiTabButton originalGuiBtn;
private int originalGui;
private ItemStack myIcon = null;
@SuppressWarnings("unused")
public GuiCraftingStatus(final InventoryPlayer inventoryPlayer, final ITerminalHost te) {
super(inventoryPlayer, te);
ContainerCraftingStatus status = (ContainerCraftingStatus) this.inventorySlots;
final Object target = status.getTarget();
final IDefinitions definitions = AEApi.instance().definitions();
final IParts parts = definitions.parts();
if (target instanceof WirelessTerminalGuiObject) {
for (final ItemStack wirelessTerminalStack : definitions.items().wirelessTerminal().maybeStack(1).asSet()) {
this.myIcon = wirelessTerminalStack;
}
ItemStack is = new ItemStack(ItemEnum.WIRELESS_CRAFTING_TERMINAL.getItem());
((ItemWirelessCraftingTerminal) is.getItem()).injectAEPower(is, 6400001);
myIcon = is;
this.originalGui = Reference.GUI_WCT;
}
}
@Override
protected void actionPerformed(final GuiButton btn) {
super.actionPerformed(btn);
if (btn == this.originalGuiBtn) {
NetworkHandler.instance.sendToServer(new PacketSwitchGuis(this.originalGui));
}
}
@SuppressWarnings("unchecked")
@Override
public void initGui() {
super.initGui();
if (this.myIcon != null) {
this.buttonList.add(
this.originalGuiBtn = new GuiTabButton(
this.guiLeft + 213,
this.guiTop - 4,
this.myIcon,
this.myIcon.getDisplayName(),
itemRender));
this.originalGuiBtn.setHideEdge(13);
}
}
}
@@ -1,340 +1,112 @@
package net.p455w0rd.wirelesscraftingterminal.client.gui;
import java.io.IOException;
import java.lang.reflect.Field;
import java.text.NumberFormat;
import java.util.List;
import java.util.Locale;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiInventory;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.p455w0rd.wirelesscraftingterminal.client.gui.widgets.GuiTrashButton;
import net.p455w0rd.wirelesscraftingterminal.common.container.ContainerWirelessCraftingTerminal;
import net.p455w0rd.wirelesscraftingterminal.common.container.slot.SlotTrash;
import net.p455w0rd.wirelesscraftingterminal.common.utils.WCTLog;
import net.p455w0rd.wirelesscraftingterminal.core.sync.network.NetworkHandler;
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketEmptyTrash;
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketInventoryAction;
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketSwitchGuis;
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketValueConfig;
import net.p455w0rd.wirelesscraftingterminal.handlers.LocaleHandler;
import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import appeng.api.config.ActionItems;
import appeng.api.config.SearchBoxMode;
import appeng.api.config.Settings;
import appeng.api.config.TerminalStyle;
import appeng.api.config.YesNo;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.util.IConfigManager;
import appeng.api.util.IConfigurableObject;
import appeng.client.ActionKey;
import appeng.client.gui.AEBaseGui;
import appeng.api.parts.ICraftingTerminal;
import appeng.client.gui.implementations.GuiMEMonitorable;
import appeng.client.gui.slots.VirtualMEPinSlot;
import appeng.client.gui.widgets.GuiImgButton;
import appeng.client.gui.widgets.GuiScrollbar;
import appeng.client.gui.widgets.GuiTabButton;
import appeng.client.gui.widgets.ISortSource;
import appeng.client.gui.widgets.MEGuiTextField;
import appeng.client.me.InternalSlotME;
import appeng.client.me.ItemRepo;
import appeng.client.me.SlotME;
import appeng.container.AEBaseContainer;
import appeng.container.slot.AppEngSlot;
import appeng.container.slot.SlotCraftingMatrix;
import appeng.container.slot.SlotFakeCraftingMatrix;
import appeng.core.AEConfig;
import appeng.core.CommonHelper;
import appeng.core.localization.ButtonToolTips;
import appeng.core.localization.GuiText;
import appeng.helpers.InventoryAction;
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 yalter.mousetweaks.api.IMTModGuiContainer;
@Optional.Interface(modid = "MouseTweaks", iface = "yalter.mousetweaks.api.IMTModGuiContainer")
public class GuiWirelessCraftingTerminal extends AEBaseGui
implements ISortSource, IConfigManagerHost, IMTModGuiContainer {
public class GuiWirelessCraftingTerminal extends GuiMEMonitorable implements IMTModGuiContainer {
private float xSize_lo;
private float ySize_lo;
public static int tick = 0, GUI_HEIGHT = 240, GUI_WIDTH = 230, AE_ROW_HEIGHT = 18, AE_NUM_ROWS = 0,
GUI_UPPER_HEIGHT = 35, GUI_SEARCH_ROW = 35, SEARCH_X = 80, SEARCH_Y = 4, SEARCH_WIDTH = 88,
SEARCH_HEIGHT = 12, SEARCH_MAXCHARS = 15, GUI_LOWER_HEIGHT, AE_TOTAL_ROWS_HEIGHT,
BUTTON_SEARCH_MODE_POS_X = -18, BUTTON_SEARCH_MODE_POS_Y = 68, BUTTON_SIZE = 16, NEI_EXTRA_SPACE = 30,
slotYOffset;
protected static final int BUTTON_SEARCH_MODE_ID = 5;
protected static final long TOOLTIP_UPDATE_INTERVAL = 3000L;
private int currScreenWidth, currScreenHeight;
private static final String bgTexturePath = "gui/crafting_viewcell.png";
final ResourceLocation BackgroundTexture = new ResourceLocation(
Reference.MODID,
"textures/gui/crafting_viewcell.png");
private final ContainerWirelessCraftingTerminal containerWCT;
private boolean isFullScreen, init = true, reInit, wasResized = false;
public static GuiWirelessCraftingTerminal INSTANCE;
private static boolean switchingGuis;
public static int craftingGridOffsetX = 80;
public static int craftingGridOffsetY;
private static String memoryText = "";
private final ItemRepo repo;
private final int offsetX = 8;
private final IConfigManager configSrc;
private GuiTabButton craftingStatusBtn;
private MEGuiTextField searchField;
private int perRow = 9;
private boolean customSortOrder = true;
private GuiImgButton ViewBox;
private GuiImgButton SortByBox;
private GuiImgButton SortDirBox;
private GuiImgButton searchBoxSettings;
private GuiImgButton clearBtn;
private GuiTrashButton trashBtn;
private GuiImgButton terminalStyleBox;
private GuiImgButton searchStringSave;
private boolean isAutoFocus = false;
private int currentMouseX = 0;
private int currentMouseY = 0;
public boolean devicePowered = false;
private boolean isNEIEnabled;
private boolean wasTextboxFocused = false;
private int screenResTicks = 0;
private int reservedSpace = 0;
private int maxRows = Integer.MAX_VALUE;
private int standardSize;
private final int lowerTextureOffset = 0;
private int rows = 0;
private final ItemStack[] myCurrentViewCells = new ItemStack[5];
public GuiWirelessCraftingTerminal(Container container) {
super(container);
GuiWirelessCraftingTerminal.INSTANCE = this;
this.xSize = GUI_WIDTH;
this.ySize = GUI_HEIGHT;
this.standardSize = this.xSize;
public GuiWirelessCraftingTerminal(final InventoryPlayer inventoryPlayer, ICraftingTerminal host) {
super(inventoryPlayer, host, new ContainerWirelessCraftingTerminal(inventoryPlayer, host));
this.setReservedSpace(73);
this.containerWCT = (ContainerWirelessCraftingTerminal) container;
this.setScrollBar(new GuiScrollbar());
this.repo = new ItemRepo(getScrollBar(), this);
this.configSrc = ((IConfigurableObject) this.inventorySlots).getConfigManager();
this.devicePowered = containerWCT.isPowered();
this.offsetRepoX -= 1;
this.containerWCT = (ContainerWirelessCraftingTerminal) this.inventorySlots;
((ContainerWirelessCraftingTerminal) this.inventorySlots).setGui(this);
}
public void postUpdate(final List<IAEItemStack> list) {
for (final IAEItemStack is : list) {
this.repo.postUpdate(is);
}
this.repo.updateView();
this.setScrollBar();
}
private void setScrollBar() {
this.getScrollBar().setTop(18).setLeft(174).setHeight(this.rows * 18 - 2);
this.getScrollBar().setRange(
0,
(this.repo.size() + this.perRow - 1) / this.perRow - this.rows,
Math.max(1, this.rows / 6));
}
@SuppressWarnings("rawtypes")
@Override
protected void actionPerformed(final GuiButton btn) {
if (btn == this.craftingStatusBtn) {
NetworkHandler.instance.sendToServer(new PacketSwitchGuis(Reference.GUI_CRAFTING_STATUS));
}
if (btn instanceof GuiImgButton) {
final boolean backwards = Mouse.isButtonDown(1);
final GuiImgButton iBtn = (GuiImgButton) btn;
if (iBtn.getSetting() != Settings.ACTIONS) {
final Enum cv = iBtn.getCurrentValue();
final Enum next = Platform.rotateEnum(cv, backwards, iBtn.getSetting().getPossibleValues());
if (btn == this.terminalStyleBox) {
AEConfig.instance.settings.putSetting(iBtn.getSetting(), next);
}
if (btn == this.searchBoxSettings) {
AEConfig.instance.settings.putSetting(iBtn.getSetting(), next);
} else if (btn == this.searchStringSave) {
AEConfig.instance.preserveSearchBar = next == YesNo.YES;
} else {
try {
NetworkHandler.instance
.sendToServer(new PacketValueConfig(iBtn.getSetting().name(), next.name()));
} catch (final IOException e) {
WCTLog.debug(e.getMessage());
}
}
iBtn.set(next);
if (next.getClass() == SearchBoxMode.class || next.getClass() == TerminalStyle.class) {
this.reinitalize();
// if (btn == this.craftingStatusBtn) {
// NetworkHandler.instance.sendToServer(new PacketSwitchGuis(Reference.GUI_CRAFTING_STATUS));
// } else
if (this.clearBtn == btn) {
Slot s = null;
final Container c = this.inventorySlots;
for (final Object j : c.inventorySlots) {
if (j instanceof SlotCraftingMatrix) {
s = (Slot) j;
}
}
if (this.clearBtn == btn) {
Slot s = null;
final Container c = this.inventorySlots;
for (final Object j : c.inventorySlots) {
if (j instanceof SlotCraftingMatrix) {
s = (Slot) j;
}
}
if (s != null) {
final PacketInventoryAction p = new PacketInventoryAction(
InventoryAction.MOVE_REGION,
s.slotNumber,
0);
NetworkHandler.instance.sendToServer(p);
}
}
}
if (btn instanceof GuiTrashButton) {
if (this.trashBtn == btn) {
Slot s = null;
final Container c = this.inventorySlots;
for (final Object j : c.inventorySlots) {
if (j instanceof SlotTrash) {
s = (Slot) j;
}
}
if (s != null) {
if (s.getHasStack()) {
containerWCT.trashSlot.clearStack();
NetworkHandler.instance.sendToServer(new PacketEmptyTrash());
}
}
}
}
}
@Override
protected void handleMouseClick(Slot slot, int slotIdx, int ctrlDown, int mouseButton) {
// Handle autocraft requests ourselves to spawn the right GUI classes
final EntityPlayer player = Minecraft.getMinecraft().thePlayer;
if (slot instanceof SlotME) {
InventoryAction action = null;
IAEItemStack stack = null;
switch (mouseButton) {
case 0: // pickup / set-down.
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
stack = ((SlotME) slot).getAEStack();
if (stack != null && action == InventoryAction.PICKUP_OR_SET_DOWN
&& stack.getStackSize() == 0
&& player.inventory.getItemStack() == null) {
action = InventoryAction.AUTO_CRAFT;
}
break;
case 3: // creative dupe:
stack = ((SlotME) slot).getAEStack();
if (stack != null && stack.isCraftable()) {
action = InventoryAction.AUTO_CRAFT;
}
break;
default:
}
if (action == InventoryAction.AUTO_CRAFT) {
((AEBaseContainer) this.inventorySlots).setTargetStack(stack);
final PacketInventoryAction p = new PacketInventoryAction(
action,
this.inventorySlots.inventorySlots.size(),
0);
if (s != null) {
final PacketInventoryAction p = new PacketInventoryAction(InventoryAction.MOVE_REGION, s.slotNumber, 0);
NetworkHandler.instance.sendToServer(p);
return;
}
} else if (this.trashBtn == btn) {
Slot s = null;
final Container c = this.inventorySlots;
for (final Object j : c.inventorySlots) {
if (j instanceof SlotTrash) {
s = (Slot) j;
}
}
if (s != null) {
if (s.getHasStack()) {
containerWCT.trashSlot.clearStack();
NetworkHandler.instance.sendToServer(new PacketEmptyTrash());
}
}
} else {
super.actionPerformed(btn);
}
super.handleMouseClick(slot, slotIdx, ctrlDown, mouseButton);
}
private void reinitalize() {
this.buttonList.clear();
this.initGui();
}
int getReservedSpace() {
return this.reservedSpace;
}
void setReservedSpace(final int reservedSpace) {
this.reservedSpace = reservedSpace;
}
public int getStandardSize() {
return this.standardSize;
}
void setStandardSize(final int standardSize) {
this.standardSize = standardSize;
}
/**
* Initializes the GUI
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
@SuppressWarnings({ "unchecked" })
@Override
public void initGui() {
super.initGui();
Keyboard.enableRepeatEvents(true);
this.maxRows = this.getMaxRows();
this.perRow = AEConfig.instance.getConfigManager().getSetting(Settings.TERMINAL_STYLE) != TerminalStyle.FULL ? 9
: 9 + ((this.width - this.standardSize) / 18);
this.isNEIEnabled = Loader.isModLoaded("NotEnoughItems");
int top = isNEIEnabled ? 22 : 0;
final int magicNumber = 114 + 1;
final int extraSpace = this.height - magicNumber - top - this.reservedSpace;
this.rows = (int) Math.floor(extraSpace / 18);
if (this.rows > this.maxRows) {
top += (this.rows - this.maxRows) * 18 / 2;
this.rows = this.maxRows;
}
if (isNEIEnabled) {
this.rows--;
}
if (this.rows < 3) {
this.rows = 3;
}
this.getMeSlots().clear();
for (int y = 0; y < this.rows; y++) {
for (int x = 0; x < this.perRow; x++) {
this.getMeSlots()
.add(new InternalSlotME(this.repo, x + y * this.perRow, this.offsetX + x * 18, 18 + y * 18));
}
}
if (AEConfig.instance.getConfigManager().getSetting(Settings.TERMINAL_STYLE) != TerminalStyle.FULL) {
this.xSize = this.standardSize + ((this.perRow - 9) * 18);
} else {
this.xSize = this.standardSize;
}
super.initGui();
this.ySize = magicNumber + this.rows * 18 + this.reservedSpace;
final int unusedSpace = this.height - this.ySize;
this.guiTop = (int) Math.floor(unusedSpace / (unusedSpace < 0 ? 3.8f : 2.0f));
int offset = this.guiTop + 8;
this.buttonList.clear();
this.buttonList.add(
this.clearBtn = new GuiImgButton(
this.guiLeft + 134,
@@ -343,58 +115,6 @@ public class GuiWirelessCraftingTerminal extends AEBaseGui
ActionItems.STASH));
this.buttonList.add(this.trashBtn = new GuiTrashButton(this.guiLeft + 98, this.guiTop + this.ySize - 104));
this.clearBtn.setHalfSize(true);
if (this.customSortOrder) {
this.buttonList.add(
this.SortByBox = new GuiImgButton(
this.guiLeft - 18,
offset,
Settings.SORT_BY,
this.configSrc.getSetting(Settings.SORT_BY)));
offset += 20;
}
this.buttonList.add(
this.ViewBox = new GuiImgButton(
this.guiLeft - 18,
offset,
Settings.VIEW_MODE,
this.configSrc.getSetting(Settings.VIEW_MODE)));
offset += 20;
this.buttonList.add(
this.SortDirBox = new GuiImgButton(
this.guiLeft - 18,
offset,
Settings.SORT_DIRECTION,
this.configSrc.getSetting(Settings.SORT_DIRECTION)));
offset += 20;
this.buttonList.add(
this.searchBoxSettings = new GuiImgButton(
this.guiLeft - 18,
offset,
Settings.SEARCH_MODE,
AEConfig.instance.settings.getSetting(Settings.SEARCH_MODE)));
offset += 20;
this.buttonList.add(
this.searchStringSave = new GuiImgButton(
this.guiLeft - 18,
offset,
Settings.SAVE_SEARCH,
AEConfig.instance.preserveSearchBar ? YesNo.YES : YesNo.NO));
offset += 20;
this.buttonList.add(
this.terminalStyleBox = new GuiImgButton(
this.guiLeft - 18,
offset,
Settings.TERMINAL_STYLE,
AEConfig.instance.settings.getSetting(Settings.TERMINAL_STYLE)));
this.searchField = new MEGuiTextField(SEARCH_WIDTH, SEARCH_HEIGHT);
this.searchField.x = SEARCH_X;
this.searchField.y = SEARCH_Y;
this.buttonList.add(
this.craftingStatusBtn = new GuiTabButton(
@@ -405,20 +125,6 @@ public class GuiWirelessCraftingTerminal extends AEBaseGui
itemRender));
this.craftingStatusBtn.setHideEdge(13);
final Enum searchMode = AEConfig.instance.settings.getSetting(Settings.SEARCH_MODE);
this.isAutoFocus = SearchBoxMode.AUTOSEARCH == searchMode || SearchBoxMode.NEI_AUTOSEARCH == searchMode;
this.searchField.setFocused(this.isAutoFocus);
if (AEConfig.instance.preserveSearchBar || this.isSubGui()) {
this.searchField.setText(memoryText);
this.repo.setSearchString(memoryText);
}
if (this.isSubGui()) {
this.repo.updateView();
this.setScrollBar();
}
craftingGridOffsetX = Integer.MAX_VALUE;
craftingGridOffsetY = Integer.MAX_VALUE;
@@ -439,81 +145,9 @@ public class GuiWirelessCraftingTerminal extends AEBaseGui
}
}
int getMaxRows() {
return AEConfig.instance.getConfigManager().getSetting(Settings.TERMINAL_STYLE) == TerminalStyle.SMALL ? 6
: Integer.MAX_VALUE;
}
protected void repositionSlot(final AppEngSlot s) {
s.yDisplayPosition = s.getY() + this.ySize - 78 - 5;
}
/**
* Called every tick. It is used in this instance to detect screen size changes to automatically update the gui
* height.
* <p>
* reInit variable is used to call initGui() on the next tick. It has to be called this way to update correctly.
*
* @author p455w0rd
*/
@Override
public void updateScreen() {
this.devicePowered = containerWCT.isPowered();
this.repo.setPowered(devicePowered);
super.updateScreen();
if (this.init) {
this.currScreenWidth = this.mc.displayWidth;
this.currScreenHeight = this.mc.displayHeight;
this.isFullScreen = this.mc.isFullScreen();
this.reInit = true;
this.init = false;
}
++screenResTicks;
if (screenResTicks == 20) {
this.wasTextboxFocused = this.searchField.isFocused();
screenResTicks = 0;
}
if (this.reInit) {
if (tick != 1) {
tick++;
} else {
this.initGui();
this.setScrollBar();
if (this.wasResized) {
this.searchField.setFocused(this.wasTextboxFocused);
this.searchField.setText(this.repo.getSearchString());
this.wasTextboxFocused = false;
this.wasResized = false;
}
this.reInit = false;
tick = 0;
}
}
if (hasScreenResChanged()) {
this.reInit = true;
this.wasResized = true;
}
if (!this.mc.thePlayer.isEntityAlive() || this.mc.thePlayer.isDead) {
this.mc.thePlayer.closeScreen();
}
}
/**
* Detects if the window has been resized
*
* @return True if window has been resized
* @author p455w0rd
*/
private boolean hasScreenResChanged() {
if ((this.currScreenWidth != this.mc.displayWidth) || (this.currScreenHeight != this.mc.displayHeight)
|| (this.isFullScreen != this.mc.isFullScreen())) {
this.currScreenWidth = this.mc.displayWidth;
this.currScreenHeight = this.mc.displayHeight;
this.isFullScreen = this.mc.isFullScreen();
return true;
}
return false;
protected int getPinButtonY() {
return super.getPinButtonY() + 31;
}
/**
@@ -527,22 +161,21 @@ public class GuiWirelessCraftingTerminal extends AEBaseGui
}
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) {
String s = LocaleHandler.WirelessTermLabel.getLocal();
this.mc.fontRenderer.drawString(s, 7, 5, 4210752);
this.mc.fontRenderer.drawString(I18n.format("container.inventory"), 7, this.ySize - 172 + 3, 4210752);
if (this.searchField != null) {
this.searchField.drawTextBox();
}
VirtualMEPinSlot.drawSlotsBackground(this.pinSlots, this.mc, this.zLevel);
this.currentMouseX = mouseX;
this.currentMouseY = mouseY;
}
public void drawBG(final int offsetX, final int offsetY, final int mouseX, final int mouseY) {
this.bindMyTexture(bgTexturePath);
final int x_width = 199;
// draw "over inventory area"
this.mc.getTextureManager().bindTexture(BackgroundTexture);
final int x_width = 199;
this.drawTexturedModalRect(offsetX, offsetY, 0, 0, x_width, 18);
for (int x = 0; x < this.rows; x++) {
@@ -556,9 +189,9 @@ public class GuiWirelessCraftingTerminal extends AEBaseGui
0,
106 - 18 - 18,
x_width,
99 + this.reservedSpace - this.lowerTextureOffset);
99 + this.getReservedSpace() - this.lowerTextureOffset);
// draw view cells
// draw view cells background
this.drawTexturedModalRect(offsetX + x_width, offsetY, x_width, 0, 32, 104);
if (Reference.WCT_BOOSTER_ENABLED) {
@@ -572,263 +205,9 @@ public class GuiWirelessCraftingTerminal extends AEBaseGui
(float) ((this.guiTop + this.rows * 18) + 50) - this.ySize_lo,
this.mc.thePlayer);
boolean update = false;
for (int i = 0; i < 5; i++) {
if (myCurrentViewCells[i] != containerWCT.getCellViewSlot(i).getStack()) {
update = true;
myCurrentViewCells[i] = containerWCT.getCellViewSlot(i).getStack();
}
}
this.searchField.drawTextBox();
if (update) {
repo.setViewCell(myCurrentViewCells);
}
}
@SuppressWarnings("rawtypes")
@Override
protected void mouseClicked(final int xCoord, final int yCoord, final int btn) {
if (!this.isAutoFocus) {
this.searchField.mouseClicked(xCoord - this.guiLeft, yCoord - this.guiTop, btn);
}
if (btn == 1 && this.searchField.isMouseIn(xCoord - this.guiLeft, yCoord - this.guiTop)) {
this.searchField.setText("");
this.repo.setSearchString("");
this.repo.updateView();
this.setScrollBar();
}
super.mouseClicked(xCoord, yCoord, btn);
}
@Override
public void onGuiClosed() {
super.onGuiClosed();
Keyboard.enableRepeatEvents(false);
if (this.searchField.getText() != null) {
memoryText = this.searchField.getText();
}
}
protected boolean enableSpaceClicking() {
return true;
}
@Override
protected void keyTyped(final char character, final int key) {
if (!this.checkHotbarKeys(key)) {
if (isNEIFocused()) {
return;
}
if (CommonHelper.proxy.isActionKey(ActionKey.TOGGLE_FOCUS, key)) {
this.searchField.setFocused(!this.searchField.isFocused());
return;
}
if (this.searchField.isFocused() && key == Keyboard.KEY_RETURN) {
this.searchField.setFocused(false);
return;
}
if (character == ' ' && this.searchField.getText().isEmpty()) {
return;
}
final boolean mouseInGui = this
.isPointInRegion(0, 0, this.xSize, this.ySize, this.currentMouseX, this.currentMouseY);
if (this.isAutoFocus && !this.searchField.isFocused() && mouseInGui) {
this.searchField.setFocused(true);
}
if (this.searchField.textboxKeyTyped(character, key)) {
this.repo.setSearchString(this.searchField.getText());
this.repo.updateView();
this.setScrollBar();
} else {
super.keyTyped(character, key);
}
}
}
protected boolean isPowered() {
return this.repo.hasPower();
}
public void bindMyTexture(final String file) {
final ResourceLocation loc = new ResourceLocation(Reference.MODID, "textures/" + file);
this.mc.getTextureManager().bindTexture(loc);
}
public List<String> handleItemTooltip(final ItemStack stack, final int mouseX, final int mouseY,
final List<String> currentToolTip) {
if (stack != null) {
final Slot s = this.getSlot(mouseX, mouseY);
if (s instanceof SlotME) {
final int BigNumber = AEConfig.instance.useTerminalUseLargeFont() ? 999 : 9999;
IAEItemStack myStack = null;
try {
final SlotME theSlotField = (SlotME) s;
myStack = theSlotField.getAEStack();
} catch (final Throwable ignore) {}
if (myStack != null) {
if (myStack.getStackSize() > BigNumber || (myStack.getStackSize() > 1 && stack.isItemDamaged())) {
final String local = ButtonToolTips.ItemsStored.getLocal();
final String formattedAmount = NumberFormat.getNumberInstance(Locale.US)
.format(myStack.getStackSize());
final String format = String.format(local, formattedAmount);
currentToolTip.add("\u00a77" + format);
}
if (myStack.getCountRequestable() > 0) {
final String local = ButtonToolTips.ItemsRequestable.getLocal();
final String formattedAmount = NumberFormat.getNumberInstance(Locale.US)
.format(myStack.getCountRequestable());
final String format = String.format(local, formattedAmount);
currentToolTip.add("\u00a77" + format);
}
} else if (stack.stackSize > BigNumber || (stack.stackSize > 1 && stack.isItemDamaged())) {
final String local = ButtonToolTips.ItemsStored.getLocal();
final String formattedAmount = NumberFormat.getNumberInstance(Locale.US).format(stack.stackSize);
final String format = String.format(local, formattedAmount);
currentToolTip.add("\u00a77" + format);
}
}
}
return currentToolTip;
}
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
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;
IAEItemStack myStack = null;
try {
final SlotME theSlotField = (SlotME) s;
myStack = theSlotField.getAEStack();
} catch (final Throwable ignore) {}
if (myStack != null) {
final List<String> currentToolTip = stack
.getTooltip(this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips);
if (myStack.getStackSize() > BigNumber || (myStack.getStackSize() > 1 && stack.isItemDamaged())) {
currentToolTip.add(
"Items Stored: "
+ NumberFormat.getNumberInstance(Locale.US).format(myStack.getStackSize()));
}
if (myStack.getCountRequestable() > 0) {
currentToolTip.add(
"Items Requestable: "
+ NumberFormat.getNumberInstance(Locale.US).format(myStack.getCountRequestable()));
}
this.drawTooltip(x, y, 0, join(currentToolTip, "\n"));
} else if (stack.stackSize > BigNumber) {
final List var4 = stack.getTooltip(this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips);
var4.add("Items Stored: " + NumberFormat.getNumberInstance(Locale.US).format(stack.stackSize));
this.drawTooltip(x, y, 0, join(var4, "\n"));
return;
}
}
super.renderToolTip(stack, x, y);
// super.drawItemStackTooltip( stack, x, y );
}
@SuppressWarnings("rawtypes")
@Override
public void updateSetting(final IConfigManager manager, final Enum settingName, final Enum newValue) {
if (this.SortByBox != null) {
this.SortByBox.set(this.configSrc.getSetting(Settings.SORT_BY));
}
if (this.SortDirBox != null) {
this.SortDirBox.set(this.configSrc.getSetting(Settings.SORT_DIRECTION));
}
if (this.ViewBox != null) {
this.ViewBox.set(this.configSrc.getSetting(Settings.VIEW_MODE));
}
this.repo.updateView();
this.setScrollBar();
}
public boolean isCustomSortOrder() {
return this.customSortOrder;
}
void setCustomSortOrder(final boolean customSortOrder) {
this.customSortOrder = customSortOrder;
}
@SuppressWarnings("rawtypes")
@Override
public Enum getSortBy() {
return this.configSrc.getSetting(Settings.SORT_BY);
}
@SuppressWarnings("rawtypes")
@Override
public Enum getSortDir() {
return this.configSrc.getSetting(Settings.SORT_DIRECTION);
}
@SuppressWarnings("rawtypes")
@Override
public Enum getSortDisplay() {
return this.configSrc.getSetting(Settings.VIEW_MODE);
}
public boolean isOverSearchField(int x, int y) {
return searchField.isMouseIn(x - guiLeft, y - guiTop);
}
public void setSearchString(String memoryText) {
this.searchField.setText(memoryText);
this.repo.setSearchString(memoryText);
this.repo.updateView();
this.setScrollBar();
}
@SuppressWarnings("SameParameterValue")
protected boolean isPointInRegion(int rectX, int rectY, int rectWidth, int rectHeight, int pointX, int pointY) {
int i = this.guiLeft;
int j = this.guiTop;
pointX -= i;
pointY -= j;
return pointX >= rectX - 1 && pointX < rectX + rectWidth + 1
&& pointY >= rectY - 1
&& pointY < rectY + rectHeight + 1;
}
private boolean isNEIFocused() {
if (!Loader.isModLoaded("NotEnoughItems")) {
return false;
}
try {
final Class<? super Object> c = ReflectionHelper
.getClass(this.getClass().getClassLoader(), "codechicken.nei.LayoutManager");
final Field fldSearchField = c.getField("searchField");
final TextField searchField = (TextField) fldSearchField.get(c);
return searchField.focused();
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}
return false;
this.updateViewCells();
}
// MouseTweaks compat
@@ -0,0 +1,27 @@
package net.p455w0rd.wirelesscraftingterminal.client.gui;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import net.p455w0rd.wirelesscraftingterminal.common.WCTGuiHandler;
import appeng.container.PrimaryGui;
public class WCTPrimaryGui extends PrimaryGui {
public WCTPrimaryGui(Object gui, ItemStack guiIcon, TileEntity te, ForgeDirection side) {
super(gui, guiIcon, te, side);
}
@Override
public void open(EntityPlayer player) {
WCTGuiHandler.launchGui(
(int) this.gui,
player,
player.worldObj,
(int) player.posX,
(int) player.posY,
(int) player.posZ);
}
}
@@ -4,24 +4,17 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.p455w0rd.wirelesscraftingterminal.api.IWirelessCraftingTermHandler;
import net.p455w0rd.wirelesscraftingterminal.client.gui.GuiCraftAmount;
import net.p455w0rd.wirelesscraftingterminal.client.gui.GuiCraftConfirm;
import net.p455w0rd.wirelesscraftingterminal.client.gui.GuiCraftingStatus;
import net.p455w0rd.wirelesscraftingterminal.client.gui.GuiMagnet;
import net.p455w0rd.wirelesscraftingterminal.client.gui.GuiWirelessCraftingTerminal;
import net.p455w0rd.wirelesscraftingterminal.common.container.ContainerCraftAmount;
import net.p455w0rd.wirelesscraftingterminal.common.container.ContainerCraftConfirm;
import net.p455w0rd.wirelesscraftingterminal.common.container.ContainerMagnet;
import net.p455w0rd.wirelesscraftingterminal.common.container.ContainerWirelessCraftingTerminal;
import net.p455w0rd.wirelesscraftingterminal.common.utils.RandomUtils;
import net.p455w0rd.wirelesscraftingterminal.helpers.WirelessTerminalGuiObject;
import net.p455w0rd.wirelesscraftingterminal.helpers.WTCGuiObject;
import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
import appeng.api.AEApi;
import appeng.api.implementations.guiobjects.IPortableCell;
import appeng.container.AEBaseContainer;
import appeng.container.ContainerOpenContext;
import appeng.container.implementations.ContainerCraftingStatus;
import cpw.mods.fml.common.network.IGuiHandler;
public class WCTGuiHandler implements IGuiHandler {
@@ -40,7 +33,7 @@ public class WCTGuiHandler implements IGuiHandler {
return null;
}
final WirelessTerminalGuiObject term = new WirelessTerminalGuiObject(
final WTCGuiObject term = new WTCGuiObject(
wh,
RandomUtils.getWirelessTerm(player.inventory),
player,
@@ -51,32 +44,7 @@ public class WCTGuiHandler implements IGuiHandler {
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),
new ContainerWirelessCraftingTerminal(player.inventory, term),
world,
x,
y,
@@ -91,8 +59,8 @@ public class WCTGuiHandler implements IGuiHandler {
public Object getClientGuiElement(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(
if (wh != null && guiId == Reference.GUI_WCT) {
final WTCGuiObject obj = new WTCGuiObject(
wh,
RandomUtils.getWirelessTerm(player.inventory),
player,
@@ -100,26 +68,7 @@ public class WCTGuiHandler implements IGuiHandler {
x,
y,
z);
if (obj != null) {
final IPortableCell terminal = obj;
if (guiId == Reference.GUI_WCT) {
return new GuiWirelessCraftingTerminal(
new ContainerWirelessCraftingTerminal(player, player.inventory));
}
if (guiId == Reference.GUI_CRAFTING_STATUS) {
return new GuiCraftingStatus(player.inventory, terminal);
}
if (guiId == Reference.GUI_CRAFT_AMOUNT) {
return new GuiCraftAmount(player.inventory, terminal);
}
if (guiId == Reference.GUI_CRAFT_CONFIRM) {
return new GuiCraftConfirm(player.inventory, terminal);
}
}
return new GuiWirelessCraftingTerminal(player.inventory, obj);
}
if (guiId == Reference.GUI_MAGNET) {
return new GuiMagnet(new ContainerMagnet(player, player.inventory));
@@ -3,7 +3,6 @@ package net.p455w0rd.wirelesscraftingterminal.common;
import java.io.File;
import net.minecraft.creativetab.CreativeTabs;
import net.p455w0rd.wirelesscraftingterminal.common.utils.WCTLog;
import net.p455w0rd.wirelesscraftingterminal.core.sync.network.NetworkHandler;
import net.p455w0rd.wirelesscraftingterminal.creativetab.CreativeTabWCT;
import net.p455w0rd.wirelesscraftingterminal.handlers.AchievementHandler;
@@ -16,9 +15,13 @@ import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
import appeng.api.AEApi;
import appeng.api.features.IWirelessTermHandler;
import cpw.mods.fml.common.*;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.LoaderState;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
@@ -39,7 +42,7 @@ import cpw.mods.fml.common.network.NetworkRegistry;
+ '.' // revisionVersion
+ net.minecraftforge.common.ForgeVersion.buildVersion
+ ",);"
+ "required-after:appliedenergistics2@[rv3-beta-1,);after:NotEnoughItems;")
+ "required-after:appliedenergistics2@[rv3-beta-328,);after:NotEnoughItems;")
public class WirelessCraftingTerminal {
private static LoaderState WCTState = LoaderState.NOINIT;
@@ -53,7 +56,6 @@ public class WirelessCraftingTerminal {
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
long stopwatch = WCTLog.beginSection("PreInit");
WirelessCraftingTerminal.WCTState = LoaderState.PREINITIALIZATION;
WirelessCraftingTerminal.INSTANCE = this;
creativeTab = new CreativeTabWCT(CreativeTabs.getNextID(), Reference.MODID).setNoScrollbar();
@@ -62,29 +64,24 @@ public class WirelessCraftingTerminal {
FMLCommonHandler.instance().bus().register(proxy);
AEApi.instance().registries().wireless()
.registerWirelessHandler((IWirelessTermHandler) ItemEnum.WIRELESS_CRAFTING_TERMINAL.getItem());
WCTLog.endSection("PreInit", stopwatch);
}
@EventHandler
public void init(FMLInitializationEvent event) {
long stopwatch = WCTLog.beginSection("Init");
IntegrationRegistry.INSTANCE.init();
WirelessCraftingTerminal.WCTState = LoaderState.INITIALIZATION;
if (!Loader.isModLoaded("dreamcraft")) {
RecipeHandler.loadRecipes(!Reference.WCT_MINETWEAKER_OVERRIDE);
}
AchievementHandler.init();
WCTLog.endSection("Init", stopwatch);
}
@EventHandler
public void postInit(final FMLPostInitializationEvent event) {
long stopwatch = WCTLog.beginSection("PostInit");
IntegrationRegistry.INSTANCE.postInit();
NetworkRegistry.INSTANCE.registerGuiHandler(WirelessCraftingTerminal.INSTANCE, new WCTGuiHandler());
NetworkHandler.instance = new NetworkHandler("WCT");
WirelessCraftingTerminal.proxy.removeItemsFromNEI();
WCTLog.endSection("PostInit", stopwatch);
}
public static LoaderState getLoaderState() {
@@ -1,23 +0,0 @@
package net.p455w0rd.wirelesscraftingterminal.common.container;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.p455w0rd.wirelesscraftingterminal.common.WCTGuiHandler;
import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
import appeng.api.implementations.guiobjects.IPortableCell;
public class ContainerCraftAmount extends appeng.container.implementations.ContainerCraftAmount {
public ContainerCraftAmount(EntityPlayer player, IPortableCell terminal) {
super(player.inventory, terminal);
}
@Override
public void openConfirmationGUI(EntityPlayer player, TileEntity te) {
int x = (int) player.posX;
int y = (int) player.posY;
int z = (int) player.posZ;
WCTGuiHandler.launchGui(Reference.GUI_CRAFT_CONFIRM, player, player.worldObj, x, y, z);
}
}
@@ -1,25 +0,0 @@
package net.p455w0rd.wirelesscraftingterminal.common.container;
import net.minecraft.entity.player.EntityPlayer;
import net.p455w0rd.wirelesscraftingterminal.common.WCTGuiHandler;
import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
import appeng.api.implementations.guiobjects.IPortableCell;
public class ContainerCraftConfirm extends appeng.container.implementations.ContainerCraftConfirm {
private final EntityPlayer player;
public ContainerCraftConfirm(EntityPlayer player, IPortableCell terminal) {
super(player.inventory, terminal);
this.player = player;
}
@Override
public void switchToOriginalGUI() {
int x = (int) player.posX;
int y = (int) player.posY;
int z = (int) player.posZ;
WCTGuiHandler.launchGui(Reference.GUI_WCT, player, player.worldObj, x, y, z);
}
}
@@ -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;
}
@@ -9,40 +9,15 @@ public class WCTLog {
public static final Logger log = LogManager.getLogger("Wireless Crafting Terminal");
/**
* Displays the section header.
*/
public static long beginSection(final String section) {
log.info(String.format("-=-=-=-=-=-=-=[START] %s=-=-=-=-=-=-=-", section));
return System.currentTimeMillis();
}
/**
* Logs a debug statement.
*
* @param format
* @param data
*/
public static void debug(final String format, final Object... data) {
log.debug(String.format(format, data));
}
/**
* Displays the section footer.
*/
public static void endSection(final String section, final long sectionStartTime) {
log.info(
String.format(
"-=-=-=-=-=-=-=[FINISH] %s in %dms=-=-=-=-=-=-=-",
section,
(System.currentTimeMillis() - sectionStartTime)));
}
/**
* Logs basic info.
*
* @param format
* @param data
*/
public static void info(final String format, final Object... data) {
log.info(String.format(format, data));
@@ -50,9 +25,6 @@ public class WCTLog {
/**
* Logs an error.
*
* @param format
* @param data
*/
public static void severe(final String format, final Object... data) {
log.error(String.format(format, data));
@@ -60,9 +32,6 @@ public class WCTLog {
/**
* Logs a warning.
*
* @param format
* @param data
*/
public static void warning(final String format, final Object... data) {
log.warn(String.format(format, data));
@@ -6,16 +6,12 @@ import java.util.HashMap;
import java.util.Map;
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketConfigSync;
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketCraftRequest;
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketEmptyTrash;
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketInventoryAction;
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketMEInventoryUpdate;
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketMagnetFilter;
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketNEIRecipe;
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketOpenGui;
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketSetMagnet;
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketSwitchGuis;
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketValueConfig;
import io.netty.buffer.ByteBuf;
import io.netty.handler.codec.DecoderException;
@@ -28,16 +24,8 @@ public class WCTPacketHandlerBase {
PACKET_INVENTORY_ACTION(PacketInventoryAction.class),
PACKET_ME_INVENTORY_UPDATE(PacketMEInventoryUpdate.class),
PACKET_VALUE_CONFIG(PacketValueConfig.class),
PACKET_SWITCH_GUIS(PacketSwitchGuis.class),
PACKET_RECIPE_NEI(PacketNEIRecipe.class),
PACKET_CRAFTING_REQUEST(PacketCraftRequest.class),
PACKET_MAGNETFILTER_MODE(PacketMagnetFilter.class),
PACKET_OPENWIRELESSTERM(PacketOpenGui.class),
@@ -1,87 +0,0 @@
package net.p455w0rd.wirelesscraftingterminal.core.sync.packets;
import java.util.concurrent.Future;
import net.minecraft.entity.player.EntityPlayer;
import net.p455w0rd.wirelesscraftingterminal.common.WCTGuiHandler;
import net.p455w0rd.wirelesscraftingterminal.core.sync.WCTPacket;
import net.p455w0rd.wirelesscraftingterminal.core.sync.network.INetworkInfo;
import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
import appeng.api.networking.IGrid;
import appeng.api.networking.IGridHost;
import appeng.api.networking.crafting.ICraftingGrid;
import appeng.api.networking.crafting.ICraftingJob;
import appeng.container.implementations.ContainerCraftAmount;
import appeng.container.implementations.ContainerCraftConfirm;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
public class PacketCraftRequest extends WCTPacket {
private final long amount;
private final boolean heldShift;
public PacketCraftRequest(final ByteBuf stream) {
this.heldShift = stream.readBoolean();
this.amount = stream.readLong();
}
public PacketCraftRequest(final int craftAmt, final boolean shift) {
this.amount = craftAmt;
this.heldShift = shift;
final ByteBuf data = Unpooled.buffer();
data.writeInt(this.getPacketID());
data.writeBoolean(shift);
data.writeLong(this.amount);
this.configureWrite(data);
}
@Override
public void serverPacketData(final INetworkInfo manager, final WCTPacket packet, final EntityPlayer player) {
if (player.openContainer instanceof ContainerCraftAmount) {
final ContainerCraftAmount cca = (ContainerCraftAmount) player.openContainer;
final Object target = cca.getTarget();
if (target instanceof IGridHost) {
final IGrid g = cca.getGrid();
if (g == null || cca.getItemToCraft() == null) {
return;
}
cca.getItemToCraft().setStackSize(this.amount);
Future<ICraftingJob> futureJob = null;
try {
final ICraftingGrid cg = g.getCache(ICraftingGrid.class);
futureJob = cg.beginCraftingJob(
cca.getWorld(),
cca.getGrid(),
cca.getActionSrc(),
cca.getItemToCraft(),
null);
int x = (int) player.posX;
int y = (int) player.posY;
int z = (int) player.posZ;
WCTGuiHandler.launchGui(Reference.GUI_CRAFT_CONFIRM, player, player.worldObj, x, y, z);
if (player.openContainer instanceof ContainerCraftConfirm) {
final ContainerCraftConfirm ccc = (ContainerCraftConfirm) player.openContainer;
ccc.setAutoStart(this.heldShift);
ccc.setJob(futureJob);
cca.detectAndSendChanges();
}
} catch (final Throwable e) {
if (futureJob != null) {
futureJob.cancel(true);
}
// WCTLog.debug(e.getLocalizedMessage());
}
}
}
}
}
@@ -5,18 +5,14 @@ import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.inventory.Container;
import net.p455w0rd.wirelesscraftingterminal.common.WCTGuiHandler;
import net.p455w0rd.wirelesscraftingterminal.common.container.ContainerWirelessCraftingTerminal;
import net.p455w0rd.wirelesscraftingterminal.common.utils.RandomUtils;
import net.p455w0rd.wirelesscraftingterminal.core.sync.WCTPacket;
import net.p455w0rd.wirelesscraftingterminal.core.sync.network.INetworkInfo;
import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
import appeng.api.storage.data.IAEItemStack;
import appeng.client.ClientHelper;
import appeng.container.AEBaseContainer;
import appeng.container.ContainerOpenContext;
import appeng.container.implementations.ContainerCraftAmount;
import appeng.helpers.InventoryAction;
import appeng.util.Platform;
import appeng.util.item.AEItemStack;
@@ -96,55 +92,16 @@ public class PacketInventoryAction extends WCTPacket {
public void serverPacketData(final INetworkInfo manager, final WCTPacket packet, final EntityPlayer player) {
final EntityPlayerMP sender = (EntityPlayerMP) player;
Container baseContainer = sender.openContainer;
ContainerOpenContext context = null;
if (baseContainer instanceof ContainerWirelessCraftingTerminal) {
if (RandomUtils.getWirelessTerm(player.inventory) == null)
((ContainerWirelessCraftingTerminal) baseContainer).setValidContainer(false);
else((ContainerWirelessCraftingTerminal) baseContainer).doAction(sender, this.action, this.slot, this.id);
}
if (baseContainer instanceof AEBaseContainer) {
context = ((AEBaseContainer) baseContainer).getOpenContext();
((AEBaseContainer) baseContainer).doAction(sender, this.action, this.slot, this.id);
}
if (this.action == InventoryAction.AUTO_CRAFT) {
// if( context != null )
// {
// final TileEntity te = context.getTile();
int x = (int) player.posX;
int y = (int) player.posY;
int z = (int) player.posZ;
WCTGuiHandler.launchGui(Reference.GUI_CRAFT_AMOUNT, player, player.worldObj, x, y, z);
if (sender.openContainer instanceof ContainerCraftAmount) {
final ContainerCraftAmount cca = (ContainerCraftAmount) sender.openContainer;
if (baseContainer instanceof ContainerWirelessCraftingTerminal) {
if (((ContainerWirelessCraftingTerminal) baseContainer).getTargetStack() != null) {
cca.getCraftingItem().putStack(
((ContainerWirelessCraftingTerminal) baseContainer).getTargetStack().getItemStack());
cca.setItemToCraft(((ContainerWirelessCraftingTerminal) baseContainer).getTargetStack());
}
}
if (baseContainer instanceof AEBaseContainer) {
if (((AEBaseContainer) baseContainer).getTargetStack() != null) {
cca.getCraftingItem()
.putStack(((AEBaseContainer) baseContainer).getTargetStack().getItemStack());
cca.setItemToCraft(((AEBaseContainer) baseContainer).getTargetStack());
}
}
cca.detectAndSendChanges();
}
// }
} else {
if (baseContainer instanceof ContainerWirelessCraftingTerminal) {
if (RandomUtils.getWirelessTerm(player.inventory) == null)
((ContainerWirelessCraftingTerminal) baseContainer).setValidContainer(false);
else((ContainerWirelessCraftingTerminal) baseContainer)
.doAction(sender, this.action, this.slot, this.id);
}
if (baseContainer instanceof AEBaseContainer) {
((AEBaseContainer) baseContainer).doAction(sender, this.action, this.slot, this.id);
}
}
}
@Override
@@ -1,162 +0,0 @@
package net.p455w0rd.wirelesscraftingterminal.core.sync.packets;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.BufferOverflowException;
import java.util.LinkedList;
import java.util.List;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
import javax.annotation.Nullable;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer;
import net.p455w0rd.wirelesscraftingterminal.client.gui.GuiCraftConfirm;
import net.p455w0rd.wirelesscraftingterminal.client.gui.GuiWirelessCraftingTerminal;
import net.p455w0rd.wirelesscraftingterminal.common.utils.WCTLog;
import net.p455w0rd.wirelesscraftingterminal.core.sync.WCTPacket;
import net.p455w0rd.wirelesscraftingterminal.core.sync.network.INetworkInfo;
import appeng.api.storage.data.IAEItemStack;
import appeng.util.item.AEItemStack;
import cpw.mods.fml.common.network.internal.FMLProxyPacket;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
public class PacketMEInventoryUpdate extends WCTPacket {
private static final int UNCOMPRESSED_PACKET_BYTE_LIMIT = 16 * 1024 * 1024;
private static final int OPERATION_BYTE_LIMIT = 2 * 1024;
private static final int TEMP_BUFFER_SIZE = 1024;
private static final int STREAM_MASK = 0xff;
// input.
@Nullable
private final List<IAEItemStack> list;
// output...
private final byte ref;
@Nullable
private final ByteBuf data;
@Nullable
private final GZIPOutputStream compressFrame;
private int writtenBytes = 0;
private boolean empty = true;
// automatic.
public PacketMEInventoryUpdate(final ByteBuf stream) throws IOException {
this.data = null;
this.compressFrame = null;
this.list = new LinkedList<IAEItemStack>();
this.ref = stream.readByte();
final GZIPInputStream gzReader = new GZIPInputStream(new InputStream() {
@Override
public int read() throws IOException {
if (stream.readableBytes() <= 0) {
return -1;
}
return stream.readByte() & STREAM_MASK;
}
});
final ByteBuf uncompressed = Unpooled.buffer(stream.readableBytes());
final byte[] tmp = new byte[TEMP_BUFFER_SIZE];
while (gzReader.available() != 0) {
final int bytes = gzReader.read(tmp);
if (bytes > 0) {
uncompressed.writeBytes(tmp, 0, bytes);
}
}
gzReader.close();
while (uncompressed.readableBytes() > 0) {
this.list.add(AEItemStack.loadItemStackFromPacket(uncompressed));
}
this.empty = this.list.isEmpty();
}
// api
public PacketMEInventoryUpdate() throws IOException {
this((byte) 0);
}
// api
public PacketMEInventoryUpdate(final byte ref) throws IOException {
this.ref = ref;
this.data = Unpooled.buffer(OPERATION_BYTE_LIMIT);
this.data.writeInt(this.getPacketID());
this.data.writeByte(this.ref);
this.compressFrame = new GZIPOutputStream(new OutputStream() {
@Override
public void write(final int value) throws IOException {
PacketMEInventoryUpdate.this.data.writeByte(value);
}
});
this.list = null;
}
@Override
@SideOnly(Side.CLIENT)
public void clientPacketData(final INetworkInfo network, final WCTPacket packet, final EntityPlayer player) {
final GuiScreen gs = Minecraft.getMinecraft().currentScreen;
if (gs instanceof GuiCraftConfirm) {
((GuiCraftConfirm) gs).postUpdate(this.list, this.ref);
}
if (gs instanceof GuiWirelessCraftingTerminal) {
((GuiWirelessCraftingTerminal) gs).postUpdate(this.list);
}
}
@Nullable
@Override
public FMLProxyPacket getProxy() {
try {
this.compressFrame.close();
this.configureWrite(this.data);
return super.getProxy();
} catch (final IOException e) {
WCTLog.debug(e.getMessage());
}
return null;
}
public void appendItem(final IAEItemStack is) throws IOException, BufferOverflowException {
final ByteBuf tmp = Unpooled.buffer(OPERATION_BYTE_LIMIT);
is.writeToPacket(tmp);
this.compressFrame.flush();
if (this.writtenBytes + tmp.readableBytes() > UNCOMPRESSED_PACKET_BYTE_LIMIT) {
throw new BufferOverflowException();
} else {
this.writtenBytes += tmp.readableBytes();
this.compressFrame.write(tmp.array(), 0, tmp.readableBytes());
this.empty = false;
}
}
public int getLength() {
return this.data.readableBytes();
}
public boolean isEmpty() {
return this.empty;
}
}
@@ -21,7 +21,7 @@ import net.p455w0rd.wirelesscraftingterminal.common.container.ContainerWirelessC
import net.p455w0rd.wirelesscraftingterminal.common.utils.RandomUtils;
import net.p455w0rd.wirelesscraftingterminal.core.sync.WCTPacket;
import net.p455w0rd.wirelesscraftingterminal.core.sync.network.INetworkInfo;
import net.p455w0rd.wirelesscraftingterminal.helpers.WirelessTerminalGuiObject;
import net.p455w0rd.wirelesscraftingterminal.helpers.WTCGuiObject;
import appeng.api.config.Actionable;
import appeng.api.config.FuzzyMode;
@@ -93,7 +93,7 @@ public class PacketNEIRecipe extends WCTPacket {
IGridNode node = cct.getNetworkNode();
if (node == null) {
WirelessTerminalGuiObject obj = ContainerWirelessCraftingTerminal.getGuiObject(
WTCGuiObject obj = ContainerWirelessCraftingTerminal.getGuiObject(
RandomUtils.getWirelessTerm(player.inventory),
player,
player.worldObj,
@@ -1,52 +0,0 @@
package net.p455w0rd.wirelesscraftingterminal.core.sync.packets;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.p455w0rd.wirelesscraftingterminal.client.gui.GuiWirelessCraftingTerminal;
import net.p455w0rd.wirelesscraftingterminal.common.WCTGuiHandler;
import net.p455w0rd.wirelesscraftingterminal.core.sync.WCTPacket;
import net.p455w0rd.wirelesscraftingterminal.core.sync.network.INetworkInfo;
import appeng.util.Platform;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
public class PacketSwitchGuis extends WCTPacket {
private final int newGui;
// automatic.
public PacketSwitchGuis(final ByteBuf stream) {
this.newGui = stream.readInt();
}
// api
public PacketSwitchGuis(final int newGui) {
this.newGui = newGui;
if (Platform.isClient()) {
GuiWirelessCraftingTerminal.setSwitchingGuis(true);
}
final ByteBuf data = Unpooled.buffer();
data.writeInt(this.getPacketID());
data.writeInt(newGui);
this.configureWrite(data);
}
@Override
public void serverPacketData(final INetworkInfo manager, final WCTPacket packet, final EntityPlayer player) {
World world = player.worldObj;
int x = (int) player.posX;
int y = (int) player.posY;
int z = (int) player.posZ;
WCTGuiHandler.launchGui(newGui, player, world, x, y, z);
}
@Override
public void clientPacketData(final INetworkInfo network, final WCTPacket packet, final EntityPlayer player) {
GuiWirelessCraftingTerminal.setSwitchingGuis(true);
}
}
@@ -1,112 +0,0 @@
package net.p455w0rd.wirelesscraftingterminal.core.sync.packets;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
import net.p455w0rd.wirelesscraftingterminal.common.utils.RandomUtils;
import net.p455w0rd.wirelesscraftingterminal.core.sync.WCTPacket;
import net.p455w0rd.wirelesscraftingterminal.core.sync.network.INetworkInfo;
import appeng.api.config.Settings;
import appeng.api.util.IConfigManager;
import appeng.api.util.IConfigurableObject;
import appeng.container.AEBaseContainer;
import appeng.helpers.IMouseWheelItem;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
public class PacketValueConfig extends WCTPacket {
private final String Name;
private final String Value;
// automatic.
public PacketValueConfig(final ByteBuf stream) throws IOException {
final DataInputStream dis = new DataInputStream(
new ByteArrayInputStream(stream.array(), stream.readerIndex(), stream.readableBytes()));
this.Name = dis.readUTF();
this.Value = dis.readUTF();
}
// api
public PacketValueConfig(final String name, final String value) throws IOException {
this.Name = name;
this.Value = value;
final ByteBuf data = Unpooled.buffer();
data.writeInt(this.getPacketID());
final ByteArrayOutputStream bos = new ByteArrayOutputStream();
final DataOutputStream dos = new DataOutputStream(bos);
dos.writeUTF(name);
dos.writeUTF(value);
data.writeBytes(bos.toByteArray());
this.configureWrite(data);
}
@SuppressWarnings("unchecked")
@Override
public void serverPacketData(final INetworkInfo manager, final WCTPacket packet, final EntityPlayer player) {
final Container c = player.openContainer;
if (this.Name.equals("Item") && RandomUtils.getWirelessTerm(player.inventory) != null
&& RandomUtils.getWirelessTerm(player.inventory).getItem() instanceof IMouseWheelItem) {
final ItemStack is = RandomUtils.getWirelessTerm(player.inventory);
final IMouseWheelItem si = (IMouseWheelItem) is.getItem();
si.onWheel(is, this.Value.equals("WheelUp"));
} else if (c instanceof IConfigurableObject) {
final IConfigManager cm = ((IConfigurableObject) c).getConfigManager();
for (final Settings e : cm.getSettings()) {
if (e.name().equals(this.Name)) {
final Enum<?> def = cm.getSetting(e);
try {
cm.putSetting(e, Enum.valueOf(def.getClass(), this.Value));
} catch (final IllegalArgumentException err) {
// :P
}
break;
}
}
}
}
@SuppressWarnings("unchecked")
@Override
public void clientPacketData(final INetworkInfo network, final WCTPacket packet, final EntityPlayer player) {
final Container c = player.openContainer;
if (this.Name.equals("CustomName")) {
if (c instanceof AEBaseContainer) {
((AEBaseContainer) c).setCustomName(this.Value);
}
} else if (this.Name.startsWith("SyncDat.")) {
if (c instanceof AEBaseContainer) {
((AEBaseContainer) c).stringSync(Integer.parseInt(this.Name.substring(8)), this.Value);
}
} else if (c instanceof IConfigurableObject) {
final IConfigManager cm = ((IConfigurableObject) c).getConfigManager();
for (final Settings e : cm.getSettings()) {
if (e.name().equals(this.Name)) {
final Enum<?> def = cm.getSetting(e);
try {
cm.putSetting(e, Enum.valueOf(def.getClass(), this.Value));
} catch (final IllegalArgumentException err) {
// :P
}
break;
}
}
}
}
}
@@ -0,0 +1,27 @@
package net.p455w0rd.wirelesscraftingterminal.helpers;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.p455w0rd.wirelesscraftingterminal.api.networking.security.WCTIActionHost;
import appeng.api.features.IWirelessTermHandler;
import appeng.api.networking.IGridNode;
import appeng.items.contents.WirelessCraftingTerminalGuiObject;
public class WTCGuiObject extends WirelessCraftingTerminalGuiObject implements WCTIActionHost {
public WTCGuiObject(IWirelessTermHandler wh, ItemStack is, EntityPlayer ep, World w, int x, int y, int z) {
super(wh, is, ep, w, x, y, z);
}
@Override
public IGridNode getActionableNode(boolean ignoreRange) {
IGridNode node = this.getActionableNode();
if (node != null) return node;
if (ignoreRange && this.getGrid() != null) {
return this.getGrid().getPivot();
}
return null;
}
}
@@ -1,339 +0,0 @@
package net.p455w0rd.wirelesscraftingterminal.helpers;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.p455w0rd.wirelesscraftingterminal.api.IWirelessCraftingTerminalItem;
import net.p455w0rd.wirelesscraftingterminal.api.networking.security.WCTIActionHost;
import appeng.api.AEApi;
import appeng.api.config.AccessRestriction;
import appeng.api.config.Actionable;
import appeng.api.config.PowerMultiplier;
import appeng.api.features.ILocatable;
import appeng.api.features.IWirelessTermHandler;
import appeng.api.implementations.guiobjects.IGuiItemObject;
import appeng.api.implementations.guiobjects.IPortableCell;
import appeng.api.implementations.tiles.IWirelessAccessPoint;
import appeng.api.networking.IGrid;
import appeng.api.networking.IGridHost;
import appeng.api.networking.IGridNode;
import appeng.api.networking.IMachineSet;
import appeng.api.networking.security.BaseActionSource;
import appeng.api.networking.security.IActionHost;
import appeng.api.networking.storage.IStorageGrid;
import appeng.api.storage.IMEMonitor;
import appeng.api.storage.IMEMonitorHandlerReceiver;
import appeng.api.storage.StorageChannel;
import appeng.api.storage.data.IAEFluidStack;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IItemList;
import appeng.api.util.AECableType;
import appeng.api.util.DimensionalCoord;
import appeng.api.util.IConfigManager;
import appeng.container.interfaces.IInventorySlotAware;
import appeng.tile.networking.TileWireless;
public class WirelessTerminalGuiObject
implements IActionHost, IPortableCell, IInventorySlotAware, WCTIActionHost, IGuiItemObject {
private final ItemStack effectiveItem;
private final IWirelessTermHandler wth;
private final String encryptionKey;
private final EntityPlayer myPlayer;
private IGrid targetGrid;
private IStorageGrid sg;
private IMEMonitor<IAEItemStack> itemStorage;
private IWirelessAccessPoint myWap;
private double sqRange = Double.MAX_VALUE;
private double myRange = Double.MAX_VALUE;
private final int inventorySlot;
public WirelessTerminalGuiObject(final IWirelessTermHandler wh, final ItemStack is, final EntityPlayer ep,
final World w, final int x, final int y, final int z) {
this.encryptionKey = wh.getEncryptionKey(is);
this.effectiveItem = is;
this.myPlayer = ep;
this.wth = wh;
this.inventorySlot = x;
ILocatable obj = null;
try {
final long encKey = Long.parseLong(this.encryptionKey);
obj = AEApi.instance().registries().locatable().getLocatableBy(encKey);
} catch (final NumberFormatException err) {
// :P
}
if (obj instanceof IGridHost) {
final IGridNode n = ((IGridHost) obj).getGridNode(ForgeDirection.UNKNOWN);
if (n != null) {
this.targetGrid = n.getGrid();
if (this.targetGrid != null) {
this.sg = this.targetGrid.getCache(IStorageGrid.class);
if (this.sg != null) {
this.itemStorage = this.sg.getItemInventory();
}
}
}
}
}
/**
* @return Whether an infinity booster card is installed on the WCT.
*/
private boolean checkForBooster() {
if (effectiveItem != null && effectiveItem.getItem() instanceof IWirelessCraftingTerminalItem) {
IWirelessCraftingTerminalItem wct = (IWirelessCraftingTerminalItem) effectiveItem.getItem();
return wct.checkForBooster(effectiveItem);
}
return false;
}
public IGrid getTargetGrid() {
return this.targetGrid;
}
public double getRange() {
return this.myRange;
}
@Override
public IMEMonitor<IAEItemStack> getItemInventory() {
if (this.sg == null) {
return null;
}
return this.sg.getItemInventory();
}
@Override
public IMEMonitor<IAEFluidStack> getFluidInventory() {
if (this.sg == null) {
return null;
}
return this.sg.getFluidInventory();
}
@Override
public void addListener(final IMEMonitorHandlerReceiver<IAEItemStack> l, final Object verificationToken) {
if (this.itemStorage != null) {
this.itemStorage.addListener(l, verificationToken);
}
}
@Override
public void removeListener(final IMEMonitorHandlerReceiver<IAEItemStack> l) {
if (this.itemStorage != null) {
this.itemStorage.removeListener(l);
}
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public IItemList<IAEItemStack> getAvailableItems(final IItemList out) {
if (this.itemStorage != null) {
return this.itemStorage.getAvailableItems(out);
}
return out;
}
@Override
public IItemList<IAEItemStack> getStorageList() {
if (this.itemStorage != null) {
return this.itemStorage.getStorageList();
}
return null;
}
@Override
public AccessRestriction getAccess() {
if (this.itemStorage != null) {
return this.itemStorage.getAccess();
}
return AccessRestriction.NO_ACCESS;
}
@Override
public boolean isPrioritized(final IAEItemStack input) {
if (this.itemStorage != null) {
return this.itemStorage.isPrioritized(input);
}
return false;
}
@Override
public boolean canAccept(final IAEItemStack input) {
if (this.itemStorage != null) {
return this.itemStorage.canAccept(input);
}
return false;
}
@Override
public int getPriority() {
if (this.itemStorage != null) {
return this.itemStorage.getPriority();
}
return 0;
}
@Override
public int getSlot() {
if (this.itemStorage != null) {
return this.itemStorage.getSlot();
}
return 0;
}
@Override
public boolean validForPass(final int i) {
return this.itemStorage.validForPass(i);
}
@Override
public IAEItemStack injectItems(final IAEItemStack input, final Actionable type, final BaseActionSource src) {
if (this.itemStorage != null) {
return this.itemStorage.injectItems(input, type, src);
}
return input;
}
@Override
public IAEItemStack extractItems(final IAEItemStack request, final Actionable mode, final BaseActionSource src) {
if (this.itemStorage != null) {
return this.itemStorage.extractItems(request, mode, src);
}
return null;
}
@Override
public StorageChannel getChannel() {
if (this.itemStorage != null) {
return this.itemStorage.getChannel();
}
return StorageChannel.ITEMS;
}
@Override
public double extractAEPower(final double amt, final Actionable mode, final PowerMultiplier usePowerMultiplier) {
if (this.wth != null && this.effectiveItem != null) {
if (mode == Actionable.SIMULATE) {
return this.wth.hasPower(this.myPlayer, amt, this.effectiveItem) ? amt : 0;
}
return this.wth.usePower(this.myPlayer, amt, this.effectiveItem) ? amt : 0;
}
return 0.0;
}
@Override
public ItemStack getItemStack() {
return this.effectiveItem;
}
@Override
public IConfigManager getConfigManager() {
return this.wth.getConfigManager(this.effectiveItem);
}
@Override
public IGridNode getGridNode(final ForgeDirection dir) {
return this.getActionableNode();
}
@Override
public AECableType getCableConnectionType(final ForgeDirection dir) {
return AECableType.NONE;
}
@Override
public void securityBreak() {}
@Override
public IGridNode getActionableNode() {
return getActionableNode(checkForBooster());
}
public IGridNode getActionableNode(boolean ignoreRange) {
this.rangeCheck(ignoreRange);
if (this.myWap != null) {
// return this.getTargetGrid().getPivot();
return this.myWap.getActionableNode();
} else {
if (ignoreRange && this.getTargetGrid() != null) {
return this.getTargetGrid().getPivot();
}
}
return null;
}
public boolean rangeCheck() {
return rangeCheck(checkForBooster());
}
public boolean rangeCheck(boolean ignoreRange) {
this.sqRange = this.myRange = Double.MAX_VALUE;
if (this.targetGrid != null && this.itemStorage != null) {
if (this.myWap != null) {
if (this.myWap.getGrid() == this.targetGrid) {
if (this.testWap(this.myWap)) {
return true;
}
}
return false;
}
final IMachineSet tw = this.targetGrid.getMachines(TileWireless.class);
this.myWap = null;
for (final IGridNode n : tw) {
final IWirelessAccessPoint wap = (IWirelessAccessPoint) n.getMachine();
if (this.testWap(wap, ignoreRange)) {
this.myWap = wap;
}
}
return this.myWap != null;
}
return false;
}
private boolean testWap(final IWirelessAccessPoint wap) {
return testWap(wap, checkForBooster());
}
private boolean testWap(final IWirelessAccessPoint wap, boolean ignoreRange) {
double rangeLimit = wap.getRange();
rangeLimit *= rangeLimit;
final DimensionalCoord dc = wap.getLocation();
if (dc.getWorld() == this.myPlayer.worldObj) {
final double offX = dc.x - this.myPlayer.posX;
final double offY = dc.y - this.myPlayer.posY;
final double offZ = dc.z - this.myPlayer.posZ;
final double r = offX * offX + offY * offY + offZ * offZ;
if (r < rangeLimit && this.sqRange > r && !ignoreRange) {
if (wap.isActive()) {
this.sqRange = r;
this.myRange = Math.sqrt(r);
return true;
}
} else {
if (wap.isActive() && ignoreRange) {
this.sqRange = r;
this.myRange = Math.sqrt(r);
return true;
}
}
}
return false;
}
@Override
public int getInventorySlot() {
return this.inventorySlot;
}
}
@@ -21,7 +21,6 @@ import net.p455w0rd.wirelesscraftingterminal.integration.IIntegrationModule;
import net.p455w0rd.wirelesscraftingterminal.integration.IntegrationHelper;
import net.p455w0rd.wirelesscraftingterminal.integration.abstraction.INEI;
import net.p455w0rd.wirelesscraftingterminal.integration.modules.NEIHelpers.NEIAEShapedRecipeHandler;
import net.p455w0rd.wirelesscraftingterminal.integration.modules.NEIHelpers.NEIGUIHandler;
import appeng.api.AEApi;
import appeng.api.storage.data.IAEItemStack;
@@ -72,7 +71,6 @@ public class NEI implements INEI, IContainerTooltipHandler, IIntegrationModule {
"crafting");
API.registerRecipeHandler(new NEIAEShapedRecipeHandler());
API.registerRecipeHandler(new NEIAEShapelessRecipeHandler());
API.registerNEIGuiHandler(new NEIGUIHandler());
}
@Override
@@ -1,26 +0,0 @@
package net.p455w0rd.wirelesscraftingterminal.integration.modules.NEIHelpers;
import java.util.regex.Pattern;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.item.ItemStack;
import net.p455w0rd.wirelesscraftingterminal.client.gui.GuiWirelessCraftingTerminal;
import codechicken.nei.api.INEIGuiAdapter;
public class NEIGUIHandler extends INEIGuiAdapter {
protected Pattern SPECIAL_REGEX_CHARS = Pattern.compile("[{}()\\[\\].+*?^$\\\\|]");
@Override
public boolean handleDragNDrop(GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button) {
if (gui instanceof GuiWirelessCraftingTerminal && draggedStack != null && draggedStack.getItem() != null) {
GuiWirelessCraftingTerminal gmm = (GuiWirelessCraftingTerminal) gui;
if (gmm.isOverSearchField(mousex, mousey)) {
gmm.setSearchString(SPECIAL_REGEX_CHARS.matcher(draggedStack.getDisplayName()).replaceAll("\\\\$0"));
return true;
}
}
return super.handleDragNDrop(gui, mousex, mousey, draggedStack, button);
}
}
@@ -23,7 +23,7 @@ import net.p455w0rd.wirelesscraftingterminal.core.sync.network.NetworkHandler;
import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketMagnetFilter;
import net.p455w0rd.wirelesscraftingterminal.handlers.KeybindHandler;
import net.p455w0rd.wirelesscraftingterminal.handlers.LocaleHandler;
import net.p455w0rd.wirelesscraftingterminal.helpers.WirelessTerminalGuiObject;
import net.p455w0rd.wirelesscraftingterminal.helpers.WTCGuiObject;
import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
import org.apache.commons.lang3.text.WordUtils;
@@ -54,7 +54,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class ItemMagnet extends Item {
private int distanceFromPlayer;
public WirelessTerminalGuiObject obj;
public WTCGuiObject obj;
public IPortableCell civ;
public IEnergySource powerSrc;
public IMEMonitor<IAEItemStack> monitor;
@@ -192,13 +192,13 @@ public class ItemMagnet extends Item {
@Override
public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player) {
if (!world.isRemote) {
if (player.isSneaking()) {
switchMagnetMode(item, player);
} else {
if (!RandomUtils.isMagnetInitialized(item)) {
NetworkHandler.instance.sendToServer(new PacketMagnetFilter(0, true));
}
if (player.isSneaking() && !world.isRemote) {
switchMagnetMode(item, player);
} else {
if (!RandomUtils.isMagnetInitialized(item) && world.isRemote) {
NetworkHandler.instance.sendToServer(new PacketMagnetFilter(0, true));
}
if (!world.isRemote) {
int x = (int) player.posX;
int y = (int) player.posY;
int z = (int) player.posZ;
@@ -392,7 +392,7 @@ public class ItemMagnet extends Item {
if (player.capabilities.isCreativeMode) {
return true;
}
final IGrid g = obj.getTargetGrid();
final IGrid g = obj.getGrid();
if (g != null) {
if (requirePower) {
final IEnergyGrid eg = g.getCache(IEnergyGrid.class);
@@ -24,21 +24,29 @@ import org.lwjgl.input.Keyboard;
import com.google.common.base.Optional;
import appeng.api.config.*;
import appeng.api.config.AccessRestriction;
import appeng.api.config.PowerMultiplier;
import appeng.api.config.PowerUnits;
import appeng.api.config.Settings;
import appeng.api.config.SortDir;
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;
@@ -83,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;
}
@@ -232,6 +216,16 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem
return getAECurrentPower(is) >= amt;
}
@Override
public boolean hasInfinityPower(ItemStack is) {
return false;
}
@Override
public boolean hasInfinityRange(ItemStack is) {
return this.checkForBooster(is);
}
@Override
public IConfigManager getConfigManager(final ItemStack target) {
final ConfigManager out = new ConfigManager(new IConfigManagerHost() {
@@ -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) {
@@ -219,7 +225,7 @@ public class CommonProxy {
boolean ignoreRange = (magnet.isBoosterInstalled(WCTStack) && Reference.WCT_BOOSTER_ENABLED);
boolean hasAxxess = magnet.hasNetworkAccess(SecurityPermissions.INJECT, true, player, WCTStack);
if ((ignoreRange && hasAxxess) || (magnet.obj.rangeCheck(false) && hasAxxess)) {
if ((ignoreRange && hasAxxess) || (magnet.obj.rangeCheck() && hasAxxess)) {
if (magnet.isActivated(magnetStack)) {
List<ItemStack> filteredList = magnet.getFilteredItems(magnetStack);
IAEItemStack ais = AEApi.instance().storage().createItemStack(stack);
@@ -23,8 +23,5 @@ public class Reference {
// Gui IDs
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;
}
@@ -1,14 +1,10 @@
//**************************//
//WIRELESS CRAFTING TEMRINAL//
//**************************//
//Items
#Items
item.wirelessCraftingTerminal.name=Drahtlose Fertigungskonsole
item.infinityBoosterCard.name=Unendliche Drahtlosverstärkerkarte
item.magnetCard.name=Magnetkarte
itemGroup.ae2wct=§9AE2 Wireless Crafting Terminal
//Tooltips
#Tooltips
gui.tooltips.ae2wct.PressShift=Infos via Shiftklick
gui.tooltips.ae2wct.OnlyWorks=Funktioniert nur im Slot der drahtlosen Fertigungskonsole
gui.tooltips.ae2wct.TitleDesc=Beschreibung
@@ -41,10 +37,10 @@ gui.tooltips.ae2wct.OrPress=or press
gui.tooltips.ae2wct.Press=Press
gui.tooltips.ae2wct.ToSwitchMode=to switch magnet mode
//Labels
#Labels
gui.labels.ae2wct.WirelessTermLabel=Drahtloskonsole
//Config Descriptions
#Config Descriptions
config.ae2wct.MaxPowerDesc=In der Drahtloskonsole maximal speicherbare Energie in AE
config.ae2wct.InfinityBoosterCfgDesc=Erlaube das unendliche Drahtlosverstärkerupgrade
config.ae2wct.EasyModeDesc=Aktiviere den "Einfachen Modus" (Einfachere Rezepte + Rezept für unendlichen Drahtlosverstärker)
@@ -55,7 +51,7 @@ config.ae2wct.DoVersionCheck=Check for updates
config.ae2wct.NewVersionAvailable=New version of Wireless Crafting Terminal is available!
config.ae2wct.ClickString=["Click here to go to download page [",{"text":"Download","color":"green","hoverEvent":{"action":"show_text","value":{"text":"Click this to download the latest version","color":"green"}},"clickEvent":{"action":"open_url","value":"http://minecraft.curseforge.com/projects/wireless-crafting-terminal"}},"]"]
//Achievements
#Achievements
achievement.wctAchievement=Digitales Fertigen über WLAN
achievement.wctAchievement.desc=Fertige eine drahtlose Fertigungskonsole
achievement.boosterAchievement=Interdimensionales Fertigen
@@ -63,15 +59,15 @@ achievement.boosterAchievement.desc=Erwerbe eine unendliche Drahtlosverstärkerk
achievement.magnetAchievement=Digitales Staubsaugen!
achievement.magnetAchievement.desc=Fertige eine Magnetkarte
//Chat Messages
#Chat Messages
chatmessages.ae2wct.NoNetworkPower=Netzwerk hat keine Energie!
chatmessages.ae2wct.MagnetMode1=Magnetkarte deaktiviert
chatmessages.ae2wct.MagnetMode2=Magnetkarte aktiviert - Items, die nicht im AE-Netzwerk gespeichert sind, werden im Inventar platziert
chatmessages.ae2wct.MagnetMode3=Magnetkarte aktiviert - Items, die nicht im AE-Netzwerk gespeichert sind, werden auf dem Boden liegen gelassen
chatmessages.ae2wct.InitializeMagnet=Vor dem Benutzen des Tastenkürzels muss zuerst mit der Magnetkarte in der Hand ein Rechtsklick ausgeführt werden!
//Keybindings
key.OpenTerminal=Öffne drahtlose Fertigungskonsole
key.OpenMagnetFilter=Öffne Magnetkartenfilter-GUI
key.SwitchMagnetMode=Aktiviere/Deaktiviere Magnetkarte
#Keybindings
ae2wct.OpenTerminal=Öffne drahtlose Fertigungskonsole
ae2wct.OpenMagnetFilter=Öffne Magnetkartenfilter-GUI
ae2wct.SwitchMagnetMode=Aktiviere/Deaktiviere Magnetkarte
key.categories.ae2wct=Wireless Crafting Terminal
@@ -1,14 +1,10 @@
//**************************//
//WIRELESS CRAFTING TEMRINAL//
//**************************//
//Items
#Items
item.wirelessCraftingTerminal.name=Wireless Crafting Terminal
item.infinityBoosterCard.name=Infinity Booster Card
item.magnetCard.name=Magnet Card
itemGroup.ae2wct=§9AE2 Wireless Crafting Terminal
//Tooltips
#Tooltips
gui.tooltips.ae2wct.PressShift=Hold Shift for Info
gui.tooltips.ae2wct.OnlyWorks=Only works when in Wireless Crafting Terminal slot!
gui.tooltips.ae2wct.TitleDesc=Description
@@ -41,10 +37,10 @@ gui.tooltips.ae2wct.OrPress=or press
gui.tooltips.ae2wct.Press=Press
gui.tooltips.ae2wct.ToSwitchMode=to switch magnet mode
//Labels
#Labels
gui.labels.ae2wct.WirelessTermLabel=Wireless Term
//Config Descriptions
#Config Descriptions
config.ae2wct.MaxPowerDesc=Maximum Power in AE units the wireless terminal can hold
config.ae2wct.InfinityBoosterCfgDesc=Enable Infinite Range Booster Upgrade
config.ae2wct.EasyModeDesc=Enable Easy Mode (Easier Recipes+Infinity Booster Recipe)
@@ -54,7 +50,7 @@ config.ae2wct.MineTweakerOverride=Enable MineTweaker Override (true=disables all
config.ae2wct.DoVersionCheck=Check for updates
config.ae2wct.ClickString=["Click here to go to download page [",{"text":"Download","color":"green","hoverEvent":{"action":"show_text","value":{"text":"Click this to download the latest version","color":"green"}},"clickEvent":{"action":"open_url","value":"http://minecraft.curseforge.com/projects/wireless-crafting-terminal"}},"]"]
//Achievements
#Achievements
achievement.wctAchievement=Digital Crafting Over WiFi
achievement.wctAchievement.desc=Craft a Wireless Crafting Terminal
achievement.boosterAchievement=Interdimensional Crafting Sack
@@ -62,15 +58,15 @@ achievement.boosterAchievement.desc=Aquire an Infinity Booster Card
achievement.magnetAchievement=Digital Hoover
achievement.magnetAchievement.desc=Craft a Magnet Card
//Chat Messages
#Chat Messages
chatmessages.ae2wct.NoNetworkPower=Network has no power!
chatmessages.ae2wct.MagnetMode1=Magnet Card Deactivated
chatmessages.ae2wct.MagnetMode2=Magnet Card Activated - Items not stored in AE network will be placed in inventory
chatmessages.ae2wct.MagnetMode3=Magnet Card Activated - Items not stored in AE network will be left on ground
chatmessages.ae2wct.InitializeMagnet=You must first right-click with the Magnet Card in hand before using the keybind!
//Keybindings
key.OpenTerminal=Open Wireless Crafting Terminal
key.OpenMagnetFilter=Open Magnet Card Filter GUI
key.SwitchMagnetMode=Activate/Deactivate Magnet Card
key.categories.ae2wct=Wireless Crafting Terminal
#Keybindings
ae2wct.OpenTerminal=Open Wireless Crafting Terminal
ae2wct.OpenMagnetFilter=Open Magnet Card Filter GUI
ae2wct.SwitchMagnetMode=Activate/Deactivate Magnet Card
key.categories.ae2wct=Wireless Crafting Terminal
@@ -1,14 +1,10 @@
//**************************//
//WIRELESS CRAFTING TEMRINAL//
//**************************//
//Items
#Items
item.wirelessCraftingTerminal.name=Wireless Crafting Terminal
item.infinityBoosterCard.name=Infinity Booster Card
item.magnetCard.name=Magnet Card
itemGroup.ae2wct=§9AE2 Wireless Crafting Terminal
//Tooltips
#Tooltips
gui.tooltips.ae2wct.PressShift=Hold Shift for Info
gui.tooltips.ae2wct.OnlyWorks=Only works when in Wireless Crafting Terminal slot!
gui.tooltips.ae2wct.TitleDesc=Description
@@ -41,10 +37,10 @@ gui.tooltips.ae2wct.OrPress=or press
gui.tooltips.ae2wct.Press=Press
gui.tooltips.ae2wct.ToSwitchMode=to switch magnet mode
//Labels
#Labels
gui.labels.ae2wct.WirelessTermLabel=Wireless Term
//Config Descriptions
#Config Descriptions
config.ae2wct.MaxPowerDesc=Maximum Power in AE units the wireless terminal can hold
config.ae2wct.InfinityBoosterCfgDesc=Enable Infinite Range Booster Upgrade
config.ae2wct.EasyModeDesc=Enable Easy Mode (Easier Recipes+Infinity Booster Recipe)
@@ -54,7 +50,7 @@ config.ae2wct.MineTweakerOverride=Enable MineTweaker Override (true=disables all
config.ae2wct.DoVersionCheck=Check for updates
config.ae2wct.ClickString=["Click here to go to download page [",{"text":"Download","color":"green","hoverEvent":{"action":"show_text","value":{"text":"Click this to download the latest version","color":"green"}},"clickEvent":{"action":"open_url","value":"http://minecraft.curseforge.com/projects/wireless-crafting-terminal"}},"]"]
//Achievements
#Achievements
achievement.wctAchievement=Digital Crafting Over WiFi
achievement.wctAchievement.desc=Craft a Wireless Crafting Terminal
achievement.boosterAchievement=Interdimensional Crafting Sack
@@ -62,15 +58,15 @@ achievement.boosterAchievement.desc=Aquire an Infinity Booster Card
achievement.magnetAchievement=Digital Hoover
achievement.magnetAchievement.desc=Craft a Magnet Card
//Chat Messages
#Chat Messages
chatmessages.ae2wct.NoNetworkPower=Network has no power!
chatmessages.ae2wct.MagnetMode1=Magnet Card Deactivated
chatmessages.ae2wct.MagnetMode2=Magnet Card Activated - Items not stored in AE network will be placed in inventory
chatmessages.ae2wct.MagnetMode3=Magnet Card Activated - Items not stored in AE network will be left on ground
chatmessages.ae2wct.InitializeMagnet=You must first right-click with the Magnet Card in hand before using the keybind!
//Keybindings
key.OpenTerminal=Open Wireless Crafting Terminal
key.OpenMagnetFilter=Open Magnet Card Filter GUI
key.SwitchMagnetMode=Activate/Deactivate Magnet Card
key.categories.ae2wct=Wireless Crafting Terminal
#Keybindings
ae2wct.OpenTerminal=Open Wireless Crafting Terminal
ae2wct.OpenMagnetFilter=Open Magnet Card Filter GUI
ae2wct.SwitchMagnetMode=Activate/Deactivate Magnet Card
key.categories.ae2wct=Wireless Crafting Terminal
@@ -1,14 +1,10 @@
//**************************//
//WIRELESS CRAFTING TEMRINAL//
//**************************//
//Items
#Items
item.wirelessCraftingTerminal.name=Wireless Crafting Terminal
item.infinityBoosterCard.name=Infinity Booster Card
item.magnetCard.name=Magnet Card
itemGroup.ae2wct=§9AE2 Wireless Crafting Terminal
//Tooltips
#Tooltips
gui.tooltips.ae2wct.PressShift=Hold Shift for Info
gui.tooltips.ae2wct.OnlyWorks=Only works when in Wireless Crafting Terminal slot!
gui.tooltips.ae2wct.TitleDesc=Description
@@ -41,10 +37,10 @@ gui.tooltips.ae2wct.OrPress=or press
gui.tooltips.ae2wct.Press=Press
gui.tooltips.ae2wct.ToSwitchMode=to switch magnet mode
//Labels
#Labels
gui.labels.ae2wct.WirelessTermLabel=Wireless Term
//Config Descriptions
#Config Descriptions
config.ae2wct.MaxPowerDesc=Maximum Power in AE units the wireless terminal can hold
config.ae2wct.InfinityBoosterCfgDesc=Enable Infinite Range Booster Upgrade
config.ae2wct.EasyModeDesc=Enable Easy Mode (Easier Recipes+Infinity Booster Recipe)
@@ -56,7 +52,7 @@ config.ae2wct.NewVersionAvailable=New version of Wireless Crafting Terminal is a
config.ae2wct.ClickString=["Click here to go to download page [",{"text":"Download","color":"green","hoverEvent":{"action":"show_text","value":{"text":"Click this to download the latest version","color":"green"}},"clickEvent":{"action":"open_url","value":"http://minecraft.curseforge.com/projects/wireless-crafting-terminal"}},"]"]
config.ae2wct.SaveSearchString=Persist terminal search string between sessions
//Achievements
#Achievements
achievement.wctAchievement=Digital Crafting Over WiFi
achievement.wctAchievement.desc=Craft a Wireless Crafting Terminal
achievement.boosterAchievement=Interdimensional Crafting Sack
@@ -64,15 +60,15 @@ achievement.boosterAchievement.desc=Aquire an Infinity Booster Card
achievement.magnetAchievement=Digital Hoover
achievement.magnetAchievement.desc=Craft a Magnet Card
//Chat Messages
#Chat Messages
chatmessages.ae2wct.NoNetworkPower=Network has no power!
chatmessages.ae2wct.MagnetMode1=Magnet Card Deactivated
chatmessages.ae2wct.MagnetMode2=Magnet Card Activated - Items not stored in AE network will be placed in inventory
chatmessages.ae2wct.MagnetMode3=Magnet Card Activated - Items not stored in AE network will be left on ground
chatmessages.ae2wct.InitializeMagnet=You must first right-click with the Magnet Card in hand before using the keybind!
//Keybindings
key.OpenTerminal=Open Wireless Crafting Terminal
key.OpenMagnetFilter=Open Magnet Card Filter GUI
key.SwitchMagnetMode=Activate/Deactivate Magnet Card
key.categories.ae2wct=Wireless Crafting Terminal
#Keybindings
ae2wct.OpenTerminal=Open Wireless Crafting Terminal
ae2wct.OpenMagnetFilter=Open Magnet Card Filter GUI
ae2wct.SwitchMagnetMode=Activate/Deactivate Magnet Card
key.categories.ae2wct=Wireless Crafting Terminal
@@ -1,14 +1,10 @@
//**************************//
//WIRELESS CRAFTING TEMRINAL//
//**************************//
//Items
#Items
item.wirelessCraftingTerminal.name=Terminal Inal?mbrico de Fabricaci?n
item.infinityBoosterCard.name=Tarjeta de Acelerador de Infinito
item.magnetCard.name=Tarjeta de im?n
itemGroup.ae2wct=§9AE2 Terminal Inal?mbrico de Fabricaci?n
//Tooltips
#Tooltips
gui.tooltips.ae2wct.PressShift=Presionada la Tecla May?s para Informaci?n
gui.tooltips.ae2wct.OnlyWorks=S?lo funciona cuando en la ranura de la Terminal de trabajo inal?mbrica!
gui.tooltips.ae2wct.TitleDesc=la Descripci?n
@@ -16,11 +12,11 @@ gui.tooltips.ae2wct.InfinityBoosterDesc=Permite un vinculado AE2 elaboraci?n Ter
gui.tooltips.ae2wct.MagnetDesc=Un im?n que autom?ticamente inserta elementos en la red AE.
gui.tooltips.ae2wct.MagnetDesc2=Haga clic en establecer filtro
gui.tooltips.ae2wct.LinkStatus=El estado de enlace
gui.tooltips.ae2wct.Installed=Instalar
gui.tooltips.ae2wct.Installed=Instalar
gui.tooltips.ae2wct.NotInstalled=Instalado
gui.tooltips.ae2wct.Active=Activo
gui.tooltips.ae2wct.Inactive=Inactivo
gui.tooltips.ae2wct.Status=Condici?n
gui.tooltips.ae2wct.Status=Condici?n
gui.tooltips.ae2wct.EmptyTrash=Vaciar Papelera
gui.tooltips.ae2wct.EmptyTrashDesc=Elimine el contenido de la papelera de la ranura
gui.tooltips.ae2wct.MagnetFilterTitle=Filtro de im?n
@@ -41,10 +37,10 @@ gui.tooltips.ae2wct.OrPress=or press
gui.tooltips.ae2wct.Press=Press
gui.tooltips.ae2wct.ToSwitchMode=to switch magnet mode
//Labels
#Labels
gui.labels.ae2wct.WirelessTermLabel=T?rmino Inal?mbrico
//Config Descriptions
#Config Descriptions
config.ae2wct.MaxPowerDesc=Potencia m?xima en unidades AE que puede sostener el terminal inal?mbrico
config.ae2wct.InfinityBoosterCfgDesc=Activar infinita gama Booster mejora
config.ae2wct.EasyModeDesc=Activar el modo f?cil (Recetas m?s f?ciles y Infinity Booster receta)
@@ -54,7 +50,7 @@ config.ae2wct.MineTweakerOverride=Enable MineTweaker Override (true=disables all
config.ae2wct.DoVersionCheck=Check for updates
config.ae2wct.ClickString=["Click here to go to download page [",{"text":"Download","color":"green","hoverEvent":{"action":"show_text","value":{"text":"Click this to download the latest version","color":"green"}},"clickEvent":{"action":"open_url","value":"http://minecraft.curseforge.com/projects/wireless-crafting-terminal"}},"]"]
//Achievements
#Achievements
achievement.wctAchievement=Digital elaboraci?n sobre WLAN
achievement.wctAchievement.desc=Un Wireless Terminal de elaboraci?n del arte
achievement.boosterAchievement=Saco de fabricaci?n interdimensional
@@ -62,14 +58,14 @@ achievement.boosterAchievement.desc=Adquirir una tarjeta de acelerador de infini
achievement.magnetAchievement=Aspiradora digital
achievement.magnetAchievement.desc=Elaborar una tarjeta de im?n
//Chat Messages
#Chat Messages
chatmessages.ae2wct.NoNetworkPower=Red no tiene poder!
chatmessages.ae2wct.MagnetMode1=Imanes tarjeta desactivada
chatmessages.ae2wct.MagnetMode2=Tarjeta im?n activado - Art?culos no almacenados en red AE se colocar? en el inventario
chatmessages.ae2wct.MagnetMode3=Tarjeta im?n activado - Art?culos no almacenados en red AE se quedar?n en la tierra
//Keybindings
key.OpenTerminal=Abierto Terminal Inal?mbrico de Fabricaci?n
key.OpenMagnetFilter=Filtro tarjeta de im?n abierto GUI
key.SwitchMagnetMode=Activar/desactivar tarjeta im?n
key.categories.ae2wct=Terminal Inal?mbrico de Fabricaci?n
#Keybindings
ae2wct.OpenTerminal=Abierto Terminal Inal?mbrico de Fabricaci?n
ae2wct.OpenMagnetFilter=Filtro tarjeta de im?n abierto GUI
ae2wct.SwitchMagnetMode=Activar/desactivar tarjeta im?n
key.categories.ae2wct=Terminal Inal?mbrico de Fabricaci?n
@@ -1,14 +1,10 @@
//**************************//
//WIRELESS CRAFTING TEMRINAL//
//**************************//
//Items
#Items
item.wirelessCraftingTerminal.name=无线合成终端
item.infinityBoosterCard.name=量子增幅器
item.magnetCard.name=磁场增幅卡
itemGroup.ae2wct=AE2无线合成终端
//Tooltips
#Tooltips
gui.tooltips.ae2wct.PressShift=按住Shift查看详细信息
gui.tooltips.ae2wct.OnlyWorks=只能安装在无线合成终端中使用!
gui.tooltips.ae2wct.TitleDesc=介绍
@@ -41,10 +37,10 @@ gui.tooltips.ae2wct.OrPress=或按
gui.tooltips.ae2wct.Press=按
gui.tooltips.ae2wct.ToSwitchMode=切换磁场模式
//Labels
#Labels
gui.labels.ae2wct.WirelessTermLabel=无线合成终端
//Config Descriptions
#Config Descriptions
config.ae2wct.MaxPowerDesc=Maximum Power in AE units the wireless terminal can hold
config.ae2wct.InfinityBoosterCfgDesc=Enable Infinite Range Booster Upgrade
config.ae2wct.EasyModeDesc=Enable Easy Mode (Easier Recipes+Infinity Booster Recipe)
@@ -55,7 +51,7 @@ config.ae2wct.DoVersionCheck=Check for updates
config.ae2wct.NewVersionAvailable=New version of Wireless Crafting Terminal is available!
config.ae2wct.ClickString=["Click here to go to download page [",{"text":"Download","color":"green","hoverEvent":{"action":"show_text","value":{"text":"Click this to download the latest version","color":"green"}},"clickEvent":{"action":"open_url","value":"http://minecraft.curseforge.com/projects/wireless-crafting-terminal"}},"]"]
//Achievements
#Achievements
achievement.wctAchievement=Digital Crafting Over WiFi
achievement.wctAchievement.desc=Craft a Wireless Crafting Terminal
achievement.boosterAchievement=Interdimensional Crafting Sack
@@ -63,15 +59,15 @@ achievement.boosterAchievement.desc=Aquire an Infinity Booster Card
achievement.magnetAchievement=Digital Hoover
achievement.magnetAchievement.desc=Craft a Magnet Card
//Chat Messages
#Chat Messages
chatmessages.ae2wct.NoNetworkPower=网络供能中断!
chatmessages.ae2wct.MagnetMode1=磁场增幅卡关闭
chatmessages.ae2wct.MagnetMode2=磁场增幅卡激活 - 未存储于AE网络中的物品将被放置在背包中
chatmessages.ae2wct.MagnetMode3=磁场增幅卡激活 - 未存储于AE网络中的物品将不会被拾取
chatmessages.ae2wct.InitializeMagnet=在使用绑定按键前,你必须手持磁场增幅卡先右键!
//Keybindings
key.OpenTerminal=打开无线合成终端
key.OpenMagnetFilter=打开磁场增幅卡过滤GUI
key.SwitchMagnetMode=激活/关闭磁场增幅卡
#Keybindings
ae2wct.OpenTerminal=打开无线合成终端
ae2wct.OpenMagnetFilter=打开磁场增幅卡过滤GUI
ae2wct.SwitchMagnetMode=激活/关闭磁场增幅卡
key.categories.ae2wct=无线合成终端