mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-23 21:39:51 +00:00
Merge pull request #69 from jodamm/master
Fix for not spawning offsprings when inventory is full and chunk is unloaded.
This commit is contained in:
commit
c66da17e18
1 file changed
+10
-10
@@ -50,13 +50,10 @@ public class BeekeepingLogic implements IBeekeepingLogic {
|
||||
breedingTime = nbttagcompound.getInteger("BreedingTime");
|
||||
throttle = nbttagcompound.getInteger("Throttle");
|
||||
|
||||
NBTTagList nbttaglist = new NBTTagList();
|
||||
while (!spawn.isEmpty()) {
|
||||
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
|
||||
spawn.pop().writeToNBT(nbttagcompound1);
|
||||
nbttaglist.appendTag(nbttagcompound1);
|
||||
NBTTagList nbttaglist = nbttagcompound.getTagList("Offspring", 10);
|
||||
for (int i = 0; i < nbttaglist.tagCount(); i++) {
|
||||
spawn.add(ItemStack.loadItemStackFromNBT(nbttaglist.getCompoundTagAt(i)));
|
||||
}
|
||||
nbttagcompound.setTag("Offspring", nbttaglist);
|
||||
|
||||
}
|
||||
|
||||
@@ -65,11 +62,14 @@ public class BeekeepingLogic implements IBeekeepingLogic {
|
||||
nbttagcompound.setInteger("BreedingTime", breedingTime);
|
||||
nbttagcompound.setInteger("Throttle", throttle);
|
||||
|
||||
NBTTagList nbttaglist = nbttagcompound.getTagList("Offspring", 10);
|
||||
for (int i = 0; i < nbttaglist.tagCount(); i++) {
|
||||
spawn.add(ItemStack.loadItemStackFromNBT(nbttaglist.getCompoundTagAt(i)));
|
||||
NBTTagList nbttaglist = new NBTTagList();
|
||||
while (!spawn.isEmpty()) {
|
||||
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
|
||||
spawn.pop().writeToNBT(nbttagcompound1);
|
||||
nbttaglist.appendTag(nbttagcompound1);
|
||||
}
|
||||
|
||||
nbttagcompound.setTag("Offspring", nbttaglist);
|
||||
|
||||
}
|
||||
|
||||
// / STATE INFORMATION
|
||||
|
||||
Reference in new issue
Block a user