mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-27 07:13:14 +00:00
Compare commits
69
Commits
1.5.0
...
1.7.37-pre
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf1b94ebdd | ||
|
|
782096f8eb | ||
|
|
4f0f2afc37 | ||
|
|
b79692d27f | ||
|
|
976e959f4c | ||
|
|
79471d9a6b | ||
|
|
73ae391e8a | ||
|
|
1f5a267be0 | ||
|
|
46de8cb05c | ||
|
|
8799a637f8 | ||
|
|
485e462a83 | ||
|
|
47f5e1e594 | ||
|
|
1546426f30 | ||
|
|
4acfe14b78 | ||
|
|
86d7ea0370 | ||
|
|
bbf0e2aeb2 | ||
|
|
22f1bd3846 | ||
|
|
84545955aa | ||
|
|
a6f1919f52 | ||
|
|
097c0c62e4 | ||
|
|
c04775398a | ||
|
|
62789ce20b | ||
|
|
8685e1fd72 | ||
|
|
6b016444ba | ||
|
|
1552b81459 | ||
|
|
5e6c4e848c | ||
|
|
9f2d0b5241 | ||
|
|
e75e9f778a | ||
|
|
6bd083125a | ||
|
|
09fbb5574b | ||
|
|
559e2439b2 | ||
|
|
ef17235ae5 | ||
|
|
efe1e6044a | ||
|
|
14a4825e33 | ||
|
|
f5791ff631 | ||
|
|
ead07b752b | ||
|
|
d821098d4e | ||
|
|
8762c24331 | ||
|
|
a1f62e0db6 | ||
|
|
242312bee5 | ||
|
|
c0b4b797c8 | ||
|
|
bd584c6d52 | ||
|
|
ac50cfc691 | ||
|
|
7e607b4c58 | ||
|
|
e629d04310 | ||
|
|
52b4415e8c | ||
|
|
3f9641b861 | ||
|
|
1fd6ac323b | ||
|
|
38f2dbb395 | ||
|
|
84e41cc920 | ||
|
|
5bfdabb5f6 | ||
|
|
2e95450cf0 | ||
|
|
8ff0421f55 | ||
|
|
ba0a0e3357 | ||
|
|
222ad1645e | ||
|
|
7b48d96988 | ||
|
|
baa2336b58 | ||
|
|
1341be8f49 | ||
|
|
89eaa78e51 | ||
|
|
a7d6f8e59b | ||
|
|
6c18cd1bee | ||
|
|
fcddb56254 | ||
|
|
4a185d64cb | ||
|
|
e14b1f23c9 | ||
|
|
0b70f3ed51 | ||
|
|
1c8ceacb7f | ||
|
|
3037e0f583 | ||
|
|
269eff14d3 | ||
|
|
ff2f889c76 |
No files matched your search
@@ -27,3 +27,4 @@ whitelist.json
|
||||
*.iws
|
||||
src/main/resources/mixins.*.json
|
||||
*.bat
|
||||
layout.json
|
||||
@@ -1,117 +1,111 @@
|
||||
#Blood Magic: Alchemical Wizardry
|
||||
# Blood Magic: Alchemical Wizardry
|
||||
|
||||
###Gruesome? Probably. Worth it? Definitely!
|
||||
###[Downloads](http://minecraft.curseforge.com/mc-mods/224791-blood-magic/files)
|
||||
### Gruesome? Probably. Worth it? Definitely!
|
||||
|
||||
##Information
|
||||
## Fork
|
||||
|
||||
This mod was forked by the GT:NH Team to continue the development of the 1.7.10 branch.
|
||||
|
||||
## 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.
|
||||
|
||||
##Links
|
||||
## Upstream Blood Magic Links
|
||||
* Github: [Blood Magic](https://github.com/WayofTime/BloodMagic)
|
||||
* Twitter: [@WayofTime](https://twitter.com/WayofTime)
|
||||
* Wiki: Found at [FTBWiki](http://ftbwiki.org/Blood_Magic)
|
||||
* Wiki: Found at [FTBWiki](http://ftbwiki.org/Blood_Magic). Most information is still relevant for this fork.
|
||||
* [Minecraft Forum Thread](http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1290532-bm)
|
||||
* [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)
|
||||
* [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)
|
||||
|
||||
##Issue Reporting
|
||||
## 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)
|
||||
|
||||
Please include the following:
|
||||
## Issue Reporting
|
||||
|
||||
* 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
|
||||
**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).
|
||||
|
||||
##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 `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.
|
||||
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.
|
||||
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 me (WayofTime), it is not guaranteed that you will get support.
|
||||
### 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.
|
||||
|
||||
####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 `deobf`, `sources`, and `javadoc` jars.
|
||||
3. Once it completes, your new build will be found at `../build/libs/BloodMagic-*.jar`. You can ignore the `api`, `dev`, and `sources` jars.
|
||||
|
||||
##License
|
||||
## License
|
||||
|
||||

|
||||
|
||||
Blood Magic: AlchemicalWizardry by WayofTime is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).
|
||||
Blood Magic: Alchemical Wizardry 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 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 you might as well get to it!
|
||||
|
||||
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!
|
||||
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.
|
||||
|
||||
2. Download the latest version of BloodMagic from [Curseforge](http://minecraft.curseforge.com/mc-mods/224791-blood-magic).
|
||||
## FAQ
|
||||
|
||||
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`.
|
||||
**Q**: What has changed in the GT:NH fork compared to the final 1.7.10 version released by WayofTime?
|
||||
|
||||
##FAQ
|
||||
**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!
|
||||
|
||||
**Q**: My weak blood orb doesn't show my current LP! Fix it please.
|
||||
|
||||
**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!
|
||||
|
||||
|
||||
**A**: You need a Divination Sigil to view your 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, 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.
|
||||
**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.
|
||||
|
||||
**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 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!
|
||||
**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.
|
||||
|
||||
**Q**: Isn't that armour ...
|
||||
|
||||
**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).
|
||||
**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).
|
||||
|
||||
**Q**: My game is crashing with the latest TC4!
|
||||
**Q**: I've just had an amazing idea! Why not add an in-game book just like the Thaumonomicon?
|
||||
|
||||
**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.
|
||||
**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.
|
||||
|
||||
**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 it 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 the way it looks 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?
|
||||
|
||||
**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.
|
||||
**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?
|
||||
+2
-1602
File diff suppressed because it is too large.
Load diff
+13
-11
@@ -23,20 +23,22 @@
|
||||
*/
|
||||
|
||||
dependencies {
|
||||
api("com.github.GTNewHorizons:waila:1.6.5:dev")
|
||||
api("com.github.GTNewHorizons:NotEnoughItems:2.5.4-GTNH:dev")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.45.25:dev") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Botania:1.10.3-GTNH:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.8.2:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForgeMultipart:1.4.7:dev") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Chisel:2.13.4-GTNH:api") {transitive = false }
|
||||
api("com.github.GTNewHorizons:waila:1.8.7:dev")
|
||||
api("com.github.GTNewHorizons:NotEnoughItems:2.7.49-GTNH:dev")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.328:dev") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Botania:1.12.10-GTNH:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.10.10:api") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:ForgeMultipart:1.6.3:dev") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Chisel:2.16.4-GTNH:api") {transitive = false }
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:ZenScript:1.0.0-GTNH") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:CraftTweaker:3.3.0:dev") {transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:CraftTweaker:3.4.2: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.10:dev")
|
||||
}
|
||||
+160
-28
@@ -1,71 +1,203 @@
|
||||
modName = Blood Magic: Alchemical Wizardry
|
||||
# ExampleMod tag to use as Blowdryer (Spotless, etc.) settings version, leave empty to disable.
|
||||
# LOCAL to test local config updates.
|
||||
gtnh.settings.blowdryerTag = 0.2.0
|
||||
|
||||
# This is a case-sensitive string to identify your mod. Convention is to use lower case.
|
||||
# Human-readable mod name, available for mcmod.info population.
|
||||
modName = Blood Magic\: Alchemical Wizardry
|
||||
|
||||
# Case-sensitive identifier string, available for mcmod.info population and used for automatic mixin JSON generation.
|
||||
# Conventionally lowercase.
|
||||
modId = AWWayofTime
|
||||
|
||||
# Root package of the mod, used to find various classes in other properties,
|
||||
# mcmod.info substitution, enabling assertions in run tasks, etc.
|
||||
modGroup = WayofTime.alchemicalWizardry
|
||||
|
||||
# WHY is there no version field?
|
||||
# The build script relies on git to provide a version via tags. It is super easy and will enable you to always know the
|
||||
# code base or your binary. Check out this tutorial: https://blog.mattclemente.com/2017/10/13/versioning-with-git-tags/
|
||||
# Whether to use modGroup as the maven publishing group.
|
||||
# When false, com.github.GTNewHorizons is used.
|
||||
useModGroupForPublishing = false
|
||||
|
||||
# Will update your build.gradle automatically whenever an update is available
|
||||
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
|
||||
autoUpdateBuildScript = false
|
||||
|
||||
# Version of Minecraft to target
|
||||
minecraftVersion = 1.7.10
|
||||
|
||||
# Version of Minecraft Forge to target
|
||||
forgeVersion = 10.13.4.1614
|
||||
|
||||
# Select a username for testing your mod with breakpoints. You may leave this empty for a random user name each time you
|
||||
# restart Minecraft in development. Choose this dependent on your mod:
|
||||
# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name
|
||||
# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty
|
||||
developmentEnvironmentUserName = "Developer"
|
||||
# Specify an MCP channel for dependency deobfuscation and the deobfParams task.
|
||||
channel = stable
|
||||
|
||||
# Specify an MCP mappings version for dependency deobfuscation and the deobfParams task.
|
||||
mappingsVersion = 12
|
||||
|
||||
# Generate a class with String fields for the mod id, name, version and group name named with the fields below
|
||||
generateGradleTokenClass =WayofTime.alchemicalWizardry.Tags
|
||||
gradleTokenModId =
|
||||
gradleTokenModName =
|
||||
# Defines other MCP mappings for dependency deobfuscation.
|
||||
remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
|
||||
|
||||
# Select a default username for testing your mod. You can always override this per-run by running
|
||||
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
|
||||
developmentEnvironmentUserName = Developer
|
||||
|
||||
# Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8.
|
||||
# See https://github.com/bsideup/jabel for details on how this works.
|
||||
enableModernJavaSyntax = true
|
||||
|
||||
# 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
|
||||
|
||||
# Generate a class with a String field for the mod version named as defined below.
|
||||
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
|
||||
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
|
||||
generateGradleTokenClass = WayofTime.alchemicalWizardry.Tags
|
||||
|
||||
# Name of the token containing the project's current version to generate/replace.
|
||||
gradleTokenVersion = VERSION
|
||||
|
||||
# [DEPRECATED] Mod ID replacement token.
|
||||
gradleTokenModId =
|
||||
|
||||
# [DEPRECATED] Mod name replacement token.
|
||||
gradleTokenModName =
|
||||
|
||||
# [DEPRECATED] Mod Group replacement token.
|
||||
gradleTokenGroupName =
|
||||
|
||||
# [DEPRECATED]
|
||||
# Multiple source files can be defined here by providing a comma-seperated list: Class1.java,Class2.java,Class3.java
|
||||
# Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java
|
||||
# public static final String VERSION = "GRADLETOKEN_VERSION";
|
||||
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
|
||||
# version in @Mod([...], version = VERSION, [...])
|
||||
# Leave these properties empty to skip individual token replacements
|
||||
# version in @Mod([...], version = VERSION, [...]).
|
||||
# Leave these properties empty to skip individual token replacements.
|
||||
replaceGradleTokenInFile =
|
||||
|
||||
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise you can
|
||||
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
|
||||
# leave this property empty.
|
||||
# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api
|
||||
# Example value: (apiPackage = api) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.api
|
||||
apiPackage = api
|
||||
|
||||
# Specify the configuration file for Forge's access transformers here. I must be placed into /src/main/resources/META-INF/
|
||||
# Example value: mymodid_at.cfg
|
||||
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
|
||||
# There can be multiple files in a space-separated list.
|
||||
# Example value: mymodid_at.cfg nei_at.cfg
|
||||
accessTransformersFile = NEI_at.cfg
|
||||
|
||||
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
||||
usesMixins = false
|
||||
|
||||
# Set to a non-empty string to configure mixins in a separate source set under src/VALUE, instead of src/main.
|
||||
# This can speed up compile times thanks to not running the mixin annotation processor on all input sources.
|
||||
# Mixin classes will have access to "main" classes, but not the other way around.
|
||||
separateMixinSourceSet =
|
||||
|
||||
# Adds some debug arguments like verbose output and class export.
|
||||
usesMixinDebug = false
|
||||
|
||||
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
|
||||
mixinPlugin =
|
||||
|
||||
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
|
||||
mixinsPackage =
|
||||
|
||||
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
||||
# This parameter is for legacy compatability only
|
||||
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
|
||||
# This parameter is for legacy compatibility only
|
||||
# Example value: (coreModClass = asm.FMLPlugin) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.asm.FMLPlugin
|
||||
coreModClass =
|
||||
|
||||
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
|
||||
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
|
||||
containsMixinsAndOrCoreModOnly = false
|
||||
|
||||
# If enabled, you may use 'shadowImplementation' for dependencies. They will be integrated in your jar. It is your
|
||||
# responsibility check the licence and request permission for distribution, if required.
|
||||
# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
|
||||
forceEnableMixins = false
|
||||
|
||||
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated into your jar. It is your
|
||||
# responsibility to check the license and request permission for distribution if required.
|
||||
usesShadowedDependencies = false
|
||||
|
||||
# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older
|
||||
# If disabled, won't remove unused classes from shadowed dependencies. Some libraries use reflection to access
|
||||
# their own classes, making the minimization unreliable.
|
||||
minimizeShadowedDependencies = true
|
||||
|
||||
# If disabled, won't rename the shadowed classes.
|
||||
relocateShadowedDependencies = true
|
||||
|
||||
# Adds CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
|
||||
includeWellKnownRepositories = true
|
||||
|
||||
# A list of repositories to exclude from the includeWellKnownRepositories setting. Should be a space separated
|
||||
# list of strings, with the acceptable keys being(case does not matter):
|
||||
# cursemaven
|
||||
# modrinth
|
||||
excludeWellKnownRepositories =
|
||||
|
||||
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
|
||||
# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables.
|
||||
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
|
||||
usesMavenPublishing = true
|
||||
|
||||
# Maven repository to publish the mod to.
|
||||
# mavenPublishUrl = https\://nexus.gtnewhorizons.com/repository/releases/
|
||||
|
||||
# Publishing to Modrinth requires you to set the MODRINTH_TOKEN environment variable to your current Modrinth API token.
|
||||
#
|
||||
# The project's ID on Modrinth. Can be either the slug or the ID.
|
||||
# Leave this empty if you don't want to publish to Modrinth.
|
||||
modrinthProjectId =
|
||||
|
||||
# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth.
|
||||
# Syntax: scope1-type1:name1;scope2-type2:name2;...
|
||||
# Where scope can be one of [required, optional, incompatible, embedded],
|
||||
# type can be one of [project, version],
|
||||
# and the name is the Modrinth project or version slug/id of the other mod.
|
||||
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
|
||||
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
|
||||
modrinthRelations =
|
||||
|
||||
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
|
||||
#
|
||||
# The project's numeric ID on CurseForge. You can find this in the About Project box.
|
||||
# Leave this empty if you don't want to publish on CurseForge.
|
||||
curseForgeProjectId =
|
||||
|
||||
# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge.
|
||||
# Syntax: type1:name1;type2:name2;...
|
||||
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
|
||||
# and the name is the CurseForge project slug of the other mod.
|
||||
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
|
||||
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
|
||||
curseForgeRelations =
|
||||
|
||||
# Optional parameter to customize the produced artifacts. Use this to preserve artifact naming when migrating older
|
||||
# projects. New projects should not use this parameter.
|
||||
customArchiveBaseName = BloodMagic
|
||||
|
||||
# TODO: Remove when you modify this repository, it's been put in for automatic buildscript updates
|
||||
# Optional parameter to have the build automatically fail if an illegal version is used.
|
||||
# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'.
|
||||
# The check is ONLY performed if the version is a git tag.
|
||||
# Note: the specified string must be escaped, so e.g. 1\\.1\\.\\d+ instead of 1\.1\.\d+
|
||||
# versionPattern =
|
||||
|
||||
# Uncomment to prevent the source code from being published.
|
||||
# noPublishedSources = true
|
||||
|
||||
# Uncomment this to disable Spotless checks.
|
||||
# This should only be uncommented to keep it easier to sync with upstream/other forks.
|
||||
# That is, if there is no other active fork/upstream, NEVER change this.
|
||||
# disableSpotless = true
|
||||
|
||||
# Uncomment this to disable Checkstyle checks (currently wildcard import check).
|
||||
disableCheckstyle = true
|
||||
|
||||
# Override the IDEA build type. Valid values are: "" (leave blank, do not override), "idea" (force use native IDEA build), "gradle"
|
||||
# (force use delegated build).
|
||||
# This is meant to be set in $HOME/.gradle/gradle.properties.
|
||||
# e.g. add "systemProp.org.gradle.project.ideaOverrideBuildType=idea" will override the build type to be native build.
|
||||
# WARNING: If you do use this option, it will overwrite whatever you have in your existing projects. This might not be what you want!
|
||||
# Usually there is no need to uncomment this here as other developers do not necessarily use the same build type as you.
|
||||
# ideaOverrideBuildType = idea
|
||||
|
||||
# Whether IDEA should run spotless checks when pressing the Build button.
|
||||
# This is meant to be set in $HOME/.gradle/gradle.properties.
|
||||
# ideaCheckSpotlessOnBuild = true
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -55,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -84,7 +86,7 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -203,7 +205,7 @@ fi
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
Vendored
+12
-10
@@ -13,6 +13,8 @@
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
|
||||
+3
-7
@@ -6,6 +6,7 @@ pluginManagement {
|
||||
name "GTNH Maven"
|
||||
url "https://nexus.gtnewhorizons.com/repository/public/"
|
||||
mavenContent {
|
||||
includeGroup("com.gtnewhorizons")
|
||||
includeGroupByRegex("com\\.gtnewhorizons\\..+")
|
||||
}
|
||||
}
|
||||
@@ -16,12 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.diffplug.blowdryerSetup' version '1.7.1'
|
||||
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0' // Provides java toolchains
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.38'
|
||||
}
|
||||
|
||||
blowdryerSetup {
|
||||
repoSubfolder 'gtnhShared'
|
||||
github('GTNewHorizons/ExampleMod1.7.10', 'tag', '0.2.0')
|
||||
//devLocal '.' // Use this when testing config updates locally
|
||||
}
|
||||
|
||||
@@ -250,7 +250,8 @@ import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport;
|
||||
import WayofTime.alchemicalWizardry.common.spell.simple.SpellWateryGrave;
|
||||
import WayofTime.alchemicalWizardry.common.spell.simple.SpellWindGust;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.SummoningHelperAW;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.Meteor;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar;
|
||||
@@ -276,6 +277,7 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiHandler;
|
||||
import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration;
|
||||
import WayofTime.alchemicalWizardry.compat.BloodMagicWailaPlugin;
|
||||
import WayofTime.alchemicalWizardry.compat.structurelib.CompatStructureLib;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
@@ -307,6 +309,8 @@ public class AlchemicalWizardry {
|
||||
|
||||
public static boolean parseTextFiles = false;
|
||||
|
||||
public static int defaultMeteorCost = 1000000;
|
||||
public static String defaultMeteorBlock;
|
||||
public static boolean doMeteorsDestroyBlocks = true;
|
||||
public static String[] allowedCrushedOresArray;
|
||||
|
||||
@@ -490,6 +494,7 @@ public class AlchemicalWizardry {
|
||||
public static boolean causeHungerWithRegen;
|
||||
public static boolean causeHungerChatMessage = true;
|
||||
public static boolean disableBoundToolsRightClick;
|
||||
public static boolean allowPotionRepair;
|
||||
|
||||
public static BlockStack[] secondTierRunes = new BlockStack[10];
|
||||
public static BlockStack[] thirdTierRunes = new BlockStack[10];
|
||||
@@ -620,35 +625,12 @@ public class AlchemicalWizardry {
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
File bmDirectory = new File("config/BloodMagic/schematics");
|
||||
|
||||
if (!bmDirectory.exists() && bmDirectory.mkdirs()) {
|
||||
try {
|
||||
InputStream in = AlchemicalWizardry.class
|
||||
.getResourceAsStream("/assets/alchemicalwizardry/schematics/building/buildings.zip");
|
||||
logger.info("none yet!");
|
||||
if (in != null) {
|
||||
logger.info("I have found a zip!");
|
||||
ZipInputStream zipStream = new ZipInputStream(in);
|
||||
ZipEntry entry;
|
||||
|
||||
while ((entry = zipStream.getNextEntry()) != null) {
|
||||
File file = new File(bmDirectory, entry.getName());
|
||||
if (file.exists() && file.length() > 3L) {
|
||||
continue;
|
||||
}
|
||||
FileOutputStream out = new FileOutputStream(file);
|
||||
|
||||
byte[] buffer = new byte[8192];
|
||||
int len;
|
||||
while ((len = zipStream.read(buffer)) != -1) {
|
||||
out.write(buffer, 0, len);
|
||||
}
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {}
|
||||
}
|
||||
generateDefaultConfig(
|
||||
"config/BloodMagic/schematics",
|
||||
"/assets/alchemicalwizardry/schematics/building/buildings.zip");
|
||||
generateDefaultConfig("config/BloodMagic/meteors", "/assets/alchemicalwizardry/meteors/meteors.zip");
|
||||
generateDefaultConfig("config/BloodMagic/meteors/reagents", "/assets/alchemicalwizardry/meteors/reagents.zip");
|
||||
|
||||
TEDemonPortal.loadBuildingList();
|
||||
|
||||
@@ -707,6 +689,42 @@ public class AlchemicalWizardry {
|
||||
ModAchievements.init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to generate default configs at the given destination using a zip located at the given source.
|
||||
*
|
||||
* @param destination The destination path for the config, starting inside .minecraft.
|
||||
* @param source The source path for the config's zip, starting in src/main/resources/
|
||||
*/
|
||||
private static void generateDefaultConfig(String destination, String source) {
|
||||
File destinationDirectory = new File(destination);
|
||||
if (!destinationDirectory.exists() && destinationDirectory.mkdirs()) {
|
||||
try {
|
||||
InputStream in = AlchemicalWizardry.class.getResourceAsStream(source);
|
||||
logger.info("Attempting to load default config for {}", destinationDirectory);
|
||||
if (in != null) {
|
||||
logger.info("Unpacking zip found at {}", source);
|
||||
ZipInputStream zipStream = new ZipInputStream(in);
|
||||
ZipEntry entry;
|
||||
|
||||
while ((entry = zipStream.getNextEntry()) != null) {
|
||||
File file = new File(destinationDirectory, entry.getName());
|
||||
if (file.exists() && file.length() > 3L) {
|
||||
continue;
|
||||
}
|
||||
FileOutputStream out = new FileOutputStream(file);
|
||||
|
||||
byte[] buffer = new byte[8192];
|
||||
int len;
|
||||
while ((len = zipStream.read(buffer)) != -1) {
|
||||
out.write(buffer, 0, len);
|
||||
}
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void load(FMLInitializationEvent event) {
|
||||
int craftingConstant = OreDictionary.WILDCARD_VALUE;
|
||||
@@ -718,8 +736,9 @@ public class AlchemicalWizardry {
|
||||
proxy.registerEntities();
|
||||
proxy.registerEntityTrackers();
|
||||
proxy.registerEvents();
|
||||
BloodMagicWailaPlugin.init();
|
||||
|
||||
if (Loader.isModLoaded("Waila")) {
|
||||
BloodMagicWailaPlugin.init();
|
||||
}
|
||||
// ItemStacks used for crafting go here
|
||||
ItemStack lapisStack = new ItemStack(Items.dye, 1, 4);
|
||||
ItemStack lavaBucketStack = new ItemStack(Items.lava_bucket);
|
||||
@@ -766,6 +785,7 @@ public class AlchemicalWizardry {
|
||||
ItemStack bloodRuneCraftedStack = new ItemStack(ModBlocks.bloodRune, 1);
|
||||
ItemStack bloodRuneStack = new ItemStack(ModBlocks.bloodRune);
|
||||
ItemStack speedRuneStack = new ItemStack(ModBlocks.speedRune);
|
||||
ItemStack accelerationRuneStack = new ItemStack(ModBlocks.bloodRune, 1, 5);
|
||||
ItemStack runeOfSacrificeStack = new ItemStack(ModBlocks.runeOfSacrifice);
|
||||
ItemStack runeOfSelfSacrificeStack = new ItemStack(ModBlocks.runeOfSelfSacrifice);
|
||||
ItemStack miningSigilStackCrafted = new ItemStack(ModItems.sigilOfTheFastMiner);
|
||||
@@ -2425,6 +2445,21 @@ public class AlchemicalWizardry {
|
||||
'o',
|
||||
obsidianStack));
|
||||
|
||||
GameRegistry.addRecipe(
|
||||
new ShapedBloodOrbRecipe(
|
||||
new ItemStack(ModBlocks.bloodRune, 1, 6),
|
||||
"eae",
|
||||
"sos",
|
||||
"eae",
|
||||
'e',
|
||||
etherealSlateStack,
|
||||
's',
|
||||
speedRuneStack,
|
||||
'a',
|
||||
accelerationRuneStack,
|
||||
'o',
|
||||
archmageBloodOrbStack));
|
||||
|
||||
AlchemyRecipeRegistry.registerRecipe(
|
||||
crackedRunicPlateStackCrafted,
|
||||
10,
|
||||
@@ -3298,12 +3333,18 @@ public class AlchemicalWizardry {
|
||||
isFMPLoaded = Loader.isModLoaded("ForgeMultipart");
|
||||
isChiselLoaded = Loader.isModLoaded("chisel");
|
||||
|
||||
if (Loader.isModLoaded("structurelib")) {
|
||||
CompatStructureLib.init();
|
||||
}
|
||||
|
||||
BloodMagicConfiguration.loadBlacklist();
|
||||
BloodMagicConfiguration.blacklistRituals();
|
||||
BloodMagicConfiguration.loadCustomLPValues();
|
||||
|
||||
DemonVillageLootRegistry.init();
|
||||
Meteor.loadConfig();
|
||||
|
||||
MeteorRegistry.loadConfig();
|
||||
MeteorReagentRegistry.loadConfig();
|
||||
|
||||
this.initCompressionHandlers();
|
||||
}
|
||||
@@ -4487,7 +4528,7 @@ public class AlchemicalWizardry {
|
||||
return strings;
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
@EventHandler
|
||||
public void initCommands(FMLServerStartingEvent event) {
|
||||
event.registerServerCommand(new CommandBloodMagic());
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import WayofTime.alchemicalWizardry.common.AlchemicalWizardryEventHooks;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.DemonVillagePath;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal;
|
||||
import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorComponent;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -102,6 +103,23 @@ public class BloodMagicConfiguration {
|
||||
|
||||
AlchemicalWizardry.doMeteorsDestroyBlocks = config.get("meteor", "doMeteorsDestroyBlocks", true)
|
||||
.getBoolean(true);
|
||||
AlchemicalWizardry.defaultMeteorCost = config.getInt(
|
||||
"defaultMeteorCost",
|
||||
"meteor",
|
||||
1000000,
|
||||
0,
|
||||
Integer.MAX_VALUE,
|
||||
"The default LP cost to use for meteors if the \"cost\" property is not present in its config file.\n");
|
||||
AlchemicalWizardry.defaultMeteorBlock = config.getString(
|
||||
"defaultMeteorBlock",
|
||||
"meteor",
|
||||
"",
|
||||
"The block to use for filler in meteors if none is provided in the meteor's config file and "
|
||||
+ "that\nmeteor's fillerChance is greater than 0. Also used as a fallback for empty ore "
|
||||
+ "lists in meteor configs.\nSpecify the block with the "
|
||||
+ "format:\n\"modId:itemName:meta\"\nDefaults to minecraft:stone:0 if no block is provided or "
|
||||
+ "the provided block cannot be found.");
|
||||
MeteorComponent.setDefaultMeteorBlock();
|
||||
AlchemicalWizardry.allowedCrushedOresArray = config.get(
|
||||
"oreCrushing",
|
||||
"allowedOres",
|
||||
@@ -113,6 +131,7 @@ public class BloodMagicConfiguration {
|
||||
.getBoolean();
|
||||
AlchemicalWizardry.causeHungerChatMessage = config.get("WimpySettings", "causeHungerChatMessage", true)
|
||||
.getBoolean();
|
||||
AlchemicalWizardry.allowPotionRepair = config.get("WimpySettings", "allowPotionRepair", true).getBoolean();
|
||||
// AlchemicalWizardry.lockdownAltar = config.get("WimpySettings", "LockdownAltarWithRegen", true).getBoolean();
|
||||
AlchemicalWizardry.lockdownAltar = false;
|
||||
AlchemicalWizardry.disableBoundToolsRightClick = config
|
||||
@@ -611,41 +630,55 @@ public class BloodMagicConfiguration {
|
||||
new BlockStack(ModBlocks.efficiencyRune, 0), new BlockStack(ModBlocks.runeOfSacrifice, 0),
|
||||
new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), new BlockStack(ModBlocks.bloodRune, 1),
|
||||
new BlockStack(ModBlocks.bloodRune, 2), new BlockStack(ModBlocks.bloodRune, 3),
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5) });
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5),
|
||||
new BlockStack(ModBlocks.bloodRune, 6) });
|
||||
AlchemicalWizardry.thirdTierRunes = BloodMagicConfiguration.getAltarRunesForTier(
|
||||
"thirdTier",
|
||||
new BlockStack[] { new BlockStack(ModBlocks.bloodRune, 0), new BlockStack(ModBlocks.speedRune, 0),
|
||||
new BlockStack(ModBlocks.efficiencyRune, 0), new BlockStack(ModBlocks.runeOfSacrifice, 0),
|
||||
new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), new BlockStack(ModBlocks.bloodRune, 1),
|
||||
new BlockStack(ModBlocks.bloodRune, 2), new BlockStack(ModBlocks.bloodRune, 3),
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5) });
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5),
|
||||
new BlockStack(ModBlocks.bloodRune, 6) });
|
||||
AlchemicalWizardry.fourthTierRunes = BloodMagicConfiguration.getAltarRunesForTier(
|
||||
"fourthTier",
|
||||
new BlockStack[] { new BlockStack(ModBlocks.bloodRune, 0), new BlockStack(ModBlocks.speedRune, 0),
|
||||
new BlockStack(ModBlocks.efficiencyRune, 0), new BlockStack(ModBlocks.runeOfSacrifice, 0),
|
||||
new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), new BlockStack(ModBlocks.bloodRune, 1),
|
||||
new BlockStack(ModBlocks.bloodRune, 2), new BlockStack(ModBlocks.bloodRune, 3),
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5) });
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5),
|
||||
new BlockStack(ModBlocks.bloodRune, 6) });
|
||||
AlchemicalWizardry.fifthTierRunes = BloodMagicConfiguration.getAltarRunesForTier(
|
||||
"fifthTier",
|
||||
new BlockStack[] { new BlockStack(ModBlocks.bloodRune, 0), new BlockStack(ModBlocks.speedRune, 0),
|
||||
new BlockStack(ModBlocks.efficiencyRune, 0), new BlockStack(ModBlocks.runeOfSacrifice, 0),
|
||||
new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), new BlockStack(ModBlocks.bloodRune, 1),
|
||||
new BlockStack(ModBlocks.bloodRune, 2), new BlockStack(ModBlocks.bloodRune, 3),
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5) });
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5),
|
||||
new BlockStack(ModBlocks.bloodRune, 6) });
|
||||
AlchemicalWizardry.sixthTierRunes = BloodMagicConfiguration.getAltarRunesForTier(
|
||||
"sixthTier",
|
||||
new BlockStack[] { new BlockStack(ModBlocks.bloodRune, 0), new BlockStack(ModBlocks.speedRune, 0),
|
||||
new BlockStack(ModBlocks.efficiencyRune, 0), new BlockStack(ModBlocks.runeOfSacrifice, 0),
|
||||
new BlockStack(ModBlocks.runeOfSelfSacrifice, 0), new BlockStack(ModBlocks.bloodRune, 1),
|
||||
new BlockStack(ModBlocks.bloodRune, 2), new BlockStack(ModBlocks.bloodRune, 3),
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5) });
|
||||
new BlockStack(ModBlocks.bloodRune, 4), new BlockStack(ModBlocks.bloodRune, 5),
|
||||
new BlockStack(ModBlocks.bloodRune, 6) });
|
||||
AlchemicalWizardry.specialAltarBlock = getAltarRunesForTier(
|
||||
"specialBlocks",
|
||||
new BlockStack[] { new BlockStack(Blocks.stonebrick, 0), new BlockStack(Blocks.glowstone, 0),
|
||||
new BlockStack(Blocks.stonebrick, 0), new BlockStack(ModBlocks.largeBloodStoneBrick, 0),
|
||||
new BlockStack(Blocks.beacon, 0), new BlockStack(Blocks.stonebrick, 0),
|
||||
new BlockStack(ModBlocks.blockCrystal, 0) });
|
||||
new BlockStack[] { new BlockStack(Blocks.air, 0), new BlockStack(Blocks.glowstone, 0),
|
||||
new BlockStack(Blocks.air, 0), new BlockStack(ModBlocks.largeBloodStoneBrick, 0),
|
||||
new BlockStack(Blocks.beacon, 0), new BlockStack(Blocks.air, 0),
|
||||
new BlockStack(ModBlocks.blockCrystal, 0) },
|
||||
"Set the special blocks for the altar with the format mod:block(:meta) in the following order:\n"
|
||||
+ "Tier 3 pillar\n"
|
||||
+ "Tier 3 cap\n"
|
||||
+ "Tier 4 pillar\n"
|
||||
+ "Tier 4 cap\n"
|
||||
+ "Tier 5 beacon\n"
|
||||
+ "Tier 6 pillar\n"
|
||||
+ "Tier 6 cap\n"
|
||||
+ "Set any of these to minecraft:air to allow for that component to be any block EXCEPT air (e.g., let any block be used for a pillar).");
|
||||
config.save();
|
||||
}
|
||||
|
||||
@@ -785,12 +818,16 @@ public class BloodMagicConfiguration {
|
||||
}
|
||||
|
||||
private static BlockStack[] getAltarRunesForTier(String tierName, BlockStack[] defaultValues) {
|
||||
return getAltarRunesForTier(tierName, defaultValues, "");
|
||||
}
|
||||
|
||||
private static BlockStack[] getAltarRunesForTier(String tierName, BlockStack[] defaultValues, String comment) {
|
||||
String[] defaultNames = new String[defaultValues.length];
|
||||
for (int i = 0; i < defaultValues.length; i++) {
|
||||
defaultNames[i] = Block.blockRegistry.getNameForObject(defaultValues[i].getBlock()) + ":"
|
||||
+ defaultValues[i].getMeta();
|
||||
}
|
||||
Property property = config.get("rune overrides", tierName, defaultNames);
|
||||
Property property = config.get("rune overrides", tierName, defaultNames, comment);
|
||||
String[] names = property.getStringList();
|
||||
if (names.length != defaultNames.length) {
|
||||
property.set(defaultNames);
|
||||
|
||||
@@ -57,117 +57,151 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
*/
|
||||
public class ModBlocks {
|
||||
|
||||
public static Block bloodStoneBrick;
|
||||
public static Block largeBloodStoneBrick;
|
||||
// Blood Altar
|
||||
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 blockMasterStone;
|
||||
public static Block ritualStone;
|
||||
public static Block blockCrucible;
|
||||
public static Block largeBloodStoneBrick;
|
||||
public static Block bloodStoneBrick;
|
||||
public static Block blockCrystal;
|
||||
|
||||
// Rituals
|
||||
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 ritualStone;
|
||||
public static Block blockMasterStone;
|
||||
public static Block blockPedestal;
|
||||
public static Block blockPlinth;
|
||||
public static Block blockLifeEssence;
|
||||
public static Block blockTeleposer;
|
||||
public static Block spectralBlock;
|
||||
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 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 blockBuildingSchematicSaver;
|
||||
public static Block blockLifeEssence;
|
||||
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 blockBuildingSchematicSaver;
|
||||
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();
|
||||
blockTeleposer = new BlockTeleposer();
|
||||
spectralBlock = new SpectralBlock();
|
||||
blockCrucible = new BlockCrucible();
|
||||
bloodStoneBrick = new BloodStoneBrick();
|
||||
largeBloodStoneBrick = new LargeBloodStoneBrick();
|
||||
blockCrystal = new BlockCrystal();
|
||||
|
||||
// Rituals
|
||||
imperfectRitualStone = new ImperfectRitualStone();
|
||||
ritualStone = new RitualStone();
|
||||
blockMasterStone = new BlockMasterStone();
|
||||
imperfectRitualStone = new ImperfectRitualStone();
|
||||
bloodSocket = new BlockSocket();
|
||||
armourForge = new ArmourForge();
|
||||
emptySocket = new EmptySocket();
|
||||
largeBloodStoneBrick = new LargeBloodStoneBrick();
|
||||
bloodStoneBrick = new BloodStoneBrick();
|
||||
blockWritingTable = new BlockWritingTable();
|
||||
blockHomHeart = new BlockHomHeart();
|
||||
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();
|
||||
bloodSocket = new BlockSocket();
|
||||
armourForge = new ArmourForge();
|
||||
|
||||
// Spells
|
||||
blockHomHeart = new BlockHomHeart();
|
||||
blockConduit = new BlockConduit();
|
||||
blockBloodLight = new BlockBloodLightSource();
|
||||
blockSpellEffect = new BlockSpellEffect();
|
||||
blockSpellParadigm = new BlockSpellParadigm();
|
||||
blockSpellModifier = new BlockSpellModifier();
|
||||
blockSpellEnhancement = new BlockSpellEnhancement();
|
||||
blockSpectralContainer = new BlockSpectralContainer();
|
||||
blockDemonPortal = new BlockDemonPortal();
|
||||
blockBuildingSchematicSaver = new BlockSchematicSaver();
|
||||
blockReagentConduit = new BlockReagentConduit();
|
||||
blockAlchemicCalcinator = new BlockAlchemicCalcinator();
|
||||
blockCrystalBelljar = new BlockBelljar();
|
||||
blockDemonChest = new BlockDemonChest();
|
||||
blockCrystal = new BlockCrystal();
|
||||
blockMimic = new MimicBlock();
|
||||
|
||||
// Misc
|
||||
blockTeleposer = new BlockTeleposer();
|
||||
spectralBlock = new SpectralBlock();
|
||||
blockBloodLight = new BlockBloodLightSource();
|
||||
blockSpectralContainer = new BlockSpectralContainer();
|
||||
blockLifeEssence = new LifeEssenceBlock();
|
||||
blockEnchantmentGlyph = new BlockEnchantmentGlyph();
|
||||
blockStabilityGlyph = new BlockStabilityGlyph();
|
||||
blockCrucible = new BlockCrucible();
|
||||
blockDemonPortal = new BlockDemonPortal();
|
||||
blockDemonChest = new BlockDemonChest();
|
||||
blockBuildingSchematicSaver = new BlockSchematicSaver();
|
||||
blockMimic = new MimicBlock();
|
||||
}
|
||||
|
||||
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.blockTeleposer, "blockTeleposer");
|
||||
GameRegistry.registerBlock(ModBlocks.spectralBlock, "spectralBlock");
|
||||
GameRegistry.registerBlock(ModBlocks.blockBloodLight, "bloodLight");
|
||||
GameRegistry.registerBlock(ModBlocks.blockStabilityGlyph, ItemStabilityGlyphBlock.class, "blockStabilityGlyph");
|
||||
GameRegistry.registerBlock(
|
||||
ModBlocks.blockEnchantmentGlyph,
|
||||
ItemEnchantmentGlyphBlock.class,
|
||||
"blockEnchantmentGlyph");
|
||||
|
||||
// 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,
|
||||
@@ -186,22 +220,16 @@ 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.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.blockBuildingSchematicSaver, "blockSchemSaver");
|
||||
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() {}
|
||||
|
||||
@@ -6,7 +6,43 @@ import net.minecraft.item.Item;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool;
|
||||
import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.*;
|
||||
import WayofTime.alchemicalWizardry.common.items.AWBaseItems;
|
||||
import WayofTime.alchemicalWizardry.common.items.ActivationCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.items.ApprenticeBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.common.items.ArchmageBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.common.items.ArmourInhibitor;
|
||||
import WayofTime.alchemicalWizardry.common.items.BlankSpell;
|
||||
import WayofTime.alchemicalWizardry.common.items.BloodShard;
|
||||
import WayofTime.alchemicalWizardry.common.items.BoundAxe;
|
||||
import WayofTime.alchemicalWizardry.common.items.BoundPickaxe;
|
||||
import WayofTime.alchemicalWizardry.common.items.BoundShovel;
|
||||
import WayofTime.alchemicalWizardry.common.items.CheatyItem;
|
||||
import WayofTime.alchemicalWizardry.common.items.CreativeDagger;
|
||||
import WayofTime.alchemicalWizardry.common.items.DaggerOfSacrifice;
|
||||
import WayofTime.alchemicalWizardry.common.items.DemonPlacer;
|
||||
import WayofTime.alchemicalWizardry.common.items.DemonicTelepositionFocus;
|
||||
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.ItemAlchemyBase;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemBloodLetterPack;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemComplexSpellCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemComponents;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemDiabloKey;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemIncense;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemRitualDismantler;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner;
|
||||
import WayofTime.alchemicalWizardry.common.items.LavaCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.items.LifeBucket;
|
||||
import WayofTime.alchemicalWizardry.common.items.MagicianBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.common.items.MasterBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.common.items.ReinforcedTelepositionFocus;
|
||||
import WayofTime.alchemicalWizardry.common.items.SacrificialDagger;
|
||||
import WayofTime.alchemicalWizardry.common.items.ScribeTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.TelepositionFocus;
|
||||
import WayofTime.alchemicalWizardry.common.items.TranscendentBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour;
|
||||
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourEarth;
|
||||
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourFire;
|
||||
@@ -59,122 +95,40 @@ 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 energyBlaster;
|
||||
public static Item energyBlasterSecondTier;
|
||||
public static Item energyBlasterThirdTier;
|
||||
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 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 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;
|
||||
|
||||
public static Item baseItems;
|
||||
public static Item baseAlchemyItems;
|
||||
// Armor
|
||||
public static Item itemBloodPack;
|
||||
|
||||
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 boundHelmet;
|
||||
public static Item boundPlate;
|
||||
public static Item boundLeggings;
|
||||
public static Item boundBoots;
|
||||
|
||||
public static Item boundHelmetWater;
|
||||
public static Item boundPlateWater;
|
||||
@@ -196,123 +150,146 @@ 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;
|
||||
|
||||
public static Item itemIncense;
|
||||
|
||||
public static Item ritualDismantler;
|
||||
// Unimplemented
|
||||
public static Item focusBloodBlast;
|
||||
public static Item focusGravityWell;
|
||||
public static Item itemBloodFrame;
|
||||
|
||||
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");
|
||||
energyBlaster = new EnergyBlast(1).setUnlocalizedName("energyBlast");
|
||||
energyBlasterSecondTier = new EnergyBlast(2).setUnlocalizedName("energyBlastSecondTier");
|
||||
energyBlasterThirdTier = new EnergyBlast(3).setUnlocalizedName("energyBlastThirdTier");
|
||||
creativeFiller = new CheatyItem().setUnlocalizedName("cheatyItem");
|
||||
|
||||
// Bound Tools/Weapons
|
||||
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");
|
||||
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");
|
||||
|
||||
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");
|
||||
@@ -334,122 +311,140 @@ 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");
|
||||
|
||||
itemIncense = new ItemIncense().setUnlocalizedName("bloodMagicIncenseItem");
|
||||
|
||||
// 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");
|
||||
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.energyBlaster, "energyBlaster");
|
||||
GameRegistry.registerItem(ModItems.energyBlasterSecondTier, "energyBlasterSecondTier");
|
||||
GameRegistry.registerItem(ModItems.energyBlasterThirdTier, "energyBlasterThirdTier");
|
||||
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.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.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.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");
|
||||
@@ -471,10 +466,105 @@ 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");
|
||||
|
||||
GameRegistry.registerItem(ModItems.itemIncense, "bloodMagicIncenseItem");
|
||||
// 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.ritualDismantler, "ritualDismantler");
|
||||
GameRegistry.registerItem(ModItems.activationCrystal, "activationCrystal");
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,29 @@
|
||||
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 ? checkedStack != null && keyStack.getItem() == checkedStack.getItem()
|
||||
&& (keyStack.getItem().getHasSubtypes() ? keyStack.getItemDamage() == checkedStack.getItemDamage()
|
||||
: true)
|
||||
: false);
|
||||
return (keyStack != null && keyStack.getItem() != null
|
||||
&& checkedStack != null
|
||||
&& keyStack.getItem() == checkedStack.getItem()
|
||||
&& (!keyStack.getItem().getHasSubtypes() || keyStack.getItemDamage() == checkedStack.getItemDamage()));
|
||||
}
|
||||
|
||||
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,9 +7,11 @@ 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<RoutingFocusPosAndFacing> locationList = new LinkedList<>();
|
||||
|
||||
public List<String> nameList = new LinkedList<>();
|
||||
|
||||
public int maximumAmount = 0;
|
||||
|
||||
@@ -24,6 +26,14 @@ 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;
|
||||
@@ -42,6 +52,7 @@ public class RoutingFocusParadigm {
|
||||
public void clear() {
|
||||
logicList.clear();
|
||||
locationList.clear();
|
||||
nameList.clear();
|
||||
maximumAmount = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,185 @@
|
||||
package WayofTime.alchemicalWizardry.api.items.interfaces;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public interface IBindable {
|
||||
|
||||
/**
|
||||
* Used by bound tools and the energy blaster/bazooka to check if they should skip their right click function.
|
||||
* Drains the soul network by the amount returned by rightClickCost.
|
||||
*/
|
||||
default boolean checkRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
if (toggle(par1ItemStack, par2World, par3EntityPlayer)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (par2World.isRemote) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!isActive(par1ItemStack) || SpellHelper.isFakePlayer(par2World, par3EntityPlayer)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (isBoundTool() && AlchemicalWizardry.disableBoundToolsRightClick) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionInhibit)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(par3EntityPlayer.capabilities.isCreativeMode
|
||||
|| EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, rightClickCost()))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the active state and owner information to an item if it has the relevant tags.
|
||||
*/
|
||||
default void addBindingInformation(ItemStack par1ItemStack, List par3List) {
|
||||
NBTTagCompound itemTag = getTag(par1ItemStack);
|
||||
if (itemTag.getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else if (itemTag.hasKey("isActive")) { // Only if present and set to false rather than not present at all
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
if (!itemTag.getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ itemTag.getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
static void setActive(ItemStack par1ItemStack, boolean state) {
|
||||
NBTTagCompound itemTag = getTag(par1ItemStack);
|
||||
itemTag.setBoolean("isActive", state);
|
||||
}
|
||||
|
||||
static boolean isActive(ItemStack par1ItemStack) {
|
||||
NBTTagCompound itemTag = getTag(par1ItemStack);
|
||||
return itemTag.getBoolean("isActive");
|
||||
}
|
||||
|
||||
static NBTTagCompound getTag(ItemStack par1ItemStack) {
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
itemTag = par1ItemStack.getTagCompound();
|
||||
}
|
||||
return itemTag;
|
||||
}
|
||||
|
||||
default boolean toggle(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
if (!checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) {
|
||||
setActive(par1ItemStack, !isActive(par1ItemStack));
|
||||
setDrainTick(par1ItemStack, par2World);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the current tick is the proper tick to do a passive drain based on getDrainTicks. If it is, it runs
|
||||
* doPassiveDrain and returns true. Otherwise, returns false.
|
||||
*/
|
||||
default boolean checkPassiveDrain(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
NBTTagCompound itemTag = getTag(par1ItemStack);
|
||||
if (par2World.getTotalWorldTime() % this.drainTicks() == itemTag.getInteger("worldTimeDelay")
|
||||
&& itemTag.getBoolean("isActive")) {
|
||||
this.doPassiveDrain(par1ItemStack, par3EntityPlayer);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* The action to take when checkPassiveDrain is run on the proper tick based on getDrainTicks.
|
||||
*/
|
||||
default void doPassiveDrain(ItemStack par1ItemStack, EntityPlayer par3EntityPlayer) {
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode) {
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, drainCost())) {
|
||||
setActive(par1ItemStack, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the drain tick delay based on the current world age and getDrainTicks().
|
||||
*/
|
||||
default void setDrainTick(ItemStack par1ItemStack, World par2World) {
|
||||
getTag(par1ItemStack)
|
||||
.setInteger("worldTimeDelay", (int) (par2World.getTotalWorldTime() - 1) % this.drainTicks());
|
||||
}
|
||||
|
||||
static boolean checkAndSetItemOwner(ItemStack item, EntityPlayer player) {
|
||||
return !SpellHelper.isFakePlayer(player) && SoulNetworkHandler.checkAndSetItemPlayer(item, player);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the item's owner even if it already has one.
|
||||
*/
|
||||
static void setItemOwner(ItemStack item, String ownerName) {
|
||||
NBTTagCompound tag = IBindable.getTag(item);
|
||||
tag.setString("ownerName", ownerName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the item's owner only if it does not already have one.
|
||||
*/
|
||||
static void checkAndSetItemOwner(ItemStack item, String ownerName) {
|
||||
NBTTagCompound tag = IBindable.getTag(item);
|
||||
if (tag.getString("ownerName").isEmpty()) {
|
||||
tag.setString("ownerName", ownerName);
|
||||
}
|
||||
}
|
||||
|
||||
static String getOwnerName(ItemStack item) {
|
||||
NBTTagCompound tag = IBindable.getTag(item);
|
||||
return tag.getString("ownerName");
|
||||
}
|
||||
|
||||
/**
|
||||
* The number of ticks between passive drains from the soul network while the item is active.
|
||||
*/
|
||||
default int drainTicks() {
|
||||
return 200;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the right click function should be disabled with the config disableBoundToolsRightClick.
|
||||
*/
|
||||
default boolean isBoundTool() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* The cost to use the right click function of this item. Used by bound tools and the Energy Blaster/Bazooka.
|
||||
*/
|
||||
default int rightClickCost() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* The amount of LP drained from the soul network for each passive drain while the item is active.
|
||||
*/
|
||||
default int drainCost() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -5,4 +5,8 @@ public interface IBloodOrb {
|
||||
int getMaxEssence();
|
||||
|
||||
int getOrbLevel();
|
||||
|
||||
default boolean isFilledForFree() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,39 @@
|
||||
package WayofTime.alchemicalWizardry.api.items.interfaces;
|
||||
|
||||
public interface ISigil {
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
|
||||
public interface ISigil extends IBindable {
|
||||
|
||||
/**
|
||||
* Toggles the state of the sigil. Returns true if the sigil is active after the toggle or false if it is inactive
|
||||
* after the toggle.
|
||||
*/
|
||||
default boolean toggleSigil(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
IBindable.setActive(par1ItemStack, !IBindable.isActive(par1ItemStack));
|
||||
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode
|
||||
&& !EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, this.drainCost())) {
|
||||
IBindable.setActive(par1ItemStack, false);
|
||||
}
|
||||
|
||||
if (IBindable.isActive(par1ItemStack)) {
|
||||
par1ItemStack.setItemDamage(1);
|
||||
this.setDrainTick(par1ItemStack, par2World);
|
||||
return true;
|
||||
} else {
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return false if this sigil should not be able to be put in the Sigil of Holding.
|
||||
*/
|
||||
default boolean canBeStored() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+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 = 400;
|
||||
public static int soulFrayDuration = 240;
|
||||
public static Potion soulFrayId;
|
||||
|
||||
public static float getPlayerIncense(EntityPlayer player) {
|
||||
|
||||
+27
-23
@@ -14,6 +14,8 @@ import WayofTime.alchemicalWizardry.api.event.AddToNetworkEvent;
|
||||
import WayofTime.alchemicalWizardry.api.event.ItemBindEvent;
|
||||
import WayofTime.alchemicalWizardry.api.event.ItemDrainInContainerEvent;
|
||||
import WayofTime.alchemicalWizardry.api.event.ItemDrainNetworkEvent;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
|
||||
@@ -35,11 +37,12 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
public static int getCurrentMaxOrb(String ownerName) {
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
World world = mcServer.worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null) {
|
||||
@@ -51,11 +54,12 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
public static void setMaxOrbToMax(String ownerName, int maxOrb) {
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
World world = mcServer.worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null) {
|
||||
@@ -96,7 +100,7 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
public static int syphonFromNetwork(String ownerName, int damageToBeDone) {
|
||||
MinecraftServer mcServer = MinecraftServer.getServer();
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null || mcServer.worldServers.length == 0) {
|
||||
return 0;
|
||||
}
|
||||
@@ -192,11 +196,12 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
public static boolean canSyphonFromOnlyNetwork(String ownerName, int damageToBeDone) {
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
World world = mcServer.worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null) {
|
||||
@@ -208,11 +213,12 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
public static int getCurrentEssence(String ownerName) {
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
World world = mcServer.worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null) {
|
||||
@@ -224,11 +230,12 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
public static void setCurrentEssence(String ownerName, int essence) {
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
World world = mcServer.worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null) {
|
||||
@@ -255,11 +262,12 @@ public class SoulNetworkHandler {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
World world = mcServer.worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, event.ownerNetwork);
|
||||
|
||||
if (data == null) {
|
||||
@@ -273,7 +281,7 @@ public class SoulNetworkHandler {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int newEss = Math.min(event.maximum, currEss + event.addedAmount);
|
||||
int newEss = (int) Math.min(Integer.MAX_VALUE, Math.min(event.maximum, (long) currEss + event.addedAmount));
|
||||
if (event.getResult() != Event.Result.DENY) {
|
||||
data.currentEssence = newEss;
|
||||
}
|
||||
@@ -333,14 +341,9 @@ public class SoulNetworkHandler {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void checkAndSetItemOwner(ItemStack item, String ownerName) {
|
||||
if (item.getTagCompound() == null) {
|
||||
item.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if (item.getTagCompound().getString("ownerName").equals("")) {
|
||||
item.getTagCompound().setString("ownerName", ownerName);
|
||||
}
|
||||
IBindable.checkAndSetItemOwner(item, ownerName);
|
||||
}
|
||||
|
||||
public static String getUsername(EntityPlayer player) {
|
||||
@@ -348,10 +351,11 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
public static EntityPlayer getPlayerForUsername(String str) {
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null) {
|
||||
return null;
|
||||
}
|
||||
return MinecraftServer.getServer().getConfigurationManager().func_152612_a(str);
|
||||
return mcServer.getConfigurationManager().func_152612_a(str);
|
||||
}
|
||||
|
||||
public static void causeNauseaToPlayer(ItemStack stack) {
|
||||
|
||||
@@ -17,6 +17,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
|
||||
public class SpellParadigmTool extends SpellParadigm {
|
||||
@@ -159,7 +160,7 @@ public class SpellParadigmTool extends SpellParadigm {
|
||||
itemTool.setDuration(toolStack, world, this.duration);
|
||||
itemTool.loadParadigmIntoStack(toolStack, this.bufferedEffectList);
|
||||
|
||||
SoulNetworkHandler.checkAndSetItemOwner(toolStack, SoulNetworkHandler.getOwnerName(crystalStack));
|
||||
IBindable.checkAndSetItemOwner(toolStack, SoulNetworkHandler.getOwnerName(crystalStack));
|
||||
|
||||
itemTool.setContainedCrystal(toolStack, crystalStack);
|
||||
|
||||
|
||||
@@ -7,11 +7,14 @@ import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
public class IMCForNEI {
|
||||
|
||||
public static void IMCSender() {
|
||||
sendHandler("alchemicalwizardry.meteor", "AWWayofTime:masterStone", 130);
|
||||
sendHandler("alchemicalwizardry.meteor", "AWWayofTime:masterStone", 181, 1);
|
||||
sendHandler("alchemicalwizardry.calcinator", "AWWayofTime:blockAlchemicCalcinator", 55, 5);
|
||||
sendCatalyst("alchemicalwizardry.meteor", "AWWayofTime:masterStone");
|
||||
sendCatalyst("alchemicalwizardry.bindingritual", "AWWayofTime:masterStone");
|
||||
sendCatalyst("alchemicalwizardry.calcinator", "AWWayofTime:blockAlchemicCalcinator");
|
||||
}
|
||||
|
||||
private static void sendHandler(String handlerName, String stack, int height) {
|
||||
private static void sendHandler(String handlerName, String stack, int height, int recipesPerPage) {
|
||||
NBTTagCompound NBT = new NBTTagCompound();
|
||||
NBT.setString("handler", handlerName);
|
||||
NBT.setString("modName", "Blood Magic");
|
||||
@@ -19,7 +22,7 @@ public class IMCForNEI {
|
||||
NBT.setBoolean("modRequired", true);
|
||||
NBT.setString("itemName", stack);
|
||||
NBT.setInteger("handlerHeight", height);
|
||||
NBT.setInteger("maxRecipesPerPage", 1);
|
||||
NBT.setInteger("maxRecipesPerPage", recipesPerPage);
|
||||
FMLInterModComms.sendMessage("NotEnoughItems", "registerHandlerInfo", NBT);
|
||||
}
|
||||
|
||||
|
||||
+21
-29
@@ -1,15 +1,16 @@
|
||||
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.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;
|
||||
|
||||
@@ -28,28 +29,19 @@ public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
public class CachedAlchemyRecipe extends CachedRecipe {
|
||||
|
||||
public class BloodOrbs {
|
||||
|
||||
public PositionedStack stack;
|
||||
|
||||
public BloodOrbs(ItemStack orb) {
|
||||
this.stack = new PositionedStack(orb, 136, 47, false);
|
||||
}
|
||||
}
|
||||
|
||||
ArrayList<BloodOrbs> orbs;
|
||||
ArrayList<ItemStack> orbs;
|
||||
PositionedStack output;
|
||||
List<PositionedStack> inputs;
|
||||
int lp;
|
||||
|
||||
public CachedAlchemyRecipe(AlchemyRecipe recipe, ItemStack orb) {
|
||||
this(recipe);
|
||||
this.orbs = new ArrayList<BloodOrbs>();
|
||||
orbs.add(new BloodOrbs(orb));
|
||||
this.orbs = new ArrayList<>();
|
||||
orbs.add(orb);
|
||||
}
|
||||
|
||||
public CachedAlchemyRecipe(AlchemyRecipe recipe) {
|
||||
List<PositionedStack> inputs = new ArrayList<PositionedStack>();
|
||||
List<PositionedStack> inputs = new ArrayList<>();
|
||||
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));
|
||||
@@ -59,10 +51,10 @@ public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler {
|
||||
this.inputs = inputs;
|
||||
this.output = new PositionedStack(recipe.getResult(), 76, 25);
|
||||
this.lp = recipe.getAmountNeeded() * 100;
|
||||
this.orbs = new ArrayList<BloodOrbs>();
|
||||
this.orbs = new ArrayList<>();
|
||||
for (Item orb : getBloodOrbs()) {
|
||||
if (((IBloodOrb) orb).getOrbLevel() >= recipe.getOrbLevel()) {
|
||||
orbs.add(new BloodOrbs(new ItemStack(orb)));
|
||||
orbs.add(new ItemStack(orb));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -79,8 +71,11 @@ public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public PositionedStack getOtherStack() {
|
||||
if (orbs == null || orbs.size() <= 0) return null;
|
||||
return orbs.get((cycleticks / 48) % orbs.size()).stack;
|
||||
if (orbs == null || orbs.isEmpty()) return null;
|
||||
PositionedStack stack = new PositionedStack(orbs, 136, 47, false);
|
||||
stack.setPermutationToRender((cycleticks / 48) % orbs.size());
|
||||
stack.setMaxSize(1);
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,10 +117,10 @@ public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
if (ingredient.getItem() instanceof IBloodOrb) {
|
||||
if (ingredient.getItem() instanceof IBloodOrb orb) {
|
||||
for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) {
|
||||
if (recipe == null) continue;
|
||||
if (((IBloodOrb) ingredient.getItem()).getOrbLevel() >= recipe.getOrbLevel()) {
|
||||
if (orb.getOrbLevel() >= recipe.getOrbLevel()) {
|
||||
arecipes.add(new CachedAlchemyRecipe(recipe, ingredient));
|
||||
}
|
||||
}
|
||||
@@ -145,17 +140,14 @@ public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public void drawExtras(int id) {
|
||||
CachedAlchemyRecipe cache = (CachedAlchemyRecipe) arecipes.get(id);
|
||||
Minecraft.getMinecraft().fontRenderer.drawString("\u00a77" + cache.lp + "LP", getLPX(cache.lp), 34, 0);
|
||||
CachedAlchemyRecipe recipe = (CachedAlchemyRecipe) arecipes.get(id);
|
||||
String text = EnumChatFormatting.GRAY.toString() + recipe.lp + "LP";
|
||||
mc.fontRenderer.drawString(text, getLPX(text), 28, 0);
|
||||
}
|
||||
|
||||
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;
|
||||
public int getLPX(String text) {
|
||||
int textWidth = mc.fontRenderer.getStringWidth(text);
|
||||
return 144 - (textWidth / 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,6 +6,7 @@ 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;
|
||||
|
||||
@@ -65,7 +66,7 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
for (AltarRecipe recipe : AltarRecipeRegistry.altarRecipes) {
|
||||
if (NEIServerUtils.areStacksSameTypeCraftingWithNBT(recipe.result, result)) {
|
||||
if (recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe));
|
||||
if (recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -74,7 +75,7 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
for (AltarRecipe recipe : AltarRecipeRegistry.altarRecipes) {
|
||||
if (NEIServerUtils.areStacksSameTypeCraftingWithNBT(recipe.requiredItem, ingredient)) {
|
||||
if (recipe != null && recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe));
|
||||
if (recipe.result != null) arecipes.add(new CachedAltarRecipe(recipe));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -83,21 +84,18 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
|
||||
public void drawExtras(int id) {
|
||||
CachedAltarRecipe recipe = (CachedAltarRecipe) arecipes.get(id);
|
||||
Minecraft.getMinecraft().fontRenderer.drawString(
|
||||
"\u00a77" + StatCollector.translateToLocal("bm.string.tier") + ": " + recipe.tier,
|
||||
EnumChatFormatting.GRAY + StatCollector.translateToLocal("bm.string.tier") + ": " + recipe.tier,
|
||||
78,
|
||||
5,
|
||||
0);
|
||||
Minecraft.getMinecraft().fontRenderer.drawString("\u00a77" + "LP: " + recipe.lp_amount, 78, 15, 0);
|
||||
Minecraft.getMinecraft().fontRenderer
|
||||
.drawString(EnumChatFormatting.GRAY + "LP: " + recipe.lp_amount, 78, 15, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> handleTooltip(GuiRecipe<?> gui, List<String> currenttip, int id) {
|
||||
super.handleTooltip(gui, currenttip, id);
|
||||
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) {
|
||||
if (altarRect(gui, id).contains(GuiDraw.getMousePosition())) {
|
||||
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");
|
||||
@@ -105,6 +103,13 @@ 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";
|
||||
@@ -117,7 +122,7 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return " " + StatCollector.translateToLocal("tile.bloodAltar.name");
|
||||
return StatCollector.translateToLocal("tile.bloodAltar.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,14 +1,22 @@
|
||||
package WayofTime.alchemicalWizardry.client.nei;
|
||||
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry;
|
||||
import WayofTime.alchemicalWizardry.client.nei.widgets.ReagentInfo;
|
||||
import WayofTime.alchemicalWizardry.client.nei.widgets.RitualInfo;
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.guihook.GuiContainerManager;
|
||||
import codechicken.nei.recipe.GuiRecipe;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
|
||||
/**
|
||||
@@ -16,6 +24,9 @@ import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
*/
|
||||
public class NEIBindingRitualHandler extends TemplateRecipeHandler {
|
||||
|
||||
private static final RitualInfo ritualInfo = new RitualInfo(1f, "AW006Binding");
|
||||
private static final ReagentInfo reagentInfo = new ReagentInfo(1f);
|
||||
|
||||
public class CachedBindingRecipe extends CachedRecipe {
|
||||
|
||||
PositionedStack input, output;
|
||||
@@ -53,7 +64,7 @@ public class NEIBindingRitualHandler extends TemplateRecipeHandler {
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
for (BindingRecipe recipe : BindingRegistry.bindingRecipes) {
|
||||
if (NEIServerUtils.areStacksSameTypeCraftingWithNBT(recipe.outputItem, result)) {
|
||||
if (recipe != null && recipe.outputItem != null) {
|
||||
if (recipe.outputItem != null) {
|
||||
arecipes.add(new CachedBindingRecipe(recipe));
|
||||
}
|
||||
}
|
||||
@@ -64,13 +75,41 @@ public class NEIBindingRitualHandler extends TemplateRecipeHandler {
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
for (BindingRecipe recipe : BindingRegistry.bindingRecipes) {
|
||||
if (NEIServerUtils.areStacksSameTypeCraftingWithNBT(recipe.requiredItem, ingredient)) {
|
||||
if (recipe != null && recipe.outputItem != null) {
|
||||
if (recipe.outputItem != null) {
|
||||
arecipes.add(new CachedBindingRecipe(recipe));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(int recipe) {
|
||||
super.drawExtras(recipe);
|
||||
|
||||
// Only shows these for the first result
|
||||
if (recipe == 0) {
|
||||
ritualInfo.onDraw(0, 0);
|
||||
reagentInfo.onDraw(150, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> handleTooltip(GuiRecipe<?> gui, List<String> currenttip, int recipeIndex) {
|
||||
if (GuiContainerManager.shouldShowTooltip(gui) && currenttip.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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.handleTooltip(gui, currenttip, recipeIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOverlayIdentifier() {
|
||||
return "alchemicalwizardry.bindingritual";
|
||||
|
||||
+13
-26
@@ -2,7 +2,6 @@ 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;
|
||||
|
||||
@@ -33,21 +32,17 @@ 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++) {
|
||||
if (items[y * width + x] == null) continue;
|
||||
|
||||
Object o = items[y * width + x];
|
||||
if (o == null) continue;
|
||||
|
||||
if (o instanceof ItemStack) {
|
||||
PositionedStack stack = new PositionedStack(
|
||||
items[y * width + x],
|
||||
25 + x * 18,
|
||||
6 + y * 18,
|
||||
false);
|
||||
PositionedStack stack = new PositionedStack(o, 25 + x * 18, 6 + y * 18, false);
|
||||
stack.setMaxSize(1);
|
||||
ingredients.add(stack);
|
||||
} else if (o instanceof Integer) {
|
||||
} else if (o instanceof Integer i) {
|
||||
ArrayList<ItemStack> orbs = new ArrayList<>();
|
||||
for (Item item : getBloodOrbs()) {
|
||||
if (((IBloodOrb) item).getOrbLevel() >= (Integer) o) {
|
||||
if (((IBloodOrb) item).getOrbLevel() >= i) {
|
||||
orbs.add(new ItemStack(item));
|
||||
}
|
||||
}
|
||||
@@ -64,13 +59,12 @@ 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 : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) {
|
||||
if (irecipe instanceof ShapedBloodOrbRecipe) {
|
||||
CachedBloodOrbRecipe recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe);
|
||||
for (IRecipe irecipe : CraftingManager.getInstance().getRecipeList()) {
|
||||
if (irecipe instanceof ShapedBloodOrbRecipe orbRecipe) {
|
||||
CachedBloodOrbRecipe recipe = forgeShapedRecipe(orbRecipe);
|
||||
if (recipe == null) continue;
|
||||
|
||||
recipe.computeVisuals();
|
||||
@@ -82,12 +76,11 @@ public class NEIBloodOrbShapedHandler extends ShapedRecipeHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) {
|
||||
if (irecipe instanceof ShapedBloodOrbRecipe) {
|
||||
CachedBloodOrbRecipe recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe);
|
||||
for (IRecipe irecipe : CraftingManager.getInstance().getRecipeList()) {
|
||||
if (irecipe instanceof ShapedBloodOrbRecipe orbRecipe) {
|
||||
CachedBloodOrbRecipe recipe = forgeShapedRecipe(orbRecipe);
|
||||
if (recipe == null || !NEIServerUtils.areStacksSameTypeCraftingWithNBT(recipe.result.item, result))
|
||||
continue;
|
||||
|
||||
@@ -97,12 +90,11 @@ public class NEIBloodOrbShapedHandler extends ShapedRecipeHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) {
|
||||
for (IRecipe irecipe : CraftingManager.getInstance().getRecipeList()) {
|
||||
CachedShapedRecipe recipe = null;
|
||||
if (irecipe instanceof ShapedBloodOrbRecipe) recipe = forgeShapedRecipe((ShapedBloodOrbRecipe) irecipe);
|
||||
if (irecipe instanceof ShapedBloodOrbRecipe orbRecipe) recipe = forgeShapedRecipe(orbRecipe);
|
||||
|
||||
if (recipe == null || !recipe.contains(recipe.ingredients, ingredient.getItem())) continue;
|
||||
|
||||
@@ -134,11 +126,6 @@ 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");
|
||||
|
||||
+11
-28
@@ -1,6 +1,5 @@
|
||||
package WayofTime.alchemicalWizardry.client.nei;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -39,10 +38,10 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler {
|
||||
6 + stackorder[ingred][1] * 18);
|
||||
stack.setMaxSize(1);
|
||||
ingredients.add(stack);
|
||||
} else if (o instanceof Integer) {
|
||||
} else if (o instanceof Integer i) {
|
||||
ArrayList<ItemStack> orbs = new ArrayList<>();
|
||||
for (Item item : NEIConfig.getBloodOrbs()) {
|
||||
if (((IBloodOrb) item).getOrbLevel() >= (Integer) o) {
|
||||
if (((IBloodOrb) item).getOrbLevel() >= i) {
|
||||
orbs.add(new ItemStack(item));
|
||||
}
|
||||
}
|
||||
@@ -65,15 +64,13 @@ 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)
|
||||
recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe);
|
||||
if (irecipe instanceof ShapelessBloodOrbRecipe orbRecipe) recipe = forgeShapelessRecipe(orbRecipe);
|
||||
|
||||
if (recipe == null) continue;
|
||||
|
||||
@@ -84,15 +81,13 @@ 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)
|
||||
recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe);
|
||||
if (irecipe instanceof ShapelessBloodOrbRecipe orbRecipe) recipe = forgeShapelessRecipe(orbRecipe);
|
||||
|
||||
if (recipe == null) continue;
|
||||
|
||||
@@ -101,14 +96,12 @@ 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)
|
||||
recipe = forgeShapelessRecipe((ShapelessBloodOrbRecipe) irecipe);
|
||||
if (irecipe instanceof ShapelessBloodOrbRecipe orbRecipe) recipe = forgeShapelessRecipe(orbRecipe);
|
||||
|
||||
if (recipe == null) continue;
|
||||
|
||||
@@ -128,16 +121,6 @@ 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");
|
||||
|
||||
@@ -0,0 +1,206 @@
|
||||
package WayofTime.alchemicalWizardry.client.nei;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.client.ClientUtils.mc;
|
||||
import static WayofTime.alchemicalWizardry.client.nei.NEIConfig.ARROW_TEXTURE;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
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.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 int amount;
|
||||
private final int color;
|
||||
|
||||
public CachedReagentInfo(ReagentStack reagent) {
|
||||
this.reagent = reagent.reagent;
|
||||
this.amount = reagent.amount;
|
||||
this.color = reagent.reagent.getColourRed() << 16 | reagent.reagent.getColourGreen() << 8
|
||||
| reagent.reagent.getColourBlue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PositionedStack getResult() {
|
||||
return new PositionedStack(ReagentRegistry.getItemForReagent(reagent), 32, 6);
|
||||
}
|
||||
|
||||
public Reagent getReagent() {
|
||||
return reagent;
|
||||
}
|
||||
|
||||
public int getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void onDraw(int x, int y) {
|
||||
drawColoredProgressBar(x, y);
|
||||
|
||||
String amountText = String.format("%,d AR", amount);
|
||||
FontRenderer fontRenderer = mc.fontRenderer;
|
||||
|
||||
int textWidth = fontRenderer.getStringWidth(amountText);
|
||||
int textX = x + 84 - (textWidth / 2);
|
||||
int textY = y + 19;
|
||||
|
||||
fontRenderer.drawString(amountText, textX, textY, 0x000000);
|
||||
|
||||
textWidth = fontRenderer.getStringWidth(reagent.name);
|
||||
textX = x + 84 - (textWidth / 2);
|
||||
textY = y + 29;
|
||||
|
||||
fontRenderer.drawString(reagent.name, textX, textY, color);
|
||||
}
|
||||
|
||||
private void drawColoredProgressBar(int x, int y) {
|
||||
int arrowX = x + 25;
|
||||
int arrowY = y + 19;
|
||||
int arrowWidth = 24;
|
||||
int arrowHeight = 16;
|
||||
|
||||
int fillTime = 192;
|
||||
int holdTime = 8;
|
||||
int totalCycle = fillTime + holdTime;
|
||||
|
||||
int cycleTick = cycleticks % totalCycle;
|
||||
|
||||
int fillWidth;
|
||||
if (cycleTick < fillTime) {
|
||||
fillWidth = cycleTick * arrowWidth / fillTime;
|
||||
} else {
|
||||
fillWidth = arrowWidth;
|
||||
}
|
||||
|
||||
TextureManager texManager = mc.getTextureManager();
|
||||
texManager.bindTexture(ARROW_TEXTURE);
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
float r = ((color >> 16) & 0xFF) / 255f;
|
||||
float g = ((color >> 8) & 0xFF) / 255f;
|
||||
float b = (color & 0xFF) / 255f;
|
||||
|
||||
GL11.glColor4f(r, g, b, 1.0f);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
|
||||
tessellator.addVertexWithUV(arrowX, arrowY + arrowHeight, 0, 0, 1);
|
||||
tessellator.addVertexWithUV(arrowX + fillWidth, arrowY + arrowHeight, 0, fillWidth / (float) arrowWidth, 1);
|
||||
tessellator.addVertexWithUV(arrowX + fillWidth, arrowY, 0, fillWidth / (float) arrowWidth, 0);
|
||||
tessellator.addVertexWithUV(arrowX, arrowY, 0, 0, 0);
|
||||
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PositionedStack getOtherStack() {
|
||||
ItemStack[] orbStacks = NEIConfig.getBloodOrbs().stream().map(ItemStack::new).toArray(ItemStack[]::new);
|
||||
|
||||
PositionedStack stack = new PositionedStack(orbStacks, 32, 33, true);
|
||||
stack.setPermutationToRender((cycleticks / 20) % orbStacks.length);
|
||||
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
|
||||
@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));
|
||||
} else { // 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();
|
||||
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(54, 23, 23, 16), "alchemicalwizardry.calcinator"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return new ResourceLocation("alchemicalwizardry", "gui/nei/calcinator.png").toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return "Alchemic Calcinator";
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ 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;
|
||||
@@ -13,6 +14,11 @@ import codechicken.nei.api.IConfigureNEI;
|
||||
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 static ArrayList<Item> getBloodOrbs() {
|
||||
if (bloodOrbs == null) {
|
||||
@@ -44,6 +50,19 @@ public class NEIConfig implements IConfigureNEI {
|
||||
return bloodOrbsTemp;
|
||||
}
|
||||
|
||||
public static ArrayList<Item> getOrbsByCapacity() {
|
||||
if (byCapacity == null) {
|
||||
byCapacity = new ArrayList<>(getBloodOrbs());
|
||||
byCapacity.sort((a, b) -> {
|
||||
if (a instanceof IBloodOrb && b instanceof IBloodOrb) {
|
||||
return Integer.compare(((IBloodOrb) a).getMaxEssence(), ((IBloodOrb) b).getMaxEssence());
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
return byCapacity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadConfig() {
|
||||
API.registerRecipeHandler(new NEIAlchemyRecipeHandler());
|
||||
@@ -58,6 +77,8 @@ 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
|
||||
|
||||
+245
-50
@@ -1,76 +1,150 @@
|
||||
package WayofTime.alchemicalWizardry.client.nei;
|
||||
|
||||
import java.awt.*;
|
||||
import static WayofTime.alchemicalWizardry.client.ClientUtils.mc;
|
||||
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigmComponent;
|
||||
import com.google.common.base.Joiner;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.spell.APISpellHelper;
|
||||
import WayofTime.alchemicalWizardry.client.nei.widgets.CostInfo;
|
||||
import WayofTime.alchemicalWizardry.client.nei.widgets.RadiusInfo;
|
||||
import WayofTime.alchemicalWizardry.client.nei.widgets.ReagentInfo;
|
||||
import WayofTime.alchemicalWizardry.client.nei.widgets.RitualInfo;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.Meteor;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorComponent;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorReagent;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry;
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.guihook.GuiContainerManager;
|
||||
import codechicken.nei.recipe.GuiRecipe;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
|
||||
public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
private static final RitualInfo ritualInfo = new RitualInfo(0.75f, "AW019FallingTower");
|
||||
private static final ReagentInfo reagentInfo = new ReagentInfo(0.75f);
|
||||
|
||||
public class CachedMeteorRecipe extends CachedRecipe {
|
||||
|
||||
private final List<PositionedStack> input = new ArrayList<>();
|
||||
private final List<PositionedStack> outputs = new ArrayList<>();
|
||||
private final int cost;
|
||||
private final int radius;
|
||||
private final CostInfo costInfo;
|
||||
private final RadiusInfo radiusInfo;
|
||||
private Point focus;
|
||||
|
||||
public CachedMeteorRecipe(MeteorParadigm meteor, ItemStack focusStack) {
|
||||
this.input.add(new PositionedStack(meteor.focusStack, 74, 4));
|
||||
public float fillerChance;
|
||||
|
||||
public CachedMeteorRecipe(Meteor meteor, ItemStack focusStack) {
|
||||
this.input.add(new PositionedStack(meteor.focusItem, 75, 4));
|
||||
int row = 0;
|
||||
int col = 0;
|
||||
|
||||
float totalMeteorWeight = meteor.getTotalMeteorWeight();
|
||||
List<MeteorParadigmComponent> sortedComponents = new ArrayList<>(meteor.componentList);
|
||||
sortedComponents.sort(Comparator.comparingInt(c -> -c.chance));
|
||||
float totalComponentWeight = MeteorComponent.getTotalListWeight(meteor.ores);
|
||||
fillerChance = meteor.fillerChance;
|
||||
List<MeteorComponent> sortedComponents = new ArrayList<>(meteor.ores);
|
||||
sortedComponents.sort(Comparator.comparingInt(c -> -c.getWeight()));
|
||||
|
||||
for (MeteorParadigmComponent component : sortedComponents) {
|
||||
ItemStack stack = component.getValidBlockParadigm();
|
||||
int xPos = 3 + 18 * col;
|
||||
int yPos = 37 + 18 * row;
|
||||
float fillerRatio = (float) (fillerChance / 100.0);
|
||||
float componentRatio = 1 - fillerRatio;
|
||||
|
||||
List<String> tooltips = new ArrayList<>();
|
||||
if (stack == null) {
|
||||
stack = new ItemStack(Blocks.fire);
|
||||
tooltips.add(String.format("no entries found for oredict \"%s\"", component.getOreDictName()));
|
||||
if (fillerChance < 100) {
|
||||
for (MeteorComponent component : sortedComponents) {
|
||||
ItemStack stack = component.getBlock();
|
||||
int xPos = 3 + 18 * col;
|
||||
int yPos = 37 + 18 * row;
|
||||
|
||||
List<String> tooltips = new ArrayList<>();
|
||||
float chance = component.getWeight() / totalComponentWeight * componentRatio;
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.chance", getFormattedChance(chance)));
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.amount", getEstimatedAmount(chance, meteor.radius)));
|
||||
if (!component.getRequiredReagents().isEmpty()) {
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.reagent", getReagentStrings(component)));
|
||||
}
|
||||
this.outputs.add(new TooltipStack(stack, xPos, yPos, tooltips));
|
||||
|
||||
col++;
|
||||
if (col > 8) {
|
||||
col = 0;
|
||||
row++;
|
||||
}
|
||||
|
||||
if (matchItem(focusStack, stack)) {
|
||||
this.focus = new Point(xPos - 1, yPos - 1);
|
||||
}
|
||||
}
|
||||
float chance = component.getChance() / totalMeteorWeight;
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.chance", getFormattedChance(chance)));
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.amount", getEstimatedAmount(chance, meteor.radius)));
|
||||
this.outputs.add(new TooltipStack(stack, xPos, yPos, tooltips));
|
||||
|
||||
col++;
|
||||
if (col > 8) {
|
||||
}
|
||||
if (fillerChance > 0) {
|
||||
if (col != 0) {
|
||||
col = 0;
|
||||
row++;
|
||||
}
|
||||
|
||||
if (focusStack != null && matchItem(focusStack, stack)) {
|
||||
this.focus = new Point(xPos - 1, yPos - 1);
|
||||
List<MeteorComponent> sortedFiller = new ArrayList<>(meteor.filler);
|
||||
sortedFiller.sort(Comparator.comparingInt(c -> -c.getWeight()));
|
||||
float totalFillerWeight = MeteorComponent.getTotalListWeight(meteor.filler);
|
||||
|
||||
for (MeteorComponent filler : sortedFiller) {
|
||||
ItemStack stack = filler.getBlock();
|
||||
int xPos = 3 + 18 * col;
|
||||
int yPos = 37 + 18 * row;
|
||||
|
||||
List<String> tooltips = new ArrayList<>();
|
||||
float chance = filler.getWeight() / totalFillerWeight * fillerRatio;
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.chance", getFormattedChance(chance)));
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.amount", getEstimatedAmount(chance, meteor.radius)));
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.filler"));
|
||||
if (!filler.getRequiredReagents().isEmpty()) {
|
||||
tooltips.add(I18n.format("nei.recipe.meteor.reagent", getReagentStrings(filler)));
|
||||
}
|
||||
this.outputs.add(new TooltipStack(stack, xPos, yPos, tooltips));
|
||||
|
||||
col++;
|
||||
if (col > 8) {
|
||||
col = 0;
|
||||
row++;
|
||||
}
|
||||
|
||||
if (matchItem(focusStack, stack)) {
|
||||
this.focus = new Point(xPos - 1, yPos - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.radius = meteor.radius;
|
||||
this.cost = meteor.cost;
|
||||
|
||||
this.costInfo = new CostInfo(1.0f, meteor.cost);
|
||||
this.radiusInfo = new RadiusInfo(1.0f, meteor.radius);
|
||||
}
|
||||
|
||||
private String getReagentStrings(MeteorComponent component) {
|
||||
ArrayList<Reagent> reagents = component.getRequiredReagents();
|
||||
ArrayList<String> reagentNames = new ArrayList<>();
|
||||
for (Reagent r : reagents) {
|
||||
reagentNames.add(r.name);
|
||||
}
|
||||
return Joiner.on(", ").join(reagentNames);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -89,11 +163,11 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
}
|
||||
|
||||
public int getCost() {
|
||||
return cost;
|
||||
return costInfo.getCost();
|
||||
}
|
||||
|
||||
public int getRadius() {
|
||||
return radius;
|
||||
return radiusInfo.getRadius();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +179,7 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
if (outputId.equals(getOverlayIdentifier()) && getClass() == NEIMeteorRecipeHandler.class) {
|
||||
for (MeteorParadigm meteor : getSortedMeteors()) {
|
||||
for (Meteor meteor : getSortedMeteors()) {
|
||||
arecipes.add(new CachedMeteorRecipe(meteor, null));
|
||||
}
|
||||
} else {
|
||||
@@ -115,8 +189,11 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
for (MeteorParadigm meteor : getSortedMeteors()) {
|
||||
if (meteor.componentList.stream().anyMatch(m -> matchItem(result, m.getValidBlockParadigm()))) {
|
||||
for (Meteor meteor : getSortedMeteors()) {
|
||||
if (meteor.ores.stream().anyMatch(m -> matchItem(result, m.getBlock()))) {
|
||||
arecipes.add(new CachedMeteorRecipe(meteor, result));
|
||||
}
|
||||
if (meteor.fillerChance > 0 && meteor.filler.stream().anyMatch(m -> matchItem(result, m.getBlock()))) {
|
||||
arecipes.add(new CachedMeteorRecipe(meteor, result));
|
||||
}
|
||||
}
|
||||
@@ -124,8 +201,8 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
for (MeteorParadigm meteor : getSortedMeteors()) {
|
||||
if (matchItem(ingredient, meteor.focusStack)) {
|
||||
for (Meteor meteor : getSortedMeteors()) {
|
||||
if (matchItem(ingredient, meteor.focusItem)) {
|
||||
arecipes.add(new CachedMeteorRecipe(meteor, null));
|
||||
}
|
||||
}
|
||||
@@ -136,14 +213,42 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
if (NEIServerUtils.areStacksSameTypeCrafting(compared, compareTo)) {
|
||||
return true;
|
||||
}
|
||||
// ignore ore variants (like basalt ore)
|
||||
|
||||
// Ignore GregTech ore variants (like basalt ore)
|
||||
if (compared.getUnlocalizedName().startsWith("gt.blockores")
|
||||
&& compareTo.getUnlocalizedName().startsWith("gt.blockores")) {
|
||||
return compared.getItemDamage() % 1000 == compareTo.getItemDamage() % 1000;
|
||||
}
|
||||
|
||||
// Check oredicts for ores. Checks for direct matches (oreIron with oreIron) as well as IC2/GT crushed ores
|
||||
// (crushedGold with oreGold), EFR raw ores (rawCopper with oreCopper (although those all seem to have oreX
|
||||
// anyways)), and GT:NH raw ores (rawOreDiamond with oreDiamond).
|
||||
String[] prefixes = { "crushed", "rawOre", "raw" };
|
||||
for (int i : OreDictionary.getOreIDs(compareTo)) {
|
||||
String s1 = OreDictionary.getOreName(i);
|
||||
if (s1.startsWith("ore")) {
|
||||
for (int j : OreDictionary.getOreIDs(compared)) {
|
||||
if (i == j) {
|
||||
return true;
|
||||
}
|
||||
String s2 = OreDictionary.getOreName(j);
|
||||
for (String prefix : prefixes) {
|
||||
if (i == OreDictionary.getOreID(s2.replaceFirst("^" + prefix, "ore"))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int recipiesPerPage() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return new ResourceLocation("alchemicalwizardry", "gui/nei/meteor.png").toString();
|
||||
@@ -157,12 +262,10 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
@Override
|
||||
public void drawExtras(int recipe) {
|
||||
CachedMeteorRecipe meteorRecipe = (CachedMeteorRecipe) this.arecipes.get(recipe);
|
||||
int cost = meteorRecipe.getCost();
|
||||
int radius = meteorRecipe.getRadius();
|
||||
Minecraft.getMinecraft().fontRenderer
|
||||
.drawString(I18n.format("nei.recipe.meteor.cost", String.format("%,d", cost)), 2, 168, 0x000000);
|
||||
Minecraft.getMinecraft().fontRenderer
|
||||
.drawString(I18n.format("nei.recipe.meteor.radius", radius), 2, 179, 0x000000);
|
||||
meteorRecipe.costInfo.onDraw(30, 4);
|
||||
meteorRecipe.radiusInfo.onDraw(120, 4);
|
||||
ritualInfo.onDraw(0, 0);
|
||||
reagentInfo.onDraw(153, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -183,9 +286,8 @@ 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)) break;
|
||||
if (!(pStack instanceof TooltipStack tStack)) break;
|
||||
|
||||
TooltipStack tStack = (TooltipStack) pStack;
|
||||
if (Arrays.stream(tStack.items).anyMatch(s -> NEIServerUtils.areStacksSameTypeCrafting(s, stack))) {
|
||||
currenttip.addAll(tStack.getTooltips());
|
||||
break;
|
||||
@@ -194,13 +296,92 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> handleTooltip(GuiRecipe<?> gui, List<String> currenttip, int recipeIndex) {
|
||||
if (GuiContainerManager.shouldShowTooltip(gui) && currenttip.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 (APISpellHelper.getPlayerLPTag(mc.thePlayer) < cachedRecipe.getCost()) {
|
||||
currenttip.add(
|
||||
EnumChatFormatting.RED
|
||||
+ StatCollector.translateToLocal("nei.recipe.meteor.tooExpensive"));
|
||||
}
|
||||
} else if (cachedRecipe.radiusInfo.getRect(gui).contains(mousePos)) {
|
||||
currenttip.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);
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.handleTooltip(gui, currenttip, recipeIndex);
|
||||
}
|
||||
|
||||
private void addMeteorReagentInfo(List<String> list, CachedMeteorRecipe cachedRecipe) {
|
||||
DecimalFormat fmt = new DecimalFormat("###.##");
|
||||
for (Map.Entry<Reagent, MeteorReagent> entry : MeteorReagentRegistry.reagents.entrySet()) {
|
||||
ArrayList<String> l = new ArrayList<>();
|
||||
Reagent r = entry.getKey();
|
||||
MeteorReagent mr = entry.getValue();
|
||||
|
||||
if (mr.radiusChange != 0) {
|
||||
l.add(
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"nei.recipe.reagent.meteor.radius",
|
||||
mr.radiusChange,
|
||||
Meteor.getNewRadius(cachedRecipe.getRadius(), Collections.singletonList(r))));
|
||||
}
|
||||
|
||||
if (cachedRecipe.fillerChance > 0) {
|
||||
if (mr.fillerChanceChange != 0 || mr.rawFillerChanceChange != 0) {
|
||||
l.add(
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"nei.recipe.reagent.meteor.filler.chance",
|
||||
fmt.format(
|
||||
Meteor.getNewFillerChance(
|
||||
cachedRecipe.fillerChance,
|
||||
Collections.singletonList(r)))));
|
||||
}
|
||||
|
||||
if (!mr.filler.isEmpty()) {
|
||||
l.add(
|
||||
StatCollector.translateToLocalFormatted(
|
||||
"nei.recipe.reagent.meteor.filler.blocks",
|
||||
reagentFillerBlockNames(mr)));
|
||||
}
|
||||
}
|
||||
|
||||
if (mr.disableExplosions) {
|
||||
l.add(StatCollector.translateToLocal("nei.recipe.reagent.meteor.explosions"));
|
||||
} else if (mr.invertExplosionBlockDamage && AlchemicalWizardry.doMeteorsDestroyBlocks) {
|
||||
l.add(StatCollector.translateToLocal("nei.recipe.reagent.meteor.blockDamage.off"));
|
||||
} else if (mr.invertExplosionBlockDamage) {
|
||||
l.add(StatCollector.translateToLocal("nei.recipe.reagent.meteor.blockDamage.on"));
|
||||
}
|
||||
|
||||
if (!l.isEmpty()) {
|
||||
list.add(r.name + ":");
|
||||
list.addAll(l);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return I18n.format("nei.recipe.meteor.category");
|
||||
}
|
||||
|
||||
private List<MeteorParadigm> getSortedMeteors() {
|
||||
return MeteorRegistry.paradigmList.stream().sorted(Comparator.comparing(m -> m.cost))
|
||||
private List<Meteor> getSortedMeteors() {
|
||||
return MeteorRegistry.meteorList.stream().sorted(Comparator.comparing(m -> m.cost))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@@ -209,6 +390,20 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
|
||||
}
|
||||
|
||||
private int getEstimatedAmount(float chance, int radius) {
|
||||
return (int) Math.ceil(4f / 3 * Math.PI * Math.pow(radius, 3) * chance);
|
||||
return (int) Math.ceil(4f / 3 * Math.PI * Math.pow(radius + 0.5, 3) * chance);
|
||||
}
|
||||
|
||||
private String reagentFillerBlockNames(MeteorReagent mr) {
|
||||
ArrayList<String> blockNames = new ArrayList<>();
|
||||
for (MeteorComponent mc : mr.filler) {
|
||||
blockNames.add(mc.getBlock().getDisplayName() + requiredReagentsForFiller(mc));
|
||||
}
|
||||
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(", ")) + ")";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package WayofTime.alchemicalWizardry.client.nei.widgets;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.client.ClientUtils.mc;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.api.spell.APISpellHelper;
|
||||
import WayofTime.alchemicalWizardry.client.nei.NEIConfig;
|
||||
|
||||
public class CostInfo extends BMNEIWidget {
|
||||
|
||||
private final int cost;
|
||||
private final ItemStack orbStack;
|
||||
private static final RenderItem renderItem = new RenderItem();
|
||||
static {
|
||||
renderItem.renderWithColor = false;
|
||||
}
|
||||
|
||||
public CostInfo(float scale, int cost) {
|
||||
super(scale);
|
||||
this.cost = cost;
|
||||
|
||||
Item orb = null;
|
||||
ArrayList<Item> orbList = NEIConfig.getOrbsByCapacity();
|
||||
for (Item o : orbList) {
|
||||
if (((IBloodOrb) o).getMaxEssence() >= cost) {
|
||||
orb = o;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (orb == null) {
|
||||
orb = orbList.get(orbList.size() - 1);
|
||||
}
|
||||
|
||||
orbStack = new ItemStack(orb);
|
||||
}
|
||||
|
||||
public int getCost() {
|
||||
return cost;
|
||||
}
|
||||
|
||||
public void onDraw(int x, int y) {
|
||||
prevX = x;
|
||||
prevY = y;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
if (cost > APISpellHelper.getPlayerLPTag(mc.thePlayer)) {
|
||||
GL11.glColor4f(0.4f, 0.4f, 0.4f, 1.0f);
|
||||
} else {
|
||||
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
}
|
||||
|
||||
renderItem.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), orbStack, x, y);
|
||||
|
||||
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
drawCenteredText(x, y, String.format("%,d", cost));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package WayofTime.alchemicalWizardry.client.nei.widgets;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.client.ClientUtils.mc;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
|
||||
public class RadiusInfo extends BMNEIWidget {
|
||||
|
||||
private final int radius;
|
||||
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);
|
||||
this.radius = radius;
|
||||
}
|
||||
|
||||
public int getRadius() {
|
||||
return radius;
|
||||
}
|
||||
|
||||
public void onDraw(int x, int y) {
|
||||
prevX = x;
|
||||
prevY = y;
|
||||
|
||||
renderItem.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), item, x, y);
|
||||
|
||||
drawCenteredText(x, y, StatCollector.translateToLocalFormatted("nei.recipe.meteor.radius", radius));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package WayofTime.alchemicalWizardry.client.nei.widgets;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.client.ClientUtils.mc;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
|
||||
public class ReagentInfo extends BMNEIWidget {
|
||||
|
||||
private static final RenderItem renderItem = new RenderItem();
|
||||
private static final ItemStack item = new ItemStack(ModBlocks.blockReagentConduit);
|
||||
|
||||
public ReagentInfo(float scale) {
|
||||
super(scale);
|
||||
}
|
||||
|
||||
public void onDraw(int x, int y) {
|
||||
prevX = x;
|
||||
prevY = y;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(x, y, 0);
|
||||
GL11.glScalef(scale, scale, 1.0f);
|
||||
renderItem.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), item, 0, 0);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the text Reagent effects: to the tooltip list.
|
||||
*/
|
||||
public void onHover(List<String> list) {
|
||||
list.add(StatCollector.translateToLocal("nei.recipe.reagent.text"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package WayofTime.alchemicalWizardry.client.nei.widgets;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.client.ClientUtils.mc;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
|
||||
|
||||
public class RitualInfo extends BMNEIWidget {
|
||||
|
||||
private final String id;
|
||||
private final int cost;
|
||||
private final ItemStack crystal;
|
||||
private static final RenderItem renderItem = new RenderItem();
|
||||
|
||||
public RitualInfo(float scale, String id) {
|
||||
super(scale);
|
||||
this.id = id;
|
||||
this.cost = Rituals.getCostForActivation(id);
|
||||
Rituals r = Rituals.ritualMap.get(id);
|
||||
|
||||
// This is hardcoded unlike the orbs. I'm not aware of any addon that makes tier 3 rituals or crystals.
|
||||
if (r == null || r.crystalLevel == 1) {
|
||||
crystal = new ItemStack(ModItems.activationCrystal);
|
||||
} else {
|
||||
crystal = new ItemStack(ModItems.activationCrystal, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
public int getCost() {
|
||||
return cost;
|
||||
}
|
||||
|
||||
public void onDraw(int x, int y) {
|
||||
prevX = x;
|
||||
prevY = y;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(x, y, 0);
|
||||
GL11.glScalef(scale, scale, 1.0f);
|
||||
renderItem.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), crystal, 0, 0);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public void onHover(List<String> list) {
|
||||
list.add(
|
||||
StatCollector
|
||||
.translateToLocalFormatted("nei.recipe.ritual.name", Rituals.getLocalizedNameOfRitual(id)));
|
||||
list.add(StatCollector.translateToLocalFormatted("nei.recipe.ritual.cost", this.cost));
|
||||
}
|
||||
}
|
||||
@@ -106,26 +106,24 @@ public class RenderHelper {
|
||||
GL11.glPushMatrix();
|
||||
int xSize = 32;
|
||||
int ySize = 32;
|
||||
|
||||
int amount = Math.max((int) (256 * ((double) (maxAmount - lpAmount) / maxAmount)), 0);
|
||||
|
||||
int x = (lpBarX - xSize / 2) * 8;
|
||||
int y = (lpBarY - ySize / 2) * 8;
|
||||
|
||||
ResourceLocation test2 = new ResourceLocation("alchemicalwizardry", "textures/gui/container1.png");
|
||||
GL11.glColor4f(1, 0, 0, 1.0F);
|
||||
mc.getTextureManager().bindTexture(test2);
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
mc.renderEngine.bindTexture(test2);
|
||||
GL11.glScalef(1f / 8f, 1f / 8f, 1f / 8f);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
drawTexturedModalRect(x, y + amount, 0, amount, 256, 256 - amount);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry", "textures/gui/lpVial.png");
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.getTextureManager().bindTexture(test);
|
||||
|
||||
mc.renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
drawTexturedModalRect(x, y, 0, 0, 256, 256);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -11,6 +11,7 @@ import net.minecraft.server.MinecraftServer;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.items.LavaCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.IFuelHandler;
|
||||
|
||||
public class AlchemicalWizardryFuelHandler implements IFuelHandler {
|
||||
@@ -35,11 +36,12 @@ public class AlchemicalWizardryFuelHandler implements IFuelHandler {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
if (mcServer == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (MinecraftServer.getServer().getConfigurationManager() == null) {
|
||||
if (mcServer.getConfigurationManager() == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package WayofTime.alchemicalWizardry.common;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.BitSet;
|
||||
import java.util.EnumMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
@@ -10,6 +12,7 @@ import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
@@ -77,6 +80,8 @@ public enum NewPacketHandler {
|
||||
.addAfter(tileAltarCodec, "CurrentReagentBarMessageHandler", new CurrentReagentBarMessageHandler());
|
||||
clientChannel.pipeline()
|
||||
.addAfter(tileAltarCodec, "CurrentAddedHPMessageHandler", new CurrentAddedHPMessageHandler());
|
||||
clientChannel.pipeline()
|
||||
.addAfter(tileAltarCodec, "GaiaBiomeChangeHandler", new GaiaBiomeChangeMessageHandler());
|
||||
}
|
||||
|
||||
@SideOnly(Side.SERVER)
|
||||
@@ -283,6 +288,23 @@ public enum NewPacketHandler {
|
||||
}
|
||||
}
|
||||
|
||||
private static class GaiaBiomeChangeMessageHandler extends SimpleChannelInboundHandler<GaiaBiomeChangeMessage> {
|
||||
|
||||
@Override
|
||||
protected void channelRead0(ChannelHandlerContext ctx, GaiaBiomeChangeMessage msg) throws Exception {
|
||||
Chunk chunk = AlchemicalWizardry.proxy.getClientWorld().getChunkFromChunkCoords(msg.chunkX, msg.chunkZ);
|
||||
if (chunk != null) {
|
||||
byte[] biomeArray = chunk.getBiomeArray();
|
||||
for (int i = 0; i < 16 * 16; ++i) {
|
||||
if (msg.mask.get(i)) {
|
||||
biomeArray[i] = msg.biome;
|
||||
}
|
||||
}
|
||||
chunk.setBiomeArray(biomeArray);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class BMMessage {
|
||||
|
||||
int index;
|
||||
@@ -417,6 +439,16 @@ public enum NewPacketHandler {
|
||||
byte keyPressed;
|
||||
}
|
||||
|
||||
public static class GaiaBiomeChangeMessage extends BMMessage {
|
||||
|
||||
int chunkX;
|
||||
int chunkZ;
|
||||
byte biome;
|
||||
BitSet mask;
|
||||
// One bit per coordinate in a chunk, 16*16 bits = 32 bytes
|
||||
public static final int maskByteCount = 32;
|
||||
}
|
||||
|
||||
private class ClientToServerCodec extends FMLIndexedMessageToMessageCodec<BMMessage> {
|
||||
|
||||
public ClientToServerCodec() {}
|
||||
@@ -458,6 +490,7 @@ public enum NewPacketHandler {
|
||||
addDiscriminator(12, CurrentReagentBarMessage.class);
|
||||
addDiscriminator(13, CurrentAddedHPMessage.class);
|
||||
addDiscriminator(14, KeyboardMessage.class);
|
||||
addDiscriminator(15, GaiaBiomeChangeMessage.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -669,6 +702,17 @@ public enum NewPacketHandler {
|
||||
|
||||
target.writeByte(((KeyboardMessage) msg).keyPressed);
|
||||
break;
|
||||
|
||||
case 15:
|
||||
target.writeInt(((GaiaBiomeChangeMessage) msg).chunkX);
|
||||
target.writeInt(((GaiaBiomeChangeMessage) msg).chunkZ);
|
||||
target.writeByte(((GaiaBiomeChangeMessage) msg).biome);
|
||||
byte[] arr = Arrays.copyOf(
|
||||
((GaiaBiomeChangeMessage) msg).mask.toByteArray(),
|
||||
GaiaBiomeChangeMessage.maskByteCount);
|
||||
target.writeBytes(arr);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -894,6 +938,16 @@ public enum NewPacketHandler {
|
||||
System.out.println("Packet recieved: being decoded");
|
||||
((KeyboardMessage) msg).keyPressed = dat.readByte();
|
||||
break;
|
||||
|
||||
case 15:
|
||||
((GaiaBiomeChangeMessage) msg).chunkX = dat.readInt();
|
||||
((GaiaBiomeChangeMessage) msg).chunkZ = dat.readInt();
|
||||
((GaiaBiomeChangeMessage) msg).biome = dat.readByte();
|
||||
|
||||
byte[] buffer = new byte[GaiaBiomeChangeMessage.maskByteCount];
|
||||
dat.readBytes(buffer);
|
||||
((GaiaBiomeChangeMessage) msg).mask = BitSet.valueOf(buffer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1067,6 +1121,17 @@ public enum NewPacketHandler {
|
||||
return INSTANCE.channels.get(Side.CLIENT).generatePacketFrom(msg);
|
||||
}
|
||||
|
||||
public static Packet getGaiaBiomeChangePacket(int x, int z, byte biome, BitSet mask) {
|
||||
GaiaBiomeChangeMessage msg = new GaiaBiomeChangeMessage();
|
||||
msg.index = 15;
|
||||
msg.chunkX = x;
|
||||
msg.chunkZ = z;
|
||||
msg.biome = biome;
|
||||
msg.mask = mask;
|
||||
|
||||
return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg);
|
||||
}
|
||||
|
||||
public void sendTo(Packet message, EntityPlayerMP player) {
|
||||
this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET)
|
||||
.set(FMLOutboundHandler.OutboundTarget.PLAYER);
|
||||
@@ -1087,6 +1152,13 @@ public enum NewPacketHandler {
|
||||
this.channels.get(Side.SERVER).writeAndFlush(message);
|
||||
}
|
||||
|
||||
public void sendToDimension(Packet message, Integer dimensionId) {
|
||||
this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET)
|
||||
.set(FMLOutboundHandler.OutboundTarget.DIMENSION);
|
||||
this.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(dimensionId);
|
||||
this.channels.get(Side.SERVER).writeAndFlush(message);
|
||||
}
|
||||
|
||||
public void sendToServer(Packet message) {
|
||||
this.channels.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET)
|
||||
.set(FMLOutboundHandler.OutboundTarget.TOSERVER);
|
||||
|
||||
@@ -5,21 +5,28 @@ import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
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;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
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);
|
||||
@@ -28,6 +35,18 @@ public class BlockAlchemicCalcinator extends BlockContainer {
|
||||
this.setBlockName("alchemicCalcinator");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.icon = iconRegister.registerIcon("AlchemicalWizardry:BlankRune");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TEAlchemicCalcinator();
|
||||
|
||||
@@ -54,14 +54,11 @@ public class BlockAltar extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
return switch (side) {
|
||||
case 0 -> bottomIcon;
|
||||
case 1 -> topIcon;
|
||||
default -> sideIcon2;
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,8 +3,10 @@ package WayofTime.alchemicalWizardry.common.block;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -13,6 +15,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
@@ -26,12 +29,36 @@ 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);
|
||||
setResistance(5.0F);
|
||||
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setBlockName("crystalBelljar");
|
||||
this.setStepSound(Block.soundTypeGlass);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (side == 0) {
|
||||
return bottomIcon;
|
||||
}
|
||||
return otherIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.bottomIcon = iconRegister.registerIcon("minecraft:planks_oak");
|
||||
this.otherIcon = iconRegister.registerIcon("minecraft:glass");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -41,14 +41,11 @@ public class BlockConduit extends BlockOrientable {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
return switch (side) {
|
||||
case 0 -> bottomIcon;
|
||||
case 1 -> topIcon;
|
||||
default -> sideIcon2;
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -78,22 +78,13 @@ public class BlockCrucible extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon;
|
||||
}
|
||||
return switch (side) {
|
||||
case 0 -> bottomIcon;
|
||||
case 1 -> topIcon;
|
||||
default -> 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,10 +17,6 @@ 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;
|
||||
|
||||
@@ -35,8 +31,7 @@ public class BlockCrystal extends Block {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:BlankRune");
|
||||
this.fullIcon = iconRegister.registerIcon("AlchemicalWizardry:ShardCluster");
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:ShardCluster");
|
||||
this.brickIcon = iconRegister.registerIcon("AlchemicalWizardry:ShardClusterBrick");
|
||||
}
|
||||
|
||||
@@ -57,16 +52,10 @@ public class BlockCrystal extends Block {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (meta) {
|
||||
case 0:
|
||||
return fullIcon;
|
||||
|
||||
case 1:
|
||||
return brickIcon;
|
||||
|
||||
default:
|
||||
return blockIcon;
|
||||
if (meta == 1) {
|
||||
return brickIcon;
|
||||
}
|
||||
return blockIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,9 +18,6 @@ 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;
|
||||
|
||||
@@ -35,22 +32,17 @@ public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:LargeBloodStoneBrick");
|
||||
this.enchantability = iconRegister.registerIcon("AlchemicalWizardry:GlyphEnchantability");
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:GlyphEnchantability");
|
||||
this.enchantmentLevel = iconRegister.registerIcon("AlchemicalWizardry:GlyphEnchantmentLevel");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (meta) {
|
||||
case 0:
|
||||
return enchantability;
|
||||
case 1:
|
||||
return enchantmentLevel;
|
||||
default:
|
||||
return this.blockIcon;
|
||||
if (meta == 1) {
|
||||
return enchantmentLevel;
|
||||
}
|
||||
return this.blockIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,14 +46,11 @@ public class BlockHomHeart extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon;
|
||||
}
|
||||
return switch (side) {
|
||||
case 0 -> bottomIcon;
|
||||
case 1 -> topIcon;
|
||||
default -> sideIcon;
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,6 +11,7 @@ import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.items.ActivationCrystal;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -79,7 +80,7 @@ public class BlockMasterStone extends BlockContainer {
|
||||
acItem.getCrystalLevel(playerItem),
|
||||
playerItem,
|
||||
player,
|
||||
acItem.getOwnerName(playerItem));
|
||||
IBindable.getOwnerName(playerItem));
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ 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,15 +21,6 @@ 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);
|
||||
@@ -44,22 +34,7 @@ public class BlockPedestal extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
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;
|
||||
}
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:ArcanePedestal");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,7 +12,6 @@ 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,15 +21,6 @@ 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);
|
||||
@@ -44,22 +34,7 @@ public class BlockPlinth extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
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;
|
||||
}
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:ArcanePlinth");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,11 +2,14 @@ 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 {
|
||||
|
||||
@@ -18,6 +21,12 @@ 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,7 +12,6 @@ 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;
|
||||
@@ -23,15 +22,6 @@ 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);
|
||||
@@ -44,22 +34,7 @@ public class BlockSocket extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
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;
|
||||
}
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,7 +8,6 @@ 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;
|
||||
@@ -18,9 +17,6 @@ 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);
|
||||
@@ -32,19 +28,7 @@ public class BlockStabilityGlyph extends Block implements IStabilityGlyph {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
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;
|
||||
}
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:GlyphStability1");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -61,14 +61,11 @@ public class BlockTeleposer extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
switch (side) {
|
||||
case 0:
|
||||
return bottomIcon;
|
||||
case 1:
|
||||
return topIcon;
|
||||
default:
|
||||
return sideIcon2;
|
||||
}
|
||||
return switch (side) {
|
||||
case 0 -> bottomIcon;
|
||||
case 1 -> topIcon;
|
||||
default -> sideIcon2;
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,7 +15,6 @@ 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;
|
||||
@@ -25,15 +24,6 @@ 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);
|
||||
@@ -45,22 +35,7 @@ public class BlockWritingTable extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
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;
|
||||
}
|
||||
this.blockIcon = iconRegister.registerIcon("AlchemicalWizardry:AlchemicChemistrySet");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -33,6 +33,9 @@ public class BloodRune extends Block {
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon accelerationRuneIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon quicknessRuneIcon;
|
||||
|
||||
public BloodRune() {
|
||||
super(Material.iron);
|
||||
this.setBlockName("bloodRune");
|
||||
@@ -50,6 +53,7 @@ public class BloodRune extends Block {
|
||||
this.orbCapacityRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:OrbCapacityRune");
|
||||
this.betterCapacityRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:BetterCapacityRune");
|
||||
this.accelerationRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:AccelerationRune");
|
||||
this.quicknessRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:QuicknessRune");
|
||||
}
|
||||
|
||||
public int getRuneEffect(int metaData) {
|
||||
@@ -71,6 +75,9 @@ public class BloodRune extends Block {
|
||||
|
||||
case 5: // Acceleration rune
|
||||
return 9;
|
||||
|
||||
case 6: // Quickness Rune
|
||||
return 10;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -89,6 +96,7 @@ public class BloodRune extends Block {
|
||||
par3List.add(new ItemStack(par1, 1, 3));
|
||||
par3List.add(new ItemStack(par1, 1, 4));
|
||||
par3List.add(new ItemStack(par1, 1, 5));
|
||||
par3List.add(new ItemStack(par1, 1, 6));
|
||||
} else {
|
||||
super.getSubBlocks(par1, par2CreativeTabs, par3List);
|
||||
}
|
||||
@@ -97,27 +105,15 @@ public class BloodRune extends Block {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
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;
|
||||
default:
|
||||
return blockIcon;
|
||||
}
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,7 +4,6 @@ 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;
|
||||
@@ -59,36 +58,28 @@ public class RitualStone extends Block implements IRitualStone {
|
||||
}
|
||||
|
||||
@Override
|
||||
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) {
|
||||
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)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Item item = playerItem.getItem();
|
||||
int toolType = scribe.getType();
|
||||
|
||||
if (!(item instanceof ScribeTool)) {
|
||||
if (toolType == world.getBlockMetadata(x, y, z)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (playerItem.getMaxDamage() <= playerItem.getItemDamage() && !(playerItem.getMaxDamage() == 0)) {
|
||||
if (stack.getMaxDamage() != 0 && stack.getItemDamage() >= stack.getMaxDamage()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ScribeTool scribeTool = (ScribeTool) item;
|
||||
|
||||
if (!player.capabilities.isCreativeMode) {
|
||||
playerItem.setItemDamage(playerItem.getItemDamage() + 1);
|
||||
stack.setItemDamage(stack.getItemDamage() + 1);
|
||||
}
|
||||
|
||||
world.setBlockMetadataWithNotify(x, y, z, scribeTool.getType(), 3);
|
||||
world.setBlockMetadataWithNotify(x, y, z, toolType, 3);
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
return true;
|
||||
}
|
||||
@@ -96,31 +87,15 @@ public class RitualStone extends Block implements IRitualStone {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
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;
|
||||
}
|
||||
return switch (metadata) {
|
||||
case 1 -> waterStoneIcon;
|
||||
case 2 -> fireStoneIcon;
|
||||
case 3 -> earthStoneIcon;
|
||||
case 4 -> airStoneIcon;
|
||||
case 5 -> duskStoneIcon;
|
||||
case 6 -> dawnStoneIcon;
|
||||
default -> blankIcon;
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+10
@@ -11,6 +11,7 @@ public class AltarUpgradeComponent {
|
||||
private int orbCapacitiveUpgrades;
|
||||
private int betterCapacitiveUpgrades;
|
||||
private int accelerationUpgrades;
|
||||
private int quicknessUpgrades;
|
||||
|
||||
public AltarUpgradeComponent() {
|
||||
speedUpgrades = 0;
|
||||
@@ -22,6 +23,7 @@ public class AltarUpgradeComponent {
|
||||
orbCapacitiveUpgrades = 0;
|
||||
betterCapacitiveUpgrades = 0;
|
||||
accelerationUpgrades = 0;
|
||||
quicknessUpgrades = 0;
|
||||
}
|
||||
|
||||
public void addSpeedUpgrade() {
|
||||
@@ -60,6 +62,10 @@ public class AltarUpgradeComponent {
|
||||
accelerationUpgrades++;
|
||||
}
|
||||
|
||||
public void addQuicknessUpgrade() {
|
||||
quicknessUpgrades++;
|
||||
}
|
||||
|
||||
public int getSpeedUpgrades() {
|
||||
return speedUpgrades;
|
||||
}
|
||||
@@ -95,4 +101,8 @@ public class AltarUpgradeComponent {
|
||||
public int getAccelerationUpgrades() {
|
||||
return this.accelerationUpgrades;
|
||||
}
|
||||
|
||||
public int getQuicknessUpgrades() {
|
||||
return this.quicknessUpgrades;
|
||||
}
|
||||
}
|
||||
+13
-3
@@ -5,6 +5,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -65,9 +66,14 @@ public class UpgradedAltars {
|
||||
|
||||
private static boolean checkAltarComponent(AltarComponent altarComponent, IBlockAccess world, int x, int y, int z,
|
||||
int altarTier) {
|
||||
Block block = world.getBlock(x + altarComponent.getX(), y + altarComponent.getY(), z + altarComponent.getZ());
|
||||
int metadata = world
|
||||
.getBlockMetadata(x + altarComponent.getX(), y + altarComponent.getY(), z + altarComponent.getZ());
|
||||
int compX = x + altarComponent.getX();
|
||||
int compY = y + altarComponent.getY();
|
||||
int compZ = z + altarComponent.getZ();
|
||||
if (altarComponent.getBlock() == Blocks.air) {
|
||||
return !world.isAirBlock(compX, compY, compZ);
|
||||
}
|
||||
Block block = world.getBlock(compX, compY, compZ);
|
||||
int metadata = world.getBlockMetadata(compX, compY, compZ);
|
||||
if (altarComponent.isBloodRune()) {
|
||||
boolean result = false;
|
||||
BlockStack[] runes = getRuneOverrides(altarTier);
|
||||
@@ -142,6 +148,10 @@ public class UpgradedAltars {
|
||||
case 9:
|
||||
upgrades.addAccelerationUpgrade();
|
||||
break;
|
||||
|
||||
case 10:
|
||||
upgrades.addQuicknessUpgrade();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -410,6 +410,12 @@ public class BloodMagicGuide {
|
||||
PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.accelerationRune")));
|
||||
entries.add(new EntryUniText(accelerationRunePages, "guide.BloodMagic.entryName.architect.accelerationRune"));
|
||||
|
||||
ArrayList<IPage> quicknessRuneRecipe = new ArrayList();
|
||||
demonicOrbPages.add(getOrbPageForRecipe(RecipeHolder.quicknessRuneRecipe));
|
||||
quicknessRuneRecipe.addAll(
|
||||
PageHelper.pagesForLongText(StatCollector.translateToLocal("aw.entries.architect.quicknessRune")));
|
||||
entries.add(new EntryUniText(quicknessRuneRecipe, "guide.BloodMagic.entryName.architect.quicknessRune"));
|
||||
|
||||
ArrayList<IPage> harvestPages = new ArrayList();
|
||||
demonicOrbPages.add(getOrbPageForRecipe(RecipeHolder.harvestSigilRecipe));
|
||||
harvestPages
|
||||
|
||||
@@ -10,7 +10,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
|
||||
public class CommandBind extends CommandBase {
|
||||
|
||||
@@ -38,8 +37,8 @@ public class CommandBind extends CommandBase {
|
||||
}
|
||||
|
||||
if (item != null && item.getItem() instanceof IBindable) {
|
||||
if (EnergyItems.getOwnerName(item).isEmpty()) {
|
||||
EnergyItems.checkAndSetItemOwner(item, targetPlayer);
|
||||
if (IBindable.getOwnerName(item).isEmpty()) {
|
||||
IBindable.checkAndSetItemOwner(item, targetPlayer);
|
||||
func_152373_a(iCommandSender, this, "commands.bind.success");
|
||||
} else {
|
||||
throw new CommandException("commands.bind.failed.alreadyBound");
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package WayofTime.alchemicalWizardry.common.commands;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
|
||||
@@ -7,7 +7,6 @@ import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
|
||||
public class CommandUnbind extends CommandBase {
|
||||
|
||||
@@ -30,7 +29,7 @@ public class CommandUnbind extends CommandBase {
|
||||
ItemStack item = entityplayermp.getCurrentEquippedItem();
|
||||
|
||||
if (item != null && item.getItem() instanceof IBindable) {
|
||||
if (!EnergyItems.getOwnerName(item).isEmpty()) {
|
||||
if (!IBindable.getOwnerName(item).isEmpty()) {
|
||||
item.getTagCompound().removeTag("ownerName");
|
||||
func_152373_a(iCommandSender, this, "commands.unbind.success");
|
||||
} else {
|
||||
|
||||
@@ -9,7 +9,6 @@ import net.minecraft.util.StatCollector;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.command.SubCommandBase;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
|
||||
public class SubCommandBind extends SubCommandBase {
|
||||
|
||||
@@ -56,10 +55,10 @@ public class SubCommandBind extends SubCommandBase {
|
||||
}
|
||||
|
||||
if (bind) {
|
||||
EnergyItems.setItemOwner(held, playerName);
|
||||
IBindable.setItemOwner(held, playerName);
|
||||
commandSender.addChatMessage(new ChatComponentTranslation("commands.bind.success"));
|
||||
} else {
|
||||
if (!EnergyItems.getOwnerName(held).isEmpty()) {
|
||||
if (!IBindable.getOwnerName(held).isEmpty()) {
|
||||
held.stackTagCompound.removeTag("ownerName");
|
||||
commandSender.addChatMessage(new ChatComponentTranslation("commands.bind.remove.success"));
|
||||
}
|
||||
|
||||
@@ -3,7 +3,15 @@ package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
|
||||
+10
-1
@@ -3,7 +3,16 @@ package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILeapAtTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
|
||||
+14
-2
@@ -1,7 +1,19 @@
|
||||
package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IRangedAttackMob;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIArrowAttack;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
|
||||
+9
-1
@@ -3,7 +3,15 @@ package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
|
||||
@@ -3,7 +3,15 @@ package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
|
||||
+14
-2
@@ -1,7 +1,19 @@
|
||||
package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IRangedAttackMob;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIArrowAttack;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
|
||||
+14
-2
@@ -1,7 +1,19 @@
|
||||
package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IRangedAttackMob;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIArrowAttack;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
|
||||
+18
-29
@@ -1,22 +1,22 @@
|
||||
package WayofTime.alchemicalWizardry.common.entity.projectile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry;
|
||||
|
||||
public class EntityMeteor extends EnergyBlastProjectile {
|
||||
|
||||
private int meteorID;
|
||||
|
||||
public boolean hasTerrae;
|
||||
public boolean hasOrbisTerrae;
|
||||
public boolean hasCrystallos;
|
||||
public boolean hasIncendium;
|
||||
public boolean hasTennebrae;
|
||||
public ArrayList<Reagent> reagentList = new ArrayList<>();
|
||||
|
||||
public EntityMeteor(World par1World) {
|
||||
super(par1World);
|
||||
@@ -33,11 +33,11 @@ public class EntityMeteor extends EnergyBlastProjectile {
|
||||
super.writeEntityToNBT(par1NBTTagCompound);
|
||||
|
||||
par1NBTTagCompound.setInteger("meteorID", meteorID);
|
||||
par1NBTTagCompound.setBoolean("hasTerrae", hasTerrae);
|
||||
par1NBTTagCompound.setBoolean("hasOrbisTerrae", hasOrbisTerrae);
|
||||
par1NBTTagCompound.setBoolean("hasCrystallos", hasCrystallos);
|
||||
par1NBTTagCompound.setBoolean("hasIncendium", hasIncendium);
|
||||
par1NBTTagCompound.setBoolean("hasTennebrae", hasTennebrae);
|
||||
|
||||
for (Reagent r : reagentList) {
|
||||
par1NBTTagCompound.setBoolean("reagent." + r.name, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -45,11 +45,11 @@ public class EntityMeteor extends EnergyBlastProjectile {
|
||||
super.readEntityFromNBT(par1NBTTagCompound);
|
||||
|
||||
meteorID = par1NBTTagCompound.getInteger("meteorID");
|
||||
hasTerrae = par1NBTTagCompound.getBoolean("hasTerrae");
|
||||
hasOrbisTerrae = par1NBTTagCompound.getBoolean("hasOrbisTerrae");
|
||||
hasIncendium = par1NBTTagCompound.getBoolean("hasIncendium");
|
||||
hasCrystallos = par1NBTTagCompound.getBoolean("hasCrystallos");
|
||||
hasTennebrae = par1NBTTagCompound.getBoolean("hasTennebrae");
|
||||
for (Reagent r : ReagentRegistry.reagentList.values()) {
|
||||
if (par1NBTTagCompound.getBoolean("reagent." + r.name)) {
|
||||
reagentList.add(r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -66,13 +66,7 @@ public class EntityMeteor extends EnergyBlastProjectile {
|
||||
if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && mop.entityHit != null) {
|
||||
this.onImpact(mop.entityHit);
|
||||
} else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
MeteorRegistry.createMeteorImpact(
|
||||
worldObj,
|
||||
mop.blockX,
|
||||
mop.blockY,
|
||||
mop.blockZ,
|
||||
this.meteorID,
|
||||
new boolean[] { hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae });
|
||||
MeteorRegistry.createMeteorImpact(worldObj, mop.blockX, mop.blockY, mop.blockZ, this.meteorID, reagentList);
|
||||
}
|
||||
|
||||
this.setDead();
|
||||
@@ -80,13 +74,8 @@ public class EntityMeteor extends EnergyBlastProjectile {
|
||||
|
||||
@Override
|
||||
public void onImpact(Entity mop) {
|
||||
MeteorRegistry.createMeteorImpact(
|
||||
worldObj,
|
||||
(int) this.posX,
|
||||
(int) this.posY,
|
||||
(int) this.posZ,
|
||||
meteorID,
|
||||
new boolean[] { hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae });
|
||||
MeteorRegistry
|
||||
.createMeteorImpact(worldObj, (int) this.posX, (int) this.posY, (int) this.posZ, meteorID, reagentList);
|
||||
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ public class RecipeHolder {
|
||||
public static IRecipe keyOfBindingRecipe;
|
||||
public static IRecipe energyBazookaRecipe;
|
||||
public static IRecipe accelerationRuneRecipe;
|
||||
public static IRecipe quicknessRuneRecipe;
|
||||
public static IRecipe harvestSigilRecipe;
|
||||
public static IRecipe crystalCluserRecipe;
|
||||
public static IRecipe arcanePlinthRecipe;
|
||||
@@ -152,6 +153,7 @@ public class RecipeHolder {
|
||||
harvestSigilRecipe = getRecipeForItemStack(new ItemStack(ModItems.itemHarvestSigil));
|
||||
crystalCluserRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockCrystal));
|
||||
weakRitualStoneRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.imperfectRitualStone));
|
||||
quicknessRuneRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.bloodRune, 1, 6));
|
||||
|
||||
arcanePlinthRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockPlinth));
|
||||
arcanePedestalRecipe = getRecipeForItemStack(new ItemStack(ModBlocks.blockPedestal));
|
||||
|
||||
@@ -17,6 +17,7 @@ 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;
|
||||
|
||||
@@ -92,16 +93,12 @@ public class ActivationCrystal extends EnergyItems {
|
||||
}
|
||||
}
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
|
||||
IBindable.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@@ -113,7 +110,7 @@ public class ActivationCrystal extends EnergyItems {
|
||||
public String getUnlocalizedName(ItemStack itemStack) {
|
||||
// This is what will do all the localisation things on the alchemy components so you dont have to set it :D
|
||||
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ACTIVATION_CRYSTAL_NAMES.length - 1);
|
||||
return ("" + "item.activationCrystal" + ACTIVATION_CRYSTAL_NAMES[meta]);
|
||||
return ("item.activationCrystal" + ACTIVATION_CRYSTAL_NAMES[meta]);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
@@ -6,13 +6,13 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
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;
|
||||
|
||||
@@ -24,8 +24,6 @@ public class ArmourInhibitor extends EnergyItems {
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon passiveIcon;
|
||||
|
||||
private int tickDelay = 200;
|
||||
|
||||
public ArmourInhibitor() {
|
||||
super();
|
||||
this.maxStackSize = 1;
|
||||
@@ -37,18 +35,7 @@ public class ArmourInhibitor extends EnergyItems {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.armorinhibitor.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.armorinhibitor.desc2"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -61,13 +48,7 @@ public class ArmourInhibitor extends EnergyItems {
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
|
||||
if (stack.getTagCompound() == null) {
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
if (tag.getBoolean("isActive")) {
|
||||
if (IBindable.isActive(stack)) {
|
||||
return this.activeIcon;
|
||||
} else {
|
||||
return this.passiveIcon;
|
||||
@@ -86,20 +67,15 @@ public class ArmourInhibitor extends EnergyItems {
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) {
|
||||
if (!IBindable.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
IBindable.setActive(par1ItemStack, !IBindable.isActive(par1ItemStack));
|
||||
|
||||
NBTTagCompound tag = par1ItemStack.getTagCompound();
|
||||
tag.setBoolean("isActive", !(tag.getBoolean("isActive")));
|
||||
|
||||
if (tag.getBoolean("isActive")) {
|
||||
if (IBindable.isActive(par1ItemStack)) {
|
||||
par1ItemStack.setItemDamage(1);
|
||||
tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay);
|
||||
this.setDrainTick(par1ItemStack, par2World);
|
||||
} else {
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage());
|
||||
}
|
||||
@@ -115,14 +91,7 @@ public class ArmourInhibitor extends EnergyItems {
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")) {}
|
||||
|
||||
// TODO Do stuff
|
||||
if (IBindable.isActive(par1ItemStack)) {
|
||||
par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 2, 0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -33,16 +34,11 @@ public class BlankSpell extends EnergyItems {
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.blankspell.desc"));
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.alchemy.coords") + " "
|
||||
+ itemTag.getInteger("xCoord")
|
||||
@@ -57,7 +53,7 @@ public class BlankSpell extends EnergyItems {
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) {
|
||||
if (!IBindable.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ public class BoundAxe extends ItemAxe implements IBindable {
|
||||
|
||||
public float efficiencyOnProperMaterial = 12.0F;
|
||||
public float damageVsEntity;
|
||||
public int rightClickCost = 10000;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIcon;
|
||||
@@ -59,23 +60,15 @@ public class BoundAxe extends ItemAxe implements IBindable {
|
||||
return this.energyUsed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int drainCost() {
|
||||
return this.energyUsed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.boundaxe.desc"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -88,13 +81,7 @@ public class BoundAxe extends ItemAxe implements IBindable {
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
|
||||
if (stack.getTagCompound() == null) {
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
if (tag.getBoolean("isActive")) {
|
||||
if (IBindable.isActive(stack)) {
|
||||
return this.activeIcon;
|
||||
} else {
|
||||
return this.passiveIcon;
|
||||
@@ -103,29 +90,7 @@ public class BoundAxe extends ItemAxe implements IBindable {
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) {
|
||||
this.setActivated(par1ItemStack, !getActivated(par1ItemStack));
|
||||
par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (par2World.isRemote) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (!getActivated(par1ItemStack) || SpellHelper.isFakePlayer(par2World, par3EntityPlayer)) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (AlchemicalWizardry.disableBoundToolsRightClick) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionInhibit)) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 10000)) {
|
||||
if (checkRightClick(par1ItemStack, par2World, par3EntityPlayer)) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@@ -185,45 +150,18 @@ public class BoundAxe extends ItemAxe implements IBindable {
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")
|
||||
&& par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode) {
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 20)) {
|
||||
this.setActivated(par1ItemStack, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
checkPassiveDrain(par1ItemStack, par2World, par3EntityPlayer);
|
||||
|
||||
par1ItemStack.setItemDamage(0);
|
||||
}
|
||||
|
||||
public void setActivated(ItemStack par1ItemStack, boolean newActivated) {
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
itemTag.setBoolean("isActive", newActivated);
|
||||
}
|
||||
|
||||
public boolean getActivated(ItemStack par1ItemStack) {
|
||||
if (!par1ItemStack.hasTagCompound()) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
return itemTag.getBoolean("isActive");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
|
||||
* sword
|
||||
*/
|
||||
@Override
|
||||
public float func_150893_a(ItemStack par1ItemStack, Block par2Block) {
|
||||
if (!getActivated(par1ItemStack)) {
|
||||
if (!IBindable.isActive(par1ItemStack)) {
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
@@ -236,7 +174,7 @@ public class BoundAxe extends ItemAxe implements IBindable {
|
||||
*/
|
||||
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase,
|
||||
EntityLivingBase par3EntityLivingBase) {
|
||||
return getActivated(par1ItemStack);
|
||||
return IBindable.isActive(par1ItemStack);
|
||||
}
|
||||
|
||||
public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, Block par3, int par4, int par5, int par6,
|
||||
@@ -266,7 +204,7 @@ public class BoundAxe extends ItemAxe implements IBindable {
|
||||
*/
|
||||
@Override
|
||||
public float getDigSpeed(ItemStack stack, Block block, int meta) {
|
||||
if (!getActivated(stack)) {
|
||||
if (!IBindable.isActive(stack)) {
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
@@ -279,11 +217,21 @@ public class BoundAxe extends ItemAxe implements IBindable {
|
||||
|
||||
@Override
|
||||
public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) {
|
||||
return !getActivated(stack);
|
||||
return !IBindable.isActive(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHarvestLevel(ItemStack stack, String toolClass) {
|
||||
return getActivated(stack) ? super.getHarvestLevel(stack, toolClass) : -1;
|
||||
return IBindable.isActive(stack) ? super.getHarvestLevel(stack, toolClass) : -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBoundTool() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int rightClickCost() {
|
||||
return rightClickCost;
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable {
|
||||
|
||||
public float efficiencyOnProperMaterial = 12.0F;
|
||||
public float damageVsEntity;
|
||||
public int rightClickCost = 10000;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIcon;
|
||||
@@ -60,24 +61,16 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable {
|
||||
return this.energyUsed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int drainCost() {
|
||||
return this.energyUsed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.boundpickaxe.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.boundpickaxe.desc2"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -90,13 +83,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable {
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
|
||||
if (stack.getTagCompound() == null) {
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
if (tag.getBoolean("isActive")) {
|
||||
if (IBindable.isActive(stack)) {
|
||||
return this.activeIcon;
|
||||
} else {
|
||||
return this.passiveIcon;
|
||||
@@ -105,32 +92,9 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable {
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) {
|
||||
this.setActivated(par1ItemStack, !getActivated(par1ItemStack));
|
||||
par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200);
|
||||
if (checkRightClick(par1ItemStack, par2World, par3EntityPlayer)) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (par2World.isRemote) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (!getActivated(par1ItemStack) || SpellHelper.isFakePlayer(par2World, par3EntityPlayer)) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (AlchemicalWizardry.disableBoundToolsRightClick) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionInhibit)) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 10000)) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer);
|
||||
int posX = (int) (blockVec.xCoord);
|
||||
int posY = (int) (blockVec.yCoord);
|
||||
@@ -203,38 +167,11 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")
|
||||
&& par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode) {
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 20)) {
|
||||
this.setActivated(par1ItemStack, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
checkPassiveDrain(par1ItemStack, par2World, par3EntityPlayer);
|
||||
|
||||
par1ItemStack.setItemDamage(0);
|
||||
}
|
||||
|
||||
public void setActivated(ItemStack par1ItemStack, boolean newActivated) {
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
itemTag.setBoolean("isActive", newActivated);
|
||||
}
|
||||
|
||||
public boolean getActivated(ItemStack par1ItemStack) {
|
||||
if (!par1ItemStack.hasTagCompound()) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
return itemTag.getBoolean("isActive");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
|
||||
* sword
|
||||
@@ -242,7 +179,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable {
|
||||
@Override
|
||||
public float func_150893_a(ItemStack par1ItemStack, Block par2Block) // getStrVsBlock
|
||||
{
|
||||
if (!getActivated(par1ItemStack)) {
|
||||
if (!IBindable.isActive(par1ItemStack)) {
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
@@ -253,9 +190,10 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable {
|
||||
* Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
|
||||
* the damage on the stack.
|
||||
*/
|
||||
@Override
|
||||
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase,
|
||||
EntityLivingBase par3EntityLivingBase) {
|
||||
return getActivated(par1ItemStack);
|
||||
return IBindable.isActive(par1ItemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -263,7 +201,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable {
|
||||
EntityLivingBase par7EntityLivingBase) {
|
||||
|
||||
if (par7EntityLivingBase instanceof EntityPlayer) {
|
||||
EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par7EntityLivingBase, getEnergyUsed());
|
||||
EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par7EntityLivingBase, drainCost());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -290,7 +228,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable {
|
||||
*/
|
||||
@Override
|
||||
public float getDigSpeed(ItemStack stack, Block block, int meta) {
|
||||
if (!getActivated(stack)) {
|
||||
if (!IBindable.isActive(stack)) {
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
@@ -303,11 +241,21 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable {
|
||||
|
||||
@Override
|
||||
public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) {
|
||||
return !getActivated(stack);
|
||||
return !IBindable.isActive(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHarvestLevel(ItemStack stack, String toolClass) {
|
||||
return getActivated(stack) ? super.getHarvestLevel(stack, toolClass) : -1;
|
||||
return IBindable.isActive(stack) ? super.getHarvestLevel(stack, toolClass) : -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBoundTool() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int rightClickCost() {
|
||||
return rightClickCost;
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,7 @@ public class BoundShovel extends ItemSpade implements IBindable {
|
||||
|
||||
public float efficiencyOnProperMaterial = 12.0F;
|
||||
public float damageVsEntity;
|
||||
public int rightClickCost = 10000;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIcon;
|
||||
@@ -61,23 +62,15 @@ public class BoundShovel extends ItemSpade implements IBindable {
|
||||
return this.energyUsed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int drainCost() {
|
||||
return this.energyUsed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.boundshovel.desc"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -90,13 +83,7 @@ public class BoundShovel extends ItemSpade implements IBindable {
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
|
||||
if (stack.getTagCompound() == null) {
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
if (tag.getBoolean("isActive")) {
|
||||
if (IBindable.isActive(stack)) {
|
||||
return this.activeIcon;
|
||||
} else {
|
||||
return this.passiveIcon;
|
||||
@@ -105,29 +92,7 @@ public class BoundShovel extends ItemSpade implements IBindable {
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) {
|
||||
this.setActivated(par1ItemStack, !getActivated(par1ItemStack));
|
||||
par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (par2World.isRemote) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (!getActivated(par1ItemStack) || SpellHelper.isFakePlayer(par2World, par3EntityPlayer)) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (AlchemicalWizardry.disableBoundToolsRightClick) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionInhibit)) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 10000)) {
|
||||
if (checkRightClick(par1ItemStack, par2World, par3EntityPlayer)) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@@ -186,45 +151,19 @@ public class BoundShovel extends ItemSpade implements IBindable {
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")
|
||||
&& par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode) {
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 20)) {
|
||||
this.setActivated(par1ItemStack, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
checkPassiveDrain(par1ItemStack, par2World, par3EntityPlayer);
|
||||
|
||||
par1ItemStack.setItemDamage(0);
|
||||
}
|
||||
|
||||
public void setActivated(ItemStack par1ItemStack, boolean newActivated) {
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
itemTag.setBoolean("isActive", newActivated);
|
||||
}
|
||||
|
||||
public boolean getActivated(ItemStack par1ItemStack) {
|
||||
if (!par1ItemStack.hasTagCompound()) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
return itemTag.getBoolean("isActive");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
|
||||
* sword
|
||||
*/
|
||||
@Override
|
||||
public float func_150893_a(ItemStack par1ItemStack, Block par2Block) {
|
||||
if (!getActivated(par1ItemStack)) {
|
||||
if (!IBindable.isActive(par1ItemStack)) {
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
@@ -237,7 +176,7 @@ public class BoundShovel extends ItemSpade implements IBindable {
|
||||
*/
|
||||
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase,
|
||||
EntityLivingBase par3EntityLivingBase) {
|
||||
return getActivated(par1ItemStack);
|
||||
return IBindable.isActive(par1ItemStack);
|
||||
}
|
||||
|
||||
public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6,
|
||||
@@ -275,7 +214,7 @@ public class BoundShovel extends ItemSpade implements IBindable {
|
||||
*/
|
||||
@Override
|
||||
public float getDigSpeed(ItemStack stack, Block block, int meta) {
|
||||
if (!getActivated(stack)) {
|
||||
if (!IBindable.isActive(stack)) {
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
@@ -288,11 +227,21 @@ public class BoundShovel extends ItemSpade implements IBindable {
|
||||
|
||||
@Override
|
||||
public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) {
|
||||
return !getActivated(stack);
|
||||
return !IBindable.isActive(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHarvestLevel(ItemStack stack, String toolClass) {
|
||||
return getActivated(stack) ? super.getHarvestLevel(stack, toolClass) : -1;
|
||||
return IBindable.isActive(stack) ? super.getHarvestLevel(stack, toolClass) : -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBoundTool() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int rightClickCost() {
|
||||
return rightClickCost;
|
||||
}
|
||||
}
|
||||
@@ -39,18 +39,13 @@ public class CheatyItem extends Item implements IBindable {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.mode.creative"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.cheatyitem.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.cheatyitem.desc2"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
World world = par3EntityPlayer.worldObj;
|
||||
|
||||
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)
|
||||
if (!IBindable.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)
|
||||
|| par3EntityPlayer instanceof FakePlayer) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
+11
-19
@@ -8,6 +8,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -27,25 +28,16 @@ public class DemonicTelepositionFocus extends TelepositionFocus {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.demonictelepfocus.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.demonictelepfocus.desc2"));
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.alchemy.coords") + " "
|
||||
+ itemTag.getInteger("xCoord")
|
||||
+ ", "
|
||||
+ itemTag.getInteger("yCoord")
|
||||
+ ", "
|
||||
+ itemTag.getInteger("zCoord"));
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.alchemy.dimension") + " " + getDimensionID(par1ItemStack));
|
||||
}
|
||||
NBTTagCompound itemTag = IBindable.getTag(par1ItemStack);
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.alchemy.coords") + " "
|
||||
+ itemTag.getInteger("xCoord")
|
||||
+ ", "
|
||||
+ itemTag.getInteger("yCoord")
|
||||
+ ", "
|
||||
+ itemTag.getInteger("zCoord"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.alchemy.dimension") + " " + getDimensionID(par1ItemStack));
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
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,15 +43,12 @@ 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"));
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
par3List.add(StatCollector.translateToLocalFormatted("tooltip.energybattery.capacity", this.getMaxEssence()));
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) {
|
||||
if (!IBindable.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,11 +3,8 @@ package WayofTime.alchemicalWizardry.common.items;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
@@ -17,30 +14,10 @@ import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazooka
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class EnergyBazooka extends EnergyItems {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIconTier2;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIconTier3;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon passiveIcon;
|
||||
|
||||
private int tier;
|
||||
private int damage;
|
||||
public class EnergyBazooka extends EnergyBlast {
|
||||
|
||||
public EnergyBazooka(int tier) {
|
||||
super();
|
||||
setMaxStackSize(1);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
setFull3D();
|
||||
setMaxDamage(250);
|
||||
this.tier = tier;
|
||||
super(tier);
|
||||
switch (this.tier) {
|
||||
case 1:
|
||||
this.setEnergyUsed(AlchemicalWizardry.energyBazookaLPPerShot);
|
||||
@@ -68,134 +45,61 @@ public class EnergyBazooka extends EnergyItems {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
|
||||
if (stack.getTagCompound() == null) {
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
if (tag.getBoolean("isActive")) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
int maxDelay = 1;
|
||||
int maxDelayAfterActivation = 1;
|
||||
switch (this.tier) {
|
||||
case 1:
|
||||
maxDelay = AlchemicalWizardry.energyBazookaMaxDelay;
|
||||
maxDelayAfterActivation = AlchemicalWizardry.energyBazookaMaxDelayAfterActivation + 1;
|
||||
break;
|
||||
case 2:
|
||||
maxDelay = AlchemicalWizardry.energyBazookaSecondTierMaxDelay;
|
||||
maxDelayAfterActivation = AlchemicalWizardry.energyBazookaSecondTierMaxDelayAfterActivation + 1;
|
||||
break;
|
||||
case 3:
|
||||
maxDelay = AlchemicalWizardry.energyBazookaThirdTierMaxDelay;
|
||||
maxDelayAfterActivation = AlchemicalWizardry.energyBazookaThirdTierMaxDelayAfterActivation + 1;
|
||||
break;
|
||||
}
|
||||
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) {
|
||||
this.setActivated(par1ItemStack, !getActivated(par1ItemStack));
|
||||
par1ItemStack.getTagCompound()
|
||||
.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % maxDelayAfterActivation);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (!getActivated(par1ItemStack)) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (this.getDelay(par1ItemStack) > 0) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode) {
|
||||
if (!syphonBatteries(par1ItemStack, par3EntityPlayer, this.getEnergyUsed())) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
}
|
||||
|
||||
par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
|
||||
|
||||
if (!par2World.isRemote) {
|
||||
par2World.spawnEntityInWorld(
|
||||
new EntityEnergyBazookaMainProjectile(par2World, par3EntityPlayer, this.damage));
|
||||
this.setDelay(par1ItemStack, maxDelay);
|
||||
}
|
||||
public void shoot(World par2World, EntityPlayer par3EntityPlayer) {
|
||||
par2World.spawnEntityInWorld(new EntityEnergyBazookaMainProjectile(par2World, par3EntityPlayer, this.damage));
|
||||
|
||||
Vec3 vec = par3EntityPlayer.getLookVec();
|
||||
double wantedVelocity = (double) this.tier * 2.0D;
|
||||
double wantedVelocity = this.tier * 2.0D;
|
||||
par3EntityPlayer.motionX = -vec.xCoord * wantedVelocity;
|
||||
par3EntityPlayer.motionY = -vec.yCoord * wantedVelocity;
|
||||
par3EntityPlayer.motionZ = -vec.zCoord * wantedVelocity;
|
||||
par2World.playSoundEffect(
|
||||
(double) ((float) par3EntityPlayer.posX + 0.5F),
|
||||
(double) ((float) par3EntityPlayer.posY + 0.5F),
|
||||
(double) ((float) par3EntityPlayer.posZ + 0.5F),
|
||||
par3EntityPlayer.posX + 0.5F,
|
||||
par3EntityPlayer.posY + 0.5F,
|
||||
par3EntityPlayer.posZ + 0.5F,
|
||||
"random.fizz",
|
||||
0.5F,
|
||||
2.6F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.8F);
|
||||
par3EntityPlayer.fallDistance = 0;
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) {
|
||||
if (!(par3Entity instanceof EntityPlayer)) {
|
||||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
int delay = this.getDelay(par1ItemStack);
|
||||
|
||||
if (!par2World.isRemote && delay > 0) {
|
||||
this.setDelay(par1ItemStack, delay - 1);
|
||||
}
|
||||
int lpPerActivation = 0;
|
||||
int maxDelayAfterActivation = 1;
|
||||
public int getShotDelay() {
|
||||
switch (this.tier) {
|
||||
case 1:
|
||||
lpPerActivation = AlchemicalWizardry.energyBazookaLPPerActivation;
|
||||
maxDelayAfterActivation = AlchemicalWizardry.energyBazookaMaxDelayAfterActivation + 1;
|
||||
break;
|
||||
return AlchemicalWizardry.energyBazookaMaxDelay;
|
||||
case 2:
|
||||
lpPerActivation = AlchemicalWizardry.energyBazookaSecondTierLPPerActivation;
|
||||
maxDelayAfterActivation = AlchemicalWizardry.energyBazookaSecondTierMaxDelayAfterActivation + 1;
|
||||
break;
|
||||
return AlchemicalWizardry.energyBazookaSecondTierMaxDelay;
|
||||
case 3:
|
||||
lpPerActivation = AlchemicalWizardry.energyBazookaThirdTierLPPerActivation;
|
||||
maxDelayAfterActivation = AlchemicalWizardry.energyBazookaThirdTierMaxDelayAfterActivation + 1;
|
||||
break;
|
||||
}
|
||||
if (par2World.getWorldTime() % maxDelayAfterActivation
|
||||
== par1ItemStack.getTagCompound().getInteger("worldTimeDelay")
|
||||
&& par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode) {
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, lpPerActivation)) {
|
||||
this.setActivated(par1ItemStack, false);
|
||||
}
|
||||
}
|
||||
return AlchemicalWizardry.energyBazookaThirdTierMaxDelay;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
par1ItemStack.setItemDamage(0);
|
||||
@Override
|
||||
public int drainTicks() {
|
||||
switch (this.tier) {
|
||||
case 1:
|
||||
return AlchemicalWizardry.energyBazookaMaxDelayAfterActivation;
|
||||
case 2:
|
||||
return AlchemicalWizardry.energyBazookaSecondTierMaxDelayAfterActivation;
|
||||
case 3:
|
||||
return AlchemicalWizardry.energyBazookaThirdTierMaxDelayAfterActivation;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int drainCost() {
|
||||
switch (this.tier) {
|
||||
case 1:
|
||||
return AlchemicalWizardry.energyBazookaLPPerActivation;
|
||||
case 2:
|
||||
return AlchemicalWizardry.energyBazookaSecondTierLPPerActivation;
|
||||
case 3:
|
||||
return AlchemicalWizardry.energyBazookaThirdTierLPPerActivation;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -204,45 +108,6 @@ public class EnergyBazooka extends EnergyItems {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.energybazooka.desc"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.alchemy.damage") + " " + this.damage);
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setActivated(ItemStack par1ItemStack, boolean newActivated) {
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
par1ItemStack.getTagCompound().setBoolean("isActive", newActivated);
|
||||
}
|
||||
|
||||
public boolean getActivated(ItemStack par1ItemStack) {
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
return par1ItemStack.getTagCompound().getBoolean("isActive");
|
||||
}
|
||||
|
||||
public void setDelay(ItemStack par1ItemStack, int newDelay) {
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
par1ItemStack.getTagCompound().setInteger("delay", newDelay);
|
||||
}
|
||||
|
||||
public int getDelay(ItemStack par1ItemStack) {
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
return par1ItemStack.getTagCompound().getInteger("delay");
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
}
|
||||
@@ -6,12 +6,12 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
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 WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -19,19 +19,19 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
public class EnergyBlast extends EnergyItems {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIcon;
|
||||
public IIcon activeIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIconTier2;
|
||||
public IIcon activeIconTier2;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIconTier3;
|
||||
public IIcon activeIconTier3;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon passiveIcon;
|
||||
public IIcon passiveIcon;
|
||||
|
||||
private int tier;
|
||||
private int damage;
|
||||
public int tier;
|
||||
public int damage;
|
||||
|
||||
public EnergyBlast(int tier) {
|
||||
super();
|
||||
@@ -70,22 +70,12 @@ public class EnergyBlast extends EnergyItems {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
|
||||
if (stack.getTagCompound() == null) {
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
if (tag.getBoolean("isActive")) {
|
||||
switch (this.tier) {
|
||||
case 1:
|
||||
return this.activeIcon;
|
||||
case 2:
|
||||
return this.activeIconTier2;
|
||||
case 3:
|
||||
return this.activeIconTier3;
|
||||
}
|
||||
return this.activeIcon;
|
||||
if (IBindable.isActive(stack)) {
|
||||
return switch (this.tier) {
|
||||
case 2 -> this.activeIconTier2;
|
||||
case 3 -> this.activeIconTier3;
|
||||
default -> this.activeIcon;
|
||||
};
|
||||
} else {
|
||||
return this.passiveIcon;
|
||||
}
|
||||
@@ -93,53 +83,29 @@ public class EnergyBlast extends EnergyItems {
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
int maxDelay = 1;
|
||||
int maxDelayAfterActivation = 1;
|
||||
switch (this.tier) {
|
||||
case 1:
|
||||
maxDelay = AlchemicalWizardry.energyBlastMaxDelay;
|
||||
maxDelayAfterActivation = AlchemicalWizardry.energyBlastMaxDelayAfterActivation + 1;
|
||||
break;
|
||||
case 2:
|
||||
maxDelay = AlchemicalWizardry.energyBlastSecondTierMaxDelay;
|
||||
maxDelayAfterActivation = AlchemicalWizardry.energyBlastSecondTierMaxDelayAfterActivation + 1;
|
||||
break;
|
||||
case 3:
|
||||
maxDelay = AlchemicalWizardry.energyBlastThirdTierMaxDelay;
|
||||
maxDelayAfterActivation = AlchemicalWizardry.energyBlastThirdTierMaxDelayAfterActivation + 1;
|
||||
break;
|
||||
}
|
||||
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) {
|
||||
this.setActivated(par1ItemStack, !getActivated(par1ItemStack));
|
||||
par1ItemStack.getTagCompound()
|
||||
.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % maxDelayAfterActivation);
|
||||
if (getDelay(par1ItemStack) > 0 && IBindable.isActive(par1ItemStack) && !par3EntityPlayer.isSneaking()) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (!getActivated(par1ItemStack)) {
|
||||
if (checkRightClick(par1ItemStack, par2World, par3EntityPlayer)) {
|
||||
setDelay(par1ItemStack, drainTicks());
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (this.getDelay(par1ItemStack) > 0) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode) {
|
||||
if (!syphonBatteries(par1ItemStack, par3EntityPlayer, this.getEnergyUsed())) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
}
|
||||
|
||||
par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
|
||||
|
||||
if (!par2World.isRemote) {
|
||||
par2World.spawnEntityInWorld(new EnergyBlastProjectile(par2World, par3EntityPlayer, this.damage));
|
||||
this.setDelay(par1ItemStack, maxDelay);
|
||||
shoot(par2World, par3EntityPlayer);
|
||||
this.setDelay(par1ItemStack, getShotDelay());
|
||||
}
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
public void shoot(World par2World, EntityPlayer par3EntityPlayer) {
|
||||
par2World.spawnEntityInWorld(new EnergyBlastProjectile(par2World, par3EntityPlayer, this.damage));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) {
|
||||
if (!(par3Entity instanceof EntityPlayer)) {
|
||||
@@ -147,43 +113,66 @@ public class EnergyBlast extends EnergyItems {
|
||||
}
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
int delay = this.getDelay(par1ItemStack);
|
||||
|
||||
if (!par2World.isRemote && delay > 0) {
|
||||
this.setDelay(par1ItemStack, delay - 1);
|
||||
}
|
||||
int lpPerActivation = 0;
|
||||
int maxDelayAfterActivation = 1;
|
||||
switch (this.tier) {
|
||||
case 1:
|
||||
lpPerActivation = AlchemicalWizardry.energyBlastLPPerActivation;
|
||||
maxDelayAfterActivation = AlchemicalWizardry.energyBlastMaxDelayAfterActivation + 1;
|
||||
break;
|
||||
case 2:
|
||||
lpPerActivation = AlchemicalWizardry.energyBlastSecondTierLPPerActivation;
|
||||
maxDelayAfterActivation = AlchemicalWizardry.energyBlastSecondTierMaxDelayAfterActivation + 1;
|
||||
break;
|
||||
case 3:
|
||||
lpPerActivation = AlchemicalWizardry.energyBlastThirdTierLPPerActivation;
|
||||
maxDelayAfterActivation = AlchemicalWizardry.energyBlastThirdTierMaxDelayAfterActivation + 1;
|
||||
break;
|
||||
}
|
||||
if (par2World.getWorldTime() % maxDelayAfterActivation
|
||||
== par1ItemStack.getTagCompound().getInteger("worldTimeDelay")
|
||||
&& par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode) {
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, lpPerActivation)) {
|
||||
this.setActivated(par1ItemStack, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
checkPassiveDrain(par1ItemStack, par2World, par3EntityPlayer);
|
||||
|
||||
par1ItemStack.setItemDamage(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* The delay between firing multiple shots.
|
||||
*/
|
||||
public int getShotDelay() {
|
||||
switch (this.tier) {
|
||||
case 1:
|
||||
return AlchemicalWizardry.energyBlastMaxDelay;
|
||||
case 2:
|
||||
return AlchemicalWizardry.energyBlastSecondTierMaxDelay;
|
||||
case 3:
|
||||
return AlchemicalWizardry.energyBlastThirdTierMaxDelay;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used for the warmup delay as well as for passive draining.
|
||||
*/
|
||||
@Override
|
||||
public int drainTicks() {
|
||||
switch (this.tier) {
|
||||
case 1:
|
||||
return AlchemicalWizardry.energyBlastMaxDelayAfterActivation;
|
||||
case 2:
|
||||
return AlchemicalWizardry.energyBlastSecondTierMaxDelayAfterActivation;
|
||||
case 3:
|
||||
return AlchemicalWizardry.energyBlastThirdTierMaxDelayAfterActivation;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int drainCost() {
|
||||
switch (this.tier) {
|
||||
case 1:
|
||||
return AlchemicalWizardry.energyBlastLPPerActivation;
|
||||
case 2:
|
||||
return AlchemicalWizardry.energyBlastSecondTierLPPerActivation;
|
||||
case 3:
|
||||
return AlchemicalWizardry.energyBlastThirdTierLPPerActivation;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int rightClickCost() {
|
||||
return getEnergyUsed();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@@ -191,45 +180,14 @@ public class EnergyBlast extends EnergyItems {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.energyblast.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.energyblast.desc2"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.alchemy.damage") + " " + this.damage);
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
public void setActivated(ItemStack par1ItemStack, boolean newActivated) {
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
par1ItemStack.getTagCompound().setBoolean("isActive", newActivated);
|
||||
}
|
||||
|
||||
public boolean getActivated(ItemStack par1ItemStack) {
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
return par1ItemStack.getTagCompound().getBoolean("isActive");
|
||||
}
|
||||
|
||||
public void setDelay(ItemStack par1ItemStack, int newDelay) {
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
par1ItemStack.getTagCompound().setInteger("delay", newDelay);
|
||||
public void setDelay(ItemStack par1ItemStack, int delay) {
|
||||
IBindable.getTag(par1ItemStack).setInteger("delay", delay);
|
||||
}
|
||||
|
||||
public int getDelay(ItemStack par1ItemStack) {
|
||||
if (par1ItemStack.getTagCompound() == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
return par1ItemStack.getTagCompound().getInteger("delay");
|
||||
return IBindable.getTag(par1ItemStack).getInteger("delay");
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@ package WayofTime.alchemicalWizardry.common.items;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
@@ -23,11 +22,16 @@ public class EnergyItems extends Item implements IBindable {
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
||||
protected void setEnergyUsed(int par1int) {
|
||||
public void setEnergyUsed(int par1int) {
|
||||
this.energyUsed = par1int;
|
||||
}
|
||||
|
||||
protected int getEnergyUsed() {
|
||||
public int getEnergyUsed() {
|
||||
return this.energyUsed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int drainCost() {
|
||||
return this.energyUsed;
|
||||
}
|
||||
|
||||
@@ -90,9 +94,9 @@ public class EnergyItems extends Item implements IBindable {
|
||||
posY,
|
||||
posZ);
|
||||
world.playSoundEffect(
|
||||
(double) ((float) player.posX + 0.5F),
|
||||
(double) ((float) player.posY + 0.5F),
|
||||
(double) ((float) player.posZ + 0.5F),
|
||||
((float) player.posX + 0.5F),
|
||||
((float) player.posY + 0.5F),
|
||||
((float) player.posZ + 0.5F),
|
||||
"random.fizz",
|
||||
0.5F,
|
||||
2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
@@ -181,35 +185,28 @@ public class EnergyItems extends Item implements IBindable {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Global static methods
|
||||
// Used by some addon mods like Blood Arsenal
|
||||
@Deprecated
|
||||
public static boolean checkAndSetItemOwner(ItemStack item, EntityPlayer player) {
|
||||
return !SpellHelper.isFakePlayer(player) && SoulNetworkHandler.checkAndSetItemPlayer(item, player);
|
||||
return IBindable.checkAndSetItemOwner(item, player);
|
||||
}
|
||||
|
||||
// Used by some addon mods like Blood Arsenal
|
||||
@Deprecated
|
||||
public static void setItemOwner(ItemStack item, String ownerName) {
|
||||
if (item.getTagCompound() == null) {
|
||||
item.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
item.getTagCompound().setString("ownerName", ownerName);
|
||||
IBindable.setItemOwner(item, ownerName);
|
||||
}
|
||||
|
||||
// Used by some addon mods like Blood Arsenal
|
||||
@Deprecated
|
||||
public static void checkAndSetItemOwner(ItemStack item, String ownerName) {
|
||||
if (item.getTagCompound() == null) {
|
||||
item.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if (item.getTagCompound().getString("ownerName").equals("")) {
|
||||
item.getTagCompound().setString("ownerName", ownerName);
|
||||
}
|
||||
IBindable.checkAndSetItemOwner(item, ownerName);
|
||||
}
|
||||
|
||||
// Used by some addon mods like Blood Arsenal
|
||||
@Deprecated
|
||||
public static String getOwnerName(ItemStack item) {
|
||||
if (item.getTagCompound() == null) {
|
||||
item.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
return item.getTagCompound().getString("ownerName");
|
||||
return IBindable.getOwnerName(item);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
|
||||
@@ -19,12 +19,13 @@ import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.omega.OmegaParadigm;
|
||||
import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class EnergySword extends ItemSword {
|
||||
public class EnergySword extends ItemSword implements IBindable {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIcon;
|
||||
@@ -51,6 +52,11 @@ public class EnergySword extends ItemSword {
|
||||
return this.energyUsed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int drainCost() {
|
||||
return this.energyUsed;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
@@ -61,13 +67,7 @@ public class EnergySword extends ItemSword {
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
|
||||
if (stack.getTagCompound() == null) {
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
if (tag.getBoolean("isActive")) {
|
||||
if (IBindable.isActive(stack)) {
|
||||
return this.activeIcon;
|
||||
} else {
|
||||
return this.passiveIcon;
|
||||
@@ -80,7 +80,7 @@ public class EnergySword extends ItemSword {
|
||||
|
||||
@Override
|
||||
public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) {
|
||||
boolean isActive = getActivated(stack);
|
||||
boolean isActive = IBindable.isActive(stack);
|
||||
if (isActive && !player.worldObj.isRemote) {
|
||||
OmegaParadigm parad = this.getOmegaParadigmOfWeilder(player);
|
||||
|
||||
@@ -97,8 +97,8 @@ public class EnergySword extends ItemSword {
|
||||
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase,
|
||||
EntityLivingBase par3EntityLivingBase) {
|
||||
if (par3EntityLivingBase instanceof EntityPlayer) {
|
||||
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, (EntityPlayer) par3EntityLivingBase) || !EnergyItems
|
||||
.syphonBatteries(par1ItemStack, (EntityPlayer) par3EntityLivingBase, this.getEnergyUsed())) {
|
||||
if (!IBindable.checkAndSetItemOwner(par1ItemStack, (EntityPlayer) par3EntityLivingBase) || !EnergyItems
|
||||
.syphonBatteries(par1ItemStack, (EntityPlayer) par3EntityLivingBase, this.drainCost())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -110,15 +110,8 @@ public class EnergySword extends ItemSword {
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
super.onItemRightClick(par1ItemStack, par2World, par3EntityPlayer);
|
||||
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) {
|
||||
this.setActivated(par1ItemStack, !getActivated(par1ItemStack));
|
||||
par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (!getActivated(par1ItemStack)) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
this.toggle(par1ItemStack, par2World, par3EntityPlayer);
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
@@ -140,38 +133,11 @@ public class EnergySword extends ItemSword {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if (par2World.getWorldTime() % 100 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay")
|
||||
&& par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode) {
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 50)) {
|
||||
this.setActivated(par1ItemStack, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
checkPassiveDrain(par1ItemStack, par2World, par3EntityPlayer);
|
||||
|
||||
par1ItemStack.setItemDamage(0);
|
||||
}
|
||||
|
||||
public void setActivated(ItemStack par1ItemStack, boolean newActivated) {
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
itemTag.setBoolean("isActive", newActivated);
|
||||
}
|
||||
|
||||
public boolean getActivated(ItemStack par1ItemStack) {
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null) {
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
return itemTag.getBoolean("isActive");
|
||||
}
|
||||
|
||||
public float func_82803_g() {
|
||||
return 4.0F;
|
||||
}
|
||||
@@ -180,20 +146,7 @@ public class EnergySword extends ItemSword {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.caution.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.caution.desc2"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive")) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.activated"));
|
||||
} else {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.sigil.state.deactivated"));
|
||||
}
|
||||
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+11
-19
@@ -8,6 +8,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -26,25 +27,16 @@ public class EnhancedTelepositionFocus extends TelepositionFocus {
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.enhancedtelepfocus.desc"));
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.alchemy.coords") + " "
|
||||
+ itemTag.getInteger("xCoord")
|
||||
+ ", "
|
||||
+ itemTag.getInteger("yCoord")
|
||||
+ ", "
|
||||
+ itemTag.getInteger("zCoord"));
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.alchemy.dimension") + " " + getDimensionID(par1ItemStack));
|
||||
}
|
||||
NBTTagCompound itemTag = IBindable.getTag(par1ItemStack);
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.alchemy.coords") + " "
|
||||
+ itemTag.getInteger("xCoord")
|
||||
+ ", "
|
||||
+ itemTag.getInteger("yCoord")
|
||||
+ ", "
|
||||
+ itemTag.getInteger("zCoord"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.alchemy.dimension") + " " + getDimensionID(par1ItemStack));
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
@@ -129,7 +129,7 @@ public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAl
|
||||
return;
|
||||
}
|
||||
|
||||
if (world.getWorldTime() % tickRate == 0) {
|
||||
if (world.getTotalWorldTime() % tickRate == 0) {
|
||||
boolean shouldExecute = player.getHealth() / player.getMaxHealth() > activationPoint
|
||||
&& this.getStoredLP(itemStack) < maxStored;
|
||||
|
||||
|
||||
@@ -41,6 +41,10 @@ public class ItemBloodRuneBlock extends ItemBlock {
|
||||
name = "acceleration";
|
||||
break;
|
||||
|
||||
case 6:
|
||||
name = "quickness";
|
||||
break;
|
||||
|
||||
default:
|
||||
name = "broken";
|
||||
}
|
||||
|
||||
+3
-7
@@ -12,6 +12,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -33,16 +34,11 @@ public class ItemComplexSpellCrystal extends EnergyItems {
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.complexspellcrystal.desc"));
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals("")) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.alchemy.coords") + " "
|
||||
+ itemTag.getInteger("xCoord")
|
||||
@@ -57,7 +53,7 @@ public class ItemComplexSpellCrystal extends EnergyItems {
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) {
|
||||
if (!IBindable.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking()) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,16 +38,12 @@ public class ItemDiabloKey extends EnergyItems {
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.diablokey.desc"));
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
World world = par3EntityPlayer.worldObj;
|
||||
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)
|
||||
if (!IBindable.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)
|
||||
|| par3EntityPlayer instanceof FakePlayer) {
|
||||
return par1ItemStack;
|
||||
}
|
||||
@@ -105,7 +101,7 @@ public class ItemDiabloKey extends EnergyItems {
|
||||
}
|
||||
|
||||
if (item instanceof IBindable) {
|
||||
EnergyItems.checkAndSetItemOwner(itemStack, ownerName);
|
||||
IBindable.checkAndSetItemOwner(itemStack, ownerName);
|
||||
}
|
||||
}
|
||||
par3EntityPlayer.inventoryContainer.detectAndSendChanges();
|
||||
@@ -118,7 +114,7 @@ public class ItemDiabloKey extends EnergyItems {
|
||||
public void getSubItems(Item id, CreativeTabs creativeTab, List list) {
|
||||
list.add(new ItemStack(ModItems.itemKeyOfDiablo));
|
||||
ItemStack boundKey = new ItemStack(ModItems.itemKeyOfDiablo);
|
||||
EnergyItems.checkAndSetItemOwner(boundKey, "Server-wide Soul Network");
|
||||
IBindable.checkAndSetItemOwner(boundKey, "Server-wide Soul Network");
|
||||
list.add(boundKey);
|
||||
}
|
||||
}
|
||||
@@ -142,6 +142,9 @@ 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);
|
||||
@@ -156,7 +159,7 @@ public class ItemIncense extends Item implements IIncense {
|
||||
new ItemStack(Items.redstone),
|
||||
leavesStack,
|
||||
leavesStack,
|
||||
new ItemStack(ModItems.apprenticeBloodOrb)));
|
||||
new ItemStack(ModItems.weakBloodOrb)));
|
||||
GameRegistry.addRecipe(
|
||||
new ShapelessBloodOrbRecipe(
|
||||
new ItemStack(ModItems.itemIncense, 1, 2),
|
||||
@@ -168,7 +171,7 @@ public class ItemIncense extends Item implements IIncense {
|
||||
glowstoneStack,
|
||||
stringStack,
|
||||
stringStack,
|
||||
new ItemStack(ModItems.magicianBloodOrb)));
|
||||
new ItemStack(ModItems.apprenticeBloodOrb)));
|
||||
GameRegistry.addRecipe(
|
||||
new ShapelessBloodOrbRecipe(
|
||||
new ItemStack(ModItems.itemIncense, 1, 3),
|
||||
@@ -178,7 +181,8 @@ public class ItemIncense extends Item implements IIncense {
|
||||
soulSandStack,
|
||||
gunpowderStack,
|
||||
fermentedEyeStack,
|
||||
new ItemStack(ModItems.masterBloodOrb)));
|
||||
blankSlateStack,
|
||||
new ItemStack(ModItems.apprenticeBloodOrb)));
|
||||
GameRegistry.addRecipe(
|
||||
new ShapelessBloodOrbRecipe(
|
||||
new ItemStack(ModItems.itemIncense, 1, 4),
|
||||
@@ -189,17 +193,17 @@ public class ItemIncense extends Item implements IIncense {
|
||||
netherwartStack,
|
||||
blazePowderStack,
|
||||
fracturedBoneStack,
|
||||
goldNuggetStack,
|
||||
new ItemStack(ModItems.archmageBloodOrb)));
|
||||
reinforcedSlateStack,
|
||||
new ItemStack(ModItems.magicianBloodOrb)));
|
||||
}
|
||||
|
||||
public enum EnumIncense {
|
||||
|
||||
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);
|
||||
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);
|
||||
|
||||
public final int minValue;
|
||||
public final int maxValue;
|
||||
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
|
||||
import WayofTime.alchemicalWizardry.common.block.RitualStone;
|
||||
@@ -36,15 +37,13 @@ public class ItemRitualDismantler extends EnergyItems {
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List par3List, boolean x) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.dismatler.desc"));
|
||||
if (stack.hasTagCompound()) par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ stack.getTagCompound().getString("ownerName"));
|
||||
addBindingInformation(stack, par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7,
|
||||
float par8, float par9, float par10) {
|
||||
return EnergyItems.checkAndSetItemOwner(stack, player)
|
||||
return IBindable.checkAndSetItemOwner(stack, player)
|
||||
&& breakRitualStoneAtMasterStone(stack, player, world, x, y, z);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.lwjgl.input.Keyboard;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.api.Int3;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IRitualDiviner;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IRitualStone;
|
||||
@@ -74,9 +75,7 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner {
|
||||
if (!(stack.getTagCompound() == null)) {
|
||||
String ritualID = this.getCurrentRitual(stack);
|
||||
// TODO
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ stack.getTagCompound().getString("ownerName"));
|
||||
addBindingInformation(stack, par3List);
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.alchemy.ritualid") + " " + ritualID);
|
||||
List<RitualComponent> ritualList = Rituals.getRitualList(this.getCurrentRitual(stack));
|
||||
if (ritualList == null) {
|
||||
@@ -191,7 +190,7 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner {
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7,
|
||||
float par8, float par9, float par10) {
|
||||
if (!EnergyItems.checkAndSetItemOwner(stack, player)) return false;
|
||||
if (!IBindable.checkAndSetItemOwner(stack, player)) return false;
|
||||
|
||||
if (placeRitualStoneAtMasterStone(stack, player, world, x, y, z)) {
|
||||
this.setStoredLocation(stack, new Int3(x, y, z));
|
||||
@@ -304,7 +303,7 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner {
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) {
|
||||
if (entity instanceof EntityPlayer && hasStoredLocation(stack) && world.getWorldTime() % 5 == 0) {
|
||||
if (entity instanceof EntityPlayer && hasStoredLocation(stack) && world.getTotalWorldTime() % 5 == 0) {
|
||||
Int3 loc = getStoredLocation(stack);
|
||||
|
||||
int x = loc.xCoord;
|
||||
@@ -369,7 +368,7 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner {
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
if (EnergyItems.checkAndSetItemOwner(stack, par3EntityPlayer) && par3EntityPlayer.isSneaking()) {
|
||||
if (IBindable.checkAndSetItemOwner(stack, par3EntityPlayer) && par3EntityPlayer.isSneaking()) {
|
||||
rotateRituals(par2World, par3EntityPlayer, stack, true);
|
||||
}
|
||||
|
||||
@@ -381,7 +380,7 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner {
|
||||
if (entityLiving instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) entityLiving;
|
||||
|
||||
if (!EnergyItems.checkAndSetItemOwner(stack, player)) return true;
|
||||
if (!IBindable.checkAndSetItemOwner(stack, player)) return true;
|
||||
|
||||
if (!player.isSwingInProgress) {
|
||||
if (player.isSneaking()) {
|
||||
|
||||
@@ -5,14 +5,15 @@ import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldProvider;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -52,7 +53,7 @@ public class LavaCrystal extends EnergyItems {
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
|
||||
IBindable.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@@ -60,19 +61,14 @@ public class LavaCrystal extends EnergyItems {
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.lavacrystal.desc1"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.lavacrystal.desc2"));
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null)) {
|
||||
par3List.add(
|
||||
StatCollector.translateToLocal("tooltip.owner.currentowner") + " "
|
||||
+ par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
addBindingInformation(par1ItemStack, par3List);
|
||||
}
|
||||
|
||||
public boolean hasEnoughEssence(ItemStack itemStack) {
|
||||
if (itemStack.getTagCompound() != null && !(itemStack.getTagCompound().getString("ownerName").equals(""))) {
|
||||
String ownerName = itemStack.getTagCompound().getString("ownerName");
|
||||
|
||||
if (MinecraftServer.getServer() == null) {
|
||||
if (FMLCommonHandler.instance().getMinecraftServerInstance() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loaded 100 of 214 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user