diff --git a/changelog b/changelog index 0294b8609..69cb841de 100644 --- a/changelog +++ b/changelog @@ -2,4 +2,5 @@ * Blast doors will now pulverize any block that gets in their way during closing ## Fixed -* Fixed the CCGT's steam output breaking as soon as the steam buffer runs full \ No newline at end of file +* Fixed the CCGT's steam output breaking as soon as the steam buffer runs full +* Fixed crash caused by mobs holding belt-fed guns \ No newline at end of file diff --git a/src/main/java/com/hbm/items/weapon/sedna/mags/MagazineBelt.java b/src/main/java/com/hbm/items/weapon/sedna/mags/MagazineBelt.java index 220ddbaa0..46c91c4ba 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/mags/MagazineBelt.java +++ b/src/main/java/com/hbm/items/weapon/sedna/mags/MagazineBelt.java @@ -58,6 +58,7 @@ public class MagazineBelt implements IMagazine { @Override public int getAmount(ItemStack stack, IInventory inventory) { + if(inventory == null) return 1; // for EntityAIFireGun BulletConfig first = this.getFirstConfig(stack, inventory); int count = 0; for(int i = 0; i < inventory.getSizeInventory(); i++) {