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

@@ -1,5 +1,8 @@
package tconstruct.weaponry.weapons;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.init.Items;
import tconstruct.TConstruct;
import tconstruct.library.TConstructRegistry;
import tconstruct.weaponry.TinkerWeaponry;
@@ -261,6 +264,9 @@ public class Crossbow extends ProjectileWeapon {
return stack;
}
if(player.capabilities.isCreativeMode && TinkerWeaponry.creativeBolt != null)
return TinkerWeaponry.creativeBolt.copy();
return null;
}