forked from SpitefulFox/ForbiddenMagic
-
Notifications
You must be signed in to change notification settings - Fork 6
Wand Cap and Core Refactor #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
b95d777
Add support for the Blood Iron Caps from Blood Arsenal. They now redu…
koolkrafter5 c116902
Clean up the wand update classes:
koolkrafter5 4216eb9
Spotless
koolkrafter5 1b2f2a5
Add Equivalent Rod Placeholder Item (#16)
koolkrafter5 0b3655e
Move duplicate primal arrays, max vis checks, and hotbar checks to ne…
koolkrafter5 1ff5a32
Merge branch 'master' into bloody-caps
koolkrafter5 79d45fa
Merge branch 'master' into bloody-caps
koolkrafter5 571360b
Merge branch 'master' into bloody-caps
Dream-Master 920ce49
Readd null check
koolkrafter5 97b7889
Merge branch 'master' into bloody-caps
koolkrafter5 5de71f8
Contract review suggestion
koolkrafter5 0d1393f
Enable Jabel and Generic Injection
koolkrafter5 96b4d8d
Pattern variables and fix logic
koolkrafter5 8939088
Make staves extend their wand counterparts instead of copying logic
koolkrafter5 091f1e4
Replace part name checks with checks against ForbiddenItems.
koolkrafter5 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/fox/spiteful/forbidden/items/wands/DarkWandRodOnUpdate.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| package fox.spiteful.forbidden.items.wands; | ||
|
|
||
| import net.minecraft.entity.player.EntityPlayer; | ||
| import net.minecraft.item.ItemStack; | ||
|
|
||
| import thaumcraft.api.aspects.Aspect; | ||
| import thaumcraft.api.wands.IWandRodOnUpdate; | ||
| import thaumcraft.common.items.wands.ItemWandCasting; | ||
|
|
||
| public abstract class DarkWandRodOnUpdate implements IWandRodOnUpdate { | ||
|
|
||
| static final Aspect[] primals = Aspect.getPrimalAspects().toArray(new Aspect[0]); | ||
|
|
||
| protected static int getMaxVis(ItemStack itemstack) { | ||
| return ((ItemWandCasting) itemstack.getItem()).getMaxVis(itemstack); | ||
| } | ||
|
|
||
| protected boolean checkHotbar(ItemStack stack, EntityPlayer player) { | ||
| for (int x = 0; x < 9; ++x) { | ||
| ItemStack item = player.inventory.getStackInSlot(x); | ||
| if (item == stack) return true; | ||
| } | ||
| return false; | ||
| } | ||
|
|
||
| /** | ||
| * The number of ticks between when the wand core regenerates vis | ||
| */ | ||
| protected int regenTimer() { | ||
| return 100; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.