Fixed External Storage crashing and one minor concurrency issue
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
# Refined Storage Changelog
|
# Refined Storage Changelog
|
||||||
|
|
||||||
|
### 1.5.4
|
||||||
|
- Fixed External Storage crashing (raoulvdberge)
|
||||||
|
|
||||||
### 1.5.3
|
### 1.5.3
|
||||||
- Updated Forge to 2359 (raoulvdberge)
|
- Updated Forge to 2359 (raoulvdberge)
|
||||||
- Updated MCMultiPart to 2.2.1 (raoulvdberge)
|
- Updated MCMultiPart to 2.2.1 (raoulvdberge)
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ import net.minecraftforge.fluids.FluidStack;
|
|||||||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||||
import net.minecraftforge.items.IItemHandler;
|
import net.minecraftforge.items.IItemHandler;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
|
||||||
public class NetworkNodeExternalStorage extends NetworkNode implements IStorageProvider, IGuiStorage, IComparable, IFilterable, IPrioritizable, IType, IAccessType {
|
public class NetworkNodeExternalStorage extends NetworkNode implements IStorageProvider, IGuiStorage, IComparable, IFilterable, IPrioritizable, IType, IAccessType {
|
||||||
public static final String ID = "external_storage";
|
public static final String ID = "external_storage";
|
||||||
@@ -48,8 +48,8 @@ public class NetworkNodeExternalStorage extends NetworkNode implements IStorageP
|
|||||||
private AccessType accessType = AccessType.INSERT_EXTRACT;
|
private AccessType accessType = AccessType.INSERT_EXTRACT;
|
||||||
private int networkTicks;
|
private int networkTicks;
|
||||||
|
|
||||||
private List<StorageItemExternal> itemStorages = new ArrayList<>();
|
private List<StorageItemExternal> itemStorages = new CopyOnWriteArrayList<>();
|
||||||
private List<StorageFluidExternal> fluidStorages = new ArrayList<>();
|
private List<StorageFluidExternal> fluidStorages = new CopyOnWriteArrayList<>();
|
||||||
|
|
||||||
public NetworkNodeExternalStorage(World world, BlockPos pos) {
|
public NetworkNodeExternalStorage(World world, BlockPos pos) {
|
||||||
super(world, pos);
|
super(world, pos);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.raoulvdberge.refinedstorage.tile.craftingmonitor;
|
package com.raoulvdberge.refinedstorage.tile.craftingmonitor;
|
||||||
|
|
||||||
|
import com.raoulvdberge.refinedstorage.api.network.INetwork;
|
||||||
import com.raoulvdberge.refinedstorage.apiimpl.network.node.NetworkNodeCraftingMonitor;
|
import com.raoulvdberge.refinedstorage.apiimpl.network.node.NetworkNodeCraftingMonitor;
|
||||||
import com.raoulvdberge.refinedstorage.tile.TileNode;
|
import com.raoulvdberge.refinedstorage.tile.TileNode;
|
||||||
import com.raoulvdberge.refinedstorage.tile.data.ITileDataConsumer;
|
import com.raoulvdberge.refinedstorage.tile.data.ITileDataConsumer;
|
||||||
@@ -23,8 +24,10 @@ public class TileCraftingMonitor extends TileNode<NetworkNodeCraftingMonitor> {
|
|||||||
tile.getNode().setViewAutomated(value);
|
tile.getNode().setViewAutomated(value);
|
||||||
tile.getNode().markDirty();
|
tile.getNode().markDirty();
|
||||||
|
|
||||||
if (tile.getNode().getNetwork() != null) {
|
INetwork network = tile.getNode().getNetwork();
|
||||||
tile.getNode().getNetwork().sendCraftingMonitorUpdate();
|
|
||||||
|
if (network != null) {
|
||||||
|
network.sendCraftingMonitorUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user