From d8ab0e7ecf60c0bbc25e2a0c8d9d8dcc0d5d8e70 Mon Sep 17 00:00:00 2001 From: Boblet Date: Thu, 30 Jan 2025 16:01:05 +0100 Subject: [PATCH] 1000 lines of code --- changelog | 3 ++- .../java/com/hbm/items/weapon/sedna/mags/MagazineBelt.java | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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++) {