mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-27 07:13:14 +00:00
Compare commits
19
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7cdfd97a68 | ||
|
|
b00c5b0d68 | ||
|
|
a20e0b0c70 | ||
|
|
a22fcb8cb0 | ||
|
|
71ebe63947 | ||
|
|
da84ed4f06 | ||
|
|
76bfb7dda1 | ||
|
|
9decf95c08 | ||
|
|
deb0118a41 | ||
|
|
3695926a4b | ||
|
|
44dadfd139 | ||
|
|
806d9aac1c | ||
|
|
395e9c6b10 | ||
|
|
3eeabd90ae | ||
|
|
2321967bdb | ||
|
|
2b0b688c98 | ||
|
|
b721e43537 | ||
|
|
f74f42d0f9 | ||
|
|
b02fa2f32d |
No files matched your search
@@ -1,17 +0,0 @@
|
||||
name: Optimize images
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master, main, release/** ]
|
||||
paths:
|
||||
- "**/*.png"
|
||||
|
||||
push:
|
||||
branches: [ master, main, release/** ]
|
||||
paths:
|
||||
- "**/*.png"
|
||||
|
||||
jobs:
|
||||
optimize-images:
|
||||
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/optimize-images.yml@master
|
||||
secrets: inherit
|
||||
@@ -1,111 +1,117 @@
|
||||
# Blood Magic: Alchemical Wizardry
|
||||
#Blood Magic: Alchemical Wizardry
|
||||
|
||||
### Gruesome? Probably. Worth it? Definitely!
|
||||
###Gruesome? Probably. Worth it? Definitely!
|
||||
###[Downloads](http://minecraft.curseforge.com/mc-mods/224791-blood-magic/files)
|
||||
|
||||
## Fork
|
||||
|
||||
This mod was forked by the GT:NH Team to continue the development of the 1.7.10 branch.
|
||||
|
||||
## Information
|
||||
##Information
|
||||
|
||||
Have you ever picked up a magic mod for Minecraft, and thought that it was too tame? Was there not enough danger involved when creating your next high-tech gadget? Bored with all of those peaceful animals just staring at you without a care in the world? Well then, I am glad you came here!
|
||||
|
||||
Blood Magic is an arcane art that is practiced by mages who attempt to gather a vast amount of power through utilizing a forbidden material: blood. Even though it does grant a huge amount of power, every single action that is performed with this volatile magic can prove deadly. You have been warned.
|
||||
|
||||
## Upstream Blood Magic Links
|
||||
* Github: [Blood Magic](https://github.com/WayofTime/BloodMagic)
|
||||
##Links
|
||||
* Twitter: [@WayofTime](https://twitter.com/WayofTime)
|
||||
* Wiki: Found at [FTBWiki](http://ftbwiki.org/Blood_Magic). Most information is still relevant for this fork.
|
||||
* Wiki: Found at [FTBWiki](http://ftbwiki.org/Blood_Magic)
|
||||
* [Minecraft Forum Thread](http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1290532-bm)
|
||||
* [CurseForge](https://www.curseforge.com/minecraft/mc-mods/blood-magic)
|
||||
* [Donate to WayofTime on Paypal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=J7SNY7L82PQ82)
|
||||
* [Donate to WayofTime on Patreon](https://www.patreon.com/BloodMagic)
|
||||
* [Curseforge](http://minecraft.curseforge.com/mc-mods/224791-blood-magic)
|
||||
* [Donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=J7SNY7L82PQ82)
|
||||
|
||||
## GT:NH Links
|
||||
* Wiki: Hosted on [Miraheze](https://wiki.gtnewhorizons.com/wiki/Blood_Magic). Contains both fork-specific and pack-specific information. It is currently very incomplete, so feel free to contribute!
|
||||
* [Discord](https://discord.gg/gtnh): Talk to other players about Blood Magic and any other mods present in GT:NH.
|
||||
* [Releases](https://github.com/GTNewHorizons/BloodMagic/releases)
|
||||
##Issue Reporting
|
||||
|
||||
## Issue Reporting
|
||||
Please include the following:
|
||||
|
||||
**DO NOT** report issues encountered when running this fork to upstream. Report issues for this mod on [the GT:NH issue tracker](https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/new/choose).
|
||||
* Minecraft version
|
||||
* Blood Magic version
|
||||
* Forge version/build
|
||||
* Versions of any mods potentially related to the issue
|
||||
* Any relevant screenshots are greatly appreciated.
|
||||
* For crashes:
|
||||
* Steps to reproduce
|
||||
* ForgeModLoader-client-0.log (the FML log) from the root folder of the client
|
||||
|
||||
## Development Setup
|
||||
##Development Setup
|
||||
|
||||
1. Fork this project to your own Github repository and clone it to your desktop.
|
||||
2. Navigate to the directory you cloned to. Open a command window there and run (if you use Eclipse) `gradlew eclipse` or (if you use IDEA) `gradlew idea`.
|
||||
3. This process will setup [Forge](http://www.minecraftforge.net/forum/), your workspace, and all dependencies.
|
||||
2. Navigate to the directory you cloned to. Open a command window there and run `gradlew setupDevWorkspace` then (if you use Eclipse) `gradlew eclipse` or (if you use IDEA) `gradlew idea`.
|
||||
3. This process will setup [Forge](http://www.minecraftforge.net/forum/), your workspace, and link [MineTweaker](http://minetweaker3.powerofbytes.com/) as a dependency.
|
||||
4. Open the project in your IDE of choice.
|
||||
5. Set `../src/api/java` as a source directory.
|
||||
|
||||
[Setup video](https://www.youtube.com/watch?v=8VEdtQLuLO0&feature=youtu.be) by LexManos. For more information, refer to the [Forge Forums](http://www.minecraftforge.net/forum/index.php/topic,14048.0.html).
|
||||
|
||||
## Custom Builds
|
||||
##Custom Builds
|
||||
|
||||
### Custom builds are unsupported. If you have an issue using a build not by GT:NH, it is not guaranteed that you will get support.
|
||||
###Custom builds are unsupported. If you have an issue using a build not by me (WayofTime), it is not guaranteed that you will get support.
|
||||
|
||||
#### How to make a custom build:
|
||||
####How to make a custom build:
|
||||
|
||||
1. Clone directly from this repository to your desktop.
|
||||
2. Navigate to the directory you cloned to. Open a command window there and run `gradlew build`
|
||||
3. Once it completes, your new build will be found at `../build/libs/BloodMagic-*.jar`. You can ignore the `api`, `dev`, and `sources` jars.
|
||||
3. Once it completes, your new build will be found at `../build/libs/BloodMagic-*.jar`. You can ignore the `deobf`, `sources`, and `javadoc` jars.
|
||||
|
||||
## License
|
||||
##License
|
||||
|
||||

|
||||
|
||||
Blood Magic: Alchemical Wizardry by WayofTime is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).
|
||||
Blood Magic: AlchemicalWizardry by WayofTime is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).
|
||||
|
||||
## Installation Instructions
|
||||
##Installation Instructions
|
||||
|
||||
This mod requires "Minecraft Forge" in order to operate. It is incredibly easy to download and set up, so you might as well get to it!
|
||||
This mod requires "Minecraft Forge" in order to operate. It is incredibly easy to download and set up, so might as well get to it!
|
||||
|
||||
1. Download [Forge](https://files.minecraftforge.net/net/minecraftforge/forge/index_1.7.10.html). "Recommended" and "Latest" will both yield the same files. Download "Universal" to install it manually. Forge also has an "Installer" option, so all you need to do is launch that program and it will make a lovely Forge profile.
|
||||
2. Download the latest version of Blood Magic from the [Releases Page](https://github.com/GTNewHorizons/BloodMagic/releases) (ignore versions that end with `-pre` if you are not looking to test in-development features).
|
||||
3. Place the mod in the `.minecraft/mods` folder. If you use the official Minecraft launcher from Mojang, check [this page](https://minecraft.wiki/w/.minecraft) on the Minecraft Wiki to find it. If you use a different launcher, check its interface for a "Minecraft Folder" button, "View Mods" button, or something similar.
|
||||
1. Download [Forge](http://files.minecraftforge.net/). Usually "Recommended" is best - you want the "universal", not the source. Forge also has an "install" option now, so all you need to do is launch that program and it will make a lovely Forge profile. If you haven't, look up how to use the installer and the new 1.6.x launcher if you are confused!
|
||||
|
||||
## FAQ
|
||||
2. Download the latest version of BloodMagic from [Curseforge](http://minecraft.curseforge.com/mc-mods/224791-blood-magic).
|
||||
|
||||
**Q**: What has changed in the GT:NH fork compared to the final 1.7.10 version released by WayofTime?
|
||||
3. Place the mod in the **mods** folder of your .minecraft. If you are unsure of where that is located, it is here: `../Users/you/AppData/roaming/.minecraft`.
|
||||
|
||||
**A**: Many things, including:
|
||||
* Better configuration for meteors summoned by the Mark of the Falling Tower ritual. Run the mod once and check config/BloodMagic/meteors/README for a guide on how to edit the default ones and create your own. The old ModTweaker system should still work, but this new system is far more powerful and configurable for pack developers.
|
||||
* [Buffs](https://github.com/GTNewHorizons/BloodMagic/pull/15) to various Blood Altar upgrade runes.
|
||||
* The [Rune of Quickness](https://github.com/GTNewHorizons/BloodMagic/pull/51), a new rune which lowers the Blood Altar's delay between crafts.
|
||||
* [Improvements](https://github.com/GTNewHorizons/BloodMagic/pull/85) to the Orchestra of the Phantom Hands.
|
||||
* [Buffs](https://github.com/GTNewHorizons/BloodMagic/pull/83) to the Incense Crucible.
|
||||
* NEI Handlers for the [Blood Altar's Structure](https://github.com/GTNewHorizons/BloodMagic/pull/81) (requires [StructureLib](https://github.com/GTNewHorizons/StructureLib) and [BlockRenderer6343](https://github.com/GTNewHorizons/BlockRenderer6343)), [Meteors](https://github.com/GTNewHorizons/BloodMagic/pull/17), and the [Alchemic Calcinator](https://github.com/GTNewHorizons/BloodMagic/pull/87).
|
||||
* Configurable LP costs for many items and rituals.
|
||||
* Many other bug fixes, new localizations, and quality of life improvements!
|
||||
##FAQ
|
||||
|
||||
**Q**: My weak blood orb doesn't show my current LP! Fix it please.
|
||||
|
||||
**A**: You need a Divination Sigil to view your essence. It does other things, too, so it is worth it!
|
||||
**A**: The mechanic for viewing the player's essence has changed due to some issues with mechanics. You now need a Divination Sigil to view a player's essence. It does other things, too, so it is worth it!
|
||||
|
||||
|
||||
|
||||
**Q**: Why am I dying so much?
|
||||
|
||||
**A**: It might be a good idea to make sure that you have enough essence to do a task. If you don't have enough essence for, say, an imperfect ritual or a sigil, it will take it out of your health. If your health reaches 0... Well, you don't have to be a genius to see what would happen. Note that Rituals will only stop working and give you nausea, not kill you, so you don't have to worry about them quite as much.
|
||||
**A**: It might be a good idea to make sure that you have enough essence to do a task. If you don't have enough essence for, say, an imperfect ritual, it will take it out of your health. If your health reaches 0... Well, you don't have to be a genius to see what would happen.
|
||||
|
||||
**Q**: Waffles?
|
||||
|
||||
**A**: Waffles!
|
||||
|
||||
**Q**: Where is x? When I watched spotlight "w", it had an item called x. Don't you need x to make y, before you can create z?
|
||||
**Q**: Where is x? When I watched spotlight "w," it had an item called x. Don't you need x to make y, before you can create z?
|
||||
|
||||
**A**: It might be wise to look at a spotlight made for 1.7.10 (especially one for GT:NH), or check the changelogs. Versions of Blood Magic for more recent versions of Minecraft have some very different mechanics, which are not present in this version of the mod.
|
||||
**A**: It might be wise to look at an updated spotlight, or check the changelogs. I'm not evil, so I do document everything that I can. There was most likely some issues with balance with the item, so it may have been removed for those reasons. Or you just grabbed the item from NEI without seeing it was a test item, in which case: shame on you!
|
||||
|
||||
**Q**: Isn't that armour ...
|
||||
|
||||
**A**: Yes, the bound armour and tool textures are from the mod EE2. Pahimar and WayofTime are good friends, and Pahimar has given his express permission for it, so need not worry!
|
||||
[Proof](https://twitter.com/Pahimar/status/453590600689139712), [Archive](https://web.archive.org/web/20191208030719/https://twitter.com/Pahimar/status/453590600689139712).
|
||||
**A**: Yes, the armour texture is from the mod EE2. Pahimar and I are good friends, and I decided to use it for the armour and tools. He has given me his express permission for it, so need not worry!
|
||||
[Proof](https://twitter.com/Pahimar/status/453590600689139712).
|
||||
|
||||
**Q**: I've just had an amazing idea! Why not add an in-game book just like the Thaumonomicon?
|
||||
**Q**: My game is crashing with the latest TC4!
|
||||
|
||||
**A**: The Sanguine Scientiem can be created by dropping a Mail Order Catalogue (craftable with [Guide-API](https://www.curseforge.com/minecraft/mc-mods/guide-api) installed). Some of the formatting is off, and it has not been updated with all the information specific to this fork, so readers beware.
|
||||
**A**: To help stop this, remove the TC4 API from my Blood Magic zip file (if it is there). It should solve things.
|
||||
|
||||
**Q**: But, my Thaumcraft aspects are messed up!
|
||||
|
||||
**A**: Once again, remove the TC4 API from the Blood Magic zip file to solve this. Azanor changed some aspect combinations.
|
||||
|
||||
**Q**: When will 1.7.2 be released?
|
||||
|
||||
**A**: It's out! Go get it!
|
||||
|
||||
**Q**: Way, I've just had an amazing idea! Why not add an in-game book just like the Thaumonomicon?
|
||||
|
||||
**A**: This has been suggested several times. It I being worked on, and is proceeding quite well. Some framework needs to be completed, but it isn't a priority - ALL of the information you need is on this post, or online.
|
||||
|
||||
**Q**: Why do I not have a Sacrificial Orb? It's only showing up as a knife!
|
||||
|
||||
**A**: This is a config option. The person you saw with an orb had a config that changed the knife to an orb. The orb and knife function exactly the same way, but you can change the way it looks in the configs by looking for the "IDontLikeFun" option.
|
||||
**A**: This is a config option. The person you saw with an orb had a config that changed the knife to an orb. The orb and knife function exactly the same way, but you can change it in the configs by looking for the "Idontlikefun" option.
|
||||
|
||||
**Q**: When I respawn, I come back with the "Soul Fray" potion effect and I don't create as much LP with the Sacrificial Dagger/Orb. What's happening?
|
||||
|
||||
**A**: This is due to the config option "RespawnWithDebuff", which was made to combat Zerg Rushing. Instead of dying and respawning again and again, why not look into making an [Incense Crucible](https://ftbwiki.org/Incense_Crucible) to boost the LP from your self-sacrifices, brewing a [refillable healing potion](https://ftbwiki.org/Potion_Flask_(Blood_Magic)) with the Alchemic Chemistry Set, or finding some villagers to show your [Dagger of Sacrifice](https://ftbwiki.org/Dagger_of_Sacrifice) to?
|
||||
**Q**: When I respawn, I appear to only come back with 3 hearts. What's happening?
|
||||
|
||||
|
||||
**A**: This is due to another config option in the "WhimpySettings," which is due to my attempt to combat Zerg Rushing. You can disable this if you really want to, but it shouldn't hurt unduly.
|
||||
+10
-10
@@ -23,22 +23,22 @@
|
||||
*/
|
||||
|
||||
dependencies {
|
||||
api("com.github.GTNewHorizons:waila:1.19.25:dev")
|
||||
api("com.github.GTNewHorizons:NotEnoughItems:2.8.93-GTNH:dev")
|
||||
api("com.github.GTNewHorizons:waila:1.8.4:dev")
|
||||
api("com.github.GTNewHorizons:NotEnoughItems:2.7.40-GTNH:dev")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:GTNHLib:0.9.57:dev") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.52.480:dev") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.266:dev") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Botania:1.13.16-GTNH:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.11.19:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForgeMultipart:1.7.10: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.17.26-GTNH:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:Chisel:2.16.2-GTNH:api") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:CraftTweaker:3.4.7:dev") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ZenScript:1.0.0-GTNH") {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 }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:StructureLib:1.4.34:dev")
|
||||
compileOnly("com.github.GTNewHorizons:StructureLib:1.4.10:dev")
|
||||
}
|
||||
+6
-41
@@ -39,37 +39,13 @@ remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/co
|
||||
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
|
||||
developmentEnvironmentUserName = Developer
|
||||
|
||||
# Enables modern Java syntax support. Valid values:
|
||||
# - false: No modern syntax, Java 8 only
|
||||
# - jabel: Jabel syntax-only support, compiles to J8 bytecode
|
||||
# - jvmDowngrader: Full modern Java via JVM Downgrader (syntax + stdlib APIs)
|
||||
# - modern: Native modern Java bytecode, no downgrading
|
||||
enableModernJavaSyntax = jabel
|
||||
|
||||
# If set, ignores the above setting and compiles with the given toolchain. This may cause unexpected issues,
|
||||
# and should *not* be used in most situations. -1 disables this.
|
||||
# forceToolchainVersion = -1
|
||||
|
||||
# Target JVM version for JVM Downgrader bytecode downgrading.
|
||||
# Only used when enableModernJavaSyntax = jvmDowngrader
|
||||
# downgradeTargetVersion = 8
|
||||
|
||||
# Comma-separated list of Java versions for multi-release jar support (JVM Downgrader only).
|
||||
# Classes will be available in META-INF/versions/N/ for each version N in this list.
|
||||
# Default: "21,25" (J25+ gets native classes, J21-24 gets partial downgrade, J8-20 gets full downgrade).
|
||||
# jvmDowngraderMultiReleaseVersions = 21,25
|
||||
|
||||
# Specifies how JVM Downgrader API stubs are provided. Options:
|
||||
# - shade: Shade minimized stubs into the jar
|
||||
# - gtnhlib: GTNHLib provides stubs at runtime (adds version constraint)
|
||||
# - external: Another dependency provides stubs (no constraint, no warning)
|
||||
# - (empty): Warning reminding you to configure stubs
|
||||
# Note: 'shade' option requires you to verify license compliance, see: https://github.com/unimined/JvmDowngrader/blob/main/LICENSE.md
|
||||
# jvmDowngraderStubsProvider =
|
||||
# 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 = true
|
||||
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.
|
||||
@@ -120,9 +96,7 @@ usesMixinDebug = false
|
||||
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
|
||||
mixinPlugin =
|
||||
|
||||
# Specify the package that contains all of your Mixins. The package must exist or
|
||||
# the build will fail. If you have a package property defined in your mixins.<modid>.json,
|
||||
# it must match with this or the build will fail.
|
||||
# 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!
|
||||
@@ -177,7 +151,7 @@ modrinthProjectId =
|
||||
# type can be one of [project, version],
|
||||
# and the name is the Modrinth project or version slug/id of the other mod.
|
||||
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
|
||||
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
|
||||
# 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.
|
||||
@@ -198,12 +172,6 @@ curseForgeRelations =
|
||||
# projects. New projects should not use this parameter.
|
||||
customArchiveBaseName = BloodMagic
|
||||
|
||||
# Optional parameter to customize the default working directory used by the runClient* tasks. Relative to the project directory.
|
||||
# runClientWorkingDirectory = run/client
|
||||
|
||||
# Optional parameter to customize the default working directory used by the runServer* tasks. Relative to the project directory.
|
||||
# runServerWorkingDirectory = run/server
|
||||
|
||||
# Optional parameter to have the build automatically fail if an illegal version is used.
|
||||
# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'.
|
||||
# The check is ONLY performed if the version is a git tag.
|
||||
@@ -233,6 +201,3 @@ disableCheckstyle = true
|
||||
# This is meant to be set in $HOME/.gradle/gradle.properties.
|
||||
# ideaCheckSpotlessOnBuild = true
|
||||
|
||||
# Non-GTNH properties
|
||||
org.gradle.configuration-cache = true
|
||||
org.gradle.parallel = true
|
||||
@@ -1,12 +0,0 @@
|
||||
#This file is generated by updateDaemonJvm
|
||||
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
|
||||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
|
||||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
|
||||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
|
||||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c2dd35c9d0aaf0ba6ad0791320f99dfc/redirect
|
||||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/e5810bd7fd1f8a586644409d395a7e55/redirect
|
||||
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
|
||||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
|
||||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/7b3c4877c0749019e6805bb61e421497/redirect
|
||||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/d76df094a9cbbabd3b08251f9e61444a/redirect
|
||||
toolchainVersion=25
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015 the original authors.
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -57,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/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/.
|
||||
@@ -114,6 +114,7 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
@@ -171,6 +172,7 @@ fi
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
@@ -210,7 +212,8 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
|
||||
Vendored
+2
-1
@@ -70,10 +70,11 @@ goto fail
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.24'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.38'
|
||||
}
|
||||
|
||||
|
||||
@@ -496,18 +496,12 @@ public class AlchemicalWizardry {
|
||||
public static boolean disableBoundToolsRightClick;
|
||||
public static boolean allowPotionRepair;
|
||||
|
||||
public static List<BlockStack> secondTierRunes;
|
||||
public static List<BlockStack> thirdTierRunes;
|
||||
public static List<BlockStack> fourthTierRunes;
|
||||
public static List<BlockStack> fifthTierRunes;
|
||||
public static List<BlockStack> sixthTierRunes;
|
||||
public static List<BlockStack> fifthTierBeacons;
|
||||
public static List<BlockStack> thirdTierCaps;
|
||||
public static List<BlockStack> thirdTierPillars;
|
||||
public static List<BlockStack> fourthTierCaps;
|
||||
public static List<BlockStack> fourthTierPillars;
|
||||
public static List<BlockStack> sixthTierCaps;
|
||||
public static List<BlockStack> sixthTierPillars;
|
||||
public static BlockStack[] secondTierRunes = new BlockStack[10];
|
||||
public static BlockStack[] thirdTierRunes = new BlockStack[10];
|
||||
public static BlockStack[] fourthTierRunes = new BlockStack[10];
|
||||
public static BlockStack[] fifthTierRunes = new BlockStack[10];
|
||||
public static BlockStack[] sixthTierRunes = new BlockStack[10];
|
||||
public static BlockStack[] specialAltarBlock = new BlockStack[7];
|
||||
|
||||
public static int lpPerSelfSacrifice = 200;
|
||||
public static int lpPerSelfSacrificeSoulFray = 20;
|
||||
@@ -1437,42 +1431,39 @@ public class AlchemicalWizardry {
|
||||
emptyBucketStack,
|
||||
'l',
|
||||
new ItemStack(Items.leather_chestplate));
|
||||
|
||||
customPotionDrowning = (new PotionDrowning(customPotionDrowningID, true, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.drowning");
|
||||
customPotionBoost = (new PotionBoost(customPotionBoostID, false, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.boost");
|
||||
.setPotionName("Drowning");
|
||||
customPotionBoost = (new PotionBoost(customPotionBoostID, false, 0)).setIconIndex(0, 0).setPotionName("Boost");
|
||||
customPotionProjProt = (new PotionProjectileProtect(customPotionProjProtID, false, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.whirlwind");
|
||||
.setPotionName("Whirlwind");
|
||||
customPotionInhibit = (new PotionInhibit(customPotionInhibitID, false, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.inhibit");
|
||||
.setPotionName("Inhibit");
|
||||
customPotionFlight = (new PotionFlight(customPotionFlightID, false, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.flight");
|
||||
.setPotionName("Flight");
|
||||
customPotionReciprocation = (new PotionReciprocation(customPotionReciprocationID, false, 0xFFFFFF))
|
||||
.setIconIndex(0, 0).setPotionName("bm.buff.reciprocation");
|
||||
customPotionFlameCloak = (new PotionFlameCloak(customPotionFlameCloakID, false, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.flame_cloak");
|
||||
customPotionIceCloak = (new PotionIceCloak(customPotionIceCloakID, false, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.ice_cloak");
|
||||
customPotionHeavyHeart = (new PotionHeavyHeart(customPotionHeavyHeartID, true, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.heavy_heart");
|
||||
customPotionFireFuse = (new PotionFireFuse(customPotionFireFuseID, true, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.fire_fuse");
|
||||
customPotionPlanarBinding = (new PotionPlanarBinding(customPotionPlanarBindingID, true, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.planar_binding");
|
||||
customPotionSoulFray = (new PotionSoulFray(customPotionSoulFrayID, true, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.soul_fray");
|
||||
.setIconIndex(0, 0).setPotionName("Reciprocation");
|
||||
customPotionFlameCloak = (new PotionFlameCloak(customPotionFlameCloakID, false, 0).setIconIndex(0, 0)
|
||||
.setPotionName("Flame Cloak"));
|
||||
customPotionIceCloak = (new PotionIceCloak(customPotionIceCloakID, false, 0).setIconIndex(0, 0)
|
||||
.setPotionName("Ice Cloak"));
|
||||
customPotionHeavyHeart = (new PotionHeavyHeart(customPotionHeavyHeartID, true, 0).setIconIndex(0, 0)
|
||||
.setPotionName("Heavy Heart"));
|
||||
customPotionFireFuse = (new PotionFireFuse(customPotionFireFuseID, true, 0).setIconIndex(0, 0)
|
||||
.setPotionName("Fire Fuse"));
|
||||
customPotionPlanarBinding = (new PotionPlanarBinding(customPotionPlanarBindingID, true, 0).setIconIndex(0, 0)
|
||||
.setPotionName("Planar Binding"));
|
||||
customPotionSoulFray = (new PotionSoulFray(customPotionSoulFrayID, true, 0).setIconIndex(0, 0)
|
||||
.setPotionName("Soul Fray"));
|
||||
PlayerSacrificeHandler.soulFrayId = customPotionSoulFray;
|
||||
customPotionSoulHarden = (new PotionSoulHarden(customPotionSoulHardenID, false, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.soul_harden");
|
||||
customPotionDeaf = (new PotionDeaf(customPotionDeafID, true, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.deafness");
|
||||
customPotionFeatherFall = (new PotionFeatherFall(customPotionFeatherFallID, false, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.feather_fall");
|
||||
customPotionDemonCloak = (new PotionDemonCloak(customPotionDemonCloakID, false, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.demon_cloak");
|
||||
customPotionAmphibian = (new PotionAmphibian(customPotionAmphibianID, false, 0)).setIconIndex(0, 0)
|
||||
.setPotionName("bm.buff.amphibian");
|
||||
customPotionSoulHarden = (new PotionSoulHarden(customPotionSoulHardenID, false, 0).setIconIndex(0, 0)
|
||||
.setPotionName("Soul Harden"));
|
||||
customPotionDeaf = (new PotionDeaf(customPotionDeafID, true, 0).setIconIndex(0, 0).setPotionName("Deafness"));
|
||||
customPotionFeatherFall = (new PotionFeatherFall(customPotionFeatherFallID, false, 0).setIconIndex(0, 0)
|
||||
.setPotionName("Feather Fall"));
|
||||
customPotionDemonCloak = (new PotionDemonCloak(customPotionDemonCloakID, false, 0).setIconIndex(0, 0)
|
||||
.setPotionName("Demon Cloaking"));
|
||||
customPotionAmphibian = (new PotionAmphibian(customPotionAmphibianID, false, 0).setIconIndex(0, 0)
|
||||
.setPotionName("Amphibian"));
|
||||
|
||||
ItemStack masterBloodOrbStack = new ItemStack(ModItems.masterBloodOrb);
|
||||
ItemStack transcendentBloodOrbStack = new ItemStack(ModItems.transcendentBloodOrb);
|
||||
@@ -3054,59 +3045,56 @@ public class AlchemicalWizardry {
|
||||
stringStack);
|
||||
|
||||
GameRegistry.addRecipe(
|
||||
new ShapedBloodOrbRecipe(
|
||||
new ItemStack(ModBlocks.blockStabilityGlyph),
|
||||
"1s1",
|
||||
"grg",
|
||||
"bob",
|
||||
'o',
|
||||
transcendentBloodOrbStack,
|
||||
'r',
|
||||
bloodRuneStack,
|
||||
'1',
|
||||
crepitousStack,
|
||||
'g',
|
||||
etherealSlateStack,
|
||||
'b',
|
||||
praesidiumStack,
|
||||
's',
|
||||
magicalesStack));
|
||||
new ItemStack(ModBlocks.blockStabilityGlyph),
|
||||
"1s1",
|
||||
"grg",
|
||||
"bob",
|
||||
'o',
|
||||
transcendentBloodOrbStack,
|
||||
'r',
|
||||
bloodRuneStack,
|
||||
'1',
|
||||
crepitousStack,
|
||||
'g',
|
||||
etherealSlateStack,
|
||||
'b',
|
||||
praesidiumStack,
|
||||
's',
|
||||
magicalesStack);
|
||||
GameRegistry.addRecipe(
|
||||
new ShapedBloodOrbRecipe(
|
||||
new ItemStack(ModBlocks.blockEnchantmentGlyph, 1, 0),
|
||||
"1s1",
|
||||
"grg",
|
||||
"bob",
|
||||
'o',
|
||||
transcendentBloodOrbStack,
|
||||
'r',
|
||||
bloodRuneStack,
|
||||
'g',
|
||||
etherealSlateStack,
|
||||
'b',
|
||||
magicalesStack,
|
||||
'1',
|
||||
offensaStack,
|
||||
's',
|
||||
lifeShardStack));
|
||||
new ItemStack(ModBlocks.blockEnchantmentGlyph, 1, 0),
|
||||
"1s1",
|
||||
"grg",
|
||||
"bob",
|
||||
'o',
|
||||
transcendentBloodOrbStack,
|
||||
'r',
|
||||
bloodRuneStack,
|
||||
'g',
|
||||
etherealSlateStack,
|
||||
'b',
|
||||
magicalesStack,
|
||||
'1',
|
||||
offensaStack,
|
||||
's',
|
||||
lifeShardStack);
|
||||
GameRegistry.addRecipe(
|
||||
new ShapedBloodOrbRecipe(
|
||||
new ItemStack(ModBlocks.blockEnchantmentGlyph, 1, 1),
|
||||
"1s1",
|
||||
"grg",
|
||||
"bob",
|
||||
'o',
|
||||
transcendentBloodOrbStack,
|
||||
'r',
|
||||
bloodRuneStack,
|
||||
'g',
|
||||
etherealSlateStack,
|
||||
'b',
|
||||
magicalesStack,
|
||||
'1',
|
||||
virtusStack,
|
||||
's',
|
||||
soulShardStack));
|
||||
new ItemStack(ModBlocks.blockEnchantmentGlyph, 1, 1),
|
||||
"1s1",
|
||||
"grg",
|
||||
"bob",
|
||||
'o',
|
||||
transcendentBloodOrbStack,
|
||||
'r',
|
||||
bloodRuneStack,
|
||||
'g',
|
||||
etherealSlateStack,
|
||||
'b',
|
||||
magicalesStack,
|
||||
'1',
|
||||
virtusStack,
|
||||
's',
|
||||
soulShardStack);
|
||||
|
||||
GameRegistry.addRecipe(
|
||||
dawnRitualDivinerStack,
|
||||
|
||||
@@ -16,6 +16,7 @@ import net.minecraft.entity.monster.EntityEnderman;
|
||||
import net.minecraft.entity.monster.EntitySlime;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
import net.minecraft.entity.passive.EntityVillager;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
@@ -623,63 +624,66 @@ public class BloodMagicConfiguration {
|
||||
}
|
||||
|
||||
public static void finishLoading() {
|
||||
String[] defaultRunes = { "AWWayofTime:AlchemicalWizardrybloodRune", "AWWayofTime:speedRune",
|
||||
"AWWayofTime:efficiencyRune", "AWWayofTime:runeOfSacrifice", "AWWayofTime:runeOfSelfSacrifice",
|
||||
"AWWayofTime:AlchemicalWizardrybloodRune:1", "AWWayofTime:AlchemicalWizardrybloodRune:2",
|
||||
"AWWayofTime:AlchemicalWizardrybloodRune:3", "AWWayofTime:AlchemicalWizardrybloodRune:4",
|
||||
"AWWayofTime:AlchemicalWizardrybloodRune:5", "AWWayofTime:AlchemicalWizardrybloodRune:6" };
|
||||
|
||||
AlchemicalWizardry.secondTierRunes = readRuneOverrides("secondTier", defaultRunes);
|
||||
AlchemicalWizardry.thirdTierRunes = readRuneOverrides("thirdTier", defaultRunes);
|
||||
AlchemicalWizardry.fourthTierRunes = readRuneOverrides("fourthTier", defaultRunes);
|
||||
AlchemicalWizardry.fifthTierRunes = readRuneOverrides("fifthTier", defaultRunes);
|
||||
AlchemicalWizardry.sixthTierRunes = readRuneOverrides("sixthTier", defaultRunes);
|
||||
|
||||
AlchemicalWizardry.fifthTierBeacons = readBlockConfig(
|
||||
"altar blocks",
|
||||
"fifthTierBeacons",
|
||||
new String[] { "minecraft:beacon", "etfuturum:beacon", "chisel:beacon:*" },
|
||||
"Valid blocks for the Blood Altar's tier 5 beacons:\n"
|
||||
+ "Use the following format for all of these entries: mod:block(:meta). Meta * or 32767 allows for any meta.\n"
|
||||
+ "An empty entry allows for any non-air block to be used for that part of the structure.\n"
|
||||
+ "Invalid or missing blocks are skipped. If all entries are invalid, any block can be used as a fallback.");
|
||||
AlchemicalWizardry.thirdTierCaps = readBlockConfig(
|
||||
"altar blocks",
|
||||
"thirdTierCaps",
|
||||
new String[] { "minecraft:glowstone", "BloodArsenal:blood_infused_glowstone", "Botania:seaLamp",
|
||||
"chisel:glowstone:*", "etfuturum:sea_lantern", "etfuturum:shroomlight",
|
||||
"ExtraUtilities:color_lightgem:*" },
|
||||
"Valid blocks for the Blood Altar's tier 3 caps:");
|
||||
AlchemicalWizardry.thirdTierPillars = readBlockConfig(
|
||||
"altar blocks",
|
||||
"thirdTierPillars",
|
||||
new String[] {},
|
||||
"Valid blocks for the Blood Altar's tier 3 pillars:");
|
||||
AlchemicalWizardry.fourthTierCaps = readBlockConfig(
|
||||
"altar blocks",
|
||||
"fourthTierCaps",
|
||||
new String[] { "AWWayofTime:largeBloodStoneBrick" },
|
||||
"Valid blocks for the Blood Altar's tier 4 caps:");
|
||||
AlchemicalWizardry.fourthTierPillars = readBlockConfig(
|
||||
"altar blocks",
|
||||
"fourthTierPillars",
|
||||
new String[] {},
|
||||
"Valid blocks for the Blood Altar's tier 4 pillars.");
|
||||
AlchemicalWizardry.sixthTierCaps = readBlockConfig(
|
||||
"altar blocks",
|
||||
"sixthTierCaps",
|
||||
new String[] { "AWWayofTime:blockCrystal" },
|
||||
"Valid blocks for the Blood Altar's tier 6 caps:");
|
||||
AlchemicalWizardry.sixthTierPillars = readBlockConfig(
|
||||
"altar blocks",
|
||||
"sixthTierPillars",
|
||||
new String[] {},
|
||||
"Valid blocks for the Blood Altar's tier 6 pillars:");
|
||||
AlchemicalWizardry.secondTierRunes = BloodMagicConfiguration.getAltarRunesForTier(
|
||||
"secondTier",
|
||||
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, 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, 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, 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, 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, 6) });
|
||||
AlchemicalWizardry.specialAltarBlock = getAltarRunesForTier(
|
||||
"specialBlocks",
|
||||
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();
|
||||
}
|
||||
|
||||
public static void loadCustomLPValues() {
|
||||
AlchemicalWizardry.lpPerSactificeCustom = new HashMap<>();
|
||||
AlchemicalWizardry.lpPerSactificeCustom = new HashMap<Class<?>, Integer>();
|
||||
for (Object object : EntityList.stringToClassMapping.entrySet()) {
|
||||
Entry entry = (Entry) object;
|
||||
String entityName = (String) entry.getKey();
|
||||
@@ -794,6 +798,7 @@ public class BloodMagicConfiguration {
|
||||
// Check if it's an int, if so, parse it. If not, set meta to 0 to avoid crashing.
|
||||
if (isInteger(blockData[2])) meta = Integer.parseInt(blockData[2]);
|
||||
else if (blockData[2].equals("*")) meta = OreDictionary.WILDCARD_VALUE;
|
||||
else meta = 0;
|
||||
}
|
||||
|
||||
AlchemicalWizardryEventHooks.teleposerBlacklist.add(new BlockStack(block, meta));
|
||||
@@ -803,43 +808,53 @@ public class BloodMagicConfiguration {
|
||||
private static boolean isInteger(String s) {
|
||||
try {
|
||||
Integer.parseInt(s);
|
||||
} catch (NumberFormatException | NullPointerException e) {
|
||||
} catch (NumberFormatException e) {
|
||||
return false;
|
||||
} catch (NullPointerException e) {
|
||||
return false;
|
||||
}
|
||||
// only got here if we didn't return false
|
||||
return true;
|
||||
}
|
||||
|
||||
private static List<BlockStack> readRuneOverrides(String key, String[] defaultValues) {
|
||||
return readBlockConfig("rune overrides", key, defaultValues, "");
|
||||
private static BlockStack[] getAltarRunesForTier(String tierName, BlockStack[] defaultValues) {
|
||||
return getAltarRunesForTier(tierName, defaultValues, "");
|
||||
}
|
||||
|
||||
private static List<BlockStack> readBlockConfig(String category, String key, String[] defaultValues,
|
||||
String comment) {
|
||||
Property property = config.get(category, key, defaultValues, comment);
|
||||
List<BlockStack> validStacks = new ArrayList<>();
|
||||
|
||||
for (String name : property.getStringList()) {
|
||||
String[] blockData = name.split(":");
|
||||
if (blockData.length < 2 || blockData.length > 3) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Block block = GameRegistry.findBlock(blockData[0], blockData[1]);
|
||||
if (block == null) {
|
||||
AlchemicalWizardry.logger.info("Block not found for {} {}: {}", category, key, name);
|
||||
continue;
|
||||
}
|
||||
|
||||
int meta = 0;
|
||||
if (blockData.length == 3) {
|
||||
if (isInteger(blockData[2])) meta = Integer.parseInt(blockData[2]);
|
||||
else if (blockData[2].equals("*")) meta = OreDictionary.WILDCARD_VALUE;
|
||||
}
|
||||
|
||||
validStacks.add(new BlockStack(block, meta));
|
||||
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();
|
||||
}
|
||||
|
||||
return validStacks;
|
||||
Property property = config.get("rune overrides", tierName, defaultNames, comment);
|
||||
String[] names = property.getStringList();
|
||||
if (names.length != defaultNames.length) {
|
||||
property.set(defaultNames);
|
||||
return defaultValues;
|
||||
}
|
||||
BlockStack[] blockStacks = new BlockStack[names.length];
|
||||
for (int i = 0; i < names.length; i++) {
|
||||
String[] parts = names[i].split(":");
|
||||
if (parts.length < 2 || parts.length > 3) {
|
||||
property.set(defaultNames);
|
||||
return defaultValues;
|
||||
}
|
||||
Block block = GameRegistry.findBlock(parts[0], parts[1]);
|
||||
int metadata = 0;
|
||||
if (parts.length == 3) {
|
||||
try {
|
||||
metadata = Integer.parseInt(parts[2]);
|
||||
} catch (NumberFormatException exception) {
|
||||
metadata = 0;
|
||||
}
|
||||
}
|
||||
if (block == null) {
|
||||
property.set(defaultNames);
|
||||
return defaultValues;
|
||||
}
|
||||
blockStacks[i] = new BlockStack(block, metadata);
|
||||
}
|
||||
return blockStacks;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -57,151 +57,117 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
*/
|
||||
public class ModBlocks {
|
||||
|
||||
// Blood Altar
|
||||
public static Block bloodStoneBrick;
|
||||
public static Block largeBloodStoneBrick;
|
||||
public static BlockAltar blockAltar;
|
||||
public static BloodRune bloodRune;
|
||||
public static SpeedRune speedRune;
|
||||
public static EfficiencyRune efficiencyRune;
|
||||
public static RuneOfSacrifice runeOfSacrifice;
|
||||
public static RuneOfSelfSacrifice runeOfSelfSacrifice;
|
||||
public static Block blockCrucible;
|
||||
public static Block largeBloodStoneBrick;
|
||||
public static Block bloodStoneBrick;
|
||||
public static Block blockCrystal;
|
||||
|
||||
// Rituals
|
||||
public static Block imperfectRitualStone;
|
||||
public static Block ritualStone;
|
||||
public static Block blockMasterStone;
|
||||
public static Block ritualStone;
|
||||
public static Block imperfectRitualStone;
|
||||
public static Block bloodSocket;
|
||||
public static Block emptySocket;
|
||||
public static Block armourForge;
|
||||
public static Block blockWritingTable;
|
||||
public static Block blockHomHeart;
|
||||
public static Block blockPedestal;
|
||||
public static Block blockPlinth;
|
||||
public static Block blockStabilityGlyph;
|
||||
public static Block blockEnchantmentGlyph;
|
||||
|
||||
// Reagents
|
||||
public static Block blockWritingTable;
|
||||
public static Block blockAlchemicCalcinator;
|
||||
public static Block blockReagentConduit;
|
||||
public static Block blockCrystalBelljar;
|
||||
|
||||
// Bound Armor
|
||||
public static Block emptySocket;
|
||||
public static Block bloodSocket;
|
||||
public static Block armourForge;
|
||||
|
||||
// Spells
|
||||
public static Block blockHomHeart;
|
||||
public static Block blockLifeEssence;
|
||||
public static Block blockTeleposer;
|
||||
public static Block spectralBlock;
|
||||
public static Block blockConduit;
|
||||
public static Block blockBloodLight;
|
||||
public static Block blockSpellEffect;
|
||||
public static Block blockSpellParadigm;
|
||||
public static Block blockSpellModifier;
|
||||
public static Block blockSpellEnhancement;
|
||||
|
||||
// Misc
|
||||
public static Block blockTeleposer;
|
||||
public static Block spectralBlock;
|
||||
public static Block blockBloodLight;
|
||||
public static Block blockSpectralContainer;
|
||||
public static Block blockLifeEssence;
|
||||
public static Block blockDemonPortal;
|
||||
public static Block blockDemonChest;
|
||||
public static Block blockBuildingSchematicSaver;
|
||||
public static Block blockDemonPortal;
|
||||
public static Block blockReagentConduit;
|
||||
public static Block blockAlchemicCalcinator;
|
||||
public static Block blockCrystalBelljar;
|
||||
public static Block blockDemonChest;
|
||||
public static Block blockCrystal;
|
||||
public static Block blockMimic;
|
||||
public static Block blockEnchantmentGlyph;
|
||||
public static Block blockStabilityGlyph;
|
||||
public static Block blockCrucible;
|
||||
|
||||
public static void init() {
|
||||
// Blood Altar
|
||||
blockAltar = new BlockAltar();
|
||||
bloodRune = new BloodRune();
|
||||
speedRune = new SpeedRune();
|
||||
efficiencyRune = new EfficiencyRune();
|
||||
runeOfSacrifice = new RuneOfSacrifice();
|
||||
runeOfSelfSacrifice = new RuneOfSelfSacrifice();
|
||||
blockCrucible = new BlockCrucible();
|
||||
bloodStoneBrick = new BloodStoneBrick();
|
||||
largeBloodStoneBrick = new LargeBloodStoneBrick();
|
||||
blockCrystal = new BlockCrystal();
|
||||
|
||||
// Rituals
|
||||
imperfectRitualStone = new ImperfectRitualStone();
|
||||
blockTeleposer = new BlockTeleposer();
|
||||
spectralBlock = new SpectralBlock();
|
||||
ritualStone = new RitualStone();
|
||||
blockMasterStone = new BlockMasterStone();
|
||||
blockPedestal = new BlockPedestal();
|
||||
blockPlinth = new BlockPlinth();
|
||||
blockStabilityGlyph = new BlockStabilityGlyph();
|
||||
blockEnchantmentGlyph = new BlockEnchantmentGlyph();
|
||||
|
||||
// Reagents
|
||||
blockWritingTable = new BlockWritingTable();
|
||||
blockAlchemicCalcinator = new BlockAlchemicCalcinator();
|
||||
blockReagentConduit = new BlockReagentConduit();
|
||||
blockCrystalBelljar = new BlockBelljar();
|
||||
|
||||
// Bound Armor
|
||||
emptySocket = new EmptySocket();
|
||||
imperfectRitualStone = new ImperfectRitualStone();
|
||||
bloodSocket = new BlockSocket();
|
||||
armourForge = new ArmourForge();
|
||||
|
||||
// Spells
|
||||
emptySocket = new EmptySocket();
|
||||
largeBloodStoneBrick = new LargeBloodStoneBrick();
|
||||
bloodStoneBrick = new BloodStoneBrick();
|
||||
blockWritingTable = new BlockWritingTable();
|
||||
blockHomHeart = new BlockHomHeart();
|
||||
blockPedestal = new BlockPedestal();
|
||||
blockPlinth = new BlockPlinth();
|
||||
blockConduit = new BlockConduit();
|
||||
blockBloodLight = new BlockBloodLightSource();
|
||||
blockSpellEffect = new BlockSpellEffect();
|
||||
blockSpellParadigm = new BlockSpellParadigm();
|
||||
blockSpellModifier = new BlockSpellModifier();
|
||||
blockSpellEnhancement = new BlockSpellEnhancement();
|
||||
|
||||
// Misc
|
||||
blockTeleposer = new BlockTeleposer();
|
||||
spectralBlock = new SpectralBlock();
|
||||
blockBloodLight = new BlockBloodLightSource();
|
||||
blockSpectralContainer = new BlockSpectralContainer();
|
||||
blockLifeEssence = new LifeEssenceBlock();
|
||||
blockDemonPortal = new BlockDemonPortal();
|
||||
blockDemonChest = new BlockDemonChest();
|
||||
blockBuildingSchematicSaver = new BlockSchematicSaver();
|
||||
blockReagentConduit = new BlockReagentConduit();
|
||||
blockAlchemicCalcinator = new BlockAlchemicCalcinator();
|
||||
blockCrystalBelljar = new BlockBelljar();
|
||||
blockDemonChest = new BlockDemonChest();
|
||||
blockCrystal = new BlockCrystal();
|
||||
blockMimic = new MimicBlock();
|
||||
|
||||
blockLifeEssence = new LifeEssenceBlock();
|
||||
blockEnchantmentGlyph = new BlockEnchantmentGlyph();
|
||||
blockStabilityGlyph = new BlockStabilityGlyph();
|
||||
blockCrucible = new BlockCrucible();
|
||||
}
|
||||
|
||||
public static void registerBlocksInPre() {
|
||||
// Blood Altar
|
||||
GameRegistry.registerBlock(ModBlocks.blockAltar, "Altar");
|
||||
GameRegistry.registerBlock(
|
||||
ModBlocks.bloodRune,
|
||||
ItemBloodRuneBlock.class,
|
||||
"AlchemicalWizardry" + (ModBlocks.bloodRune.getUnlocalizedName().substring(5)));
|
||||
GameRegistry.registerBlock(ModBlocks.blockLifeEssence, "lifeEssence");
|
||||
GameRegistry.registerBlock(ModBlocks.speedRune, "speedRune");
|
||||
GameRegistry.registerBlock(ModBlocks.efficiencyRune, "efficiencyRune");
|
||||
GameRegistry.registerBlock(ModBlocks.runeOfSacrifice, "runeOfSacrifice");
|
||||
GameRegistry.registerBlock(ModBlocks.runeOfSelfSacrifice, "runeOfSelfSacrifice");
|
||||
GameRegistry.registerBlock(ModBlocks.blockCrucible, "blockCrucible");
|
||||
GameRegistry.registerBlock(ModBlocks.largeBloodStoneBrick, "largeBloodStoneBrick");
|
||||
GameRegistry.registerBlock(ModBlocks.bloodStoneBrick, "bloodStoneBrick");
|
||||
GameRegistry.registerBlock(ModBlocks.blockCrystal, ItemCrystalBlock.class, "blockCrystal");
|
||||
|
||||
// Rituals
|
||||
GameRegistry.registerBlock(ModBlocks.imperfectRitualStone, "imperfectRitualStone");
|
||||
GameRegistry.registerBlock(ModBlocks.ritualStone, "ritualStone");
|
||||
GameRegistry.registerBlock(ModBlocks.blockMasterStone, "masterStone");
|
||||
GameRegistry.registerBlock(ModBlocks.bloodSocket, "bloodSocket");
|
||||
GameRegistry.registerBlock(ModBlocks.imperfectRitualStone, "imperfectRitualStone");
|
||||
|
||||
GameRegistry.registerBlock(ModBlocks.armourForge, "armourForge");
|
||||
GameRegistry.registerBlock(ModBlocks.emptySocket, "emptySocket");
|
||||
GameRegistry.registerBlock(ModBlocks.bloodStoneBrick, "bloodStoneBrick");
|
||||
GameRegistry.registerBlock(ModBlocks.largeBloodStoneBrick, "largeBloodStoneBrick");
|
||||
GameRegistry.registerBlock(ModBlocks.blockWritingTable, "blockWritingTable");
|
||||
GameRegistry.registerBlock(ModBlocks.blockHomHeart, "blockHomHeart");
|
||||
GameRegistry.registerBlock(ModBlocks.blockPedestal, "blockPedestal");
|
||||
GameRegistry.registerBlock(ModBlocks.blockPlinth, "blockPlinth");
|
||||
GameRegistry.registerBlock(ModBlocks.blockStabilityGlyph, ItemStabilityGlyphBlock.class, "blockStabilityGlyph");
|
||||
GameRegistry.registerBlock(
|
||||
ModBlocks.blockEnchantmentGlyph,
|
||||
ItemEnchantmentGlyphBlock.class,
|
||||
"blockEnchantmentGlyph");
|
||||
GameRegistry.registerBlock(ModBlocks.blockTeleposer, "blockTeleposer");
|
||||
GameRegistry.registerBlock(ModBlocks.spectralBlock, "spectralBlock");
|
||||
GameRegistry.registerBlock(ModBlocks.blockBloodLight, "bloodLight");
|
||||
|
||||
// Reagents
|
||||
GameRegistry.registerBlock(ModBlocks.blockWritingTable, "blockWritingTable");
|
||||
GameRegistry.registerBlock(ModBlocks.blockAlchemicCalcinator, "blockAlchemicCalcinator");
|
||||
GameRegistry.registerBlock(ModBlocks.blockReagentConduit, "blockReagentConduit");
|
||||
GameRegistry.registerBlock(ModBlocks.blockCrystalBelljar, ItemBlockCrystalBelljar.class, "blockCrystalBelljar");
|
||||
|
||||
// Bound Armor
|
||||
GameRegistry.registerBlock(ModBlocks.emptySocket, "emptySocket");
|
||||
GameRegistry.registerBlock(ModBlocks.bloodSocket, "bloodSocket");
|
||||
GameRegistry.registerBlock(ModBlocks.armourForge, "armourForge");
|
||||
|
||||
// Spells
|
||||
GameRegistry.registerBlock(ModBlocks.blockHomHeart, "blockHomHeart");
|
||||
GameRegistry.registerBlock(ModBlocks.blockConduit, "blockConduit");
|
||||
GameRegistry.registerBlock(
|
||||
ModBlocks.blockSpellParadigm,
|
||||
@@ -220,16 +186,22 @@ public class ModBlocks {
|
||||
ItemSpellEffectBlock.class,
|
||||
"AlchemicalWizardry" + (ModBlocks.blockSpellEffect.getUnlocalizedName()));
|
||||
|
||||
// Misc
|
||||
GameRegistry.registerBlock(ModBlocks.blockTeleposer, "blockTeleposer");
|
||||
GameRegistry.registerBlock(ModBlocks.spectralBlock, "spectralBlock");
|
||||
GameRegistry.registerBlock(ModBlocks.blockBloodLight, "bloodLight");
|
||||
GameRegistry.registerBlock(ModBlocks.blockSpectralContainer, "spectralContainer");
|
||||
GameRegistry.registerBlock(ModBlocks.blockLifeEssence, "lifeEssence");
|
||||
GameRegistry.registerBlock(ModBlocks.blockDemonPortal, "demonPortalMain");
|
||||
GameRegistry.registerBlock(ModBlocks.blockDemonChest, "blockDemonChest");
|
||||
GameRegistry.registerBlock(ModBlocks.blockBuildingSchematicSaver, "blockSchemSaver");
|
||||
GameRegistry.registerBlock(ModBlocks.blockReagentConduit, "blockReagentConduit");
|
||||
GameRegistry.registerBlock(ModBlocks.blockAlchemicCalcinator, "blockAlchemicCalcinator");
|
||||
GameRegistry.registerBlock(ModBlocks.blockCrystalBelljar, ItemBlockCrystalBelljar.class, "blockCrystalBelljar");
|
||||
GameRegistry.registerBlock(ModBlocks.blockDemonChest, "blockDemonChest");
|
||||
GameRegistry.registerBlock(ModBlocks.blockCrystal, ItemCrystalBlock.class, "blockCrystal");
|
||||
GameRegistry.registerBlock(ModBlocks.blockMimic, "blockMimic");
|
||||
GameRegistry.registerBlock(
|
||||
ModBlocks.blockEnchantmentGlyph,
|
||||
ItemEnchantmentGlyphBlock.class,
|
||||
"blockEnchantmentGlyph");
|
||||
GameRegistry.registerBlock(ModBlocks.blockStabilityGlyph, ItemStabilityGlyphBlock.class, "blockStabilityGlyph");
|
||||
|
||||
GameRegistry.registerBlock(ModBlocks.blockCrucible, "blockCrucible");
|
||||
}
|
||||
|
||||
public static void registerBlocksInInit() {}
|
||||
|
||||
@@ -8,6 +8,7 @@ import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool;
|
||||
import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool;
|
||||
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;
|
||||
@@ -19,13 +20,17 @@ 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;
|
||||
@@ -40,9 +45,9 @@ 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.ScribeTool;
|
||||
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;
|
||||
@@ -95,40 +100,122 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
*/
|
||||
public class ModItems {
|
||||
|
||||
// Orbs
|
||||
public static Item weakBloodOrb;
|
||||
public static Item apprenticeBloodOrb;
|
||||
public static Item magicianBloodOrb;
|
||||
public static Item masterBloodOrb;
|
||||
public static Item archmageBloodOrb;
|
||||
public static Item transcendentBloodOrb;
|
||||
public static Item creativeFiller;
|
||||
|
||||
// Bound Tools/Weapons
|
||||
public static Item energySword;
|
||||
public static Item boundPickaxe;
|
||||
public static Item boundAxe;
|
||||
public static Item boundShovel;
|
||||
public static Item customTool;
|
||||
public static Item energyBlaster;
|
||||
public static Item energyBlasterSecondTier;
|
||||
public static Item energyBlasterThirdTier;
|
||||
public static Item energyBazooka;
|
||||
public static Item energyBazookaSecondTier;
|
||||
public static Item energyBazookaThirdTier;
|
||||
|
||||
// Armor
|
||||
public static Item itemBloodPack;
|
||||
|
||||
public static Item sanguineHelmet;
|
||||
public static Item sanguineRobe;
|
||||
public static Item sanguinePants;
|
||||
public static Item sanguineBoots;
|
||||
|
||||
public static Item energySword;
|
||||
public static Item lavaCrystal;
|
||||
public static Item waterSigil;
|
||||
public static Item lavaSigil;
|
||||
public static Item voidSigil;
|
||||
public static Item blankSlate;
|
||||
public static Item reinforcedSlate;
|
||||
public static Item sacrificialDagger;
|
||||
public static Item daggerOfSacrifice;
|
||||
public static Item airSigil;
|
||||
public static Item sigilOfTheFastMiner;
|
||||
public static Item sigilOfElementalAffinity;
|
||||
public static Item sigilOfHaste;
|
||||
public static Item sigilOfHolding;
|
||||
public static Item divinationSigil;
|
||||
public static Item waterScribeTool;
|
||||
public static Item fireScribeTool;
|
||||
public static Item earthScribeTool;
|
||||
public static Item airScribeTool;
|
||||
public static Item dawnScribeTool;
|
||||
public static Item activationCrystal;
|
||||
public static Item boundPickaxe;
|
||||
public static Item boundAxe;
|
||||
public static Item boundShovel;
|
||||
public static Item boundHelmet;
|
||||
public static Item boundPlate;
|
||||
public static Item boundLeggings;
|
||||
public static Item boundBoots;
|
||||
public static Item weakBloodShard;
|
||||
public static Item growthSigil;
|
||||
public static Item blankSpell;
|
||||
public static Item masterBloodOrb;
|
||||
public static Item alchemyFlask;
|
||||
public static Item standardBindingAgent;
|
||||
public static Item mundanePowerCatalyst;
|
||||
public static Item averagePowerCatalyst;
|
||||
public static Item greaterPowerCatalyst;
|
||||
public static Item mundaneLengtheningCatalyst;
|
||||
public static Item averageLengtheningCatalyst;
|
||||
public static Item greaterLengtheningCatalyst;
|
||||
public static Item incendium;
|
||||
public static Item magicales;
|
||||
public static Item sanctus;
|
||||
public static Item aether;
|
||||
public static Item simpleCatalyst;
|
||||
public static Item crepitous;
|
||||
public static Item crystallos;
|
||||
public static Item terrae;
|
||||
public static Item aquasalus;
|
||||
public static Item tennebrae;
|
||||
public static Item demonBloodShard;
|
||||
public static Item archmageBloodOrb;
|
||||
public static Item sigilOfWind;
|
||||
public static Item telepositionFocus;
|
||||
public static Item enhancedTelepositionFocus;
|
||||
public static Item reinforcedTelepositionFocus;
|
||||
public static Item demonicTelepositionFocus;
|
||||
public static Item imbuedSlate;
|
||||
public static Item demonicSlate;
|
||||
public static Item duskScribeTool;
|
||||
public static Item sigilOfTheBridge;
|
||||
public static Item armourInhibitor;
|
||||
public static Item creativeFiller;
|
||||
public static Item demonPlacer;
|
||||
public static Item creativeDagger;
|
||||
|
||||
public static Item baseItems;
|
||||
public static Item baseAlchemyItems;
|
||||
|
||||
public static Item weakFillingAgent;
|
||||
public static Item standardFillingAgent;
|
||||
public static Item enhancedFillingAgent;
|
||||
public static Item weakBindingAgent;
|
||||
public static Item itemRitualDiviner;
|
||||
public static Item sanguineHelmet;
|
||||
public static Item sanguineRobe;
|
||||
public static Item sanguinePants;
|
||||
public static Item sanguineBoots;
|
||||
public static Item focusBloodBlast;
|
||||
public static Item focusGravityWell;
|
||||
public static Item sigilOfMagnetism;
|
||||
public static Item itemKeyOfDiablo;
|
||||
public static Item energyBazooka;
|
||||
public static Item energyBazookaSecondTier;
|
||||
public static Item energyBazookaThirdTier;
|
||||
public static Item itemBloodLightSigil;
|
||||
public static Item itemComplexSpellCrystal;
|
||||
public static Item itemBloodFrame;
|
||||
|
||||
public static Item itemSigilOfEnderSeverance;
|
||||
public static Item itemSigilOfSupression;
|
||||
public static Item itemFluidSigil;
|
||||
public static Item itemSeerSigil;
|
||||
public static Item itemCombinationalCatalyst;
|
||||
|
||||
public static Item customTool;
|
||||
|
||||
public static Item itemAttunedCrystal;
|
||||
public static Item itemTankSegmenter;
|
||||
public static Item itemDestinationClearer;
|
||||
|
||||
public static Item itemHarvestSigil;
|
||||
public static Item itemCompressionSigil;
|
||||
|
||||
public static Item bucketLife;
|
||||
|
||||
public static Item itemBloodPack;
|
||||
|
||||
public static Item transcendentBloodOrb;
|
||||
public static Item itemAssassinSigil;
|
||||
|
||||
public static Item boundHelmetWater;
|
||||
public static Item boundPlateWater;
|
||||
@@ -150,146 +237,123 @@ public class ModItems {
|
||||
public static Item boundLeggingsFire;
|
||||
public static Item boundBootsFire;
|
||||
|
||||
// Sigils
|
||||
// T1
|
||||
public static Item divinationSigil;
|
||||
public static Item itemSeerSigil;
|
||||
public static Item waterSigil;
|
||||
public static Item lavaSigil;
|
||||
// T2
|
||||
public static Item airSigil;
|
||||
public static Item voidSigil;
|
||||
public static Item growthSigil;
|
||||
public static Item sigilOfTheFastMiner;
|
||||
// T3
|
||||
public static Item sigilOfElementalAffinity;
|
||||
public static Item itemBloodLightSigil;
|
||||
public static Item sigilOfTheBridge;
|
||||
public static Item sigilOfMagnetism;
|
||||
public static Item sigilOfHolding;
|
||||
// T4
|
||||
public static Item sigilOfWind;
|
||||
public static Item itemSigilOfSupression;
|
||||
public static Item sigilOfHaste;
|
||||
public static Item itemSigilOfEnderSeverance;
|
||||
public static Item itemCompressionSigil;
|
||||
// T5
|
||||
public static Item itemHarvestSigil;
|
||||
// Unimplemented
|
||||
public static Item itemFluidSigil;
|
||||
public static Item itemAssassinSigil;
|
||||
|
||||
// Crafting Materials
|
||||
public static Item blankSlate;
|
||||
public static Item reinforcedSlate;
|
||||
public static Item imbuedSlate;
|
||||
public static Item demonicSlate;
|
||||
public static Item baseItems;
|
||||
public static Item weakBloodShard;
|
||||
public static Item demonBloodShard;
|
||||
public static Item bucketLife;
|
||||
|
||||
// Alchemy
|
||||
// Potions
|
||||
public static Item alchemyFlask;
|
||||
public static Item simpleCatalyst;
|
||||
public static Item weakBindingAgent;
|
||||
public static Item standardBindingAgent;
|
||||
public static Item mundanePowerCatalyst;
|
||||
public static Item averagePowerCatalyst;
|
||||
public static Item greaterPowerCatalyst;
|
||||
public static Item mundaneLengtheningCatalyst;
|
||||
public static Item averageLengtheningCatalyst;
|
||||
public static Item greaterLengtheningCatalyst;
|
||||
public static Item weakFillingAgent;
|
||||
public static Item standardFillingAgent;
|
||||
public static Item enhancedFillingAgent;
|
||||
// Reagents
|
||||
public static Item itemAttunedCrystal;
|
||||
public static Item itemTankSegmenter;
|
||||
public static Item itemDestinationClearer;
|
||||
public static Item incendium;
|
||||
public static Item magicales;
|
||||
public static Item sanctus;
|
||||
public static Item aether;
|
||||
public static Item crepitous;
|
||||
public static Item crystallos;
|
||||
public static Item terrae;
|
||||
public static Item aquasalus;
|
||||
public static Item tennebrae;
|
||||
// Other Alchemy Items
|
||||
public static Item baseAlchemyItems;
|
||||
public static Item itemIncense;
|
||||
// Unused
|
||||
public static Item itemCombinationalCatalyst;
|
||||
|
||||
// Utility
|
||||
public static Item sacrificialDagger;
|
||||
public static Item daggerOfSacrifice;
|
||||
public static Item creativeDagger;
|
||||
public static Item lavaCrystal;
|
||||
public static Item itemKeyOfDiablo;
|
||||
public static Item armourInhibitor;
|
||||
public static Item telepositionFocus;
|
||||
public static Item enhancedTelepositionFocus;
|
||||
public static Item reinforcedTelepositionFocus;
|
||||
public static Item demonicTelepositionFocus;
|
||||
public static Item inputRoutingFocus;
|
||||
public static Item outputRoutingFocus;
|
||||
public static Item blankSpell;
|
||||
public static Item itemComplexSpellCrystal;
|
||||
public static Item demonPlacer;
|
||||
|
||||
// Rituals
|
||||
public static Item waterScribeTool;
|
||||
public static Item fireScribeTool;
|
||||
public static Item earthScribeTool;
|
||||
public static Item airScribeTool;
|
||||
public static Item duskScribeTool;
|
||||
public static Item dawnScribeTool;
|
||||
public static Item itemRitualDiviner;
|
||||
public static Item ritualDismantler;
|
||||
public static Item activationCrystal;
|
||||
|
||||
// Guide-API
|
||||
public static Item itemMailCatalogue;
|
||||
|
||||
// Unimplemented
|
||||
public static Item focusBloodBlast;
|
||||
public static Item focusGravityWell;
|
||||
public static Item itemBloodFrame;
|
||||
public static Item itemIncense;
|
||||
|
||||
public static Item ritualDismantler;
|
||||
|
||||
public static void init() {
|
||||
// Orbs
|
||||
weakBloodOrb = new EnergyBattery(5000).setUnlocalizedName("weakBloodOrb");
|
||||
apprenticeBloodOrb = new ApprenticeBloodOrb(25000).setUnlocalizedName("apprenticeBloodOrb");
|
||||
magicianBloodOrb = new MagicianBloodOrb(150000).setUnlocalizedName("magicianBloodOrb");
|
||||
masterBloodOrb = new MasterBloodOrb(1000000).setUnlocalizedName("masterBloodOrb");
|
||||
archmageBloodOrb = new ArchmageBloodOrb(10000000).setUnlocalizedName("archmageBloodOrb");
|
||||
transcendentBloodOrb = new TranscendentBloodOrb(30000000).setUnlocalizedName("transcendentBloodOrb");
|
||||
creativeFiller = new CheatyItem().setUnlocalizedName("cheatyItem");
|
||||
|
||||
// Bound Tools/Weapons
|
||||
energySword = new EnergySword().setUnlocalizedName("energySword");
|
||||
boundPickaxe = new BoundPickaxe().setUnlocalizedName("boundPickaxe");
|
||||
boundAxe = new BoundAxe().setUnlocalizedName("boundAxe");
|
||||
boundShovel = new BoundShovel().setUnlocalizedName("boundShovel");
|
||||
customTool = new ItemSpellMultiTool().setUnlocalizedName("multiTool");
|
||||
SpellParadigmTool.customTool = customTool;
|
||||
energyBlaster = new EnergyBlast(1).setUnlocalizedName("energyBlast");
|
||||
energyBlasterSecondTier = new EnergyBlast(2).setUnlocalizedName("energyBlastSecondTier");
|
||||
energyBlasterThirdTier = new EnergyBlast(3).setUnlocalizedName("energyBlastThirdTier");
|
||||
energyBazooka = new EnergyBazooka(1).setUnlocalizedName("energyBazooka");
|
||||
energyBazookaSecondTier = new EnergyBazooka(2).setUnlocalizedName("energyBazookaSecondTier");
|
||||
energyBazookaThirdTier = new EnergyBazooka(3).setUnlocalizedName("energyBazookaThirdTier");
|
||||
|
||||
// Armor
|
||||
itemBloodPack = new ItemBloodLetterPack().setUnlocalizedName("itemBloodPack");
|
||||
|
||||
energySword = new EnergySword().setUnlocalizedName("energySword");
|
||||
lavaCrystal = new LavaCrystal().setUnlocalizedName("lavaCrystal");
|
||||
waterSigil = new SigilWater().setUnlocalizedName("waterSigil");
|
||||
lavaSigil = new SigilLava().setUnlocalizedName("lavaSigil");
|
||||
voidSigil = new SigilVoid().setUnlocalizedName("voidSigil");
|
||||
blankSlate = new AWBaseItems().setUnlocalizedName("blankSlate");
|
||||
reinforcedSlate = new AWBaseItems().setUnlocalizedName("reinforcedSlate");
|
||||
sacrificialDagger = new SacrificialDagger().setUnlocalizedName("sacrificialDagger");
|
||||
daggerOfSacrifice = new DaggerOfSacrifice().setUnlocalizedName("daggerOfSacrifice");
|
||||
airSigil = new SigilAir().setUnlocalizedName("airSigil");
|
||||
sigilOfTheFastMiner = new SigilOfTheFastMiner().setUnlocalizedName("sigilOfTheFastMiner");
|
||||
sigilOfElementalAffinity = new SigilOfElementalAffinity().setUnlocalizedName("sigilOfElementalAffinity");
|
||||
sigilOfHaste = new SigilOfHaste().setUnlocalizedName("sigilOfHaste");
|
||||
sigilOfHolding = new SigilOfHolding().setUnlocalizedName("sigilOfHolding");
|
||||
divinationSigil = new SigilDivination().setUnlocalizedName("divinationSigil");
|
||||
waterScribeTool = new WaterScribeTool().setUnlocalizedName("waterScribeTool");
|
||||
fireScribeTool = new FireScribeTool().setUnlocalizedName("fireScribeTool");
|
||||
earthScribeTool = new EarthScribeTool().setUnlocalizedName("earthScribeTool");
|
||||
airScribeTool = new AirScribeTool().setUnlocalizedName("airScribeTool");
|
||||
activationCrystal = new ActivationCrystal();
|
||||
boundPickaxe = new BoundPickaxe().setUnlocalizedName("boundPickaxe");
|
||||
boundAxe = new BoundAxe().setUnlocalizedName("boundAxe");
|
||||
boundShovel = new BoundShovel().setUnlocalizedName("boundShovel");
|
||||
boundHelmet = new BoundArmour(0).setUnlocalizedName("boundHelmet");
|
||||
boundPlate = new BoundArmour(1).setUnlocalizedName("boundPlate");
|
||||
boundLeggings = new BoundArmour(2).setUnlocalizedName("boundLeggings");
|
||||
boundBoots = new BoundArmour(3).setUnlocalizedName("boundBoots");
|
||||
weakBloodShard = new BloodShard().setUnlocalizedName("weakBloodShard");
|
||||
growthSigil = new SigilOfGrowth().setUnlocalizedName("growthSigil");
|
||||
blankSpell = new BlankSpell().setUnlocalizedName("blankSpell");
|
||||
alchemyFlask = new AlchemyFlask().setUnlocalizedName("alchemyFlask");
|
||||
standardBindingAgent = new StandardBindingAgent().setUnlocalizedName("standardBindingAgent");
|
||||
mundanePowerCatalyst = new MundanePowerCatalyst().setUnlocalizedName("mundanePowerCatalyst");
|
||||
averagePowerCatalyst = new AveragePowerCatalyst().setUnlocalizedName("averagePowerCatalyst");
|
||||
greaterPowerCatalyst = new GreaterPowerCatalyst().setUnlocalizedName("greaterPowerCatalyst");
|
||||
mundaneLengtheningCatalyst = new MundaneLengtheningCatalyst().setUnlocalizedName("mundaneLengtheningCatalyst");
|
||||
averageLengtheningCatalyst = new AverageLengtheningCatalyst().setUnlocalizedName("averageLengtheningCatalyst");
|
||||
greaterLengtheningCatalyst = new GreaterLengtheningCatalyst().setUnlocalizedName("greaterLengtheningCatalyst");
|
||||
incendium = new AlchemyReagent().setUnlocalizedName("incendium");
|
||||
magicales = new AlchemyReagent().setUnlocalizedName("magicales");
|
||||
sanctus = new AlchemyReagent().setUnlocalizedName("sanctus");
|
||||
aether = new AlchemyReagent().setUnlocalizedName("aether");
|
||||
simpleCatalyst = new AlchemyReagent().setUnlocalizedName("simpleCatalyst");
|
||||
crepitous = new AlchemyReagent().setUnlocalizedName("crepitous");
|
||||
crystallos = new AlchemyReagent().setUnlocalizedName("crystallos");
|
||||
terrae = new AlchemyReagent().setUnlocalizedName("terrae");
|
||||
aquasalus = new AlchemyReagent().setUnlocalizedName("aquasalus");
|
||||
tennebrae = new AlchemyReagent().setUnlocalizedName("tennebrae");
|
||||
demonBloodShard = new BloodShard().setUnlocalizedName("demonBloodShard");
|
||||
sigilOfWind = new SigilOfWind().setUnlocalizedName("sigilOfWind");
|
||||
telepositionFocus = new TelepositionFocus(1).setUnlocalizedName("telepositionFocus");
|
||||
enhancedTelepositionFocus = new EnhancedTelepositionFocus().setUnlocalizedName("enhancedTelepositionFocus");
|
||||
reinforcedTelepositionFocus = new ReinforcedTelepositionFocus()
|
||||
.setUnlocalizedName("reinforcedTelepositionFocus");
|
||||
demonicTelepositionFocus = new DemonicTelepositionFocus().setUnlocalizedName("demonicTelepositionFocus");
|
||||
imbuedSlate = new AWBaseItems().setUnlocalizedName("imbuedSlate");
|
||||
demonicSlate = new AWBaseItems().setUnlocalizedName("demonicSlate");
|
||||
duskScribeTool = new DuskScribeTool().setUnlocalizedName("duskScribeTool");
|
||||
sigilOfTheBridge = new SigilOfTheBridge().setUnlocalizedName("sigilOfTheBridge");
|
||||
armourInhibitor = new ArmourInhibitor().setUnlocalizedName("armourInhibitor");
|
||||
creativeFiller = new CheatyItem().setUnlocalizedName("cheatyItem");
|
||||
demonPlacer = new DemonPlacer().setUnlocalizedName("demonPlacer");
|
||||
creativeDagger = new CreativeDagger().setUnlocalizedName("creativeDagger");
|
||||
weakFillingAgent = new WeakFillingAgent().setUnlocalizedName("weakFillingAgent");
|
||||
standardFillingAgent = new StandardFillingAgent().setUnlocalizedName("standardFillingAgent");
|
||||
enhancedFillingAgent = new EnhancedFillingAgent().setUnlocalizedName("enhancedFillingAgent");
|
||||
weakBindingAgent = new WeakBindingAgent().setUnlocalizedName("weakBindingAgent");
|
||||
itemRitualDiviner = new ItemRitualDiviner().setUnlocalizedName("ritualDiviner");
|
||||
sigilOfMagnetism = new SigilOfMagnetism().setUnlocalizedName("sigilOfMagnetism");
|
||||
itemKeyOfDiablo = new ItemDiabloKey().setUnlocalizedName("itemDiabloKey");
|
||||
energyBazooka = new EnergyBazooka(1).setUnlocalizedName("energyBazooka");
|
||||
energyBazookaSecondTier = new EnergyBazooka(2).setUnlocalizedName("energyBazookaSecondTier");
|
||||
energyBazookaThirdTier = new EnergyBazooka(3).setUnlocalizedName("energyBazookaThirdTier");
|
||||
itemBloodLightSigil = new SigilBloodLight().setUnlocalizedName("bloodLightSigil");
|
||||
itemComplexSpellCrystal = new ItemComplexSpellCrystal().setUnlocalizedName("itemComplexSpellCrystal");
|
||||
bucketLife = new LifeBucket(ModBlocks.blockLifeEssence).setUnlocalizedName("bucketLife")
|
||||
.setContainerItem(Items.bucket).setCreativeTab(CreativeTabs.tabMisc);
|
||||
itemSigilOfEnderSeverance = (new SigilOfEnderSeverance()).setUnlocalizedName("itemSigilOfEnderSeverance");
|
||||
baseItems = new ItemComponents().setUnlocalizedName("baseItems");
|
||||
baseAlchemyItems = new ItemAlchemyBase().setUnlocalizedName("baseAlchemyItems");
|
||||
itemSigilOfSupression = new SigilOfSupression().setUnlocalizedName("itemSigilOfSupression");
|
||||
itemFluidSigil = new SigilFluid().setUnlocalizedName("itemFluidSigil");
|
||||
itemSeerSigil = new SigilSeer().setUnlocalizedName("itemSeerSigil");
|
||||
customTool = new ItemSpellMultiTool().setUnlocalizedName("multiTool");
|
||||
|
||||
SpellParadigmTool.customTool = customTool;
|
||||
|
||||
itemCombinationalCatalyst = new CombinationalCatalyst().setUnlocalizedName("itemCombinationalCatalyst");
|
||||
itemAttunedCrystal = new ItemAttunedCrystal().setUnlocalizedName("itemAttunedCrystal");
|
||||
itemTankSegmenter = new ItemTankSegmenter().setUnlocalizedName("itemTankSegmenter");
|
||||
itemDestinationClearer = new ItemDestinationClearer().setUnlocalizedName("destinationClearer");
|
||||
|
||||
dawnScribeTool = new DawnScribeTool().setUnlocalizedName("dawnScribeTool");
|
||||
|
||||
itemBloodPack = new ItemBloodLetterPack().setUnlocalizedName("itemBloodPack");
|
||||
itemHarvestSigil = new SigilHarvest().setUnlocalizedName("itemHarvestSigil");
|
||||
itemCompressionSigil = new SigilPackRat().setUnlocalizedName("itemCompressionSigil");
|
||||
itemAssassinSigil = new SigilOfTheAssassin().setUnlocalizedName("itemAssassinSigil");
|
||||
|
||||
boundHelmetWater = new OmegaArmourWater(0).setUnlocalizedName("boundHelmetWater");
|
||||
boundPlateWater = new OmegaArmourWater(1).setUnlocalizedName("boundPlateWater");
|
||||
@@ -311,140 +375,122 @@ public class ModItems {
|
||||
boundLeggingsFire = new OmegaArmourFire(2).setUnlocalizedName("boundLeggingsFire");
|
||||
boundBootsFire = new OmegaArmourFire(3).setUnlocalizedName("boundBootsFire");
|
||||
|
||||
// Sigils
|
||||
// T1
|
||||
divinationSigil = new SigilDivination().setUnlocalizedName("divinationSigil");
|
||||
itemSeerSigil = new SigilSeer().setUnlocalizedName("itemSeerSigil");
|
||||
waterSigil = new SigilWater().setUnlocalizedName("waterSigil");
|
||||
lavaSigil = new SigilLava().setUnlocalizedName("lavaSigil");
|
||||
// T2
|
||||
airSigil = new SigilAir().setUnlocalizedName("airSigil");
|
||||
voidSigil = new SigilVoid().setUnlocalizedName("voidSigil");
|
||||
growthSigil = new SigilOfGrowth().setUnlocalizedName("growthSigil");
|
||||
sigilOfTheFastMiner = new SigilOfTheFastMiner().setUnlocalizedName("sigilOfTheFastMiner");
|
||||
// T3
|
||||
sigilOfElementalAffinity = new SigilOfElementalAffinity().setUnlocalizedName("sigilOfElementalAffinity");
|
||||
itemBloodLightSigil = new SigilBloodLight().setUnlocalizedName("bloodLightSigil");
|
||||
sigilOfTheBridge = new SigilOfTheBridge().setUnlocalizedName("sigilOfTheBridge");
|
||||
sigilOfMagnetism = new SigilOfMagnetism().setUnlocalizedName("sigilOfMagnetism");
|
||||
sigilOfHolding = new SigilOfHolding().setUnlocalizedName("sigilOfHolding");
|
||||
// T4
|
||||
sigilOfWind = new SigilOfWind().setUnlocalizedName("sigilOfWind");
|
||||
itemSigilOfSupression = new SigilOfSupression().setUnlocalizedName("itemSigilOfSupression");
|
||||
sigilOfHaste = new SigilOfHaste().setUnlocalizedName("sigilOfHaste");
|
||||
itemSigilOfEnderSeverance = (new SigilOfEnderSeverance()).setUnlocalizedName("itemSigilOfEnderSeverance");
|
||||
itemCompressionSigil = new SigilPackRat().setUnlocalizedName("itemCompressionSigil");
|
||||
// T5
|
||||
itemHarvestSigil = new SigilHarvest().setUnlocalizedName("itemHarvestSigil");
|
||||
// Unimplemented
|
||||
itemFluidSigil = new SigilFluid().setUnlocalizedName("itemFluidSigil");
|
||||
itemAssassinSigil = new SigilOfTheAssassin().setUnlocalizedName("itemAssassinSigil");
|
||||
|
||||
// Crafting Materials
|
||||
blankSlate = new AWBaseItems().setUnlocalizedName("blankSlate");
|
||||
reinforcedSlate = new AWBaseItems().setUnlocalizedName("reinforcedSlate");
|
||||
imbuedSlate = new AWBaseItems().setUnlocalizedName("imbuedSlate");
|
||||
demonicSlate = new AWBaseItems().setUnlocalizedName("demonicSlate");
|
||||
baseItems = new ItemComponents().setUnlocalizedName("baseItems");
|
||||
weakBloodShard = new BloodShard().setUnlocalizedName("weakBloodShard");
|
||||
demonBloodShard = new BloodShard().setUnlocalizedName("demonBloodShard");
|
||||
bucketLife = new LifeBucket(ModBlocks.blockLifeEssence).setUnlocalizedName("bucketLife")
|
||||
.setContainerItem(Items.bucket).setCreativeTab(CreativeTabs.tabMisc);
|
||||
|
||||
// Alchemy
|
||||
// Potions
|
||||
alchemyFlask = new AlchemyFlask().setUnlocalizedName("alchemyFlask");
|
||||
simpleCatalyst = new AlchemyReagent().setUnlocalizedName("simpleCatalyst");
|
||||
weakBindingAgent = new WeakBindingAgent().setUnlocalizedName("weakBindingAgent");
|
||||
standardBindingAgent = new StandardBindingAgent().setUnlocalizedName("standardBindingAgent");
|
||||
mundanePowerCatalyst = new MundanePowerCatalyst().setUnlocalizedName("mundanePowerCatalyst");
|
||||
averagePowerCatalyst = new AveragePowerCatalyst().setUnlocalizedName("averagePowerCatalyst");
|
||||
greaterPowerCatalyst = new GreaterPowerCatalyst().setUnlocalizedName("greaterPowerCatalyst");
|
||||
mundaneLengtheningCatalyst = new MundaneLengtheningCatalyst().setUnlocalizedName("mundaneLengtheningCatalyst");
|
||||
averageLengtheningCatalyst = new AverageLengtheningCatalyst().setUnlocalizedName("averageLengtheningCatalyst");
|
||||
greaterLengtheningCatalyst = new GreaterLengtheningCatalyst().setUnlocalizedName("greaterLengtheningCatalyst");
|
||||
weakFillingAgent = new WeakFillingAgent().setUnlocalizedName("weakFillingAgent");
|
||||
standardFillingAgent = new StandardFillingAgent().setUnlocalizedName("standardFillingAgent");
|
||||
enhancedFillingAgent = new EnhancedFillingAgent().setUnlocalizedName("enhancedFillingAgent");
|
||||
// Reagents
|
||||
itemAttunedCrystal = new ItemAttunedCrystal().setUnlocalizedName("itemAttunedCrystal");
|
||||
itemTankSegmenter = new ItemTankSegmenter().setUnlocalizedName("itemTankSegmenter");
|
||||
itemDestinationClearer = new ItemDestinationClearer().setUnlocalizedName("destinationClearer");
|
||||
incendium = new AlchemyReagent().setUnlocalizedName("incendium");
|
||||
magicales = new AlchemyReagent().setUnlocalizedName("magicales");
|
||||
sanctus = new AlchemyReagent().setUnlocalizedName("sanctus");
|
||||
aether = new AlchemyReagent().setUnlocalizedName("aether");
|
||||
crepitous = new AlchemyReagent().setUnlocalizedName("crepitous");
|
||||
crystallos = new AlchemyReagent().setUnlocalizedName("crystallos");
|
||||
terrae = new AlchemyReagent().setUnlocalizedName("terrae");
|
||||
aquasalus = new AlchemyReagent().setUnlocalizedName("aquasalus");
|
||||
tennebrae = new AlchemyReagent().setUnlocalizedName("tennebrae");
|
||||
// Other Alchemy Items
|
||||
baseAlchemyItems = new ItemAlchemyBase().setUnlocalizedName("baseAlchemyItems");
|
||||
itemIncense = new ItemIncense().setUnlocalizedName("bloodMagicIncenseItem");
|
||||
// Unused
|
||||
itemCombinationalCatalyst = new CombinationalCatalyst().setUnlocalizedName("itemCombinationalCatalyst");
|
||||
|
||||
// Utility
|
||||
sacrificialDagger = new SacrificialDagger().setUnlocalizedName("sacrificialDagger");
|
||||
daggerOfSacrifice = new DaggerOfSacrifice().setUnlocalizedName("daggerOfSacrifice");
|
||||
creativeDagger = new CreativeDagger().setUnlocalizedName("creativeDagger");
|
||||
lavaCrystal = new LavaCrystal().setUnlocalizedName("lavaCrystal");
|
||||
itemKeyOfDiablo = new ItemDiabloKey().setUnlocalizedName("itemDiabloKey");
|
||||
armourInhibitor = new ArmourInhibitor().setUnlocalizedName("armourInhibitor");
|
||||
telepositionFocus = new TelepositionFocus(1).setUnlocalizedName("telepositionFocus");
|
||||
enhancedTelepositionFocus = new EnhancedTelepositionFocus().setUnlocalizedName("enhancedTelepositionFocus");
|
||||
reinforcedTelepositionFocus = new ReinforcedTelepositionFocus()
|
||||
.setUnlocalizedName("reinforcedTelepositionFocus");
|
||||
demonicTelepositionFocus = new DemonicTelepositionFocus().setUnlocalizedName("demonicTelepositionFocus");
|
||||
inputRoutingFocus = new InputRoutingFocus().setUnlocalizedName("inputRoutingFocus");
|
||||
outputRoutingFocus = new OutputRoutingFocus().setUnlocalizedName("outputRoutingFocus");
|
||||
blankSpell = new BlankSpell().setUnlocalizedName("blankSpell");
|
||||
itemComplexSpellCrystal = new ItemComplexSpellCrystal().setUnlocalizedName("itemComplexSpellCrystal");
|
||||
demonPlacer = new DemonPlacer().setUnlocalizedName("demonPlacer");
|
||||
|
||||
// Rituals
|
||||
waterScribeTool = new ScribeTool(1, "WaterScribeTool").setUnlocalizedName("waterScribeTool");
|
||||
fireScribeTool = new ScribeTool(2, "FireScribeTool").setUnlocalizedName("fireScribeTool");
|
||||
earthScribeTool = new ScribeTool(3, "EarthScribeTool").setUnlocalizedName("earthScribeTool");
|
||||
airScribeTool = new ScribeTool(4, "AirScribeTool").setUnlocalizedName("airScribeTool");
|
||||
duskScribeTool = new ScribeTool(5, "DuskScribeTool").setUnlocalizedName("duskScribeTool");
|
||||
dawnScribeTool = new ScribeTool(6, "DawnScribeTool").setUnlocalizedName("dawnScribeTool");
|
||||
itemRitualDiviner = new ItemRitualDiviner().setUnlocalizedName("ritualDiviner");
|
||||
itemIncense = new ItemIncense().setUnlocalizedName("bloodMagicIncenseItem");
|
||||
|
||||
ritualDismantler = new ItemRitualDismantler().setUnlocalizedName("ritualDismantler");
|
||||
activationCrystal = new ActivationCrystal();
|
||||
}
|
||||
|
||||
public static void registerItems() {
|
||||
// Orbs
|
||||
GameRegistry.registerItem(ModItems.weakBloodOrb, "weakBloodOrb");
|
||||
GameRegistry.registerItem(ModItems.apprenticeBloodOrb, "apprenticeBloodOrb");
|
||||
GameRegistry.registerItem(ModItems.magicianBloodOrb, "magicianBloodOrb");
|
||||
GameRegistry.registerItem(ModItems.masterBloodOrb, "masterBloodOrb");
|
||||
GameRegistry.registerItem(ModItems.archmageBloodOrb, "archmageBloodOrb");
|
||||
GameRegistry.registerItem(ModItems.transcendentBloodOrb, "transcendentBloodOrb");
|
||||
GameRegistry.registerItem(ModItems.creativeFiller, "creativeFiller");
|
||||
|
||||
// Bound Tools/Weapons
|
||||
GameRegistry.registerItem(ModItems.energySword, "energySword");
|
||||
GameRegistry.registerItem(ModItems.boundPickaxe, "boundPickaxe");
|
||||
GameRegistry.registerItem(ModItems.boundAxe, "boundAxe");
|
||||
GameRegistry.registerItem(ModItems.boundShovel, "boundShovel");
|
||||
GameRegistry.registerItem(ModItems.customTool, "customTool");
|
||||
GameRegistry.registerItem(ModItems.energyBlaster, "energyBlaster");
|
||||
GameRegistry.registerItem(ModItems.energyBlasterSecondTier, "energyBlasterSecondTier");
|
||||
GameRegistry.registerItem(ModItems.energyBlasterThirdTier, "energyBlasterThirdTier");
|
||||
GameRegistry.registerItem(ModItems.energyBazooka, "energyBazooka");
|
||||
GameRegistry.registerItem(ModItems.energyBazookaSecondTier, "energyBazookaSecondTier");
|
||||
GameRegistry.registerItem(ModItems.energyBazookaThirdTier, "energyBazookaThirdTier");
|
||||
|
||||
// Armor
|
||||
GameRegistry.registerItem(ModItems.itemBloodPack, "itemBloodPack");
|
||||
|
||||
GameRegistry.registerItem(ModItems.energySword, "energySword");
|
||||
GameRegistry.registerItem(ModItems.lavaCrystal, "lavaCrystal");
|
||||
GameRegistry.registerItem(ModItems.waterSigil, "waterSigil");
|
||||
GameRegistry.registerItem(ModItems.lavaSigil, "lavaSigil");
|
||||
GameRegistry.registerItem(ModItems.voidSigil, "voidSigil");
|
||||
GameRegistry.registerItem(ModItems.blankSlate, "blankSlate");
|
||||
GameRegistry.registerItem(ModItems.reinforcedSlate, "reinforcedSlate");
|
||||
GameRegistry.registerItem(ModItems.sacrificialDagger, "sacrificialKnife");
|
||||
GameRegistry.registerItem(ModItems.daggerOfSacrifice, "daggerOfSacrifice");
|
||||
GameRegistry.registerItem(ModItems.airSigil, "airSigil");
|
||||
GameRegistry.registerItem(ModItems.sigilOfTheFastMiner, "sigilOfTheFastMiner");
|
||||
GameRegistry.registerItem(ModItems.sigilOfElementalAffinity, "sigilOfElementalAffinity");
|
||||
GameRegistry.registerItem(ModItems.sigilOfHaste, "sigilOfHaste");
|
||||
GameRegistry.registerItem(ModItems.sigilOfHolding, "sigilOfHolding");
|
||||
GameRegistry.registerItem(ModItems.divinationSigil, "divinationSigil");
|
||||
GameRegistry.registerItem(ModItems.waterScribeTool, "waterScribeTool");
|
||||
GameRegistry.registerItem(ModItems.fireScribeTool, "fireScribeTool");
|
||||
GameRegistry.registerItem(ModItems.earthScribeTool, "earthScribeTool");
|
||||
GameRegistry.registerItem(ModItems.airScribeTool, "airScribeTool");
|
||||
GameRegistry.registerItem(ModItems.activationCrystal, "activationCrystal");
|
||||
GameRegistry.registerItem(ModItems.boundPickaxe, "boundPickaxe");
|
||||
GameRegistry.registerItem(ModItems.boundAxe, "boundAxe");
|
||||
GameRegistry.registerItem(ModItems.boundShovel, "boundShovel");
|
||||
GameRegistry.registerItem(ModItems.boundHelmet, "boundHelmet");
|
||||
GameRegistry.registerItem(ModItems.boundPlate, "boundPlate");
|
||||
GameRegistry.registerItem(ModItems.boundLeggings, "boundLeggings");
|
||||
GameRegistry.registerItem(ModItems.boundBoots, "boundBoots");
|
||||
GameRegistry.registerItem(ModItems.weakBloodShard, "weakBloodShard");
|
||||
GameRegistry.registerItem(ModItems.growthSigil, "growthSigil");
|
||||
GameRegistry.registerItem(ModItems.blankSpell, "blankSpell");
|
||||
GameRegistry.registerItem(ModItems.masterBloodOrb, "masterBloodOrb");
|
||||
GameRegistry.registerItem(ModItems.alchemyFlask, "alchemyFlask");
|
||||
GameRegistry.registerItem(ModItems.standardBindingAgent, "standardBindingAgent");
|
||||
GameRegistry.registerItem(ModItems.mundanePowerCatalyst, "mundanePowerCatalyst");
|
||||
GameRegistry.registerItem(ModItems.averagePowerCatalyst, "averagePowerCatalyst");
|
||||
GameRegistry.registerItem(ModItems.greaterPowerCatalyst, "greaterPowerCatalyst");
|
||||
GameRegistry.registerItem(ModItems.mundaneLengtheningCatalyst, "mundaneLengtheningCatalyst");
|
||||
GameRegistry.registerItem(ModItems.averageLengtheningCatalyst, "averageLengtheningCatalyst");
|
||||
GameRegistry.registerItem(ModItems.greaterLengtheningCatalyst, "greaterLengtheningCatalyst");
|
||||
GameRegistry.registerItem(ModItems.incendium, "incendium");
|
||||
GameRegistry.registerItem(ModItems.magicales, "magicales");
|
||||
GameRegistry.registerItem(ModItems.sanctus, "sanctus");
|
||||
GameRegistry.registerItem(ModItems.aether, "aether");
|
||||
GameRegistry.registerItem(ModItems.simpleCatalyst, "simpleCatalyst");
|
||||
GameRegistry.registerItem(ModItems.crepitous, "crepitous");
|
||||
GameRegistry.registerItem(ModItems.crystallos, "crystallos");
|
||||
GameRegistry.registerItem(ModItems.terrae, "terrae");
|
||||
GameRegistry.registerItem(ModItems.aquasalus, "aquasalus");
|
||||
GameRegistry.registerItem(ModItems.tennebrae, "tennebrae");
|
||||
GameRegistry.registerItem(ModItems.demonBloodShard, "demonBloodShard");
|
||||
GameRegistry.registerItem(ModItems.archmageBloodOrb, "archmageBloodOrb");
|
||||
GameRegistry.registerItem(ModItems.transcendentBloodOrb, "transcendentBloodOrb");
|
||||
GameRegistry.registerItem(ModItems.sigilOfWind, "sigilOfWind");
|
||||
GameRegistry.registerItem(ModItems.telepositionFocus, "telepositionFocus");
|
||||
GameRegistry.registerItem(ModItems.enhancedTelepositionFocus, "enhancedTelepositionFocus");
|
||||
GameRegistry.registerItem(ModItems.reinforcedTelepositionFocus, "reinforcedTelepositionFocus");
|
||||
GameRegistry.registerItem(ModItems.demonicTelepositionFocus, "demonicTelepositionFocus");
|
||||
GameRegistry.registerItem(ModItems.imbuedSlate, "imbuedSlate");
|
||||
GameRegistry.registerItem(ModItems.demonicSlate, "demonicSlate");
|
||||
GameRegistry.registerItem(ModItems.duskScribeTool, "duskScribeTool");
|
||||
GameRegistry.registerItem(ModItems.sigilOfTheBridge, "sigilOfTheBridge");
|
||||
GameRegistry.registerItem(ModItems.armourInhibitor, "armourInhibitor");
|
||||
GameRegistry.registerItem(ModItems.creativeFiller, "creativeFiller");
|
||||
GameRegistry.registerItem(ModItems.demonPlacer, "demonPlacer");
|
||||
GameRegistry.registerItem(ModItems.creativeDagger, "creativeDagger");
|
||||
|
||||
GameRegistry.registerItem(ModItems.weakFillingAgent, "weakFillingAgent");
|
||||
GameRegistry.registerItem(ModItems.standardFillingAgent, "standardFillingAgent");
|
||||
GameRegistry.registerItem(ModItems.enhancedFillingAgent, "enhancedFillingAgent");
|
||||
GameRegistry.registerItem(ModItems.weakBindingAgent, "weakBindingAgent");
|
||||
GameRegistry.registerItem(ModItems.itemRitualDiviner, "itemRitualDiviner");
|
||||
GameRegistry.registerItem(ModItems.sigilOfMagnetism, "sigilOfMagnetism");
|
||||
GameRegistry.registerItem(ModItems.itemKeyOfDiablo, "itemKeyOfDiablo");
|
||||
GameRegistry.registerItem(ModItems.energyBazooka, "energyBazooka");
|
||||
GameRegistry.registerItem(ModItems.energyBazookaSecondTier, "energyBazookaSecondTier");
|
||||
GameRegistry.registerItem(ModItems.energyBazookaThirdTier, "energyBazookaThirdTier");
|
||||
GameRegistry.registerItem(ModItems.itemBloodLightSigil, "itemBloodLightSigil");
|
||||
GameRegistry.registerItem(ModItems.itemComplexSpellCrystal, "itemComplexSpellCrystal");
|
||||
GameRegistry.registerItem(ModItems.itemSigilOfSupression, "sigilOfSupression");
|
||||
GameRegistry.registerItem(ModItems.itemSigilOfEnderSeverance, "sigilOfEnderSeverance");
|
||||
GameRegistry.registerItem(ModItems.itemFluidSigil, "fluidSigil");
|
||||
GameRegistry.registerItem(ModItems.itemSeerSigil, "seerSigil");
|
||||
|
||||
GameRegistry.registerItem(ModItems.customTool, "customTool");
|
||||
|
||||
GameRegistry.registerItem(ModItems.bucketLife, "bucketLife");
|
||||
GameRegistry.registerItem(ModItems.itemCombinationalCatalyst, "itemCombinationalCatalyst");
|
||||
|
||||
GameRegistry.registerItem(ModItems.itemAttunedCrystal, "itemAttunedCrystal");
|
||||
GameRegistry.registerItem(ModItems.itemTankSegmenter, "itemTankSegmenter");
|
||||
GameRegistry.registerItem(ModItems.itemDestinationClearer, "itemDestinationClearer");
|
||||
|
||||
GameRegistry.registerItem(ModItems.baseItems, "bloodMagicBaseItems");
|
||||
GameRegistry.registerItem(ModItems.baseAlchemyItems, "bloodMagicBaseAlchemyItems");
|
||||
|
||||
GameRegistry.registerItem(ModItems.dawnScribeTool, "dawnScribeTool");
|
||||
|
||||
GameRegistry.registerItem(ModItems.itemBloodPack, "itemBloodPack");
|
||||
GameRegistry.registerItem(ModItems.itemHarvestSigil, "itemHarvestSigil");
|
||||
GameRegistry.registerItem(ModItems.itemCompressionSigil, "itemCompressionSigil");
|
||||
GameRegistry.registerItem(ModItems.itemAssassinSigil, "itemAssassinSigil");
|
||||
|
||||
GameRegistry.registerItem(ModItems.boundHelmetWater, "boundHelmetWater");
|
||||
GameRegistry.registerItem(ModItems.boundPlateWater, "boundPlateWater");
|
||||
@@ -466,105 +512,10 @@ public class ModItems {
|
||||
GameRegistry.registerItem(ModItems.boundLeggingsFire, "boundLeggingsFire");
|
||||
GameRegistry.registerItem(ModItems.boundBootsFire, "boundBootsFire");
|
||||
|
||||
// Sigils
|
||||
// T1
|
||||
GameRegistry.registerItem(ModItems.divinationSigil, "divinationSigil");
|
||||
GameRegistry.registerItem(ModItems.itemSeerSigil, "seerSigil");
|
||||
GameRegistry.registerItem(ModItems.waterSigil, "waterSigil");
|
||||
GameRegistry.registerItem(ModItems.lavaSigil, "lavaSigil");
|
||||
// T2
|
||||
GameRegistry.registerItem(ModItems.airSigil, "airSigil");
|
||||
GameRegistry.registerItem(ModItems.voidSigil, "voidSigil");
|
||||
GameRegistry.registerItem(ModItems.growthSigil, "growthSigil");
|
||||
GameRegistry.registerItem(ModItems.sigilOfTheFastMiner, "sigilOfTheFastMiner");
|
||||
// T3
|
||||
GameRegistry.registerItem(ModItems.sigilOfElementalAffinity, "sigilOfElementalAffinity");
|
||||
GameRegistry.registerItem(ModItems.sigilOfTheBridge, "sigilOfTheBridge");
|
||||
GameRegistry.registerItem(ModItems.itemBloodLightSigil, "itemBloodLightSigil");
|
||||
GameRegistry.registerItem(ModItems.sigilOfMagnetism, "sigilOfMagnetism");
|
||||
GameRegistry.registerItem(ModItems.sigilOfHolding, "sigilOfHolding");
|
||||
// T4
|
||||
GameRegistry.registerItem(ModItems.sigilOfWind, "sigilOfWind");
|
||||
GameRegistry.registerItem(ModItems.itemSigilOfSupression, "sigilOfSupression");
|
||||
GameRegistry.registerItem(ModItems.sigilOfHaste, "sigilOfHaste");
|
||||
GameRegistry.registerItem(ModItems.itemSigilOfEnderSeverance, "sigilOfEnderSeverance");
|
||||
GameRegistry.registerItem(ModItems.itemCompressionSigil, "itemCompressionSigil");
|
||||
// T5
|
||||
GameRegistry.registerItem(ModItems.itemHarvestSigil, "itemHarvestSigil");
|
||||
// Unimplemented
|
||||
GameRegistry.registerItem(ModItems.itemFluidSigil, "fluidSigil");
|
||||
GameRegistry.registerItem(ModItems.itemAssassinSigil, "itemAssassinSigil");
|
||||
|
||||
// Crafting Materials
|
||||
GameRegistry.registerItem(ModItems.blankSlate, "blankSlate");
|
||||
GameRegistry.registerItem(ModItems.reinforcedSlate, "reinforcedSlate");
|
||||
GameRegistry.registerItem(ModItems.imbuedSlate, "imbuedSlate");
|
||||
GameRegistry.registerItem(ModItems.demonicSlate, "demonicSlate");
|
||||
GameRegistry.registerItem(ModItems.baseItems, "bloodMagicBaseItems");
|
||||
GameRegistry.registerItem(ModItems.weakBloodShard, "weakBloodShard");
|
||||
GameRegistry.registerItem(ModItems.demonBloodShard, "demonBloodShard");
|
||||
GameRegistry.registerItem(ModItems.bucketLife, "bucketLife");
|
||||
|
||||
// Alchemy
|
||||
// Potions
|
||||
GameRegistry.registerItem(ModItems.alchemyFlask, "alchemyFlask");
|
||||
GameRegistry.registerItem(ModItems.simpleCatalyst, "simpleCatalyst");
|
||||
GameRegistry.registerItem(ModItems.weakBindingAgent, "weakBindingAgent");
|
||||
GameRegistry.registerItem(ModItems.standardBindingAgent, "standardBindingAgent");
|
||||
GameRegistry.registerItem(ModItems.mundanePowerCatalyst, "mundanePowerCatalyst");
|
||||
GameRegistry.registerItem(ModItems.averagePowerCatalyst, "averagePowerCatalyst");
|
||||
GameRegistry.registerItem(ModItems.greaterPowerCatalyst, "greaterPowerCatalyst");
|
||||
GameRegistry.registerItem(ModItems.mundaneLengtheningCatalyst, "mundaneLengtheningCatalyst");
|
||||
GameRegistry.registerItem(ModItems.averageLengtheningCatalyst, "averageLengtheningCatalyst");
|
||||
GameRegistry.registerItem(ModItems.greaterLengtheningCatalyst, "greaterLengtheningCatalyst");
|
||||
GameRegistry.registerItem(ModItems.weakFillingAgent, "weakFillingAgent");
|
||||
GameRegistry.registerItem(ModItems.standardFillingAgent, "standardFillingAgent");
|
||||
GameRegistry.registerItem(ModItems.enhancedFillingAgent, "enhancedFillingAgent");
|
||||
// Reagents
|
||||
GameRegistry.registerItem(ModItems.itemAttunedCrystal, "itemAttunedCrystal");
|
||||
GameRegistry.registerItem(ModItems.itemTankSegmenter, "itemTankSegmenter");
|
||||
GameRegistry.registerItem(ModItems.itemDestinationClearer, "itemDestinationClearer");
|
||||
GameRegistry.registerItem(ModItems.incendium, "incendium");
|
||||
GameRegistry.registerItem(ModItems.magicales, "magicales");
|
||||
GameRegistry.registerItem(ModItems.sanctus, "sanctus");
|
||||
GameRegistry.registerItem(ModItems.aether, "aether");
|
||||
GameRegistry.registerItem(ModItems.crepitous, "crepitous");
|
||||
GameRegistry.registerItem(ModItems.crystallos, "crystallos");
|
||||
GameRegistry.registerItem(ModItems.terrae, "terrae");
|
||||
GameRegistry.registerItem(ModItems.aquasalus, "aquasalus");
|
||||
GameRegistry.registerItem(ModItems.tennebrae, "tennebrae");
|
||||
// Other Alchemy Items
|
||||
GameRegistry.registerItem(ModItems.baseAlchemyItems, "bloodMagicBaseAlchemyItems");
|
||||
GameRegistry.registerItem(ModItems.itemIncense, "bloodMagicIncenseItem");
|
||||
// Unused
|
||||
GameRegistry.registerItem(ModItems.itemCombinationalCatalyst, "itemCombinationalCatalyst");
|
||||
|
||||
// Utility
|
||||
GameRegistry.registerItem(ModItems.sacrificialDagger, "sacrificialKnife");
|
||||
GameRegistry.registerItem(ModItems.daggerOfSacrifice, "daggerOfSacrifice");
|
||||
GameRegistry.registerItem(ModItems.creativeDagger, "creativeDagger");
|
||||
GameRegistry.registerItem(ModItems.lavaCrystal, "lavaCrystal");
|
||||
GameRegistry.registerItem(ModItems.itemKeyOfDiablo, "itemKeyOfDiablo");
|
||||
GameRegistry.registerItem(ModItems.armourInhibitor, "armourInhibitor");
|
||||
GameRegistry.registerItem(ModItems.telepositionFocus, "telepositionFocus");
|
||||
GameRegistry.registerItem(ModItems.enhancedTelepositionFocus, "enhancedTelepositionFocus");
|
||||
GameRegistry.registerItem(ModItems.reinforcedTelepositionFocus, "reinforcedTelepositionFocus");
|
||||
GameRegistry.registerItem(ModItems.demonicTelepositionFocus, "demonicTelepositionFocus");
|
||||
GameRegistry.registerItem(ModItems.inputRoutingFocus, "inputRoutingFocus");
|
||||
GameRegistry.registerItem(ModItems.outputRoutingFocus, "outputRoutingFocus");
|
||||
GameRegistry.registerItem(ModItems.blankSpell, "blankSpell");
|
||||
GameRegistry.registerItem(ModItems.itemComplexSpellCrystal, "itemComplexSpellCrystal");
|
||||
GameRegistry.registerItem(ModItems.demonPlacer, "demonPlacer");
|
||||
|
||||
// Rituals
|
||||
GameRegistry.registerItem(ModItems.waterScribeTool, "waterScribeTool");
|
||||
GameRegistry.registerItem(ModItems.fireScribeTool, "fireScribeTool");
|
||||
GameRegistry.registerItem(ModItems.earthScribeTool, "earthScribeTool");
|
||||
GameRegistry.registerItem(ModItems.airScribeTool, "airScribeTool");
|
||||
GameRegistry.registerItem(ModItems.duskScribeTool, "duskScribeTool");
|
||||
GameRegistry.registerItem(ModItems.dawnScribeTool, "dawnScribeTool");
|
||||
GameRegistry.registerItem(ModItems.itemRitualDiviner, "itemRitualDiviner");
|
||||
GameRegistry.registerItem(ModItems.itemIncense, "bloodMagicIncenseItem");
|
||||
GameRegistry.registerItem(ModItems.ritualDismantler, "ritualDismantler");
|
||||
GameRegistry.registerItem(ModItems.activationCrystal, "activationCrystal");
|
||||
}
|
||||
}
|
||||
@@ -9,8 +9,8 @@ import cpw.mods.fml.common.registry.GameData;
|
||||
*/
|
||||
public class BlockStack {
|
||||
|
||||
private final Block block;
|
||||
private final int meta;
|
||||
private Block block;
|
||||
private int meta;
|
||||
|
||||
public BlockStack(Block block, int meta) {
|
||||
this.block = block;
|
||||
|
||||
@@ -1,29 +1,17 @@
|
||||
package WayofTime.alchemicalWizardry.api;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class RoutingFocusLogic {
|
||||
|
||||
public boolean getDefaultMatch(ItemStack keyStack, ItemStack checkedStack) {
|
||||
return (keyStack != null && keyStack.getItem() != null
|
||||
&& checkedStack != null
|
||||
&& keyStack.getItem() == checkedStack.getItem()
|
||||
&& (!keyStack.getItem().getHasSubtypes() || keyStack.getItemDamage() == checkedStack.getItemDamage()));
|
||||
return (keyStack != null ? checkedStack != null && keyStack.getItem() == checkedStack.getItem()
|
||||
&& (keyStack.getItem().getHasSubtypes() ? keyStack.getItemDamage() == checkedStack.getItemDamage()
|
||||
: true)
|
||||
: false);
|
||||
}
|
||||
|
||||
public boolean doesItemMatch(boolean previous, ItemStack keyStack, ItemStack checkedStack) {
|
||||
return previous || this.getDefaultMatch(keyStack, checkedStack);
|
||||
}
|
||||
|
||||
public List<String> getDescription() {
|
||||
return new ArrayList<>(
|
||||
Collections.singletonList(
|
||||
StatCollector.translateToLocal("tooltip.routingFocus.logic") + " "
|
||||
+ StatCollector.translateToLocal("item.outputRoutingFocus.default.logic")));
|
||||
}
|
||||
}
|
||||
@@ -7,11 +7,9 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public class RoutingFocusParadigm {
|
||||
|
||||
public List<RoutingFocusLogic> logicList = new LinkedList<>();
|
||||
public List<RoutingFocusLogic> logicList = new LinkedList();
|
||||
|
||||
public List<RoutingFocusPosAndFacing> locationList = new LinkedList<>();
|
||||
|
||||
public List<String> nameList = new LinkedList<>();
|
||||
public List<RoutingFocusPosAndFacing> locationList = new LinkedList();
|
||||
|
||||
public int maximumAmount = 0;
|
||||
|
||||
@@ -26,14 +24,6 @@ public class RoutingFocusParadigm {
|
||||
logicList.add(logic);
|
||||
}
|
||||
|
||||
public void addName(String name) {
|
||||
nameList.add(name);
|
||||
}
|
||||
|
||||
public boolean doesNameMatch(String name) {
|
||||
return nameList.contains(name);
|
||||
}
|
||||
|
||||
public boolean doesItemMatch(ItemStack keyStack, ItemStack checkedStack) {
|
||||
boolean isGood = false;
|
||||
boolean isFirst = true;
|
||||
@@ -52,7 +42,6 @@ public class RoutingFocusParadigm {
|
||||
public void clear() {
|
||||
logicList.clear();
|
||||
locationList.clear();
|
||||
nameList.clear();
|
||||
maximumAmount = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,4 +38,8 @@ public class Reagent {
|
||||
return colourIntensity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof Reagent && this == o && name.equals(((Reagent) o).name);
|
||||
}
|
||||
}
|
||||
@@ -5,8 +5,4 @@ public interface IBloodOrb {
|
||||
int getMaxEssence();
|
||||
|
||||
int getOrbLevel();
|
||||
|
||||
default boolean isFilledForFree() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -13,7 +13,7 @@ import WayofTime.alchemicalWizardry.api.tile.IBloodAltar;
|
||||
public class PlayerSacrificeHandler {
|
||||
|
||||
public static float scalingOfSacrifice = 0.001f;
|
||||
public static int soulFrayDuration = 240;
|
||||
public static int soulFrayDuration = 400;
|
||||
public static Potion soulFrayId;
|
||||
|
||||
public static float getPlayerIncense(EntityPlayer player) {
|
||||
|
||||
@@ -5,28 +5,23 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
public class LifeEssenceNetwork extends net.minecraft.world.WorldSavedData {
|
||||
|
||||
public int currentEssence;
|
||||
public int maxEssence;
|
||||
public int maxOrb;
|
||||
|
||||
public LifeEssenceNetwork(String par1Str) {
|
||||
super(par1Str);
|
||||
currentEssence = 0;
|
||||
// can be lower than currentEssence (overfilled) with runes of the orb
|
||||
maxEssence = 1;
|
||||
maxOrb = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbttagcompound) {
|
||||
currentEssence = nbttagcompound.getInteger("currentEssence");
|
||||
maxEssence = nbttagcompound.getInteger("maxEssence");
|
||||
maxOrb = nbttagcompound.getInteger("maxOrb");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbttagcompound) {
|
||||
nbttagcompound.setInteger("currentEssence", currentEssence);
|
||||
nbttagcompound.setInteger("maxEssence", maxEssence);
|
||||
nbttagcompound.setInteger("maxOrb", maxOrb);
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,6 @@ import WayofTime.alchemicalWizardry.api.event.ItemBindEvent;
|
||||
import WayofTime.alchemicalWizardry.api.event.ItemDrainInContainerEvent;
|
||||
import WayofTime.alchemicalWizardry.api.event.ItemDrainNetworkEvent;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
@@ -37,10 +36,6 @@ public class SoulNetworkHandler {
|
||||
return syphonFromNetwork(event.ownerNetwork, event.drainAmount) >= damageToBeDone;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #getMaxEssence(String ownerName)} to get maximum soul network capacity
|
||||
*/
|
||||
@Deprecated
|
||||
public static int getCurrentMaxOrb(String ownerName) {
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null) {
|
||||
@@ -58,28 +53,6 @@ public class SoulNetworkHandler {
|
||||
return data.maxOrb;
|
||||
}
|
||||
|
||||
public static int getMaxEssence(String ownerName) {
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
World world = mcServer.worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null) {
|
||||
data = new LifeEssenceNetwork(ownerName);
|
||||
world.setItemData(ownerName, data);
|
||||
}
|
||||
|
||||
return data.maxEssence;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #setMaxEssenceToMax(String ownerName, int maxEssence)} to set maximum soul network
|
||||
* capacity
|
||||
*/
|
||||
@Deprecated
|
||||
public static void setMaxOrbToMax(String ownerName, int maxOrb) {
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null) {
|
||||
@@ -98,28 +71,6 @@ public class SoulNetworkHandler {
|
||||
data.markDirty();
|
||||
}
|
||||
|
||||
public static void setMaxEssenceToMax(String ownerName, int maxEssence) {
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
World world = mcServer.worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null) {
|
||||
data = new LifeEssenceNetwork(ownerName);
|
||||
world.setItemData(ownerName, data);
|
||||
}
|
||||
|
||||
data.maxEssence = Math.max(maxEssence, data.maxEssence);
|
||||
data.markDirty();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #getMaxEssence(String ownerName)} to get maximum soul network capacity
|
||||
*/
|
||||
@Deprecated
|
||||
public static int getMaximumForOrbTier(int maxOrb) {
|
||||
switch (maxOrb) {
|
||||
case 1:
|
||||
@@ -376,14 +327,6 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
public static boolean checkAndSetItemPlayer(ItemStack item, EntityPlayer player) {
|
||||
if (item.getItem() instanceof IBloodOrb orb) {
|
||||
String currentOwner = item.hasTagCompound() ? item.getTagCompound().getString("ownerName") : "";
|
||||
String thisPlayer = getUsername(player);
|
||||
if (currentOwner.isEmpty() || currentOwner.equals(thisPlayer)) {
|
||||
setMaxEssenceToMax(thisPlayer, orb.getMaxEssence());
|
||||
}
|
||||
}
|
||||
|
||||
if (item.hasTagCompound() && !item.getTagCompound().getString("ownerName").equals("")) return true;
|
||||
|
||||
ItemBindEvent event = new ItemBindEvent(player, SoulNetworkHandler.getUsername(player), item);
|
||||
|
||||
@@ -2,109 +2,17 @@ package WayofTime.alchemicalWizardry.client.nei;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
public class IMCForNEI {
|
||||
|
||||
public static void IMCSender() {
|
||||
sendHandler("alchemicalwizardry.meteor", "AWWayofTime:masterStone", 181, 1);
|
||||
sendHandler("alchemicalwizardry.calcinator", "AWWayofTime:blockAlchemicCalcinator", 55, 5);
|
||||
sendHandler("alchemicalwizardry.meteor", "AWWayofTime:masterStone", 181);
|
||||
sendCatalyst("alchemicalwizardry.meteor", "AWWayofTime:masterStone");
|
||||
sendCatalyst("alchemicalwizardry.bindingritual", "AWWayofTime:masterStone");
|
||||
sendCatalyst("alchemicalwizardry.calcinator", "AWWayofTime:blockAlchemicCalcinator");
|
||||
// Blood Altar Progression
|
||||
sendInfoPage(
|
||||
"AWWayofTime: Altar,sacrificialKnife",
|
||||
"nei.infopage.bloodAltar.1." + (AlchemicalWizardry.wimpySettings ? "b" : "a"));
|
||||
sendInfoPage("AWWayofTime: Altar", "nei.infopage.bloodAltar.2");
|
||||
sendInfoPage("AWWayofTime: Altar,bucketLife", "nei.infopage.bloodAltar.3");
|
||||
sendInfoPage("AWWayofTime: Altar,weakBloodOrb", "nei.infopage.bloodAltar.4");
|
||||
sendInfoPage(
|
||||
"AWWayofTime: Altar,apprenticeBloodOrb|<AWWayofTime:AlchemicalWizardrybloodRune>",
|
||||
"nei.infopage.bloodAltar.5");
|
||||
sendInfoPage("AWWayofTime: Altar,magicianBloodOrb|<minecraft:glowstone>", "nei.infopage.bloodAltar.6");
|
||||
sendInfoPage("AWWayofTime: Altar,masterBloodOrb,largeBloodStoneBrick", "nei.infopage.bloodAltar.7");
|
||||
sendInfoPage("AWWayofTime: Altar,archmageBloodOrb|minecraft:beacon", "nei.infopage.bloodAltar.8");
|
||||
sendInfoPage("AWWayofTime: Altar,transcendentBloodOrb|<AWWayofTime:blockCrystal>", "nei.infopage.bloodAltar.9");
|
||||
// Incense
|
||||
sendInfoPage("AWWayofTime: incense,sacrificialKnife,blockCrucible", "nei.infopage.incense.1");
|
||||
sendInfoPage(
|
||||
"AWWayofTime: incense,sacrificialKnife,blockCrucible",
|
||||
"nei.infopage.incense.2." + (AlchemicalWizardry.wimpySettings ? "b" : "a"));
|
||||
sendInfoPage("AWWayofTime: incense,sacrificialKnife,blockCrucible", "nei.infopage.incense.3");
|
||||
// Sacrifices
|
||||
sendInfoPage("AWWayofTime runeOfSacrifice,daggerOfSacrifice", "nei.infopage.sacrifice.1");
|
||||
sendInfoPage("AWWayofTime runeOfSacrifice,daggerOfSacrifice", "nei.infopage.sacrifice.2");
|
||||
sendInfoPage("AWWayofTime runeOfSacrifice,daggerOfSacrifice", "nei.infopage.sacrifice.3");
|
||||
// Altar Runes
|
||||
sendInfoPage("<AWWayofTime:AlchemicalWizardrybloodRune:1>", "nei.infopage.rune.augmentedCapacity");
|
||||
sendInfoPage("<AWWayofTime:AlchemicalWizardrybloodRune:2>", "nei.infopage.rune.dislocation");
|
||||
sendInfoPage("<AWWayofTime:AlchemicalWizardrybloodRune:3>", "nei.infopage.rune.orb");
|
||||
sendInfoPage("<AWWayofTime:AlchemicalWizardrybloodRune:4>", "nei.infopage.rune.superiorCapacity");
|
||||
sendInfoPage("<AWWayofTime:AlchemicalWizardrybloodRune:5>", "nei.infopage.rune.acceleration");
|
||||
sendInfoPage("<AWWayofTime:AlchemicalWizardrybloodRune:6>", "nei.infopage.rune.quickness");
|
||||
sendInfoPage("<AWWayofTime:speedRune>", "nei.infopage.rune.speed");
|
||||
sendInfoPage("<AWWayofTime:efficiencyRune>", "nei.infopage.rune.efficiency");
|
||||
sendInfoPage("AWWayofTime runeOfSacrifice,daggerOfSacrifice", "nei.infopage.rune.sacrifice");
|
||||
sendInfoPage("AWWayofTime runeOfSelfSacrifice,sacrificialKnife", "nei.infopage.rune.selfSacrifice");
|
||||
sendInfoPage(
|
||||
"<AWWayofTime:AlchemicalWizardrybloodRune>|AWWayofTime runeOfSacrifice,daggerOfSacrifice",
|
||||
"nei.infopage.rune.blank");
|
||||
// Progression Items
|
||||
sendInfoPage(
|
||||
"AWWayofTime: masterBloodOrb,largeBloodStoneBrick,weakBloodShard,energySword,alchemyFlask",
|
||||
"nei.infopage.bloodShards");
|
||||
sendInfoPage(
|
||||
"AWWayofTime: masterBloodOrb,demonBloodShard,blockPlinth,blockPedestal,aether,aquasalus,incendium,sanctus,tennebrae|<AWWayofTime:terrae>",
|
||||
"nei.infopage.demonShards.1");
|
||||
sendInfoPage(
|
||||
"AWWayofTime: masterBloodOrb,demonBloodShard,blockPlinth,blockPedestal,aether,aquasalus,incendium,sanctus,tennebrae|<AWWayofTime:terrae>",
|
||||
"nei.infopage.demonShards.2");
|
||||
sendInfoPage(
|
||||
"AWWayofTime: demonBloodShard,blockPlinth,blockPedestal,aether,aquasalus,incendium,sanctus,tennebrae|<AWWayofTime:terrae>",
|
||||
"nei.infopage.demonShards.3");
|
||||
sendInfoPage(
|
||||
"AWWayofTime:bloodMagicBaseItems 28,29|<AWWayofTime:blockCrystal>",
|
||||
"nei.infopage.convocationShards");
|
||||
// Blood Orb / Soul Network Explanation
|
||||
sendInfoPage(
|
||||
"AWWayofTime: BloodOrb|<avaritia:orb_armok>|<ForbiddenMagic:EldritchOrb>|<BloodArsenal:transparent_orb>",
|
||||
"nei.infopage.bloodOrbs.1");
|
||||
sendInfoPage(
|
||||
"AWWayofTime: BloodOrb|<avaritia:orb_armok>|<ForbiddenMagic:EldritchOrb>|<BloodArsenal:transparent_orb>",
|
||||
"nei.infopage.bloodOrbs.2");
|
||||
sendInfoPage(
|
||||
"AWWayofTime: BloodOrb|<avaritia:orb_armok>|<ForbiddenMagic:EldritchOrb>|<BloodArsenal:transparent_orb>",
|
||||
"nei.infopage.bloodOrbs.3");
|
||||
sendInfoPage(
|
||||
"AWWayofTime: BloodOrb,divinationSigil|<avaritia:orb_armok>|<ForbiddenMagic:EldritchOrb>|<BloodArsenal:transparent_orb>",
|
||||
"nei.infopage.bloodOrbs.4");
|
||||
// Rituals
|
||||
sendInfoPage("<AWWayofTime:imperfectRitualStone>", "nei.infopage.rituals.weak.1");
|
||||
sendInfoPage("<AWWayofTime:imperfectRitualStone>", "nei.infopage.rituals.weak.2");
|
||||
sendInfoPage(
|
||||
"<AWWayofTime:ritualStone>|AWWayofTime masterStone,itemRitualDiviner,ScribeTool|activationCrystal 0,1",
|
||||
"nei.infopage.rituals.1");
|
||||
sendInfoPage(
|
||||
"<AWWayofTime:ritualStone>|AWWayofTime masterStone,itemRitualDiviner,ScribeTool|activationCrystal 0,1",
|
||||
"nei.infopage.rituals.2");
|
||||
sendInfoPage(
|
||||
"<AWWayofTime:ritualStone>|AWWayofTime masterStone,itemRitualDiviner,ScribeTool|activationCrystal 0,1",
|
||||
"nei.infopage.rituals.3");
|
||||
// Reagents
|
||||
sendInfoPage("AWWayofTime masterStone,blockAlchemicCalcinator", "nei.infopage.reagents.1");
|
||||
sendInfoPage("AWWayofTime masterStone,blockAlchemicCalcinator|<AWWayofTime:terrae>", "nei.infopage.reagents.2");
|
||||
sendInfoPage("AWWayofTime masterStone,blockAlchemicCalcinator,itemAttunedCrystal", "nei.infopage.reagents.3");
|
||||
sendInfoPage(
|
||||
"AWWayofTime masterStone,blockAlchemicCalcinator,itemTankSegmenter,itemDestinationClearer",
|
||||
"nei.infopage.reagents.4");
|
||||
sendInfoPage(
|
||||
"AWWayofTime masterStone,blockAlchemicCalcinator,blockReagentConduit,CrystalBelljar",
|
||||
"nei.infopage.reagents.5");
|
||||
}
|
||||
|
||||
private static void sendHandler(String handlerName, String stack, int height, int recipesPerPage) {
|
||||
private static void sendHandler(String handlerName, String stack, int height) {
|
||||
NBTTagCompound NBT = new NBTTagCompound();
|
||||
NBT.setString("handler", handlerName);
|
||||
NBT.setString("modName", "Blood Magic");
|
||||
@@ -112,7 +20,7 @@ public class IMCForNEI {
|
||||
NBT.setBoolean("modRequired", true);
|
||||
NBT.setString("itemName", stack);
|
||||
NBT.setInteger("handlerHeight", height);
|
||||
NBT.setInteger("maxRecipesPerPage", recipesPerPage);
|
||||
NBT.setInteger("maxRecipesPerPage", 1);
|
||||
FMLInterModComms.sendMessage("NotEnoughItems", "registerHandlerInfo", NBT);
|
||||
}
|
||||
|
||||
@@ -127,11 +35,4 @@ public class IMCForNEI {
|
||||
private static void sendCatalyst(String handlerName, String stack) {
|
||||
sendCatalyst(handlerName, stack, 0);
|
||||
}
|
||||
|
||||
private static void sendInfoPage(String filter, String page) {
|
||||
NBTTagCompound NBT = new NBTTagCompound();
|
||||
NBT.setString("filter", filter);
|
||||
NBT.setString("page", page);
|
||||
FMLInterModComms.sendMessage("NotEnoughItems", "addItemInfo", NBT);
|
||||
}
|
||||
}
|
||||
+33
-22
@@ -1,17 +1,15 @@
|
||||
package WayofTime.alchemicalWizardry.client.nei;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.client.ClientUtils.mc;
|
||||
import static WayofTime.alchemicalWizardry.client.nei.NEIConfig.getBloodOrbs;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
@@ -30,18 +28,28 @@ public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
public class CachedAlchemyRecipe extends CachedRecipe {
|
||||
|
||||
private final PositionedStack orbs;
|
||||
private final PositionedStack output;
|
||||
private final List<PositionedStack> inputs;
|
||||
private final int lp;
|
||||
public class BloodOrbs {
|
||||
|
||||
public PositionedStack stack;
|
||||
|
||||
public BloodOrbs(ItemStack orb) {
|
||||
this.stack = new PositionedStack(orb, 136, 47, false);
|
||||
}
|
||||
}
|
||||
|
||||
ArrayList<BloodOrbs> orbs;
|
||||
PositionedStack output;
|
||||
List<PositionedStack> inputs;
|
||||
int lp;
|
||||
|
||||
public CachedAlchemyRecipe(AlchemyRecipe recipe, ItemStack orb) {
|
||||
this(recipe);
|
||||
this.orbs.setPermutationToRender(orb);
|
||||
this.orbs = new ArrayList<BloodOrbs>();
|
||||
orbs.add(new BloodOrbs(orb));
|
||||
}
|
||||
|
||||
public CachedAlchemyRecipe(AlchemyRecipe recipe) {
|
||||
List<PositionedStack> inputs = new ArrayList<>();
|
||||
List<PositionedStack> inputs = new ArrayList<PositionedStack>();
|
||||
ItemStack[] stacks = recipe.getRecipe();
|
||||
if (stacks.length > 0) inputs.add(new PositionedStack(stacks[0], 76, 3));
|
||||
if (stacks.length > 1) inputs.add(new PositionedStack(stacks[1], 51, 19));
|
||||
@@ -51,13 +59,12 @@ public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler {
|
||||
this.inputs = inputs;
|
||||
this.output = new PositionedStack(recipe.getResult(), 76, 25);
|
||||
this.lp = recipe.getAmountNeeded() * 100;
|
||||
List<ItemStack> orbStacks = new ArrayList<>();
|
||||
this.orbs = new ArrayList<BloodOrbs>();
|
||||
for (Item orb : getBloodOrbs()) {
|
||||
if (((IBloodOrb) orb).getOrbLevel() >= recipe.getOrbLevel()) {
|
||||
orbStacks.add(new ItemStack(orb));
|
||||
orbs.add(new BloodOrbs(new ItemStack(orb)));
|
||||
}
|
||||
}
|
||||
orbs = new PositionedStack(orbStacks, 136, 47);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -71,8 +78,9 @@ public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionedStack> getOtherStacks() {
|
||||
return getCycledIngredients(cycleticks / 20, Collections.singletonList(orbs));
|
||||
public PositionedStack getOtherStack() {
|
||||
if (orbs == null || orbs.size() <= 0) return null;
|
||||
return orbs.get((cycleticks / 48) % orbs.size()).stack;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,10 +122,10 @@ public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
if (ingredient.getItem() instanceof IBloodOrb orb) {
|
||||
if (ingredient.getItem() instanceof IBloodOrb) {
|
||||
for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) {
|
||||
if (recipe == null) continue;
|
||||
if (orb.getOrbLevel() >= recipe.getOrbLevel()) {
|
||||
if (((IBloodOrb) ingredient.getItem()).getOrbLevel() >= recipe.getOrbLevel()) {
|
||||
arecipes.add(new CachedAlchemyRecipe(recipe, ingredient));
|
||||
}
|
||||
}
|
||||
@@ -137,14 +145,17 @@ public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public void drawExtras(int id) {
|
||||
CachedAlchemyRecipe recipe = (CachedAlchemyRecipe) arecipes.get(id);
|
||||
String text = EnumChatFormatting.GRAY.toString() + recipe.lp + "LP";
|
||||
mc.fontRenderer.drawString(text, getLPX(text), 28, 0);
|
||||
CachedAlchemyRecipe cache = (CachedAlchemyRecipe) arecipes.get(id);
|
||||
Minecraft.getMinecraft().fontRenderer.drawString("\u00a77" + cache.lp + "LP", getLPX(cache.lp), 34, 0);
|
||||
}
|
||||
|
||||
public int getLPX(String text) {
|
||||
int textWidth = mc.fontRenderer.getStringWidth(text);
|
||||
return 144 - (textWidth / 2);
|
||||
public int getLPX(int lp) {
|
||||
if (lp < 10) return 122;
|
||||
else if (lp < 100) return 122;
|
||||
else if (lp < 1000) return 130;
|
||||
else if (lp < 10000) return 127;
|
||||
else if (lp < 100000) return 124;
|
||||
return 122;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,7 +6,6 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
@@ -25,10 +24,10 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
public class CachedAltarRecipe extends CachedRecipe {
|
||||
|
||||
private final PositionedStack input;
|
||||
PositionedStack input;
|
||||
// PositionedStack inputItems;
|
||||
private final PositionedStack output;
|
||||
private final int tier, lp_amount, consumption, drain;
|
||||
PositionedStack output;
|
||||
int tier, lp_amount, consumption, drain;
|
||||
|
||||
public CachedAltarRecipe(AltarRecipe recipe) {
|
||||
// inputItems = new PositionedStack(recipe.input, 38, 2, false);
|
||||
@@ -66,7 +65,7 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
for (AltarRecipe recipe : AltarRecipeRegistry.altarRecipes) {
|
||||
if (NEIServerUtils.areStacksSameTypeCraftingWithNBT(recipe.result, result)) {
|
||||
if (recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe));
|
||||
if (recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -75,7 +74,7 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
for (AltarRecipe recipe : AltarRecipeRegistry.altarRecipes) {
|
||||
if (NEIServerUtils.areStacksSameTypeCraftingWithNBT(recipe.requiredItem, ingredient)) {
|
||||
if (recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe));
|
||||
if (recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,18 +83,21 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
|
||||
public void drawExtras(int id) {
|
||||
CachedAltarRecipe recipe = (CachedAltarRecipe) arecipes.get(id);
|
||||
Minecraft.getMinecraft().fontRenderer.drawString(
|
||||
EnumChatFormatting.GRAY + StatCollector.translateToLocal("bm.string.tier") + ": " + recipe.tier,
|
||||
"\u00a77" + StatCollector.translateToLocal("bm.string.tier") + ": " + recipe.tier,
|
||||
78,
|
||||
5,
|
||||
0);
|
||||
Minecraft.getMinecraft().fontRenderer
|
||||
.drawString(EnumChatFormatting.GRAY + "LP: " + recipe.lp_amount, 78, 15, 0);
|
||||
Minecraft.getMinecraft().fontRenderer.drawString("\u00a77" + "LP: " + recipe.lp_amount, 78, 15, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> handleTooltip(GuiRecipe<?> gui, List<String> currenttip, int id) {
|
||||
super.handleTooltip(gui, currenttip, id);
|
||||
if (altarRect(gui, id).contains(GuiDraw.getMousePosition())) {
|
||||
Point mouse = GuiDraw.getMousePosition();
|
||||
Point root = gui.getRecipePosition(id);
|
||||
int offsetX = gui.guiLeft + root.x;
|
||||
int offsetY = gui.guiTop + root.y;
|
||||
if (mouse.x >= 14 + offsetX && mouse.x <= 75 + offsetX && mouse.y >= 22 + offsetY && mouse.y <= 56 + offsetY) {
|
||||
CachedAltarRecipe recipe = (CachedAltarRecipe) arecipes.get(id);
|
||||
currenttip.add(StatCollector.translateToLocal("bm.string.consume") + ": " + recipe.consumption + "LP/t");
|
||||
currenttip.add(StatCollector.translateToLocal("bm.string.drain") + ": " + recipe.drain + "LP/t");
|
||||
@@ -103,13 +105,6 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
public Rectangle altarRect(GuiRecipe<?> gui, int id) {
|
||||
Point root = gui.getRecipePosition(id);
|
||||
int offsetX = gui.guiLeft + root.x;
|
||||
int offsetY = gui.guiTop + root.y;
|
||||
return new Rectangle(14 + offsetX, 22 + offsetY, 62, 34);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOverlayIdentifier() {
|
||||
return "altarrecipes";
|
||||
@@ -122,7 +117,7 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return StatCollector.translateToLocal("tile.bloodAltar.name");
|
||||
return " " + StatCollector.translateToLocal("tile.bloodAltar.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,12 +24,12 @@ import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
*/
|
||||
public class NEIBindingRitualHandler extends TemplateRecipeHandler {
|
||||
|
||||
private static final RitualInfo ritualInfo = new RitualInfo(1f, "AW006Binding");
|
||||
private static final RitualInfo ritualInfo = new RitualInfo("AW006Binding", 1f);
|
||||
private static final ReagentInfo reagentInfo = new ReagentInfo(1f);
|
||||
|
||||
public class CachedBindingRecipe extends CachedRecipe {
|
||||
|
||||
private final PositionedStack input, output;
|
||||
PositionedStack input, output;
|
||||
|
||||
public CachedBindingRecipe(BindingRecipe recipe) {
|
||||
input = new PositionedStack(recipe.requiredItem, 37, 21, false);
|
||||
@@ -94,20 +94,24 @@ public class NEIBindingRitualHandler extends TemplateRecipeHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> handleTooltip(GuiRecipe<?> gui, List<String> currenttip, int recipeIndex) {
|
||||
if (GuiContainerManager.shouldShowTooltip(gui) && currenttip.isEmpty()) {
|
||||
public List<String> handleTooltip(GuiRecipe<?> gui, List<String> list, int recipeIndex) {
|
||||
if (GuiContainerManager.shouldShowTooltip(gui) && list.isEmpty()) {
|
||||
CachedRecipe cRecipe = arecipes.get(recipeIndex);
|
||||
Point mousePos = GuiDraw.getMousePosition();
|
||||
|
||||
if (recipeIndex == 0 && cRecipe instanceof NEIBindingRitualHandler.CachedBindingRecipe) {
|
||||
if (ritualInfo.getRect(gui).contains(mousePos)) {
|
||||
ritualInfo.onHover(currenttip);
|
||||
} else if (reagentInfo.getRect(gui).contains(mousePos)) {
|
||||
currenttip.add(StatCollector.translateToLocal("nei.recipe.reagent.none"));
|
||||
Rectangle rect = ritualInfo.getRect(gui);
|
||||
if (rect.contains(mousePos)) {
|
||||
ritualInfo.onHover(list);
|
||||
}
|
||||
|
||||
rect = reagentInfo.getRect(gui);
|
||||
if (rect.contains(mousePos)) {
|
||||
list.add(StatCollector.translateToLocal("nei.recipe.reagent.none"));
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.handleTooltip(gui, currenttip, recipeIndex);
|
||||
return super.handleTooltip(gui, list, recipeIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+26
-13
@@ -2,6 +2,7 @@ package WayofTime.alchemicalWizardry.client.nei;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.client.nei.NEIConfig.getBloodOrbs;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -32,17 +33,21 @@ public class NEIBloodOrbShapedHandler extends ShapedRecipeHandler {
|
||||
public void setIngredients(int width, int height, Object[] items) {
|
||||
for (int x = 0; x < width; x++) {
|
||||
for (int y = 0; y < height; y++) {
|
||||
Object o = items[y * width + x];
|
||||
if (o == null) continue;
|
||||
if (items[y * width + x] == null) continue;
|
||||
|
||||
Object o = items[y * width + x];
|
||||
if (o instanceof ItemStack) {
|
||||
PositionedStack stack = new PositionedStack(o, 25 + x * 18, 6 + y * 18, false);
|
||||
PositionedStack stack = new PositionedStack(
|
||||
items[y * width + x],
|
||||
25 + x * 18,
|
||||
6 + y * 18,
|
||||
false);
|
||||
stack.setMaxSize(1);
|
||||
ingredients.add(stack);
|
||||
} else if (o instanceof Integer i) {
|
||||
} else if (o instanceof Integer) {
|
||||
ArrayList<ItemStack> orbs = new ArrayList<>();
|
||||
for (Item item : getBloodOrbs()) {
|
||||
if (((IBloodOrb) item).getOrbLevel() >= i) {
|
||||
if (((IBloodOrb) item).getOrbLevel() >= (Integer) o) {
|
||||
orbs.add(new ItemStack(item));
|
||||
}
|
||||
}
|
||||
@@ -59,12 +64,13 @@ public class NEIBloodOrbShapedHandler extends ShapedRecipeHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
if (outputId.equals("crafting") && getClass() == NEIBloodOrbShapedHandler.class) {
|
||||
for (IRecipe irecipe : CraftingManager.getInstance().getRecipeList()) {
|
||||
if (irecipe instanceof ShapedBloodOrbRecipe orbRecipe) {
|
||||
CachedBloodOrbRecipe recipe = forgeShapedRecipe(orbRecipe);
|
||||
for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) {
|
||||
if (irecipe instanceof ShapedBloodOrbRecipe) {
|
||||
CachedBloodOrbRecipe recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe);
|
||||
if (recipe == null) continue;
|
||||
|
||||
recipe.computeVisuals();
|
||||
@@ -76,11 +82,12 @@ public class NEIBloodOrbShapedHandler extends ShapedRecipeHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
for (IRecipe irecipe : CraftingManager.getInstance().getRecipeList()) {
|
||||
if (irecipe instanceof ShapedBloodOrbRecipe orbRecipe) {
|
||||
CachedBloodOrbRecipe recipe = forgeShapedRecipe(orbRecipe);
|
||||
for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) {
|
||||
if (irecipe instanceof ShapedBloodOrbRecipe) {
|
||||
CachedBloodOrbRecipe recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe);
|
||||
if (recipe == null || !NEIServerUtils.areStacksSameTypeCraftingWithNBT(recipe.result.item, result))
|
||||
continue;
|
||||
|
||||
@@ -90,11 +97,12 @@ public class NEIBloodOrbShapedHandler extends ShapedRecipeHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
for (IRecipe irecipe : CraftingManager.getInstance().getRecipeList()) {
|
||||
for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) {
|
||||
CachedShapedRecipe recipe = null;
|
||||
if (irecipe instanceof ShapedBloodOrbRecipe orbRecipe) recipe = forgeShapedRecipe(orbRecipe);
|
||||
if (irecipe instanceof ShapedBloodOrbRecipe) recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe);
|
||||
|
||||
if (recipe == null || !recipe.contains(recipe.ingredients, ingredient.getItem())) continue;
|
||||
|
||||
@@ -126,6 +134,11 @@ public class NEIBloodOrbShapedHandler extends ShapedRecipeHandler {
|
||||
return new CachedBloodOrbRecipe(width, height, items, recipe.getRecipeOutput());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18), "crafting"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return StatCollector.translateToLocal("bm.string.crafting.orb.shaped");
|
||||
|
||||
+28
-11
@@ -1,5 +1,6 @@
|
||||
package WayofTime.alchemicalWizardry.client.nei;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -38,10 +39,10 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler {
|
||||
6 + stackorder[ingred][1] * 18);
|
||||
stack.setMaxSize(1);
|
||||
ingredients.add(stack);
|
||||
} else if (o instanceof Integer i) {
|
||||
} else if (o instanceof Integer) {
|
||||
ArrayList<ItemStack> orbs = new ArrayList<>();
|
||||
for (Item item : NEIConfig.getBloodOrbs()) {
|
||||
if (((IBloodOrb) item).getOrbLevel() >= i) {
|
||||
if (((IBloodOrb) item).getOrbLevel() >= (Integer) o) {
|
||||
orbs.add(new ItemStack(item));
|
||||
}
|
||||
}
|
||||
@@ -64,13 +65,15 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
if (outputId.equals("crafting") && getClass() == NEIBloodOrbShapelessHandler.class) {
|
||||
List<IRecipe> allRecipes = CraftingManager.getInstance().getRecipeList();
|
||||
for (IRecipe irecipe : allRecipes) {
|
||||
List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList();
|
||||
for (IRecipe irecipe : allrecipes) {
|
||||
CachedBloodOrbRecipe recipe = null;
|
||||
if (irecipe instanceof ShapelessBloodOrbRecipe orbRecipe) recipe = forgeShapelessRecipe(orbRecipe);
|
||||
if (irecipe instanceof ShapelessBloodOrbRecipe)
|
||||
recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe);
|
||||
|
||||
if (recipe == null) continue;
|
||||
|
||||
@@ -81,13 +84,15 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
List<IRecipe> allRecipes = CraftingManager.getInstance().getRecipeList();
|
||||
for (IRecipe irecipe : allRecipes) {
|
||||
List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList();
|
||||
for (IRecipe irecipe : allrecipes) {
|
||||
if (NEIServerUtils.areStacksSameTypeCraftingWithNBT(irecipe.getRecipeOutput(), result)) {
|
||||
CachedBloodOrbRecipe recipe = null;
|
||||
if (irecipe instanceof ShapelessBloodOrbRecipe orbRecipe) recipe = forgeShapelessRecipe(orbRecipe);
|
||||
if (irecipe instanceof ShapelessBloodOrbRecipe)
|
||||
recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe);
|
||||
|
||||
if (recipe == null) continue;
|
||||
|
||||
@@ -96,12 +101,14 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
List<IRecipe> allRecipes = CraftingManager.getInstance().getRecipeList();
|
||||
for (IRecipe irecipe : allRecipes) {
|
||||
List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList();
|
||||
for (IRecipe irecipe : allrecipes) {
|
||||
CachedBloodOrbRecipe recipe = null;
|
||||
if (irecipe instanceof ShapelessBloodOrbRecipe orbRecipe) recipe = forgeShapelessRecipe(orbRecipe);
|
||||
if (irecipe instanceof ShapelessBloodOrbRecipe)
|
||||
recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe);
|
||||
|
||||
if (recipe == null) continue;
|
||||
|
||||
@@ -121,6 +128,16 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler {
|
||||
return new CachedBloodOrbRecipe(items, recipe.getRecipeOutput());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(84, 23, 24, 18), "crafting"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOverlayIdentifier() {
|
||||
return "crafting";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return StatCollector.translateToLocal("bm.string.crafting.orb.shapeless");
|
||||
|
||||
@@ -1,221 +0,0 @@
|
||||
package WayofTime.alchemicalWizardry.client.nei;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.client.ClientUtils.mc;
|
||||
import static WayofTime.alchemicalWizardry.client.nei.NEIConfig.ARROW_TEXTURE;
|
||||
import static codechicken.lib.gui.GuiDraw.fontRenderer;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
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 codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
|
||||
public class NEICalcinatorHandler extends TemplateRecipeHandler {
|
||||
|
||||
public class CachedReagentInfo extends CachedRecipe {
|
||||
|
||||
private final Reagent reagent;
|
||||
private final PositionedStack stack;
|
||||
private final PositionedStack orbs;
|
||||
private final int amount;
|
||||
|
||||
private final String amountText;
|
||||
private final int amountTextWidth;
|
||||
|
||||
private final String nameText;
|
||||
private final int nameTextWidth;
|
||||
|
||||
private static final int ARROW_WIDTH = 24;
|
||||
private static final int ARROW_HEIGHT = 16;
|
||||
private static final int FILL_TIME = 192;
|
||||
private static final int HOLD_TIME = 8;
|
||||
|
||||
public CachedReagentInfo(ReagentStack reagent) {
|
||||
this.reagent = reagent.reagent;
|
||||
this.stack = new PositionedStack(ReagentRegistry.getItemForReagent(reagent.reagent), 32, 6);
|
||||
this.amount = reagent.amount;
|
||||
|
||||
ItemStack[] orbStacks = NEIConfig.getBloodOrbs().stream().map(ItemStack::new).toArray(ItemStack[]::new);
|
||||
this.orbs = new PositionedStack(orbStacks, 32, 33);
|
||||
|
||||
String formattedAmount = String.format("%,d", amount);
|
||||
this.amountText = StatCollector
|
||||
.translateToLocalFormatted("text.recipe.alchemicCalcinator.reagent", formattedAmount);
|
||||
this.amountTextWidth = fontRenderer.getStringWidth(amountText);
|
||||
|
||||
this.nameText = this.reagent.name;
|
||||
this.nameTextWidth = fontRenderer.getStringWidth(nameText);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PositionedStack getResult() {
|
||||
return stack;
|
||||
}
|
||||
|
||||
public Reagent getReagent() {
|
||||
return reagent;
|
||||
}
|
||||
|
||||
public int getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void onDraw(int x, int y) {
|
||||
drawColoredProgressBar(x, y);
|
||||
|
||||
int textX = x + 84 - (amountTextWidth / 2);
|
||||
int textY = y + 19;
|
||||
fontRenderer.drawString(amountText, textX, textY, 0x000000);
|
||||
|
||||
textX = x + 84 - (nameTextWidth / 2);
|
||||
textY += 10;
|
||||
int color = reagent.getColourRed() << 16 | reagent.getColourGreen() << 8 | reagent.getColourBlue();
|
||||
fontRenderer.drawString(nameText, textX, textY, color);
|
||||
}
|
||||
|
||||
private void drawColoredProgressBar(int x, int y) {
|
||||
int arrowX = x + 25;
|
||||
int arrowY = y + 19;
|
||||
|
||||
int totalCycle = FILL_TIME + HOLD_TIME;
|
||||
|
||||
int cycleTick = cycleticks % totalCycle;
|
||||
|
||||
int fillWidth;
|
||||
if (cycleTick < FILL_TIME) {
|
||||
fillWidth = cycleTick * ARROW_WIDTH / FILL_TIME;
|
||||
} else {
|
||||
fillWidth = ARROW_WIDTH;
|
||||
}
|
||||
|
||||
TextureManager texManager = mc.getTextureManager();
|
||||
texManager.bindTexture(ARROW_TEXTURE);
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
GL11.glColor4ub(
|
||||
(byte) reagent.getColourRed(),
|
||||
(byte) reagent.getColourGreen(),
|
||||
(byte) reagent.getColourBlue(),
|
||||
(byte) 255);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(arrowX, arrowY + ARROW_HEIGHT, 0, 0, 1);
|
||||
tessellator
|
||||
.addVertexWithUV(arrowX + fillWidth, arrowY + ARROW_HEIGHT, 0, fillWidth / (float) ARROW_WIDTH, 1);
|
||||
tessellator.addVertexWithUV(arrowX + fillWidth, arrowY, 0, fillWidth / (float) ARROW_WIDTH, 0);
|
||||
tessellator.addVertexWithUV(arrowX, arrowY, 0, 0, 0);
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionedStack> getIngredients() {
|
||||
return getCycledIngredients(cycleticks / 20, Collections.singletonList(this.orbs));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
if (outputId.equals("alchemicalwizardry.calcinator") && getClass() == NEICalcinatorHandler.class) {
|
||||
for (ReagentStack reagent : ReagentRegistry.itemToReagentMap.values()) {
|
||||
arecipes.add(new CachedReagentInfo(reagent));
|
||||
}
|
||||
} else {
|
||||
super.loadCraftingRecipes(outputId, results);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
checkReagents(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
checkReagents(ingredient);
|
||||
}
|
||||
|
||||
private void checkReagents(ItemStack result) {
|
||||
ReagentStack rs = ReagentRegistry.getReagentStackForItem(result);
|
||||
if (rs != null) {
|
||||
arecipes.add(new CachedReagentInfo(rs));
|
||||
return;
|
||||
}
|
||||
// Check reagents in crystal belljars or other reagent storages
|
||||
NBTTagCompound tagCompound = result.getTagCompound();
|
||||
if (tagCompound == null || tagCompound.hasNoTags()) {
|
||||
return;
|
||||
}
|
||||
NBTTagList tagList = tagCompound.getTagList("reagentTanks", Constants.NBT.TAG_COMPOUND);
|
||||
if (tagList.tagList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < tagList.tagCount(); i++) {
|
||||
// Get the proper size of the ReagentStack created by melting the item for this reagent
|
||||
NBTTagCompound savedTag = tagList.getCompoundTagAt(i);
|
||||
ReagentStack reagent = ReagentContainer.readFromNBT(savedTag).getReagent();
|
||||
if (reagent == null) continue;
|
||||
ItemStack reagentItem = ReagentRegistry.getItemForReagent(reagent.reagent);
|
||||
ReagentStack reagentStackForItem = ReagentRegistry.getReagentStackForItem(reagentItem);
|
||||
if (reagentStackForItem != null) {
|
||||
arecipes.add(new CachedReagentInfo(reagentStackForItem));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int recipiesPerPage() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(int recipe) {
|
||||
NEICalcinatorHandler.CachedReagentInfo reagentInfo = (CachedReagentInfo) this.arecipes.get(recipe);
|
||||
reagentInfo.onDraw(30, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOverlayIdentifier() {
|
||||
return "alchemicalwizardry.calcinator";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(55, 18, 24, 17), "alchemicalwizardry.calcinator"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return new ResourceLocation("alchemicalwizardry", "gui/nei/calcinator.png").toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return "Alchemic Calcinator";
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,6 @@ import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import codechicken.nei.ItemList;
|
||||
@@ -16,13 +15,13 @@ public class NEIConfig implements IConfigureNEI {
|
||||
private static ArrayList<Item> bloodOrbs = null;
|
||||
private static ArrayList<Item> byCapacity = null;
|
||||
|
||||
public static final ResourceLocation ARROW_TEXTURE = new ResourceLocation(
|
||||
"alchemicalwizardry",
|
||||
"gui/nei/arrow.png");
|
||||
|
||||
public synchronized static ArrayList<Item> getBloodOrbs() {
|
||||
public static ArrayList<Item> getBloodOrbs() {
|
||||
if (bloodOrbs == null) {
|
||||
bloodOrbs = collectAllBloodOrbs();
|
||||
synchronized (NEIConfig.class) {
|
||||
if (bloodOrbs == null) {
|
||||
bloodOrbs = collectAllBloodOrbs();
|
||||
}
|
||||
}
|
||||
}
|
||||
return bloodOrbs;
|
||||
}
|
||||
@@ -35,7 +34,7 @@ public class NEIConfig implements IConfigureNEI {
|
||||
}
|
||||
}
|
||||
if (bloodOrbsTemp.isEmpty()) {
|
||||
// If there is no NEI cache - go to item registry
|
||||
// If there is NEI no cache - go to item registry
|
||||
for (Object anItemRegistry : Item.itemRegistry) {
|
||||
Item item = (Item) anItemRegistry;
|
||||
if (item instanceof IBloodOrb) {
|
||||
@@ -46,12 +45,12 @@ public class NEIConfig implements IConfigureNEI {
|
||||
return bloodOrbsTemp;
|
||||
}
|
||||
|
||||
public synchronized static ArrayList<Item> getOrbsByCapacity() {
|
||||
public static ArrayList<Item> getOrbsByCapacity() {
|
||||
if (byCapacity == null) {
|
||||
byCapacity = new ArrayList<>(getBloodOrbs());
|
||||
byCapacity.sort((a, b) -> {
|
||||
if (a instanceof IBloodOrb orbA && b instanceof IBloodOrb orbB) {
|
||||
return Integer.compare(orbA.getMaxEssence(), orbB.getMaxEssence());
|
||||
if (a instanceof IBloodOrb && b instanceof IBloodOrb) {
|
||||
return Integer.compare(((IBloodOrb) a).getMaxEssence(), ((IBloodOrb) b).getMaxEssence());
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
@@ -73,8 +72,6 @@ public class NEIConfig implements IConfigureNEI {
|
||||
API.registerUsageHandler(new NEIBindingRitualHandler());
|
||||
API.registerRecipeHandler(new NEIMeteorRecipeHandler());
|
||||
API.registerUsageHandler(new NEIMeteorRecipeHandler());
|
||||
API.registerRecipeHandler(new NEICalcinatorHandler());
|
||||
API.registerUsageHandler(new NEICalcinatorHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -45,7 +45,7 @@ import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
|
||||
public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
private static final RitualInfo ritualInfo = new RitualInfo(0.75f, "AW019FallingTower");
|
||||
private static final RitualInfo ritualInfo = new RitualInfo("AW019FallingTower", 0.75f);
|
||||
private static final ReagentInfo reagentInfo = new ReagentInfo(0.75f);
|
||||
|
||||
public class CachedMeteorRecipe extends CachedRecipe {
|
||||
@@ -134,8 +134,8 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
}
|
||||
}
|
||||
|
||||
this.costInfo = new CostInfo(1.0f, meteor.cost);
|
||||
this.radiusInfo = new RadiusInfo(1.0f, meteor.radius);
|
||||
this.costInfo = new CostInfo(meteor.cost);
|
||||
this.radiusInfo = new RadiusInfo(meteor.radius);
|
||||
}
|
||||
|
||||
private String getReagentStrings(MeteorComponent component) {
|
||||
@@ -244,11 +244,6 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int recipiesPerPage() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return new ResourceLocation("alchemicalwizardry", "gui/nei/meteor.png").toString();
|
||||
@@ -286,8 +281,9 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
CachedMeteorRecipe meteorRecipe = (CachedMeteorRecipe) this.arecipes.get(recipe);
|
||||
for (PositionedStack pStack : meteorRecipe.outputs) {
|
||||
// if (!gui.isMouseOver(pStack, recipe)) continue; // put it back when NEI is properly patched
|
||||
if (!(pStack instanceof TooltipStack tStack)) break;
|
||||
if (!(pStack instanceof TooltipStack)) break;
|
||||
|
||||
TooltipStack tStack = (TooltipStack) pStack;
|
||||
if (Arrays.stream(tStack.items).anyMatch(s -> NEIServerUtils.areStacksSameTypeCrafting(s, stack))) {
|
||||
currenttip.addAll(tStack.getTooltips());
|
||||
break;
|
||||
@@ -297,33 +293,44 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> handleTooltip(GuiRecipe<?> gui, List<String> currenttip, int recipeIndex) {
|
||||
if (GuiContainerManager.shouldShowTooltip(gui) && currenttip.isEmpty()) {
|
||||
public List<String> handleTooltip(GuiRecipe<?> gui, List<String> list, int recipeIndex) {
|
||||
if (GuiContainerManager.shouldShowTooltip(gui) && list.isEmpty()) {
|
||||
CachedRecipe cRecipe = arecipes.get(recipeIndex);
|
||||
Point mousePos = GuiDraw.getMousePosition();
|
||||
|
||||
if (cRecipe instanceof CachedMeteorRecipe cachedRecipe) {
|
||||
if (cachedRecipe.costInfo.getRect(gui).contains(mousePos)) {
|
||||
currenttip.add(StatCollector.translateToLocal("nei.recipe.meteor.cost"));
|
||||
if (cRecipe instanceof CachedMeteorRecipe) {
|
||||
CachedMeteorRecipe cachedRecipe = (CachedMeteorRecipe) cRecipe;
|
||||
Rectangle rect = cachedRecipe.costInfo.getRect(gui);
|
||||
if (rect.contains(mousePos)) {
|
||||
list.add(StatCollector.translateToLocal("nei.recipe.meteor.cost"));
|
||||
if (APISpellHelper.getPlayerLPTag(mc.thePlayer) < cachedRecipe.getCost()) {
|
||||
currenttip.add(
|
||||
list.add(
|
||||
EnumChatFormatting.RED
|
||||
+ StatCollector.translateToLocal("nei.recipe.meteor.tooExpensive"));
|
||||
}
|
||||
} else if (cachedRecipe.radiusInfo.getRect(gui).contains(mousePos)) {
|
||||
currenttip.add(
|
||||
}
|
||||
|
||||
rect = cachedRecipe.radiusInfo.getRect(gui);
|
||||
if (rect.contains(mousePos)) {
|
||||
list.add(
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"nei.recipe.meteor.diameter",
|
||||
2 * cachedRecipe.radiusInfo.getRadius() + 1));
|
||||
} else if (ritualInfo.getRect(gui).contains(mousePos)) {
|
||||
ritualInfo.onHover(currenttip);
|
||||
} else if (reagentInfo.getRect(gui).contains(mousePos)) {
|
||||
reagentInfo.onHover(currenttip);
|
||||
addMeteorReagentInfo(currenttip, cachedRecipe);
|
||||
}
|
||||
|
||||
rect = ritualInfo.getRect(gui);
|
||||
if (rect.contains(mousePos)) {
|
||||
ritualInfo.onHover(list);
|
||||
}
|
||||
|
||||
rect = reagentInfo.getRect(gui);
|
||||
if (rect.contains(mousePos)) {
|
||||
reagentInfo.onHover(list);
|
||||
addMeteorReagentInfo(list, cachedRecipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.handleTooltip(gui, currenttip, recipeIndex);
|
||||
return super.handleTooltip(gui, list, recipeIndex);
|
||||
}
|
||||
|
||||
private void addMeteorReagentInfo(List<String> list, CachedMeteorRecipe cachedRecipe) {
|
||||
@@ -396,14 +403,8 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
private String reagentFillerBlockNames(MeteorReagent mr) {
|
||||
ArrayList<String> blockNames = new ArrayList<>();
|
||||
for (MeteorComponent mc : mr.filler) {
|
||||
blockNames.add(mc.getBlock().getDisplayName() + requiredReagentsForFiller(mc));
|
||||
blockNames.add(mc.getBlock().getDisplayName());
|
||||
}
|
||||
return Joiner.on(", ").join(blockNames);
|
||||
}
|
||||
|
||||
private String requiredReagentsForFiller(MeteorComponent mc) {
|
||||
List<Reagent> reagents = mc.getRequiredReagents();
|
||||
if (reagents.isEmpty()) return "";
|
||||
return " (" + reagents.stream().map(r -> r.name).collect(Collectors.joining(", ")) + ")";
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
package WayofTime.alchemicalWizardry.client.nei.widgets;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.client.ClientUtils.mc;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
|
||||
import codechicken.nei.recipe.GuiRecipe;
|
||||
|
||||
public abstract class BMNEIWidget {
|
||||
|
||||
protected final float scale;
|
||||
public int prevX, prevY;
|
||||
|
||||
protected BMNEIWidget(float scale) {
|
||||
this.scale = scale;
|
||||
}
|
||||
|
||||
public Rectangle getRect(GuiRecipe<?> gui) {
|
||||
return new Rectangle(gui.guiLeft + prevX + 4, gui.guiTop + prevY + 14, (int) (18 * scale), (int) (18 * scale));
|
||||
}
|
||||
|
||||
protected static void drawCenteredText(int x, int y, String text) {
|
||||
FontRenderer fontRenderer = mc.fontRenderer;
|
||||
|
||||
int textWidth = fontRenderer.getStringWidth(text);
|
||||
int textX = x + 9 - (textWidth / 2);
|
||||
int textY = y + 18;
|
||||
|
||||
fontRenderer.drawString(text, textX, textY, 0x000000);
|
||||
}
|
||||
}
|
||||
@@ -2,30 +2,32 @@ package WayofTime.alchemicalWizardry.client.nei.widgets;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.client.ClientUtils.mc;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.api.spell.APISpellHelper;
|
||||
import WayofTime.alchemicalWizardry.client.nei.NEIConfig;
|
||||
import codechicken.nei.recipe.GuiRecipe;
|
||||
|
||||
public class CostInfo extends BMNEIWidget {
|
||||
public class CostInfo {
|
||||
|
||||
private final int cost;
|
||||
private int prevX, prevY;
|
||||
private final ItemStack orbStack;
|
||||
private static final RenderItem renderItem = new RenderItem();
|
||||
static {
|
||||
renderItem.renderWithColor = false;
|
||||
}
|
||||
|
||||
public CostInfo(float scale, int cost) {
|
||||
super(scale);
|
||||
public CostInfo(int cost) {
|
||||
this.cost = cost;
|
||||
|
||||
Item orb = null;
|
||||
@@ -67,10 +69,18 @@ public class CostInfo extends BMNEIWidget {
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
drawCenteredText(
|
||||
x,
|
||||
y,
|
||||
StatCollector.translateToLocalFormatted("nei.recipe.meteor.cost.gui", String.format("%,d", cost)));
|
||||
String costText = String.format("%,d", cost);
|
||||
FontRenderer fontRenderer = mc.fontRenderer;
|
||||
|
||||
int textWidth = fontRenderer.getStringWidth(costText);
|
||||
int textX = x + 9 - (textWidth / 2);
|
||||
int textY = y + 18;
|
||||
|
||||
fontRenderer.drawString(costText, textX, textY, 0x000000);
|
||||
}
|
||||
|
||||
public Rectangle getRect(GuiRecipe<?> gui) {
|
||||
return new Rectangle(gui.guiLeft + prevX + 4, gui.guiTop + prevY + 14, 18, 18);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,21 +2,25 @@ package WayofTime.alchemicalWizardry.client.nei.widgets;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.client.ClientUtils.mc;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import codechicken.nei.recipe.GuiRecipe;
|
||||
|
||||
public class RadiusInfo extends BMNEIWidget {
|
||||
public class RadiusInfo {
|
||||
|
||||
private final int radius;
|
||||
private int prevX, prevY;
|
||||
private static final RenderItem renderItem = new RenderItem();
|
||||
// It's a circle with a dot in the center. Couldn't ask for a better item!
|
||||
private static final ItemStack item = new ItemStack(ModItems.demonPlacer);
|
||||
|
||||
public RadiusInfo(float scale, int radius) {
|
||||
super(scale);
|
||||
public RadiusInfo(int radius) {
|
||||
this.radius = radius;
|
||||
}
|
||||
|
||||
@@ -30,7 +34,18 @@ public class RadiusInfo extends BMNEIWidget {
|
||||
|
||||
renderItem.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), item, x, y);
|
||||
|
||||
drawCenteredText(x, y, StatCollector.translateToLocalFormatted("nei.recipe.meteor.radius", radius));
|
||||
String costText = StatCollector.translateToLocalFormatted("nei.recipe.meteor.radius", radius);
|
||||
FontRenderer fontRenderer = mc.fontRenderer;
|
||||
|
||||
int textWidth = fontRenderer.getStringWidth(costText);
|
||||
int textX = x + 9 - (textWidth / 2);
|
||||
int textY = y + 18;
|
||||
|
||||
fontRenderer.drawString(costText, textX, textY, 0x000000);
|
||||
}
|
||||
|
||||
public Rectangle getRect(GuiRecipe<?> gui) {
|
||||
return new Rectangle(gui.guiLeft + prevX + 5, gui.guiTop + prevY + 15, 16, 16);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package WayofTime.alchemicalWizardry.client.nei.widgets;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.client.ClientUtils.mc;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
@@ -11,14 +12,17 @@ import net.minecraft.util.StatCollector;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import codechicken.nei.recipe.GuiRecipe;
|
||||
|
||||
public class ReagentInfo extends BMNEIWidget {
|
||||
public class ReagentInfo {
|
||||
|
||||
private final float scale;
|
||||
private int prevX, prevY;
|
||||
private static final RenderItem renderItem = new RenderItem();
|
||||
private static final ItemStack item = new ItemStack(ModBlocks.blockReagentConduit);
|
||||
|
||||
public ReagentInfo(float scale) {
|
||||
super(scale);
|
||||
this.scale = scale;
|
||||
}
|
||||
|
||||
public void onDraw(int x, int y) {
|
||||
@@ -32,6 +36,10 @@ public class ReagentInfo extends BMNEIWidget {
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public Rectangle getRect(GuiRecipe<?> gui) {
|
||||
return new Rectangle(gui.guiLeft + prevX + 4, gui.guiTop + prevY + 14, (int) (18 * scale), (int) (18 * scale));
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the text Reagent effects: to the tooltip list.
|
||||
*/
|
||||
|
||||
@@ -2,6 +2,7 @@ package WayofTime.alchemicalWizardry.client.nei.widgets;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.client.ClientUtils.mc;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
@@ -12,17 +13,20 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
|
||||
import codechicken.nei.recipe.GuiRecipe;
|
||||
|
||||
public class RitualInfo extends BMNEIWidget {
|
||||
public class RitualInfo {
|
||||
|
||||
private final String id;
|
||||
private final int cost;
|
||||
private final float scale;
|
||||
private final ItemStack crystal;
|
||||
private int prevX, prevY;
|
||||
private static final RenderItem renderItem = new RenderItem();
|
||||
|
||||
public RitualInfo(float scale, String id) {
|
||||
super(scale);
|
||||
public RitualInfo(String id, float scale) {
|
||||
this.id = id;
|
||||
this.scale = scale;
|
||||
this.cost = Rituals.getCostForActivation(id);
|
||||
Rituals r = Rituals.ritualMap.get(id);
|
||||
|
||||
@@ -49,6 +53,10 @@ public class RitualInfo extends BMNEIWidget {
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public Rectangle getRect(GuiRecipe<?> gui) {
|
||||
return new Rectangle(gui.guiLeft + prevX + 4, gui.guiTop + prevY + 14, (int) (18 * scale), (int) (18 * scale));
|
||||
}
|
||||
|
||||
public void onHover(List<String> list) {
|
||||
list.add(
|
||||
StatCollector
|
||||
|
||||
@@ -482,7 +482,8 @@ public class AlchemicalWizardryEventHooks {
|
||||
NewPacketHandler.INSTANCE.sendTo(
|
||||
NewPacketHandler.getLPPacket(
|
||||
SoulNetworkHandler.getCurrentEssence(ownerName),
|
||||
SoulNetworkHandler.getMaxEssence(ownerName)),
|
||||
SoulNetworkHandler
|
||||
.getMaximumForOrbTier(SoulNetworkHandler.getCurrentMaxOrb(ownerName))),
|
||||
(EntityPlayerMP) entityLiving);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@ import java.util.BitSet;
|
||||
import java.util.EnumMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -47,7 +45,7 @@ public enum NewPacketHandler {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
private final EnumMap<Side, FMLEmbeddedChannel> channels;
|
||||
private EnumMap<Side, FMLEmbeddedChannel> channels;
|
||||
|
||||
NewPacketHandler() {
|
||||
this.channels = NetworkRegistry.INSTANCE.newChannel("BloodMagic", new TEAltarCodec());
|
||||
@@ -97,10 +95,12 @@ public enum NewPacketHandler {
|
||||
private static class TEAltarMessageHandler extends SimpleChannelInboundHandler<TEAltarMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEAltarMessage msg) {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEAltarMessage msg) throws Exception {
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
|
||||
if (te instanceof TEAltar altar) {
|
||||
if (te instanceof TEAltar) {
|
||||
TEAltar altar = (TEAltar) te;
|
||||
|
||||
altar.handlePacketData(msg.items, msg.fluids, msg.capacity);
|
||||
}
|
||||
}
|
||||
@@ -109,12 +109,12 @@ public enum NewPacketHandler {
|
||||
private static class TEOrientableMessageHandler extends SimpleChannelInboundHandler<TEOrientableMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEOrientableMessage msg) {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEOrientableMessage msg) throws Exception {
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
|
||||
if (te instanceof TEOrientable teOrientable) {
|
||||
teOrientable.setInputDirection(ForgeDirection.getOrientation(msg.input));
|
||||
teOrientable.setOutputDirection(ForgeDirection.getOrientation(msg.output));
|
||||
if (te instanceof TEOrientable) {
|
||||
((TEOrientable) te).setInputDirection(ForgeDirection.getOrientation(msg.input));
|
||||
((TEOrientable) te).setOutputDirection(ForgeDirection.getOrientation(msg.output));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -122,10 +122,12 @@ public enum NewPacketHandler {
|
||||
private static class TEPedestalMessageHandler extends SimpleChannelInboundHandler<TEPedestalMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEPedestalMessage msg) {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEPedestalMessage msg) throws Exception {
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
|
||||
if (te instanceof TEPedestal pedestal) {
|
||||
if (te instanceof TEPedestal) {
|
||||
TEPedestal pedestal = (TEPedestal) te;
|
||||
|
||||
pedestal.handlePacketData(msg.items);
|
||||
}
|
||||
}
|
||||
@@ -134,10 +136,12 @@ public enum NewPacketHandler {
|
||||
private static class TEPlinthMessageHandler extends SimpleChannelInboundHandler<TEPlinthMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEPlinthMessage msg) {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEPlinthMessage msg) throws Exception {
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
|
||||
if (te instanceof TEPlinth Plinth) {
|
||||
if (te instanceof TEPlinth) {
|
||||
TEPlinth Plinth = (TEPlinth) te;
|
||||
|
||||
Plinth.handlePacketData(msg.items);
|
||||
}
|
||||
}
|
||||
@@ -146,10 +150,12 @@ public enum NewPacketHandler {
|
||||
private static class TESocketMessageHandler extends SimpleChannelInboundHandler<TESocketMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TESocketMessage msg) {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TESocketMessage msg) throws Exception {
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
|
||||
if (te instanceof TESocket Socket) {
|
||||
if (te instanceof TESocket) {
|
||||
TESocket Socket = (TESocket) te;
|
||||
|
||||
Socket.handlePacketData(msg.items);
|
||||
}
|
||||
}
|
||||
@@ -158,10 +164,12 @@ public enum NewPacketHandler {
|
||||
private static class TETeleposerMessageHandler extends SimpleChannelInboundHandler<TETeleposerMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TETeleposerMessage msg) {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TETeleposerMessage msg) throws Exception {
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
|
||||
if (te instanceof TETeleposer Teleposer) {
|
||||
if (te instanceof TETeleposer) {
|
||||
TETeleposer Teleposer = (TETeleposer) te;
|
||||
|
||||
Teleposer.handlePacketData(msg.items);
|
||||
}
|
||||
}
|
||||
@@ -170,10 +178,12 @@ public enum NewPacketHandler {
|
||||
private static class TEWritingTableMessageHandler extends SimpleChannelInboundHandler<TEWritingTableMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEWritingTableMessage msg) {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEWritingTableMessage msg) throws Exception {
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
|
||||
if (te instanceof TEWritingTable WritingTable) {
|
||||
if (te instanceof TEWritingTable) {
|
||||
TEWritingTable WritingTable = (TEWritingTable) te;
|
||||
|
||||
WritingTable.handlePacketData(msg.items);
|
||||
}
|
||||
}
|
||||
@@ -182,7 +192,7 @@ public enum NewPacketHandler {
|
||||
private static class ParticleMessageHandler extends SimpleChannelInboundHandler<ParticleMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, ParticleMessage msg) {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, ParticleMessage msg) throws Exception {
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
|
||||
world.spawnParticle(msg.particle, msg.xCoord, msg.yCoord, msg.zCoord, msg.xVel, msg.yVel, msg.zVel);
|
||||
@@ -192,7 +202,7 @@ public enum NewPacketHandler {
|
||||
private static class VelocityMessageHandler extends SimpleChannelInboundHandler<VelocityMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, VelocityMessage msg) {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, VelocityMessage msg) throws Exception {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
if (player != null) {
|
||||
@@ -206,10 +216,12 @@ public enum NewPacketHandler {
|
||||
private static class TEMasterStoneMessageHandler extends SimpleChannelInboundHandler<TEMasterStoneMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEMasterStoneMessage msg) {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEMasterStoneMessage msg) throws Exception {
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
|
||||
if (te instanceof TEMasterStone masterStone) {
|
||||
if (te instanceof TEMasterStone) {
|
||||
TEMasterStone masterStone = (TEMasterStone) te;
|
||||
|
||||
masterStone.setCurrentRitual(msg.ritual);
|
||||
masterStone.isRunning = msg.isRunning;
|
||||
}
|
||||
@@ -219,10 +231,12 @@ public enum NewPacketHandler {
|
||||
private static class TEReagentConduitMessageHandler extends SimpleChannelInboundHandler<TEReagentConduitMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEReagentConduitMessage msg) {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TEReagentConduitMessage msg) throws Exception {
|
||||
World world = AlchemicalWizardry.proxy.getClientWorld();
|
||||
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
|
||||
if (te instanceof TEReagentConduit reagentConduit) {
|
||||
if (te instanceof TEReagentConduit) {
|
||||
TEReagentConduit reagentConduit = (TEReagentConduit) te;
|
||||
|
||||
reagentConduit.destinationList = msg.destinationList;
|
||||
}
|
||||
}
|
||||
@@ -231,7 +245,7 @@ public enum NewPacketHandler {
|
||||
private static class CurrentLPMessageHandler extends SimpleChannelInboundHandler<CurrentLPMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, CurrentLPMessage msg) {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, CurrentLPMessage msg) throws Exception {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
APISpellHelper.setPlayerLPTag(player, msg.currentLP);
|
||||
@@ -242,7 +256,7 @@ public enum NewPacketHandler {
|
||||
private static class CurrentReagentBarMessageHandler extends SimpleChannelInboundHandler<CurrentReagentBarMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, CurrentReagentBarMessage msg) {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, CurrentReagentBarMessage msg) throws Exception {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
APISpellHelper.setPlayerReagentType(player, msg.reagent);
|
||||
@@ -254,7 +268,7 @@ public enum NewPacketHandler {
|
||||
private static class CurrentAddedHPMessageHandler extends SimpleChannelInboundHandler<CurrentAddedHPMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, CurrentAddedHPMessage msg) {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, CurrentAddedHPMessage msg) throws Exception {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
APISpellHelper.setCurrentAdditionalHP(player, msg.currentHP);
|
||||
@@ -269,7 +283,7 @@ public enum NewPacketHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, KeyboardMessage msg) {
|
||||
protected void channelRead0(ChannelHandlerContext ctx, KeyboardMessage msg) throws Exception {
|
||||
System.out.println("Hmmm");
|
||||
}
|
||||
}
|
||||
@@ -277,7 +291,7 @@ public enum NewPacketHandler {
|
||||
private static class GaiaBiomeChangeMessageHandler extends SimpleChannelInboundHandler<GaiaBiomeChangeMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, GaiaBiomeChangeMessage msg) {
|
||||
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();
|
||||
@@ -435,7 +449,30 @@ public enum NewPacketHandler {
|
||||
public static final int maskByteCount = 32;
|
||||
}
|
||||
|
||||
private static class TEAltarCodec extends FMLIndexedMessageToMessageCodec<BMMessage> {
|
||||
private class ClientToServerCodec extends FMLIndexedMessageToMessageCodec<BMMessage> {
|
||||
|
||||
public ClientToServerCodec() {}
|
||||
|
||||
@Override
|
||||
public void encodeInto(ChannelHandlerContext ctx, BMMessage msg, ByteBuf target) throws Exception {
|
||||
target.writeInt(msg.index);
|
||||
|
||||
// switch(msg.index)
|
||||
{}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decodeInto(ChannelHandlerContext ctx, ByteBuf source, BMMessage msg) {
|
||||
int index = source.readInt();
|
||||
|
||||
System.out.println("Packet is recieved and being decoded");
|
||||
|
||||
// switch(index)
|
||||
{}
|
||||
}
|
||||
}
|
||||
|
||||
private class TEAltarCodec extends FMLIndexedMessageToMessageCodec<BMMessage> {
|
||||
|
||||
public TEAltarCodec() {
|
||||
addDiscriminator(0, TEAltarMessage.class);
|
||||
@@ -457,141 +494,175 @@ public enum NewPacketHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void encodeInto(ChannelHandlerContext ctx, BMMessage msg, ByteBuf target) {
|
||||
public void encodeInto(ChannelHandlerContext ctx, BMMessage msg, ByteBuf target) throws Exception {
|
||||
target.writeInt(msg.index);
|
||||
|
||||
switch (msg.index) {
|
||||
case 0 -> {
|
||||
TEAltarMessage m = (TEAltarMessage) msg;
|
||||
target.writeInt(m.x);
|
||||
target.writeInt(m.y);
|
||||
target.writeInt(m.z);
|
||||
case 0:
|
||||
target.writeInt(((TEAltarMessage) msg).x);
|
||||
target.writeInt(((TEAltarMessage) msg).y);
|
||||
target.writeInt(((TEAltarMessage) msg).z);
|
||||
|
||||
target.writeBoolean(m.items != null);
|
||||
if (m.items != null) {
|
||||
int[] items = m.items;
|
||||
Arrays.stream(items).forEach(target::writeInt);
|
||||
target.writeBoolean(((TEAltarMessage) msg).items != null);
|
||||
if (((TEAltarMessage) msg).items != null) {
|
||||
int[] items = ((TEAltarMessage) msg).items;
|
||||
for (int j = 0; j < items.length; j++) {
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
}
|
||||
|
||||
target.writeBoolean(m.fluids != null);
|
||||
if (m.fluids != null) {
|
||||
int[] fluids = m.fluids;
|
||||
Arrays.stream(fluids).forEach(target::writeInt);
|
||||
target.writeBoolean(((TEAltarMessage) msg).fluids != null);
|
||||
if (((TEAltarMessage) msg).fluids != null) {
|
||||
int[] fluids = ((TEAltarMessage) msg).fluids;
|
||||
for (int j = 0; j < fluids.length; j++) {
|
||||
int i = fluids[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
}
|
||||
|
||||
target.writeInt(m.capacity);
|
||||
}
|
||||
case 1 -> {
|
||||
TEOrientableMessage m = (TEOrientableMessage) msg;
|
||||
target.writeInt(m.x);
|
||||
target.writeInt(m.y);
|
||||
target.writeInt(m.z);
|
||||
target.writeInt(((TEAltarMessage) msg).capacity);
|
||||
|
||||
target.writeInt(m.input);
|
||||
target.writeInt(m.output);
|
||||
}
|
||||
case 2 -> {
|
||||
TEPedestalMessage m = (TEPedestalMessage) msg;
|
||||
target.writeInt(m.x);
|
||||
target.writeInt(m.y);
|
||||
target.writeInt(m.z);
|
||||
break;
|
||||
|
||||
target.writeBoolean(m.items != null);
|
||||
if (m.items != null) {
|
||||
int[] items = m.items;
|
||||
Arrays.stream(items).forEach(target::writeInt);
|
||||
case 1:
|
||||
target.writeInt(((TEOrientableMessage) msg).x);
|
||||
target.writeInt(((TEOrientableMessage) msg).y);
|
||||
target.writeInt(((TEOrientableMessage) msg).z);
|
||||
|
||||
target.writeInt(((TEOrientableMessage) msg).input);
|
||||
target.writeInt(((TEOrientableMessage) msg).output);
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
target.writeInt(((TEPedestalMessage) msg).x);
|
||||
target.writeInt(((TEPedestalMessage) msg).y);
|
||||
target.writeInt(((TEPedestalMessage) msg).z);
|
||||
|
||||
target.writeBoolean(((TEPedestalMessage) msg).items != null);
|
||||
if (((TEPedestalMessage) msg).items != null) {
|
||||
int[] items = ((TEPedestalMessage) msg).items;
|
||||
for (int j = 0; j < items.length; j++) {
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
case 3 -> {
|
||||
TEPlinthMessage m = (TEPlinthMessage) msg;
|
||||
target.writeInt(m.x);
|
||||
target.writeInt(m.y);
|
||||
target.writeInt(m.z);
|
||||
|
||||
target.writeBoolean(m.items != null);
|
||||
if (m.items != null) {
|
||||
int[] items = m.items;
|
||||
Arrays.stream(items).forEach(target::writeInt);
|
||||
}
|
||||
}
|
||||
case 4 -> {
|
||||
TESocketMessage m = (TESocketMessage) msg;
|
||||
target.writeInt(m.x);
|
||||
target.writeInt(m.y);
|
||||
target.writeInt(m.z);
|
||||
break;
|
||||
|
||||
target.writeBoolean(m.items != null);
|
||||
if (m.items != null) {
|
||||
int[] items = m.items;
|
||||
Arrays.stream(items).forEach(target::writeInt);
|
||||
}
|
||||
}
|
||||
case 5 -> {
|
||||
TETeleposerMessage m = (TETeleposerMessage) msg;
|
||||
target.writeInt(m.x);
|
||||
target.writeInt(m.y);
|
||||
target.writeInt(m.z);
|
||||
case 3:
|
||||
target.writeInt(((TEPlinthMessage) msg).x);
|
||||
target.writeInt(((TEPlinthMessage) msg).y);
|
||||
target.writeInt(((TEPlinthMessage) msg).z);
|
||||
|
||||
target.writeBoolean(m.items != null);
|
||||
if (m.items != null) {
|
||||
int[] items = m.items;
|
||||
Arrays.stream(items).forEach(target::writeInt);
|
||||
target.writeBoolean(((TEPlinthMessage) msg).items != null);
|
||||
if (((TEPlinthMessage) msg).items != null) {
|
||||
int[] items = ((TEPlinthMessage) msg).items;
|
||||
for (int j = 0; j < items.length; j++) {
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
case 6 -> {
|
||||
TEWritingTableMessage m = (TEWritingTableMessage) msg;
|
||||
target.writeInt(m.x);
|
||||
target.writeInt(m.y);
|
||||
target.writeInt(m.z);
|
||||
|
||||
target.writeBoolean(m.items != null);
|
||||
if (m.items != null) {
|
||||
int[] items = m.items;
|
||||
Arrays.stream(items).forEach(target::writeInt);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
target.writeInt(((TESocketMessage) msg).x);
|
||||
target.writeInt(((TESocketMessage) msg).y);
|
||||
target.writeInt(((TESocketMessage) msg).z);
|
||||
|
||||
target.writeBoolean(((TESocketMessage) msg).items != null);
|
||||
if (((TESocketMessage) msg).items != null) {
|
||||
int[] items = ((TESocketMessage) msg).items;
|
||||
for (int j = 0; j < items.length; j++) {
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
case 7 -> {
|
||||
ParticleMessage m = (ParticleMessage) msg;
|
||||
String str = m.particle;
|
||||
|
||||
break;
|
||||
|
||||
case 5:
|
||||
target.writeInt(((TETeleposerMessage) msg).x);
|
||||
target.writeInt(((TETeleposerMessage) msg).y);
|
||||
target.writeInt(((TETeleposerMessage) msg).z);
|
||||
|
||||
target.writeBoolean(((TETeleposerMessage) msg).items != null);
|
||||
if (((TETeleposerMessage) msg).items != null) {
|
||||
int[] items = ((TETeleposerMessage) msg).items;
|
||||
for (int j = 0; j < items.length; j++) {
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 6:
|
||||
target.writeInt(((TEWritingTableMessage) msg).x);
|
||||
target.writeInt(((TEWritingTableMessage) msg).y);
|
||||
target.writeInt(((TEWritingTableMessage) msg).z);
|
||||
|
||||
target.writeBoolean(((TEWritingTableMessage) msg).items != null);
|
||||
if (((TEWritingTableMessage) msg).items != null) {
|
||||
int[] items = ((TEWritingTableMessage) msg).items;
|
||||
for (int j = 0; j < items.length; j++) {
|
||||
int i = items[j];
|
||||
target.writeInt(i);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
String str = ((ParticleMessage) msg).particle;
|
||||
target.writeInt(str.length());
|
||||
IntStream.range(0, str.length()).map(str::charAt).forEach(target::writeChar);
|
||||
for (int i = 0; i < str.length(); i++) {
|
||||
target.writeChar(str.charAt(i));
|
||||
}
|
||||
|
||||
target.writeDouble(m.xCoord);
|
||||
target.writeDouble(m.yCoord);
|
||||
target.writeDouble(m.zCoord);
|
||||
target.writeDouble(((ParticleMessage) msg).xCoord);
|
||||
target.writeDouble(((ParticleMessage) msg).yCoord);
|
||||
target.writeDouble(((ParticleMessage) msg).zCoord);
|
||||
|
||||
target.writeDouble(m.xVel);
|
||||
target.writeDouble(m.yVel);
|
||||
target.writeDouble(m.zVel);
|
||||
}
|
||||
case 8 -> {
|
||||
VelocityMessage m = (VelocityMessage) msg;
|
||||
target.writeDouble(m.xVel);
|
||||
target.writeDouble(m.yVel);
|
||||
target.writeDouble(m.zVel);
|
||||
}
|
||||
case 9 -> {
|
||||
TEMasterStoneMessage m = (TEMasterStoneMessage) msg;
|
||||
target.writeInt(m.x);
|
||||
target.writeInt(m.y);
|
||||
target.writeInt(m.z);
|
||||
target.writeDouble(((ParticleMessage) msg).xVel);
|
||||
target.writeDouble(((ParticleMessage) msg).yVel);
|
||||
target.writeDouble(((ParticleMessage) msg).zVel);
|
||||
|
||||
String ritual = m.ritual;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
target.writeDouble(((VelocityMessage) msg).xVel);
|
||||
target.writeDouble(((VelocityMessage) msg).yVel);
|
||||
target.writeDouble(((VelocityMessage) msg).zVel);
|
||||
|
||||
break;
|
||||
|
||||
case 9:
|
||||
target.writeInt(((TEMasterStoneMessage) msg).x);
|
||||
target.writeInt(((TEMasterStoneMessage) msg).y);
|
||||
target.writeInt(((TEMasterStoneMessage) msg).z);
|
||||
|
||||
String ritual = ((TEMasterStoneMessage) msg).ritual;
|
||||
target.writeInt(ritual.length());
|
||||
IntStream.range(0, ritual.length()).map(ritual::charAt).forEach(target::writeChar);
|
||||
for (int i = 0; i < ritual.length(); i++) {
|
||||
target.writeChar(ritual.charAt(i));
|
||||
}
|
||||
|
||||
target.writeBoolean(m.isRunning);
|
||||
}
|
||||
case 10 -> {
|
||||
TEReagentConduitMessage m = (TEReagentConduitMessage) msg;
|
||||
target.writeInt(m.x);
|
||||
target.writeInt(m.y);
|
||||
target.writeInt(m.z);
|
||||
target.writeBoolean(((TEMasterStoneMessage) msg).isRunning);
|
||||
|
||||
List<ColourAndCoords> list = m.destinationList;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
target.writeInt(((TEReagentConduitMessage) msg).x);
|
||||
target.writeInt(((TEReagentConduitMessage) msg).y);
|
||||
target.writeInt(((TEReagentConduitMessage) msg).z);
|
||||
|
||||
List<ColourAndCoords> list = ((TEReagentConduitMessage) msg).destinationList;
|
||||
target.writeInt(list.size());
|
||||
|
||||
list.forEach(colourSet -> {
|
||||
for (ColourAndCoords colourSet : list) {
|
||||
target.writeInt(colourSet.colourRed);
|
||||
target.writeInt(colourSet.colourGreen);
|
||||
target.writeInt(colourSet.colourBlue);
|
||||
@@ -599,37 +670,49 @@ public enum NewPacketHandler {
|
||||
target.writeInt(colourSet.xCoord);
|
||||
target.writeInt(colourSet.yCoord);
|
||||
target.writeInt(colourSet.zCoord);
|
||||
});
|
||||
}
|
||||
case 11 -> {
|
||||
CurrentLPMessage m = (CurrentLPMessage) msg;
|
||||
target.writeInt(m.currentLP);
|
||||
target.writeInt(m.maxLP);
|
||||
}
|
||||
case 12 -> {
|
||||
CurrentReagentBarMessage m = (CurrentReagentBarMessage) msg;
|
||||
char[] charSet = m.reagent.toCharArray();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 11:
|
||||
target.writeInt(((CurrentLPMessage) msg).currentLP);
|
||||
target.writeInt(((CurrentLPMessage) msg).maxLP);
|
||||
|
||||
break;
|
||||
|
||||
case 12:
|
||||
char[] charSet = ((CurrentReagentBarMessage) msg).reagent.toCharArray();
|
||||
target.writeInt(charSet.length);
|
||||
for (char cha : charSet) {
|
||||
target.writeChar(cha);
|
||||
}
|
||||
target.writeFloat(m.currentAR);
|
||||
target.writeFloat(m.maxAR);
|
||||
}
|
||||
case 13 -> {
|
||||
CurrentAddedHPMessage m = (CurrentAddedHPMessage) msg;
|
||||
target.writeFloat(m.currentHP);
|
||||
target.writeFloat(m.maxHP);
|
||||
}
|
||||
case 14 -> target.writeByte(((KeyboardMessage) msg).keyPressed);
|
||||
case 15 -> {
|
||||
GaiaBiomeChangeMessage m = (GaiaBiomeChangeMessage) msg;
|
||||
target.writeInt(m.chunkX);
|
||||
target.writeInt(m.chunkZ);
|
||||
target.writeByte(m.biome);
|
||||
byte[] arr = Arrays.copyOf(m.mask.toByteArray(), GaiaBiomeChangeMessage.maskByteCount);
|
||||
target.writeFloat(((CurrentReagentBarMessage) msg).currentAR);
|
||||
target.writeFloat(((CurrentReagentBarMessage) msg).maxAR);
|
||||
|
||||
break;
|
||||
|
||||
case 13:
|
||||
target.writeFloat(((CurrentAddedHPMessage) msg).currentHP);
|
||||
target.writeFloat(((CurrentAddedHPMessage) msg).maxHP);
|
||||
|
||||
break;
|
||||
|
||||
case 14:
|
||||
System.out.println("Packet is being encoded");
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -638,183 +721,233 @@ public enum NewPacketHandler {
|
||||
int index = dat.readInt();
|
||||
|
||||
switch (index) {
|
||||
case 0 -> {
|
||||
TEAltarMessage m = (TEAltarMessage) msg;
|
||||
m.x = dat.readInt();
|
||||
m.y = dat.readInt();
|
||||
m.z = dat.readInt();
|
||||
case 0:
|
||||
((TEAltarMessage) msg).x = dat.readInt();
|
||||
((TEAltarMessage) msg).y = dat.readInt();
|
||||
((TEAltarMessage) msg).z = dat.readInt();
|
||||
boolean hasStacks = dat.readBoolean();
|
||||
|
||||
m.items = new int[TEAltar.sizeInv * 3];
|
||||
((TEAltarMessage) msg).items = new int[TEAltar.sizeInv * 3];
|
||||
if (hasStacks) {
|
||||
m.items = new int[TEAltar.sizeInv * 3];
|
||||
IntStream.range(0, m.items.length).forEach(i -> m.items[i] = dat.readInt());
|
||||
((TEAltarMessage) msg).items = new int[TEAltar.sizeInv * 3];
|
||||
for (int i = 0; i < ((TEAltarMessage) msg).items.length; i++) {
|
||||
((TEAltarMessage) msg).items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
|
||||
boolean hasFluids = dat.readBoolean();
|
||||
m.fluids = new int[6];
|
||||
if (hasFluids) IntStream.range(0, m.fluids.length).forEach(i -> m.fluids[i] = dat.readInt());
|
||||
|
||||
m.capacity = dat.readInt();
|
||||
}
|
||||
case 1 -> {
|
||||
TEOrientableMessage m = (TEOrientableMessage) msg;
|
||||
m.x = dat.readInt();
|
||||
m.y = dat.readInt();
|
||||
m.z = dat.readInt();
|
||||
|
||||
m.input = dat.readInt();
|
||||
m.output = dat.readInt();
|
||||
}
|
||||
case 2 -> {
|
||||
TEPedestalMessage m = (TEPedestalMessage) msg;
|
||||
m.x = dat.readInt();
|
||||
m.y = dat.readInt();
|
||||
m.z = dat.readInt();
|
||||
|
||||
boolean hasStacks = dat.readBoolean();
|
||||
|
||||
m.items = new int[TEPedestal.sizeInv * 3];
|
||||
if (hasStacks) {
|
||||
m.items = new int[TEPedestal.sizeInv * 3];
|
||||
IntStream.range(0, m.items.length).forEach(i -> m.items[i] = dat.readInt());
|
||||
((TEAltarMessage) msg).fluids = new int[6];
|
||||
if (hasFluids) for (int i = 0; i < ((TEAltarMessage) msg).fluids.length; i++) {
|
||||
((TEAltarMessage) msg).fluids[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
case 3 -> {
|
||||
TEPlinthMessage m = (TEPlinthMessage) msg;
|
||||
m.x = dat.readInt();
|
||||
m.y = dat.readInt();
|
||||
m.z = dat.readInt();
|
||||
|
||||
boolean hasStacks = dat.readBoolean();
|
||||
((TEAltarMessage) msg).capacity = dat.readInt();
|
||||
|
||||
m.items = new int[TEPlinth.sizeInv * 3];
|
||||
if (hasStacks) {
|
||||
m.items = new int[TEPlinth.sizeInv * 3];
|
||||
IntStream.range(0, m.items.length).forEach(i -> m.items[i] = dat.readInt());
|
||||
break;
|
||||
|
||||
case 1:
|
||||
((TEOrientableMessage) msg).x = dat.readInt();
|
||||
((TEOrientableMessage) msg).y = dat.readInt();
|
||||
((TEOrientableMessage) msg).z = dat.readInt();
|
||||
|
||||
((TEOrientableMessage) msg).input = dat.readInt();
|
||||
((TEOrientableMessage) msg).output = dat.readInt();
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
((TEPedestalMessage) msg).x = dat.readInt();
|
||||
((TEPedestalMessage) msg).y = dat.readInt();
|
||||
((TEPedestalMessage) msg).z = dat.readInt();
|
||||
|
||||
boolean hasStacks1 = dat.readBoolean();
|
||||
|
||||
((TEPedestalMessage) msg).items = new int[TEPedestal.sizeInv * 3];
|
||||
if (hasStacks1) {
|
||||
((TEPedestalMessage) msg).items = new int[TEPedestal.sizeInv * 3];
|
||||
for (int i = 0; i < ((TEPedestalMessage) msg).items.length; i++) {
|
||||
((TEPedestalMessage) msg).items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
case 4 -> {
|
||||
TESocketMessage m = (TESocketMessage) msg;
|
||||
m.x = dat.readInt();
|
||||
m.y = dat.readInt();
|
||||
m.z = dat.readInt();
|
||||
|
||||
boolean hasStacks = dat.readBoolean();
|
||||
break;
|
||||
|
||||
m.items = new int[TESocket.sizeInv * 3];
|
||||
if (hasStacks) {
|
||||
m.items = new int[TESocket.sizeInv * 3];
|
||||
IntStream.range(0, m.items.length).forEach(i -> m.items[i] = dat.readInt());
|
||||
case 3:
|
||||
((TEPlinthMessage) msg).x = dat.readInt();
|
||||
((TEPlinthMessage) msg).y = dat.readInt();
|
||||
((TEPlinthMessage) msg).z = dat.readInt();
|
||||
|
||||
boolean hasStacks2 = dat.readBoolean();
|
||||
|
||||
((TEPlinthMessage) msg).items = new int[TEPlinth.sizeInv * 3];
|
||||
if (hasStacks2) {
|
||||
((TEPlinthMessage) msg).items = new int[TEPlinth.sizeInv * 3];
|
||||
for (int i = 0; i < ((TEPlinthMessage) msg).items.length; i++) {
|
||||
((TEPlinthMessage) msg).items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
case 5 -> {
|
||||
TETeleposerMessage m = (TETeleposerMessage) msg;
|
||||
m.x = dat.readInt();
|
||||
m.y = dat.readInt();
|
||||
m.z = dat.readInt();
|
||||
|
||||
boolean hasStacks = dat.readBoolean();
|
||||
break;
|
||||
|
||||
m.items = new int[TETeleposer.sizeInv * 3];
|
||||
if (hasStacks) {
|
||||
m.items = new int[TETeleposer.sizeInv * 3];
|
||||
IntStream.range(0, m.items.length).forEach(i -> m.items[i] = dat.readInt());
|
||||
case 4:
|
||||
((TESocketMessage) msg).x = dat.readInt();
|
||||
((TESocketMessage) msg).y = dat.readInt();
|
||||
((TESocketMessage) msg).z = dat.readInt();
|
||||
|
||||
boolean hasStacks3 = dat.readBoolean();
|
||||
|
||||
((TESocketMessage) msg).items = new int[TESocket.sizeInv * 3];
|
||||
if (hasStacks3) {
|
||||
((TESocketMessage) msg).items = new int[TESocket.sizeInv * 3];
|
||||
for (int i = 0; i < ((TESocketMessage) msg).items.length; i++) {
|
||||
((TESocketMessage) msg).items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
case 6 -> {
|
||||
TEWritingTableMessage m = (TEWritingTableMessage) msg;
|
||||
m.x = dat.readInt();
|
||||
m.y = dat.readInt();
|
||||
m.z = dat.readInt();
|
||||
|
||||
boolean hasStacks = dat.readBoolean();
|
||||
break;
|
||||
|
||||
m.items = new int[TEWritingTable.sizeInv * 3];
|
||||
if (hasStacks) {
|
||||
m.items = new int[TEWritingTable.sizeInv * 3];
|
||||
IntStream.range(0, m.items.length).forEach(i -> m.items[i] = dat.readInt());
|
||||
case 5:
|
||||
((TETeleposerMessage) msg).x = dat.readInt();
|
||||
((TETeleposerMessage) msg).y = dat.readInt();
|
||||
((TETeleposerMessage) msg).z = dat.readInt();
|
||||
|
||||
boolean hasStacks4 = dat.readBoolean();
|
||||
|
||||
((TETeleposerMessage) msg).items = new int[TETeleposer.sizeInv * 3];
|
||||
if (hasStacks4) {
|
||||
((TETeleposerMessage) msg).items = new int[TETeleposer.sizeInv * 3];
|
||||
for (int i = 0; i < ((TETeleposerMessage) msg).items.length; i++) {
|
||||
((TETeleposerMessage) msg).items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
case 7 -> {
|
||||
String str = IntStream.range(0, dat.readInt()).mapToObj(i -> String.valueOf(dat.readChar()))
|
||||
.collect(Collectors.joining());
|
||||
|
||||
ParticleMessage m = (ParticleMessage) msg;
|
||||
m.particle = str;
|
||||
break;
|
||||
|
||||
m.xCoord = dat.readDouble();
|
||||
m.yCoord = dat.readDouble();
|
||||
m.zCoord = dat.readDouble();
|
||||
case 6:
|
||||
((TEWritingTableMessage) msg).x = dat.readInt();
|
||||
((TEWritingTableMessage) msg).y = dat.readInt();
|
||||
((TEWritingTableMessage) msg).z = dat.readInt();
|
||||
|
||||
m.xVel = dat.readDouble();
|
||||
m.yVel = dat.readDouble();
|
||||
m.zVel = dat.readDouble();
|
||||
}
|
||||
case 8 -> {
|
||||
VelocityMessage m = (VelocityMessage) msg;
|
||||
m.xVel = dat.readDouble();
|
||||
m.yVel = dat.readDouble();
|
||||
m.zVel = dat.readDouble();
|
||||
}
|
||||
case 9 -> {
|
||||
TEMasterStoneMessage m = (TEMasterStoneMessage) msg;
|
||||
m.x = dat.readInt();
|
||||
m.y = dat.readInt();
|
||||
m.z = dat.readInt();
|
||||
boolean hasStacks5 = dat.readBoolean();
|
||||
|
||||
m.ritual = IntStream.range(0, dat.readInt()).mapToObj(i -> String.valueOf(dat.readChar()))
|
||||
.collect(Collectors.joining());
|
||||
m.isRunning = dat.readBoolean();
|
||||
}
|
||||
case 10 -> {
|
||||
TEReagentConduitMessage m = (TEReagentConduitMessage) msg;
|
||||
m.x = dat.readInt();
|
||||
m.y = dat.readInt();
|
||||
m.z = dat.readInt();
|
||||
((TEWritingTableMessage) msg).items = new int[TEWritingTable.sizeInv * 3];
|
||||
if (hasStacks5) {
|
||||
((TEWritingTableMessage) msg).items = new int[TEWritingTable.sizeInv * 3];
|
||||
for (int i = 0; i < ((TEWritingTableMessage) msg).items.length; i++) {
|
||||
((TEWritingTableMessage) msg).items[i] = dat.readInt();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
int size = dat.readInt();
|
||||
String str = "";
|
||||
|
||||
for (int i = 0; i < size; i++) {
|
||||
str = str + dat.readChar();
|
||||
}
|
||||
|
||||
((ParticleMessage) msg).particle = str;
|
||||
|
||||
((ParticleMessage) msg).xCoord = dat.readDouble();
|
||||
((ParticleMessage) msg).yCoord = dat.readDouble();
|
||||
((ParticleMessage) msg).zCoord = dat.readDouble();
|
||||
|
||||
((ParticleMessage) msg).xVel = dat.readDouble();
|
||||
((ParticleMessage) msg).yVel = dat.readDouble();
|
||||
((ParticleMessage) msg).zVel = dat.readDouble();
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
((VelocityMessage) msg).xVel = dat.readDouble();
|
||||
((VelocityMessage) msg).yVel = dat.readDouble();
|
||||
((VelocityMessage) msg).zVel = dat.readDouble();
|
||||
|
||||
break;
|
||||
|
||||
case 9:
|
||||
((TEMasterStoneMessage) msg).x = dat.readInt();
|
||||
((TEMasterStoneMessage) msg).y = dat.readInt();
|
||||
((TEMasterStoneMessage) msg).z = dat.readInt();
|
||||
|
||||
int ritualStrSize = dat.readInt();
|
||||
String ritual = "";
|
||||
|
||||
for (int i = 0; i < ritualStrSize; i++) {
|
||||
ritual = ritual + dat.readChar();
|
||||
}
|
||||
|
||||
((TEMasterStoneMessage) msg).ritual = ritual;
|
||||
((TEMasterStoneMessage) msg).isRunning = dat.readBoolean();
|
||||
|
||||
break;
|
||||
|
||||
case 10:
|
||||
((TEReagentConduitMessage) msg).x = dat.readInt();
|
||||
((TEReagentConduitMessage) msg).y = dat.readInt();
|
||||
((TEReagentConduitMessage) msg).z = dat.readInt();
|
||||
|
||||
int listSize = dat.readInt();
|
||||
|
||||
m.destinationList = IntStream.range(0, listSize)
|
||||
.mapToObj(
|
||||
i -> new ColourAndCoords(
|
||||
dat.readInt(),
|
||||
dat.readInt(),
|
||||
dat.readInt(),
|
||||
dat.readInt(),
|
||||
dat.readInt(),
|
||||
dat.readInt(),
|
||||
dat.readInt()))
|
||||
.collect(Collectors.toCollection(LinkedList::new));
|
||||
}
|
||||
case 11 -> {
|
||||
CurrentLPMessage m = (CurrentLPMessage) msg;
|
||||
m.currentLP = dat.readInt();
|
||||
m.maxLP = dat.readInt();
|
||||
}
|
||||
case 12 -> {
|
||||
CurrentReagentBarMessage m = (CurrentReagentBarMessage) msg;
|
||||
m.reagent = IntStream.range(0, dat.readInt()).mapToObj(i -> String.valueOf(dat.readChar()))
|
||||
.collect(Collectors.joining());
|
||||
m.currentAR = dat.readFloat();
|
||||
m.maxAR = dat.readFloat();
|
||||
}
|
||||
case 13 -> {
|
||||
CurrentAddedHPMessage m = (CurrentAddedHPMessage) msg;
|
||||
m.currentHP = dat.readFloat();
|
||||
m.maxHP = dat.readFloat();
|
||||
}
|
||||
case 14 -> ((KeyboardMessage) msg).keyPressed = dat.readByte();
|
||||
case 15 -> {
|
||||
GaiaBiomeChangeMessage m = (GaiaBiomeChangeMessage) msg;
|
||||
m.chunkX = dat.readInt();
|
||||
m.chunkZ = dat.readInt();
|
||||
m.biome = dat.readByte();
|
||||
List<ColourAndCoords> list = new LinkedList();
|
||||
|
||||
for (int i = 0; i < listSize; i++) {
|
||||
list.add(
|
||||
new ColourAndCoords(
|
||||
dat.readInt(),
|
||||
dat.readInt(),
|
||||
dat.readInt(),
|
||||
dat.readInt(),
|
||||
dat.readInt(),
|
||||
dat.readInt(),
|
||||
dat.readInt()));
|
||||
}
|
||||
|
||||
((TEReagentConduitMessage) msg).destinationList = list;
|
||||
|
||||
break;
|
||||
|
||||
case 11:
|
||||
((CurrentLPMessage) msg).currentLP = dat.readInt();
|
||||
((CurrentLPMessage) msg).maxLP = dat.readInt();
|
||||
|
||||
break;
|
||||
|
||||
case 12:
|
||||
int size1 = dat.readInt();
|
||||
String str1 = "";
|
||||
for (int i = 0; i < size1; i++) {
|
||||
str1 = str1 + dat.readChar();
|
||||
}
|
||||
|
||||
((CurrentReagentBarMessage) msg).reagent = str1;
|
||||
((CurrentReagentBarMessage) msg).currentAR = dat.readFloat();
|
||||
((CurrentReagentBarMessage) msg).maxAR = dat.readFloat();
|
||||
|
||||
break;
|
||||
|
||||
case 13:
|
||||
((CurrentAddedHPMessage) msg).currentHP = dat.readFloat();
|
||||
((CurrentAddedHPMessage) msg).maxHP = dat.readFloat();
|
||||
|
||||
break;
|
||||
|
||||
case 14:
|
||||
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);
|
||||
m.mask = BitSet.valueOf(buffer);
|
||||
}
|
||||
((GaiaBiomeChangeMessage) msg).mask = BitSet.valueOf(buffer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -839,8 +972,8 @@ public enum NewPacketHandler {
|
||||
msg.x = tileOrientable.xCoord;
|
||||
msg.y = tileOrientable.yCoord;
|
||||
msg.z = tileOrientable.zCoord;
|
||||
msg.input = TEOrientable.getIntForForgeDirection(tileOrientable.getInputDirection());
|
||||
msg.output = TEOrientable.getIntForForgeDirection(tileOrientable.getOutputDirection());
|
||||
msg.input = tileOrientable.getIntForForgeDirection(tileOrientable.getInputDirection());
|
||||
msg.output = tileOrientable.getIntForForgeDirection(tileOrientable.getOutputDirection());
|
||||
|
||||
return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg);
|
||||
}
|
||||
@@ -983,6 +1116,8 @@ public enum NewPacketHandler {
|
||||
msg.index = 14;
|
||||
msg.keyPressed = bt;
|
||||
|
||||
System.out.println("Packet is being created");
|
||||
|
||||
return INSTANCE.channels.get(Side.CLIENT).generatePacketFrom(msg);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public class ModAchievements {
|
||||
energyBazooka = new AchievementsMod("energyBazooka", -3, 2, ModItems.energyBazooka, archmageOrb);
|
||||
demons = new AchievementsMod("demons", 0, 3, new ItemStack(ModItems.baseItems, 1, 29), archmageOrb)
|
||||
.setSpecial();
|
||||
transcendentOrb = new AchievementsMod("transcendentOrb", 0, 5, ModItems.transcendentBloodOrb, demons);
|
||||
transcendentOrb = new AchievementsMod("trancsendentOrb", 0, 5, ModItems.transcendentBloodOrb, demons);
|
||||
|
||||
alchemicalWizardryPage = new AchievementPage(
|
||||
"Blood Magic",
|
||||
|
||||
+13
-12
@@ -16,8 +16,6 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator;
|
||||
@@ -26,9 +24,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockAlchemicCalcinator extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon icon;
|
||||
|
||||
public BlockAlchemicCalcinator() {
|
||||
super(Material.rock);
|
||||
setHardness(2.0F);
|
||||
@@ -37,6 +32,9 @@ public class BlockAlchemicCalcinator extends BlockContainer {
|
||||
this.setBlockName("alchemicCalcinator");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon icon;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
@@ -89,10 +87,12 @@ public class BlockAlchemicCalcinator extends BlockContainer {
|
||||
Random rand = new Random();
|
||||
TileEntity tileEntity = world.getTileEntity(x, y, z);
|
||||
|
||||
if (!(tileEntity instanceof IInventory inventory)) {
|
||||
if (!(tileEntity instanceof IInventory)) {
|
||||
return;
|
||||
}
|
||||
|
||||
IInventory inventory = (IInventory) tileEntity;
|
||||
|
||||
for (int i = 0; i < inventory.getSizeInventory(); i++) {
|
||||
ItemStack item = inventory.getStackInSlot(i);
|
||||
|
||||
@@ -139,17 +139,18 @@ public class BlockAlchemicCalcinator extends BlockContainer {
|
||||
|
||||
if (playerItem.getItem() instanceof IBloodOrb) {
|
||||
if (tileEntity.getStackInSlot(0) == null) {
|
||||
IBindable.checkAndSetItemOwner(playerItem, player);
|
||||
ItemStack newItem = playerItem.copy();
|
||||
newItem.stackSize = 1;
|
||||
--playerItem.stackSize;
|
||||
tileEntity.setInventorySlotContents(0, newItem);
|
||||
}
|
||||
} else if (tileEntity.getStackInSlot(1) == null
|
||||
&& ReagentRegistry.getReagentStackForItem(playerItem) != null) {
|
||||
tileEntity.setInventorySlotContents(1, playerItem);
|
||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
|
||||
}
|
||||
} else if (tileEntity.getStackInSlot(1) == null) {
|
||||
ItemStack newItem = playerItem.copy();
|
||||
newItem.stackSize = 1;
|
||||
--playerItem.stackSize;
|
||||
tileEntity.setInventorySlotContents(1, newItem);
|
||||
}
|
||||
|
||||
} else {
|
||||
if (tileEntity.getStackInSlot(1) != null) {
|
||||
player.inventory.addItemStackToInventory(tileEntity.getStackInSlot(1));
|
||||
|
||||
@@ -18,9 +18,7 @@ import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.items.IAltarManipulator;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.holding.SigilOfHolding;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -56,11 +54,14 @@ public class BlockAltar extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return switch (side) {
|
||||
case 0 -> bottomIcon;
|
||||
case 1 -> topIcon;
|
||||
default -> sideIcon2;
|
||||
};
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -72,29 +73,19 @@ public class BlockAltar extends BlockContainer {
|
||||
public int getComparatorInputOverride(World world, int x, int y, int z, int meta) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if (!(tile instanceof TEAltar altar)) {
|
||||
return 0;
|
||||
}
|
||||
if (tile instanceof TEAltar) {
|
||||
ItemStack stack = ((TEAltar) tile).getStackInSlot(0);
|
||||
|
||||
int maxEssence;
|
||||
int currentEssence;
|
||||
|
||||
if (world.getBlock(x, y - 1, z) instanceof LargeBloodStoneBrick) {
|
||||
ItemStack stack = altar.getStackInSlot(0);
|
||||
|
||||
if (stack == null || !(stack.getItem() instanceof IBloodOrb bloodOrb)
|
||||
|| !(stack.getItem() instanceof IBindable)) {
|
||||
return 0;
|
||||
if (stack != null && stack.getItem() instanceof EnergyBattery) {
|
||||
EnergyBattery bloodOrb = (EnergyBattery) stack.getItem();
|
||||
int maxEssence = bloodOrb.getMaxEssence();
|
||||
int currentEssence = bloodOrb.getCurrentEssence(stack);
|
||||
int level = currentEssence * 15 / maxEssence;
|
||||
return Math.min(15, level) % 16;
|
||||
}
|
||||
|
||||
maxEssence = (int) (bloodOrb.getMaxEssence() * altar.getOrbMultiplier());
|
||||
currentEssence = SoulNetworkHandler.getCurrentEssence(IBindable.getOwnerName(stack));
|
||||
} else {
|
||||
maxEssence = altar.getCapacity();
|
||||
currentEssence = altar.getCurrentBlood();
|
||||
}
|
||||
|
||||
return Math.min(15, currentEssence * 15 / maxEssence) % 16;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -29,12 +29,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockBelljar extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon otherIcon;
|
||||
|
||||
public BlockBelljar() {
|
||||
super(Material.glass);
|
||||
setHardness(2.0F);
|
||||
@@ -45,6 +39,12 @@ public class BlockBelljar extends BlockContainer {
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon otherIcon;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
|
||||
@@ -41,11 +41,14 @@ public class BlockConduit extends BlockOrientable {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return switch (side) {
|
||||
case 0 -> bottomIcon;
|
||||
case 1 -> topIcon;
|
||||
default -> sideIcon2;
|
||||
};
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -78,13 +78,22 @@ public class BlockCrucible extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return switch (side) {
|
||||
case 0 -> bottomIcon;
|
||||
case 1 -> topIcon;
|
||||
default -> sideIcon;
|
||||
};
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon;
|
||||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z)
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||
this.setBlockBounds(0.3125F, 0.0F, 0.3125F, 0.6875F, 0.625F, 0.6875F);
|
||||
|
||||
@@ -17,6 +17,10 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockCrystal extends Block {
|
||||
|
||||
// private Icon bloodRuneIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon fullIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon brickIcon;
|
||||
|
||||
@@ -31,7 +35,8 @@ public class BlockCrystal extends Block {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:ShardCluster");
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:BlankRune");
|
||||
this.fullIcon = iconRegister.registerIcon("AlchemicalWizardry:ShardCluster");
|
||||
this.brickIcon = iconRegister.registerIcon("AlchemicalWizardry:ShardClusterBrick");
|
||||
}
|
||||
|
||||
@@ -52,10 +57,16 @@ public class BlockCrystal extends Block {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (meta == 1) {
|
||||
return brickIcon;
|
||||
switch (meta) {
|
||||
case 0:
|
||||
return fullIcon;
|
||||
|
||||
case 1:
|
||||
return brickIcon;
|
||||
|
||||
default:
|
||||
return blockIcon;
|
||||
}
|
||||
return blockIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,6 +18,9 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon enchantability;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon enchantmentLevel;
|
||||
|
||||
@@ -32,17 +35,22 @@ public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:GlyphEnchantability");
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:LargeBloodStoneBrick");
|
||||
this.enchantability = iconRegister.registerIcon("AlchemicalWizardry:GlyphEnchantability");
|
||||
this.enchantmentLevel = iconRegister.registerIcon("AlchemicalWizardry:GlyphEnchantmentLevel");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (meta == 1) {
|
||||
return enchantmentLevel;
|
||||
switch (meta) {
|
||||
case 0:
|
||||
return enchantability;
|
||||
case 1:
|
||||
return enchantmentLevel;
|
||||
default:
|
||||
return this.blockIcon;
|
||||
}
|
||||
return this.blockIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,11 +46,14 @@ public class BlockHomHeart extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return switch (side) {
|
||||
case 0 -> bottomIcon;
|
||||
case 1 -> topIcon;
|
||||
default -> sideIcon;
|
||||
};
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
@@ -21,6 +22,15 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockPedestal extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon sideIcon2;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
|
||||
public BlockPedestal() {
|
||||
super(Material.rock);
|
||||
setHardness(2.0F);
|
||||
@@ -34,7 +44,22 @@ public class BlockPedestal extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:ArcanePedestal");
|
||||
this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:ArcanePedestal");
|
||||
this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
|
||||
this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
@@ -21,6 +22,15 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockPlinth extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon sideIcon2;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
|
||||
public BlockPlinth() {
|
||||
super(Material.rock);
|
||||
setHardness(2.0F);
|
||||
@@ -34,7 +44,22 @@ public class BlockPlinth extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:ArcanePlinth");
|
||||
this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:ArcanePlinth");
|
||||
this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
|
||||
this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,21 +1,13 @@
|
||||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.Int3;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -49,37 +41,6 @@ public class BlockReagentConduit extends BlockContainer {
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what,
|
||||
float these, float are) {
|
||||
if (!world.isRemote) {
|
||||
ItemStack held = player.getHeldItem();
|
||||
if (held == null || !(held.getItem() instanceof IReagentManipulator)) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if (tile instanceof TEReagentConduit) {
|
||||
TEReagentConduit relay = (TEReagentConduit) tile;
|
||||
if (relay.reagentTargetList.isEmpty()) {
|
||||
player.addChatComponentMessage(
|
||||
new ChatComponentTranslation("message.reagentconduit.noconnections"));
|
||||
} else {
|
||||
player.addChatComponentMessage(
|
||||
new ChatComponentTranslation("message.reagentconduit.connections"));
|
||||
for (Map.Entry<Reagent, List<Int3>> entry : relay.reagentTargetList.entrySet()) {
|
||||
Reagent reagent = entry.getKey();
|
||||
List<Int3> offsets = entry.getValue();
|
||||
if (offsets == null) continue;
|
||||
for (Int3 offset : offsets) {
|
||||
player.addChatComponentMessage(
|
||||
new ChatComponentTranslation(
|
||||
"message.reagentconduit.connection.entry",
|
||||
reagent.name,
|
||||
x + offset.xCoord,
|
||||
y + offset.yCoord,
|
||||
z + offset.zCoord));
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.onBlockActivated(world, x, y, z, player, side, what, these, are);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,14 +2,11 @@ package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESchematicSaver;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockSchematicSaver extends BlockContainer {
|
||||
|
||||
@@ -21,12 +18,6 @@ public class BlockSchematicSaver extends BlockContainer {
|
||||
this.setBlockName("schematicSaver");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:SchematicSaver");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World var1, int var2) {
|
||||
return new TESchematicSaver();
|
||||
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
@@ -22,6 +23,15 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockSocket extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon sideIcon2;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
|
||||
public BlockSocket() {
|
||||
super(Material.rock);
|
||||
setHardness(2.0F);
|
||||
@@ -34,7 +44,22 @@ public class BlockSocket extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
|
||||
this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
|
||||
this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
|
||||
this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,6 +8,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
@@ -17,6 +18,9 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockStabilityGlyph extends Block implements IStabilityGlyph {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon stability1;
|
||||
|
||||
public BlockStabilityGlyph() {
|
||||
super(Material.iron);
|
||||
setHardness(2.0F);
|
||||
@@ -28,7 +32,19 @@ public class BlockStabilityGlyph extends Block implements IStabilityGlyph {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:GlyphStability1");
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:LargeBloodStoneBrick");
|
||||
this.stability1 = iconRegister.registerIcon("AlchemicalWizardry:GlyphStability1");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (meta) {
|
||||
case 0:
|
||||
return stability1;
|
||||
default:
|
||||
return this.blockIcon;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.BlockMobSpawner;
|
||||
import net.minecraft.block.BlockPortal;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -15,19 +16,18 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.event.TeleposeEvent;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal;
|
||||
import WayofTime.alchemicalWizardry.common.items.TelepositionFocus;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer;
|
||||
import codechicken.multipart.MultipartHelper;
|
||||
import codechicken.multipart.TileMultipart;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -37,7 +37,10 @@ public class BlockTeleposer extends BlockContainer {
|
||||
private IIcon topIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon sideIcon;
|
||||
private IIcon sideIcon2;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
|
||||
public BlockTeleposer() {
|
||||
super(Material.rock);
|
||||
@@ -51,14 +54,21 @@ public class BlockTeleposer extends BlockContainer {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Top");
|
||||
this.sideIcon = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Side");
|
||||
this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Side");
|
||||
this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Side");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (side == 1) return topIcon;
|
||||
return sideIcon;
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -66,18 +76,23 @@ public class BlockTeleposer extends BlockContainer {
|
||||
float these, float are) {
|
||||
ItemStack playerItem = player.getCurrentEquippedItem();
|
||||
|
||||
if (playerItem == null || !(playerItem.getItem() instanceof TelepositionFocus)) {
|
||||
player.openGui(AlchemicalWizardry.instance, 1, world, x, y, z);
|
||||
return true;
|
||||
if (playerItem != null) {
|
||||
if (playerItem.getItem() instanceof TelepositionFocus) {
|
||||
SoulNetworkHandler.checkAndSetItemPlayer(playerItem, player);
|
||||
|
||||
if (playerItem.getTagCompound() == null) {
|
||||
playerItem.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound itemTag = playerItem.getTagCompound();
|
||||
itemTag.setInteger("xCoord", x);
|
||||
itemTag.setInteger("yCoord", y);
|
||||
itemTag.setInteger("zCoord", z);
|
||||
itemTag.setInteger("dimensionId", world.provider.dimensionId);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
SoulNetworkHandler.checkAndSetItemPlayer(playerItem, player);
|
||||
|
||||
NBTTagCompound itemTag = IBindable.getTag(playerItem);
|
||||
itemTag.setInteger("xCoord", x);
|
||||
itemTag.setInteger("yCoord", y);
|
||||
itemTag.setInteger("zCoord", z);
|
||||
itemTag.setInteger("dimensionId", world.provider.dimensionId);
|
||||
player.openGui(AlchemicalWizardry.instance, 1, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -91,36 +106,38 @@ public class BlockTeleposer extends BlockContainer {
|
||||
Random rand = new Random();
|
||||
TileEntity tileEntity = world.getTileEntity(x, y, z);
|
||||
|
||||
if (!(tileEntity instanceof IInventory inventory)) {
|
||||
if (!(tileEntity instanceof IInventory)) {
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack item = inventory.getStackInSlot(0);
|
||||
IInventory inventory = (IInventory) tileEntity;
|
||||
|
||||
if (item == null || item.stackSize <= 0) {
|
||||
return;
|
||||
for (int i = 0; i < inventory.getSizeInventory(); i++) {
|
||||
ItemStack item = inventory.getStackInSlot(i);
|
||||
|
||||
if (item != null && item.stackSize > 0) {
|
||||
float rx = rand.nextFloat() * 0.8F + 0.1F;
|
||||
float ry = rand.nextFloat() * 0.8F + 0.1F;
|
||||
float rz = rand.nextFloat() * 0.8F + 0.1F;
|
||||
EntityItem entityItem = new EntityItem(
|
||||
world,
|
||||
x + rx,
|
||||
y + ry,
|
||||
z + rz,
|
||||
new ItemStack(item.getItem(), item.stackSize, item.getItemDamage()));
|
||||
|
||||
if (item.hasTagCompound()) {
|
||||
entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy());
|
||||
}
|
||||
|
||||
float factor = 0.05F;
|
||||
entityItem.motionX = rand.nextGaussian() * factor;
|
||||
entityItem.motionY = rand.nextGaussian() * factor + 0.2F;
|
||||
entityItem.motionZ = rand.nextGaussian() * factor;
|
||||
world.spawnEntityInWorld(entityItem);
|
||||
item.stackSize = 0;
|
||||
}
|
||||
}
|
||||
|
||||
float rx = rand.nextFloat() * 0.8F + 0.1F;
|
||||
float ry = rand.nextFloat() * 0.8F + 0.1F;
|
||||
float rz = rand.nextFloat() * 0.8F + 0.1F;
|
||||
EntityItem entityItem = new EntityItem(
|
||||
world,
|
||||
x + rx,
|
||||
y + ry,
|
||||
z + rz,
|
||||
new ItemStack(item.getItem(), item.stackSize, item.getItemDamage()));
|
||||
|
||||
if (item.hasTagCompound()) {
|
||||
entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy());
|
||||
}
|
||||
|
||||
float factor = 0.05F;
|
||||
entityItem.motionX = rand.nextGaussian() * factor;
|
||||
entityItem.motionY = rand.nextGaussian() * factor + 0.2F;
|
||||
entityItem.motionZ = rand.nextGaussian() * factor;
|
||||
world.spawnEntityInWorld(entityItem);
|
||||
item.stackSize = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -128,98 +145,126 @@ public class BlockTeleposer extends BlockContainer {
|
||||
return new TETeleposer();
|
||||
}
|
||||
|
||||
public static boolean swapBlocks(Object caller, World worldA, World worldB, int xA, int yA, int zA, int xB, int yB,
|
||||
int zB) {
|
||||
return swapBlocks(caller, worldA, worldB, xA, yA, zA, xB, yB, zB, true, 3);
|
||||
public static boolean swapBlocks(Object caller, World worldI, World worldF, int xi, int yi, int zi, int xf, int yf,
|
||||
int zf) {
|
||||
return swapBlocks(caller, worldI, worldF, xi, yi, zi, xf, yf, zf, true, 3);
|
||||
}
|
||||
|
||||
public static boolean swapBlocksWithoutSound(Object caller, World worldA, World worldB, int xA, int yA, int zA,
|
||||
int xB, int yB, int zB) {
|
||||
return swapBlocks(caller, worldA, worldB, xA, yA, zA, xB, yB, zB, false, 3);
|
||||
public static boolean swapBlocksWithoutSound(Object caller, World worldI, World worldF, int xi, int yi, int zi,
|
||||
int xf, int yf, int zf) {
|
||||
return swapBlocks(caller, worldI, worldF, xi, yi, zi, xf, yf, zf, false, 3);
|
||||
}
|
||||
|
||||
public static boolean swapBlocks(Object caller, World worldA, World worldB, int xA, int yA, int zA, int xB, int yB,
|
||||
int zB, boolean doSound, int flag) {
|
||||
TileEntity tileA = worldA.getTileEntity(xA, yA, zA);
|
||||
TileEntity tileB = worldB.getTileEntity(xB, yB, zB);
|
||||
public static boolean swapBlocks(Object caller, World worldI, World worldF, int xi, int yi, int zi, int xf, int yf,
|
||||
int zf, boolean doSound, int flag) {
|
||||
TileEntity tileEntityI = worldI.getTileEntity(xi, yi, zi);
|
||||
TileEntity tileEntityF = worldF.getTileEntity(xf, yf, zf);
|
||||
|
||||
NBTTagCompound nbtA = new NBTTagCompound();
|
||||
NBTTagCompound nbtB = new NBTTagCompound();
|
||||
NBTTagCompound nbttag1 = new NBTTagCompound();
|
||||
NBTTagCompound nbttag2 = new NBTTagCompound();
|
||||
|
||||
if (tileA != null) tileA.writeToNBT(nbtA);
|
||||
if (tileB != null) tileB.writeToNBT(nbtB);
|
||||
if (tileEntityI != null) {
|
||||
tileEntityI.writeToNBT(nbttag1);
|
||||
}
|
||||
|
||||
Block blockA = worldA.getBlock(xA, yA, zA);
|
||||
Block blockB = worldB.getBlock(xB, yB, zB);
|
||||
if (tileEntityF != null) {
|
||||
tileEntityF.writeToNBT(nbttag2);
|
||||
}
|
||||
|
||||
if (blockA.equals(Blocks.air) && blockB.equals(Blocks.air)) return false;
|
||||
Block blockI = worldI.getBlock(xi, yi, zi);
|
||||
Block blockF = worldF.getBlock(xf, yf, zf);
|
||||
|
||||
if (!(caller instanceof TEDemonPortal) && (blockA instanceof BlockPortal || blockB instanceof BlockPortal))
|
||||
if (blockI.equals(Blocks.air) && blockF.equals(Blocks.air)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int metaA = worldA.getBlockMetadata(xA, yA, zA);
|
||||
int metaB = worldB.getBlockMetadata(xB, yB, zB);
|
||||
if (blockI instanceof BlockMobSpawner || blockF instanceof BlockMobSpawner || caller instanceof TEDemonPortal
|
||||
? false
|
||||
: blockI instanceof BlockPortal || blockF instanceof BlockPortal) {
|
||||
return false;
|
||||
}
|
||||
|
||||
TeleposeEvent evt = new TeleposeEvent(worldA, xA, yA, zA, blockA, metaA, worldB, xB, yB, zB, blockB, metaB);
|
||||
int metaI = worldI.getBlockMetadata(xi, yi, zi);
|
||||
int metaF = worldF.getBlockMetadata(xf, yf, zf);
|
||||
|
||||
TeleposeEvent evt = new TeleposeEvent(worldI, xi, yi, zi, blockI, metaI, worldF, xf, yf, zf, blockF, metaF);
|
||||
if (MinecraftForge.EVENT_BUS.post(evt)) return false;
|
||||
|
||||
if (doSound) {
|
||||
String sound = "mob.endermen.portal";
|
||||
worldA.playSoundEffect(xA, yA, zA, sound, 1.0F, 1.0F);
|
||||
worldB.playSoundEffect(xB, yB, zB, sound, 1.0F, 1.0F);
|
||||
worldI.playSoundEffect(xi, yi, zi, "mob.endermen.portal", 1.0F, 1.0F);
|
||||
worldF.playSoundEffect(xf, yf, zf, "mob.endermen.portal", 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
// Clear current tile entities
|
||||
worldB.setTileEntity(xB, yB, zB, blockB.createTileEntity(worldB, metaB));
|
||||
worldA.setTileEntity(xA, yA, zA, blockA.createTileEntity(worldA, metaA));
|
||||
// CLEAR TILES
|
||||
Block finalBlock = blockF;
|
||||
|
||||
// Swap blocks
|
||||
worldB.setBlock(xB, yB, zB, blockA, metaA, flag);
|
||||
worldA.setBlock(xA, yA, zA, blockB, metaB, flag);
|
||||
if (finalBlock != null) {
|
||||
TileEntity tileToSet = finalBlock.createTileEntity(worldF, metaF);
|
||||
|
||||
// Restore tile entities
|
||||
swapTile(worldB, xB, yB, zB, tileA, nbtA);
|
||||
swapTile(worldA, xA, yA, zA, tileB, nbtB);
|
||||
worldF.setTileEntity(xf, yf, zf, tileToSet);
|
||||
}
|
||||
|
||||
if (blockI != null) {
|
||||
TileEntity tileToSet = blockI.createTileEntity(worldI, metaI);
|
||||
|
||||
worldI.setTileEntity(xi, yi, zi, tileToSet);
|
||||
}
|
||||
|
||||
// TILES CLEARED
|
||||
worldF.setBlock(xf, yf, zf, blockI, metaI, flag);
|
||||
|
||||
if (tileEntityI != null) {
|
||||
TileEntity newTileEntityI = TileEntity.createAndLoadEntity(nbttag1);
|
||||
|
||||
if (AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityI)) {
|
||||
newTileEntityI = createMultipartFromNBT(worldF, nbttag1);
|
||||
}
|
||||
|
||||
worldF.setTileEntity(xf, yf, zf, newTileEntityI);
|
||||
|
||||
newTileEntityI.xCoord = xf;
|
||||
newTileEntityI.yCoord = yf;
|
||||
newTileEntityI.zCoord = zf;
|
||||
|
||||
if (AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityI)) {
|
||||
sendDescriptorOfTile(worldF, newTileEntityI);
|
||||
}
|
||||
}
|
||||
|
||||
worldI.setBlock(xi, yi, zi, finalBlock, metaF, flag);
|
||||
|
||||
if (tileEntityF != null) {
|
||||
TileEntity newTileEntityF = TileEntity.createAndLoadEntity(nbttag2);
|
||||
if (AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityF)) {
|
||||
newTileEntityF = createMultipartFromNBT(worldI, nbttag2);
|
||||
}
|
||||
|
||||
worldI.setTileEntity(xi, yi, zi, newTileEntityF);
|
||||
|
||||
newTileEntityF.xCoord = xi;
|
||||
newTileEntityF.yCoord = yi;
|
||||
newTileEntityF.zCoord = zi;
|
||||
|
||||
if (AlchemicalWizardry.isFMPLoaded && isMultipart(tileEntityF)) {
|
||||
sendDescriptorOfTile(worldI, newTileEntityF);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void swapTile(World world, int x, int y, int z, TileEntity oldTile, NBTTagCompound nbt) {
|
||||
if (oldTile == null) return;
|
||||
|
||||
TileEntity newTile;
|
||||
|
||||
boolean multipart = AlchemicalWizardry.isFMPLoaded && oldTile instanceof TileMultipart;
|
||||
if (multipart) {
|
||||
newTile = MultipartHelper.createTileFromNBT(world, nbt);
|
||||
} else {
|
||||
newTile = TileEntity.createAndLoadEntity(nbt);
|
||||
}
|
||||
|
||||
world.setTileEntity(x, y, z, newTile);
|
||||
|
||||
newTile.xCoord = x;
|
||||
newTile.yCoord = y;
|
||||
newTile.zCoord = z;
|
||||
|
||||
if (multipart) MultipartHelper.sendDescPacket(world, newTile);
|
||||
@Optional.Method(modid = "ForgeMultipart")
|
||||
public static boolean isMultipart(TileEntity tile) {
|
||||
return tile instanceof TileMultipart;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block neighbor) {
|
||||
if (!(world.getTileEntity(x, y, z) instanceof TETeleposer teleposer)) return;
|
||||
// was it a low->high pulse
|
||||
boolean isPowered = world.isBlockIndirectlyGettingPowered(x, y, z);
|
||||
if (!teleposer.hasRedstone && isPowered) {
|
||||
teleposer.hasRedstone = true;
|
||||
teleposer.activate();
|
||||
} else {
|
||||
teleposer.hasRedstone = isPowered;
|
||||
}
|
||||
@Optional.Method(modid = "ForgeMultipart")
|
||||
public static TileEntity createMultipartFromNBT(World world, NBTTagCompound tag) {
|
||||
return MultipartHelper.createTileFromNBT(world, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, int side) {
|
||||
return true;
|
||||
@Optional.Method(modid = "ForgeMultipart")
|
||||
public static void sendDescriptorOfTile(World world, TileEntity tile) {
|
||||
MultipartHelper.sendDescPacket(world, tile);
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
@@ -24,6 +25,15 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockWritingTable extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon sideIcon2;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
|
||||
public BlockWritingTable() {
|
||||
super(Material.wood);
|
||||
setHardness(2.0F);
|
||||
@@ -35,7 +45,22 @@ public class BlockWritingTable extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:AlchemicChemistrySet");
|
||||
this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:AlchemicChemistrySet");
|
||||
this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_SideType2");
|
||||
this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_Bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -105,15 +105,31 @@ public class BloodRune extends Block {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return switch (meta) {
|
||||
case 1 -> altarCapacityRuneIcon;
|
||||
case 2 -> dislocationRuneIcon;
|
||||
case 3 -> this.orbCapacityRuneIcon;
|
||||
case 4 -> this.betterCapacityRuneIcon;
|
||||
case 5 -> this.accelerationRuneIcon;
|
||||
case 6 -> this.quicknessRuneIcon;
|
||||
default -> blockIcon;
|
||||
};
|
||||
switch (meta) {
|
||||
case 0:
|
||||
return blockIcon;
|
||||
|
||||
case 1:
|
||||
return altarCapacityRuneIcon;
|
||||
|
||||
case 2:
|
||||
return dislocationRuneIcon;
|
||||
|
||||
case 3:
|
||||
return this.orbCapacityRuneIcon;
|
||||
|
||||
case 4:
|
||||
return this.betterCapacityRuneIcon;
|
||||
|
||||
case 5:
|
||||
return this.accelerationRuneIcon;
|
||||
|
||||
case 6:
|
||||
return this.quicknessRuneIcon;
|
||||
|
||||
default:
|
||||
return blockIcon;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,6 +4,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
@@ -58,28 +59,36 @@ public class RitualStone extends Block implements IRitualStone {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float subX,
|
||||
float subY, float subZ) {
|
||||
ItemStack stack = player.getCurrentEquippedItem();
|
||||
if (stack == null || !(stack.getItem() instanceof ScribeTool scribe)) {
|
||||
public int damageDropped(int metadata) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what,
|
||||
float these, float are) {
|
||||
ItemStack playerItem = player.getCurrentEquippedItem();
|
||||
|
||||
if (playerItem == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int toolType = scribe.getType();
|
||||
Item item = playerItem.getItem();
|
||||
|
||||
if (toolType == world.getBlockMetadata(x, y, z)) {
|
||||
if (!(item instanceof ScribeTool)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (stack.getMaxDamage() != 0 && stack.getItemDamage() >= stack.getMaxDamage()) {
|
||||
if (playerItem.getMaxDamage() <= playerItem.getItemDamage() && !(playerItem.getMaxDamage() == 0)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ScribeTool scribeTool = (ScribeTool) item;
|
||||
|
||||
if (!player.capabilities.isCreativeMode) {
|
||||
stack.setItemDamage(stack.getItemDamage() + 1);
|
||||
playerItem.setItemDamage(playerItem.getItemDamage() + 1);
|
||||
}
|
||||
|
||||
world.setBlockMetadataWithNotify(x, y, z, toolType, 3);
|
||||
world.setBlockMetadataWithNotify(x, y, z, scribeTool.getType(), 3);
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
return true;
|
||||
}
|
||||
@@ -87,15 +96,31 @@ public class RitualStone extends Block implements IRitualStone {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return switch (metadata) {
|
||||
case 1 -> waterStoneIcon;
|
||||
case 2 -> fireStoneIcon;
|
||||
case 3 -> earthStoneIcon;
|
||||
case 4 -> airStoneIcon;
|
||||
case 5 -> duskStoneIcon;
|
||||
case 6 -> dawnStoneIcon;
|
||||
default -> blankIcon;
|
||||
};
|
||||
switch (metadata) {
|
||||
case 0:
|
||||
return blankIcon;
|
||||
|
||||
case 1:
|
||||
return waterStoneIcon;
|
||||
|
||||
case 2:
|
||||
return fireStoneIcon;
|
||||
|
||||
case 3:
|
||||
return earthStoneIcon;
|
||||
|
||||
case 4:
|
||||
return airStoneIcon;
|
||||
|
||||
case 5:
|
||||
return duskStoneIcon;
|
||||
|
||||
case 6:
|
||||
return dawnStoneIcon;
|
||||
|
||||
default:
|
||||
return blankIcon;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+11
-51
@@ -1,37 +1,23 @@
|
||||
package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.BlockStack;
|
||||
|
||||
public class AltarComponent {
|
||||
|
||||
private final int x, y, z;
|
||||
private final List<BlockStack> validBlocks;
|
||||
|
||||
private final boolean isBloodRune, isUpgradeSlot;
|
||||
private int x;
|
||||
private int y;
|
||||
private int z;
|
||||
private Block block;
|
||||
private int metadata;
|
||||
private boolean isBloodRune;
|
||||
private boolean isUpgradeSlot;
|
||||
|
||||
public AltarComponent(int x, int y, int z, Block block, int metadata, boolean isBloodRune, boolean isUpgradeSlot) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.validBlocks = new ArrayList<>();
|
||||
this.validBlocks.add(new BlockStack(block, metadata));
|
||||
this.isBloodRune = isBloodRune;
|
||||
this.isUpgradeSlot = isUpgradeSlot;
|
||||
}
|
||||
|
||||
public AltarComponent(int x, int y, int z, List<BlockStack> validBlocks, boolean isBloodRune,
|
||||
boolean isUpgradeSlot) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.validBlocks = validBlocks;
|
||||
this.block = block;
|
||||
this.metadata = metadata;
|
||||
this.isBloodRune = isBloodRune;
|
||||
this.isUpgradeSlot = isUpgradeSlot;
|
||||
}
|
||||
@@ -49,17 +35,11 @@ public class AltarComponent {
|
||||
}
|
||||
|
||||
public Block getBlock() {
|
||||
if (anyBlockMatches()) {
|
||||
return Blocks.air;
|
||||
}
|
||||
return validBlocks.get(0).getBlock();
|
||||
return block;
|
||||
}
|
||||
|
||||
public int getMetadata() {
|
||||
if (anyBlockMatches()) {
|
||||
return OreDictionary.WILDCARD_VALUE;
|
||||
}
|
||||
return validBlocks.get(0).getMeta();
|
||||
return metadata;
|
||||
}
|
||||
|
||||
public boolean isBloodRune() {
|
||||
@@ -69,24 +49,4 @@ public class AltarComponent {
|
||||
public boolean isUpgradeSlot() {
|
||||
return isUpgradeSlot;
|
||||
}
|
||||
|
||||
public List<BlockStack> getValidBlocks() {
|
||||
return validBlocks;
|
||||
}
|
||||
|
||||
public boolean matches(Block block, int meta) {
|
||||
if (anyBlockMatches()) return true;
|
||||
|
||||
for (BlockStack pair : validBlocks) {
|
||||
if (pair.getBlock() == block
|
||||
&& (pair.getMeta() == meta || pair.getMeta() == OreDictionary.WILDCARD_VALUE)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean anyBlockMatches() {
|
||||
return validBlocks.isEmpty();
|
||||
}
|
||||
}
|
||||
+677
-119
@@ -1,9 +1,11 @@
|
||||
package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade;
|
||||
|
||||
import java.util.ArrayList;
|
||||
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;
|
||||
|
||||
@@ -45,15 +47,21 @@ public class UpgradedAltars {
|
||||
return true;
|
||||
}
|
||||
|
||||
private static List<BlockStack> getRuneOverrides(int altarTier) {
|
||||
return switch (altarTier) {
|
||||
case 2 -> AlchemicalWizardry.secondTierRunes;
|
||||
case 3 -> AlchemicalWizardry.thirdTierRunes;
|
||||
case 4 -> AlchemicalWizardry.fourthTierRunes;
|
||||
case 5 -> AlchemicalWizardry.fifthTierRunes;
|
||||
case 6 -> AlchemicalWizardry.sixthTierRunes;
|
||||
default -> null;
|
||||
};
|
||||
private static BlockStack[] getRuneOverrides(int altarTier) {
|
||||
switch (altarTier) {
|
||||
case 2:
|
||||
return AlchemicalWizardry.secondTierRunes;
|
||||
case 3:
|
||||
return AlchemicalWizardry.thirdTierRunes;
|
||||
case 4:
|
||||
return AlchemicalWizardry.fourthTierRunes;
|
||||
case 5:
|
||||
return AlchemicalWizardry.fifthTierRunes;
|
||||
case 6:
|
||||
return AlchemicalWizardry.sixthTierRunes;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean checkAltarComponent(AltarComponent altarComponent, IBlockAccess world, int x, int y, int z,
|
||||
@@ -61,29 +69,28 @@ public class UpgradedAltars {
|
||||
int compX = x + altarComponent.getX();
|
||||
int compY = y + altarComponent.getY();
|
||||
int compZ = z + altarComponent.getZ();
|
||||
if (altarComponent.anyBlockMatches()) {
|
||||
if (altarComponent.getBlock() == Blocks.air) {
|
||||
return !world.isAirBlock(compX, compY, compZ);
|
||||
}
|
||||
|
||||
Block block = world.getBlock(compX, compY, compZ);
|
||||
int meta = world.getBlockMetadata(compX, compY, compZ);
|
||||
if (!altarComponent.isBloodRune()) {
|
||||
return altarComponent.matches(block, meta);
|
||||
}
|
||||
|
||||
List<BlockStack> runes = getRuneOverrides(altarTier);
|
||||
if (runes == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (BlockStack rune : runes) {
|
||||
if (altarComponent.isUpgradeSlot() ? block == rune.getBlock() && meta == rune.getMeta()
|
||||
: altarComponent.matches(block, meta)) {
|
||||
return true;
|
||||
int metadata = world.getBlockMetadata(compX, compY, compZ);
|
||||
if (altarComponent.isBloodRune()) {
|
||||
boolean result = false;
|
||||
BlockStack[] runes = getRuneOverrides(altarTier);
|
||||
if (runes == null) {
|
||||
return false;
|
||||
}
|
||||
for (BlockStack rune : runes) {
|
||||
result |= altarComponent.isUpgradeSlot() ? block == rune.getBlock() && metadata == rune.getMeta()
|
||||
: block == altarComponent.getBlock() && metadata == altarComponent.getMetadata();
|
||||
}
|
||||
return result;
|
||||
} else {
|
||||
if (altarComponent.getBlock() != block || altarComponent.getMetadata() != metadata) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public static AltarUpgradeComponent getUpgrades(World world, int x, int y, int z, int altarTier) {
|
||||
@@ -92,132 +99,683 @@ public class UpgradedAltars {
|
||||
}
|
||||
AltarUpgradeComponent upgrades = new AltarUpgradeComponent();
|
||||
List<AltarComponent> list = UpgradedAltars.getAltarUpgradeListForTier(altarTier);
|
||||
List<BlockStack> runes = getRuneOverrides(altarTier);
|
||||
BlockStack[] runes = getRuneOverrides(altarTier);
|
||||
if (list == null || runes == null) {
|
||||
return upgrades;
|
||||
}
|
||||
for (AltarComponent altarComponent : list) {
|
||||
if (!altarComponent.isUpgradeSlot()) {
|
||||
continue;
|
||||
}
|
||||
if (altarComponent.isUpgradeSlot()) {
|
||||
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());
|
||||
BlockStack blockStack = new BlockStack(block, metadata);
|
||||
switch (Arrays.asList(runes).indexOf(blockStack)) {
|
||||
case 1:
|
||||
upgrades.addSpeedUpgrade();
|
||||
break;
|
||||
|
||||
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());
|
||||
BlockStack blockStack = new BlockStack(block, metadata);
|
||||
switch (runes.indexOf(blockStack)) {
|
||||
case 1 -> upgrades.addSpeedUpgrade();
|
||||
case 2 -> upgrades.addEfficiencyUpgrade();
|
||||
case 3 -> upgrades.addSacrificeUpgrade();
|
||||
case 4 -> upgrades.addSelfSacrificeUpgrade();
|
||||
case 5 -> upgrades.addaltarCapacitiveUpgrade();
|
||||
case 6 -> upgrades.addDisplacementUpgrade();
|
||||
case 7 -> upgrades.addorbCapacitiveUpgrade();
|
||||
case 8 -> upgrades.addBetterCapacitiveUpgrade();
|
||||
case 9 -> upgrades.addAccelerationUpgrade();
|
||||
case 10 -> upgrades.addQuicknessUpgrade();
|
||||
case 2:
|
||||
upgrades.addEfficiencyUpgrade();
|
||||
break;
|
||||
|
||||
case 3:
|
||||
upgrades.addSacrificeUpgrade();
|
||||
break;
|
||||
|
||||
case 4:
|
||||
upgrades.addSelfSacrificeUpgrade();
|
||||
break;
|
||||
|
||||
case 5:
|
||||
upgrades.addaltarCapacitiveUpgrade();
|
||||
break;
|
||||
|
||||
case 6:
|
||||
upgrades.addDisplacementUpgrade();
|
||||
break;
|
||||
|
||||
case 7:
|
||||
upgrades.addorbCapacitiveUpgrade();
|
||||
break;
|
||||
|
||||
case 8:
|
||||
upgrades.addBetterCapacitiveUpgrade();
|
||||
break;
|
||||
|
||||
case 9:
|
||||
upgrades.addAccelerationUpgrade();
|
||||
break;
|
||||
|
||||
case 10:
|
||||
upgrades.addQuicknessUpgrade();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return upgrades;
|
||||
}
|
||||
|
||||
public static void loadAltars() {
|
||||
secondTierAltar.add(new AltarComponent(-1, -1, -1, AlchemicalWizardry.secondTierRunes, true, false));
|
||||
secondTierAltar.add(new AltarComponent(0, -1, -1, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
secondTierAltar.add(new AltarComponent(1, -1, -1, AlchemicalWizardry.secondTierRunes, true, false));
|
||||
secondTierAltar.add(new AltarComponent(-1, -1, 0, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
secondTierAltar.add(new AltarComponent(1, -1, 0, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
secondTierAltar.add(new AltarComponent(-1, -1, 1, AlchemicalWizardry.secondTierRunes, true, false));
|
||||
secondTierAltar.add(new AltarComponent(0, -1, 1, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
secondTierAltar.add(new AltarComponent(1, -1, 1, AlchemicalWizardry.secondTierRunes, true, false));
|
||||
secondTierAltar.add(
|
||||
new AltarComponent(
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
false));
|
||||
secondTierAltar.add(
|
||||
new AltarComponent(
|
||||
0,
|
||||
-1,
|
||||
-1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
secondTierAltar.add(
|
||||
new AltarComponent(
|
||||
1,
|
||||
-1,
|
||||
-1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
false));
|
||||
secondTierAltar.add(
|
||||
new AltarComponent(
|
||||
-1,
|
||||
-1,
|
||||
0,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
secondTierAltar.add(
|
||||
new AltarComponent(
|
||||
1,
|
||||
-1,
|
||||
0,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
secondTierAltar.add(
|
||||
new AltarComponent(
|
||||
-1,
|
||||
-1,
|
||||
1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
false));
|
||||
secondTierAltar.add(
|
||||
new AltarComponent(
|
||||
0,
|
||||
-1,
|
||||
1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
secondTierAltar.add(
|
||||
new AltarComponent(
|
||||
1,
|
||||
-1,
|
||||
1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
false));
|
||||
|
||||
thirdTierAltar.add(new AltarComponent(-1, -1, -1, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(0, -1, -1, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(1, -1, -1, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(-1, -1, 0, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(1, -1, 0, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(-1, -1, 1, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(0, -1, 1, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(1, -1, 1, AlchemicalWizardry.secondTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(-3, -1, -3, AlchemicalWizardry.thirdTierPillars, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(-3, 0, -3, AlchemicalWizardry.thirdTierPillars, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(3, -1, -3, AlchemicalWizardry.thirdTierPillars, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(3, 0, -3, AlchemicalWizardry.thirdTierPillars, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(-3, -1, 3, AlchemicalWizardry.thirdTierPillars, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(-3, 0, 3, AlchemicalWizardry.thirdTierPillars, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(3, -1, 3, AlchemicalWizardry.thirdTierPillars, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(3, 0, 3, AlchemicalWizardry.thirdTierPillars, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(-3, 1, -3, AlchemicalWizardry.thirdTierCaps, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(3, 1, -3, AlchemicalWizardry.thirdTierCaps, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(-3, 1, 3, AlchemicalWizardry.thirdTierCaps, false, false));
|
||||
thirdTierAltar.add(new AltarComponent(3, 1, 3, AlchemicalWizardry.thirdTierCaps, false, false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
0,
|
||||
-1,
|
||||
-1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
1,
|
||||
-1,
|
||||
-1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
-1,
|
||||
-1,
|
||||
0,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
1,
|
||||
-1,
|
||||
0,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
-1,
|
||||
-1,
|
||||
1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
0,
|
||||
-1,
|
||||
1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
1,
|
||||
-1,
|
||||
1,
|
||||
AlchemicalWizardry.secondTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.secondTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
-3,
|
||||
-1,
|
||||
-3,
|
||||
AlchemicalWizardry.specialAltarBlock[0].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[0].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
-3,
|
||||
0,
|
||||
-3,
|
||||
AlchemicalWizardry.specialAltarBlock[0].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[0].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
3,
|
||||
-1,
|
||||
-3,
|
||||
AlchemicalWizardry.specialAltarBlock[0].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[0].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
3,
|
||||
0,
|
||||
-3,
|
||||
AlchemicalWizardry.specialAltarBlock[0].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[0].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
-3,
|
||||
-1,
|
||||
3,
|
||||
AlchemicalWizardry.specialAltarBlock[0].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[0].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
-3,
|
||||
0,
|
||||
3,
|
||||
AlchemicalWizardry.specialAltarBlock[0].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[0].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
3,
|
||||
-1,
|
||||
3,
|
||||
AlchemicalWizardry.specialAltarBlock[0].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[0].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
3,
|
||||
0,
|
||||
3,
|
||||
AlchemicalWizardry.specialAltarBlock[0].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[0].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
-3,
|
||||
1,
|
||||
-3,
|
||||
AlchemicalWizardry.specialAltarBlock[1].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[1].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
3,
|
||||
1,
|
||||
-3,
|
||||
AlchemicalWizardry.specialAltarBlock[1].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[1].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
-3,
|
||||
1,
|
||||
3,
|
||||
AlchemicalWizardry.specialAltarBlock[1].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[1].getMeta(),
|
||||
false,
|
||||
false));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
3,
|
||||
1,
|
||||
3,
|
||||
AlchemicalWizardry.specialAltarBlock[1].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[1].getMeta(),
|
||||
false,
|
||||
false));
|
||||
|
||||
for (int i = -2; i <= 2; i++) {
|
||||
thirdTierAltar.add(new AltarComponent(3, -2, i, AlchemicalWizardry.thirdTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(-3, -2, i, AlchemicalWizardry.thirdTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(i, -2, 3, AlchemicalWizardry.thirdTierRunes, true, true));
|
||||
thirdTierAltar.add(new AltarComponent(i, -2, -3, AlchemicalWizardry.thirdTierRunes, true, true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
3,
|
||||
-2,
|
||||
i,
|
||||
AlchemicalWizardry.thirdTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.thirdTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
-3,
|
||||
-2,
|
||||
i,
|
||||
AlchemicalWizardry.thirdTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.thirdTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
i,
|
||||
-2,
|
||||
3,
|
||||
AlchemicalWizardry.thirdTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.thirdTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
thirdTierAltar.add(
|
||||
new AltarComponent(
|
||||
i,
|
||||
-2,
|
||||
-3,
|
||||
AlchemicalWizardry.thirdTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.thirdTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
}
|
||||
|
||||
fourthTierAltar.addAll(thirdTierAltar);
|
||||
|
||||
for (int i = -3; i <= 3; i++) {
|
||||
fourthTierAltar.add(new AltarComponent(5, -3, i, AlchemicalWizardry.fourthTierRunes, true, true));
|
||||
fourthTierAltar.add(new AltarComponent(-5, -3, i, AlchemicalWizardry.fourthTierRunes, true, true));
|
||||
fourthTierAltar.add(new AltarComponent(i, -3, 5, AlchemicalWizardry.fourthTierRunes, true, true));
|
||||
fourthTierAltar.add(new AltarComponent(i, -3, -5, AlchemicalWizardry.fourthTierRunes, true, true));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
5,
|
||||
-3,
|
||||
i,
|
||||
AlchemicalWizardry.fourthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.fourthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-5,
|
||||
-3,
|
||||
i,
|
||||
AlchemicalWizardry.fourthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.fourthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
i,
|
||||
-3,
|
||||
5,
|
||||
AlchemicalWizardry.fourthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.fourthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
i,
|
||||
-3,
|
||||
-5,
|
||||
AlchemicalWizardry.fourthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.fourthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
}
|
||||
for (int i = -2; i <= 1; i++) {
|
||||
fourthTierAltar.add(new AltarComponent(5, i, 5, AlchemicalWizardry.fourthTierPillars, false, false));
|
||||
fourthTierAltar.add(new AltarComponent(5, i, -5, AlchemicalWizardry.fourthTierPillars, false, false));
|
||||
fourthTierAltar.add(new AltarComponent(-5, i, -5, AlchemicalWizardry.fourthTierPillars, false, false));
|
||||
fourthTierAltar.add(new AltarComponent(-5, i, 5, AlchemicalWizardry.fourthTierPillars, false, false));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
5,
|
||||
i,
|
||||
5,
|
||||
AlchemicalWizardry.specialAltarBlock[2].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[2].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
5,
|
||||
i,
|
||||
-5,
|
||||
AlchemicalWizardry.specialAltarBlock[2].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[2].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-5,
|
||||
i,
|
||||
-5,
|
||||
AlchemicalWizardry.specialAltarBlock[2].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[2].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-5,
|
||||
i,
|
||||
5,
|
||||
AlchemicalWizardry.specialAltarBlock[2].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[2].getMeta(),
|
||||
false,
|
||||
false));
|
||||
}
|
||||
fourthTierAltar.add(new AltarComponent(5, 2, 5, AlchemicalWizardry.fourthTierCaps, false, false));
|
||||
fourthTierAltar.add(new AltarComponent(5, 2, -5, AlchemicalWizardry.fourthTierCaps, false, false));
|
||||
fourthTierAltar.add(new AltarComponent(-5, 2, -5, AlchemicalWizardry.fourthTierCaps, false, false));
|
||||
fourthTierAltar.add(new AltarComponent(-5, 2, 5, AlchemicalWizardry.fourthTierCaps, false, false));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
5,
|
||||
2,
|
||||
5,
|
||||
AlchemicalWizardry.specialAltarBlock[3].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[3].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
5,
|
||||
2,
|
||||
-5,
|
||||
AlchemicalWizardry.specialAltarBlock[3].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[3].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-5,
|
||||
2,
|
||||
-5,
|
||||
AlchemicalWizardry.specialAltarBlock[3].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[3].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fourthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-5,
|
||||
2,
|
||||
5,
|
||||
AlchemicalWizardry.specialAltarBlock[3].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[3].getMeta(),
|
||||
false,
|
||||
false));
|
||||
|
||||
fifthTierAltar.addAll(fourthTierAltar);
|
||||
fifthTierAltar.add(new AltarComponent(-8, -3, 8, AlchemicalWizardry.fifthTierBeacons, false, false));
|
||||
fifthTierAltar.add(new AltarComponent(-8, -3, -8, AlchemicalWizardry.fifthTierBeacons, false, false));
|
||||
fifthTierAltar.add(new AltarComponent(8, -3, -8, AlchemicalWizardry.fifthTierBeacons, false, false));
|
||||
fifthTierAltar.add(new AltarComponent(8, -3, 8, AlchemicalWizardry.fifthTierBeacons, false, false));
|
||||
fifthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-8,
|
||||
-3,
|
||||
8,
|
||||
AlchemicalWizardry.specialAltarBlock[4].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[4].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fifthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-8,
|
||||
-3,
|
||||
-8,
|
||||
AlchemicalWizardry.specialAltarBlock[4].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[4].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fifthTierAltar.add(
|
||||
new AltarComponent(
|
||||
8,
|
||||
-3,
|
||||
-8,
|
||||
AlchemicalWizardry.specialAltarBlock[4].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[4].getMeta(),
|
||||
false,
|
||||
false));
|
||||
fifthTierAltar.add(
|
||||
new AltarComponent(
|
||||
8,
|
||||
-3,
|
||||
8,
|
||||
AlchemicalWizardry.specialAltarBlock[4].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[4].getMeta(),
|
||||
false,
|
||||
false));
|
||||
for (int i = -6; i <= 6; i++) {
|
||||
fifthTierAltar.add(new AltarComponent(8, -4, i, AlchemicalWizardry.fifthTierRunes, true, true));
|
||||
fifthTierAltar.add(new AltarComponent(-8, -4, i, AlchemicalWizardry.fifthTierRunes, true, true));
|
||||
fifthTierAltar.add(new AltarComponent(i, -4, 8, AlchemicalWizardry.fifthTierRunes, true, true));
|
||||
fifthTierAltar.add(new AltarComponent(i, -4, -8, AlchemicalWizardry.fifthTierRunes, true, true));
|
||||
fifthTierAltar.add(
|
||||
new AltarComponent(
|
||||
8,
|
||||
-4,
|
||||
i,
|
||||
AlchemicalWizardry.fifthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.fifthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
fifthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-8,
|
||||
-4,
|
||||
i,
|
||||
AlchemicalWizardry.fifthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.fifthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
fifthTierAltar.add(
|
||||
new AltarComponent(
|
||||
i,
|
||||
-4,
|
||||
8,
|
||||
AlchemicalWizardry.fifthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.fifthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
fifthTierAltar.add(
|
||||
new AltarComponent(
|
||||
i,
|
||||
-4,
|
||||
-8,
|
||||
AlchemicalWizardry.fifthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.fifthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
}
|
||||
|
||||
sixthTierAltar.addAll(fifthTierAltar);
|
||||
for (int i = -4; i <= 2; i++) {
|
||||
sixthTierAltar.add(new AltarComponent(11, i, 11, AlchemicalWizardry.sixthTierPillars, false, false));
|
||||
sixthTierAltar.add(new AltarComponent(-11, i, -11, AlchemicalWizardry.sixthTierPillars, false, false));
|
||||
sixthTierAltar.add(new AltarComponent(11, i, -11, AlchemicalWizardry.sixthTierPillars, false, false));
|
||||
sixthTierAltar.add(new AltarComponent(-11, i, 11, AlchemicalWizardry.sixthTierPillars, false, false));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
11,
|
||||
i,
|
||||
11,
|
||||
AlchemicalWizardry.specialAltarBlock[5].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[5].getMeta(),
|
||||
false,
|
||||
false));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-11,
|
||||
i,
|
||||
-11,
|
||||
AlchemicalWizardry.specialAltarBlock[5].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[5].getMeta(),
|
||||
false,
|
||||
false));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
11,
|
||||
i,
|
||||
-11,
|
||||
AlchemicalWizardry.specialAltarBlock[5].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[5].getMeta(),
|
||||
false,
|
||||
false));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-11,
|
||||
i,
|
||||
11,
|
||||
AlchemicalWizardry.specialAltarBlock[5].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[5].getMeta(),
|
||||
false,
|
||||
false));
|
||||
}
|
||||
sixthTierAltar.add(new AltarComponent(11, 3, 11, AlchemicalWizardry.sixthTierCaps, false, false));
|
||||
sixthTierAltar.add(new AltarComponent(-11, 3, -11, AlchemicalWizardry.sixthTierCaps, false, false));
|
||||
sixthTierAltar.add(new AltarComponent(11, 3, -11, AlchemicalWizardry.sixthTierCaps, false, false));
|
||||
sixthTierAltar.add(new AltarComponent(-11, 3, 11, AlchemicalWizardry.sixthTierCaps, false, false));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
11,
|
||||
3,
|
||||
11,
|
||||
AlchemicalWizardry.specialAltarBlock[6].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[6].getMeta(),
|
||||
false,
|
||||
false));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-11,
|
||||
3,
|
||||
-11,
|
||||
AlchemicalWizardry.specialAltarBlock[6].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[6].getMeta(),
|
||||
false,
|
||||
false));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
11,
|
||||
3,
|
||||
-11,
|
||||
AlchemicalWizardry.specialAltarBlock[6].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[6].getMeta(),
|
||||
false,
|
||||
false));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-11,
|
||||
3,
|
||||
11,
|
||||
AlchemicalWizardry.specialAltarBlock[6].getBlock(),
|
||||
AlchemicalWizardry.specialAltarBlock[6].getMeta(),
|
||||
false,
|
||||
false));
|
||||
for (int i = -9; i <= 9; i++) {
|
||||
sixthTierAltar.add(new AltarComponent(11, -5, i, AlchemicalWizardry.sixthTierRunes, true, true));
|
||||
sixthTierAltar.add(new AltarComponent(-11, -5, i, AlchemicalWizardry.sixthTierRunes, true, true));
|
||||
sixthTierAltar.add(new AltarComponent(i, -5, 11, AlchemicalWizardry.sixthTierRunes, true, true));
|
||||
sixthTierAltar.add(new AltarComponent(i, -5, -11, AlchemicalWizardry.sixthTierRunes, true, true));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
11,
|
||||
-5,
|
||||
i,
|
||||
AlchemicalWizardry.sixthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.sixthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
-11,
|
||||
-5,
|
||||
i,
|
||||
AlchemicalWizardry.sixthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.sixthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
i,
|
||||
-5,
|
||||
11,
|
||||
AlchemicalWizardry.sixthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.sixthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
sixthTierAltar.add(
|
||||
new AltarComponent(
|
||||
i,
|
||||
-5,
|
||||
-11,
|
||||
AlchemicalWizardry.sixthTierRunes[0].getBlock(),
|
||||
AlchemicalWizardry.sixthTierRunes[0].getMeta(),
|
||||
true,
|
||||
true));
|
||||
}
|
||||
}
|
||||
|
||||
public static List<AltarComponent> getAltarUpgradeListForTier(int tier) {
|
||||
return switch (tier) {
|
||||
case 2 -> secondTierAltar;
|
||||
case 3 -> thirdTierAltar;
|
||||
case 4 -> fourthTierAltar;
|
||||
case 5 -> fifthTierAltar;
|
||||
case 6 -> sixthTierAltar;
|
||||
default -> null;
|
||||
};
|
||||
switch (tier) {
|
||||
case 2:
|
||||
return secondTierAltar;
|
||||
|
||||
case 3:
|
||||
return thirdTierAltar;
|
||||
|
||||
case 4:
|
||||
return fourthTierAltar;
|
||||
|
||||
case 5:
|
||||
return fifthTierAltar;
|
||||
|
||||
case 6:
|
||||
return sixthTierAltar;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -69,15 +69,15 @@ public class CommandSN extends CommandBase {
|
||||
func_152373_a(icommandsender, this, "commands.soulnetwork.get.success", currentEssence, owner);
|
||||
} else if ("fillMax".equalsIgnoreCase(astring[1])) {
|
||||
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
|
||||
int maxForUser = SoulNetworkHandler.getMaxEssence(owner);
|
||||
int fillAmount = maxForUser - currentEssence;
|
||||
int orbTier = SoulNetworkHandler.getCurrentMaxOrb(owner);
|
||||
int maxForOrb = SoulNetworkHandler.getMaximumForOrbTier(orbTier);
|
||||
int fillAmount = maxForOrb - currentEssence;
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(owner, fillAmount, fillAmount);
|
||||
func_152373_a(icommandsender, this, "commands.soulnetwork.fillMax.success", owner);
|
||||
} else if ("create".equalsIgnoreCase(astring[1])) {
|
||||
int desiredCapacity = parseInt(icommandsender, astring[2]);
|
||||
SoulNetworkHandler.setMaxEssenceToMax(proxyPlayerName.getDisplayName(), desiredCapacity);
|
||||
int actualCapacity = SoulNetworkHandler.getMaxEssence(proxyPlayerName.getDisplayName());
|
||||
func_152373_a(icommandsender, this, "commands.soulnetwork.create.success", owner, actualCapacity);
|
||||
int orbTier = parseIntBounded(icommandsender, astring[2], 1, 6);
|
||||
SoulNetworkHandler.setMaxOrbToMax(proxyPlayerName.getDisplayName(), orbTier);
|
||||
func_152373_a(icommandsender, this, "commands.soulnetwork.create.success", owner, orbTier);
|
||||
} else {
|
||||
throw new CommandException("commands.soulnetwork.notACommand");
|
||||
}
|
||||
|
||||
+6
-4
@@ -85,8 +85,9 @@ public class SubCommandNetwork extends SubCommandBase {
|
||||
if (args.length == 3) {
|
||||
if (isInteger(args[2])) {
|
||||
int amount = Integer.parseInt(args[2]);
|
||||
int maxEssence = SoulNetworkHandler.getMaxEssence(givenName);
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(givenName, amount, maxEssence);
|
||||
int maxOrb = SoulNetworkHandler
|
||||
.getMaximumForOrbTier(SoulNetworkHandler.getCurrentMaxOrb(givenName));
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(givenName, amount, maxOrb);
|
||||
displaySuccessString(commandSender, "commands.network.add.success", amount, givenName);
|
||||
} else {
|
||||
displayErrorString(commandSender, "commands.error.arg.invalid");
|
||||
@@ -151,8 +152,9 @@ public class SubCommandNetwork extends SubCommandBase {
|
||||
}
|
||||
|
||||
if (args.length > 1) {
|
||||
int maxEssence = SoulNetworkHandler.getMaxEssence(givenName);
|
||||
SoulNetworkHandler.setCurrentEssence(givenName, maxEssence);
|
||||
int maxOrb = SoulNetworkHandler
|
||||
.getMaximumForOrbTier(SoulNetworkHandler.getCurrentMaxOrb(givenName));
|
||||
SoulNetworkHandler.setCurrentEssence(givenName, maxOrb);
|
||||
displaySuccessString(commandSender, "commands.network.cap.success", givenName);
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -3,7 +3,6 @@ package WayofTime.alchemicalWizardry.common.demonVillage.tileEntity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityChest;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.Int3;
|
||||
|
||||
@@ -13,7 +12,7 @@ public class TEDemonChest extends TileEntityChest implements ITilePortalNode {
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return StatCollector.translateToLocal("gui.demonChest.title");
|
||||
return "Demon's Chest";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,12 +7,16 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -44,13 +48,51 @@ public class ActivationCrystal extends EnergyItems {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List,
|
||||
boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
switch (par1ItemStack.getItemDamage()) {
|
||||
case 0 -> par3List.add(StatCollector.translateToLocal("tooltip.activationcrystal.lowlevelrituals"));
|
||||
case 1 -> par3List.add(StatCollector.translateToLocal("tooltip.activationcrystal.powerfulrituals"));
|
||||
case 2 -> par3List.add(StatCollector.translateToLocal("tooltip.activationcrystal.creativeonly"));
|
||||
case 0: {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.activationcrystal.lowlevelrituals"));
|
||||
break;
|
||||
}
|
||||
|
||||
case 1: {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.activationcrystal.powerfulrituals"));
|
||||
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack);
|
||||
|
||||
if (recipe != null) {
|
||||
par3List.add(
|
||||
EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe"));
|
||||
|
||||
for (ItemStack item : recipe) {
|
||||
if (item != null) {
|
||||
par3List.add("" + item.getDisplayName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
par3List.add(
|
||||
"-" + StatCollector.translateToLocal("tooltip.alchemy.press")
|
||||
+ " "
|
||||
+ EnumChatFormatting.BLUE
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.shift")
|
||||
+ EnumChatFormatting.GRAY
|
||||
+ " "
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.forrecipe")
|
||||
+ "-");
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 2: {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.activationcrystal.creativeonly"));
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class AirScribeTool extends ScribeTool {
|
||||
|
||||
public AirScribeTool() {
|
||||
super(4);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:AirScribeTool");
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,7 @@ public class BoundAxe extends ItemAxe implements IBindable {
|
||||
this.damageVsEntity = 5;
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
setEnergyUsed(5);
|
||||
this.setHarvestLevel("axe", 7);
|
||||
this.setHarvestLevel("axe", 5);
|
||||
}
|
||||
|
||||
public void setEnergyUsed(int i) {
|
||||
|
||||
@@ -28,7 +28,6 @@ import WayofTime.alchemicalWizardry.common.ItemType;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import gregtech.common.blocks.GTBlockOre;
|
||||
|
||||
public class BoundPickaxe extends ItemPickaxe implements IBindable {
|
||||
|
||||
@@ -51,7 +50,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable {
|
||||
this.damageVsEntity = 5;
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setEnergyUsed(5);
|
||||
setHarvestLevel("pickaxe", 7);
|
||||
setHarvestLevel("pickaxe", 5);
|
||||
}
|
||||
|
||||
public void setEnergyUsed(int i) {
|
||||
@@ -119,20 +118,8 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable {
|
||||
.canSilkHarvest(par2World, par3EntityPlayer, posX + i, posY + j, posZ + k, meta)) {
|
||||
dropMultiset.add(new ItemType(block, meta));
|
||||
} else {
|
||||
ArrayList<ItemStack> itemDropList;
|
||||
if (AlchemicalWizardry.isGregTechLoaded && block instanceof GTBlockOre) {
|
||||
itemDropList = ((GTBlockOre) block).getDropsForPlayer(
|
||||
par2World,
|
||||
posX + i,
|
||||
posY + j,
|
||||
posZ + k,
|
||||
meta,
|
||||
fortuneLvl,
|
||||
par3EntityPlayer);
|
||||
} else {
|
||||
itemDropList = block
|
||||
.getDrops(par2World, posX + i, posY + j, posZ + k, meta, fortuneLvl);
|
||||
}
|
||||
ArrayList<ItemStack> itemDropList = block
|
||||
.getDrops(par2World, posX + i, posY + j, posZ + k, meta, fortuneLvl);
|
||||
|
||||
if (itemDropList != null) {
|
||||
for (ItemStack stack : itemDropList)
|
||||
|
||||
@@ -51,7 +51,7 @@ public class BoundShovel extends ItemSpade implements IBindable {
|
||||
this.damageVsEntity = 5;
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
setEnergyUsed(5);
|
||||
setHarvestLevel("shovel", 7);
|
||||
setHarvestLevel("shovel", 5);
|
||||
}
|
||||
|
||||
public void setEnergyUsed(int i) {
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class DawnScribeTool extends ScribeTool {
|
||||
|
||||
public DawnScribeTool() {
|
||||
super(6);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DawnScribeTool");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class DuskScribeTool extends ScribeTool {
|
||||
|
||||
public DuskScribeTool() {
|
||||
super(5);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DuskScribeTool");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class EarthScribeTool extends ScribeTool {
|
||||
|
||||
public EarthScribeTool() {
|
||||
super(3);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:EarthScribeTool");
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,6 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.energybattery.desc"));
|
||||
par3List.add(StatCollector.translateToLocalFormatted("tooltip.energybattery.capacity", this.getMaxEssence()));
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
|
||||
@@ -71,11 +71,15 @@ public class EnergyBlast extends EnergyItems {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
|
||||
if (IBindable.isActive(stack)) {
|
||||
return switch (this.tier) {
|
||||
case 2 -> this.activeIconTier2;
|
||||
case 3 -> this.activeIconTier3;
|
||||
default -> this.activeIcon;
|
||||
};
|
||||
switch (this.tier) {
|
||||
case 1:
|
||||
return this.activeIcon;
|
||||
case 2:
|
||||
return this.activeIconTier2;
|
||||
case 3:
|
||||
return this.activeIconTier3;
|
||||
}
|
||||
return this.activeIcon;
|
||||
} else {
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
||||
@@ -133,26 +133,25 @@ public class EnergyItems extends Item implements IBindable {
|
||||
}
|
||||
|
||||
public static boolean canSyphonInContainer(ItemStack ist, int damageToBeDone) {
|
||||
if (!(ist.getItem() instanceof IBindable)) {
|
||||
return false;
|
||||
if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) {
|
||||
String ownerName = ist.getTagCompound().getString("ownerName");
|
||||
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null) {
|
||||
data = new LifeEssenceNetwork(ownerName);
|
||||
world.setItemData(ownerName, data);
|
||||
}
|
||||
|
||||
return data.currentEssence >= damageToBeDone;
|
||||
}
|
||||
|
||||
String ownerName = IBindable.getOwnerName(ist);
|
||||
MinecraftServer server = MinecraftServer.getServer();
|
||||
|
||||
if (ownerName.isEmpty() || server == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
World world = server.worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null) {
|
||||
data = new LifeEssenceNetwork(ownerName);
|
||||
world.setItemData(ownerName, data);
|
||||
}
|
||||
|
||||
return data.currentEssence >= damageToBeDone;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void hurtPlayer(EntityPlayer user, int energySyphoned) {
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class FireScribeTool extends ScribeTool {
|
||||
|
||||
public FireScribeTool() {
|
||||
super(2);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:FireScribeTool");
|
||||
}
|
||||
}
|
||||
@@ -7,11 +7,16 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -41,15 +46,43 @@ public class ItemAlchemyBase extends Item {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List,
|
||||
boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.alchemy.usedinalchemy"));
|
||||
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack);
|
||||
|
||||
if (recipe != null) {
|
||||
par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe"));
|
||||
|
||||
for (ItemStack item : recipe) {
|
||||
if (item != null) {
|
||||
par3List.add("" + item.getDisplayName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
par3List.add(
|
||||
"-" + StatCollector.translateToLocal("tooltip.alchemy.press")
|
||||
+ " "
|
||||
+ EnumChatFormatting.BLUE
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.shift")
|
||||
+ EnumChatFormatting.GRAY
|
||||
+ " "
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.forrecipe")
|
||||
+ "-");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack) {
|
||||
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ITEM_NAMES.length - 1);
|
||||
return ("item.bloodMagicAlchemyItem." + ITEM_NAMES[meta]);
|
||||
return ("" + "item.bloodMagicAlchemyItem." + ITEM_NAMES[meta]);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -61,7 +94,7 @@ public class ItemAlchemyBase extends Item {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item id, CreativeTabs creativeTab, List<ItemStack> list) {
|
||||
public void getSubItems(Item id, CreativeTabs creativeTab, List list) {
|
||||
for (int meta = 0; meta < ITEM_NAMES.length; ++meta) {
|
||||
list.add(new ItemStack(id, 1, meta));
|
||||
}
|
||||
|
||||
@@ -142,9 +142,6 @@ public class ItemIncense extends Item implements IIncense {
|
||||
ItemStack quartzStack = new ItemStack(Items.quartz, 1, WILDCARD);
|
||||
ItemStack blazePowderStack = new ItemStack(Items.blaze_powder);
|
||||
ItemStack netherwartStack = new ItemStack(Items.nether_wart);
|
||||
|
||||
ItemStack blankSlateStack = new ItemStack(ModItems.blankSlate);
|
||||
ItemStack reinforcedSlateStack = new ItemStack(ModItems.reinforcedSlate);
|
||||
ItemStack fracturedBoneStack = new ItemStack(ModItems.baseAlchemyItems, 1, 5);
|
||||
|
||||
ItemStack woodashStack = new ItemStack(ModItems.itemIncense, 1, 0);
|
||||
@@ -159,7 +156,7 @@ public class ItemIncense extends Item implements IIncense {
|
||||
new ItemStack(Items.redstone),
|
||||
leavesStack,
|
||||
leavesStack,
|
||||
new ItemStack(ModItems.weakBloodOrb)));
|
||||
new ItemStack(ModItems.apprenticeBloodOrb)));
|
||||
GameRegistry.addRecipe(
|
||||
new ShapelessBloodOrbRecipe(
|
||||
new ItemStack(ModItems.itemIncense, 1, 2),
|
||||
@@ -171,7 +168,7 @@ public class ItemIncense extends Item implements IIncense {
|
||||
glowstoneStack,
|
||||
stringStack,
|
||||
stringStack,
|
||||
new ItemStack(ModItems.apprenticeBloodOrb)));
|
||||
new ItemStack(ModItems.magicianBloodOrb)));
|
||||
GameRegistry.addRecipe(
|
||||
new ShapelessBloodOrbRecipe(
|
||||
new ItemStack(ModItems.itemIncense, 1, 3),
|
||||
@@ -181,8 +178,7 @@ public class ItemIncense extends Item implements IIncense {
|
||||
soulSandStack,
|
||||
gunpowderStack,
|
||||
fermentedEyeStack,
|
||||
blankSlateStack,
|
||||
new ItemStack(ModItems.apprenticeBloodOrb)));
|
||||
new ItemStack(ModItems.masterBloodOrb)));
|
||||
GameRegistry.addRecipe(
|
||||
new ShapelessBloodOrbRecipe(
|
||||
new ItemStack(ModItems.itemIncense, 1, 4),
|
||||
@@ -193,17 +189,17 @@ public class ItemIncense extends Item implements IIncense {
|
||||
netherwartStack,
|
||||
blazePowderStack,
|
||||
fracturedBoneStack,
|
||||
reinforcedSlateStack,
|
||||
new ItemStack(ModItems.magicianBloodOrb)));
|
||||
goldNuggetStack,
|
||||
new ItemStack(ModItems.archmageBloodOrb)));
|
||||
}
|
||||
|
||||
public enum EnumIncense {
|
||||
|
||||
WOODASH(0, 400, 1.0f, 2000, 0.937f, 0.898f, 0.820f),
|
||||
RED(400, 800, 1.5f, 2000, 1.0f, 0, 0),
|
||||
BLUE(800, 1500, 3.0f, 2000, 0, 0, 1.0f),
|
||||
GREEN(1500, 2400, 4.0f, 2000, 0, 1.0f, 0),
|
||||
PURPLE(2400, 3500, 5.0f, 2000, 1.0f, 0, 1.0f);
|
||||
WOODASH(0, 200, 1.0f, 1000, 0.937f, 0.898f, 0.820f),
|
||||
RED(200, 600, 1.5f, 1000, 1.0f, 0, 0),
|
||||
BLUE(600, 1200, 3.0f, 1000, 0, 0, 1.0f),
|
||||
GREEN(1200, 2000, 4.0f, 1000, 0, 1.0f, 0),
|
||||
PURPLE(2000, 3000, 5.0f, 1000, 1.0f, 0, 1.0f);
|
||||
|
||||
public final int minValue;
|
||||
public final int maxValue;
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ItemRitualDismantler extends EnergyItems {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List par3List, boolean x) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.dismantler.desc"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.dismatler.desc"));
|
||||
addBindingInformation(stack, par3List);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,68 +2,44 @@ package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
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.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ScribeTool extends EnergyItems {
|
||||
|
||||
private final int meta;
|
||||
private final String iconName;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon icon;
|
||||
private int meta;
|
||||
|
||||
public ScribeTool(int inkType) {
|
||||
this(inkType, "unknown");
|
||||
}
|
||||
|
||||
public ScribeTool(int inkType, String iconName) {
|
||||
super();
|
||||
this.meta = inkType;
|
||||
this.iconName = iconName;
|
||||
setMaxStackSize(1);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
setMaxDamage(10);
|
||||
setEnergyUsed(10);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.meta = inkType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.scribetool.desc"));
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
if (IBindable.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) {
|
||||
if (par1ItemStack.getItemDamage() > 0) {
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getItemDamage() - 1);
|
||||
}
|
||||
}
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return this.meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> list, boolean sneaking) {
|
||||
list.add(StatCollector.translateToLocal("tooltip.scribetool.desc"));
|
||||
addBindingInformation(stack, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
if (IBindable.checkAndSetItemOwner(stack, player) && stack.getItemDamage() > 0
|
||||
&& EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) {
|
||||
stack.setItemDamage(stack.getItemDamage() - 1);
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister register) {
|
||||
this.icon = register.registerIcon("AlchemicalWizardry:" + iconName);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int damage) {
|
||||
return this.icon;
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class TelepositionFocus extends EnergyItems {
|
||||
|
||||
private final int focusLevel;
|
||||
private int focusLevel;
|
||||
|
||||
public TelepositionFocus(int focusLevel) {
|
||||
super();
|
||||
@@ -33,8 +33,7 @@ public class TelepositionFocus extends EnergyItems {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List,
|
||||
boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.telepositionfocus.desc"));
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
|
||||
@@ -51,12 +50,20 @@ public class TelepositionFocus extends EnergyItems {
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
IBindable.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
|
||||
if (IBindable.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) {
|
||||
if (par3EntityPlayer.isSneaking()) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
}
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
public int getDimensionID(ItemStack itemStack) {
|
||||
return IBindable.getTag(itemStack).getInteger("dimensionId");
|
||||
if (itemStack.getTagCompound() == null) {
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
return itemStack.getTagCompound().getInteger("dimensionId");
|
||||
}
|
||||
|
||||
public World getWorld(ItemStack itemStack) {
|
||||
@@ -65,15 +72,27 @@ public class TelepositionFocus extends EnergyItems {
|
||||
}
|
||||
|
||||
public int xCoord(ItemStack itemStack) {
|
||||
return IBindable.getTag(itemStack).getInteger("xCoord");
|
||||
if (!(itemStack.getTagCompound() == null)) {
|
||||
return itemStack.getTagCompound().getInteger("xCoord");
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public int yCoord(ItemStack itemStack) {
|
||||
return IBindable.getTag(itemStack).getInteger("yCoord");
|
||||
if (!(itemStack.getTagCompound() == null)) {
|
||||
return itemStack.getTagCompound().getInteger("yCoord");
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public int zCoord(ItemStack itemStack) {
|
||||
return IBindable.getTag(itemStack).getInteger("zCoord");
|
||||
if (!(itemStack.getTagCompound() == null)) {
|
||||
return itemStack.getTagCompound().getInteger("zCoord");
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public int getFocusLevel() {
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class WaterScribeTool extends ScribeTool {
|
||||
|
||||
public WaterScribeTool() {
|
||||
super(1);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WaterScribeTool");
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,6 @@ import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ILPGauge;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilDivination;
|
||||
@@ -34,8 +33,6 @@ 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 gregtech.api.hazards.Hazard;
|
||||
import gregtech.api.hazards.IHazardProtector;
|
||||
import thaumcraft.api.IGoggles;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.nodes.IRevealer;
|
||||
@@ -43,10 +40,9 @@ import thaumcraft.api.nodes.IRevealer;
|
||||
@Optional.InterfaceList(
|
||||
value = { @Interface(iface = "thaumcraft.api.nodes.IRevealer", modid = "Thaumcraft"),
|
||||
@Interface(iface = "thaumcraft.api.IGoggles", modid = "Thaumcraft"),
|
||||
@Interface(iface = "thaumcraft.api.IRunicArmor", modid = "Thaumcraft"),
|
||||
@Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh") })
|
||||
public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialArmor, IBindable, IRevealer, IGoggles,
|
||||
IRunicArmor, ILPGauge, IHazardProtector {
|
||||
@Interface(iface = "thaumcraft.api.IRunicArmor", modid = "Thaumcraft") })
|
||||
public class BoundArmour extends ItemArmor
|
||||
implements IAlchemyGoggles, ISpecialArmor, IBindable, IRevealer, IGoggles, IRunicArmor, ILPGauge {
|
||||
|
||||
private static int invSize = 9;
|
||||
|
||||
@@ -609,17 +605,29 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
|
||||
}
|
||||
|
||||
for (ItemStack item : inv) {
|
||||
if (item == null || !(item.getItem() instanceof IBloodOrb orb)) {
|
||||
if (item == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
return switch (orb.getOrbLevel()) {
|
||||
case 1 -> 0.75f;
|
||||
case 2 -> 0.50f;
|
||||
case 3 -> 0.25f;
|
||||
case 4, 5, 6 -> 0;
|
||||
default -> 1;
|
||||
};
|
||||
if (item.getItem().equals(ModItems.weakBloodOrb)) {
|
||||
return 0.75f;
|
||||
}
|
||||
|
||||
if (item.getItem().equals(ModItems.apprenticeBloodOrb)) {
|
||||
return 0.50f;
|
||||
}
|
||||
|
||||
if (item.getItem().equals(ModItems.magicianBloodOrb)) {
|
||||
return 0.25f;
|
||||
}
|
||||
|
||||
if (item.getItem().equals(ModItems.masterBloodOrb)) {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
if (item.getItem().equals(ModItems.archmageBloodOrb)) {
|
||||
return 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
return 1.0f;
|
||||
@@ -743,11 +751,4 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// GT5 Hazmat protection
|
||||
@Optional.Method(modid = "gregtech_nh")
|
||||
@Override
|
||||
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+43
-118
@@ -60,9 +60,6 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.attunedcrystal.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.attunedcrystal.desc2"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.attunedcrystal.desc3"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.attunedcrystal.desc4"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.attunedcrystal.desc5"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
Reagent reagent = this.getReagent(par1ItemStack);
|
||||
@@ -127,11 +124,13 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(ItemStack stack, int pass) {
|
||||
return switch (pass) {
|
||||
case 0 -> this.crystalBody;
|
||||
case 1 -> this.crystalLabel;
|
||||
default -> this.itemIcon;
|
||||
};
|
||||
switch (pass) {
|
||||
case 0:
|
||||
return this.crystalBody;
|
||||
case 1:
|
||||
return this.crystalLabel;
|
||||
}
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -145,10 +144,6 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator {
|
||||
if (movingobjectposition == null) {
|
||||
if (player.isSneaking()) {
|
||||
this.setHasSavedCoordinates(itemStack, false);
|
||||
if (!itemStack.hasTagCompound()) {
|
||||
itemStack.setTagCompound(new net.minecraft.nbt.NBTTagCompound());
|
||||
}
|
||||
itemStack.getTagCompound().setString("reagent", "");
|
||||
player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.clearing"));
|
||||
}
|
||||
|
||||
@@ -168,101 +163,35 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator {
|
||||
IReagentHandler relay = (IReagentHandler) tile;
|
||||
|
||||
if (player.isSneaking()) {
|
||||
if (this.getHasSavedCoordinates(itemStack)) {
|
||||
Int3 coords = this.getCoordinates(itemStack);
|
||||
int dimension = this.getDimension(itemStack);
|
||||
|
||||
if (coords == null) {
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
// Sneak+right-click saved source block again → clear all of reagent's connections
|
||||
if (coords.xCoord == x && coords.yCoord == y && coords.zCoord == z) {
|
||||
TileEntity pastTile = world.getTileEntity(coords.xCoord, coords.yCoord, coords.zCoord);
|
||||
if (!(pastTile instanceof TEReagentConduit)) {
|
||||
player.addChatComponentMessage(
|
||||
new ChatComponentTranslation("message.attunedcrystal.error.cannotfind"));
|
||||
return itemStack;
|
||||
}
|
||||
Reagent reagent = this.getReagent(itemStack);
|
||||
if (reagent == null) {
|
||||
player.addChatComponentMessage(
|
||||
new ChatComponentTranslation("message.attunedcrystal.error.noreagent"));
|
||||
return itemStack;
|
||||
}
|
||||
TEReagentConduit pastRelay = (TEReagentConduit) pastTile;
|
||||
pastRelay.reagentTargetList.remove(reagent);
|
||||
this.setHasSavedCoordinates(itemStack, false);
|
||||
player.addChatComponentMessage(
|
||||
new ChatComponentTranslation(
|
||||
"message.attunedcrystal.clearedreagent",
|
||||
reagent.name));
|
||||
world.markBlockForUpdate(coords.xCoord, coords.yCoord, coords.zCoord);
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
if (dimension != world.provider.dimensionId || Math.abs(coords.xCoord - x) > maxDistance
|
||||
|| Math.abs(coords.yCoord - y) > maxDistance
|
||||
|| Math.abs(coords.zCoord - z) > maxDistance) {
|
||||
player.addChatComponentMessage(
|
||||
new ChatComponentTranslation("message.attunedcrystal.error.toofar"));
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
TileEntity pastTile = world.getTileEntity(coords.xCoord, coords.yCoord, coords.zCoord);
|
||||
if (!(pastTile instanceof TEReagentConduit)) {
|
||||
player.addChatComponentMessage(
|
||||
new ChatComponentTranslation("message.attunedcrystal.error.cannotfind"));
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
Reagent reagent = this.getReagent(itemStack);
|
||||
if (reagent == null) {
|
||||
player.addChatComponentMessage(
|
||||
new ChatComponentTranslation("message.attunedcrystal.error.noreagent"));
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
TEReagentConduit pastRelay = (TEReagentConduit) pastTile;
|
||||
boolean removed = pastRelay.removeReagentDestinationViaActual(reagent, x, y, z);
|
||||
player.addChatComponentMessage(
|
||||
new ChatComponentTranslation(
|
||||
removed ? "message.attunedcrystal.removed"
|
||||
: "message.attunedcrystal.error.notremoved"));
|
||||
world.markBlockForUpdate(coords.xCoord, coords.yCoord, coords.zCoord);
|
||||
} else {
|
||||
// No saved coords → cycle reagent selection
|
||||
ReagentContainerInfo[] infos = relay.getContainerInfo(ForgeDirection.UNKNOWN);
|
||||
if (infos != null) {
|
||||
List<Reagent> reagentList = new LinkedList();
|
||||
for (ReagentContainerInfo info : infos) {
|
||||
if (info != null) {
|
||||
ReagentStack reagentStack = info.reagent;
|
||||
if (reagentStack != null) {
|
||||
Reagent reagent = reagentStack.reagent;
|
||||
if (reagent != null) {
|
||||
reagentList.add(reagent);
|
||||
}
|
||||
ReagentContainerInfo[] infos = relay.getContainerInfo(ForgeDirection.UNKNOWN);
|
||||
if (infos != null) {
|
||||
List<Reagent> reagentList = new LinkedList();
|
||||
for (ReagentContainerInfo info : infos) {
|
||||
if (info != null) {
|
||||
ReagentStack reagentStack = info.reagent;
|
||||
if (reagentStack != null) {
|
||||
Reagent reagent = reagentStack.reagent;
|
||||
if (reagent != null) {
|
||||
reagentList.add(reagent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reagent pastReagent = this.getReagent(itemStack);
|
||||
Reagent pastReagent = this.getReagent(itemStack);
|
||||
|
||||
if (reagentList.size() <= 0) {
|
||||
return itemStack;
|
||||
}
|
||||
if (reagentList.size() <= 0) {
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
int reagentLocation = reagentList.indexOf(pastReagent);
|
||||
int reagentLocation;
|
||||
|
||||
if (reagentLocation == -1 || reagentLocation + 1 >= reagentList.size()) {
|
||||
this.setReagentWithNotification(itemStack, reagentList.get(0), player);
|
||||
} else {
|
||||
this.setReagentWithNotification(
|
||||
itemStack,
|
||||
reagentList.get(reagentLocation + 1),
|
||||
player);
|
||||
}
|
||||
reagentLocation = reagentList.indexOf(pastReagent);
|
||||
|
||||
if (reagentLocation == -1 || reagentLocation + 1 >= reagentList.size()) {
|
||||
this.setReagentWithNotification(itemStack, reagentList.get(0), player);
|
||||
} else {
|
||||
this.setReagentWithNotification(itemStack, reagentList.get(reagentLocation + 1), player);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -290,28 +219,25 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator {
|
||||
}
|
||||
|
||||
Reagent reagent = this.getReagent(itemStack);
|
||||
|
||||
if (reagent == null) {
|
||||
player.addChatComponentMessage(
|
||||
new ChatComponentTranslation("message.attunedcrystal.error.noreagent"));
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
TEReagentConduit pastRelay = (TEReagentConduit) pastTile;
|
||||
if (pastRelay.hasReagentDestination(reagent, x, y, z)) {
|
||||
player.addChatComponentMessage(
|
||||
new ChatComponentTranslation("message.attunedcrystal.error.duplicate"));
|
||||
} else if (pastRelay.addReagentDestinationViaActual(reagent, x, y, z)) {
|
||||
int used = pastRelay.getTotalConnections();
|
||||
int max = pastRelay.maxConnextions;
|
||||
player.addChatComponentMessage(
|
||||
new ChatComponentTranslation(
|
||||
"message.attunedcrystal.linked",
|
||||
reagent.name,
|
||||
used,
|
||||
max));
|
||||
|
||||
if (player.isSneaking()) {
|
||||
pastRelay.removeReagentDestinationViaActual(reagent, x, y, z);
|
||||
} else {
|
||||
player.addChatComponentMessage(
|
||||
new ChatComponentTranslation("message.attunedcrystal.error.noconnections"));
|
||||
if (pastRelay.addReagentDestinationViaActual(reagent, x, y, z)) {
|
||||
player.addChatComponentMessage(
|
||||
new ChatComponentText(
|
||||
StatCollector.translateToLocal("message.attunedcrystal.linked") + " "
|
||||
+ reagent.name));
|
||||
} else {
|
||||
player.addChatComponentMessage(
|
||||
new ChatComponentTranslation("message.attunedcrystal.error.noconnections"));
|
||||
}
|
||||
}
|
||||
world.markBlockForUpdate(coords.xCoord, coords.yCoord, coords.zCoord);
|
||||
} else {
|
||||
@@ -320,8 +246,7 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator {
|
||||
this.setDimension(itemStack, dimension);
|
||||
this.setCoordinates(itemStack, new Int3(x, y, z));
|
||||
|
||||
player.addChatComponentMessage(
|
||||
new ChatComponentTranslation("message.attunedcrystal.linking", x, y, z));
|
||||
player.addChatComponentMessage(new ChatComponentTranslation("message.attunedcrystal.linking"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+7
-5
@@ -104,11 +104,13 @@ public class ItemTankSegmenter extends Item implements IReagentManipulator {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(ItemStack stack, int pass) {
|
||||
return switch (pass) {
|
||||
case 0 -> this.crystalBody;
|
||||
case 1 -> this.crystalLabel;
|
||||
default -> this.itemIcon;
|
||||
};
|
||||
switch (pass) {
|
||||
case 0:
|
||||
return this.crystalBody;
|
||||
case 1:
|
||||
return this.crystalLabel;
|
||||
}
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,10 +6,14 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -66,8 +70,31 @@ public class AlchemyReagent extends Item {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List,
|
||||
boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.alchemy.usedinalchemy"));
|
||||
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack);
|
||||
|
||||
if (recipe != null) {
|
||||
par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe"));
|
||||
|
||||
for (ItemStack item : recipe) {
|
||||
if (item != null) {
|
||||
par3List.add("" + item.getDisplayName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
par3List.add(
|
||||
"-" + StatCollector.translateToLocal("tooltip.alchemy.press")
|
||||
+ " "
|
||||
+ EnumChatFormatting.BLUE
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.shift")
|
||||
+ EnumChatFormatting.GRAY
|
||||
+ " "
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.forrecipe")
|
||||
+ "-");
|
||||
}
|
||||
}
|
||||
}
|
||||
+29
-2
@@ -5,9 +5,13 @@ import java.util.List;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.ICatalyst;
|
||||
|
||||
public class LengtheningCatalyst extends Item implements ICatalyst {
|
||||
@@ -30,8 +34,31 @@ public class LengtheningCatalyst extends Item implements ICatalyst {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List,
|
||||
boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.alchemy.usedinalchemy"));
|
||||
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack);
|
||||
|
||||
if (recipe != null) {
|
||||
par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe"));
|
||||
|
||||
for (ItemStack item : recipe) {
|
||||
if (item != null) {
|
||||
par3List.add("" + item.getDisplayName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
par3List.add(
|
||||
"-" + StatCollector.translateToLocal("tooltip.alchemy.press")
|
||||
+ " "
|
||||
+ EnumChatFormatting.BLUE
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.shift")
|
||||
+ EnumChatFormatting.GRAY
|
||||
+ " "
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.forrecipe")
|
||||
+ "-");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,9 +5,13 @@ import java.util.List;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.ICatalyst;
|
||||
|
||||
public class PowerCatalyst extends Item implements ICatalyst {
|
||||
@@ -31,8 +35,31 @@ public class PowerCatalyst extends Item implements ICatalyst {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List,
|
||||
boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.alchemy.usedinalchemy"));
|
||||
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack);
|
||||
|
||||
if (recipe != null) {
|
||||
par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe"));
|
||||
|
||||
for (ItemStack item : recipe) {
|
||||
if (item != null) {
|
||||
par3List.add("" + item.getDisplayName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
par3List.add(
|
||||
"-" + StatCollector.translateToLocal("tooltip.alchemy.press")
|
||||
+ " "
|
||||
+ EnumChatFormatting.BLUE
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.shift")
|
||||
+ EnumChatFormatting.GRAY
|
||||
+ " "
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.forrecipe")
|
||||
+ "-");
|
||||
}
|
||||
}
|
||||
}
|
||||
+29
-2
@@ -6,9 +6,13 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.IBindingAgent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -32,8 +36,31 @@ public class StandardBindingAgent extends Item implements IBindingAgent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List,
|
||||
boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.alchemy.usedinalchemy"));
|
||||
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack);
|
||||
|
||||
if (recipe != null) {
|
||||
par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe"));
|
||||
|
||||
for (ItemStack item : recipe) {
|
||||
if (item != null) {
|
||||
par3List.add("" + item.getDisplayName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
par3List.add(
|
||||
"-" + StatCollector.translateToLocal("tooltip.alchemy.press")
|
||||
+ " "
|
||||
+ EnumChatFormatting.BLUE
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.shift")
|
||||
+ EnumChatFormatting.GRAY
|
||||
+ " "
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.forrecipe")
|
||||
+ "-");
|
||||
}
|
||||
}
|
||||
}
|
||||
+29
-2
@@ -7,9 +7,13 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.IFillingAgent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -47,8 +51,31 @@ public class WeakFillingAgent extends Item implements IFillingAgent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List,
|
||||
boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.alchemy.usedinalchemy"));
|
||||
|
||||
if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(par1ItemStack);
|
||||
|
||||
if (recipe != null) {
|
||||
par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocal("tooltip.alchemy.recipe"));
|
||||
|
||||
for (ItemStack item : recipe) {
|
||||
if (item != null) {
|
||||
par3List.add("" + item.getDisplayName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
par3List.add(
|
||||
"-" + StatCollector.translateToLocal("tooltip.alchemy.press")
|
||||
+ " "
|
||||
+ EnumChatFormatting.BLUE
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.shift")
|
||||
+ EnumChatFormatting.GRAY
|
||||
+ " "
|
||||
+ StatCollector.translateToLocal("tooltip.alchemy.forrecipe")
|
||||
+ "-");
|
||||
}
|
||||
}
|
||||
}
|
||||
+52
-20
@@ -32,11 +32,8 @@ public class OutputRoutingFocus extends RoutingFocus implements ILimitedRoutingF
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List,
|
||||
boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
super.addInformation(par1ItemStack, par2EntityPlayer, par3List, par4);
|
||||
if (!(par1ItemStack.getItem() instanceof OutputRoutingFocus focus)) return;
|
||||
par3List.addAll(focus.getLogic(par1ItemStack).getDescription());
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
int limit = this.getRoutingFocusLimit(par1ItemStack);
|
||||
@@ -58,18 +55,49 @@ public class OutputRoutingFocus extends RoutingFocus implements ILimitedRoutingF
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int damage) {
|
||||
return switch (damage) {
|
||||
case 1 -> this.modItemIcon;
|
||||
case 2 -> this.ignMetaIcon;
|
||||
case 3 -> this.matchNBTIcon;
|
||||
case 4 -> this.globalIcon;
|
||||
default -> this.itemIcon;
|
||||
};
|
||||
switch (damage) {
|
||||
case 0:
|
||||
return this.itemIcon;
|
||||
case 1:
|
||||
return this.modItemIcon;
|
||||
case 2:
|
||||
return this.ignMetaIcon;
|
||||
case 3:
|
||||
return this.matchNBTIcon;
|
||||
case 4:
|
||||
return this.globalIcon;
|
||||
}
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack) {
|
||||
String addedString = "";
|
||||
|
||||
switch (itemStack.getItemDamage()) {
|
||||
case 0:
|
||||
addedString = "default";
|
||||
break;
|
||||
case 1:
|
||||
addedString = "modItem";
|
||||
break;
|
||||
case 2:
|
||||
addedString = "ignMeta";
|
||||
break;
|
||||
case 3:
|
||||
addedString = "matchNBT";
|
||||
break;
|
||||
case 4:
|
||||
addedString = "global";
|
||||
break;
|
||||
}
|
||||
|
||||
return super.getUnlocalizedName() + "." + addedString;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item id, CreativeTabs creativeTab, List<ItemStack> list) {
|
||||
public void getSubItems(Item id, CreativeTabs creativeTab, List list) {
|
||||
for (int meta = 0; meta < 5; ++meta) {
|
||||
list.add(new ItemStack(id, 1, meta));
|
||||
}
|
||||
@@ -78,14 +106,18 @@ public class OutputRoutingFocus extends RoutingFocus implements ILimitedRoutingF
|
||||
@Override
|
||||
public RoutingFocusLogic getLogic(ItemStack itemStack) {
|
||||
if (itemStack != null) {
|
||||
return switch (itemStack.getItemDamage()) {
|
||||
case 0 -> new RoutingFocusLogicLimitDefault(itemStack);
|
||||
case 1 -> new RoutingFocusLogicLimitModItems(itemStack);
|
||||
case 2 -> new RoutingFocusLogicLimitIgnMeta(itemStack);
|
||||
case 3 -> new RoutingFocusLogicLimitMatchNBT(itemStack);
|
||||
case 4 -> new RoutingFocusLogicLimitGlobal(itemStack);
|
||||
default -> new RoutingFocusLogic();
|
||||
};
|
||||
switch (itemStack.getItemDamage()) {
|
||||
case 0:
|
||||
return new RoutingFocusLogicLimitDefault(itemStack);
|
||||
case 1:
|
||||
return new RoutingFocusLogicLimitModItems(itemStack);
|
||||
case 2:
|
||||
return new RoutingFocusLogicLimitIgnMeta(itemStack);
|
||||
case 3:
|
||||
return new RoutingFocusLogicLimitMatchNBT(itemStack);
|
||||
case 4:
|
||||
return new RoutingFocusLogicLimitGlobal(itemStack);
|
||||
}
|
||||
}
|
||||
|
||||
return new RoutingFocusLogic();
|
||||
|
||||
@@ -74,8 +74,7 @@ public class RoutingFocus extends Item {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List,
|
||||
boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal(this.getFocusDescription()));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
@@ -90,9 +89,7 @@ public class RoutingFocus extends Item {
|
||||
+ itemTag.getInteger("zCoord"));
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.alchemy.direction") + " "
|
||||
+ StatCollector.translateToLocal(
|
||||
"message.ritual.side."
|
||||
+ this.getSetDirection(par1ItemStack).toString().toLowerCase()));
|
||||
+ this.getSetDirection(par1ItemStack));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,17 +168,4 @@ public class RoutingFocus extends Item {
|
||||
public RoutingFocusLogic getLogic(ItemStack itemStack) {
|
||||
return new RoutingFocusLogic();
|
||||
}
|
||||
|
||||
public String getName(ItemStack stack) {
|
||||
if (stack.hasTagCompound()) {
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
if (tag.hasKey("display", 10)) {
|
||||
NBTTagCompound display = tag.getCompoundTag("display");
|
||||
if (display.hasKey("Name", 8)) {
|
||||
return display.getString("Name");
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,10 @@ public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil {
|
||||
|
||||
@Override
|
||||
public ItemStack getContainerItem(ItemStack itemStack) {
|
||||
return itemStack;
|
||||
ItemStack copiedStack = itemStack.copy();
|
||||
copiedStack.setItemDamage(copiedStack.getItemDamage() + getEnergyUsed());
|
||||
copiedStack.stackSize = 1;
|
||||
return copiedStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+49
-23
@@ -8,7 +8,6 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
@@ -89,27 +88,49 @@ public class ItemSanguineArmour extends ItemArmor
|
||||
|
||||
if (this == ModItems.sanguinePants) {
|
||||
return "alchemicalwizardry:models/armor/sanguineArmour_layer_2.png";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> list, boolean adv) {
|
||||
if (this.armorType == 0) {
|
||||
list.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc1"));
|
||||
} else {
|
||||
list.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc2"));
|
||||
return null;
|
||||
}
|
||||
|
||||
list.add(
|
||||
EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocalFormatted(
|
||||
"tooltip.sanguinearmor.visdisc",
|
||||
getVisDiscount(stack, player, null)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {}
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
int discount = 0;
|
||||
|
||||
switch (this.armorType) {
|
||||
case 0:
|
||||
discount = 6;
|
||||
break;
|
||||
case 1:
|
||||
discount = 3;
|
||||
break;
|
||||
case 2:
|
||||
discount = 3;
|
||||
break;
|
||||
case 3:
|
||||
discount = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (this.armorType) {
|
||||
case 0:
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc1"));
|
||||
break;
|
||||
case 1:
|
||||
|
||||
case 2:
|
||||
|
||||
case 3:
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.desc2"));
|
||||
}
|
||||
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sanguinearmor.visdisc") + " " + discount + "%");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUpgrade() {
|
||||
@@ -128,12 +149,17 @@ public class ItemSanguineArmour extends ItemArmor
|
||||
|
||||
@Override
|
||||
public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect) {
|
||||
return switch (this.armorType) {
|
||||
case 0 -> 7;
|
||||
case 1 -> 3;
|
||||
case 2, 3 -> 2;
|
||||
default -> 0;
|
||||
};
|
||||
switch (this.armorType) {
|
||||
case 0:
|
||||
return 7;
|
||||
case 1:
|
||||
return 3;
|
||||
case 2:
|
||||
return 2;
|
||||
case 3:
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+200
-113
@@ -1,7 +1,10 @@
|
||||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
@@ -17,142 +20,226 @@ import WayofTime.alchemicalWizardry.api.RoutingFocusPosAndFacing;
|
||||
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.items.routing.InputRoutingFocus;
|
||||
import WayofTime.alchemicalWizardry.common.items.routing.OutputRoutingFocus;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class RitualEffectItemRouting extends RitualEffect {
|
||||
|
||||
private static final Int3[] INPUT_BUFFER_LOCATIONS = { new Int3(1, 0, 0), new Int3(-1, 0, 0), new Int3(0, 0, 1),
|
||||
new Int3(0, 0, -1) };
|
||||
|
||||
private static final Int3[] OUTPUT_BUFFER_LOCATIONS = { new Int3(2, 0, 2), new Int3(-2, 0, 2), new Int3(2, 0, -2),
|
||||
new Int3(-2, 0, -2) };
|
||||
Random rand = new Random();
|
||||
|
||||
@Override
|
||||
public void performEffect(IMasterRitualStone ritualStone) {
|
||||
String owner = ritualStone.getOwner();
|
||||
|
||||
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
|
||||
World world = ritualStone.getWorld();
|
||||
int x = ritualStone.getXCoord();
|
||||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
if (world.getTotalWorldTime() % 20 != 0) return;
|
||||
|
||||
List<IInventory> outputFocusChests = findBufferChests(world, x, y, z, OUTPUT_BUFFER_LOCATIONS);
|
||||
if (outputFocusChests.isEmpty()) return;
|
||||
|
||||
List<IInventory> inputFocusChests = findBufferChests(world, x, y, z, INPUT_BUFFER_LOCATIONS);
|
||||
if (inputFocusChests.isEmpty()) return;
|
||||
|
||||
for (IInventory outputFoci : outputFocusChests) {
|
||||
processOutputFoci(world, outputFoci, inputFocusChests);
|
||||
if (world.getTotalWorldTime() % 20 != 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void processOutputFoci(World world, IInventory outputFoci, List<IInventory> inputFocusChests) {
|
||||
RoutingFocusParadigm paradigm = new RoutingFocusParadigm();
|
||||
boolean lastItemWasFocus = true;
|
||||
Map<Int3, IInventory> tileMap = new HashMap();
|
||||
|
||||
for (int i = 0; i < outputFoci.getSizeInventory(); i++) {
|
||||
ItemStack keyStack = outputFoci.getStackInSlot(i);
|
||||
if (keyStack == null) continue;
|
||||
|
||||
if (keyStack.getItem() instanceof OutputRoutingFocus outputFocus) {
|
||||
if (!lastItemWasFocus) paradigm.clear();
|
||||
paradigm.addRoutingFocusPosAndFacing(outputFocus.getPosAndFacing(keyStack));
|
||||
paradigm.addLogic(outputFocus.getLogic(keyStack));
|
||||
paradigm.addName(outputFocus.getName(keyStack));
|
||||
lastItemWasFocus = true;
|
||||
continue;
|
||||
List<IInventory> outputList = new ArrayList();
|
||||
for (int i = 0; i < 4; i++) // Check output foci chests, return if none available
|
||||
{
|
||||
Int3 outputFocusChest = this.getOutputBufferChestLocation(i);
|
||||
TileEntity outputFocusInv = world.getTileEntity(
|
||||
x + outputFocusChest.xCoord,
|
||||
y + outputFocusChest.yCoord,
|
||||
z + outputFocusChest.zCoord);
|
||||
if (outputFocusInv instanceof IInventory) {
|
||||
outputList.add((IInventory) outputFocusInv);
|
||||
}
|
||||
lastItemWasFocus = false;
|
||||
}
|
||||
|
||||
for (RoutingFocusPosAndFacing posAndFacing : paradigm.locationList) {
|
||||
if (posAndFacing == null) continue;
|
||||
ForgeDirection inputDirection = posAndFacing.facing;
|
||||
TileEntity outputTarget = world.getTileEntity(
|
||||
posAndFacing.location.xCoord,
|
||||
posAndFacing.location.yCoord,
|
||||
posAndFacing.location.zCoord);
|
||||
if (outputList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(outputTarget instanceof IInventory outputInventory)) continue;
|
||||
for (IInventory outputFocusInventory : outputList) {
|
||||
{
|
||||
OutputRoutingFocus outputFocus;;
|
||||
|
||||
for (IInventory inputFoci : inputFocusChests) {
|
||||
processInputFoci(world, inputFoci, keyStack, paradigm, outputInventory, inputDirection);
|
||||
RoutingFocusParadigm parad = new RoutingFocusParadigm();
|
||||
|
||||
TileEntity outputChest = null; // Destination
|
||||
ForgeDirection inputDirection;
|
||||
|
||||
{
|
||||
IInventory outputChestInventory = null;
|
||||
|
||||
boolean lastItemWasFocus = true;
|
||||
|
||||
for (int j = 0; j < outputFocusInventory.getSizeInventory(); j++) {
|
||||
ItemStack keyStack = outputFocusInventory.getStackInSlot(j);
|
||||
if (keyStack == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (keyStack.getItem() instanceof OutputRoutingFocus) {
|
||||
if (!lastItemWasFocus) {
|
||||
parad.clear();
|
||||
}
|
||||
|
||||
outputFocus = (OutputRoutingFocus) keyStack.getItem();
|
||||
|
||||
parad.addRoutingFocusPosAndFacing(outputFocus.getPosAndFacing(keyStack));
|
||||
parad.addLogic(outputFocus.getLogic(keyStack));
|
||||
lastItemWasFocus = true;
|
||||
continue;
|
||||
} else {
|
||||
lastItemWasFocus = false;
|
||||
}
|
||||
|
||||
for (RoutingFocusPosAndFacing posAndFacing : parad.locationList) {
|
||||
if (posAndFacing == null) {
|
||||
continue;
|
||||
}
|
||||
inputDirection = posAndFacing.facing;
|
||||
if (outputChest == null || !posAndFacing.location
|
||||
.equals(new Int3(outputChest.xCoord, outputChest.yCoord, outputChest.zCoord))) {
|
||||
outputChest = world.getTileEntity(
|
||||
posAndFacing.location.xCoord,
|
||||
posAndFacing.location.yCoord,
|
||||
posAndFacing.location.zCoord);
|
||||
if (outputChest instanceof IInventory) {
|
||||
outputChestInventory = (IInventory) outputChest;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
Int3 inputFocusChest = this.getInputBufferChestLocation(i);
|
||||
TileEntity inputFocusInv = world.getTileEntity(
|
||||
x + inputFocusChest.xCoord,
|
||||
y + inputFocusChest.yCoord,
|
||||
z + inputFocusChest.zCoord);
|
||||
if (inputFocusInv instanceof IInventory) {
|
||||
for (int ji = 0; ji < ((IInventory) inputFocusInv).getSizeInventory(); ji++) // Iterate
|
||||
// through
|
||||
// foci
|
||||
// inventory
|
||||
{
|
||||
ItemStack inputFocusStack = ((IInventory) inputFocusInv).getStackInSlot(ji);
|
||||
if (inputFocusStack != null
|
||||
&& inputFocusStack.getItem() instanceof InputRoutingFocus) {
|
||||
InputRoutingFocus inputFocus = (InputRoutingFocus) inputFocusStack
|
||||
.getItem();
|
||||
TileEntity inputChest = world.getTileEntity(
|
||||
inputFocus.xCoord(inputFocusStack),
|
||||
inputFocus.yCoord(inputFocusStack),
|
||||
inputFocus.zCoord(inputFocusStack));
|
||||
if (inputChest instanceof IInventory) {
|
||||
IInventory inputChestInventory = (IInventory) inputChest;
|
||||
ForgeDirection syphonDirection = inputFocus
|
||||
.getSetDirection(inputFocusStack);
|
||||
boolean[] canSyphonList = new boolean[inputChestInventory
|
||||
.getSizeInventory()];
|
||||
if (inputChest instanceof ISidedInventory) {
|
||||
int[] validSlots = ((ISidedInventory) inputChest)
|
||||
.getAccessibleSlotsFromSide(syphonDirection.ordinal());
|
||||
for (int in : validSlots) {
|
||||
canSyphonList[in] = true;
|
||||
}
|
||||
} else {
|
||||
for (int ni = 0; ni
|
||||
< inputChestInventory.getSizeInventory(); ni++) {
|
||||
canSyphonList[ni] = true;
|
||||
}
|
||||
}
|
||||
|
||||
for (int ni = 0; ni < inputChestInventory.getSizeInventory(); ni++) {
|
||||
if (canSyphonList[ni]) {
|
||||
ItemStack syphonedStack = inputChestInventory
|
||||
.getStackInSlot(ni); // Has a syphoned item linked, next
|
||||
// need to find a
|
||||
// destination
|
||||
if (syphonedStack == null
|
||||
|| (inputChestInventory instanceof ISidedInventory
|
||||
&& !((ISidedInventory) inputChestInventory)
|
||||
.canExtractItem(
|
||||
ni,
|
||||
syphonedStack,
|
||||
syphonDirection.ordinal()))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int size = syphonedStack.stackSize;
|
||||
|
||||
if (parad.doesItemMatch(keyStack, syphonedStack)) {
|
||||
ItemStack newStack = null;
|
||||
if (parad.maximumAmount <= 0) {
|
||||
newStack = SpellHelper.insertStackIntoInventory(
|
||||
syphonedStack,
|
||||
outputChestInventory,
|
||||
inputDirection);
|
||||
} else {
|
||||
newStack = SpellHelper.insertStackIntoInventory(
|
||||
syphonedStack,
|
||||
outputChestInventory,
|
||||
inputDirection,
|
||||
parad.maximumAmount);
|
||||
}
|
||||
if (size == newStack.stackSize) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int numberSyphoned = size - newStack.stackSize;
|
||||
|
||||
if (newStack != null && newStack.stackSize <= 0) {
|
||||
size = newStack.stackSize;
|
||||
newStack = null;
|
||||
}
|
||||
inputChestInventory.setInventorySlotContents(ni, newStack);
|
||||
// break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void processInputFoci(World world, IInventory inputFoci, ItemStack keyStack, RoutingFocusParadigm paradigm,
|
||||
IInventory outputInventory, ForgeDirection inputDirection) {
|
||||
for (int i = 0; i < inputFoci.getSizeInventory(); i++) {
|
||||
ItemStack inputFocusStack = inputFoci.getStackInSlot(i);
|
||||
if (inputFocusStack == null || !(inputFocusStack.getItem() instanceof InputRoutingFocus inputFocus))
|
||||
continue;
|
||||
if (!paradigm.doesNameMatch(inputFocus.getName(inputFocusStack))) continue;
|
||||
|
||||
TileEntity inputTarget = world.getTileEntity(
|
||||
inputFocus.xCoord(inputFocusStack),
|
||||
inputFocus.yCoord(inputFocusStack),
|
||||
inputFocus.zCoord(inputFocusStack));
|
||||
|
||||
if (!(inputTarget instanceof IInventory inputChest)) continue;
|
||||
|
||||
boolean[] slotList = checkSlots(inputChest, inputFocus.getSetDirection(inputFocusStack));
|
||||
|
||||
for (int j = 0; j < inputChest.getSizeInventory(); j++) {
|
||||
if (!slotList[j]) continue;
|
||||
ItemStack syphonedStack = inputChest.getStackInSlot(j);
|
||||
if (!canExtractItem(inputChest, j, syphonedStack, inputFocus.getSetDirection(inputFocusStack)))
|
||||
continue;
|
||||
|
||||
if (paradigm.doesItemMatch(keyStack, syphonedStack)) {
|
||||
ItemStack newStack = insertStackWithLimit(
|
||||
syphonedStack,
|
||||
outputInventory,
|
||||
inputDirection,
|
||||
paradigm.maximumAmount);
|
||||
inputChest.setInventorySlotContents(
|
||||
j,
|
||||
(newStack != null && newStack.stackSize > 0) ? newStack : null);
|
||||
}
|
||||
}
|
||||
public Int3 getInputBufferChestLocation(int number) {
|
||||
switch (number) {
|
||||
case 0:
|
||||
return new Int3(1, 0, 0);
|
||||
case 1:
|
||||
return new Int3(-1, 0, 0);
|
||||
case 2:
|
||||
return new Int3(0, 0, 1);
|
||||
case 3:
|
||||
return new Int3(0, 0, -1);
|
||||
}
|
||||
return new Int3(0, 0, 0);
|
||||
}
|
||||
|
||||
private boolean[] checkSlots(IInventory inventory, ForgeDirection direction) {
|
||||
boolean[] result = new boolean[inventory.getSizeInventory()];
|
||||
if (inventory instanceof ISidedInventory sidedInv) {
|
||||
int[] validSlots = sidedInv.getAccessibleSlotsFromSide(direction.ordinal());
|
||||
for (int slot : validSlots) result[slot] = true;
|
||||
} else {
|
||||
for (int i = 0; i < inventory.getSizeInventory(); i++) result[i] = true;
|
||||
public Int3 getOutputBufferChestLocation(int number) {
|
||||
switch (number) {
|
||||
case 0:
|
||||
return new Int3(2, 0, 2);
|
||||
case 1:
|
||||
return new Int3(-2, 0, 2);
|
||||
case 2:
|
||||
return new Int3(2, 0, -2);
|
||||
case 3:
|
||||
return new Int3(-2, 0, -2);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private boolean canExtractItem(IInventory inventory, int slot, ItemStack stack, ForgeDirection direction) {
|
||||
return stack != null && (!(inventory instanceof ISidedInventory)
|
||||
|| ((ISidedInventory) inventory).canExtractItem(slot, stack, direction.ordinal()));
|
||||
}
|
||||
|
||||
private ItemStack insertStackWithLimit(ItemStack stack, IInventory inventory, ForgeDirection direction,
|
||||
int maxAmount) {
|
||||
return maxAmount <= 0 ? SpellHelper.insertStackIntoInventory(stack, inventory, direction)
|
||||
: SpellHelper.insertStackIntoInventory(stack, inventory, direction, maxAmount);
|
||||
}
|
||||
|
||||
private List<IInventory> findBufferChests(World world, int x, int y, int z, Int3[] locations) {
|
||||
List<IInventory> chestList = new ArrayList<>();
|
||||
for (Int3 chestLocation : locations) {
|
||||
TileEntity tileEntity = world
|
||||
.getTileEntity(x + chestLocation.xCoord, y + chestLocation.yCoord, z + chestLocation.zCoord);
|
||||
if (tileEntity instanceof IInventory inv) {
|
||||
chestList.add(inv);
|
||||
}
|
||||
}
|
||||
return chestList;
|
||||
return new Int3(0, 0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -162,14 +249,14 @@ public class RitualEffectItemRouting extends RitualEffect {
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList() {
|
||||
ArrayList<RitualComponent> itemRoutingRitual = new ArrayList<>();
|
||||
ArrayList<RitualComponent> omegaRitual = new ArrayList();
|
||||
|
||||
this.addCornerRunes(itemRoutingRitual, 1, 0, RitualComponent.BLANK);
|
||||
this.addOffsetRunes(itemRoutingRitual, 2, 1, 0, RitualComponent.FIRE);
|
||||
this.addParallelRunes(itemRoutingRitual, 4, 0, RitualComponent.WATER);
|
||||
this.addParallelRunes(itemRoutingRitual, 5, 0, RitualComponent.EARTH);
|
||||
this.addCornerRunes(itemRoutingRitual, 4, 0, RitualComponent.WATER);
|
||||
this.addCornerRunes(omegaRitual, 1, 0, RitualComponent.BLANK);
|
||||
this.addOffsetRunes(omegaRitual, 2, 1, 0, RitualComponent.FIRE);
|
||||
this.addParallelRunes(omegaRitual, 4, 0, RitualComponent.WATER);
|
||||
this.addParallelRunes(omegaRitual, 5, 0, RitualComponent.EARTH);
|
||||
this.addCornerRunes(omegaRitual, 4, 0, RitualComponent.WATER);
|
||||
|
||||
return itemRoutingRitual;
|
||||
return omegaRitual;
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,6 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.ItemType;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
|
||||
import gregtech.common.blocks.GTBlockOre;
|
||||
|
||||
public class RitualEffectMagnetic extends RitualEffect {
|
||||
|
||||
@@ -35,10 +34,7 @@ public class RitualEffectMagnetic extends RitualEffect {
|
||||
|
||||
public static boolean isBlockOre(Block block, int meta) {
|
||||
// Special case for lit redstone ore
|
||||
if (block instanceof BlockOre || block instanceof BlockRedstoneOre
|
||||
|| (AlchemicalWizardry.isGregTechLoaded && block instanceof GTBlockOre)) {
|
||||
return true;
|
||||
}
|
||||
if (block instanceof BlockOre || block instanceof BlockRedstoneOre) return true;
|
||||
|
||||
if (block == null || Item.getItemFromBlock(block) == null) return false;
|
||||
|
||||
|
||||
+1
-14
@@ -1,11 +1,6 @@
|
||||
package WayofTime.alchemicalWizardry.common.routing;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.RoutingFocusLogic;
|
||||
|
||||
@@ -13,14 +8,6 @@ public class RoutingFocusLogicIgnMeta extends RoutingFocusLogic {
|
||||
|
||||
@Override
|
||||
public boolean getDefaultMatch(ItemStack keyStack, ItemStack checkedStack) {
|
||||
return (keyStack != null && checkedStack != null && keyStack.getItem() == checkedStack.getItem());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getDescription() {
|
||||
return new ArrayList<>(
|
||||
Collections.singletonList(
|
||||
StatCollector.translateToLocal("tooltip.routingFocus.logic") + " "
|
||||
+ StatCollector.translateToLocal("item.outputRoutingFocus.ignMeta.logic")));
|
||||
return (keyStack != null ? checkedStack != null && keyStack.getItem() == checkedStack.getItem() : false);
|
||||
}
|
||||
}
|
||||
+2
@@ -11,6 +11,8 @@ public class RoutingFocusLogicLimitDefault extends RoutingFocusLogicLimit {
|
||||
public RoutingFocusLogicLimitDefault(ItemStack stack) {
|
||||
if (stack != null && stack.getItem() instanceof ILimitedRoutingFocus) {
|
||||
limit = ((ILimitedRoutingFocus) stack.getItem()).getRoutingFocusLimit(stack);
|
||||
} else {
|
||||
limit = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-13
@@ -1,11 +1,6 @@
|
||||
package WayofTime.alchemicalWizardry.common.routing;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.items.routing.ILimitedRoutingFocus;
|
||||
|
||||
@@ -16,6 +11,8 @@ public class RoutingFocusLogicLimitGlobal extends RoutingFocusLogicLimit {
|
||||
public RoutingFocusLogicLimitGlobal(ItemStack stack) {
|
||||
if (stack != null && stack.getItem() instanceof ILimitedRoutingFocus) {
|
||||
limit = ((ILimitedRoutingFocus) stack.getItem()).getRoutingFocusLimit(stack);
|
||||
} else {
|
||||
limit = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,12 +25,4 @@ public class RoutingFocusLogicLimitGlobal extends RoutingFocusLogicLimit {
|
||||
public boolean getDefaultMatch(ItemStack keyStack, ItemStack checkedStack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getDescription() {
|
||||
return new ArrayList<>(
|
||||
Collections.singletonList(
|
||||
StatCollector.translateToLocal("tooltip.routingFocus.logic") + " "
|
||||
+ StatCollector.translateToLocal("item.outputRoutingFocus.global.logic")));
|
||||
}
|
||||
}
|
||||
+2
@@ -12,6 +12,8 @@ public class RoutingFocusLogicLimitIgnMeta extends RoutingFocusLogicIgnMeta impl
|
||||
public RoutingFocusLogicLimitIgnMeta(ItemStack stack) {
|
||||
if (stack != null && stack.getItem() instanceof ILimitedRoutingFocus) {
|
||||
limit = ((ILimitedRoutingFocus) stack.getItem()).getRoutingFocusLimit(stack);
|
||||
} else {
|
||||
limit = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -12,6 +12,8 @@ public class RoutingFocusLogicLimitMatchNBT extends RoutingFocusLogicMatchNBT im
|
||||
public RoutingFocusLogicLimitMatchNBT(ItemStack stack) {
|
||||
if (stack != null && stack.getItem() instanceof ILimitedRoutingFocus) {
|
||||
limit = ((ILimitedRoutingFocus) stack.getItem()).getRoutingFocusLimit(stack);
|
||||
} else {
|
||||
limit = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -12,6 +12,8 @@ public class RoutingFocusLogicLimitModItems extends RoutingFocusLogicModItems im
|
||||
public RoutingFocusLogicLimitModItems(ItemStack stack) {
|
||||
if (stack != null && stack.getItem() instanceof ILimitedRoutingFocus) {
|
||||
limit = ((ILimitedRoutingFocus) stack.getItem()).getRoutingFocusLimit(stack);
|
||||
} else {
|
||||
limit = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loaded 100 of 534 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user