Compare commits

...
16 Commits
Author SHA1 Message Date
Jason Mitchell 1341be8f49 Make waila optional (#56)
* Make waila optional
2024-09-06 16:20:45 +00:00
NotAPenguin 89eaa78e51 update gt and fix name (#55) 2024-09-03 11:50:50 +02:00
Lyfts a7d6f8e59b Fix teleposer unable to teleport to the end (#54)
* update deps

* fix teleposer unable to teleport to the end
2024-05-19 12:51:13 +02:00
Martin Robertz 6c18cd1bee update 2024-05-10 11:20:30 +02:00
LyftsGitHub GTNH Actionsgithub-actions[bot]
fcddb56254 Fix client-side crash on servers (#52)
* update deps

* fix client crash on servers

* spotlessApply (#53)

Co-authored-by: GitHub GTNH Actions <>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-10 09:36:17 +02:00
Martin Robertz 4a185d64cb update 2024-05-03 19:45:10 +02:00
Guillaume Mercier e14b1f23c9 Add new rune to reduce the delay between crafts (#51)
* add layout.json to gitignore

* Add quickness rune

This rune reduces the delay between consecutive crafts. This is done by essentially scheduling a recipe check every time a recipe completes. Using something like a world accelerator will have no effect on the frequency and the runes themselves do not increase the frequency at which the altar naturally checks for updates.

This commit also addresses a couple other issues with the altar.
- since the altar was using the world time and not the world age, some mechanics were impossible to trigger if you set doDaylightCycle to false.
- For example it was impossible to start a craft if the time wasn't set to a multiple of 100.
2024-05-03 07:09:58 +02:00
Martin Robertz 0b70f3ed51 update 2024-03-25 18:08:13 +01:00
Abdiel Kavash 1c8ceacb7f New formats for meteor config file. (#50) 2024-03-25 16:12:09 +01:00
Raven Szewczyk 3037e0f583 [ci skip] upgraded build system 2024-02-04 19:57:12 +00:00
Martin Robertz 269eff14d3 update bs+deps 2024-01-21 20:31:44 +01:00
Abdiel KavashandMartin Robertz ff2f889c76 Ritual of Gaia's Transformation fixes. (#49)
* Added server->client notification of biome change.

* Fix floating point inaccuracy.

* Replaced inefficient search algorithm.

* Move structure initialization out of a loop. Oops.

* update bs+deps+gardle

* fix wci

* one more

* Always send full 32 bytes with every message.

---------

Co-authored-by: Martin Robertz <[email protected]>
2024-01-21 20:30:57 +01:00
Martin Robertz 3218730853 update deps+bs 2024-01-11 22:58:42 +01:00
Raven Szewczyk e5662ec707 [ci skip] upgraded build system 2024-01-08 21:24:16 +00:00
miozune 6376f78aa5 Fix tooltip for meteor NEI (#48)
* updateBuildScript

* Update dependencies

* Fix warning with AT

* Fix tooltip for meteor NEI
2023-08-08 10:05:01 +02:00
Raven Szewczyk 581d497c9b Only use GTNH CT APIs when GTNH CraftTweaker is present (#46)
* Update buildscript&dependencies

* Only use GTNH CT APIs when GTNH CraftTweaker is present

* Clean up post-rfg migration

* Add warning to the log
2023-07-04 22:11:37 +01:00
51 changed files with 737 additions and 1747 deletions

No files matched your search

-27
View File
@@ -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
+1
View File
@@ -27,3 +27,4 @@ whitelist.json
*.iws
src/main/resources/mixins.*.json
*.bat
/layout.json
+2 -1474
View File
File diff suppressed because it is too large. Load diff
+9 -10
View File
@@ -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")
api("com.github.GTNewHorizons:waila:1.7.3:dev")
api("com.github.GTNewHorizons:NotEnoughItems:2.6.0-GTNH:dev")
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.42.51:dev") {transitive = false }
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.49.55: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 }
compileOnly("com.github.GTNewHorizons:Botania:1.11.1-GTNH:api") {transitive = false }
compileOnly("com.github.GTNewHorizons:ForestryMC:4.9.0:api") {transitive = false }
compileOnly("com.github.GTNewHorizons:ForgeMultipart:1.4.8:dev") {transitive = false }
compileOnly("com.github.GTNewHorizons:Chisel:2.15.0-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.3.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 }
+155 -27
View File
@@ -1,64 +1,192 @@
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.
# Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods.
useModGroupForPublishing = false
# Will update your build.gradle automatically whenever an update is available
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
autoUpdateBuildScript = false
# Version of Minecraft to target
minecraftVersion = 1.7.10
# Version of Minecraft Forge to target
forgeVersion = 10.13.4.1614
# Select a username for testing your mod with breakpoints. You may leave this empty for a random 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
# 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 the GTNH maven, CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
includeWellKnownRepositories = true
# 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
Binary file not shown.
+2 -1
View File
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored
+17 -12
View File
@@ -83,10 +83,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 "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -133,10 +131,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 +145,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 +153,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 +198,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, 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
+10 -10
View File
@@ -43,11 +43,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 +57,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
-7
View File
@@ -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
View File
@@ -4,10 +4,10 @@ pluginManagement {
maven {
// RetroFuturaGradle
name "GTNH Maven"
url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
allowInsecureProtocol = true
url "https://nexus.gtnewhorizons.com/repository/public/"
mavenContent {
includeGroup("com.gtnewhorizons.retrofuturagradle")
includeGroup("com.gtnewhorizons")
includeGroupByRegex("com\\.gtnewhorizons\\..+")
}
}
gradlePluginPortal()
@@ -17,12 +17,7 @@ pluginManagement {
}
plugins {
id 'com.diffplug.blowdryerSetup' version '1.6.0'
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0' // Provides java toolchains
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.22'
}
blowdryerSetup {
repoSubfolder 'gtnhShared'
github('GTNewHorizons/ExampleMod1.7.10', 'tag', '0.2.0')
//devLocal '.' // Use this when testing config updates locally
}
@@ -300,7 +300,7 @@ 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 {
@@ -718,8 +718,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);
@@ -766,6 +767,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);
@@ -2425,6 +2427,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,
@@ -611,35 +611,40 @@ 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),
@@ -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;
@@ -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) {
@@ -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) {
@@ -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,7 +11,6 @@ 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;
@@ -42,7 +42,7 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
float totalMeteorWeight = meteor.getTotalMeteorWeight();
List<MeteorParadigmComponent> sortedComponents = new ArrayList<>(meteor.componentList);
sortedComponents.sort(Comparator.comparingInt(c -> -c.chance));
sortedComponents.sort(Comparator.comparingInt(c -> -c.getChance()));
for (MeteorParadigmComponent component : sortedComponents) {
ItemStack stack = component.getValidBlockParadigm();
@@ -50,10 +50,6 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
int yPos = 37 + 18 * row;
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()));
}
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)));
@@ -182,7 +178,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;
@@ -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;
}
@@ -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;
}
}
@@ -142,6 +142,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,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,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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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));
@@ -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) {
@@ -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;
@@ -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;
@@ -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,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 {
@@ -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,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());
@@ -3,16 +3,20 @@ package WayofTime.alchemicalWizardry.common.summoning.meteor;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
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 net.minecraftforge.oredict.OreDictionary;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import cpw.mods.fml.common.Optional;
import gregtech.common.blocks.GT_TileEntity_Ores;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.common.blocks.TileEntityOres;
public class MeteorParadigm {
@@ -29,22 +33,67 @@ public class MeteorParadigm {
this.cost = cost;
}
// modId:itemName:meta:weight
private static final Pattern itemNamePattern = Pattern.compile("(.*):(.*):(\\d+):(\\d+)");
// OREDICT:oreDictName:weight
private static final Pattern oredictPattern = Pattern.compile("OREDICT:(.*):(\\d+)");
public void parseStringArray(String[] oreArray) {
for (int i = 0; i + 1 < oreArray.length; i += 2) {
for (int i = 0; i < oreArray.length; ++i) {
String oreName = oreArray[i];
int oreChance = Integer.parseInt(oreArray[i + 1]);
MeteorParadigmComponent mpc = new MeteorParadigmComponent(oreName, oreChance);
componentList.add(mpc);
boolean success = false;
Matcher matcher = itemNamePattern.matcher(oreName);
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));
ItemStack stack = GameRegistry.findItemStack(modID, itemName, 1);
if (stack != null && stack.getItem() instanceof ItemBlock) {
stack.setItemDamage(meta);
componentList.add(new MeteorParadigmComponent(stack, weight));
success = true;
}
} else if ((matcher = oredictPattern.matcher(oreName)).matches()) {
String oreDict = matcher.group(1);
int weight = Integer.parseInt(matcher.group(2));
List<ItemStack> list = OreDictionary.getOres(oreDict);
for (ItemStack stack : list) {
if (stack != null && stack.getItem() instanceof ItemBlock) {
componentList.add(new MeteorParadigmComponent(stack, weight));
success = true;
break;
}
}
} else {
// Legacy config
String oreDict = oreName;
int weight = Integer.parseInt(oreArray[++i]);
List<ItemStack> list = OreDictionary.getOres(oreDict);
for (ItemStack stack : list) {
if (stack != null && stack.getItem() instanceof ItemBlock) {
componentList.add(new MeteorParadigmComponent(stack, weight));
success = true;
break;
}
}
}
if (!success) {
AlchemicalWizardry.logger.warn("Unable to add Meteor Paradigm \"" + oreName + "\"");
}
}
}
public int getTotalMeteorWeight() {
int totalMeteorWeight = 0;
for (MeteorParadigmComponent mpc : componentList) {
if (mpc == null || !mpc.isValidBlockParadigm()) {
continue;
}
totalMeteorWeight += mpc.getChance();
}
return totalMeteorWeight;
@@ -99,10 +148,6 @@ public class MeteorParadigm {
boolean hasPlacedBlock = false;
for (MeteorParadigmComponent mpc : componentList) {
if (mpc == null || !mpc.isValidBlockParadigm()) {
continue;
}
randNum -= mpc.getChance();
if (randNum < 0) {
@@ -175,8 +220,8 @@ public class MeteorParadigm {
@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;
if (tileEntity instanceof TileEntityOres) {
((TileEntityOres) tileEntity).mNatural = true;
}
}
}
@@ -1,46 +1,22 @@
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;
protected int chance;
protected ItemStack itemStack;
public MeteorParadigmComponent(String dictName, int chance) {
this.oreDictName = dictName;
public MeteorParadigmComponent(ItemStack stack, int chance) {
this.itemStack = stack;
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;
return itemStack;
}
}
@@ -45,6 +45,8 @@ 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;
@@ -70,6 +72,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;
@@ -97,6 +101,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;
}
/**
@@ -447,7 +453,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);
@@ -496,7 +504,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;
@@ -510,7 +518,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();
}
@@ -525,8 +533,6 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
return;
}
int worldTime = (int) (worldObj.getWorldTime() % 24000);
if (worldObj.isRemote) {
return;
}
@@ -545,7 +551,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,
@@ -583,11 +589,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,
@@ -633,7 +642,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,
@@ -653,6 +662,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;
}
@@ -771,6 +797,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
this.orbCapacityMultiplier = 1;
this.dislocationMultiplier = 1;
this.accelerationUpgrades = 0;
this.maxDelayBeforeNextCraft = -1;
return;
}
@@ -788,6 +815,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
this.dislocationMultiplier = 1;
this.upgradeLevel = upgradeState;
this.accelerationUpgrades = 0;
this.maxDelayBeforeNextCraft = -1;
return;
}
@@ -804,6 +832,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;
@@ -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;
@@ -1,7 +1,13 @@
package WayofTime.alchemicalWizardry.common.tweaker;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.versioning.ArtifactVersion;
import cpw.mods.fml.common.versioning.InvalidVersionSpecificationException;
import cpw.mods.fml.common.versioning.VersionRange;
import minetweaker.MineTweakerAPI;
import minetweaker.MineTweakerImplementationAPI;
import minetweaker.mc1710.MineTweakerMod;
import minetweaker.util.IEventHandler;
/**
@@ -17,8 +23,27 @@ public class MineTweakerIntegration {
MineTweakerAPI.registerClass(FallingTower.class);
MineTweakerAPI.registerClass(HarvestMoon.class);
MineTweakerImplementationAPI.onRollbackEvent(new HandleLateAdditionsAndRemovals());
MineTweakerImplementationAPI.onPostReload(new HandleLateAdditionsAndRemovals());
// GTNH-Only features (post 3.1.0)
final ArtifactVersion mtVersion = Loader.instance().getIndexedModList().get(MineTweakerMod.MODID)
.getProcessedVersion();
try {
if (VersionRange.createFromVersionSpec("[3.2.4,)").containsVersion(mtVersion)) {
GTNHIntegration.register();
} else {
AlchemicalWizardry.logger.warn(
"Non-GTNH MineTweaker (CraftTweaker) version detected, late recipe additions and removals won't work correctly");
}
} catch (InvalidVersionSpecificationException e) {
throw new RuntimeException(e);
}
}
public static class GTNHIntegration {
public static void register() {
MineTweakerImplementationAPI.onRollbackEvent(new HandleLateAdditionsAndRemovals());
}
}
public static class HandleLateAdditionsAndRemovals
File renamed without changes.
@@ -6,6 +6,7 @@ tile.bloodRune.empty.name=Rune of Dislocation
tile.bloodRune.orb.name=Rune of the Orb
tile.bloodRune.betterCapacity.name=Rune of Superior Capacity
tile.bloodRune.acceleration.name=Rune of Acceleration
tile.bloodRune.quickness.name=Rune of Quickness
tile.speedRune.name=Speed Rune
tile.efficiencyRune.name=Efficiency Rune
tile.runeOfSacrifice.name=Rune of Sacrifice
@@ -6,6 +6,7 @@ tile.bloodRune.empty.name=Rune de Dislocation
tile.bloodRune.test.name=Rune de l’Orbe
tile.bloodRune.betterCapacity.name=Rune de la Capacité Supérieure
tile.bloodRune.acceleration.name=Rune d'Accélération
tile.bloodRune.quickness.name=Rune de Rapidité
tile.speedRune.name=Rune de Vitesse
tile.efficiencyRune.name=Rune d’Efficacité
tile.runeOfSacrifice.name=Rune du Sacrifice
Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

@@ -245,6 +245,8 @@ The unspeakable power of the energy bazooka.1= First thing I created with this n
The unspeakable power of the energy bazooka.2=explodes into twenty more smaller explosive projectiles to devastate other living things around it. I have tried tweaking it so that terrain isn't harmed, but there may be minor damage depending on what is hit. There is a "Slight" problem of recoil, but nothing we can't live with.
Acceleration runes.1= Moving my attention on to runes for our wonderful new altar, I had revelation as I noticed a speed rune next to a dislocation rune: Increasing how much LP is moved from the buffer is fine, but how about increasing how often it transfers LP? Using a few materials like buckets and an ethereal slate, I have transformed a normal speed rune into something far greater. Instead of effecting crafting speed, one rune will
Acceleration runes.2=lower the delay the altar has on moving the contents of the buffer by a twentieth of a second per rune. I have noticed a strange limitation, however: Any runes beyond nineteen seem to have so little effect it isn't noticeable anymore, so you can only have the altar transfer nineteen times a second. I will need to run some experimentation on the best ratios of acceleration to dislocation runes...
Quickness runes.1= Ever since I automated the transmutation process, I've noticed that the altar always waits a certain amount of time before starting a new transmutation. This odd delay doesn't occur when I manually insert the items into the altar, but that seems counterproductive to my goal of automation. I tried reducing the delay by causing time anomalies around the altar. While this affected the transmutation speed, it did not affect the delay.
Quickness runes.2=After much trial and error, I found that I could reduce this trivial delay by using a new type of rune made from speed and acceleration runes. Every rune I add to the altar seems to reduce the delay by about 20%. The effect is multiplicative and not additive.
The Harvest goddess.1= Bella has dragged me with her to town so she can be sure I'm out of the lab for a while(I have noticed I'm a little pale, but I just assumed that was from all the sacrifices I've been making lately). As we ate two sandwiches at a bench on the edge of the village, I watched the farmers in the field slaving over the harvest while trying to outrun the storm just visible in the distance. Talking with Bella about ways to help
The Harvest goddess.2=them, I created the basic idea for the sigil now known as the "Harvest Goddess". It is to the "Reap of the Harvest Moon" what the "Sigil of the Green grove" is to the ritual of the green grove, performing a similar effect to the harvest moon around the user by summoning a little demonic imp(You can thank Bella for this part). As soon as we had a version ready, Bella ran out into the field with a green grove, haste, and magnetism sigil to
The Harvest goddess.3=quickly run through the field collecting the harvest behind her. Needless to say, the few farmers in the field were awe struck by this sight and a few of the newer ones thought she was a goddess sent to answer their prayers(And I liked the sound of it, so we now have a name for the sigil).
@@ -354,6 +354,10 @@ First thing I created with this new orb was an improvement to the energy blaster
//TITLE Acceleration runes
Moving my attention on to runes for our wonderful new altar, I had revelation as I noticed a speed rune next to a dislocation rune: Increasing how much LP is moved from the buffer is fine, but how about increasing how often it transfers LP? Using a few materials like buckets and an ethereal slate, I have transformed a normal speed rune into something far greater. Instead of effecting crafting speed, one rune will lower the delay the altar has on moving the contents of the buffer by a twentieth of a second per rune. I have noticed a strange limitation, however: Any runes beyond nineteen seem to have so little effect it isn't noticeable anymore, so you can only have the altar transfer nineteen times a second. I will need to run some experimentation on the best ratios of acceleration to dislocation runes...
//TITLE Quickness runes
Ever since I automated the transmutation process, I've noticed that the altar always waits a certain amount of time before starting a new transmutation. This odd delay doesn't occur when I manually insert the items into the altar, but that seems counterproductive to my goal of automation. I tried reducing the delay by causing time anomalies around the altar. While this affected the transmutation speed, it did not affect the delay. After much trial and error, I found that I could reduce this trivial delay by using a new type of rune made from speed and acceleration runes. Every rune I add to the altar seems to reduce the delay by about 20%. The effect is multiplicative and not additive.
//TITLE The Harvest goddess
Bella has dragged me with her to town so she can be sure I'm out of the lab for a while(I have noticed I'm a little pale, but I just assumed that was from all the sacrifices I've been making lately). As we ate two sandwiches at a bench on the edge of the village, I watched the farmers in the field slaving over the harvest while trying to outrun the storm just visible in the distance. Talking with Bella about ways to help them, I created the basic idea for the sigil now known as the “Harvest Goddess”. It is to the “Reap of the Harvest Moon” what the “Sigil of the Green grove” is to the ritual of the green grove, performing a similar effect to the harvest moon around the user by summoning a little demonic imp(You can thank Bella for this part). As soon as we had a version ready, Bella ran out into the field with a green grove, haste, and magnetism sigil to quickly run through the field collecting the harvest behind her. Needless to say, the few farmers in the field were awe struck by this sight and a few of the newer ones thought she was a goddess sent to answer their prayers(And I liked the sound of it, so we now have a name for the sigil).