mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-27 07:13:14 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09fbb5574b | ||
|
|
559e2439b2 | ||
|
|
ef17235ae5 | ||
|
|
efe1e6044a | ||
|
|
14a4825e33 | ||
|
|
f5791ff631 | ||
|
|
ead07b752b | ||
|
|
d821098d4e | ||
|
|
8762c24331 | ||
|
|
a1f62e0db6 | ||
|
|
242312bee5 | ||
|
|
c0b4b797c8 | ||
|
|
bd584c6d52 | ||
|
|
ac50cfc691 | ||
|
|
7e607b4c58 | ||
|
|
e629d04310 | ||
|
|
52b4415e8c | ||
|
|
3f9641b861 | ||
|
|
1fd6ac323b | ||
|
|
38f2dbb395 | ||
|
|
84e41cc920 | ||
|
|
5bfdabb5f6 | ||
|
|
2e95450cf0 | ||
|
|
8ff0421f55 | ||
|
|
ba0a0e3357 | ||
|
|
222ad1645e | ||
|
|
7b48d96988 | ||
|
|
baa2336b58 | ||
|
|
1341be8f49 | ||
|
|
89eaa78e51 | ||
|
|
a7d6f8e59b | ||
|
|
6c18cd1bee | ||
|
|
fcddb56254 | ||
|
|
4a185d64cb | ||
|
|
e14b1f23c9 | ||
|
|
0b70f3ed51 | ||
|
|
1c8ceacb7f | ||
|
|
3037e0f583 | ||
|
|
269eff14d3 | ||
|
|
ff2f889c76 | ||
|
|
3218730853 | ||
|
|
e5662ec707 | ||
|
|
6376f78aa5 | ||
|
|
581d497c9b | ||
|
|
480e168dc8 | ||
|
|
748552a3a5 |
No files matched your search
@@ -1,27 +0,0 @@
|
||||
if [[ -d "run/crash-reports" ]]; then
|
||||
echo "Crash reports detected:"
|
||||
cat $directory/*
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if grep --quiet "Fatal errors were detected" server.log; then
|
||||
echo "Fatal errors detected:"
|
||||
cat server.log
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if grep --quiet "The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED" server.log; then
|
||||
echo "Server force stopped:"
|
||||
cat server.log
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if grep --quiet 'Done .+ For help, type "help" or "?"' server.log; then
|
||||
echo "Server didn't finish startup:"
|
||||
cat server.log
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "No crash reports detected"
|
||||
exit 0
|
||||
|
||||
@@ -27,3 +27,4 @@ whitelist.json
|
||||
*.iws
|
||||
src/main/resources/mixins.*.json
|
||||
*.bat
|
||||
layout.json
|
||||
+2
-1432
File diff suppressed because it is too large.
Load diff
+11
-12
@@ -23,20 +23,19 @@
|
||||
*/
|
||||
|
||||
dependencies {
|
||||
api("com.github.GTNewHorizons:waila:1.5.24:dev")
|
||||
api("com.github.GTNewHorizons:CodeChickenLib:1.1.8:dev")
|
||||
api("com.github.GTNewHorizons:NotEnoughItems:2.3.43-GTNH:dev")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.42.51:dev") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Botania:1.9.16-GTNH:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.6.5:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForgeMultipart:1.3.2:dev") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Chisel:2.10.17-GTNH:api") {transitive = false }
|
||||
api("com.github.GTNewHorizons:waila:1.8.4:dev")
|
||||
api("com.github.GTNewHorizons:NotEnoughItems:2.7.40-GTNH:dev")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.254:dev") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Botania:1.12.6-GTNH:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.10.7:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForgeMultipart:1.6.2:dev") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Chisel:2.16.2-GTNH:api") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:ZenScript:1.0.0-GTNH") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:CraftTweaker:3.2.11:dev") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:CraftTweaker:3.4.1:dev") {transitive = false }
|
||||
|
||||
compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") {transitive = false }
|
||||
compileOnly("curse.maven:guide-api-228832:2287185") {transitive = false }
|
||||
|
||||
+166
-27
@@ -1,64 +1,203 @@
|
||||
modName = Blood Magic: Alchemical Wizardry
|
||||
# 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
|
||||
|
||||
# This is a case-sensitive string to identify your mod. Convention is to use lower case.
|
||||
# Human-readable mod name, available for mcmod.info population.
|
||||
modName = Blood Magic\: Alchemical Wizardry
|
||||
|
||||
# Case-sensitive identifier string, available for mcmod.info population and used for automatic mixin JSON generation.
|
||||
# Conventionally lowercase.
|
||||
modId = AWWayofTime
|
||||
|
||||
# Root package of the mod, used to find various classes in other properties,
|
||||
# mcmod.info substitution, enabling assertions in run tasks, etc.
|
||||
modGroup = WayofTime.alchemicalWizardry
|
||||
|
||||
# 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"
|
||||
|
||||
# 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 = AlchemicalWizardry.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 = WayofTime.alchemicalWizardry.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 =
|
||||
|
||||
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise you can
|
||||
# [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. I must be placed into /src/main/resources/META-INF/
|
||||
# Example value: mymodid_at.cfg
|
||||
accessTransformersFile =
|
||||
# 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 = NEI_at.cfg
|
||||
|
||||
# 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!
|
||||
mixinsPackage =
|
||||
|
||||
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
||||
# This parameter is for legacy compatability only
|
||||
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
|
||||
# This parameter is for legacy compatibility only
|
||||
# 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: 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 = BloodMagic
|
||||
|
||||
# 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
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+2
-1
@@ -1,6 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -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
|
||||
@@ -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,11 +200,15 @@ 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" \
|
||||
|
||||
Vendored
+12
-10
@@ -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
|
||||
|
||||
|
||||
@@ -1,11 +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/"
|
||||
}
|
||||
maven {
|
||||
url "https://cursemaven.com"
|
||||
}
|
||||
}
|
||||
+5
-10
@@ -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.38'
|
||||
}
|
||||
|
||||
blowdryerSetup {
|
||||
repoSubfolder 'gtnhShared'
|
||||
github('GTNewHorizons/ExampleMod1.7.10', 'tag', '0.2.0')
|
||||
//devLocal '.' // Use this when testing config updates locally
|
||||
}
|
||||
|
||||
@@ -36,10 +36,6 @@ import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import thaumcraft.api.ItemApi;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import WayofTime.alchemicalWizardry.api.BlockStack;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
@@ -118,7 +114,6 @@ import WayofTime.alchemicalWizardry.common.items.ItemIncense;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemMailOrderCatalogue;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner;
|
||||
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour;
|
||||
import WayofTime.alchemicalWizardry.common.items.forestry.ItemBloodFrame;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.holding.HoldingPacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.items.thaumcraft.ItemSanguineArmour;
|
||||
import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmEarth;
|
||||
@@ -255,7 +250,8 @@ import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport;
|
||||
import WayofTime.alchemicalWizardry.common.spell.simple.SpellWateryGrave;
|
||||
import WayofTime.alchemicalWizardry.common.spell.simple.SpellWindGust;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.SummoningHelperAW;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.Meteor;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar;
|
||||
@@ -297,17 +293,23 @@ import cpw.mods.fml.common.event.FMLServerStartingEvent;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import thaumcraft.api.ItemApi;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
|
||||
@Mod(
|
||||
modid = "AWWayofTime",
|
||||
name = "AlchemicalWizardry",
|
||||
version = "GRADLETOKEN_VERSION",
|
||||
version = Tags.VERSION,
|
||||
dependencies = "after:CodeChickenLib@[1.1.5.7,);" + "after:NotEnoughItems@[2.3.20-GTNH,)",
|
||||
guiFactory = "WayofTime.alchemicalWizardry.client.gui.ConfigGuiFactory")
|
||||
public class AlchemicalWizardry {
|
||||
|
||||
public static boolean parseTextFiles = false;
|
||||
|
||||
public static int defaultMeteorCost = 1000000;
|
||||
public static String defaultMeteorBlock;
|
||||
public static boolean doMeteorsDestroyBlocks = true;
|
||||
public static String[] allowedCrushedOresArray;
|
||||
|
||||
@@ -621,35 +623,12 @@ public class AlchemicalWizardry {
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
File bmDirectory = new File("config/BloodMagic/schematics");
|
||||
|
||||
if (!bmDirectory.exists() && bmDirectory.mkdirs()) {
|
||||
try {
|
||||
InputStream in = AlchemicalWizardry.class
|
||||
.getResourceAsStream("/assets/alchemicalwizardry/schematics/building/buildings.zip");
|
||||
logger.info("none yet!");
|
||||
if (in != null) {
|
||||
logger.info("I have found a zip!");
|
||||
ZipInputStream zipStream = new ZipInputStream(in);
|
||||
ZipEntry entry;
|
||||
|
||||
while ((entry = zipStream.getNextEntry()) != null) {
|
||||
File file = new File(bmDirectory, entry.getName());
|
||||
if (file.exists() && file.length() > 3L) {
|
||||
continue;
|
||||
}
|
||||
FileOutputStream out = new FileOutputStream(file);
|
||||
|
||||
byte[] buffer = new byte[8192];
|
||||
int len;
|
||||
while ((len = zipStream.read(buffer)) != -1) {
|
||||
out.write(buffer, 0, len);
|
||||
}
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {}
|
||||
}
|
||||
generateDefaultConfig(
|
||||
"config/BloodMagic/schematics",
|
||||
"/assets/alchemicalwizardry/schematics/building/buildings.zip");
|
||||
generateDefaultConfig("config/BloodMagic/meteors", "/assets/alchemicalwizardry/meteors/meteors.zip");
|
||||
generateDefaultConfig("config/BloodMagic/meteors/reagents", "/assets/alchemicalwizardry/meteors/reagents.zip");
|
||||
|
||||
TEDemonPortal.loadBuildingList();
|
||||
|
||||
@@ -708,6 +687,42 @@ public class AlchemicalWizardry {
|
||||
ModAchievements.init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to generate default configs at the given destination using a zip located at the given source.
|
||||
*
|
||||
* @param destination The destination path for the config, starting inside .minecraft.
|
||||
* @param source The source path for the config's zip, starting in src/main/resources/
|
||||
*/
|
||||
private static void generateDefaultConfig(String destination, String source) {
|
||||
File destinationDirectory = new File(destination);
|
||||
if (!destinationDirectory.exists() && destinationDirectory.mkdirs()) {
|
||||
try {
|
||||
InputStream in = AlchemicalWizardry.class.getResourceAsStream(source);
|
||||
logger.info("Attempting to load default config for {}", destinationDirectory);
|
||||
if (in != null) {
|
||||
logger.info("Unpacking zip found at {}", source);
|
||||
ZipInputStream zipStream = new ZipInputStream(in);
|
||||
ZipEntry entry;
|
||||
|
||||
while ((entry = zipStream.getNextEntry()) != null) {
|
||||
File file = new File(destinationDirectory, entry.getName());
|
||||
if (file.exists() && file.length() > 3L) {
|
||||
continue;
|
||||
}
|
||||
FileOutputStream out = new FileOutputStream(file);
|
||||
|
||||
byte[] buffer = new byte[8192];
|
||||
int len;
|
||||
while ((len = zipStream.read(buffer)) != -1) {
|
||||
out.write(buffer, 0, len);
|
||||
}
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void load(FMLInitializationEvent event) {
|
||||
int craftingConstant = OreDictionary.WILDCARD_VALUE;
|
||||
@@ -719,8 +734,9 @@ public class AlchemicalWizardry {
|
||||
proxy.registerEntities();
|
||||
proxy.registerEntityTrackers();
|
||||
proxy.registerEvents();
|
||||
BloodMagicWailaPlugin.init();
|
||||
|
||||
if (Loader.isModLoaded("Waila")) {
|
||||
BloodMagicWailaPlugin.init();
|
||||
}
|
||||
// ItemStacks used for crafting go here
|
||||
ItemStack lapisStack = new ItemStack(Items.dye, 1, 4);
|
||||
ItemStack lavaBucketStack = new ItemStack(Items.lava_bucket);
|
||||
@@ -767,6 +783,7 @@ public class AlchemicalWizardry {
|
||||
ItemStack bloodRuneCraftedStack = new ItemStack(ModBlocks.bloodRune, 1);
|
||||
ItemStack bloodRuneStack = new ItemStack(ModBlocks.bloodRune);
|
||||
ItemStack speedRuneStack = new ItemStack(ModBlocks.speedRune);
|
||||
ItemStack accelerationRuneStack = new ItemStack(ModBlocks.bloodRune, 1, 5);
|
||||
ItemStack runeOfSacrificeStack = new ItemStack(ModBlocks.runeOfSacrifice);
|
||||
ItemStack runeOfSelfSacrificeStack = new ItemStack(ModBlocks.runeOfSelfSacrifice);
|
||||
ItemStack miningSigilStackCrafted = new ItemStack(ModItems.sigilOfTheFastMiner);
|
||||
@@ -2426,6 +2443,21 @@ public class AlchemicalWizardry {
|
||||
'o',
|
||||
obsidianStack));
|
||||
|
||||
GameRegistry.addRecipe(
|
||||
new ShapedBloodOrbRecipe(
|
||||
new ItemStack(ModBlocks.bloodRune, 1, 6),
|
||||
"eae",
|
||||
"sos",
|
||||
"eae",
|
||||
'e',
|
||||
etherealSlateStack,
|
||||
's',
|
||||
speedRuneStack,
|
||||
'a',
|
||||
accelerationRuneStack,
|
||||
'o',
|
||||
archmageBloodOrbStack));
|
||||
|
||||
AlchemyRecipeRegistry.registerRecipe(
|
||||
crackedRunicPlateStackCrafted,
|
||||
10,
|
||||
@@ -3279,27 +3311,6 @@ public class AlchemicalWizardry {
|
||||
registerBMBook();
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("Forestry")) {
|
||||
isForestryLoaded = true;
|
||||
|
||||
ModItems.itemBloodFrame = new ItemBloodFrame().setUnlocalizedName("bloodFrame");
|
||||
|
||||
ItemStack provenFrame = GameRegistry.findItemStack("Forestry", "frameImpregnated", 1);
|
||||
|
||||
if (provenFrame != null) {
|
||||
AltarRecipeRegistry.registerAltarRecipe(
|
||||
new ItemStack(ModItems.itemBloodFrame),
|
||||
provenFrame,
|
||||
3,
|
||||
30000,
|
||||
20,
|
||||
20,
|
||||
false);
|
||||
}
|
||||
} else {
|
||||
isForestryLoaded = false;
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("harvestcraft")) {
|
||||
PamHarvestCompatRegistry.registerPamHandlers();
|
||||
AlchemicalWizardry.logger.info("Loaded Harvestcraft Handlers!");
|
||||
@@ -3325,7 +3336,9 @@ public class AlchemicalWizardry {
|
||||
BloodMagicConfiguration.loadCustomLPValues();
|
||||
|
||||
DemonVillageLootRegistry.init();
|
||||
Meteor.loadConfig();
|
||||
|
||||
MeteorRegistry.loadConfig();
|
||||
MeteorReagentRegistry.loadConfig();
|
||||
|
||||
this.initCompressionHandlers();
|
||||
}
|
||||
@@ -4509,7 +4522,7 @@ public class AlchemicalWizardry {
|
||||
return strings;
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
@EventHandler
|
||||
public void initCommands(FMLServerStartingEvent event) {
|
||||
event.registerServerCommand(new CommandBloodMagic());
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.DemonVillagePath;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal;
|
||||
import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorComponent;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -102,6 +103,23 @@ public class BloodMagicConfiguration {
|
||||
|
||||
AlchemicalWizardry.doMeteorsDestroyBlocks = config.get("meteor", "doMeteorsDestroyBlocks", true)
|
||||
.getBoolean(true);
|
||||
AlchemicalWizardry.defaultMeteorCost = config.getInt(
|
||||
"defaultMeteorCost",
|
||||
"meteor",
|
||||
1000000,
|
||||
0,
|
||||
Integer.MAX_VALUE,
|
||||
"The default LP cost to use for meteors if the \"cost\" property is not present in its config file.\n");
|
||||
AlchemicalWizardry.defaultMeteorBlock = config.getString(
|
||||
"defaultMeteorBlock",
|
||||
"meteor",
|
||||
"",
|
||||
"The block to use for filler in meteors if none is provided in the meteor's config file and "
|
||||
+ "that\nmeteor's fillerChance is greater than 0. Also used as a fallback for empty ore "
|
||||
+ "lists in meteor configs.\nSpecify the block with the "
|
||||
+ "format:\n\"modId:itemName:meta\"\nDefaults to minecraft:stone:0 if no block is provided or "
|
||||
+ "the provided block cannot be found.");
|
||||
MeteorComponent.setDefaultMeteorBlock();
|
||||
AlchemicalWizardry.allowedCrushedOresArray = config.get(
|
||||
"oreCrushing",
|
||||
"allowedOres",
|
||||
@@ -611,41 +629,55 @@ public class BloodMagicConfiguration {
|
||||
new BlockStack(ModBlocks.efficiencyRune, 0), new BlockStack(ModBlocks.runeOfSacrifice, 0),
|
||||
new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), new BlockStack(ModBlocks.bloodRune, 1),
|
||||
new BlockStack(ModBlocks.bloodRune, 2), new BlockStack(ModBlocks.bloodRune, 3),
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5) });
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5),
|
||||
new BlockStack(ModBlocks.bloodRune, 6) });
|
||||
AlchemicalWizardry.thirdTierRunes = BloodMagicConfiguration.getAltarRunesForTier(
|
||||
"thirdTier",
|
||||
new BlockStack[] { new BlockStack(ModBlocks.bloodRune, 0), new BlockStack(ModBlocks.speedRune, 0),
|
||||
new BlockStack(ModBlocks.efficiencyRune, 0), new BlockStack(ModBlocks.runeOfSacrifice, 0),
|
||||
new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), new BlockStack(ModBlocks.bloodRune, 1),
|
||||
new BlockStack(ModBlocks.bloodRune, 2), new BlockStack(ModBlocks.bloodRune, 3),
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5) });
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5),
|
||||
new BlockStack(ModBlocks.bloodRune, 6) });
|
||||
AlchemicalWizardry.fourthTierRunes = BloodMagicConfiguration.getAltarRunesForTier(
|
||||
"fourthTier",
|
||||
new BlockStack[] { new BlockStack(ModBlocks.bloodRune, 0), new BlockStack(ModBlocks.speedRune, 0),
|
||||
new BlockStack(ModBlocks.efficiencyRune, 0), new BlockStack(ModBlocks.runeOfSacrifice, 0),
|
||||
new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), new BlockStack(ModBlocks.bloodRune, 1),
|
||||
new BlockStack(ModBlocks.bloodRune, 2), new BlockStack(ModBlocks.bloodRune, 3),
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5) });
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5),
|
||||
new BlockStack(ModBlocks.bloodRune, 6) });
|
||||
AlchemicalWizardry.fifthTierRunes = BloodMagicConfiguration.getAltarRunesForTier(
|
||||
"fifthTier",
|
||||
new BlockStack[] { new BlockStack(ModBlocks.bloodRune, 0), new BlockStack(ModBlocks.speedRune, 0),
|
||||
new BlockStack(ModBlocks.efficiencyRune, 0), new BlockStack(ModBlocks.runeOfSacrifice, 0),
|
||||
new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), new BlockStack(ModBlocks.bloodRune, 1),
|
||||
new BlockStack(ModBlocks.bloodRune, 2), new BlockStack(ModBlocks.bloodRune, 3),
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5) });
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5),
|
||||
new BlockStack(ModBlocks.bloodRune, 6) });
|
||||
AlchemicalWizardry.sixthTierRunes = BloodMagicConfiguration.getAltarRunesForTier(
|
||||
"sixthTier",
|
||||
new BlockStack[] { new BlockStack(ModBlocks.bloodRune, 0), new BlockStack(ModBlocks.speedRune, 0),
|
||||
new BlockStack(ModBlocks.efficiencyRune, 0), new BlockStack(ModBlocks.runeOfSacrifice, 0),
|
||||
new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), new BlockStack(ModBlocks.bloodRune, 1),
|
||||
new BlockStack(ModBlocks.bloodRune, 2), new BlockStack(ModBlocks.bloodRune, 3),
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5) });
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5),
|
||||
new BlockStack(ModBlocks.bloodRune, 6) });
|
||||
AlchemicalWizardry.specialAltarBlock = getAltarRunesForTier(
|
||||
"specialBlocks",
|
||||
new BlockStack[] { new BlockStack(Blocks.stonebrick, 0), new BlockStack(Blocks.glowstone, 0),
|
||||
new BlockStack(Blocks.stonebrick, 0), new BlockStack(ModBlocks.largeBloodStoneBrick, 0),
|
||||
new BlockStack(Blocks.beacon, 0), new BlockStack(Blocks.stonebrick, 0),
|
||||
new BlockStack(ModBlocks.blockCrystal, 0) });
|
||||
new BlockStack[] { new BlockStack(Blocks.air, 0), new BlockStack(Blocks.glowstone, 0),
|
||||
new BlockStack(Blocks.air, 0), new BlockStack(ModBlocks.largeBloodStoneBrick, 0),
|
||||
new BlockStack(Blocks.beacon, 0), new BlockStack(Blocks.air, 0),
|
||||
new BlockStack(ModBlocks.blockCrystal, 0) },
|
||||
"Set the special blocks for the altar with the format mod:block(:meta) in the following order:\n"
|
||||
+ "Tier 3 pillar\n"
|
||||
+ "Tier 3 cap\n"
|
||||
+ "Tier 4 pillar\n"
|
||||
+ "Tier 4 cap\n"
|
||||
+ "Tier 5 beacon\n"
|
||||
+ "Tier 6 pillar\n"
|
||||
+ "Tier 6 cap\n"
|
||||
+ "Set any of these to minecraft:air to allow for that component to be any block EXCEPT air (e.g., let any block be used for a pillar).");
|
||||
config.save();
|
||||
}
|
||||
|
||||
@@ -785,12 +817,16 @@ public class BloodMagicConfiguration {
|
||||
}
|
||||
|
||||
private static BlockStack[] getAltarRunesForTier(String tierName, BlockStack[] defaultValues) {
|
||||
return getAltarRunesForTier(tierName, defaultValues, "");
|
||||
}
|
||||
|
||||
private static BlockStack[] getAltarRunesForTier(String tierName, BlockStack[] defaultValues, String comment) {
|
||||
String[] defaultNames = new String[defaultValues.length];
|
||||
for (int i = 0; i < defaultValues.length; i++) {
|
||||
defaultNames[i] = Block.blockRegistry.getNameForObject(defaultValues[i].getBlock()) + ":"
|
||||
+ defaultValues[i].getMeta();
|
||||
}
|
||||
Property property = config.get("rune overrides", tierName, defaultNames);
|
||||
Property property = config.get("rune overrides", tierName, defaultNames, comment);
|
||||
String[] names = property.getStringList();
|
||||
if (names.length != defaultNames.length) {
|
||||
property.set(defaultNames);
|
||||
|
||||
@@ -6,7 +6,48 @@ import net.minecraft.item.Item;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool;
|
||||
import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.*;
|
||||
import WayofTime.alchemicalWizardry.common.items.AWBaseItems;
|
||||
import WayofTime.alchemicalWizardry.common.items.ActivationCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.items.AirScribeTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.ApprenticeBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.common.items.ArchmageBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.common.items.ArmourInhibitor;
|
||||
import WayofTime.alchemicalWizardry.common.items.BlankSpell;
|
||||
import WayofTime.alchemicalWizardry.common.items.BloodShard;
|
||||
import WayofTime.alchemicalWizardry.common.items.BoundAxe;
|
||||
import WayofTime.alchemicalWizardry.common.items.BoundPickaxe;
|
||||
import WayofTime.alchemicalWizardry.common.items.BoundShovel;
|
||||
import WayofTime.alchemicalWizardry.common.items.CheatyItem;
|
||||
import WayofTime.alchemicalWizardry.common.items.CreativeDagger;
|
||||
import WayofTime.alchemicalWizardry.common.items.DaggerOfSacrifice;
|
||||
import WayofTime.alchemicalWizardry.common.items.DawnScribeTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.DemonPlacer;
|
||||
import WayofTime.alchemicalWizardry.common.items.DemonicTelepositionFocus;
|
||||
import WayofTime.alchemicalWizardry.common.items.DuskScribeTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.EarthScribeTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBazooka;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBlast;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergySword;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnhancedTelepositionFocus;
|
||||
import WayofTime.alchemicalWizardry.common.items.FireScribeTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemAlchemyBase;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemBloodLetterPack;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemComplexSpellCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemComponents;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemDiabloKey;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemIncense;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemRitualDismantler;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner;
|
||||
import WayofTime.alchemicalWizardry.common.items.LavaCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.items.LifeBucket;
|
||||
import WayofTime.alchemicalWizardry.common.items.MagicianBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.common.items.MasterBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.common.items.ReinforcedTelepositionFocus;
|
||||
import WayofTime.alchemicalWizardry.common.items.SacrificialDagger;
|
||||
import WayofTime.alchemicalWizardry.common.items.TelepositionFocus;
|
||||
import WayofTime.alchemicalWizardry.common.items.TranscendentBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.common.items.WaterScribeTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour;
|
||||
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourEarth;
|
||||
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourFire;
|
||||
|
||||
+24
-16
@@ -14,6 +14,7 @@ import WayofTime.alchemicalWizardry.api.event.AddToNetworkEvent;
|
||||
import WayofTime.alchemicalWizardry.api.event.ItemBindEvent;
|
||||
import WayofTime.alchemicalWizardry.api.event.ItemDrainInContainerEvent;
|
||||
import WayofTime.alchemicalWizardry.api.event.ItemDrainNetworkEvent;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
|
||||
@@ -35,11 +36,12 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
public static int getCurrentMaxOrb(String ownerName) {
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
World world = mcServer.worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null) {
|
||||
@@ -51,11 +53,12 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
public static void setMaxOrbToMax(String ownerName, int maxOrb) {
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
World world = mcServer.worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null) {
|
||||
@@ -96,7 +99,7 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
public static int syphonFromNetwork(String ownerName, int damageToBeDone) {
|
||||
MinecraftServer mcServer = MinecraftServer.getServer();
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null || mcServer.worldServers.length == 0) {
|
||||
return 0;
|
||||
}
|
||||
@@ -192,11 +195,12 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
public static boolean canSyphonFromOnlyNetwork(String ownerName, int damageToBeDone) {
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
World world = mcServer.worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null) {
|
||||
@@ -208,11 +212,12 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
public static int getCurrentEssence(String ownerName) {
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
World world = mcServer.worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null) {
|
||||
@@ -224,11 +229,12 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
public static void setCurrentEssence(String ownerName, int essence) {
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
World world = mcServer.worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null) {
|
||||
@@ -255,11 +261,12 @@ public class SoulNetworkHandler {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
World world = mcServer.worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, event.ownerNetwork);
|
||||
|
||||
if (data == null) {
|
||||
@@ -273,7 +280,7 @@ public class SoulNetworkHandler {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int newEss = Math.min(event.maximum, currEss + event.addedAmount);
|
||||
int newEss = (int) Math.min(Integer.MAX_VALUE, Math.min(event.maximum, (long) currEss + event.addedAmount));
|
||||
if (event.getResult() != Event.Result.DENY) {
|
||||
data.currentEssence = newEss;
|
||||
}
|
||||
@@ -348,10 +355,11 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
public static EntityPlayer getPlayerForUsername(String str) {
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null) {
|
||||
return null;
|
||||
}
|
||||
return MinecraftServer.getServer().getConfigurationManager().func_152612_a(str);
|
||||
return mcServer.getConfigurationManager().func_152612_a(str);
|
||||
}
|
||||
|
||||
public static void causeNauseaToPlayer(ItemStack stack) {
|
||||
|
||||
+117
-36
@@ -1,6 +1,7 @@
|
||||
package WayofTime.alchemicalWizardry.client.nei;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -10,14 +11,17 @@ import java.util.stream.Collectors;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigmComponent;
|
||||
import com.google.common.base.Joiner;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.Meteor;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorComponent;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry;
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
@@ -35,44 +39,95 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
private final int radius;
|
||||
private Point focus;
|
||||
|
||||
public CachedMeteorRecipe(MeteorParadigm meteor, ItemStack focusStack) {
|
||||
this.input.add(new PositionedStack(meteor.focusStack, 74, 4));
|
||||
public CachedMeteorRecipe(Meteor meteor, ItemStack focusStack) {
|
||||
this.input.add(new PositionedStack(meteor.focusItem, 74, 4));
|
||||
int row = 0;
|
||||
int col = 0;
|
||||
|
||||
float totalMeteorWeight = meteor.getTotalMeteorWeight();
|
||||
List<MeteorParadigmComponent> sortedComponents = new ArrayList<>(meteor.componentList);
|
||||
sortedComponents.sort(Comparator.comparingInt(c -> -c.chance));
|
||||
float totalComponentWeight = MeteorComponent.getTotalListWeight(meteor.ores);
|
||||
float fillerChance = meteor.fillerChance;
|
||||
List<MeteorComponent> sortedComponents = new ArrayList<>(meteor.ores);
|
||||
sortedComponents.sort(Comparator.comparingInt(c -> -c.getWeight()));
|
||||
|
||||
for (MeteorParadigmComponent component : sortedComponents) {
|
||||
ItemStack stack = component.getValidBlockParadigm();
|
||||
int xPos = 3 + 18 * col;
|
||||
int yPos = 37 + 18 * row;
|
||||
float fillerRatio = (float) (fillerChance / 100.0);
|
||||
float componentRatio = 1 - fillerRatio;
|
||||
|
||||
List<String> tooltips = new ArrayList<>();
|
||||
if (stack == null) {
|
||||
stack = new ItemStack(Blocks.fire);
|
||||
tooltips.add(String.format("no entries found for oredict \"%s\"", component.getOreDictName()));
|
||||
if (fillerChance < 100) {
|
||||
for (MeteorComponent component : sortedComponents) {
|
||||
ItemStack stack = component.getBlock();
|
||||
int xPos = 3 + 18 * col;
|
||||
int yPos = 37 + 18 * row;
|
||||
|
||||
List<String> tooltips = new ArrayList<>();
|
||||
float chance = component.getWeight() / totalComponentWeight * componentRatio;
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.chance", getFormattedChance(chance)));
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.amount", getEstimatedAmount(chance, meteor.radius)));
|
||||
if (!component.getRequiredReagents().isEmpty()) {
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.reagent", getReagentStrings(component)));
|
||||
}
|
||||
this.outputs.add(new TooltipStack(stack, xPos, yPos, tooltips));
|
||||
|
||||
col++;
|
||||
if (col > 8) {
|
||||
col = 0;
|
||||
row++;
|
||||
}
|
||||
|
||||
if (matchItem(focusStack, stack)) {
|
||||
this.focus = new Point(xPos - 1, yPos - 1);
|
||||
}
|
||||
}
|
||||
float chance = component.getChance() / totalMeteorWeight;
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.chance", getFormattedChance(chance)));
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.amount", getEstimatedAmount(chance, meteor.radius)));
|
||||
this.outputs.add(new TooltipStack(stack, xPos, yPos, tooltips));
|
||||
|
||||
col++;
|
||||
if (col > 8) {
|
||||
}
|
||||
if (fillerChance > 0) {
|
||||
if (col != 0) {
|
||||
col = 0;
|
||||
row++;
|
||||
}
|
||||
|
||||
if (focusStack != null && matchItem(focusStack, stack)) {
|
||||
this.focus = new Point(xPos - 1, yPos - 1);
|
||||
List<MeteorComponent> sortedFiller = new ArrayList<>(meteor.filler);
|
||||
sortedFiller.sort(Comparator.comparingInt(c -> -c.getWeight()));
|
||||
float totalFillerWeight = MeteorComponent.getTotalListWeight(meteor.filler);
|
||||
|
||||
for (MeteorComponent filler : sortedFiller) {
|
||||
ItemStack stack = filler.getBlock();
|
||||
int xPos = 3 + 18 * col;
|
||||
int yPos = 37 + 18 * row;
|
||||
|
||||
List<String> tooltips = new ArrayList<>();
|
||||
float chance = filler.getWeight() / totalFillerWeight * fillerRatio;
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.chance", getFormattedChance(chance)));
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.amount", getEstimatedAmount(chance, meteor.radius)));
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.filler"));
|
||||
if (!filler.getRequiredReagents().isEmpty()) {
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.reagent", getReagentStrings(filler)));
|
||||
}
|
||||
this.outputs.add(new TooltipStack(stack, xPos, yPos, tooltips));
|
||||
|
||||
col++;
|
||||
if (col > 8) {
|
||||
col = 0;
|
||||
row++;
|
||||
}
|
||||
|
||||
if (matchItem(focusStack, stack)) {
|
||||
this.focus = new Point(xPos - 1, yPos - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.radius = meteor.radius;
|
||||
this.cost = meteor.cost;
|
||||
}
|
||||
|
||||
private String getReagentStrings(MeteorComponent component) {
|
||||
ArrayList<Reagent> reagents = component.getRequiredReagents();
|
||||
ArrayList<String> reagentNames = new ArrayList<>();
|
||||
for (Reagent r : reagents) {
|
||||
reagentNames.add(r.name);
|
||||
}
|
||||
return Joiner.on(", ").join(reagentNames);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionedStack> getIngredients() {
|
||||
return this.input;
|
||||
@@ -105,7 +160,7 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
if (outputId.equals(getOverlayIdentifier()) && getClass() == NEIMeteorRecipeHandler.class) {
|
||||
for (MeteorParadigm meteor : getSortedMeteors()) {
|
||||
for (Meteor meteor : getSortedMeteors()) {
|
||||
arecipes.add(new CachedMeteorRecipe(meteor, null));
|
||||
}
|
||||
} else {
|
||||
@@ -115,8 +170,11 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
for (MeteorParadigm meteor : getSortedMeteors()) {
|
||||
if (meteor.componentList.stream().anyMatch(m -> matchItem(result, m.getValidBlockParadigm()))) {
|
||||
for (Meteor meteor : getSortedMeteors()) {
|
||||
if (meteor.ores.stream().anyMatch(m -> matchItem(result, m.getBlock()))) {
|
||||
arecipes.add(new CachedMeteorRecipe(meteor, result));
|
||||
}
|
||||
if (meteor.fillerChance > 0 && meteor.filler.stream().anyMatch(m -> matchItem(result, m.getBlock()))) {
|
||||
arecipes.add(new CachedMeteorRecipe(meteor, result));
|
||||
}
|
||||
}
|
||||
@@ -124,8 +182,8 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
for (MeteorParadigm meteor : getSortedMeteors()) {
|
||||
if (matchItem(ingredient, meteor.focusStack)) {
|
||||
for (Meteor meteor : getSortedMeteors()) {
|
||||
if (matchItem(ingredient, meteor.focusItem)) {
|
||||
arecipes.add(new CachedMeteorRecipe(meteor, null));
|
||||
}
|
||||
}
|
||||
@@ -136,11 +194,34 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
if (NEIServerUtils.areStacksSameTypeCrafting(compared, compareTo)) {
|
||||
return true;
|
||||
}
|
||||
// ignore ore variants (like basalt ore)
|
||||
|
||||
// Ignore GregTech ore variants (like basalt ore)
|
||||
if (compared.getUnlocalizedName().startsWith("gt.blockores")
|
||||
&& compareTo.getUnlocalizedName().startsWith("gt.blockores")) {
|
||||
return compared.getItemDamage() % 1000 == compareTo.getItemDamage() % 1000;
|
||||
}
|
||||
|
||||
// Check oredicts for ores. Checks for direct matches (oreIron with oreIron) as well as IC2/GT crushed ores
|
||||
// (crushedGold with oreGold), EFR raw ores (rawCopper with oreCopper (although those all seem to have oreX
|
||||
// anyways)), and GT:NH raw ores (rawOreDiamond with oreDiamond).
|
||||
String[] prefixes = { "crushed", "rawOre", "raw" };
|
||||
for (int i : OreDictionary.getOreIDs(compareTo)) {
|
||||
String s1 = OreDictionary.getOreName(i);
|
||||
if (s1.startsWith("ore")) {
|
||||
for (int j : OreDictionary.getOreIDs(compared)) {
|
||||
if (i == j) {
|
||||
return true;
|
||||
}
|
||||
String s2 = OreDictionary.getOreName(j);
|
||||
for (String prefix : prefixes) {
|
||||
if (i == OreDictionary.getOreID(s2.replaceFirst("^" + prefix, "ore"))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -182,7 +263,7 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
public List<String> handleItemTooltip(GuiRecipe<?> gui, ItemStack stack, List<String> currenttip, int recipe) {
|
||||
CachedMeteorRecipe meteorRecipe = (CachedMeteorRecipe) this.arecipes.get(recipe);
|
||||
for (PositionedStack pStack : meteorRecipe.outputs) {
|
||||
if (!gui.isMouseOver(pStack, recipe)) continue;
|
||||
// if (!gui.isMouseOver(pStack, recipe)) continue; // put it back when NEI is properly patched
|
||||
if (!(pStack instanceof TooltipStack)) break;
|
||||
|
||||
TooltipStack tStack = (TooltipStack) pStack;
|
||||
@@ -199,8 +280,8 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
return I18n.format("nei.recipe.meteor.category");
|
||||
}
|
||||
|
||||
private List<MeteorParadigm> getSortedMeteors() {
|
||||
return MeteorRegistry.paradigmList.stream().sorted(Comparator.comparing(m -> m.cost))
|
||||
private List<Meteor> getSortedMeteors() {
|
||||
return MeteorRegistry.meteorList.stream().sorted(Comparator.comparing(m -> m.cost))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@@ -209,6 +290,6 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
}
|
||||
|
||||
private int getEstimatedAmount(float chance, int radius) {
|
||||
return (int) Math.ceil(4f / 3 * Math.PI * Math.pow(radius, 3) * chance);
|
||||
return (int) Math.ceil(4f / 3 * Math.PI * Math.pow(radius + 0.5, 3) * chance);
|
||||
}
|
||||
}
|
||||
@@ -106,26 +106,24 @@ public class RenderHelper {
|
||||
GL11.glPushMatrix();
|
||||
int xSize = 32;
|
||||
int ySize = 32;
|
||||
|
||||
int amount = Math.max((int) (256 * ((double) (maxAmount - lpAmount) / maxAmount)), 0);
|
||||
|
||||
int x = (lpBarX - xSize / 2) * 8;
|
||||
int y = (lpBarY - ySize / 2) * 8;
|
||||
|
||||
ResourceLocation test2 = new ResourceLocation("alchemicalwizardry", "textures/gui/container1.png");
|
||||
GL11.glColor4f(1, 0, 0, 1.0F);
|
||||
mc.getTextureManager().bindTexture(test2);
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
mc.renderEngine.bindTexture(test2);
|
||||
GL11.glScalef(1f / 8f, 1f / 8f, 1f / 8f);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
drawTexturedModalRect(x, y + amount, 0, amount, 256, 256 - amount);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry", "textures/gui/lpVial.png");
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.getTextureManager().bindTexture(test);
|
||||
|
||||
mc.renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
drawTexturedModalRect(x, y, 0, 0, 256, 256);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@ import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn;
|
||||
import net.minecraftforge.event.entity.player.EntityInteractEvent;
|
||||
|
||||
import vazkii.botania.api.internal.IManaBurst;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.BloodMagicConfiguration;
|
||||
import WayofTime.alchemicalWizardry.api.BlockStack;
|
||||
@@ -59,6 +58,7 @@ import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
import cpw.mods.fml.common.eventhandler.EventPriority;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent;
|
||||
import vazkii.botania.api.internal.IManaBurst;
|
||||
|
||||
public class AlchemicalWizardryEventHooks {
|
||||
|
||||
|
||||
+4
-2
@@ -11,6 +11,7 @@ import net.minecraft.server.MinecraftServer;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.items.LavaCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.IFuelHandler;
|
||||
|
||||
public class AlchemicalWizardryFuelHandler implements IFuelHandler {
|
||||
@@ -35,11 +36,12 @@ public class AlchemicalWizardryFuelHandler implements IFuelHandler {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (MinecraftServer.getServer().getConfigurationManager() == null) {
|
||||
if (mcServer.getConfigurationManager() == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package WayofTime.alchemicalWizardry.common;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.BitSet;
|
||||
import java.util.EnumMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
@@ -10,6 +12,7 @@ import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
@@ -77,6 +80,8 @@ public enum NewPacketHandler {
|
||||
.addAfter(tileAltarCodec, "CurrentReagentBarMessageHandler", new CurrentReagentBarMessageHandler());
|
||||
clientChannel.pipeline()
|
||||
.addAfter(tileAltarCodec, "CurrentAddedHPMessageHandler", new CurrentAddedHPMessageHandler());
|
||||
clientChannel.pipeline()
|
||||
.addAfter(tileAltarCodec, "GaiaBiomeChangeHandler", new GaiaBiomeChangeMessageHandler());
|
||||
}
|
||||
|
||||
@SideOnly(Side.SERVER)
|
||||
@@ -283,6 +288,23 @@ public enum NewPacketHandler {
|
||||
}
|
||||
}
|
||||
|
||||
private static class GaiaBiomeChangeMessageHandler extends SimpleChannelInboundHandler<GaiaBiomeChangeMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, GaiaBiomeChangeMessage msg) throws Exception {
|
||||
Chunk chunk = AlchemicalWizardry.proxy.getClientWorld().getChunkFromChunkCoords(msg.chunkX, msg.chunkZ);
|
||||
if (chunk != null) {
|
||||
byte[] biomeArray = chunk.getBiomeArray();
|
||||
for (int i = 0; i < 16 * 16; ++i) {
|
||||
if (msg.mask.get(i)) {
|
||||
biomeArray[i] = msg.biome;
|
||||
}
|
||||
}
|
||||
chunk.setBiomeArray(biomeArray);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class BMMessage {
|
||||
|
||||
int index;
|
||||
@@ -417,6 +439,16 @@ public enum NewPacketHandler {
|
||||
byte keyPressed;
|
||||
}
|
||||
|
||||
public static class GaiaBiomeChangeMessage extends BMMessage {
|
||||
|
||||
int chunkX;
|
||||
int chunkZ;
|
||||
byte biome;
|
||||
BitSet mask;
|
||||
// One bit per coordinate in a chunk, 16*16 bits = 32 bytes
|
||||
public static final int maskByteCount = 32;
|
||||
}
|
||||
|
||||
private class ClientToServerCodec extends FMLIndexedMessageToMessageCodec<BMMessage> {
|
||||
|
||||
public ClientToServerCodec() {}
|
||||
@@ -458,6 +490,7 @@ public enum NewPacketHandler {
|
||||
addDiscriminator(12, CurrentReagentBarMessage.class);
|
||||
addDiscriminator(13, CurrentAddedHPMessage.class);
|
||||
addDiscriminator(14, KeyboardMessage.class);
|
||||
addDiscriminator(15, GaiaBiomeChangeMessage.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -669,6 +702,17 @@ public enum NewPacketHandler {
|
||||
|
||||
target.writeByte(((KeyboardMessage) msg).keyPressed);
|
||||
break;
|
||||
|
||||
case 15:
|
||||
target.writeInt(((GaiaBiomeChangeMessage) msg).chunkX);
|
||||
target.writeInt(((GaiaBiomeChangeMessage) msg).chunkZ);
|
||||
target.writeByte(((GaiaBiomeChangeMessage) msg).biome);
|
||||
byte[] arr = Arrays.copyOf(
|
||||
((GaiaBiomeChangeMessage) msg).mask.toByteArray(),
|
||||
GaiaBiomeChangeMessage.maskByteCount);
|
||||
target.writeBytes(arr);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -894,6 +938,16 @@ public enum NewPacketHandler {
|
||||
System.out.println("Packet recieved: being decoded");
|
||||
((KeyboardMessage) msg).keyPressed = dat.readByte();
|
||||
break;
|
||||
|
||||
case 15:
|
||||
((GaiaBiomeChangeMessage) msg).chunkX = dat.readInt();
|
||||
((GaiaBiomeChangeMessage) msg).chunkZ = dat.readInt();
|
||||
((GaiaBiomeChangeMessage) msg).biome = dat.readByte();
|
||||
|
||||
byte[] buffer = new byte[GaiaBiomeChangeMessage.maskByteCount];
|
||||
dat.readBytes(buffer);
|
||||
((GaiaBiomeChangeMessage) msg).mask = BitSet.valueOf(buffer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1067,6 +1121,17 @@ public enum NewPacketHandler {
|
||||
return INSTANCE.channels.get(Side.CLIENT).generatePacketFrom(msg);
|
||||
}
|
||||
|
||||
public static Packet getGaiaBiomeChangePacket(int x, int z, byte biome, BitSet mask) {
|
||||
GaiaBiomeChangeMessage msg = new GaiaBiomeChangeMessage();
|
||||
msg.index = 15;
|
||||
msg.chunkX = x;
|
||||
msg.chunkZ = z;
|
||||
msg.biome = biome;
|
||||
msg.mask = mask;
|
||||
|
||||
return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg);
|
||||
}
|
||||
|
||||
public void sendTo(Packet message, EntityPlayerMP player) {
|
||||
this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET)
|
||||
.set(FMLOutboundHandler.OutboundTarget.PLAYER);
|
||||
@@ -1087,6 +1152,13 @@ public enum NewPacketHandler {
|
||||
this.channels.get(Side.SERVER).writeAndFlush(message);
|
||||
}
|
||||
|
||||
public void sendToDimension(Packet message, Integer dimensionId) {
|
||||
this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET)
|
||||
.set(FMLOutboundHandler.OutboundTarget.DIMENSION);
|
||||
this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(dimensionId);
|
||||
this.channels.get(Side.SERVER).writeAndFlush(message);
|
||||
}
|
||||
|
||||
public void sendToServer(Packet message) {
|
||||
this.channels.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET)
|
||||
.set(FMLOutboundHandler.OutboundTarget.TOSERVER);
|
||||
|
||||
@@ -33,6 +33,9 @@ public class BloodRune extends Block {
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon accelerationRuneIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon quicknessRuneIcon;
|
||||
|
||||
public BloodRune() {
|
||||
super(Material.iron);
|
||||
this.setBlockName("bloodRune");
|
||||
@@ -50,6 +53,7 @@ public class BloodRune extends Block {
|
||||
this.orbCapacityRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:OrbCapacityRune");
|
||||
this.betterCapacityRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:BetterCapacityRune");
|
||||
this.accelerationRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:AccelerationRune");
|
||||
this.quicknessRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:QuicknessRune");
|
||||
}
|
||||
|
||||
public int getRuneEffect(int metaData) {
|
||||
@@ -71,6 +75,9 @@ public class BloodRune extends Block {
|
||||
|
||||
case 5: // Acceleration rune
|
||||
return 9;
|
||||
|
||||
case 6: // Quickness Rune
|
||||
return 10;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -89,6 +96,7 @@ public class BloodRune extends Block {
|
||||
par3List.add(new ItemStack(par1, 1, 3));
|
||||
par3List.add(new ItemStack(par1, 1, 4));
|
||||
par3List.add(new ItemStack(par1, 1, 5));
|
||||
par3List.add(new ItemStack(par1, 1, 6));
|
||||
} else {
|
||||
super.getSubBlocks(par1, par2CreativeTabs, par3List);
|
||||
}
|
||||
@@ -115,6 +123,10 @@ public class BloodRune extends Block {
|
||||
|
||||
case 5:
|
||||
return this.accelerationRuneIcon;
|
||||
|
||||
case 6:
|
||||
return this.quicknessRuneIcon;
|
||||
|
||||
default:
|
||||
return blockIcon;
|
||||
}
|
||||
|
||||
+10
@@ -11,6 +11,7 @@ public class AltarUpgradeComponent {
|
||||
private int orbCapacitiveUpgrades;
|
||||
private int betterCapacitiveUpgrades;
|
||||
private int accelerationUpgrades;
|
||||
private int quicknessUpgrades;
|
||||
|
||||
public AltarUpgradeComponent() {
|
||||
speedUpgrades = 0;
|
||||
@@ -22,6 +23,7 @@ public class AltarUpgradeComponent {
|
||||
orbCapacitiveUpgrades = 0;
|
||||
betterCapacitiveUpgrades = 0;
|
||||
accelerationUpgrades = 0;
|
||||
quicknessUpgrades = 0;
|
||||
}
|
||||
|
||||
public void addSpeedUpgrade() {
|
||||
@@ -60,6 +62,10 @@ public class AltarUpgradeComponent {
|
||||
accelerationUpgrades++;
|
||||
}
|
||||
|
||||
public void addQuicknessUpgrade() {
|
||||
quicknessUpgrades++;
|
||||
}
|
||||
|
||||
public int getSpeedUpgrades() {
|
||||
return speedUpgrades;
|
||||
}
|
||||
@@ -95,4 +101,8 @@ public class AltarUpgradeComponent {
|
||||
public int getAccelerationUpgrades() {
|
||||
return this.accelerationUpgrades;
|
||||
}
|
||||
|
||||
public int getQuicknessUpgrades() {
|
||||
return this.quicknessUpgrades;
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.BlockStack;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.CarvingUtils;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingGroup;
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.BlockStack;
|
||||
|
||||
public class CompatChecks {
|
||||
|
||||
public static boolean checkChiselBlock(BlockStack blockStack, String groupName) {
|
||||
|
||||
+13
-3
@@ -5,6 +5,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -65,9 +66,14 @@ public class UpgradedAltars {
|
||||
|
||||
private static boolean checkAltarComponent(AltarComponent altarComponent, IBlockAccess world, int x, int y, int z,
|
||||
int altarTier) {
|
||||
Block block = world.getBlock(x + altarComponent.getX(), y + altarComponent.getY(), z + altarComponent.getZ());
|
||||
int metadata = world
|
||||
.getBlockMetadata(x + altarComponent.getX(), y + altarComponent.getY(), z + altarComponent.getZ());
|
||||
int compX = x + altarComponent.getX();
|
||||
int compY = y + altarComponent.getY();
|
||||
int compZ = z + altarComponent.getZ();
|
||||
if (altarComponent.getBlock() == Blocks.air) {
|
||||
return !world.isAirBlock(compX, compY, compZ);
|
||||
}
|
||||
Block block = world.getBlock(compX, compY, compZ);
|
||||
int metadata = world.getBlockMetadata(compX, compY, compZ);
|
||||
if (altarComponent.isBloodRune()) {
|
||||
boolean result = false;
|
||||
BlockStack[] runes = getRuneOverrides(altarTier);
|
||||
@@ -142,6 +148,10 @@ public class UpgradedAltars {
|
||||
case 9:
|
||||
upgrades.addAccelerationUpgrade();
|
||||
break;
|
||||
|
||||
case 10:
|
||||
upgrades.addQuicknessUpgrade();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -410,6 +410,12 @@ public class BloodMagicGuide {
|
||||
PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.accelerationRune")));
|
||||
entries.add(new EntryUniText(accelerationRunePages, "guide.BloodMagic.entryName.architect.accelerationRune"));
|
||||
|
||||
ArrayList<IPage> quicknessRuneRecipe = new ArrayList();
|
||||
demonicOrbPages.add(getOrbPageForRecipe(RecipeHolder.quicknessRuneRecipe));
|
||||
quicknessRuneRecipe.addAll(
|
||||
PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.quicknessRune")));
|
||||
entries.add(new EntryUniText(quicknessRuneRecipe, "guide.BloodMagic.entryName.architect.quicknessRune"));
|
||||
|
||||
ArrayList<IPage> harvestPages = new ArrayList();
|
||||
demonicOrbPages.add(getOrbPageForRecipe(RecipeHolder.harvestSigilRecipe));
|
||||
harvestPages
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package WayofTime.alchemicalWizardry.common.commands;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
|
||||
+3
-3
@@ -26,6 +26,9 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.Int3;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
|
||||
@@ -40,9 +43,6 @@ import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.DemonPacketRe
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.DemonType;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
public class TEDemonPortal extends TileEntity {
|
||||
|
||||
public DemonType type = DemonType.FIRE;
|
||||
|
||||
@@ -3,7 +3,15 @@ package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
|
||||
+10
-1
@@ -3,7 +3,16 @@ package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILeapAtTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
|
||||
+14
-2
@@ -1,7 +1,19 @@
|
||||
package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IRangedAttackMob;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIArrowAttack;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
|
||||
+9
-1
@@ -3,7 +3,15 @@ package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
|
||||
@@ -3,7 +3,15 @@ package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
|
||||
+14
-2
@@ -1,7 +1,19 @@
|
||||
package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IRangedAttackMob;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIArrowAttack;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
|
||||
+14
-2
@@ -1,7 +1,19 @@
|
||||
package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IRangedAttackMob;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIArrowAttack;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
|
||||
+18
-29
@@ -1,22 +1,22 @@
|
||||
package WayofTime.alchemicalWizardry.common.entity.projectile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry;
|
||||
|
||||
public class EntityMeteor extends EnergyBlastProjectile {
|
||||
|
||||
private int meteorID;
|
||||
|
||||
public boolean hasTerrae;
|
||||
public boolean hasOrbisTerrae;
|
||||
public boolean hasCrystallos;
|
||||
public boolean hasIncendium;
|
||||
public boolean hasTennebrae;
|
||||
public ArrayList<Reagent> reagentList = new ArrayList<>();
|
||||
|
||||
public EntityMeteor(World par1World) {
|
||||
super(par1World);
|
||||
@@ -33,11 +33,11 @@ public class EntityMeteor extends EnergyBlastProjectile {
|
||||
super.writeEntityToNBT(par1NBTTagCompound);
|
||||
|
||||
par1NBTTagCompound.setInteger("meteorID", meteorID);
|
||||
par1NBTTagCompound.setBoolean("hasTerrae", hasTerrae);
|
||||
par1NBTTagCompound.setBoolean("hasOrbisTerrae", hasOrbisTerrae);
|
||||
par1NBTTagCompound.setBoolean("hasCrystallos", hasCrystallos);
|
||||
par1NBTTagCompound.setBoolean("hasIncendium", hasIncendium);
|
||||
par1NBTTagCompound.setBoolean("hasTennebrae", hasTennebrae);
|
||||
|
||||
for (Reagent r : reagentList) {
|
||||
par1NBTTagCompound.setBoolean("reagent." + r.name, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -45,11 +45,11 @@ public class EntityMeteor extends EnergyBlastProjectile {
|
||||
super.readEntityFromNBT(par1NBTTagCompound);
|
||||
|
||||
meteorID = par1NBTTagCompound.getInteger("meteorID");
|
||||
hasTerrae = par1NBTTagCompound.getBoolean("hasTerrae");
|
||||
hasOrbisTerrae = par1NBTTagCompound.getBoolean("hasOrbisTerrae");
|
||||
hasIncendium = par1NBTTagCompound.getBoolean("hasIncendium");
|
||||
hasCrystallos = par1NBTTagCompound.getBoolean("hasCrystallos");
|
||||
hasTennebrae = par1NBTTagCompound.getBoolean("hasTennebrae");
|
||||
for (Reagent r : ReagentRegistry.reagentList.values()) {
|
||||
if (par1NBTTagCompound.getBoolean("reagent." + r.name)) {
|
||||
reagentList.add(r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -66,13 +66,7 @@ public class EntityMeteor extends EnergyBlastProjectile {
|
||||
if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null) {
|
||||
this.onImpact(mop.entityHit);
|
||||
} else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
MeteorRegistry.createMeteorImpact(
|
||||
worldObj,
|
||||
mop.blockX,
|
||||
mop.blockY,
|
||||
mop.blockZ,
|
||||
this.meteorID,
|
||||
new boolean[] { hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae });
|
||||
MeteorRegistry.createMeteorImpact(worldObj, mop.blockX, mop.blockY, mop.blockZ, this.meteorID, reagentList);
|
||||
}
|
||||
|
||||
this.setDead();
|
||||
@@ -80,13 +74,8 @@ public class EntityMeteor extends EnergyBlastProjectile {
|
||||
|
||||
@Override
|
||||
public void onImpact(Entity mop) {
|
||||
MeteorRegistry.createMeteorImpact(
|
||||
worldObj,
|
||||
(int) this.posX,
|
||||
(int) this.posY,
|
||||
(int) this.posZ,
|
||||
meteorID,
|
||||
new boolean[] { hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae });
|
||||
MeteorRegistry
|
||||
.createMeteorImpact(worldObj, (int) this.posX, (int) this.posY, (int) this.posZ, meteorID, reagentList);
|
||||
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ public class RecipeHolder {
|
||||
public static IRecipe keyOfBindingRecipe;
|
||||
public static IRecipe energyBazookaRecipe;
|
||||
public static IRecipe accelerationRuneRecipe;
|
||||
public static IRecipe quicknessRuneRecipe;
|
||||
public static IRecipe harvestSigilRecipe;
|
||||
public static IRecipe crystalCluserRecipe;
|
||||
public static IRecipe arcanePlinthRecipe;
|
||||
@@ -152,6 +153,7 @@ public class RecipeHolder {
|
||||
harvestSigilRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemHarvestSigil));
|
||||
crystalCluserRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockCrystal));
|
||||
weakRitualStoneRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.imperfectRitualStone));
|
||||
quicknessRuneRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.bloodRune, 1, 6));
|
||||
|
||||
arcanePlinthRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockPlinth));
|
||||
arcanePedestalRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockPedestal));
|
||||
|
||||
@@ -19,13 +19,12 @@ import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
|
||||
import com.google.common.collect.HashMultiset;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.ItemType;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
import com.google.common.collect.HashMultiset;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -19,14 +19,13 @@ import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
|
||||
import com.google.common.collect.HashMultiset;
|
||||
import com.google.common.collect.Multiset;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.ItemType;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
import com.google.common.collect.HashMultiset;
|
||||
import com.google.common.collect.Multiset;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -20,14 +20,13 @@ import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
|
||||
import com.google.common.collect.HashMultiset;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.ItemType;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
import com.google.common.collect.HashMultiset;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -17,14 +17,13 @@ import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.tile.IBloodAltar;
|
||||
import WayofTime.alchemicalWizardry.common.IDemon;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -41,6 +41,10 @@ public class ItemBloodRuneBlock extends ItemBlock {
|
||||
name = "acceleration";
|
||||
break;
|
||||
|
||||
case 6:
|
||||
name = "quickness";
|
||||
break;
|
||||
|
||||
default:
|
||||
name = "broken";
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldProvider;
|
||||
@@ -13,6 +12,7 @@ import net.minecraftforge.common.DimensionManager;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -72,7 +72,7 @@ public class LavaCrystal extends EnergyItems {
|
||||
if (itemStack.getTagCompound() != null && !(itemStack.getTagCompound().getString("ownerName").equals(""))) {
|
||||
String ownerName = itemStack.getTagCompound().getString("ownerName");
|
||||
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
if (FMLCommonHandler.instance().getMinecraftServerInstance() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -75,7 +75,8 @@ public class TelepositionFocus extends EnergyItems {
|
||||
}
|
||||
|
||||
public World getWorld(ItemStack itemStack) {
|
||||
return DimensionManager.getWorld(getDimensionID(itemStack));
|
||||
return FMLCommonHandler.instance().getMinecraftServerInstance()
|
||||
.worldServerForDimension(getDimensionID(itemStack));
|
||||
}
|
||||
|
||||
public int xCoord(ItemStack itemStack) {
|
||||
|
||||
@@ -20,9 +20,6 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ISpecialArmor;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
|
||||
import thaumcraft.api.IGoggles;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.nodes.IRevealer;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles;
|
||||
@@ -36,6 +33,9 @@ import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.Optional.Interface;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.api.IGoggles;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.nodes.IRevealer;
|
||||
|
||||
@Optional.InterfaceList(
|
||||
value = { @Interface(iface = "thaumcraft.api.nodes.IRevealer", modid = "Thaumcraft"),
|
||||
|
||||
+2
-3
@@ -10,12 +10,11 @@ import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaEarth;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaEarth;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -12,12 +12,11 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaFire;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaFire;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
+2
-3
@@ -11,12 +11,11 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWater;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWater;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -10,12 +10,11 @@ import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWind;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWind;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
+5
-1
@@ -19,7 +19,11 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.Int3;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.*;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
+5
-1
@@ -17,7 +17,11 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.*;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ISegmentedReagentHandler;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -1,130 +0,0 @@
|
||||
package WayofTime.alchemicalWizardry.common.items.forestry;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.apiculture.*;
|
||||
|
||||
public class ItemBloodFrame extends EnergyItems implements IHiveFrame {
|
||||
|
||||
private final IBeeModifier beeModifier = new BloodFrameBeeModifier();
|
||||
|
||||
public ItemBloodFrame() {
|
||||
super();
|
||||
this.maxStackSize = 1;
|
||||
this.setMaxDamage(10);
|
||||
setEnergyUsed(1000);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
||||
private static class BloodFrameBeeModifier implements IBeeModifier {
|
||||
|
||||
@Override
|
||||
public float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) {
|
||||
return 0.0001f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getProductionModifier(IBeeGenome genome, float currentModifier) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getFloweringModifier(IBeeGenome genome, float currentModifier) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getGeneticDecay(IBeeGenome genome, float currentModifier) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSealed() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSelfLighted() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSunlightSimulated() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isHellish() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getTerritoryModifier(IBeeGenome genome, float currentModifier) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.bloodframe.desc"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodFrame");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) {
|
||||
if (par1ItemStack.getItemDamage() > 0) {
|
||||
if (EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) {
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getItemDamage() - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear) {
|
||||
// TODO Auto-generated method stub
|
||||
if (EnergyItems.canSyphonInContainer(frame, getEnergyUsed() * wear)) {
|
||||
EnergyItems.syphonWhileInContainer(frame, getEnergyUsed() * wear);
|
||||
return frame;
|
||||
} else {
|
||||
frame.setItemDamage(frame.getItemDamage() + wear);
|
||||
if (frame.getItemDamage() >= frame.getMaxDamage()) {
|
||||
return null;
|
||||
}
|
||||
return frame;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBeeModifier getBeeModifier() {
|
||||
return beeModifier;
|
||||
}
|
||||
}
|
||||
@@ -25,11 +25,10 @@ import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
+23
-20
@@ -77,12 +77,7 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani
|
||||
.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, false);
|
||||
|
||||
if (movingobjectposition == null) {
|
||||
par3EntityPlayer.addChatMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocal("message.divinationsigil.currentessence") + " "
|
||||
+ SoulNetworkHandler.getCurrentEssence(ownerName)
|
||||
+ "LP"));
|
||||
|
||||
tellEssence(par3EntityPlayer, ownerName);
|
||||
return par1ItemStack;
|
||||
} else {
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
@@ -93,12 +88,7 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani
|
||||
TileEntity tile = par2World.getTileEntity(x, y, z);
|
||||
|
||||
if (!(tile instanceof IReagentHandler)) {
|
||||
par3EntityPlayer.addChatMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocal("message.divinationsigil.currentessence") + " "
|
||||
+ SoulNetworkHandler.getCurrentEssence(ownerName)
|
||||
+ "LP"));
|
||||
|
||||
tellEssence(par3EntityPlayer, ownerName);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@@ -108,14 +98,7 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani
|
||||
if (infoList != null) {
|
||||
for (ReagentContainerInfo info : infoList) {
|
||||
if (info != null && info.reagent != null && info.reagent.reagent != null) {
|
||||
par3EntityPlayer.addChatComponentMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocal("message.divinationsigil.reagent") + " "
|
||||
+ ReagentRegistry.getKeyForReagent(info.reagent.reagent)
|
||||
+ ","
|
||||
+ StatCollector.translateToLocal("message.divinationsigil.amount")
|
||||
+ " "
|
||||
+ info.reagent.amount));
|
||||
tellReagent(par3EntityPlayer, info);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -125,6 +108,26 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
private static void tellReagent(EntityPlayer par3EntityPlayer, ReagentContainerInfo info) {
|
||||
par3EntityPlayer.addChatComponentMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"message.divinationsigil.reagent",
|
||||
ReagentRegistry.getKeyForReagent(info.reagent.reagent))));
|
||||
par3EntityPlayer.addChatComponentMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector
|
||||
.translateToLocalFormatted("message.divinationsigil.amount", info.reagent.amount)));
|
||||
}
|
||||
|
||||
private static void tellEssence(EntityPlayer par3EntityPlayer, String ownerName) {
|
||||
par3EntityPlayer.addChatMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"message.divinationsigil.currentessence",
|
||||
SoulNetworkHandler.getCurrentEssence(ownerName))));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {}
|
||||
|
||||
|
||||
@@ -17,7 +17,11 @@ import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.*;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidContainerItem;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.Int3;
|
||||
|
||||
+5
-5
@@ -12,17 +12,17 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.api.IGoggles;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.nodes.IRevealer;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemSanguineArmour extends ItemArmor
|
||||
implements ArmourUpgrade, IGoggles, IVisDiscountGear, IRevealer, IRunicArmor, IRepairable {
|
||||
|
||||
@@ -5,7 +5,13 @@ import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.*;
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityAirElemental;
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityEarthElemental;
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityElemental;
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityFireElemental;
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityHolyElemental;
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityShadeElemental;
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityWaterElemental;
|
||||
|
||||
public class RenderElemental extends RenderLiving {
|
||||
|
||||
|
||||
+8
-1
@@ -9,7 +9,14 @@ import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.*;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.LightningBoltProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public class RitualEffectAlphaPact extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % 20 != 0) {
|
||||
if (world.getTotalWorldTime() % 20 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ public class RitualEffectAnimalGrowth extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % 20 != 0) {
|
||||
if (world.getTotalWorldTime() % 20 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -208,7 +208,7 @@ public class RitualEffectAutoAlchemy extends RitualEffect {
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getWorldTime() % 10 == 0) {
|
||||
if (world.getTotalWorldTime() % 10 == 0) {
|
||||
if (flag == 0 && inputInv1 != null) {
|
||||
for (int i = 0; i < recipe.length; i++) {
|
||||
ItemStack recItem = recipe[i];
|
||||
|
||||
+59
-61
@@ -1,7 +1,11 @@
|
||||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
import java.util.BitSet;
|
||||
import java.util.List;
|
||||
import java.util.Queue;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
@@ -24,6 +28,7 @@ import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.NewPacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth;
|
||||
|
||||
@@ -75,61 +80,38 @@ public class RitualEffectBiomeChanger extends RitualEffect {
|
||||
}
|
||||
|
||||
boolList[range][range] = true;
|
||||
boolean isReady = false;
|
||||
|
||||
while (!isReady) {
|
||||
isReady = true;
|
||||
Queue<Integer> BFSqueue = new ArrayDeque<>();
|
||||
BFSqueue.add(x);
|
||||
BFSqueue.add(z);
|
||||
|
||||
for (int i = 0; i < 2 * range + 1; i++) {
|
||||
for (int j = 0; j < 2 * range + 1; j++) {
|
||||
if (boolList[i][j]) {
|
||||
if (i - 1 >= 0 && !boolList[i - 1][j]) {
|
||||
Block block = world.getBlock(x - range + i - 1, y + 1, z - range + j);
|
||||
BiConsumer<Integer, Integer> tryEnqueue = (nextX, nextZ) -> {
|
||||
if (Math.abs(nextX - x) > range || Math.abs(nextZ - z) > range) return;
|
||||
if (boolList[nextX - (x - range)][nextZ - (z - range)]) return;
|
||||
|
||||
if (!ModBlocks.largeBloodStoneBrick.equals(block)
|
||||
&& !ModBlocks.bloodStoneBrick.equals(block)) {
|
||||
boolList[i - 1][j] = true;
|
||||
isReady = false;
|
||||
}
|
||||
}
|
||||
Block block = world.getBlock(nextX, y + 1, nextZ);
|
||||
if (block == null || block.equals(ModBlocks.bloodStoneBrick)
|
||||
|| block.equals(ModBlocks.largeBloodStoneBrick))
|
||||
return;
|
||||
|
||||
if (j - 1 >= 0 && !boolList[i][j - 1]) {
|
||||
Block block = world.getBlock(x - range + i, y + 1, z - range + j - 1);
|
||||
boolList[nextX - (x - range)][nextZ - (z - range)] = true;
|
||||
BFSqueue.add(nextX);
|
||||
BFSqueue.add(nextZ);
|
||||
};
|
||||
|
||||
if (!ModBlocks.largeBloodStoneBrick.equals(block)
|
||||
&& !ModBlocks.bloodStoneBrick.equals(block)) {
|
||||
boolList[i][j - 1] = true;
|
||||
isReady = false;
|
||||
}
|
||||
}
|
||||
while (!BFSqueue.isEmpty()) {
|
||||
Integer curX = BFSqueue.remove();
|
||||
Integer curZ = BFSqueue.remove();
|
||||
|
||||
if (i + 1 <= 2 * range && !boolList[i + 1][j]) {
|
||||
Block block = world.getBlock(x - range + i + 1, y + 1, z - range + j);
|
||||
|
||||
if (!ModBlocks.largeBloodStoneBrick.equals(block)
|
||||
&& !ModBlocks.bloodStoneBrick.equals(block)) {
|
||||
boolList[i + 1][j] = true;
|
||||
isReady = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (j + 1 <= 2 * range && !boolList[i][j + 1]) {
|
||||
Block block = world.getBlock(x - range + i, y + 1, z - range + j + 1);
|
||||
|
||||
if (!ModBlocks.largeBloodStoneBrick.equals(block)
|
||||
&& !ModBlocks.bloodStoneBrick.equals(block)) {
|
||||
boolList[i][j + 1] = true;
|
||||
isReady = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
tryEnqueue.accept(curX + 1, curZ);
|
||||
tryEnqueue.accept(curX, curZ + 1);
|
||||
tryEnqueue.accept(curX - 1, curZ);
|
||||
tryEnqueue.accept(curX, curZ - 1);
|
||||
}
|
||||
|
||||
float temperature = 0.5f;
|
||||
float humidity = 0.5f;
|
||||
float acceptableRange = 0.1f;
|
||||
float acceptableRange = 0.0999f;
|
||||
int biomeSkip = 0;
|
||||
|
||||
for (int i = -1; i <= 1; i++) {
|
||||
@@ -240,26 +222,42 @@ public class RitualEffectBiomeChanger extends RitualEffect {
|
||||
biomeID = 1;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 2 * range + 1; i++) {
|
||||
for (int j = 0; j < 2 * range + 1; j++) {
|
||||
if (boolList[i][j]) {
|
||||
Chunk chunk = world.getChunkFromBlockCoords(x - range + i, z - range + j);
|
||||
byte[] byteArray = chunk.getBiomeArray();
|
||||
int moduX = (x - range + i) % 16;
|
||||
int moduZ = (z - range + j) % 16;
|
||||
List<Chunk> chunkList = new ArrayList<>();
|
||||
|
||||
if (moduX < 0) {
|
||||
moduX = moduX + 16;
|
||||
for (int chunkX = (x - range) >> 4; chunkX <= (x + range) >> 4; ++chunkX) {
|
||||
for (int chunkZ = (z - range) >> 4; chunkZ <= (z + range) >> 4; ++chunkZ) {
|
||||
chunkList.add(world.getChunkFromChunkCoords(chunkX, chunkZ));
|
||||
}
|
||||
}
|
||||
|
||||
for (Chunk chunk : chunkList) {
|
||||
byte[] byteArray = chunk.getBiomeArray();
|
||||
BitSet mask = new BitSet();
|
||||
boolean changed = false;
|
||||
|
||||
for (int cZ = 0; cZ < 16; ++cZ) {
|
||||
int offsetZ = (chunk.zPosition << 4 | cZ) - (z - range);
|
||||
if (0 <= offsetZ && offsetZ < 2 * range + 1) {
|
||||
for (int cX = 0; cX < 16; ++cX) {
|
||||
int offsetX = (chunk.xPosition << 4 | cX) - (x - range);
|
||||
if (0 <= offsetX && offsetX < 2 * range + 1) {
|
||||
if (boolList[offsetX][offsetZ]) {
|
||||
mask.set(cZ << 4 | cX, true);
|
||||
byteArray[cZ << 4 | cX] = (byte) biomeID;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (moduZ < 0) {
|
||||
moduZ = moduZ + 16;
|
||||
}
|
||||
|
||||
byteArray[moduZ * 16 + moduX] = (byte) biomeID;
|
||||
chunk.setBiomeArray(byteArray);
|
||||
}
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
chunk.setBiomeArray(byteArray);
|
||||
NewPacketHandler.INSTANCE.sendToDimension(
|
||||
NewPacketHandler
|
||||
.getGaiaBiomeChangePacket(chunk.xPosition, chunk.zPosition, (byte) biomeID, mask),
|
||||
world.provider.dimensionId);
|
||||
}
|
||||
}
|
||||
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh());
|
||||
|
||||
+1
-1
@@ -90,7 +90,7 @@ public class RitualEffectContainment extends RitualEffect {
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getWorldTime() % 2 == 0 && flag) {
|
||||
if (world.getTotalWorldTime() % 2 == 0 && flag) {
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class RitualEffectCrafting extends RitualEffect {
|
||||
|
||||
boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false);
|
||||
|
||||
if (world.getWorldTime() % (hasPotentia ? 1 : 4) != 0) {
|
||||
if (world.getTotalWorldTime() % (hasPotentia ? 1 : 4) != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public class RitualEffectCrushing extends RitualEffect {
|
||||
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
|
||||
World world = ritualStone.getWorld();
|
||||
|
||||
if (world.getWorldTime() % 10 != 5) {
|
||||
if (world.getTotalWorldTime() % 10 != 5) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ public class RitualEffectFeatheredEarth extends RitualEffect // Nullifies all fa
|
||||
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * entityCount);
|
||||
|
||||
if (flag && world.getWorldTime() % costCooldown == 0) {
|
||||
if (flag && world.getTotalWorldTime() % costCooldown == 0) {
|
||||
if (hasTerrae) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true);
|
||||
}
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ public class RitualEffectFeatheredKnife extends RitualEffect {
|
||||
|
||||
int timeDelay = hasPotentia ? 10 : 20;
|
||||
|
||||
if (world.getWorldTime() % timeDelay != 0) {
|
||||
if (world.getTotalWorldTime() % timeDelay != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public class RitualEffectFlight extends RitualEffect {
|
||||
entityCount++;
|
||||
}
|
||||
|
||||
if (entityCount > 0 && world.getWorldTime() % reagentCooldown == 0) {
|
||||
if (entityCount > 0 && world.getTotalWorldTime() % reagentCooldown == 0) {
|
||||
if (hasAether) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true);
|
||||
}
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public class RitualEffectFullStomach extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % 20 != 0) {
|
||||
if (world.getTotalWorldTime() % 20 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public class RitualEffectGrowth extends RitualEffect {
|
||||
boolean hasVirtus = this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false);
|
||||
|
||||
int speed = this.getSpeedForReagents(hasTerrae, hasOrbisTerrae);
|
||||
if (world.getWorldTime() % speed != 0) {
|
||||
if (world.getTotalWorldTime() % speed != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public class RitualEffectHarvest extends RitualEffect {
|
||||
|
||||
entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80));
|
||||
} else {
|
||||
if (world.getWorldTime() % 5 != 0) {
|
||||
if (world.getTotalWorldTime() % 5 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public class RitualEffectHealing extends RitualEffect {
|
||||
|
||||
int timeDelay = 50;
|
||||
|
||||
if (world.getWorldTime() % timeDelay != 0) {
|
||||
if (world.getTotalWorldTime() % timeDelay != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -100,14 +100,14 @@ public class RitualEffectInterdiction extends RitualEffect {
|
||||
|
||||
if (itemFlag) {
|
||||
flag = true;
|
||||
if (world.getWorldTime() % aetherDrainRate == 0) {
|
||||
if (world.getTotalWorldTime() % aetherDrainRate == 0) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getWorldTime() % 2 == 0 && flag) {
|
||||
if (world.getTotalWorldTime() % 2 == 0 && flag) {
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, getCostPerRefresh());
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ public class RitualEffectItemRouting extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % 20 != 0) {
|
||||
if (world.getTotalWorldTime() % 20 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ public class RitualEffectLava extends RitualEffect {
|
||||
&& SoulNetworkHandler.canSyphonFromOnlyNetwork(owner, fireFuseCost)) {
|
||||
boolean hasReductus = this
|
||||
.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
|
||||
boolean drainReductus = world.getWorldTime() % 100 == 0;
|
||||
boolean drainReductus = world.getTotalWorldTime() % 100 == 0;
|
||||
|
||||
int range = 5;
|
||||
List<EntityLivingBase> entityList = SpellHelper
|
||||
|
||||
@@ -18,10 +18,15 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class RitualEffectLeap extends RitualEffect {
|
||||
|
||||
// Throws mobs with twice the horizontal speed
|
||||
public static final int aetherDrain = 10;
|
||||
// Throws mobs with half the vertical speed
|
||||
public static final int terraeDrain = 10;
|
||||
// Grants 3 seconds of fall immunity
|
||||
public static final int reductusDrain = 10;
|
||||
// Only throws adults (and non-sneaking players)
|
||||
public static final int tenebraeDrain = 10;
|
||||
// Only throws babies (and non-sneaking players)
|
||||
public static final int sanctusDrain = 10;
|
||||
|
||||
@Override
|
||||
@@ -39,152 +44,107 @@ public class RitualEffectLeap extends RitualEffect {
|
||||
List<EntityLivingBase> livingList = SpellHelper
|
||||
.getLivingEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range);
|
||||
|
||||
if (livingList == null) {
|
||||
if (livingList == null || livingList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentEssence < this.getCostPerRefresh() * livingList.size()) {
|
||||
SoulNetworkHandler.causeNauseaToPlayer(owner);
|
||||
} else {
|
||||
boolean hasAether = this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false);
|
||||
boolean hasTerrae = this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false);
|
||||
boolean hasReductus = this
|
||||
.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
|
||||
boolean hasTenebrae = this
|
||||
.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, false);
|
||||
boolean hasSanctus = this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false);
|
||||
return;
|
||||
}
|
||||
|
||||
int direction = ritualStone.getDirection();
|
||||
boolean hasAether = true;
|
||||
boolean hasTerrae = true;
|
||||
boolean hasReductus = true;
|
||||
boolean hasTenebrae = true;
|
||||
boolean hasSanctus = true;
|
||||
|
||||
int flag = 0;
|
||||
int direction = ritualStone.getDirection();
|
||||
|
||||
for (EntityLivingBase livingEntity : livingList) {
|
||||
if (livingEntity.isSneaking()) {
|
||||
continue;
|
||||
int count = 0;
|
||||
|
||||
for (EntityLivingBase livingEntity : livingList) {
|
||||
if (livingEntity.isSneaking()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
hasReductus = hasReductus
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
|
||||
hasTenebrae = hasTenebrae
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, false);
|
||||
hasSanctus = hasSanctus
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false);
|
||||
|
||||
// Sanctus only makes it work on children and tenebrae only with adults.
|
||||
// Both being present prevents the ritual from working for any NPCs.
|
||||
if (((hasSanctus && !livingEntity.isChild()) || (hasTenebrae && livingEntity.isChild()))
|
||||
&& !(livingEntity instanceof EntityPlayer)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
hasAether = hasAether
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true);
|
||||
hasTerrae = hasTerrae
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true);
|
||||
|
||||
double motionY = hasTerrae ? 0.6 : 1.2;
|
||||
double speed = hasAether ? 6.0 : 3.0;
|
||||
livingEntity.motionY = motionY;
|
||||
livingEntity.fallDistance = 0;
|
||||
count++;
|
||||
|
||||
if (livingEntity instanceof EntityPlayer) {
|
||||
switch (direction) {
|
||||
case 1:
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, 0, motionY, -speed);
|
||||
break;
|
||||
case 2:
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, speed, motionY, 0);
|
||||
break;
|
||||
case 3:
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, 0, motionY, speed);
|
||||
break;
|
||||
case 4:
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, -speed, motionY, 0);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (direction) {
|
||||
case 1:
|
||||
livingEntity.motionX = 0.0;
|
||||
livingEntity.motionZ = -speed;
|
||||
break;
|
||||
case 2:
|
||||
livingEntity.motionX = speed;
|
||||
livingEntity.motionZ = 0.0;
|
||||
break;
|
||||
case 3:
|
||||
livingEntity.motionX = 0.0;
|
||||
livingEntity.motionZ = speed;
|
||||
break;
|
||||
case 4:
|
||||
livingEntity.motionX = -speed;
|
||||
livingEntity.motionZ = 0.0;
|
||||
break;
|
||||
}
|
||||
|
||||
hasAether = hasAether
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false);
|
||||
hasTerrae = hasTerrae
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, false);
|
||||
hasReductus = hasReductus
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
|
||||
hasTenebrae = hasTenebrae
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, false);
|
||||
hasSanctus = hasSanctus
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false);
|
||||
|
||||
double motionY = hasTerrae ? 0.6 : 1.2;
|
||||
double speed = hasAether ? 6.0 : 3.0;
|
||||
|
||||
if (!(hasTenebrae || hasSanctus) || livingEntity instanceof EntityPlayer) {
|
||||
livingEntity.motionY = motionY;
|
||||
livingEntity.fallDistance = 0;
|
||||
|
||||
if (livingEntity instanceof EntityPlayer) {
|
||||
switch (direction) {
|
||||
case 1:
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, 0, motionY, -speed);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, speed, motionY, 0);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, 0, motionY, speed);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) livingEntity, -speed, motionY, 0);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
livingEntity.motionY = motionY;
|
||||
|
||||
switch (direction) {
|
||||
case 1:
|
||||
livingEntity.motionX = 0.0;
|
||||
livingEntity.motionZ = -speed;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
livingEntity.motionX = speed;
|
||||
livingEntity.motionZ = 0.0;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
livingEntity.motionX = 0.0;
|
||||
livingEntity.motionZ = -speed;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
livingEntity.motionX = -speed;
|
||||
livingEntity.motionZ = 0.0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
flag++;
|
||||
} else {
|
||||
if ((hasSanctus && !livingEntity.isChild()) || (hasTenebrae && livingEntity.isChild())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
livingEntity.motionY = motionY;
|
||||
|
||||
switch (direction) {
|
||||
case 1:
|
||||
livingEntity.motionX = 0.0;
|
||||
livingEntity.motionZ = -speed;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
livingEntity.motionX = speed;
|
||||
livingEntity.motionZ = 0.0;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
livingEntity.motionX = 0.0;
|
||||
livingEntity.motionZ = -speed;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
livingEntity.motionX = -speed;
|
||||
livingEntity.motionZ = 0.0;
|
||||
break;
|
||||
}
|
||||
|
||||
if (hasTenebrae) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, true);
|
||||
}
|
||||
if (hasSanctus) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true);
|
||||
}
|
||||
|
||||
livingEntity.fallDistance = 0;
|
||||
flag++;
|
||||
}
|
||||
|
||||
if (hasAether) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true);
|
||||
}
|
||||
if (hasTerrae) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, terraeDrain, true);
|
||||
}
|
||||
if (hasReductus) {
|
||||
if (!livingEntity.isPotionActive(AlchemicalWizardry.customPotionFeatherFall)) {
|
||||
livingEntity.addPotionEffect(
|
||||
new PotionEffect(AlchemicalWizardry.customPotionFeatherFall.id, 3 * 20, 0));
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, true);
|
||||
}
|
||||
if (hasTenebrae) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, true);
|
||||
} else if (hasSanctus) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (flag > 0) {
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * flag);
|
||||
if (hasReductus && !livingEntity.isPotionActive(AlchemicalWizardry.customPotionFeatherFall)) {
|
||||
livingEntity
|
||||
.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFeatherFall.id, 3 * 20, 0));
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (count > 0) {
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * count);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -194,7 +154,7 @@ public class RitualEffectLeap extends RitualEffect {
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList() {
|
||||
ArrayList<RitualComponent> leapingRitual = new ArrayList();
|
||||
ArrayList<RitualComponent> leapingRitual = new ArrayList<>();
|
||||
leapingRitual.add(new RitualComponent(0, 0, -2, RitualComponent.DUSK));
|
||||
leapingRitual.add(new RitualComponent(1, 0, -1, RitualComponent.AIR));
|
||||
leapingRitual.add(new RitualComponent(-1, 0, -1, RitualComponent.AIR));
|
||||
|
||||
@@ -68,7 +68,7 @@ public class RitualEffectMagnetic extends RitualEffect {
|
||||
|
||||
boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent, potentiaDrain, false);
|
||||
|
||||
if (world.getWorldTime() % (hasPotentia ? 10 : 40) != 0) {
|
||||
if (world.getTotalWorldTime() % (hasPotentia ? 10 : 40) != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public class RitualEffectOmegaStalling extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % 20 != 0) {
|
||||
if (world.getTotalWorldTime() % 20 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ public class RitualEffectOmegaTest extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % 200 != 0) {
|
||||
if (world.getTotalWorldTime() % 200 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class RitualEffectSphereCreator extends RitualEffect {
|
||||
// boolean hasPotentia = this.canDrainReagent(ritualStone, ReagentRegistry.potentiaReagent,
|
||||
// potentiaDrain, false);
|
||||
|
||||
if (world.getWorldTime() % 1 != 0) {
|
||||
if (world.getTotalWorldTime() % 1 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+20
-18
@@ -5,12 +5,14 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
@@ -43,9 +45,12 @@ public class RitualEffectSummonMeteor extends RitualEffect {
|
||||
if (entities == null) return;
|
||||
|
||||
for (EntityItem entityItem : entities) {
|
||||
if (entityItem != null && MeteorRegistry.isValidParadigmItem(entityItem.getEntityItem())) {
|
||||
int meteorID = MeteorRegistry.getParadigmIDForItem(entityItem.getEntityItem());
|
||||
int cost = MeteorRegistry.paradigmList.get(meteorID).cost;
|
||||
if (entityItem != null && MeteorRegistry.isValidMeteorFocusItem(entityItem.getEntityItem())) {
|
||||
ItemStack stack = entityItem.getEntityItem();
|
||||
if (stack == null || stack.stackSize <= 0) continue;
|
||||
|
||||
int meteorID = MeteorRegistry.getMeteorIDForItem(stack);
|
||||
int cost = MeteorRegistry.meteorList.get(meteorID).cost;
|
||||
|
||||
if (currentEssence < cost) {
|
||||
EntityPlayer entityOwner = SpellHelper.getPlayerForUsername(owner);
|
||||
@@ -56,23 +61,20 @@ public class RitualEffectSummonMeteor extends RitualEffect {
|
||||
EntityMeteor meteor = new EntityMeteor(world, x + 0.5f, 257, z + 0.5f, meteorID);
|
||||
meteor.motionY = -1.0f;
|
||||
|
||||
if (this.canDrainReagent(ritualStone, ReagentRegistry.terraeReagent, 1000, true)) {
|
||||
meteor.hasTerrae = true;
|
||||
}
|
||||
if (this.canDrainReagent(ritualStone, ReagentRegistry.orbisTerraeReagent, 1000, true)) {
|
||||
meteor.hasOrbisTerrae = true;
|
||||
}
|
||||
if (this.canDrainReagent(ritualStone, ReagentRegistry.crystallosReagent, 1000, true)) {
|
||||
meteor.hasCrystallos = true;
|
||||
}
|
||||
if (this.canDrainReagent(ritualStone, ReagentRegistry.incendiumReagent, 1000, true)) {
|
||||
meteor.hasIncendium = true;
|
||||
}
|
||||
if (this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, 1000, true)) {
|
||||
meteor.hasTennebrae = true;
|
||||
for (Reagent r : ReagentRegistry.reagentList.values()) {
|
||||
if (this.canDrainReagent(ritualStone, r, 1000, true)) {
|
||||
meteor.reagentList.add(r);
|
||||
}
|
||||
}
|
||||
|
||||
stack.stackSize--;
|
||||
|
||||
if (stack.stackSize <= 0) {
|
||||
world.removeEntity(entityItem);
|
||||
} else {
|
||||
entityItem.setEntityItemStack(stack);
|
||||
}
|
||||
|
||||
entityItem.setDead();
|
||||
world.spawnEntityInWorld(meteor);
|
||||
ritualStone.setActive(false);
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, cost);
|
||||
|
||||
+2
-2
@@ -44,7 +44,7 @@ public class RitualEffectSupression extends RitualEffect {
|
||||
int radius = this.getRadiusForReagents(hasAether, hasAquasalus);
|
||||
int masterRadius = radius;
|
||||
|
||||
int yIndex = (int) (world.getWorldTime() % (2 * radius + 1)) - radius;
|
||||
int yIndex = (int) (world.getTotalWorldTime() % (2 * radius + 1)) - radius;
|
||||
boolean expansion = false;
|
||||
|
||||
if (ritualStone.getVar1() < (radius + 1)) {
|
||||
@@ -86,7 +86,7 @@ public class RitualEffectSupression extends RitualEffect {
|
||||
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh() * costMod);
|
||||
|
||||
if (world.getWorldTime() % 100 == 0) {
|
||||
if (world.getTotalWorldTime() % 100 == 0) {
|
||||
if (hasAquasalus) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, true);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class RitualEffectWater extends RitualEffect {
|
||||
if (hasOffensa) {
|
||||
boolean hasReductus = this
|
||||
.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
|
||||
boolean drainReductus = world.getWorldTime() % 100 == 0;
|
||||
boolean drainReductus = world.getTotalWorldTime() % 100 == 0;
|
||||
|
||||
int range = 10;
|
||||
List<Entity> list = SpellHelper.getEntitiesInRange(world, x + 0.5, y + 0.5, z + 0.5, range, range);
|
||||
|
||||
+8
-14
@@ -21,10 +21,9 @@ public class RitualEffectWellOfSuffering extends RitualEffect {
|
||||
|
||||
public static final int timeDelay = 25;
|
||||
public static final int amount = AlchemicalWizardry.lpPerSacrificeWellOfSuffering;
|
||||
|
||||
private static final int tennebraeDrain = 5;
|
||||
private static final int potentiaDrain = 10;
|
||||
private static final int offensaDrain = 3;
|
||||
public static final int tennebraeDrain = 5;
|
||||
public static final int potentiaDrain = 10;
|
||||
public static final int offensaDrain = 3;
|
||||
|
||||
@Override
|
||||
public void performEffect(IMasterRitualStone ritualStone) {
|
||||
@@ -36,7 +35,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect {
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getWorldTime() % this.timeDelay != 0) {
|
||||
if (world.getTotalWorldTime() % timeDelay != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -62,13 +61,8 @@ public class RitualEffectWellOfSuffering extends RitualEffect {
|
||||
|
||||
int d0 = 10;
|
||||
int vertRange = hasPotentia ? 20 : 10;
|
||||
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(
|
||||
(double) x,
|
||||
(double) y,
|
||||
(double) z,
|
||||
(double) (x + 1),
|
||||
(double) (y + 1),
|
||||
(double) (z + 1)).expand(d0, vertRange, d0);
|
||||
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(x, y, z, (x + 1), (y + 1), (z + 1))
|
||||
.expand(d0, vertRange, d0);
|
||||
List<EntityLivingBase> list = world.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);
|
||||
|
||||
int entityCount = 0;
|
||||
@@ -93,7 +87,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect {
|
||||
&& this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tennebraeDrain, true);
|
||||
|
||||
entityCount++;
|
||||
tileAltar.sacrificialDaggerCall(this.amount * (hasTennebrae ? 2 : 1) * (hasOffensa ? 2 : 1), true);
|
||||
tileAltar.sacrificialDaggerCall(amount * (hasTennebrae ? 2 : 1) * (hasOffensa ? 2 : 1), true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +106,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect {
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList() {
|
||||
ArrayList<RitualComponent> wellOfSufferingRitual = new ArrayList();
|
||||
ArrayList<RitualComponent> wellOfSufferingRitual = new ArrayList<>();
|
||||
wellOfSufferingRitual.add(new RitualComponent(1, 0, 1, RitualComponent.FIRE));
|
||||
wellOfSufferingRitual.add(new RitualComponent(-1, 0, 1, RitualComponent.FIRE));
|
||||
wellOfSufferingRitual.add(new RitualComponent(1, 0, -1, RitualComponent.FIRE));
|
||||
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package WayofTime.alchemicalWizardry.common.summoning.meteor;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
class ItemStackAdapter extends TypeAdapter<ItemStack> {
|
||||
|
||||
@Override
|
||||
public ItemStack read(JsonReader reader) throws IOException {
|
||||
String str = reader.nextString();
|
||||
String[] input = str.split(":");
|
||||
if (input.length < 2) {
|
||||
AlchemicalWizardry.logger
|
||||
.warn("Unable to read item stack \"{}\". Valid format is \"modid:name(:meta optional)\"", str);
|
||||
return null;
|
||||
}
|
||||
ItemStack itemStack = GameRegistry.findItemStack(input[0], input[1], 1);
|
||||
if (itemStack == null) {
|
||||
AlchemicalWizardry.logger.warn("Unable to find item stack \"{}\".", str);
|
||||
return null;
|
||||
}
|
||||
if (input.length < 3) {
|
||||
return itemStack;
|
||||
}
|
||||
try {
|
||||
itemStack.setItemDamage(Integer.parseInt(input[2]));
|
||||
} catch (NumberFormatException e) {
|
||||
AlchemicalWizardry.logger
|
||||
.warn("Invalid metadata value {} for item stack {}:{}", input[2], input[0], input[1]);
|
||||
}
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(JsonWriter writer, ItemStack mpc) throws IOException {
|
||||
// Not implemented because it is not needed.
|
||||
}
|
||||
}
|
||||
@@ -1,51 +1,238 @@
|
||||
package WayofTime.alchemicalWizardry.common.summoning.meteor;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import static WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorComponent.defaultMeteorBlock;
|
||||
import static WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorComponent.getTotalListWeight;
|
||||
import static WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorReagentRegistry.getFillerList;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import gregtech.common.blocks.TileEntityOres;
|
||||
|
||||
public class Meteor {
|
||||
|
||||
public String[] ores;
|
||||
public List<MeteorComponent> ores;
|
||||
public List<MeteorComponent> filler;
|
||||
public int radius;
|
||||
public int cost;
|
||||
public String focusModId;
|
||||
public String focusName;
|
||||
public int focusMeta;
|
||||
public float fillerChance; // Out of 100.0
|
||||
public ItemStack focusItem;
|
||||
private String focusModId;
|
||||
private String focusName;
|
||||
private int focusMeta;
|
||||
private int maxWeight;
|
||||
|
||||
public static void loadConfig() {
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
File file = new File("config/BloodMagic/meteors");
|
||||
File[] files = file.listFiles();
|
||||
if (files != null) {
|
||||
try {
|
||||
for (File f : files) {
|
||||
BufferedReader br = new BufferedReader(new FileReader(f));
|
||||
Meteor m = gson.fromJson(br, Meteor.class);
|
||||
MeteorRegistry.registerMeteorParadigm(
|
||||
findItemStack(m.focusModId, m.focusName, m.focusMeta),
|
||||
m.ores,
|
||||
m.radius,
|
||||
m.cost);
|
||||
public static Random rand = new Random();
|
||||
|
||||
public Meteor() {
|
||||
this.radius = 1;
|
||||
this.cost = AlchemicalWizardry.defaultMeteorCost;
|
||||
this.fillerChance = 0;
|
||||
this.maxWeight = 0;
|
||||
this.preventNullLists();
|
||||
}
|
||||
|
||||
public Meteor(ItemStack focusStack, int radius, int cost, int fillerChance, List<MeteorComponent> oreList,
|
||||
List<MeteorComponent> fillerList) {
|
||||
this.focusItem = focusStack;
|
||||
this.radius = radius;
|
||||
this.cost = cost;
|
||||
this.fillerChance = fillerChance;
|
||||
this.ores = oreList;
|
||||
this.filler = fillerList;
|
||||
}
|
||||
|
||||
public void createMeteorImpact(World world, int x, int y, int z, List<Reagent> reagents) {
|
||||
int radius = getNewRadius(this.radius, reagents);
|
||||
float fillerChance = getNewFillerChance(this.fillerChance, reagents);
|
||||
|
||||
if (MeteorReagentRegistry.doExplosions(reagents)) {
|
||||
world.createExplosion(null, x, y, z, radius * 4, MeteorReagentRegistry.doMeteorsDestroyBlocks(reagents));
|
||||
}
|
||||
|
||||
List<MeteorComponent> oreList = removeBlocksMissingRequiredReagents(this.ores, reagents);
|
||||
List<MeteorComponent> fillerList = getNewFillerList(this.filler, reagents);
|
||||
|
||||
int totalComponentWeight = MeteorComponent.getTotalListWeight(oreList);
|
||||
int totalFillerWeight = MeteorComponent.getTotalListWeight(fillerList);
|
||||
|
||||
for (int i = -radius; i <= radius; i++) {
|
||||
for (int j = -radius; j <= radius; j++) {
|
||||
for (int k = -radius; k <= radius; k++) {
|
||||
if (i * i + j * j + k * k >= (radius + 0.50f) * (radius + 0.50f)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!world.isAirBlock(x + i, y + j, z + k)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (fillerChance < 100 && (fillerChance <= 0 || world.rand.nextFloat() * 100 >= fillerChance)) {
|
||||
setMeteorBlock(x + i, y + j, z + k, world, oreList, totalComponentWeight);
|
||||
} else {
|
||||
setMeteorBlock(x + i, y + j, z + k, world, fillerList, totalFillerWeight);
|
||||
}
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static ItemStack findItemStack(String modid, String name, int meta) {
|
||||
ItemStack is = GameRegistry.findItemStack(modid, name, 1);
|
||||
if (is == null) return null;
|
||||
Items.feather.setDamage(is, meta);
|
||||
return is;
|
||||
private int getNewRadius(int radius, List<Reagent> reagents) {
|
||||
radius += MeteorReagentRegistry.getLargestRadiusIncrease(reagents);
|
||||
radius += MeteorReagentRegistry.getLargestRadiusDecrease(reagents);
|
||||
return Math.max(radius, 1);
|
||||
}
|
||||
|
||||
private float getNewFillerChance(float fillerChance, List<Reagent> reagents) {
|
||||
// Don't add filler to meteors that have none
|
||||
if (fillerChance <= 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
float increase = MeteorReagentRegistry.getLargestFillerChanceIncrease(reagents);
|
||||
float decrease = MeteorReagentRegistry.getLargestFillerChanceDecrease(reagents);
|
||||
// Avoid division by zero
|
||||
if (decrease == -100) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
fillerChance += MeteorReagentRegistry.getLargestRawFillerChanceIncrease(reagents);
|
||||
fillerChance += MeteorReagentRegistry.getLargestRawFillerChanceDecrease(reagents);
|
||||
if (increase > 0) {
|
||||
fillerChance = 100 * (fillerChance + increase) / (100 + increase);
|
||||
} else if (decrease < 0) {
|
||||
fillerChance = 100 * (fillerChance + decrease) / (100 + decrease);
|
||||
}
|
||||
return Math.max(0, Math.min(fillerChance, 100));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a new filler list. The original list is entirely replaced if any of the supplied reagents have a filler
|
||||
* config.
|
||||
*/
|
||||
private List<MeteorComponent> getNewFillerList(List<MeteorComponent> fillerList, List<Reagent> reagents) {
|
||||
List<MeteorComponent> reagentFillers = getFillerList(reagents);
|
||||
reagentFillers = removeBlocksMissingRequiredReagents(reagentFillers, reagents);
|
||||
if (!reagentFillers.isEmpty() && reagentFillers.get(0) != defaultMeteorBlock) {
|
||||
return reagentFillers;
|
||||
}
|
||||
return removeBlocksMissingRequiredReagents(fillerList, reagents);
|
||||
}
|
||||
|
||||
private List<MeteorComponent> removeBlocksMissingRequiredReagents(List<MeteorComponent> blockList,
|
||||
List<Reagent> reagents) {
|
||||
ArrayList<MeteorComponent> newList = new ArrayList<>();
|
||||
for (MeteorComponent component : blockList) {
|
||||
if (component.checkForReagent(reagents)) {
|
||||
newList.add(component);
|
||||
}
|
||||
}
|
||||
if (newList.isEmpty()) { // Use the default if every filler requires a reagent
|
||||
newList.add(defaultMeteorBlock);
|
||||
}
|
||||
return newList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a randomly chosen block from blocklist according to the MeteorComponent weights at position x, y, z in the
|
||||
* provided world.
|
||||
*/
|
||||
private void setMeteorBlock(int x, int y, int z, World world, List<MeteorComponent> blockList,
|
||||
int totalListWeight) {
|
||||
int randNum = world.rand.nextInt(totalListWeight);
|
||||
for (MeteorComponent component : blockList) {
|
||||
randNum -= component.getWeight();
|
||||
|
||||
if (randNum < 0) {
|
||||
ItemStack blockStack = component.getBlock();
|
||||
if (blockStack != null && blockStack.getItem() instanceof ItemBlock) {
|
||||
((ItemBlock) blockStack.getItem())
|
||||
.placeBlockAt(blockStack, null, world, x, y, z, 0, 0, 0, 0, blockStack.getItemDamage());
|
||||
if (AlchemicalWizardry.isGregTechLoaded) setGTOresNaturalIfNeeded(world, x, y, z);
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void validate() {
|
||||
this.preventNullLists();
|
||||
this.clampNumericalValues();
|
||||
this.buildFocusItem();
|
||||
this.maxWeightToFillerChance();
|
||||
}
|
||||
|
||||
private void preventNullLists() {
|
||||
if (ores == null || ores.isEmpty()) {
|
||||
ores = new ArrayList<>();
|
||||
ores.add(defaultMeteorBlock);
|
||||
}
|
||||
while (ores.contains(null)) {
|
||||
ores.remove(null);
|
||||
}
|
||||
if (filler == null || filler.isEmpty()) {
|
||||
filler = new ArrayList<>();
|
||||
filler.add(defaultMeteorBlock);
|
||||
}
|
||||
while (filler.contains(null)) {
|
||||
filler.remove(null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clamps all numerical values to their minimum/maximum values.
|
||||
*/
|
||||
private void clampNumericalValues() {
|
||||
radius = Math.max(1, radius);
|
||||
cost = Math.max(0, cost);
|
||||
fillerChance = Math.max(0f, Math.min(fillerChance, 100.0f));
|
||||
focusMeta = Math.max(0, focusMeta);
|
||||
maxWeight = Math.max(0, maxWeight);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct the focus item for this meteor from its modid, name, and metadata if using the old config format.
|
||||
*/
|
||||
private void buildFocusItem() {
|
||||
if (this.focusItem != null) return;
|
||||
this.focusItem = GameRegistry.findItemStack(this.focusModId, this.focusName, 1);
|
||||
if (this.focusItem == null) return;
|
||||
this.focusItem.setItemDamage(this.focusMeta);
|
||||
AlchemicalWizardry.logger.warn(
|
||||
"Setting focusModId, focusName, and focusMeta individually in meteor"
|
||||
+ "configs has been deprecated. Set \"focusItem\" with format \"modId:name(:meta optional)\""
|
||||
+ " instead.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn the maximum weight into an equivalent filler chance based on the provided block list. Does NOT restrict
|
||||
* blocks over the max weight like the old weight system! Specify required reagents for the blocks you want to
|
||||
* restrict in the ores tag for the meteor's config instead! This is used for the default meteors which include
|
||||
* certain ores which may not be present in all environments.
|
||||
*/
|
||||
private void maxWeightToFillerChance() {
|
||||
if (maxWeight <= 0 || fillerChance > 0) {
|
||||
return;
|
||||
}
|
||||
this.fillerChance = Math.max(0f, Math.min(100f * (1 - ((float) getTotalListWeight(ores) / maxWeight)), 100.0f));
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "gregtech")
|
||||
private static void setGTOresNaturalIfNeeded(World world, int x, int y, int z) {
|
||||
final TileEntity tileEntity = world.getTileEntity(x, y, z);
|
||||
if (tileEntity instanceof TileEntityOres) {
|
||||
((TileEntityOres) tileEntity).mNatural = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
package WayofTime.alchemicalWizardry.common.summoning.meteor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class MeteorComponent {
|
||||
|
||||
private final int weight;
|
||||
private final ItemStack itemStack;
|
||||
private final ArrayList<Reagent> reagent;
|
||||
public static MeteorComponent defaultMeteorBlock;
|
||||
|
||||
public static void setDefaultMeteorBlock() {
|
||||
String string = AlchemicalWizardry.defaultMeteorBlock;
|
||||
String[] split = string.split(":");
|
||||
ItemStack stack = null;
|
||||
if (!string.isEmpty() && split.length >= 3) {
|
||||
stack = GameRegistry.findItemStack(split[0], split[1], 1);
|
||||
}
|
||||
if (stack != null) {
|
||||
Items.feather.setDamage(stack, Integer.parseInt(split[2]));
|
||||
} else {
|
||||
stack = new ItemStack(Blocks.stone);
|
||||
}
|
||||
defaultMeteorBlock = new MeteorComponent(stack, 1);
|
||||
}
|
||||
|
||||
public MeteorComponent(ItemStack stack, int weight) {
|
||||
this(stack, weight, new ArrayList<>());
|
||||
}
|
||||
|
||||
public MeteorComponent(ItemStack stack, int weight, ArrayList<Reagent> reagent) {
|
||||
this.itemStack = stack;
|
||||
this.weight = weight;
|
||||
this.reagent = reagent;
|
||||
}
|
||||
|
||||
public static List<MeteorComponent> parseStringArray(String[] blockArray) {
|
||||
List<MeteorComponent> addList = new ArrayList<>();
|
||||
if (blockArray == null) {
|
||||
return addList;
|
||||
}
|
||||
for (String blockName : blockArray) {
|
||||
MeteorComponent component = parseString(blockName);
|
||||
if (component != null) {
|
||||
addList.add(component);
|
||||
}
|
||||
}
|
||||
return addList;
|
||||
}
|
||||
|
||||
// modId:itemName:meta:weight(:reagent1, reagent2, ... optional)
|
||||
private static final Pattern itemNamePattern = Pattern.compile("(.*):(.*):(\\d+):(\\d+)(:.*)?");
|
||||
// OREDICT:oreDictName:weight(:reagent1, reagent2, ... optional)
|
||||
private static final Pattern oredictPattern = Pattern.compile("OREDICT:(.*):(\\d+)(:.*)?");
|
||||
|
||||
public static MeteorComponent parseString(String blockName) {
|
||||
Matcher matcher = itemNamePattern.matcher(blockName);
|
||||
if (matcher.matches()) {
|
||||
String modID = matcher.group(1);
|
||||
String itemName = matcher.group(2);
|
||||
int meta = Integer.parseInt(matcher.group(3));
|
||||
int weight = Integer.parseInt(matcher.group(4));
|
||||
String reagent = matcher.group(5);
|
||||
|
||||
ArrayList<Reagent> reagentList = MeteorReagent.parseReagents(reagent, blockName);
|
||||
|
||||
ItemStack stack = GameRegistry.findItemStack(modID, itemName, 1);
|
||||
if (stack != null && stack.getItem() instanceof ItemBlock) {
|
||||
stack.setItemDamage(meta);
|
||||
return new MeteorComponent(stack, weight, reagentList);
|
||||
}
|
||||
|
||||
} else if ((matcher = oredictPattern.matcher(blockName)).matches()) {
|
||||
String oreDict = matcher.group(1);
|
||||
int weight = Integer.parseInt(matcher.group(2));
|
||||
String reagent = matcher.group(3);
|
||||
|
||||
ArrayList<Reagent> reagentList = MeteorReagent.parseReagents(reagent, blockName);
|
||||
|
||||
List<ItemStack> list = OreDictionary.getOres(oreDict);
|
||||
for (ItemStack stack : list) {
|
||||
if (stack != null && stack.getItem() instanceof ItemBlock) {
|
||||
return new MeteorComponent(stack, weight, reagentList);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
AlchemicalWizardry.logger.warn("Unable to add Meteor Component \"{}\"", blockName);
|
||||
AlchemicalWizardry.logger.warn(
|
||||
"Valid formats are \"modId:itemName:meta:weight(:reagent1, reagent2, ... optional)\" and \"OREDICT:oreDictName:weight(:reagent1, reagent2, ... optional)\".");
|
||||
return null;
|
||||
}
|
||||
|
||||
public int getWeight() {
|
||||
return this.weight;
|
||||
}
|
||||
|
||||
public static int getTotalListWeight(List<MeteorComponent> blockList) {
|
||||
int totalWeight = 0;
|
||||
for (MeteorComponent component : blockList) {
|
||||
totalWeight += component.getWeight();
|
||||
}
|
||||
return totalWeight;
|
||||
}
|
||||
|
||||
public ItemStack getBlock() {
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
public ArrayList<Reagent> getRequiredReagents() {
|
||||
return reagent;
|
||||
}
|
||||
|
||||
public boolean checkForReagent(List<Reagent> reagentList) {
|
||||
if (reagent.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
for (Reagent r1 : reagentList) {
|
||||
for (Reagent r2 : reagent) {
|
||||
if (r1.equals(r2)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package WayofTime.alchemicalWizardry.common.summoning.meteor;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
|
||||
class MeteorComponentAdapter extends TypeAdapter<MeteorComponent> {
|
||||
|
||||
@Override
|
||||
public MeteorComponent read(JsonReader reader) throws IOException {
|
||||
return MeteorComponent.parseString(reader.nextString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(JsonWriter writer, MeteorComponent component) throws IOException {
|
||||
// Not implemented because it is not needed.
|
||||
}
|
||||
}
|
||||
-182
@@ -1,182 +0,0 @@
|
||||
package WayofTime.alchemicalWizardry.common.summoning.meteor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import gregtech.common.blocks.GT_TileEntity_Ores;
|
||||
|
||||
public class MeteorParadigm {
|
||||
|
||||
public List<MeteorParadigmComponent> componentList = new ArrayList<>();
|
||||
public ItemStack focusStack;
|
||||
public int radius;
|
||||
public int cost;
|
||||
|
||||
public static Random rand = new Random();
|
||||
|
||||
public MeteorParadigm(ItemStack focusStack, int radius, int cost) {
|
||||
this.focusStack = focusStack;
|
||||
this.radius = radius;
|
||||
this.cost = cost;
|
||||
}
|
||||
|
||||
public void parseStringArray(String[] oreArray) {
|
||||
for (int i = 0; i + 1 < oreArray.length; i += 2) {
|
||||
String oreName = oreArray[i];
|
||||
int oreChance = Integer.parseInt(oreArray[i + 1]);
|
||||
MeteorParadigmComponent mpc = new MeteorParadigmComponent(oreName, oreChance);
|
||||
componentList.add(mpc);
|
||||
}
|
||||
}
|
||||
|
||||
public int getTotalMeteorWeight() {
|
||||
int totalMeteorWeight = 0;
|
||||
for (MeteorParadigmComponent mpc : componentList) {
|
||||
if (mpc == null || !mpc.isValidBlockParadigm()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
totalMeteorWeight += mpc.getChance();
|
||||
}
|
||||
return totalMeteorWeight;
|
||||
}
|
||||
|
||||
public void createMeteorImpact(World world, int x, int y, int z, boolean[] flags) {
|
||||
boolean hasTerrae = false;
|
||||
boolean hasOrbisTerrae = false;
|
||||
boolean hasCrystallos = false;
|
||||
boolean hasIncendium = false;
|
||||
boolean hasTennebrae = false;
|
||||
|
||||
if (flags != null && flags.length >= 5) {
|
||||
hasTerrae = flags[0];
|
||||
hasOrbisTerrae = flags[1];
|
||||
hasCrystallos = flags[2];
|
||||
hasIncendium = flags[3];
|
||||
hasTennebrae = flags[4];
|
||||
}
|
||||
|
||||
int newRadius = radius;
|
||||
|
||||
if (hasOrbisTerrae) {
|
||||
newRadius += 2;
|
||||
} else if (hasTerrae) {
|
||||
newRadius += 1;
|
||||
}
|
||||
|
||||
world.createExplosion(null, x, y, z, newRadius * 4, AlchemicalWizardry.doMeteorsDestroyBlocks);
|
||||
|
||||
float iceChance = hasCrystallos ? 1 : 0;
|
||||
float soulChance = hasIncendium ? 1 : 0;
|
||||
float obsidChance = hasTennebrae ? 1 : 0;
|
||||
|
||||
float totalChance = iceChance + soulChance + obsidChance;
|
||||
|
||||
int totalMeteorWeight = getTotalMeteorWeight();
|
||||
|
||||
for (int i = -newRadius; i <= newRadius; i++) {
|
||||
for (int j = -newRadius; j <= newRadius; j++) {
|
||||
for (int k = -newRadius; k <= newRadius; k++) {
|
||||
if (i * i + j * j + k * k >= (newRadius + 0.50f) * (newRadius + 0.50f)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!world.isAirBlock(x + i, y + j, z + k)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int randNum = world.rand.nextInt(totalMeteorWeight);
|
||||
|
||||
boolean hasPlacedBlock = false;
|
||||
|
||||
for (MeteorParadigmComponent mpc : componentList) {
|
||||
if (mpc == null || !mpc.isValidBlockParadigm()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
randNum -= mpc.getChance();
|
||||
|
||||
if (randNum < 0) {
|
||||
ItemStack blockStack = mpc.getValidBlockParadigm();
|
||||
if (blockStack != null && blockStack.getItem() instanceof ItemBlock) {
|
||||
((ItemBlock) blockStack.getItem()).placeBlockAt(
|
||||
blockStack,
|
||||
null,
|
||||
world,
|
||||
x + i,
|
||||
y + j,
|
||||
z + k,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
blockStack.getItemDamage());
|
||||
if (AlchemicalWizardry.isGregTechLoaded)
|
||||
setGTOresNaturalIfNeeded(world, x + i, y + j, z + k);
|
||||
world.markBlockForUpdate(x + i, y + j, z + k);
|
||||
hasPlacedBlock = true;
|
||||
break;
|
||||
}
|
||||
// world.setBlock(x + i, y + j, z + k,
|
||||
// Block.getBlockById(Item.getIdFromItem(blockStack.getItem())), blockStack.getItemDamage(),
|
||||
// 3);
|
||||
// hasPlacedBlock = true;
|
||||
// break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasPlacedBlock) {
|
||||
float randChance = rand.nextFloat() * totalChance;
|
||||
|
||||
if (randChance < iceChance) {
|
||||
world.setBlock(x + i, y + j, z + k, Blocks.ice, 0, 3);
|
||||
} else {
|
||||
randChance -= iceChance;
|
||||
|
||||
if (randChance < soulChance) {
|
||||
switch (rand.nextInt(3)) {
|
||||
case 0:
|
||||
world.setBlock(x + i, y + j, z + k, Blocks.soul_sand, 0, 3);
|
||||
break;
|
||||
case 1:
|
||||
world.setBlock(x + i, y + j, z + k, Blocks.glowstone, 0, 3);
|
||||
break;
|
||||
case 2:
|
||||
world.setBlock(x + i, y + j, z + k, Blocks.netherrack, 0, 3);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
randChance -= soulChance;
|
||||
|
||||
if (randChance < obsidChance) {
|
||||
world.setBlock(x + i, y + j, z + k, Blocks.obsidian, 0, 3);
|
||||
} else {
|
||||
randChance -= obsidChance;
|
||||
|
||||
world.setBlock(x + i, y + j, z + k, Blocks.stone, 0, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "gregtech")
|
||||
private static void setGTOresNaturalIfNeeded(World world, int x, int y, int z) {
|
||||
final TileEntity tileEntity = world.getTileEntity(x, y, z);
|
||||
if (tileEntity instanceof GT_TileEntity_Ores) {
|
||||
((GT_TileEntity_Ores) tileEntity).mNatural = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
-46
@@ -1,46 +0,0 @@
|
||||
package WayofTime.alchemicalWizardry.common.summoning.meteor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class MeteorParadigmComponent {
|
||||
|
||||
public String oreDictName;
|
||||
public int chance;
|
||||
|
||||
public MeteorParadigmComponent(String dictName, int chance) {
|
||||
this.oreDictName = dictName;
|
||||
this.chance = chance;
|
||||
}
|
||||
|
||||
public boolean isValidBlockParadigm() {
|
||||
if (this.getValidBlockParadigm() != null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getOreDictName() {
|
||||
return this.oreDictName;
|
||||
}
|
||||
|
||||
public int getChance() {
|
||||
return this.chance;
|
||||
}
|
||||
|
||||
public ItemStack getValidBlockParadigm() {
|
||||
List<ItemStack> list = OreDictionary.getOres(getOreDictName());
|
||||
|
||||
for (ItemStack stack : list) {
|
||||
if (stack != null && stack.getItem() instanceof ItemBlock) {
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package WayofTime.alchemicalWizardry.common.summoning.meteor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
|
||||
public class MeteorReagent {
|
||||
|
||||
public boolean disableExplosions = false;
|
||||
public boolean invertExplosionBlockDamage = false;
|
||||
public int radiusChange = 0;
|
||||
public int fillerChanceChange = 0;
|
||||
public float rawFillerChanceChange = 0;
|
||||
public List<MeteorComponent> filler = new ArrayList<>();
|
||||
|
||||
public static ArrayList<Reagent> parseReagents(String reagent, String blockName) {
|
||||
ArrayList<Reagent> reagentList = new ArrayList<>();
|
||||
if (reagent != null) {
|
||||
String[] reagents = reagent.substring(1).split(", ?");
|
||||
for (String str : reagents) {
|
||||
Reagent r = ReagentRegistry.getReagentForKey(str);
|
||||
if (r == null) {
|
||||
AlchemicalWizardry.logger.warn("Unable to add reagent \"{}\" for {}.", str, blockName);
|
||||
continue;
|
||||
}
|
||||
reagentList.add(r);
|
||||
}
|
||||
}
|
||||
return reagentList;
|
||||
}
|
||||
}
|
||||
+202
@@ -0,0 +1,202 @@
|
||||
package WayofTime.alchemicalWizardry.common.summoning.meteor;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry.reagentList;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
|
||||
public class MeteorReagentRegistry {
|
||||
|
||||
public static Map<Reagent, MeteorReagent> reagents = new HashMap<>();
|
||||
|
||||
public static void loadConfig() {
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting()
|
||||
.registerTypeAdapter(MeteorComponent.class, new MeteorComponentAdapter()).create();
|
||||
File file = new File("config/BloodMagic/meteors/reagents/");
|
||||
File[] files = file.listFiles();
|
||||
if (files != null) {
|
||||
for (String reagent : reagentList.keySet()) {
|
||||
try {
|
||||
File f = new File("config/BloodMagic/meteors/reagents/" + reagent + ".json");
|
||||
if (!f.isFile()) {
|
||||
continue;
|
||||
}
|
||||
BufferedReader br = new BufferedReader(new FileReader(f));
|
||||
MeteorReagent r = gson.fromJson(br, MeteorReagent.class);
|
||||
if (r == null) {
|
||||
continue;
|
||||
}
|
||||
reagents.put(ReagentRegistry.getReagentForKey(reagent), r);
|
||||
} catch (FileNotFoundException | JsonSyntaxException e) {
|
||||
AlchemicalWizardry.logger.warn("Error adding reagent {}", reagent);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the one largest radius increase from all given reagents (positive value in config).
|
||||
*/
|
||||
public static int getLargestRadiusIncrease(List<Reagent> reagentList) {
|
||||
int increase = 0;
|
||||
for (Reagent r : reagentList) {
|
||||
if (!reagents.containsKey(r)) {
|
||||
continue;
|
||||
}
|
||||
int change = reagents.get(r).radiusChange;
|
||||
if (change > increase) {
|
||||
increase = change;
|
||||
}
|
||||
}
|
||||
return increase;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the one largest radius decrease from all given reagents (negative value in config).
|
||||
*/
|
||||
public static int getLargestRadiusDecrease(List<Reagent> reagentList) {
|
||||
int decrease = 0;
|
||||
for (Reagent r : reagentList) {
|
||||
if (!reagents.containsKey(r)) {
|
||||
continue;
|
||||
}
|
||||
int change = reagents.get(r).radiusChange;
|
||||
if (change < decrease) {
|
||||
decrease = change;
|
||||
}
|
||||
}
|
||||
return decrease;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the one largest filler chance increase from all given reagents (positive value in config).
|
||||
*/
|
||||
public static int getLargestFillerChanceIncrease(List<Reagent> reagentList) {
|
||||
int increase = 0;
|
||||
for (Reagent r : reagentList) {
|
||||
if (!reagents.containsKey(r)) {
|
||||
continue;
|
||||
}
|
||||
int change = reagents.get(r).fillerChanceChange;
|
||||
if (change > increase) {
|
||||
increase = change;
|
||||
}
|
||||
}
|
||||
return increase;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the one largest filler chance decrease from all given reagents (negative value in config).
|
||||
*/
|
||||
public static int getLargestFillerChanceDecrease(List<Reagent> reagentList) {
|
||||
int decrease = 0;
|
||||
for (Reagent r : reagentList) {
|
||||
if (!reagents.containsKey(r)) {
|
||||
continue;
|
||||
}
|
||||
int change = reagents.get(r).fillerChanceChange;
|
||||
if (change < decrease) {
|
||||
decrease = change;
|
||||
}
|
||||
}
|
||||
return decrease;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the one largest raw filler chance increase from all given reagents (positive value in config).
|
||||
*/
|
||||
public static float getLargestRawFillerChanceIncrease(List<Reagent> reagentList) {
|
||||
float increase = 0;
|
||||
for (Reagent r : reagentList) {
|
||||
if (!reagents.containsKey(r)) {
|
||||
continue;
|
||||
}
|
||||
float change = reagents.get(r).rawFillerChanceChange;
|
||||
if (change > increase) {
|
||||
increase = change;
|
||||
}
|
||||
}
|
||||
return increase;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the one largest raw filler chance decrease from all given reagents (negative value in config).
|
||||
*/
|
||||
public static float getLargestRawFillerChanceDecrease(List<Reagent> reagentList) {
|
||||
float decrease = 0;
|
||||
for (Reagent r : reagentList) {
|
||||
if (!reagents.containsKey(r)) {
|
||||
continue;
|
||||
}
|
||||
float change = reagents.get(r).rawFillerChanceChange;
|
||||
if (change < decrease) {
|
||||
decrease = change;
|
||||
}
|
||||
}
|
||||
return decrease;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a list of the MeteorComponents that the given reagents will use to replace filler.
|
||||
*/
|
||||
public static List<MeteorComponent> getFillerList(List<Reagent> reagentList) {
|
||||
List<MeteorComponent> fillerList = new ArrayList<>();
|
||||
for (Reagent r : reagentList) {
|
||||
if (!reagents.containsKey(r)) {
|
||||
continue;
|
||||
}
|
||||
List<MeteorComponent> filler = reagents.get(r).filler;
|
||||
if (filler != null && !filler.isEmpty()) {
|
||||
fillerList.addAll(filler);
|
||||
}
|
||||
}
|
||||
return fillerList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return false if any of the given reagents disable explosions, otherwise true
|
||||
*/
|
||||
public static boolean doExplosions(List<Reagent> reagentList) {
|
||||
for (Reagent r : reagentList) {
|
||||
if (!reagents.containsKey(r)) {
|
||||
continue;
|
||||
}
|
||||
if (reagents.get(r).disableExplosions) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the value of the config AlchemicalWizardry.doMeteorsDestroyBlocks if no reagent inverts explosion block
|
||||
* damage. If any reagent inverts explosion block damage, the inverse of the config
|
||||
* AlchemicalWizardry.doMeteorsDestroyBlocks is returned.
|
||||
*/
|
||||
public static boolean doMeteorsDestroyBlocks(List<Reagent> reagentList) {
|
||||
for (Reagent r : reagentList) {
|
||||
if (!reagents.containsKey(r)) {
|
||||
continue;
|
||||
}
|
||||
if (reagents.get(r).invertExplosionBlockDamage) {
|
||||
return !AlchemicalWizardry.doMeteorsDestroyBlocks;
|
||||
}
|
||||
}
|
||||
return AlchemicalWizardry.doMeteorsDestroyBlocks;
|
||||
}
|
||||
}
|
||||
+58
-18
@@ -1,5 +1,9 @@
|
||||
package WayofTime.alchemicalWizardry.common.summoning.meteor;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -7,35 +11,71 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
|
||||
public class MeteorRegistry {
|
||||
|
||||
public static List<MeteorParadigm> paradigmList = new ArrayList<>();
|
||||
public static List<Meteor> meteorList = new ArrayList<>();
|
||||
|
||||
public static void registerMeteorParadigm(MeteorParadigm paradigm) {
|
||||
paradigmList.add(paradigm);
|
||||
}
|
||||
|
||||
public static void registerMeteorParadigm(ItemStack stack, String[] oreList, int radius, int cost) {
|
||||
if (stack != null && oreList != null) {
|
||||
MeteorParadigm meteor = new MeteorParadigm(stack, radius, cost);
|
||||
meteor.parseStringArray(oreList);
|
||||
paradigmList.add(meteor);
|
||||
public static void loadConfig() {
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting()
|
||||
.registerTypeAdapter(MeteorComponent.class, new MeteorComponentAdapter())
|
||||
.registerTypeAdapter(ItemStack.class, new ItemStackAdapter()).create();
|
||||
File file = new File("config/BloodMagic/meteors");
|
||||
File[] files = file.listFiles();
|
||||
if (files != null) {
|
||||
for (File f : files) {
|
||||
try {
|
||||
if (f.isDirectory() || !f.getName().endsWith(".json")) {
|
||||
continue;
|
||||
}
|
||||
BufferedReader br = new BufferedReader(new FileReader(f));
|
||||
Meteor m = gson.fromJson(br, Meteor.class);
|
||||
MeteorRegistry.registerMeteor(m);
|
||||
} catch (FileNotFoundException | JsonSyntaxException e) {
|
||||
AlchemicalWizardry.logger.warn("Error adding meteor {}", f.getName());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void createMeteorImpact(World world, int x, int y, int z, int paradigmID, boolean[] flags) {
|
||||
if (paradigmID < paradigmList.size()) {
|
||||
paradigmList.get(paradigmID).createMeteorImpact(world, x, y, z, flags);
|
||||
public static void registerMeteor(Meteor meteor) {
|
||||
meteor.validate();
|
||||
meteorList.add(meteor);
|
||||
}
|
||||
|
||||
public static void registerMeteor(ItemStack stack, String[] componentList, int radius, int cost) {
|
||||
registerMeteor(stack, MeteorComponent.parseStringArray(componentList), radius, cost, null, 0);
|
||||
}
|
||||
|
||||
public static void registerMeteor(ItemStack stack, List<MeteorComponent> componentList, int radius, int cost,
|
||||
List<MeteorComponent> fillerList, int fillerChance) {
|
||||
if (stack != null && componentList != null) {
|
||||
Meteor meteor = new Meteor(stack, radius, cost, fillerChance, componentList, fillerList);
|
||||
meteor.validate();
|
||||
meteorList.add(meteor);
|
||||
}
|
||||
}
|
||||
|
||||
public static int getParadigmIDForItem(ItemStack stack) {
|
||||
public static void createMeteorImpact(World world, int x, int y, int z, int meteorID, List<Reagent> reagents) {
|
||||
if (meteorID < meteorList.size()) {
|
||||
meteorList.get(meteorID).createMeteorImpact(world, x, y, z, reagents);
|
||||
}
|
||||
}
|
||||
|
||||
public static int getMeteorIDForItem(ItemStack stack) {
|
||||
if (stack == null) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (int i = 0; i < paradigmList.size(); i++) {
|
||||
ItemStack focusStack = paradigmList.get(i).focusStack;
|
||||
for (int i = 0; i < meteorList.size(); i++) {
|
||||
ItemStack focusStack = meteorList.get(i).focusItem;
|
||||
|
||||
if (focusStack != null && focusStack.getItem() == stack.getItem()
|
||||
&& (focusStack.getItemDamage() == OreDictionary.WILDCARD_VALUE
|
||||
@@ -47,7 +87,7 @@ public class MeteorRegistry {
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static boolean isValidParadigmItem(ItemStack stack) {
|
||||
return getParadigmIDForItem(stack) != -1;
|
||||
public static boolean isValidMeteorFocusItem(ItemStack stack) {
|
||||
return getMeteorIDForItem(stack) != -1;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,7 @@
|
||||
package WayofTime.alchemicalWizardry.common.tileEntity;
|
||||
|
||||
import java.text.NumberFormat;
|
||||
import java.util.List;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
@@ -42,10 +38,14 @@ import WayofTime.alchemicalWizardry.common.bloodAltarUpgrade.UpgradedAltars;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.compat.BloodMagicWailaPlugin;
|
||||
import WayofTime.alchemicalWizardry.compat.IBloodMagicWailaProvider;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
|
||||
public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, IBloodAltar, IBloodMagicWailaProvider {
|
||||
|
||||
public static final int sizeInv = 1;
|
||||
public static final int BASE_RECIPE_DELAY = 100;
|
||||
public static final double CRAFTING_DELAY_RUNE_EFFICIENCY = 0.8D;
|
||||
|
||||
private int resultID;
|
||||
private int resultDamage;
|
||||
@@ -71,6 +71,8 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
protected FluidStack fluidOutput;
|
||||
protected FluidStack fluidInput;
|
||||
private int progress;
|
||||
private long nextForcedRecipeCheck;
|
||||
private int maxDelayBeforeNextCraft;
|
||||
|
||||
private int lockdownDuration;
|
||||
private int demonBloodDuration;
|
||||
@@ -98,6 +100,8 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
progress = 0;
|
||||
this.lockdownDuration = 0;
|
||||
this.demonBloodDuration = 0;
|
||||
this.nextForcedRecipeCheck = -1;
|
||||
this.maxDelayBeforeNextCraft = BASE_RECIPE_DELAY;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -448,7 +452,9 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
return;
|
||||
}
|
||||
|
||||
if (!worldObj.isRemote && worldObj.getWorldTime() % 20 == 0) {
|
||||
final long totalWorldTime = worldObj.getTotalWorldTime();
|
||||
|
||||
if (totalWorldTime % 20 == 0) {
|
||||
{
|
||||
Block block = worldObj.getBlock(xCoord + 1, yCoord, zCoord);
|
||||
block.onNeighborBlockChange(worldObj, xCoord + 1, yCoord, zCoord, block);
|
||||
@@ -497,7 +503,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
// }
|
||||
}
|
||||
|
||||
if (worldObj.getWorldTime() % Math.max(20 - this.accelerationUpgrades, 1) == 0) {
|
||||
if (totalWorldTime % Math.max(20 - this.accelerationUpgrades, 1) == 0) {
|
||||
int syphonMax = (int) (20 * this.dislocationMultiplier);
|
||||
int fluidInputted = 0;
|
||||
int fluidOutputted = 0;
|
||||
@@ -511,7 +517,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
this.fluid.amount -= fluidOutputted;
|
||||
}
|
||||
|
||||
if (worldObj.getWorldTime() % 100 == 0 && (this.isActive || this.cooldownAfterCrafting <= 0)) {
|
||||
if (shouldTryToStartCycle(totalWorldTime) && (this.isActive || this.cooldownAfterCrafting <= 0)) {
|
||||
startCycle();
|
||||
}
|
||||
|
||||
@@ -526,8 +532,6 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
return;
|
||||
}
|
||||
|
||||
int worldTime = (int) (worldObj.getWorldTime() % 24000);
|
||||
|
||||
if (worldObj.isRemote) {
|
||||
return;
|
||||
}
|
||||
@@ -546,7 +550,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
fluid.amount = fluid.amount - liquidDrained;
|
||||
progress += liquidDrained;
|
||||
|
||||
if (worldTime % 4 == 0) {
|
||||
if (totalWorldTime % 4 == 0) {
|
||||
SpellHelper.sendIndexedParticleToAllAround(
|
||||
worldObj,
|
||||
xCoord,
|
||||
@@ -584,11 +588,14 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
zCoord + 0.5f);
|
||||
}
|
||||
this.isActive = false;
|
||||
if (this.nextForcedRecipeCheck < 0) {
|
||||
this.nextForcedRecipeCheck = this.worldObj.getTotalWorldTime() + this.maxDelayBeforeNextCraft;
|
||||
}
|
||||
}
|
||||
} else if (progress > 0) {
|
||||
progress -= (int) (efficiencyMultiplier * drainRate);
|
||||
|
||||
if (worldTime % 2 == 0) {
|
||||
if (totalWorldTime % 2 == 0) {
|
||||
SpellHelper.sendIndexedParticleToAllAround(
|
||||
worldObj,
|
||||
xCoord,
|
||||
@@ -634,7 +641,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
|
||||
fluid.amount = fluid.amount - drain;
|
||||
|
||||
if (worldTime % 4 == 0) {
|
||||
if (totalWorldTime % 4 == 0) {
|
||||
SpellHelper.sendIndexedParticleToAllAround(
|
||||
worldObj,
|
||||
xCoord,
|
||||
@@ -654,6 +661,23 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
}
|
||||
}
|
||||
|
||||
private boolean shouldTryToStartCycle(final long totalWorldTime) {
|
||||
// use total time instead of world time so that we can update even if doDaylightCycle is false
|
||||
if (!this.isActive && this.nextForcedRecipeCheck >= 0) {
|
||||
if (this.nextForcedRecipeCheck <= totalWorldTime) {
|
||||
this.nextForcedRecipeCheck = -1;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// if the regular recipe check occurs before the forced recipe check we can just un-schedule it.
|
||||
if (totalWorldTime % BASE_RECIPE_DELAY == 0) {
|
||||
this.nextForcedRecipeCheck = -1;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setActive() {
|
||||
isActive = false;
|
||||
}
|
||||
@@ -772,6 +796,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
this.orbCapacityMultiplier = 1;
|
||||
this.dislocationMultiplier = 1;
|
||||
this.accelerationUpgrades = 0;
|
||||
this.maxDelayBeforeNextCraft = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -789,6 +814,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
this.dislocationMultiplier = 1;
|
||||
this.upgradeLevel = upgradeState;
|
||||
this.accelerationUpgrades = 0;
|
||||
this.maxDelayBeforeNextCraft = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -805,6 +831,10 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
this.capacity = (int) (FluidContainerRegistry.BUCKET_VOLUME * 10 * capacityMultiplier);
|
||||
this.bufferCapacity = (int) (FluidContainerRegistry.BUCKET_VOLUME * 1 * capacityMultiplier);
|
||||
this.accelerationUpgrades = upgrades.getAccelerationUpgrades();
|
||||
this.maxDelayBeforeNextCraft = Math.max(
|
||||
1,
|
||||
(int) Math.floor(
|
||||
BASE_RECIPE_DELAY * Math.pow(CRAFTING_DELAY_RUNE_EFFICIENCY, upgrades.getQuicknessUpgrades())));
|
||||
|
||||
if (this.fluid.amount > this.capacity) {
|
||||
this.fluid.amount = this.capacity;
|
||||
@@ -910,13 +940,16 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
|
||||
public void sendChatInfoToPlayer(EntityPlayer player) {
|
||||
player.addChatMessage(
|
||||
new ChatComponentTranslation(String.format("message.altar.currentessence"), this.fluid.amount));
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted("message.altar.currentessence", this.fluid.amount)));
|
||||
player.addChatMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"message.altar.currenttier",
|
||||
UpgradedAltars.isAltarValid(worldObj, xCoord, yCoord, zCoord))));
|
||||
player.addChatMessage(
|
||||
new ChatComponentTranslation(
|
||||
String.format("message.altar.currenttier"),
|
||||
UpgradedAltars.isAltarValid(worldObj, xCoord, yCoord, zCoord)));
|
||||
player.addChatMessage(
|
||||
new ChatComponentTranslation(String.format("message.altar.capacity"), this.getCapacity()));
|
||||
StatCollector.translateToLocalFormatted("message.altar.capacity", this.getCapacity())));
|
||||
}
|
||||
|
||||
public void sendMoreChatInfoToPlayer(EntityPlayer player) {
|
||||
@@ -924,23 +957,25 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
int stackSize = getStackInSlot(0).stackSize;
|
||||
player.addChatMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocal("message.altar.progress") + " "
|
||||
+ progress
|
||||
+ "LP/"
|
||||
+ liquidRequired * stackSize
|
||||
+ "LP"));
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"message.altar.progress",
|
||||
progress,
|
||||
liquidRequired * stackSize)));
|
||||
player.addChatMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocal("message.altar.consumptionrate") + " "
|
||||
+ (int) (consumptionRate * (1 + consumptionMultiplier))
|
||||
+ "LP/t"));
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"message.altar.consumptionrate",
|
||||
(int) (consumptionRate * (1 + consumptionMultiplier)))));
|
||||
}
|
||||
player.addChatMessage(
|
||||
new ChatComponentTranslation(String.format("message.altar.currentessence"), this.fluid.amount));
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted("message.altar.currentessence", this.fluid.amount)));
|
||||
player.addChatMessage(
|
||||
new ChatComponentTranslation(String.format("message.altar.inputtank"), this.fluidInput.amount));
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted("message.altar.inputtank", this.fluidInput.amount)));
|
||||
player.addChatMessage(
|
||||
new ChatComponentTranslation(String.format("message.altar.outputtank"), this.fluidOutput.amount));
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocalFormatted("message.altar.outputtank", this.fluidOutput.amount)));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -957,26 +992,27 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
||||
return;
|
||||
|
||||
final NBTTagCompound altarData = accessor.getNBTData().getCompoundTag("altar");
|
||||
final NumberFormat numberFormat = NumberFormat.getIntegerInstance();
|
||||
|
||||
if (altarData.hasKey("stored")) {
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tooltip.waila.currentFluid")
|
||||
+ numberFormat.format(altarData.getInteger("stored")));
|
||||
StatCollector
|
||||
.translateToLocalFormatted("tooltip.waila.currentFluid", altarData.getInteger("stored")));
|
||||
} else {
|
||||
currenttip.add(StatCollector.translateToLocal("tooltip.waila.noFluid"));
|
||||
}
|
||||
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tooltip.waila.altarCapacity")
|
||||
+ numberFormat.format(altarData.getInteger("capacity")));
|
||||
currenttip.add(StatCollector.translateToLocal("tooltip.waila.tier") + altarData.getInteger("tier"));
|
||||
StatCollector
|
||||
.translateToLocalFormatted("tooltip.waila.altarCapacity", altarData.getInteger("capacity")));
|
||||
currenttip.add(StatCollector.translateToLocalFormatted("tooltip.waila.tier", altarData.getInteger("tier")));
|
||||
|
||||
if (altarData.hasKey("progress")) {
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocal("tooltip.waila.altarProgress") + altarData.getInteger("progress")
|
||||
+ "%");
|
||||
currenttip.add(StatCollector.translateToLocal("tooltip.waila.crafting") + altarData.getString("crafting"));
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"tooltip.waila.altarProgress",
|
||||
altarData.getInteger("progress")));
|
||||
currenttip.add(
|
||||
StatCollector.translateToLocalFormatted("tooltip.waila.crafting", altarData.getString("crafting")));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,9 +5,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -41,6 +38,8 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.compat.BloodMagicWailaPlugin;
|
||||
import WayofTime.alchemicalWizardry.compat.IBloodMagicWailaProvider;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
|
||||
public class TEMasterStone extends TileEntity implements IMasterRitualStone, IBloodMagicWailaProvider {
|
||||
|
||||
|
||||
@@ -20,7 +20,12 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.ColourAndCoords;
|
||||
import WayofTime.alchemicalWizardry.api.Int3;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.*;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.TileSegmentedReagentHandler;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EntityParticleBeam;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
@@ -9,13 +9,13 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.BuildingSchematic;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
public class TESchematicSaver extends TileEntity {
|
||||
|
||||
public Block targetBlock = ModBlocks.largeBloodStoneBrick;
|
||||
|
||||
@@ -3,9 +3,6 @@ package WayofTime.alchemicalWizardry.common.tileEntity;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -24,6 +21,8 @@ import WayofTime.alchemicalWizardry.common.items.TelepositionFocus;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.compat.BloodMagicWailaPlugin;
|
||||
import WayofTime.alchemicalWizardry.compat.IBloodMagicWailaProvider;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
|
||||
public class TETeleposer extends TEInventory implements IBloodMagicWailaProvider {
|
||||
|
||||
|
||||
@@ -2,9 +2,6 @@ package WayofTime.alchemicalWizardry.common.tileEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -33,6 +30,8 @@ import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.compat.BloodMagicWailaPlugin;
|
||||
import WayofTime.alchemicalWizardry.compat.IBloodMagicWailaProvider;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
|
||||
public class TEWritingTable extends TEInventory implements ISidedInventory, IBloodMagicWailaProvider {
|
||||
|
||||
@@ -734,10 +733,11 @@ public class TEWritingTable extends TEInventory implements ISidedInventory, IBlo
|
||||
final NBTTagCompound tag = accessor.getNBTData();
|
||||
final int curProgress = tag.getInteger("progress");
|
||||
if (curProgress > 0) {
|
||||
currenttip.add(StatCollector.translateToLocal("tooltip.waila.altarProgress") + curProgress + "%");
|
||||
currenttip.add(StatCollector.translateToLocalFormatted("tooltip.waila.chemistrySetProgress", curProgress));
|
||||
}
|
||||
if (tag.hasKey("crafting")) {
|
||||
currenttip.add(StatCollector.translateToLocal("tooltip.waila.crafting") + tag.getString("crafting"));
|
||||
currenttip
|
||||
.add(StatCollector.translateToLocalFormatted("tooltip.waila.crafting", tag.getString("crafting")));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,16 +3,15 @@ package WayofTime.alchemicalWizardry.common.tweaker;
|
||||
import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack;
|
||||
import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStacks;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import minetweaker.IUndoableAction;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
|
||||
/**
|
||||
* MineTweaker3 Alchemy Recipe Handler by joshie *
|
||||
|
||||
@@ -2,16 +2,15 @@ package WayofTime.alchemicalWizardry.common.tweaker;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry;
|
||||
import minetweaker.IUndoableAction;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry;
|
||||
|
||||
/**
|
||||
* MineTweaker3 Binding Recipe Handler by joshie *
|
||||
|
||||
Loaded 100 of 120 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user