Compare commits

...
18 Commits
Author SHA1 Message Date
Dream Master d4191557af update 2024-10-13 21:04:51 +02:00
Raven Szewczyk 6670fcdb5f Share both research and discovered aspects list with the knowledge sharing tome (#41)
* Update buildscript, switch to RFG tag generation

* Share both research and discovered aspects list with the knowledge sharing book
2024-07-17 16:38:52 +00:00
Martin Robertz 2058c309d4 update 2024-05-22 22:45:09 +02:00
Under 2633f752f3 Add configs for annoying Kami features (#40)
1. Kami/Ichor Leggings have had the "produce light" ability config'ed and disabled by default.
2. Kami/Ichor boots have had the "dirt into grass" ability config'ed but left enabled by default.

Just let me know if the general consensus would be that the dirt into grass should also be disabled by default and I'll swap that to default to false as well.
2024-05-21 15:01:33 -04:00
Martin Robertz 8ce7293034 update 2024-04-19 20:05:19 +02:00
chochem 0432ff0d30 be more specific (#39) 2024-04-19 00:51:01 +01:00
Abdiel Kavash 180509a1a9 Fix crashes related to high level enchantments. (#38)
* Fix crashes with high level enchantments.

* bs+d
2024-04-13 00:55:55 +02:00
Raven Szewczyk 1f27b14054 [ci skip] upgraded build system 2024-02-04 20:02:27 +00:00
Martin Robertz 22e8c36aae update deps+bs 2024-01-31 22:50:58 +01:00
Jurre Groenendijk 0212dd084a Fix typo in thaumic restorer page (#37) 2024-01-31 22:50:08 +01:00
Martin Robertz d54311fb11 update bs+deps 2024-01-12 20:58:37 +01:00
Raven Szewczyk 4a20fa3b06 [ci skip] upgraded build system 2024-01-08 21:29:54 +00:00
Martin Robertz 97e8cdf407 update gradle + deps + bs 2023-12-26 22:01:21 +01:00
Abdiel Kavash 0c75584ccb Talisman of Remedium no longer wastes durability trying to remove permanent debuffs. It also accepts the Unbreaking enchant. (#36)
* Talisman of Remedium accepts Unbreaking enchant.

* Talisman of Remedium no longer removes debuffs with duration < 1 second.

* Talisman of Remedium does not waste durability trying to remove "permanent" debuffs.

* Use a map on player's UUID instead of single variables.
2023-12-26 11:09:31 +01:00
Angus Grewal 47ffee8cd3 Added balancing configs for Shadowbeam Focus. (#35) 2023-11-25 15:48:33 +01:00
Dream-MasterXXL 3660fb23b5 update deps 2023-10-09 23:01:57 +02:00
Raven Szewczyk b1388aeb80 Fix Robes of the Stratosphere rendering memory leak (#34)
* Update buildscript and dependencies

* Fix wildcard imports

* Fix Robes of the Stratosphere rendering memory leak
2023-10-09 22:00:13 +01:00
Martin Robertz d922bfbdbf update deps 2023-09-10 22:42:12 +02:00
43 changed files with 587 additions and 1784 deletions

No files matched your search

+2 -1588
View File
File diff suppressed because it is too large. Load diff
+11 -11
View File
@@ -1,20 +1,20 @@
// Add your dependencies here
dependencies {
api('com.github.GTNewHorizons:Baubles:1.0.1.14:dev')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-195-GTNH:api')
api('com.github.GTNewHorizons:Baubles:1.0.4:dev')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-468-GTNH:api')
api('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
compileOnly('com.github.GTNewHorizons:Botania:1.9.1-GTNH:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:EnderCore:0.2.6:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:EnderIO:2.3.1.29:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:EnderStorage:1.4.11:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:waila:1.5.19:api') {transitive=false}
compileOnly('com.github.GTNewHorizons:TinkersConstruct:1.9.0.13-GTNH:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:ForgeMultipart:1.2.7:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:CodeChickenLib:1.1.5.3:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:OpenComputers:1.9.1-GTNH:api') {transitive=false}
compileOnly('com.github.GTNewHorizons:Botania:1.11.5-GTNH:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:EnderCore:0.4.6:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:EnderIO:2.8.18:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:EnderStorage:1.6.4:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:waila:1.8.1:api') {transitive=false}
compileOnly('com.github.GTNewHorizons:TinkersConstruct:1.12.11-GTNH:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:ForgeMultipart:1.5.0:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:CodeChickenLib:1.3.0:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:OpenComputers:1.10.26-GTNH:api') {transitive=false}
compileOnly('curse.maven:computercraft-67504:2269339')
compileOnly('curse.maven:cofh-lib-220333:2388748')
+161 -24
View File
@@ -1,66 +1,203 @@
# 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 = Thaumic Tinkerer
# 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 = ThaumicTinkerer
# Root package of the mod, used to find various classes in other properties,
# mcmod.info substitution, enabling assertions in run tasks, etc.
modGroup = thaumic.tinkerer
# 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.
# Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods.
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 username 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
# 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 = LibMisc.java
# 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 = false
# 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 = thaumic.tinkerer.Tags
# Name of the token containing the project's current version to generate/replace.
gradleTokenVersion = VERSION
# [DEPRECATED] Mod ID replacement token.
gradleTokenModId =
# [DEPRECATED] Mod name replacement token.
gradleTokenModName =
gradleTokenVersion = GRADLETOKEN_VERSION
# [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 =
# 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. It must be placed into /src/main/resources/META-INF/
# Example value: mymodid_at.cfg
# There can be multiple files in a space-separated list.
# Example value: mymodid_at.cfg nei_at.cfg
accessTransformersFile = ThaumicTinkerer_at.cfg
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins = true
# Adds some debug arguments like verbose output and export
# 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 = true
# 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!
mixinsPackage = mixins
# 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 = preloader.ThaumicTLoaderContainer
# 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: GTNH Mixins 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 =
# customArchiveBaseName =
# 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.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored
+17 -10
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,7 +85,9 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -130,10 +134,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.
@@ -141,7 +148,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
@@ -149,7 +156,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
@@ -198,11 +205,11 @@ fi
# 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 $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.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_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" \
Vendored
+12 -10
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,11 +59,11 @@ 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
-23
View File
@@ -1,27 +1,4 @@
// Add any additional repositories for your dependencies here
repositories {
maven {
name 'GTNH Maven'
url 'http://jenkins.usrv.eu:8081/nexus/content/groups/public/'
allowInsecureProtocol
}
maven {
name 'ic2'
url 'https://maven.ic2.player.to/'
metadataSources {
mavenPom()
artifact()
}
}
maven {
url 'https://cursemaven.com'
content {
includeGroup "curse.maven"
}
}
maven {
url 'https://jitpack.io'
}
}
+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.27'
}
blowdryerSetup {
repoSubfolder 'gtnhShared'
github('GTNewHorizons/ExampleMod1.7.10', 'tag', '0.2.0')
//devLocal '.' // Use this when testing config updates locally
}
@@ -11,7 +11,7 @@
*/
package thaumic.tinkerer.client.core.handler.kami;
import java.awt.*;
import java.awt.Color;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
@@ -44,7 +44,11 @@ import thaumic.tinkerer.client.render.block.kami.RenderWarpGate;
import thaumic.tinkerer.client.render.item.RenderGenericSeeds;
import thaumic.tinkerer.client.render.item.RenderMobDisplay;
import thaumic.tinkerer.client.render.item.kami.RenderPlacementMirror;
import thaumic.tinkerer.client.render.tile.*;
import thaumic.tinkerer.client.render.tile.RenderTileAnimationTablet;
import thaumic.tinkerer.client.render.tile.RenderTileEnchanter;
import thaumic.tinkerer.client.render.tile.RenderTileFunnel;
import thaumic.tinkerer.client.render.tile.RenderTileMagnet;
import thaumic.tinkerer.client.render.tile.RenderTileRepairer;
import thaumic.tinkerer.client.render.tile.kami.RenderTileWarpGate;
import thaumic.tinkerer.common.ThaumicTinkerer;
import thaumic.tinkerer.common.block.tile.TileEnchanter;
@@ -11,7 +11,7 @@
*/
package thaumic.tinkerer.client.gui;
import java.awt.*;
import java.awt.Color;
import java.util.ArrayList;
import java.util.List;
@@ -11,7 +11,7 @@
*/
package thaumic.tinkerer.client.gui;
import java.awt.*;
import java.awt.Desktop;
import java.net.URI;
import net.minecraft.util.StatCollector;
@@ -11,7 +11,7 @@
*/
package thaumic.tinkerer.client.gui.kami;
import java.awt.*;
import java.awt.Color;
import java.util.ArrayList;
import java.util.List;
@@ -11,7 +11,7 @@
*/
package thaumic.tinkerer.client.render.tile;
import java.awt.*;
import java.awt.Color;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.Tessellator;
@@ -11,7 +11,7 @@
*/
package thaumic.tinkerer.client.render.tile;
import java.awt.*;
import java.awt.Color;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ItemRenderer;
@@ -26,7 +26,11 @@ import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.*;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import thaumcraft.common.CommonProxy;
@@ -1,6 +1,10 @@
package thaumic.tinkerer.common.block.tile;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
@@ -31,7 +31,11 @@ import dan200.computercraft.api.lua.ILuaContext;
import dan200.computercraft.api.lua.LuaException;
import dan200.computercraft.api.peripheral.IComputerAccess;
import dan200.computercraft.api.peripheral.IPeripheral;
import ic2.api.energy.tile.*;
import ic2.api.energy.tile.IEnergyAcceptor;
import ic2.api.energy.tile.IEnergyConductor;
import ic2.api.energy.tile.IEnergyEmitter;
import ic2.api.energy.tile.IEnergySink;
import ic2.api.energy.tile.IEnergySource;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.aspects.IAspectContainer;
@@ -12,7 +12,12 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dan200.computercraft.api.peripheral.IPeripheral;
import dan200.computercraft.api.turtle.*;
import dan200.computercraft.api.turtle.ITurtleAccess;
import dan200.computercraft.api.turtle.ITurtleUpgrade;
import dan200.computercraft.api.turtle.TurtleCommandResult;
import dan200.computercraft.api.turtle.TurtleSide;
import dan200.computercraft.api.turtle.TurtleUpgradeType;
import dan200.computercraft.api.turtle.TurtleVerb;
import thaumic.tinkerer.common.ThaumicTinkerer;
import thaumic.tinkerer.common.block.BlockGas;
import thaumic.tinkerer.common.item.ItemGasRemover;
@@ -47,9 +47,16 @@ public final class ConfigHandler {
public static int netherDimensionID;
public static int endDimensionID;
public static int bedrockDimensionID = 19;
public static boolean shouldKamiLegsDoLightFeature = false;
public static boolean shouldKamiBootsDoGrass = true;
public static int soulHeartHeight;
public static int visShadowbeamOrder;
public static int visShadowbeamAir;
public static int visShadowbeamEntropy;
public static int baseDamageShadowbeam;
private static Configuration config;
public static void loadConfig(File configFile) {
@@ -59,6 +66,8 @@ public final class ConfigHandler {
new ConfigCategory("enchantments");
new ConfigCategory("general.kami");
new ConfigCategory("balance.shadowbeam");
config.addCustomCategoryComment("general.kami", "These will only be used if KAMI is enabled.");
config.load();
@@ -143,6 +152,39 @@ public final class ConfigHandler {
.getInt("Water Potion id", "potions", 89, 30, 1023, "Set to the potion id for water potion");
potionAirId = config.getInt("Air Potion id", "potions", 86, 30, 1023, "Set to the potion id for air potion");
// Shadowbeam Balance
visShadowbeamAir = config.getInt(
"aer vis cost",
"balance.shadowbeam",
15,
Integer.MIN_VALUE,
Integer.MAX_VALUE,
"vis cost for the aer aspect, 1/100th in-game");
visShadowbeamOrder = config.getInt(
"ordo vis cost",
"balance.shadowbeam",
25,
Integer.MIN_VALUE,
Integer.MAX_VALUE,
"vis cost for the ordo aspect, 1/100th in-game");
visShadowbeamEntropy = config.getInt(
"perditio vis cost",
"balance.shadowbeam",
25,
Integer.MIN_VALUE,
Integer.MAX_VALUE,
"vis cost for the perditio aspect, 1/100th in-game");
baseDamageShadowbeam = config.getInt(
"shadowbeam base damage",
"balance.shadowbeam",
8,
Integer.MIN_VALUE,
Integer.MAX_VALUE,
"base damage of the shadowbeam focus");
if (enableKami) {
bedrockDimensionID = config.getInt(
@@ -188,6 +230,16 @@ public final class ConfigHandler {
-1023,
1023,
"The Dimension ID for the End, leave at 1 if you don't modify it with another mod/plugin.");
shouldKamiLegsDoLightFeature = config.getBoolean(
"Kami Leggings Light Placing Feature Enabled",
"general.kami",
shouldKamiLegsDoLightFeature,
"Sets if Legs of the Burning Mantle (Awakened Kami leggings) will do the effect where it places lights near you.");
shouldKamiBootsDoGrass = config.getBoolean(
"Kami Boots Dirt into Grass Feature Enabled",
"general.kami",
shouldKamiBootsDoGrass,
"Sets if Boots of the Horizontal Shield (Awakened Kami Boots) will do the effect where dirt under you turns into grass.");
}
LibEnchantIDs.idAscentBoost = loadEnchant(LibEnchantNames.ASCENT_BOOST, LibEnchantIDs.idAscentBoost);
@@ -208,7 +208,7 @@ public class AspectCropLootManager {
addAspectLoot(Aspect.ENERGY, new ItemStack(ConfigItems.itemResource, 12));
addAspectLoot(Aspect.MAGIC, "shard");
addAspectLoot(Aspect.MAGIC, "materialAspectShard");
addAspectLoot(Aspect.HEAL, new ItemStack(Items.golden_apple));
@@ -4,8 +4,32 @@ import java.util.Map;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.monster.*;
import net.minecraft.entity.passive.*;
import net.minecraft.entity.monster.EntityBlaze;
import net.minecraft.entity.monster.EntityCaveSpider;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityEnderman;
import net.minecraft.entity.monster.EntityGhast;
import net.minecraft.entity.monster.EntityIronGolem;
import net.minecraft.entity.monster.EntityMagmaCube;
import net.minecraft.entity.monster.EntityPigZombie;
import net.minecraft.entity.monster.EntitySilverfish;
import net.minecraft.entity.monster.EntitySkeleton;
import net.minecraft.entity.monster.EntitySlime;
import net.minecraft.entity.monster.EntitySnowman;
import net.minecraft.entity.monster.EntitySpider;
import net.minecraft.entity.monster.EntityWitch;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.entity.passive.EntityBat;
import net.minecraft.entity.passive.EntityChicken;
import net.minecraft.entity.passive.EntityCow;
import net.minecraft.entity.passive.EntityHorse;
import net.minecraft.entity.passive.EntityMooshroom;
import net.minecraft.entity.passive.EntityOcelot;
import net.minecraft.entity.passive.EntityPig;
import net.minecraft.entity.passive.EntitySheep;
import net.minecraft.entity.passive.EntitySquid;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.passive.EntityWolf;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
@@ -34,7 +34,19 @@ import li.cil.oc.api.Driver;
import thaumcraft.api.aspects.IEssentiaTransport;
import thaumcraft.api.wands.WandCap;
import thaumcraft.api.wands.WandRod;
import thaumcraft.common.tiles.*;
import thaumcraft.common.tiles.TileAlembic;
import thaumcraft.common.tiles.TileArcaneBore;
import thaumcraft.common.tiles.TileCentrifuge;
import thaumcraft.common.tiles.TileCrucible;
import thaumcraft.common.tiles.TileDeconstructionTable;
import thaumcraft.common.tiles.TileInfusionMatrix;
import thaumcraft.common.tiles.TileJarBrain;
import thaumcraft.common.tiles.TileJarFillable;
import thaumcraft.common.tiles.TileJarNode;
import thaumcraft.common.tiles.TileNode;
import thaumcraft.common.tiles.TileSensor;
import thaumcraft.common.tiles.TileTubeFilter;
import thaumcraft.common.tiles.TileWandPedestal;
import thaumic.tinkerer.common.ThaumicTinkerer;
import thaumic.tinkerer.common.block.tile.TileFunnel;
import thaumic.tinkerer.common.block.tile.TileRepairer;
@@ -59,12 +71,21 @@ import thaumic.tinkerer.common.item.kami.wand.RodIchorcloth;
import thaumic.tinkerer.common.lib.LibMisc;
import thaumic.tinkerer.common.network.GuiHandler;
import thaumic.tinkerer.common.network.PlayerTracker;
import thaumic.tinkerer.common.network.packet.*;
import thaumic.tinkerer.common.network.packet.PacketEnchanterAddEnchant;
import thaumic.tinkerer.common.network.packet.PacketEnchanterStartWorking;
import thaumic.tinkerer.common.network.packet.PacketMobMagnetButton;
import thaumic.tinkerer.common.network.packet.PacketPlacerButton;
import thaumic.tinkerer.common.network.packet.PacketTabletButton;
import thaumic.tinkerer.common.network.packet.kami.PacketSoulHearts;
import thaumic.tinkerer.common.network.packet.kami.PacketToggleArmor;
import thaumic.tinkerer.common.network.packet.kami.PacketWarpGateButton;
import thaumic.tinkerer.common.network.packet.kami.PacketWarpGateTeleport;
import thaumic.tinkerer.common.peripheral.OpenComputers.*;
import thaumic.tinkerer.common.peripheral.OpenComputers.DriverArcaneBore;
import thaumic.tinkerer.common.peripheral.OpenComputers.DriverArcaneEar;
import thaumic.tinkerer.common.peripheral.OpenComputers.DriverBrainInAJar;
import thaumic.tinkerer.common.peripheral.OpenComputers.DriverDeconstructor;
import thaumic.tinkerer.common.peripheral.OpenComputers.DriverEssentiaTransport;
import thaumic.tinkerer.common.peripheral.OpenComputers.DriverIAspectContainer;
import thaumic.tinkerer.common.peripheral.PeripheralHandler;
import thaumic.tinkerer.common.potion.ModPotions;
import thaumic.tinkerer.common.research.ResearchHelper;
@@ -71,7 +71,7 @@ public class ModEnchantmentHandler {
int finalStrike = EnchantmentHelper.getEnchantmentLevel(LibEnchantIDs.finalStrike, heldItem);
if (finalStrike > 0) {
Random rand = new Random();
if (rand.nextInt(20 - finalStrike) == 0) {
if ((finalStrike >= 19 || rand.nextInt(20 - finalStrike) == 0)) {
event.ammount *= 3;
}
}
@@ -154,10 +154,14 @@ public class ModEnchantmentHandler {
int quickDraw = EnchantmentHelper.getEnchantmentLevel(LibEnchantIDs.idQuickDraw, heldItem);
ItemStack usingItem = player.itemInUse;
int time = player.itemInUseCount;
if (quickDraw > 0 && usingItem != null && usingItem.getItem() instanceof ItemBow)
if ((usingItem.getItem().getMaxItemUseDuration(usingItem) - time) % (6 - quickDraw) == 0)
player.itemInUseCount = time - 1;
if (quickDraw > 0 && usingItem != null && usingItem.getItem() instanceof ItemBow) {
int speedup = quickDraw / 6;
quickDraw = quickDraw % 6;
if (player.itemInUseCount % (6 - quickDraw) == 0) {
speedup++;
}
player.itemInUseCount = Math.max(2, player.itemInUseCount - speedup);
}
}
}
@@ -8,7 +8,12 @@ import net.minecraft.item.ItemBlock;
import net.minecraft.util.IIcon;
import thaumic.tinkerer.client.core.helper.IconHelper;
import thaumic.tinkerer.common.block.fire.*;
import thaumic.tinkerer.common.block.fire.BlockFireAir;
import thaumic.tinkerer.common.block.fire.BlockFireChaos;
import thaumic.tinkerer.common.block.fire.BlockFireEarth;
import thaumic.tinkerer.common.block.fire.BlockFireIgnis;
import thaumic.tinkerer.common.block.fire.BlockFireOrder;
import thaumic.tinkerer.common.block.fire.BlockFireWater;
import thaumic.tinkerer.common.registry.ITTinkererBlock;
import thaumic.tinkerer.common.registry.ITTinkererItem;
import thaumic.tinkerer.common.registry.ThaumicTinkererRecipe;
@@ -12,7 +12,10 @@
package thaumic.tinkerer.common.item;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.UUID;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.EntityLivingBase;
@@ -26,8 +29,6 @@ import net.minecraft.util.IIcon;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import org.apache.commons.lang3.ArrayUtils;
import baubles.api.BaubleType;
import baubles.api.BaublesApi;
import baubles.api.IBauble;
@@ -60,6 +61,11 @@ public class ItemCleansingTalisman extends ItemBase implements IBauble {
private IIcon enabledIcon;
private static final int EFFECT_BURNING = -1;
// 0 = no effect, otherwise either EFFECT_BURNING or the ID of the effect removed.
private HashMap<UUID, Integer> mLastEffectRemoved = new HashMap<>();
private final HashMap<UUID, Collection<Integer>> mPermanentEffects = new HashMap<>();
public ItemCleansingTalisman() {
setMaxStackSize(1);
setMaxDamage(LibFeatures.CLEANSING_TALISMAN_USES);
@@ -142,6 +148,12 @@ public class ItemCleansingTalisman extends ItemBase implements IBauble {
return EnumRarity.uncommon;
}
@Override
public int getItemEnchantability() {
// Equivalent to iron.
return 10;
}
@Override
public BaubleType getBaubleType(ItemStack itemstack) {
return BaubleType.AMULET;
@@ -153,15 +165,48 @@ public class ItemCleansingTalisman extends ItemBase implements IBauble {
if (isEnabled(par1ItemStack) && !par2World.isRemote) {
if (player.ticksExisted % 20 == 0) {
if (player instanceof EntityPlayer) {
boolean removed = false;
int damage = 1;
Collection<PotionEffect> potions = player.getActivePotionEffects();
int lastEffectRemoved;
Collection<Integer> permanentEffects;
UUID uuid = player.getUniqueID();
if (mPermanentEffects.containsKey(uuid)) {
lastEffectRemoved = mLastEffectRemoved.get(uuid);
permanentEffects = mPermanentEffects.get(uuid);
} else {
lastEffectRemoved = 0;
permanentEffects = new HashSet<>();
mLastEffectRemoved.put(uuid, lastEffectRemoved);
mPermanentEffects.put(uuid, permanentEffects);
}
// All effects we try to remove in this operation, including permanent effects.
Collection<Integer> effectsToRemove = new HashSet<>();
// One new effect we remove this operation, with a durability cost.
int effectRemoved = 0;
if (player.isBurning()) {
player.extinguish();
removed = true;
} else for (PotionEffect potion : potions) {
if (permanentEffects.contains(EFFECT_BURNING)) {
// Remove permanent effects at no cost.
effectsToRemove.add(EFFECT_BURNING);
} else if (lastEffectRemoved == EFFECT_BURNING) {
// We removed burning last time, player is on fire permanently.
permanentEffects.add(EFFECT_BURNING);
effectsToRemove.add(EFFECT_BURNING);
} else if (effectRemoved == 0) {
// Actually remove burning.
effectsToRemove.add(EFFECT_BURNING);
effectRemoved = EFFECT_BURNING;
}
}
Collection<PotionEffect> potions = player.getActivePotionEffects();
for (PotionEffect potion : potions) {
// Skip effects without a duration; e.g., dolly, TiC cleaver, etc.
if (potion.duration < 20) {
continue;
}
int id = potion.getPotionID();
boolean badEffect;
badEffect = ReflectionHelper.getPrivateValue(
@@ -171,28 +216,57 @@ public class ItemCleansingTalisman extends ItemBase implements IBauble {
if (Potion.potionTypes[id] instanceof PotionWarpWard) {
badEffect = false;
}
if (badEffect) {
player.removePotionEffect(id);
removed = true;
int[] warpPotionIDs = new int[] { Config.potionBlurredID, Config.potionDeathGazeID,
Config.potionInfVisExhaustID, Config.potionSunScornedID, Config.potionUnHungerID };
if (ArrayUtils.contains(warpPotionIDs, potion.getPotionID())) {
damage = 10;
if (permanentEffects.contains(id)) {
// Remove permanent effects at no cost.
effectsToRemove.add(id);
} else if (lastEffectRemoved == id) {
// We removed this effect last time, player is affected by this permanently.
effectsToRemove.add(id);
permanentEffects.add(id);
} else if (effectRemoved == 0) {
// Actually remove the effect.
effectsToRemove.add(id);
effectRemoved = id;
}
break;
}
}
if (removed) {
for (int effectID : effectsToRemove) {
if (effectID == EFFECT_BURNING) {
player.extinguish();
} else {
player.removePotionEffect(effectID);
}
}
// True if some permanent effects are no longer affecting the player.
boolean permanentRemoved = permanentEffects.retainAll(effectsToRemove);
if (effectRemoved != 0) {
int damage = 1;
if (effectRemoved == Config.potionBlurredID || effectRemoved == Config.potionDeathGazeID
|| effectRemoved == Config.potionInfVisExhaustID
|| effectRemoved == Config.potionSunScornedID
|| effectRemoved == Config.potionUnHungerID) {
damage = 10;
}
par1ItemStack.damageItem(damage, player);
if (par1ItemStack.getItemDamage() <= 0) {
BaublesApi.getBaubles((EntityPlayer) player).setInventorySlotContents(0, null); // Slot 0 =
// Talisman
// Slot
if (par1ItemStack.stackSize <= 0) {
// Slot 0 = talisman slot.
BaublesApi.getBaubles((EntityPlayer) player).setInventorySlotContents(0, null);
}
}
if (effectRemoved != 0 || permanentRemoved) {
par2World.playSoundAtEntity(player, "thaumcraft:wand", 0.3F, 0.1F);
}
lastEffectRemoved = effectRemoved;
mLastEffectRemoved.put(uuid, lastEffectRemoved);
}
}
}
@@ -13,7 +13,11 @@ import thaumcraft.common.config.ConfigBlocks;
import thaumcraft.common.config.ConfigItems;
import thaumic.tinkerer.common.lib.LibItemNames;
import thaumic.tinkerer.common.lib.LibResearch;
import thaumic.tinkerer.common.registry.*;
import thaumic.tinkerer.common.registry.ItemBase;
import thaumic.tinkerer.common.registry.ThaumicTinkererCraftingBenchRecipe;
import thaumic.tinkerer.common.registry.ThaumicTinkererInfusionRecipe;
import thaumic.tinkerer.common.registry.ThaumicTinkererRecipe;
import thaumic.tinkerer.common.registry.ThaumicTinkererRecipeMulti;
import thaumic.tinkerer.common.research.IRegisterableResearch;
public class ItemInfusedInkwell extends ItemBase implements IScribeTools {
@@ -19,7 +19,11 @@ import thaumic.tinkerer.common.block.tile.TileSummon;
import thaumic.tinkerer.common.core.helper.NumericAspectHelper;
import thaumic.tinkerer.common.lib.LibItemNames;
import thaumic.tinkerer.common.lib.LibResearch;
import thaumic.tinkerer.common.registry.*;
import thaumic.tinkerer.common.registry.ItemBase;
import thaumic.tinkerer.common.registry.ThaumicTinkererCraftingBenchRecipe;
import thaumic.tinkerer.common.registry.ThaumicTinkererInfusionRecipe;
import thaumic.tinkerer.common.registry.ThaumicTinkererRecipe;
import thaumic.tinkerer.common.registry.ThaumicTinkererRecipeMulti;
import thaumic.tinkerer.common.research.IRegisterableResearch;
public class ItemMobAspect extends ItemBase {
@@ -1,6 +1,5 @@
package thaumic.tinkerer.common.item;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
@@ -17,9 +16,12 @@ import net.minecraftforge.common.util.Constants;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.research.ResearchPage;
import thaumcraft.common.Thaumcraft;
import thaumcraft.common.config.ConfigItems;
import thaumcraft.common.lib.research.PlayerKnowledge;
import thaumcraft.common.lib.research.ResearchManager;
import thaumic.tinkerer.common.ThaumicTinkerer;
import thaumic.tinkerer.common.core.handler.ConfigHandler;
@@ -36,7 +38,9 @@ import thaumic.tinkerer.common.research.TTResearchItem;
public class ItemShareBook extends ItemBase {
private static final String TAG_PLAYER = "player";
private static final String NON_ASIGNED = "[none]";
private static final String TAG_RESEARCH = "research";
private static final String TAG_ASPECTS = "aspects";
private static final String NON_ASSIGNED = "[none]";
public ItemShareBook() {
super();
@@ -83,44 +87,57 @@ public class ItemShareBook extends ItemBase {
}
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
String name = getPlayerName(par1ItemStack);
if (name.endsWith(NON_ASIGNED)) {
setPlayerName(par1ItemStack, par3EntityPlayer.getGameProfile().getName());
setPlayerResearch(par1ItemStack, par3EntityPlayer.getGameProfile().getName());
if (!par2World.isRemote)
par3EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.shareTome.write"));
} else sync: {
List<String> researchesDone = ResearchManager.getResearchForPlayer(name);
if (researchesDone == null) {
if (par2World.isRemote) researchesDone = getPlayerResearch(par1ItemStack);
else {
par3EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.shareTome.sync"));
break sync;
}
public ItemStack onItemRightClick(ItemStack bookStack, World world, EntityPlayer player) {
String name = getPlayerName(bookStack);
if (name.endsWith(NON_ASSIGNED)) {
setPlayerName(bookStack, player.getGameProfile().getName());
savePlayerResearch(ItemNBTHelper.getNBT(bookStack), player.getGameProfile().getName());
if (!world.isRemote) {
player.addChatMessage(new ChatComponentTranslation("ttmisc.shareTome.write"));
}
} else {
// Try to load latest research for the saved player, fall back to the stored NBT if it fails.
final NBTTagCompound researchSource;
if (ResearchManager.getResearchForPlayer(name) != null) {
researchSource = new NBTTagCompound();
savePlayerResearch(researchSource, name);
} else {
researchSource = ItemNBTHelper.getNBT(bookStack);
}
for (String key : researchesDone)
ThaumicTinkerer.tcProxy.getResearchManager().completeResearch(par3EntityPlayer, key);
loadPlayerResearch(researchSource, player);
if (!par2World.isRemote)
par3EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.shareTome.sync"));
if (!world.isRemote) {
player.addChatMessage(new ChatComponentTranslation("ttmisc.shareTome.sync"));
}
}
return par1ItemStack;
return bookStack;
}
private List<String> getPlayerResearch(ItemStack par1ItemStack) {
List<String> retVals = new ArrayList<>();
NBTTagCompound cmp = ItemNBTHelper.getNBT(par1ItemStack);
if (!cmp.hasKey("research")) return retVals;
NBTTagList list = cmp.getTagList("research", Constants.NBT.TAG_STRING);
for (int i = 0; i < list.tagCount(); i++) {
retVals.add(list.getStringTagAt(i));
private void loadPlayerResearch(NBTTagCompound cmp, EntityPlayer player) {
// Ensure full TC player data gets loaded
final String playerName = player.getGameProfile().getName();
ResearchManager.getResearchForPlayer(playerName);
if (cmp.hasKey(TAG_RESEARCH)) {
final NBTTagList list = cmp.getTagList(TAG_RESEARCH, Constants.NBT.TAG_STRING);
for (int i = 0; i < list.tagCount(); i++) {
final String research = list.getStringTagAt(i);
ThaumicTinkerer.tcProxy.getResearchManager().completeResearch(player, research);
}
}
if (cmp.hasKey(TAG_ASPECTS)) {
final PlayerKnowledge pk = ThaumicTinkerer.tcProxy.getPlayerKnowledge();
final NBTTagList list = cmp.getTagList(TAG_ASPECTS, Constants.NBT.TAG_STRING);
for (int i = 0; i < list.tagCount(); i++) {
final String aspectTag = list.getStringTagAt(i);
final Aspect aspect = Aspect.getAspect(aspectTag);
if (aspect != null) {
pk.addDiscoveredAspect(playerName, aspect);
}
}
ResearchManager.scheduleSave(player);
}
return retVals;
}
@Override
@@ -134,7 +151,7 @@ public class ItemShareBook extends ItemBase {
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
String name = getPlayerName(par1ItemStack);
par3List.add(
name.equals(NON_ASIGNED) ? StatCollector.translateToLocal("ttmisc.shareTome.noAssign")
name.equals(NON_ASSIGNED) ? StatCollector.translateToLocal("ttmisc.shareTome.noAssign")
: String.format(StatCollector.translateToLocal("ttmisc.shareTome.playerName"), name));
}
@@ -144,21 +161,32 @@ public class ItemShareBook extends ItemBase {
}
private String getPlayerName(ItemStack stack) {
return ItemNBTHelper.getString(stack, TAG_PLAYER, NON_ASIGNED);
return ItemNBTHelper.getString(stack, TAG_PLAYER, NON_ASSIGNED);
}
private void setPlayerName(ItemStack stack, String playerName) {
ItemNBTHelper.setString(stack, TAG_PLAYER, playerName);
}
private void setPlayerResearch(ItemStack stack, String playername) {
List<String> researchesDone = ResearchManager.getResearchForPlayer(playername);
NBTTagCompound cmp = ItemNBTHelper.getNBT(stack);
NBTTagList list = new NBTTagList();
for (String tag : researchesDone) {
list.appendTag(new NBTTagString(tag));
private void savePlayerResearch(NBTTagCompound target, String playername) {
// also loads the aspect list
final List<String> researchesDone = ResearchManager.getResearchForPlayer(playername);
// Save all unlocked research notes.
final NBTTagList researchList = new NBTTagList();
for (final String tag : researchesDone) {
researchList.appendTag(new NBTTagString(tag));
}
cmp.setTag("research", list);
target.setTag(TAG_RESEARCH, researchList);
// Save all discovered aspect types.
final PlayerKnowledge pk = Thaumcraft.proxy.getPlayerKnowledge();
final NBTTagList aspectsToSave = new NBTTagList();
final AspectList aspectsDiscovered = pk.getAspectsDiscovered(playername);
if (aspectsDiscovered == null) {
return;
}
aspectsDiscovered.aspects.keySet().stream().map(Aspect::getTag).sorted().map(NBTTagString::new)
.forEach(aspectsToSave::appendTag);
target.setTag(TAG_ASPECTS, aspectsToSave);
}
@Override
@@ -11,7 +11,7 @@
*/
package thaumic.tinkerer.common.item;
import java.awt.*;
import java.awt.Color;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
@@ -32,8 +32,16 @@ import thaumic.tinkerer.common.core.handler.ConfigHandler;
import thaumic.tinkerer.common.core.proxy.TTCommonProxy;
import thaumic.tinkerer.common.lib.LibItemNames;
import thaumic.tinkerer.common.lib.LibResearch;
import thaumic.tinkerer.common.registry.*;
import thaumic.tinkerer.common.research.*;
import thaumic.tinkerer.common.registry.ItemKamiBase;
import thaumic.tinkerer.common.registry.ThaumicTinkererArcaneRecipe;
import thaumic.tinkerer.common.registry.ThaumicTinkererInfusionRecipe;
import thaumic.tinkerer.common.registry.ThaumicTinkererRecipe;
import thaumic.tinkerer.common.registry.ThaumicTinkererRecipeMulti;
import thaumic.tinkerer.common.research.IRegisterableResearch;
import thaumic.tinkerer.common.research.KamiResearchItem;
import thaumic.tinkerer.common.research.ResearchHelper;
import thaumic.tinkerer.common.research.TTResearchItem;
import thaumic.tinkerer.common.research.TTResearchItemMulti;
public class ItemKamiResource extends ItemKamiBase {
@@ -11,7 +11,11 @@ import net.minecraft.init.Items;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.*;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@@ -67,11 +67,13 @@ public class ItemGemBoots extends ItemIchorclothArmorAdv {
player.jumpMovementFactor = player.isSprinting() ? 0.05F : 0.04F;
player.fallDistance = 0F;
int x = (int) player.posX;
int y = (int) player.posY - 1;
int z = (int) player.posZ;
if (player.worldObj.getBlock(x, y, z) == Blocks.dirt && player.worldObj.getBlockMetadata(x, y, z) == 0)
player.worldObj.setBlock(x, y, z, Blocks.grass, 0, 2);
if (ConfigHandler.shouldKamiBootsDoGrass) {
int x = (int) player.posX;
int y = (int) player.posY - 1;
int z = (int) player.posZ;
if (player.worldObj.getBlock(x, y, z) == Blocks.dirt && player.worldObj.getBlockMetadata(x, y, z) == 0)
player.worldObj.setBlock(x, y, z, Blocks.grass, 0, 2);
}
}
@Override
@@ -13,6 +13,7 @@ package thaumic.tinkerer.common.item.kami.armor;
import java.util.ArrayList;
import java.util.List;
import java.util.WeakHashMap;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.EntityLivingBase;
@@ -45,6 +46,8 @@ import thaumic.tinkerer.common.research.ResearchHelper;
public class ItemGemChest extends ItemIchorclothArmorAdv {
public static List<String> playersWithFlight = new ArrayList<>();
// Map to Object because ModelBiped is client-only
private static final WeakHashMap<EntityLivingBase, Object> armorModels = new WeakHashMap<>();
public ItemGemChest() {
super(1);
@@ -65,7 +68,7 @@ public class ItemGemChest extends ItemIchorclothArmorAdv {
@Override
@SideOnly(Side.CLIENT)
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
return new ModelWings();
return (ModelWings) armorModels.computeIfAbsent(entityLiving, ignored -> new ModelWings());
}
@Override
@@ -85,7 +85,9 @@ public class ItemGemLegs extends ItemIchorclothArmorAdv {
if (player.isBurning()) player.heal(0.5F);
addPotionEffect(player, Potion.fireResistance, 119, -1);
setNearBrightNitor(player);
if (ConfigHandler.shouldKamiLegsDoLightFeature) {
setNearBrightNitor(player);
}
}
}
@@ -37,10 +37,10 @@ import thaumic.tinkerer.common.research.ResearchHelper;
public class ItemFocusShadowbeam extends ItemModKamiFocus {
private static final AspectList visUsage = new AspectList().add(Aspect.ORDER, 500).add(Aspect.ENTROPY, 500)
.add(Aspect.AIR, 300);
private static final AspectList visUsage = new AspectList().add(Aspect.ORDER, ConfigHandler.visShadowbeamOrder)
.add(Aspect.ENTROPY, ConfigHandler.visShadowbeamEntropy).add(Aspect.AIR, ConfigHandler.visShadowbeamAir);
private static final int DAMAGE = 100;
private static final int DAMAGE = ConfigHandler.baseDamageShadowbeam;
public ItemFocusShadowbeam() {
super();
@@ -1,6 +1,6 @@
package thaumic.tinkerer.common.item.kami.foci;
import java.awt.*;
import java.awt.Color;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
@@ -24,7 +24,11 @@ import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.network.play.client.C07PacketPlayerDigging;
import net.minecraft.network.play.server.S23PacketBlockChange;
import net.minecraft.util.*;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.StatCollector;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.event.world.BlockEvent;
@@ -11,11 +11,13 @@
*/
package thaumic.tinkerer.common.lib;
import thaumic.tinkerer.Tags;
public final class LibMisc {
public static final String MOD_ID = "ThaumicTinkerer";
public static final String MOD_NAME = "Thaumic Tinkerer";
public static final String VERSION = "GRADLETOKEN_VERSION";
public static final String VERSION = Tags.VERSION;
public static final String NETWORK_CHANNEL = MOD_ID;
@@ -16,7 +16,11 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import cpw.mods.fml.common.network.IGuiHandler;
import thaumic.tinkerer.client.gui.*;
import thaumic.tinkerer.client.gui.GuiAnimationTablet;
import thaumic.tinkerer.client.gui.GuiAspectAnalyzer;
import thaumic.tinkerer.client.gui.GuiEnchanting;
import thaumic.tinkerer.client.gui.GuiMobMagnet;
import thaumic.tinkerer.client.gui.GuiRemotePlacer;
import thaumic.tinkerer.client.gui.kami.GuiIchorPouch;
import thaumic.tinkerer.client.gui.kami.GuiWarpGate;
import thaumic.tinkerer.client.gui.kami.GuiWarpGateDestinations;
@@ -24,7 +28,11 @@ import thaumic.tinkerer.common.block.tile.TileAspectAnalyzer;
import thaumic.tinkerer.common.block.tile.TileEnchanter;
import thaumic.tinkerer.common.block.tile.TileMobMagnet;
import thaumic.tinkerer.common.block.tile.TileRPlacer;
import thaumic.tinkerer.common.block.tile.container.*;
import thaumic.tinkerer.common.block.tile.container.ContainerAnimationTablet;
import thaumic.tinkerer.common.block.tile.container.ContainerAspectAnalyzer;
import thaumic.tinkerer.common.block.tile.container.ContainerEnchanter;
import thaumic.tinkerer.common.block.tile.container.ContainerMobMagnet;
import thaumic.tinkerer.common.block.tile.container.ContainerRemotePlacer;
import thaumic.tinkerer.common.block.tile.container.kami.ContainerIchorPouch;
import thaumic.tinkerer.common.block.tile.container.kami.ContainerWarpGate;
import thaumic.tinkerer.common.block.tile.kami.TileWarpGate;
@@ -440,7 +440,7 @@ ttresearch.page.REVEALING_HELM.0=As it turns out, goggles don't offer much prote
# -- THAUMIC REHABILITATOR
ttresearch.name.REPAIRER=Thaumic Restorer
ttresearch.lore.REPAIRER=Undoing the damage you've done
ttresearch.page.REPAIRER.0=You created a new contraption to restore broken tools. By right clicking this block with a broken tool and hooking it to essentia tubes, it'll gather essentia to repair the tool.<BR><BR>The essentia that will repair, items is Instrumentum.<BR><BR>Looking at the block with goggles of revealing also shows how worn down the item in it still is. Redstone current will be emitted while an item is being repaired.
ttresearch.page.REPAIRER.0=You created a new contraption to restore broken tools. By right clicking this block with a broken tool and hooking it to essentia tubes, it'll gather essentia to repair the tool.<BR><BR>The essentia that will repair items is Instrumentum.<BR><BR>Looking at the block with goggles of revealing also shows how worn down the item in it still is. Redstone current will be emitted while an item is being repaired.
# -- WAND FOCUS: DISTORTION
ttresearch.name.FOCUS_DEFLECT=Wand Focus: Distortion
@@ -441,7 +441,7 @@ ttresearch.page.REVEALING_HELM.0=As it turns out, goggles don't offer much prote
# -- THAUMIC REHABILITATOR
ttresearch.name.REPAIRER=Réparateur thaumique
ttresearch.lore.REPAIRER=L'outil du parfait Patrick
ttresearch.page.REPAIRER.0=You created a new contraption to restore broken tools. By right clicking this block with a broken tool and hooking it to essentia tubes, it'll gather essentia to repair the tool.<BR><BR>The essentia that will repair, items is Instrumentum.<BR><BR>Looking at the block with goggles of revealing also shows how worn down the item in it still is. Redstone current will be emitted while an item is being repaired.
ttresearch.page.REPAIRER.0=You created a new contraption to restore broken tools. By right clicking this block with a broken tool and hooking it to essentia tubes, it'll gather essentia to repair the tool.<BR><BR>The essentia that will repair items is Instrumentum.<BR><BR>Looking at the block with goggles of revealing also shows how worn down the item in it still is. Redstone current will be emitted while an item is being repaired.
# -- WAND FOCUS: DISTORTION
ttresearch.name.FOCUS_DEFLECT=Foci de baguette: Distortion