mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-24 05:44:24 +00:00
Update BeekeepingLogic.java
fix for not spawnig offsprings when inventory is full and chunk is unloaded.
This commit is contained in:
1 parent
5d0d0d7163
commit
818f221d68
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