diff --git a/src/api/java/zeldaswordskills/api/item/ISword.java b/src/api/java/zeldaswordskills/api/item/ISword.java new file mode 100644 index 00000000..793c97d9 --- /dev/null +++ b/src/api/java/zeldaswordskills/api/item/ISword.java @@ -0,0 +1,30 @@ +/** + Copyright (C) <2014> + + 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 . + */ + +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 { + +} diff --git a/src/api/java/zeldaswordskills/api/item/package-info.java b/src/api/java/zeldaswordskills/api/item/package-info.java new file mode 100644 index 00000000..ee7ca093 --- /dev/null +++ b/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; diff --git a/src/api/java/zeldaswordskills/api/package-info.java b/src/api/java/zeldaswordskills/api/package-info.java new file mode 100644 index 00000000..c253cb4a --- /dev/null +++ b/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; diff --git a/src/main/java/tconstruct/items/tools/Battleaxe.java b/src/main/java/tconstruct/items/tools/Battleaxe.java index 77f2b2b2..b1ce85cd 100644 --- a/src/main/java/tconstruct/items/tools/Battleaxe.java +++ b/src/main/java/tconstruct/items/tools/Battleaxe.java @@ -20,7 +20,10 @@ import tconstruct.library.*; 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() diff --git a/src/main/java/tconstruct/library/tools/Weapon.java b/src/main/java/tconstruct/library/tools/Weapon.java index 000fbd12..92ebe45e 100644 --- a/src/main/java/tconstruct/library/tools/Weapon.java +++ b/src/main/java/tconstruct/library/tools/Weapon.java @@ -13,9 +13,13 @@ import net.minecraft.item.*; 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)