Fixed item and fluid storage stored count having incorrect values, fixes #283
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
### 1.0
|
### 1.0
|
||||||
- Implemented multithreaded autocrafting (raoulvdberge)
|
- Implemented multithreaded autocrafting (raoulvdberge)
|
||||||
- Processing patterns now hold their items back for pushing until all the required items are gathered from the system (raoulvdberge)
|
- Processing patterns now hold their items back for pushing until all the required items are gathered from the system (raoulvdberge)
|
||||||
|
- Fixed item and fluid storage stored count having incorrect values (raoulvdberge)
|
||||||
|
|
||||||
### 0.9.4
|
### 0.9.4
|
||||||
- Little fixes in German translation (ThexXTURBOXx)
|
- Little fixes in German translation (ThexXTURBOXx)
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public abstract class FluidStorageNBT implements IFluidStorage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FluidStack insertFluid(FluidStack stack, int size, boolean simulate) {
|
public synchronized FluidStack insertFluid(FluidStack stack, int size, boolean simulate) {
|
||||||
for (FluidStack otherStack : stacks) {
|
for (FluidStack otherStack : stacks) {
|
||||||
if (otherStack.isFluidEqual(stack)) {
|
if (otherStack.isFluidEqual(stack)) {
|
||||||
if (getCapacity() != -1 && getStored() + size > getCapacity()) {
|
if (getCapacity() != -1 && getStored() + size > getCapacity()) {
|
||||||
@@ -141,7 +141,7 @@ public abstract class FluidStorageNBT implements IFluidStorage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FluidStack extractFluid(FluidStack stack, int size, int flags) {
|
public synchronized FluidStack extractFluid(FluidStack stack, int size, int flags) {
|
||||||
for (FluidStack otherStack : stacks) {
|
for (FluidStack otherStack : stacks) {
|
||||||
if (CompareUtils.compareStack(otherStack, stack, flags)) {
|
if (CompareUtils.compareStack(otherStack, stack, flags)) {
|
||||||
if (size > otherStack.amount) {
|
if (size > otherStack.amount) {
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ public abstract class ItemStorageNBT implements IItemStorage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack insertItem(ItemStack stack, int size, boolean simulate) {
|
public synchronized ItemStack insertItem(ItemStack stack, int size, boolean simulate) {
|
||||||
for (ItemStack otherStack : stacks) {
|
for (ItemStack otherStack : stacks) {
|
||||||
if (CompareUtils.compareStackNoQuantity(otherStack, stack)) {
|
if (CompareUtils.compareStackNoQuantity(otherStack, stack)) {
|
||||||
if (getCapacity() != -1 && getStored() + size > getCapacity()) {
|
if (getCapacity() != -1 && getStored() + size > getCapacity()) {
|
||||||
@@ -178,7 +178,7 @@ public abstract class ItemStorageNBT implements IItemStorage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack extractItem(ItemStack stack, int size, int flags) {
|
public synchronized ItemStack extractItem(ItemStack stack, int size, int flags) {
|
||||||
for (ItemStack otherStack : stacks) {
|
for (ItemStack otherStack : stacks) {
|
||||||
if (CompareUtils.compareStack(otherStack, stack, flags)) {
|
if (CompareUtils.compareStack(otherStack, stack, flags)) {
|
||||||
if (size > otherStack.stackSize) {
|
if (size > otherStack.stackSize) {
|
||||||
|
|||||||
Reference in New Issue
Block a user