mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-17 10:55:06 +00:00
Fix #977 add additional defensive checks to BeekeepingLogic
This commit is contained in:
1 parent
db7736f7d2
commit
7d83e28a03
1 file changed
+6
@@ -289,7 +289,13 @@ public class BeekeepingLogic implements IBeekeepingLogic, IStreamable {
|
||||
|
||||
/** Checks if a queen is alive. Much faster than reading the whole bee nbt */
|
||||
private static boolean isQueenAlive(ItemStack queenStack) {
|
||||
if (queenStack == null) {
|
||||
return false;
|
||||
}
|
||||
NBTTagCompound nbtTagCompound = queenStack.getTagCompound();
|
||||
if (nbtTagCompound == null) {
|
||||
return false;
|
||||
}
|
||||
int health = nbtTagCompound.getInteger("Health");
|
||||
return health > 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user