Update changelog

This commit is contained in:
Raoul Van den Berge
2016-06-04 00:54:40 +02:00
parent cfee0cabb6
commit 214742e08c
4 changed files with 18 additions and 20 deletions

View File

@@ -6,6 +6,8 @@
- Fixed solderer not supporting ore dictionary - Fixed solderer not supporting ore dictionary
- Fixed recipes not supporting ore dictionary - Fixed recipes not supporting ore dictionary
- Fixed destructor not being able to destroy some blocks - Fixed destructor not being able to destroy some blocks
- Fixed not being able to place or destroy sugar cane
- New items now go to the first available storage that has items in it already
- Performance improvements - Performance improvements
**Features** **Features**

View File

@@ -47,7 +47,9 @@ public abstract class NBTStorage implements IStorage {
stack.setTagCompound(tag.hasKey(NBT_ITEM_NBT) ? ((NBTTagCompound) tag.getTag(NBT_ITEM_NBT)) : null); stack.setTagCompound(tag.hasKey(NBT_ITEM_NBT) ? ((NBTTagCompound) tag.getTag(NBT_ITEM_NBT)) : null);
stacks.add(stack); if (stack.getItem() != null) {
stacks.add(stack);
}
} }
} }

View File

@@ -46,7 +46,7 @@ public class TileExternalStorage extends TileMachine implements IStorageProvider
IDeepStorageUnit storageUnit = getStorageUnit(); IDeepStorageUnit storageUnit = getStorageUnit();
if (storageUnit != null) { if (storageUnit != null) {
if (storageUnit.getStoredItemType() != null) { if (storageUnit.getStoredItemType() != null && storageUnit.getStoredItemType().getItem() != null) {
items.add(storageUnit.getStoredItemType().copy()); items.add(storageUnit.getStoredItemType().copy());
} }
} else { } else {
@@ -54,7 +54,7 @@ public class TileExternalStorage extends TileMachine implements IStorageProvider
if (handler != null) { if (handler != null) {
for (int i = 0; i < handler.getSlots(); ++i) { for (int i = 0; i < handler.getSlots(); ++i) {
if (handler.getStackInSlot(i) != null) { if (handler.getStackInSlot(i) != null && handler.getStackInSlot(i).getItem() != null) {
items.add(handler.getStackInSlot(i).copy()); items.add(handler.getStackInSlot(i).copy());
} }
} }

View File

@@ -335,26 +335,20 @@ public class TileController extends TileBase implements IEnergyReceiver, ISynchr
ItemStack stack = items.get(i); ItemStack stack = items.get(i);
// If the item doesn't exist anymore, remove it from storage to avoid crashes for (int j = i + 1; j < items.size(); ++j) {
if (stack.getItem() == null) { if (combinedItemsIndices.contains(j)) {
combinedItems.add(stack); continue;
combinedItemsIndices.add(i); }
} else {
for (int j = i + 1; j < items.size(); ++j) {
if (combinedItemsIndices.contains(j)) {
continue;
}
ItemStack otherStack = items.get(j); ItemStack otherStack = items.get(j);
if (RefinedStorageUtils.compareStackNoQuantity(stack, otherStack)) { if (RefinedStorageUtils.compareStackNoQuantity(stack, otherStack)) {
// We copy here so we don't modify the quantity of the ItemStack IStorage uses. // We copy here so we don't modify the quantity of the ItemStack IStorage uses.
// We re-get the ItemStack because the stack may change from a previous iteration in this loop // We re-get the ItemStack because the stack may change from a previous iteration in this loop
items.set(i, ItemHandlerHelper.copyStackWithSize(items.get(i), items.get(i).stackSize + otherStack.stackSize)); items.set(i, ItemHandlerHelper.copyStackWithSize(items.get(i), items.get(i).stackSize + otherStack.stackSize));
combinedItems.add(otherStack); combinedItems.add(otherStack);
combinedItemsIndices.add(j); combinedItemsIndices.add(j);
}
} }
} }
} }