code style updates
This commit is contained in:
@@ -8,8 +8,7 @@ import refinedstorage.apiimpl.storage.item.ItemStorageNBT;
|
|||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
public class NBTStorage {
|
public class NBTStorage {
|
||||||
public static void constructFromDrive(ItemStack disk, int slot, ItemStorageNBT[] itemStorages, FluidStorageNBT[] fluidStorages,
|
public static void constructFromDrive(ItemStack disk, int slot, ItemStorageNBT[] itemStorages, FluidStorageNBT[] fluidStorages, Function<ItemStack, ItemStorageNBT> itemStorageSupplier, Function<ItemStack, FluidStorageNBT> fluidStorageNBTSupplier) {
|
||||||
Function<ItemStack, ItemStorageNBT> itemStorageSupplier, Function<ItemStack, FluidStorageNBT> fluidStorageNBTSupplier) {
|
|
||||||
if (disk == null) {
|
if (disk == null) {
|
||||||
itemStorages[slot] = null;
|
itemStorages[slot] = null;
|
||||||
fluidStorages[slot] = null;
|
fluidStorages[slot] = null;
|
||||||
|
|||||||
@@ -102,8 +102,7 @@ public class TileDiskDrive extends TileNode implements IItemStorageProvider, IFl
|
|||||||
super.onContentsChanged(slot);
|
super.onContentsChanged(slot);
|
||||||
|
|
||||||
if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER) {
|
if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER) {
|
||||||
NBTStorage.constructFromDrive(getStackInSlot(slot), slot, itemStorages, fluidStorages,
|
NBTStorage.constructFromDrive(getStackInSlot(slot), slot, itemStorages, fluidStorages, s -> new ItemStorage(s), s -> new FluidStorage(s));
|
||||||
s -> new ItemStorage(s), s -> new FluidStorage(s));
|
|
||||||
|
|
||||||
if (network != null) {
|
if (network != null) {
|
||||||
network.getItemStorage().rebuild();
|
network.getItemStorage().rebuild();
|
||||||
|
|||||||
@@ -85,8 +85,7 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
|
|||||||
super.onContentsChanged(slot);
|
super.onContentsChanged(slot);
|
||||||
|
|
||||||
if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER && slot < 6) {
|
if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER && slot < 6) {
|
||||||
NBTStorage.constructFromDrive(getStackInSlot(slot), slot, itemStorages, fluidStorages,
|
NBTStorage.constructFromDrive(getStackInSlot(slot), slot, itemStorages, fluidStorages, s -> new ItemStorage(s), s -> new FluidStorage(s));
|
||||||
s -> new ItemStorage(s), s -> new FluidStorage(s));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user