mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 20:52:26 +00:00
Fix Projectile Weapons and arrows/bolts building creative items with materials that have no bow/arrow material stats
This commit is contained in:
1 parent
3f74dd7535
commit
eb1a6701de
4 files changed
+17
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package tconstruct.weaponry.weapons;
|
||||
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.weaponry.TinkerWeaponry;
|
||||
import tconstruct.weaponry.ammo.BoltAmmo;
|
||||
import tconstruct.weaponry.entity.BoltEntity;
|
||||
@@ -415,6 +416,10 @@ public class Crossbow extends ProjectileWeapon {
|
||||
@Override
|
||||
public void buildTool (int id, String name, List list)
|
||||
{
|
||||
// does the material have a bow material?
|
||||
if(TConstructRegistry.getBowMaterial(id) == null)
|
||||
return;
|
||||
|
||||
// all creative bows use regular bowstring
|
||||
ItemStack headStack = new ItemStack(getHeadItem(), 1, id);
|
||||
ItemStack handleStack = new ItemStack(getHandleItem(), 1, id);
|
||||
|
||||
Reference in new issue
Block a user