mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-20 20:12:19 +00:00
Fix #1437 Drone in the analyzer
This commit is contained in:
1 parent
e0694842b6
commit
61aa8bdcf0
2 files changed
+11
-3
No files matched your search
@@ -26,7 +26,11 @@ public abstract class Individual implements IIndividual {
|
||||
}
|
||||
|
||||
protected Individual(@Nonnull NBTTagCompound nbt) {
|
||||
isAnalyzed = nbt.getBoolean("IsAnalyzed");
|
||||
if(nbt.hasKey("IsAnalyzed")){
|
||||
isAnalyzed = nbt.getBoolean("IsAnalyzed");
|
||||
}else{
|
||||
isAnalyzed = false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -32,8 +32,12 @@ public abstract class IndividualLiving extends Individual implements IIndividual
|
||||
|
||||
protected IndividualLiving(@Nonnull NBTTagCompound nbt) {
|
||||
super(nbt);
|
||||
health = nbt.getInteger("Health");
|
||||
maxHealth = nbt.getInteger("MaxH");
|
||||
if(nbt.hasKey("Health")){
|
||||
health = nbt.getInteger("Health");
|
||||
}
|
||||
if(nbt.hasKey("MaxH")){
|
||||
maxHealth = nbt.getInteger("MaxH");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user