Skip to content

Commit

Permalink
Zelda Sword Skills support for weapons. Somebody test this in detail.
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Jan 30, 2015
1 parent 1615ad4 commit ea8f1fe
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 3 deletions.
30 changes: 30 additions & 0 deletions src/api/java/zeldaswordskills/api/item/ISword.java
@@ -0,0 +1,30 @@
/**
Copyright (C) <2014> <coolAlias>
This file is part of coolAlias' Zelda Sword Skills Minecraft Mod; as such,
you can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package zeldaswordskills.api.item;

/**
*
* For the purpose of using certain skills, this item will be considered a sword.
*
* Skills which require a sword are:
* {@link LeapingBlow}, {@link MortalDraw}, {@link RisingCut}, and {@link SwordBeam}
*
*/
public interface ISword {

}
4 changes: 4 additions & 0 deletions src/api/java/zeldaswordskills/api/item/package-info.java
@@ -0,0 +1,4 @@
@API(owner = "zeldaswordskills", provides = "ZeldaItemAPI", apiVersion = "0.3")
package zeldaswordskills.api.item;

import cpw.mods.fml.common.API;
4 changes: 4 additions & 0 deletions src/api/java/zeldaswordskills/api/package-info.java
@@ -0,0 +1,4 @@
@API(owner = "zeldaswordskills", provides = "ZeldaAPI", apiVersion = "0.3")
package zeldaswordskills.api;

import cpw.mods.fml.common.API;
5 changes: 4 additions & 1 deletion src/main/java/tconstruct/items/tools/Battleaxe.java
Expand Up @@ -20,7 +20,10 @@
import tconstruct.library.tools.*;
import tconstruct.tools.TinkerTools;

@Optional.Interface(modid="battlegear2", iface = "mods.battlegear2.api.weapons.IBattlegearWeapon")
@Optional.InterfaceList({
@Optional.Interface(modid = "battlegear2", iface = "mods.battlegear2.api.weapons.IBattlegearWeapon"),
@Optional.Interface(modid = "ZeldaItemAPI", iface = "zeldaswordskills.api.item.ISword")
})
public class Battleaxe extends AOEHarvestTool implements IBattlegearWeapon
{
public Battleaxe()
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/tconstruct/library/tools/Weapon.java
Expand Up @@ -13,9 +13,13 @@
import net.minecraft.world.World;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import tconstruct.tools.TinkerTools;
import zeldaswordskills.api.item.ISword;

@Optional.Interface(modid="battlegear2", iface = "mods.battlegear2.api.weapons.IBattlegearWeapon")
public abstract class Weapon extends ToolCore implements IBattlegearWeapon
@Optional.InterfaceList({
@Optional.Interface(modid = "battlegear2", iface = "mods.battlegear2.api.weapons.IBattlegearWeapon"),
@Optional.Interface(modid = "ZeldaItemAPI", iface = "zeldaswordskills.api.item.ISword")
})
public abstract class Weapon extends ToolCore implements IBattlegearWeapon, ISword
{

public Weapon(int baseDamage)
Expand Down

2 comments on commit ea8f1fe

@Adaptivity
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you reading my minds? Just thought about it and then it happened... However, I never played with Zelda Sword Skills :D

@inferrinizzard
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Free tomorrow, will do.

Please sign in to comment.