Add a creative bolt that's used for shooting crossbows without ammo in creative, just like the vanilla arrows for the bows #1233

This commit is contained in:
Bernhard Bonigl committed 2015-02-22 17:50:59 +01:00
1 parent e972ee1ef0
commit 67c05a962b
2 files changed
+22

No files matched your search

@@ -77,6 +77,7 @@ public class TinkerWeaponry {
// Ammo
public static AmmoItem arrowAmmo;
public static AmmoItem boltAmmo;
public static ItemStack creativeBolt;
// Tool Parts
public static Item bowstring;
@@ -142,6 +143,21 @@ public class TinkerWeaponry {
MinecraftForge.EVENT_BUS.register(weaponryHandler);
FMLCommonHandler.instance().bus().register(weaponryHandler);
// "vanilla" bolt:
// iron-tipped wood-shaft with feather fletching
ItemStack headStack = DualMaterialToolPart.createDualMaterial(boltAmmo.getHeadItem(), TinkerTools.MaterialID.Wood, TinkerTools.MaterialID.Iron);
ItemStack handleStack = new ItemStack(boltAmmo.getAccessoryItem(), 1, 0); // feather fletchling
ItemStack tool = ToolBuilder.instance.buildTool(headStack, handleStack, null, null, "");
if (tool != null)
{
tool.getTagCompound().getCompoundTag("InfiTool").setBoolean("Built", true);
creativeBolt = tool;
}
else
TConstruct.logger.error("Couldn't build basic Tinker Bolt for creative crossbow shootnig");
proxy.init();
}