Compare commits

..
12 Commits
Author SHA1 Message Date
Abdiel Kavash 485e462a83 Allow the Orb of Armok to work from within a Blood Altar. (#89)
Adds a new method isFilledForFree to IBloodOrb which is false by default, but may be used by orbs like the Orb of Armok to be filled instantly by the Blood Altar.
2025-05-27 15:53:44 -04:00
koolkrafter5 47f5e1e594 Update Readme (#88) 2025-05-26 17:15:26 +02:00
Maya 1546426f30 update 2025-05-25 18:38:52 -06:00
koolkrafter5andMaya 4acfe14b78 Orchestra of the Phantom Hands Improvements (#85)
Co-authored-by: Maya <[email protected]>
2025-05-25 18:38:01 -06:00
Maya 86d7ea0370 update 2025-05-25 12:58:42 -06:00
koolkrafter5andMaya bbf0e2aeb2 Inscription Tools Refactor (#86)
Co-authored-by: Maya <[email protected]>
2025-05-25 18:53:25 +00:00
koolkrafter5 22f1bd3846 Add an Alchemic Calcinator handler for NEI (#87) 2025-05-25 12:50:55 -06:00
Maya 84545955aa update 2025-05-13 18:49:58 -05:00
koolkrafter5andMaya a6f1919f52 NEI Meteor Handler Revamp (#77)
Co-authored-by: Maya <[email protected]>
2025-05-13 18:49:06 -05:00
Martin Robertz 097c0c62e4 update 2025-05-11 12:58:32 +02:00
c04775398a Polishes Alchemic Calcinator & Belljars (#79)
Co-authored-by: Martin Robertz <[email protected]>
Co-authored-by: Maya <[email protected]>
Co-authored-by: koolkrafter5 <[email protected]>
2025-05-11 01:20:27 -04:00
Srdra 62789ce20b Lil fix for PR #83, shift down Purpura yet another tier (#84) 2025-05-10 10:50:29 -05:00
51 changed files with 1190 additions and 679 deletions

No files matched your search

+55 -61
View File
@@ -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
![CCA4.0](https://licensebuttons.net/l/by/4.0/88x31.png)
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?
+7 -7
View File
@@ -23,19 +23,19 @@
*/
dependencies {
api("com.github.GTNewHorizons:waila:1.8.4:dev")
api("com.github.GTNewHorizons:NotEnoughItems:2.7.40-GTNH:dev")
api("com.github.GTNewHorizons:waila:1.8.6:dev")
api("com.github.GTNewHorizons:NotEnoughItems:2.7.49-GTNH:dev")
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.266:dev") {transitive = false }
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.314:dev") {transitive = false }
compileOnly("com.github.GTNewHorizons:Botania:1.12.6-GTNH:api") {transitive = false }
compileOnly("com.github.GTNewHorizons:ForestryMC:4.10.7:api") {transitive = false }
compileOnly("com.github.GTNewHorizons: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.2:dev") {transitive = false }
compileOnly("com.github.GTNewHorizons:Chisel:2.16.2-GTNH:api") {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.4.1: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 }
@@ -8,7 +8,6 @@ import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool;
import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool;
import WayofTime.alchemicalWizardry.common.items.AWBaseItems;
import WayofTime.alchemicalWizardry.common.items.ActivationCrystal;
import WayofTime.alchemicalWizardry.common.items.AirScribeTool;
import WayofTime.alchemicalWizardry.common.items.ApprenticeBloodOrb;
import WayofTime.alchemicalWizardry.common.items.ArchmageBloodOrb;
import WayofTime.alchemicalWizardry.common.items.ArmourInhibitor;
@@ -20,17 +19,13 @@ import WayofTime.alchemicalWizardry.common.items.BoundShovel;
import WayofTime.alchemicalWizardry.common.items.CheatyItem;
import WayofTime.alchemicalWizardry.common.items.CreativeDagger;
import WayofTime.alchemicalWizardry.common.items.DaggerOfSacrifice;
import WayofTime.alchemicalWizardry.common.items.DawnScribeTool;
import WayofTime.alchemicalWizardry.common.items.DemonPlacer;
import WayofTime.alchemicalWizardry.common.items.DemonicTelepositionFocus;
import WayofTime.alchemicalWizardry.common.items.DuskScribeTool;
import WayofTime.alchemicalWizardry.common.items.EarthScribeTool;
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
import WayofTime.alchemicalWizardry.common.items.EnergyBazooka;
import WayofTime.alchemicalWizardry.common.items.EnergyBlast;
import WayofTime.alchemicalWizardry.common.items.EnergySword;
import WayofTime.alchemicalWizardry.common.items.EnhancedTelepositionFocus;
import WayofTime.alchemicalWizardry.common.items.FireScribeTool;
import WayofTime.alchemicalWizardry.common.items.ItemAlchemyBase;
import WayofTime.alchemicalWizardry.common.items.ItemBloodLetterPack;
import WayofTime.alchemicalWizardry.common.items.ItemComplexSpellCrystal;
@@ -45,9 +40,9 @@ import WayofTime.alchemicalWizardry.common.items.MagicianBloodOrb;
import WayofTime.alchemicalWizardry.common.items.MasterBloodOrb;
import WayofTime.alchemicalWizardry.common.items.ReinforcedTelepositionFocus;
import WayofTime.alchemicalWizardry.common.items.SacrificialDagger;
import WayofTime.alchemicalWizardry.common.items.ScribeTool;
import WayofTime.alchemicalWizardry.common.items.TelepositionFocus;
import WayofTime.alchemicalWizardry.common.items.TranscendentBloodOrb;
import WayofTime.alchemicalWizardry.common.items.WaterScribeTool;
import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour;
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourEarth;
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourFire;
@@ -271,10 +266,14 @@ public class ModItems {
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");
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");
activationCrystal = new ActivationCrystal();
boundPickaxe = new BoundPickaxe().setUnlocalizedName("boundPickaxe");
boundAxe = new BoundAxe().setUnlocalizedName("boundAxe");
@@ -313,7 +312,6 @@ public class ModItems {
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");
@@ -348,8 +346,6 @@ public class ModItems {
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");
@@ -409,6 +405,8 @@ public class ModItems {
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.activationCrystal, "activationCrystal");
GameRegistry.registerItem(ModItems.boundPickaxe, "boundPickaxe");
GameRegistry.registerItem(ModItems.boundAxe, "boundAxe");
@@ -449,7 +447,6 @@ public class ModItems {
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");
@@ -485,8 +482,6 @@ public class ModItems {
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");
@@ -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;
}
@@ -5,4 +5,8 @@ public interface IBloodOrb {
int getMaxEssence();
int getOrbLevel();
default boolean isFilledForFree() {
return false;
}
}
@@ -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);
}
@@ -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";
@@ -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");
@@ -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
@@ -1,51 +1,70 @@
package WayofTime.alchemicalWizardry.client.nei;
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.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 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 float fillerChance;
public CachedMeteorRecipe(Meteor meteor, ItemStack focusStack) {
this.input.add(new PositionedStack(meteor.focusItem, 74, 4));
this.input.add(new PositionedStack(meteor.focusItem, 75, 4));
int row = 0;
int col = 0;
float totalComponentWeight = MeteorComponent.getTotalListWeight(meteor.ores);
float fillerChance = meteor.fillerChance;
fillerChance = meteor.fillerChance;
List<MeteorComponent> sortedComponents = new ArrayList<>(meteor.ores);
sortedComponents.sort(Comparator.comparingInt(c -> -c.getWeight()));
@@ -115,8 +134,8 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
}
}
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) {
@@ -144,11 +163,11 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
}
public int getCost() {
return cost;
return costInfo.getCost();
}
public int getRadius() {
return radius;
return radiusInfo.getRadius();
}
}
@@ -225,6 +244,11 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
return false;
}
@Override
public int recipiesPerPage() {
return 1;
}
@Override
public String getGuiTexture() {
return new ResourceLocation("alchemicalwizardry", "gui/nei/meteor.png").toString();
@@ -238,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
@@ -264,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;
@@ -275,6 +296,85 @@ 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");
@@ -292,4 +392,12 @@ public class NEIMeteorRecipeHandler extends TemplateRecipeHandler {
private int getEstimatedAmount(float chance, int radius) {
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());
}
return Joiner.on(", ").join(blockNames);
}
}
@@ -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));
}
}
@@ -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();
@@ -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)
@@ -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
@@ -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");
}
}
@@ -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");
}
}
@@ -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");
}
}
@@ -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");
}
}
@@ -194,7 +194,7 @@ public class ItemIncense extends Item implements IIncense {
blazePowderStack,
fracturedBoneStack,
reinforcedSlateStack,
new ItemStack(ModItems.masterBloodOrb)));
new ItemStack(ModItems.magicianBloodOrb)));
}
public enum EnumIncense {
@@ -2,44 +2,68 @@ package WayofTime.alchemicalWizardry.common.items;
import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ScribeTool extends EnergyItems {
private int meta;
private final int meta;
private final String iconName;
@SideOnly(Side.CLIENT)
private IIcon icon;
public ScribeTool(int inkType) {
this(inkType, "unknown");
}
public ScribeTool(int inkType, String iconName) {
super();
this.meta = inkType;
this.iconName = iconName;
setMaxStackSize(1);
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
setMaxDamage(10);
setEnergyUsed(10);
this.meta = inkType;
}
@Override
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
par3List.add(StatCollector.translateToLocal("tooltip.scribetool.desc"));
addBindingInformation(par1ItemStack, par3List);
}
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
if (IBindable.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) {
if (par1ItemStack.getItemDamage() > 0) {
par1ItemStack.setItemDamage(par1ItemStack.getItemDamage() - 1);
}
}
return par1ItemStack;
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
}
public int getType() {
return this.meta;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List<String> list, boolean sneaking) {
list.add(StatCollector.translateToLocal("tooltip.scribetool.desc"));
addBindingInformation(stack, list);
}
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
if (IBindable.checkAndSetItemOwner(stack, player) && stack.getItemDamage() > 0
&& EnergyItems.syphonBatteries(stack, player, getEnergyUsed())) {
stack.setItemDamage(stack.getItemDamage() - 1);
}
return stack;
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister register) {
this.icon = register.registerIcon("AlchemicalWizardry:" + iconName);
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int damage) {
return this.icon;
}
}
@@ -1,21 +0,0 @@
package WayofTime.alchemicalWizardry.common.items;
import net.minecraft.client.renderer.texture.IIconRegister;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class WaterScribeTool extends ScribeTool {
public WaterScribeTool() {
super(1);
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WaterScribeTool");
}
}
@@ -32,8 +32,11 @@ public class OutputRoutingFocus extends RoutingFocus implements ILimitedRoutingF
}
@Override
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List,
boolean par4) {
super.addInformation(par1ItemStack, par2EntityPlayer, par3List, par4);
if (!(par1ItemStack.getItem() instanceof OutputRoutingFocus focus)) return;
par3List.addAll(focus.getLogic(par1ItemStack).getDescription());
if (!(par1ItemStack.getTagCompound() == null)) {
int limit = this.getRoutingFocusLimit(par1ItemStack);
@@ -55,49 +58,18 @@ public class OutputRoutingFocus extends RoutingFocus implements ILimitedRoutingF
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int damage) {
switch (damage) {
case 0:
return this.itemIcon;
case 1:
return this.modItemIcon;
case 2:
return this.ignMetaIcon;
case 3:
return this.matchNBTIcon;
case 4:
return this.globalIcon;
}
return this.itemIcon;
}
@Override
public String getUnlocalizedName(ItemStack itemStack) {
String addedString = "";
switch (itemStack.getItemDamage()) {
case 0:
addedString = "default";
break;
case 1:
addedString = "modItem";
break;
case 2:
addedString = "ignMeta";
break;
case 3:
addedString = "matchNBT";
break;
case 4:
addedString = "global";
break;
}
return super.getUnlocalizedName() + "." + addedString;
return switch (damage) {
case 1 -> this.modItemIcon;
case 2 -> this.ignMetaIcon;
case 3 -> this.matchNBTIcon;
case 4 -> this.globalIcon;
default -> this.itemIcon;
};
}
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item id, CreativeTabs creativeTab, List list) {
public void getSubItems(Item id, CreativeTabs creativeTab, List<ItemStack> list) {
for (int meta = 0; meta < 5; ++meta) {
list.add(new ItemStack(id, 1, meta));
}
@@ -106,18 +78,14 @@ public class OutputRoutingFocus extends RoutingFocus implements ILimitedRoutingF
@Override
public RoutingFocusLogic getLogic(ItemStack itemStack) {
if (itemStack != null) {
switch (itemStack.getItemDamage()) {
case 0:
return new RoutingFocusLogicLimitDefault(itemStack);
case 1:
return new RoutingFocusLogicLimitModItems(itemStack);
case 2:
return new RoutingFocusLogicLimitIgnMeta(itemStack);
case 3:
return new RoutingFocusLogicLimitMatchNBT(itemStack);
case 4:
return new RoutingFocusLogicLimitGlobal(itemStack);
}
return switch (itemStack.getItemDamage()) {
case 0 -> new RoutingFocusLogicLimitDefault(itemStack);
case 1 -> new RoutingFocusLogicLimitModItems(itemStack);
case 2 -> new RoutingFocusLogicLimitIgnMeta(itemStack);
case 3 -> new RoutingFocusLogicLimitMatchNBT(itemStack);
case 4 -> new RoutingFocusLogicLimitGlobal(itemStack);
default -> new RoutingFocusLogic();
};
}
return new RoutingFocusLogic();
@@ -74,7 +74,8 @@ public class RoutingFocus extends Item {
}
@Override
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List,
boolean par4) {
par3List.add(StatCollector.translateToLocal(this.getFocusDescription()));
if (!(par1ItemStack.getTagCompound() == null)) {
@@ -89,7 +90,9 @@ public class RoutingFocus extends Item {
+ itemTag.getInteger("zCoord"));
par3List.add(
StatCollector.translateToLocal("tooltip.alchemy.direction") + " "
+ this.getSetDirection(par1ItemStack));
+ StatCollector.translateToLocal(
"message.ritual.side."
+ this.getSetDirection(par1ItemStack).toString().toLowerCase()));
}
}
@@ -168,4 +171,17 @@ public class RoutingFocus extends Item {
public RoutingFocusLogic getLogic(ItemStack itemStack) {
return new RoutingFocusLogic();
}
public String getName(ItemStack stack) {
if (stack.hasTagCompound()) {
NBTTagCompound tag = stack.getTagCompound();
if (tag.hasKey("display", 10)) {
NBTTagCompound display = tag.getCompoundTag("display");
if (display.hasKey("Name", 8)) {
return display.getString("Name");
}
}
}
return "";
}
}
@@ -1,10 +1,7 @@
package WayofTime.alchemicalWizardry.common.rituals;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
@@ -20,226 +17,142 @@ import WayofTime.alchemicalWizardry.api.RoutingFocusPosAndFacing;
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.common.items.routing.InputRoutingFocus;
import WayofTime.alchemicalWizardry.common.items.routing.OutputRoutingFocus;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
public class RitualEffectItemRouting extends RitualEffect {
Random rand = new Random();
private static final Int3[] INPUT_BUFFER_LOCATIONS = { new Int3(1, 0, 0), new Int3(-1, 0, 0), new Int3(0, 0, 1),
new Int3(0, 0, -1) };
private static final Int3[] OUTPUT_BUFFER_LOCATIONS = { new Int3(2, 0, 2), new Int3(-2, 0, 2), new Int3(2, 0, -2),
new Int3(-2, 0, -2) };
@Override
public void performEffect(IMasterRitualStone ritualStone) {
String owner = ritualStone.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
World world = ritualStone.getWorld();
int x = ritualStone.getXCoord();
int y = ritualStone.getYCoord();
int z = ritualStone.getZCoord();
if (world.getTotalWorldTime() % 20 != 0) {
return;
if (world.getTotalWorldTime() % 20 != 0) return;
List<IInventory> outputFocusChests = findBufferChests(world, x, y, z, OUTPUT_BUFFER_LOCATIONS);
if (outputFocusChests.isEmpty()) return;
List<IInventory> inputFocusChests = findBufferChests(world, x, y, z, INPUT_BUFFER_LOCATIONS);
if (inputFocusChests.isEmpty()) return;
for (IInventory outputFoci : outputFocusChests) {
processOutputFoci(world, outputFoci, inputFocusChests);
}
}
Map<Int3, IInventory> tileMap = new HashMap();
private void processOutputFoci(World world, IInventory outputFoci, List<IInventory> inputFocusChests) {
RoutingFocusParadigm paradigm = new RoutingFocusParadigm();
boolean lastItemWasFocus = true;
List<IInventory> outputList = new ArrayList();
for (int i = 0; i < 4; i++) // Check output foci chests, return if none available
{
Int3 outputFocusChest = this.getOutputBufferChestLocation(i);
TileEntity outputFocusInv = world.getTileEntity(
x + outputFocusChest.xCoord,
y + outputFocusChest.yCoord,
z + outputFocusChest.zCoord);
if (outputFocusInv instanceof IInventory) {
outputList.add((IInventory) outputFocusInv);
for (int i = 0; i < outputFoci.getSizeInventory(); i++) {
ItemStack keyStack = outputFoci.getStackInSlot(i);
if (keyStack == null) continue;
if (keyStack.getItem() instanceof OutputRoutingFocus outputFocus) {
if (!lastItemWasFocus) paradigm.clear();
paradigm.addRoutingFocusPosAndFacing(outputFocus.getPosAndFacing(keyStack));
paradigm.addLogic(outputFocus.getLogic(keyStack));
paradigm.addName(outputFocus.getName(keyStack));
lastItemWasFocus = true;
continue;
}
}
lastItemWasFocus = false;
if (outputList.isEmpty()) {
return;
}
for (RoutingFocusPosAndFacing posAndFacing : paradigm.locationList) {
if (posAndFacing == null) continue;
ForgeDirection inputDirection = posAndFacing.facing;
TileEntity outputTarget = world.getTileEntity(
posAndFacing.location.xCoord,
posAndFacing.location.yCoord,
posAndFacing.location.zCoord);
for (IInventory outputFocusInventory : outputList) {
{
OutputRoutingFocus outputFocus;;
if (!(outputTarget instanceof IInventory outputInventory)) continue;
RoutingFocusParadigm parad = new RoutingFocusParadigm();
TileEntity outputChest = null; // Destination
ForgeDirection inputDirection;
{
IInventory outputChestInventory = null;
boolean lastItemWasFocus = true;
for (int j = 0; j < outputFocusInventory.getSizeInventory(); j++) {
ItemStack keyStack = outputFocusInventory.getStackInSlot(j);
if (keyStack == null) {
continue;
}
if (keyStack.getItem() instanceof OutputRoutingFocus) {
if (!lastItemWasFocus) {
parad.clear();
}
outputFocus = (OutputRoutingFocus) keyStack.getItem();
parad.addRoutingFocusPosAndFacing(outputFocus.getPosAndFacing(keyStack));
parad.addLogic(outputFocus.getLogic(keyStack));
lastItemWasFocus = true;
continue;
} else {
lastItemWasFocus = false;
}
for (RoutingFocusPosAndFacing posAndFacing : parad.locationList) {
if (posAndFacing == null) {
continue;
}
inputDirection = posAndFacing.facing;
if (outputChest == null || !posAndFacing.location
.equals(new Int3(outputChest.xCoord, outputChest.yCoord, outputChest.zCoord))) {
outputChest = world.getTileEntity(
posAndFacing.location.xCoord,
posAndFacing.location.yCoord,
posAndFacing.location.zCoord);
if (outputChest instanceof IInventory) {
outputChestInventory = (IInventory) outputChest;
} else {
continue;
}
}
for (int i = 0; i < 4; i++) {
Int3 inputFocusChest = this.getInputBufferChestLocation(i);
TileEntity inputFocusInv = world.getTileEntity(
x + inputFocusChest.xCoord,
y + inputFocusChest.yCoord,
z + inputFocusChest.zCoord);
if (inputFocusInv instanceof IInventory) {
for (int ji = 0; ji < ((IInventory) inputFocusInv).getSizeInventory(); ji++) // Iterate
// through
// foci
// inventory
{
ItemStack inputFocusStack = ((IInventory) inputFocusInv).getStackInSlot(ji);
if (inputFocusStack != null
&& inputFocusStack.getItem() instanceof InputRoutingFocus) {
InputRoutingFocus inputFocus = (InputRoutingFocus) inputFocusStack
.getItem();
TileEntity inputChest = world.getTileEntity(
inputFocus.xCoord(inputFocusStack),
inputFocus.yCoord(inputFocusStack),
inputFocus.zCoord(inputFocusStack));
if (inputChest instanceof IInventory) {
IInventory inputChestInventory = (IInventory) inputChest;
ForgeDirection syphonDirection = inputFocus
.getSetDirection(inputFocusStack);
boolean[] canSyphonList = new boolean[inputChestInventory
.getSizeInventory()];
if (inputChest instanceof ISidedInventory) {
int[] validSlots = ((ISidedInventory) inputChest)
.getAccessibleSlotsFromSide(syphonDirection.ordinal());
for (int in : validSlots) {
canSyphonList[in] = true;
}
} else {
for (int ni = 0; ni
< inputChestInventory.getSizeInventory(); ni++) {
canSyphonList[ni] = true;
}
}
for (int ni = 0; ni < inputChestInventory.getSizeInventory(); ni++) {
if (canSyphonList[ni]) {
ItemStack syphonedStack = inputChestInventory
.getStackInSlot(ni); // Has a syphoned item linked, next
// need to find a
// destination
if (syphonedStack == null
|| (inputChestInventory instanceof ISidedInventory
&& !((ISidedInventory) inputChestInventory)
.canExtractItem(
ni,
syphonedStack,
syphonDirection.ordinal()))) {
continue;
}
int size = syphonedStack.stackSize;
if (parad.doesItemMatch(keyStack, syphonedStack)) {
ItemStack newStack = null;
if (parad.maximumAmount <= 0) {
newStack = SpellHelper.insertStackIntoInventory(
syphonedStack,
outputChestInventory,
inputDirection);
} else {
newStack = SpellHelper.insertStackIntoInventory(
syphonedStack,
outputChestInventory,
inputDirection,
parad.maximumAmount);
}
if (size == newStack.stackSize) {
continue;
}
int numberSyphoned = size - newStack.stackSize;
if (newStack != null && newStack.stackSize <= 0) {
size = newStack.stackSize;
newStack = null;
}
inputChestInventory.setInventorySlotContents(ni, newStack);
// break;
}
}
}
}
}
}
}
}
}
}
for (IInventory inputFoci : inputFocusChests) {
processInputFoci(world, inputFoci, keyStack, paradigm, outputInventory, inputDirection);
}
}
}
}
public Int3 getInputBufferChestLocation(int number) {
switch (number) {
case 0:
return new Int3(1, 0, 0);
case 1:
return new Int3(-1, 0, 0);
case 2:
return new Int3(0, 0, 1);
case 3:
return new Int3(0, 0, -1);
private void processInputFoci(World world, IInventory inputFoci, ItemStack keyStack, RoutingFocusParadigm paradigm,
IInventory outputInventory, ForgeDirection inputDirection) {
for (int i = 0; i < inputFoci.getSizeInventory(); i++) {
ItemStack inputFocusStack = inputFoci.getStackInSlot(i);
if (inputFocusStack == null || !(inputFocusStack.getItem() instanceof InputRoutingFocus inputFocus))
continue;
if (!paradigm.doesNameMatch(inputFocus.getName(inputFocusStack))) continue;
TileEntity inputTarget = world.getTileEntity(
inputFocus.xCoord(inputFocusStack),
inputFocus.yCoord(inputFocusStack),
inputFocus.zCoord(inputFocusStack));
if (!(inputTarget instanceof IInventory inputChest)) continue;
boolean[] slotList = checkSlots(inputChest, inputFocus.getSetDirection(inputFocusStack));
for (int j = 0; j < inputChest.getSizeInventory(); j++) {
if (!slotList[j]) continue;
ItemStack syphonedStack = inputChest.getStackInSlot(j);
if (!canExtractItem(inputChest, j, syphonedStack, inputFocus.getSetDirection(inputFocusStack)))
continue;
if (paradigm.doesItemMatch(keyStack, syphonedStack)) {
ItemStack newStack = insertStackWithLimit(
syphonedStack,
outputInventory,
inputDirection,
paradigm.maximumAmount);
inputChest.setInventorySlotContents(
j,
(newStack != null && newStack.stackSize > 0) ? newStack : null);
}
}
}
return new Int3(0, 0, 0);
}
public Int3 getOutputBufferChestLocation(int number) {
switch (number) {
case 0:
return new Int3(2, 0, 2);
case 1:
return new Int3(-2, 0, 2);
case 2:
return new Int3(2, 0, -2);
case 3:
return new Int3(-2, 0, -2);
private boolean[] checkSlots(IInventory inventory, ForgeDirection direction) {
boolean[] result = new boolean[inventory.getSizeInventory()];
if (inventory instanceof ISidedInventory sidedInv) {
int[] validSlots = sidedInv.getAccessibleSlotsFromSide(direction.ordinal());
for (int slot : validSlots) result[slot] = true;
} else {
for (int i = 0; i < inventory.getSizeInventory(); i++) result[i] = true;
}
return new Int3(0, 0, 0);
return result;
}
private boolean canExtractItem(IInventory inventory, int slot, ItemStack stack, ForgeDirection direction) {
return stack != null && (!(inventory instanceof ISidedInventory)
|| ((ISidedInventory) inventory).canExtractItem(slot, stack, direction.ordinal()));
}
private ItemStack insertStackWithLimit(ItemStack stack, IInventory inventory, ForgeDirection direction,
int maxAmount) {
return maxAmount <= 0 ? SpellHelper.insertStackIntoInventory(stack, inventory, direction)
: SpellHelper.insertStackIntoInventory(stack, inventory, direction, maxAmount);
}
private List<IInventory> findBufferChests(World world, int x, int y, int z, Int3[] locations) {
List<IInventory> chestList = new ArrayList<>();
for (Int3 chestLocation : locations) {
TileEntity tileEntity = world
.getTileEntity(x + chestLocation.xCoord, y + chestLocation.yCoord, z + chestLocation.zCoord);
if (tileEntity instanceof IInventory inv) {
chestList.add(inv);
}
}
return chestList;
}
@Override
@@ -249,14 +162,14 @@ public class RitualEffectItemRouting extends RitualEffect {
@Override
public List<RitualComponent> getRitualComponentList() {
ArrayList<RitualComponent> omegaRitual = new ArrayList();
ArrayList<RitualComponent> itemRoutingRitual = new ArrayList<>();
this.addCornerRunes(omegaRitual, 1, 0, RitualComponent.BLANK);
this.addOffsetRunes(omegaRitual, 2, 1, 0, RitualComponent.FIRE);
this.addParallelRunes(omegaRitual, 4, 0, RitualComponent.WATER);
this.addParallelRunes(omegaRitual, 5, 0, RitualComponent.EARTH);
this.addCornerRunes(omegaRitual, 4, 0, RitualComponent.WATER);
this.addCornerRunes(itemRoutingRitual, 1, 0, RitualComponent.BLANK);
this.addOffsetRunes(itemRoutingRitual, 2, 1, 0, RitualComponent.FIRE);
this.addParallelRunes(itemRoutingRitual, 4, 0, RitualComponent.WATER);
this.addParallelRunes(itemRoutingRitual, 5, 0, RitualComponent.EARTH);
this.addCornerRunes(itemRoutingRitual, 4, 0, RitualComponent.WATER);
return omegaRitual;
return itemRoutingRitual;
}
}
@@ -1,6 +1,11 @@
package WayofTime.alchemicalWizardry.common.routing;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import WayofTime.alchemicalWizardry.api.RoutingFocusLogic;
@@ -8,6 +13,14 @@ public class RoutingFocusLogicIgnMeta extends RoutingFocusLogic {
@Override
public boolean getDefaultMatch(ItemStack keyStack, ItemStack checkedStack) {
return (keyStack != null ? checkedStack != null && keyStack.getItem() == checkedStack.getItem() : false);
return (keyStack != null && checkedStack != null && keyStack.getItem() == checkedStack.getItem());
}
@Override
public List<String> getDescription() {
return new ArrayList<>(
Collections.singletonList(
StatCollector.translateToLocal("tooltip.routingFocus.logic") + " "
+ StatCollector.translateToLocal("item.outputRoutingFocus.ignMeta.logic")));
}
}
@@ -11,8 +11,6 @@ public class RoutingFocusLogicLimitDefault extends RoutingFocusLogicLimit {
public RoutingFocusLogicLimitDefault(ItemStack stack) {
if (stack != null && stack.getItem() instanceof ILimitedRoutingFocus) {
limit = ((ILimitedRoutingFocus) stack.getItem()).getRoutingFocusLimit(stack);
} else {
limit = 0;
}
}
@@ -1,6 +1,11 @@
package WayofTime.alchemicalWizardry.common.routing;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import WayofTime.alchemicalWizardry.common.items.routing.ILimitedRoutingFocus;
@@ -11,8 +16,6 @@ public class RoutingFocusLogicLimitGlobal extends RoutingFocusLogicLimit {
public RoutingFocusLogicLimitGlobal(ItemStack stack) {
if (stack != null && stack.getItem() instanceof ILimitedRoutingFocus) {
limit = ((ILimitedRoutingFocus) stack.getItem()).getRoutingFocusLimit(stack);
} else {
limit = 0;
}
}
@@ -25,4 +28,12 @@ public class RoutingFocusLogicLimitGlobal extends RoutingFocusLogicLimit {
public boolean getDefaultMatch(ItemStack keyStack, ItemStack checkedStack) {
return true;
}
@Override
public List<String> getDescription() {
return new ArrayList<>(
Collections.singletonList(
StatCollector.translateToLocal("tooltip.routingFocus.logic") + " "
+ StatCollector.translateToLocal("item.outputRoutingFocus.global.logic")));
}
}
@@ -12,8 +12,6 @@ public class RoutingFocusLogicLimitIgnMeta extends RoutingFocusLogicIgnMeta impl
public RoutingFocusLogicLimitIgnMeta(ItemStack stack) {
if (stack != null && stack.getItem() instanceof ILimitedRoutingFocus) {
limit = ((ILimitedRoutingFocus) stack.getItem()).getRoutingFocusLimit(stack);
} else {
limit = 0;
}
}
@@ -12,8 +12,6 @@ public class RoutingFocusLogicLimitMatchNBT extends RoutingFocusLogicMatchNBT im
public RoutingFocusLogicLimitMatchNBT(ItemStack stack) {
if (stack != null && stack.getItem() instanceof ILimitedRoutingFocus) {
limit = ((ILimitedRoutingFocus) stack.getItem()).getRoutingFocusLimit(stack);
} else {
limit = 0;
}
}
@@ -12,8 +12,6 @@ public class RoutingFocusLogicLimitModItems extends RoutingFocusLogicModItems im
public RoutingFocusLogicLimitModItems(ItemStack stack) {
if (stack != null && stack.getItem() instanceof ILimitedRoutingFocus) {
limit = ((ILimitedRoutingFocus) stack.getItem()).getRoutingFocusLimit(stack);
} else {
limit = 0;
}
}
@@ -1,20 +1,34 @@
package WayofTime.alchemicalWizardry.common.routing;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import WayofTime.alchemicalWizardry.api.RoutingFocusLogic;
public class RoutingFocusLogicMatchNBT extends 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)
&& keyStack.areItemStackTagsEqual(keyStack, checkedStack) : false);
return (keyStack != null && keyStack.getItem() != null
&& checkedStack != null
&& keyStack.getItem() == checkedStack.getItem()
&& (!keyStack.getItem().getHasSubtypes() || keyStack.getItemDamage() == checkedStack.getItemDamage())
&& ItemStack.areItemStackTagsEqual(keyStack, checkedStack));
}
@Override
public boolean doesItemMatch(boolean previous, ItemStack keyStack, ItemStack checkedStack) {
return previous && this.getDefaultMatch(keyStack, checkedStack);
}
@Override
public List<String> getDescription() {
return new ArrayList<>(
Collections.singletonList(
StatCollector.translateToLocal("tooltip.routingFocus.logic") + " "
+ StatCollector.translateToLocal("item.outputRoutingFocus.matchNBT.logic")));
}
}
@@ -1,7 +1,12 @@
package WayofTime.alchemicalWizardry.common.routing;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import WayofTime.alchemicalWizardry.api.RoutingFocusLogic;
import cpw.mods.fml.common.registry.GameData;
@@ -23,11 +28,19 @@ public class RoutingFocusLogicModItems extends RoutingFocusLogic {
String str = GameData.getItemRegistry().getNameForObject(itm);
if (!str.isEmpty()) {
String[] strs = str.split(":");
if (strs != null && strs.length >= 1) {
if (strs.length >= 1) {
return strs[0];
}
}
return "";
}
@Override
public List<String> getDescription() {
return new ArrayList<>(
Collections.singletonList(
StatCollector.translateToLocal("tooltip.routingFocus.logic") + " "
+ StatCollector.translateToLocal("item.outputRoutingFocus.modItem.logic")));
}
}
@@ -87,13 +87,13 @@ public class Meteor {
}
}
private int getNewRadius(int radius, List<Reagent> reagents) {
public static int getNewRadius(int radius, List<Reagent> reagents) {
radius += MeteorReagentRegistry.getLargestRadiusIncrease(reagents);
radius += MeteorReagentRegistry.getLargestRadiusDecrease(reagents);
return Math.max(radius, 1);
}
private float getNewFillerChance(float fillerChance, List<Reagent> reagents) {
public static float getNewFillerChance(float fillerChance, List<Reagent> reagents) {
// Don't add filler to meteors that have none
if (fillerChance <= 0) {
return 0;
@@ -120,7 +120,7 @@ public class Meteor {
* @return a new filler list. The original list is entirely replaced if any of the supplied reagents have a filler
* config.
*/
private List<MeteorComponent> getNewFillerList(List<MeteorComponent> fillerList, List<Reagent> reagents) {
public static List<MeteorComponent> getNewFillerList(List<MeteorComponent> fillerList, List<Reagent> reagents) {
List<MeteorComponent> reagentFillers = getFillerList(reagents);
reagentFillers = removeBlocksMissingRequiredReagents(reagentFillers, reagents);
if (!reagentFillers.isEmpty() && reagentFillers.get(0) != defaultMeteorBlock) {
@@ -129,7 +129,7 @@ public class Meteor {
return removeBlocksMissingRequiredReagents(fillerList, reagents);
}
private List<MeteorComponent> removeBlocksMissingRequiredReagents(List<MeteorComponent> blockList,
public static List<MeteorComponent> removeBlocksMissingRequiredReagents(List<MeteorComponent> blockList,
List<Reagent> reagents) {
ArrayList<MeteorComponent> newList = new ArrayList<>();
for (MeteorComponent component : blockList) {
@@ -629,6 +629,30 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
return;
}
if (item.isFilledForFree()) {
// Fill owner's network to the maximum, affected by altar runes.
SoulNetworkHandler.addCurrentEssenceToMaximum(
ownerName,
Integer.MAX_VALUE,
(int) Math.min(Integer.MAX_VALUE, (long) item.getMaxEssence() * this.orbCapacityMultiplier));
if (totalWorldTime % 4 == 0) {
SpellHelper.sendIndexedParticleToAllAround(
worldObj,
xCoord,
yCoord,
zCoord,
20,
worldObj.provider.dimensionId,
3,
xCoord,
yCoord,
zCoord);
}
return;
}
if (fluid != null && fluid.amount >= 1) {
int liquidDrained = Math.min(
(int) (upgradeLevel >= 2 ? consumptionRate * (1 + consumptionMultiplier) : consumptionRate),
Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -230,11 +230,11 @@ item.itemMailCatalogue.name=Mail Order Catalogue
item.inputRoutingFocus.name=Input Routing Focus
item.bloodMagicBaseItem.EnderShard.name=Ender Shard
item.outputRoutingFocus.name=Output Routing Focus
item.outputRoutingFocus.default.name=Default Output Routing Focus
item.outputRoutingFocus.modItem.name=Output Routing Focus (ModItem)
item.outputRoutingFocus.ignMeta.name=Output Routing Focus (Ignore Meta)
item.outputRoutingFocus.matchNBT.name=Output Routing Focus (MatchNBT)
item.outputRoutingFocus.global.name=Output Routing Focus (Global)
item.outputRoutingFocus.default.logic=Match Item & Meta
item.outputRoutingFocus.modItem.logic=Match Mod
item.outputRoutingFocus.ignMeta.logic=Match Item, Ignore Meta
item.outputRoutingFocus.matchNBT.logic=Match Item, Meta, & NBT
item.outputRoutingFocus.global.logic=Move Everything
item.dawnScribeTool.name=Elemental Inscription Tool: Dawn
item.boundHelmetEarth.name=Earth Omega Helmet
item.boundPlateEarth.name=Earth Omega Plate
@@ -275,12 +275,24 @@ text.recipe.altar.tier=Tier: %s
text.recipe.altar.bloodRequired=LP: %s
text.recipe.shapedOrb=Shaped Orb Recipe
nei.recipe.meteor.category=Meteor Ritual
nei.recipe.meteor.cost=Cost: %s LP
nei.recipe.meteor.cost=LP cost to summon this meteor
nei.recipe.meteor.tooExpensive=Insufficient LP in Soul Network
nei.recipe.meteor.radius=Radius: %s
nei.recipe.meteor.diameter=Diameter: %d (2r + 1)
nei.recipe.meteor.chance=Chance: %s%%
nei.recipe.meteor.amount=Estimated amount: %s
nei.recipe.meteor.filler=§7Filler block
nei.recipe.meteor.reagent=§nRequired reagent§r: %s
nei.recipe.ritual.name=Ritual Name: %s
nei.recipe.ritual.cost=Activation Cost: %,d
nei.recipe.reagent.text=Reagent Effects:
nei.recipe.reagent.meteor.radius= %+d radius (%s)
nei.recipe.reagent.meteor.filler.chance= Changes chance for filler block to %f%%
nei.recipe.reagent.meteor.filler.blocks= Replaces filler with %s
nei.recipe.reagent.meteor.explosions= Entirely disables meteor explosions
nei.recipe.reagent.meteor.blockDamage.on= Enables meteor block damage
nei.recipe.reagent.meteor.blockDamage.off= Disables meteor block damage
nei.recipe.reagent.none=No reagents can be added to this ritual.
#Rituals
ritual.AW001Water.name=Ritual of the Full Spring
@@ -521,6 +533,7 @@ tooltip.telepositionfocus.desc=An Enderpearl imbued with blood
tooltip.voidsigil.desc=Better than a Swiffer!
tooltip.watersigil.desc=Infinite water, anyone?
tooltip.routingFocus.limit=Limit:
tooltip.routingFocus.logic=Logic:
tooltip.routingFocus.desc=A focus used to route items
tooltip.alchemy.usedinincense=Purifying incense used in a crucible
@@ -554,6 +567,8 @@ message.masterstone.ritualresistyou=The ritual appears to actively resist you!
message.masterstone.somethingstoppedyou=Something stopped you in your tracks...
message.masterstone.youfeelapull=You feel a pull, but you are too weak to push any further.
message.ritual.currentritual=Current Ritual:
message.ritual.side.up=UP
message.ritual.side.down=DOWN
message.ritual.side.east=EAST
message.ritual.side.north=NORTH
message.ritual.side.south=SOUTH
@@ -212,11 +212,7 @@ item.transcendentBloodOrb.name=Трансцендентальный кровав
item.itemMailCatalogue.name=Mail Order Catalogue
item.inputRoutingFocus.name=Фокус направления входа
item.bloodMagicBaseItem.EnderShard.name=Осколок Края
item.outputRoutingFocus.default.name=Обычный фокус направления выхода
item.outputRoutingFocus.modItem.name=Фокус направления выхода (ModItem)
item.outputRoutingFocus.ignMeta.name=Фокус направления выхода (Ignore Meta)
item.outputRoutingFocus.matchNBT.name=Фокус направления выхода (MatchNBT)
item.outputRoutingFocus.global.name=Фокус направления выхода (Global)
item.outputRoutingFocus.name=фокус направления выхода
item.dawnScribeTool.name=Elemental Inscription Tool: Dawn
item.boundHelmetEarth.name=Земляной омега шлем
item.boundPlateEarth.name=Земляная омега кираса
@@ -444,6 +440,8 @@ message.masterstone.ritualresistyou=Ритуал, кажется, защищае
message.masterstone.somethingstoppedyou=Что-то останавливает Вас...
message.masterstone.youfeelapull=Вы чувствуете втягивание, но Вы слишком слабы, чтобы толкать дальше.
message.ritual.currentritual=Текущий ритуал:
message.ritual.side.up=ВВЕРХ
message.ritual.side.down=ВНИЗ
message.ritual.side.east=ВОСТОК
message.ritual.side.north=СЕВЕР
message.ritual.side.south=ЮГ
@@ -218,11 +218,11 @@ item.transcendentBloodOrb.name=卓越气血宝珠
item.itemMailCatalogue.name=邮购目录
item.inputRoutingFocus.name=输入路由核心
item.bloodMagicBaseItem.EnderShard.name=末影碎片
item.outputRoutingFocus.default.name=输出路由核心(默认)
item.outputRoutingFocus.modItem.name=输出路由核心(模组物品)
item.outputRoutingFocus.ignMeta.name=输出路由核心(数据值忽视)
item.outputRoutingFocus.matchNBT.name=输出路由核心(NBT匹配)
item.outputRoutingFocus.global.name=输出路由核心(Global)
item.outputRoutingFocus.name=输出路由核心
item.outputRoutingFocus.default.logic=默认
item.outputRoutingFocus.modItem.logic=模组物品
item.outputRoutingFocus.ignMeta.logic=数据值忽视
item.outputRoutingFocus.matchNBT.logic=NBT匹配
item.dawnScribeTool.name=元素铭文:破晓
item.boundHelmetEarth.name=土`欧米伽头盔
item.boundPlateEarth.name=土`欧米伽胸甲
@@ -539,6 +539,8 @@ message.masterstone.ritualresistyou=仪式似乎在积极的抵抗你!
message.masterstone.somethingstoppedyou=有什么东西使你的路径堵塞...
message.masterstone.youfeelapull=你感到一股拉力,但没有足够的能量促进其发生.
message.ritual.currentritual=目前仪式:
message.ritual.side.up=上
message.ritual.side.down=下
message.ritual.side.east=东
message.ritual.side.north=北
message.ritual.side.south=南
@@ -213,11 +213,12 @@ item.transcendentBloodOrb.name=卓越氣血寶珠
item.itemMailCatalogue.name=Mail Order Catalogue
item.inputRoutingFocus.name=Input Routing Focus
item.bloodMagicBaseItem.EnderShard.name=Ender Shard
item.outputRoutingFocus.default.name=Default Output Routing Focus
item.outputRoutingFocus.modItem.name=Output Routing Focus (ModItem)
item.outputRoutingFocus.ignMeta.name=Output Routing Focus (Ignore Meta)
item.outputRoutingFocus.matchNBT.name=Output Routing Focus (MatchNBT)
item.outputRoutingFocus.global.name=Output Routing Focus (Global)
item.outputRoutingFocus.name=Default Output Routing Focus
item.outputRoutingFocus.default.logic=Match Item & Meta
item.outputRoutingFocus.modItem.logic=Match Mod
item.outputRoutingFocus.ignMeta.logic=Match Item, Ignore Meta
item.outputRoutingFocus.matchNBT.logic=Match Item, Meta, & NBT
item.outputRoutingFocus.global.logic=Move Everything
item.dawnScribeTool.name=Elemental Inscription Tool: Dawn
item.boundHelmetEarth.name=Earth Omega Helmet
item.boundPlateEarth.name=Earth Omega Plate
@@ -452,6 +453,8 @@ message.masterstone.ritualresistyou=The ritual appears to actively resist you!
message.masterstone.somethingstoppedyou=Something stopped you in your tracks...
message.masterstone.youfeelapull=You feel a pull, but you are too weak to push any further.
message.ritual.currentritual=Current Ritual:
message.ritual.side.up=上
message.ritual.side.down=下
message.ritual.side.east=東
message.ritual.side.north=北
message.ritual.side.south=南