code style updates
This commit is contained in:
@@ -7,7 +7,7 @@ import refinedstorage.apiimpl.storage.item.ItemStorageNBT;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
public class NBTStorage {
|
||||
public final class NBTStorage {
|
||||
public static void constructFromDrive(ItemStack disk, int slot, ItemStorageNBT[] itemStorages, FluidStorageNBT[] fluidStorages, Function<ItemStack, ItemStorageNBT> itemStorageSupplier, Function<ItemStack, FluidStorageNBT> fluidStorageNBTSupplier) {
|
||||
if (disk == null) {
|
||||
itemStorages[slot] = null;
|
||||
|
||||
@@ -6,22 +6,22 @@ import refinedstorage.apiimpl.storage.fluid.FluidStorageNBT;
|
||||
import refinedstorage.apiimpl.storage.item.ItemStorageNBT;
|
||||
|
||||
public interface IItemValidator {
|
||||
IItemValidator itemStorageDisk = new ItemValidatorBasic(RefinedStorageItems.STORAGE_DISK) {
|
||||
IItemValidator ITEM_STORAGE_DISK = new ItemValidatorBasic(RefinedStorageItems.STORAGE_DISK) {
|
||||
@Override
|
||||
public boolean isValid(ItemStack disk) {
|
||||
return super.isValid(disk) && ItemStorageNBT.isValid(disk);
|
||||
}
|
||||
};
|
||||
IItemValidator fluidStorageDisk = new ItemValidatorBasic(RefinedStorageItems.FLUID_STORAGE_DISK) {
|
||||
IItemValidator FLUID_STORAGE_DISK = new ItemValidatorBasic(RefinedStorageItems.FLUID_STORAGE_DISK) {
|
||||
@Override
|
||||
public boolean isValid(ItemStack disk) {
|
||||
return super.isValid(disk) && FluidStorageNBT.isValid(disk);
|
||||
}
|
||||
};
|
||||
IItemValidator storageDisk = new IItemValidator() {
|
||||
IItemValidator STORAGE_DISK = new IItemValidator() {
|
||||
@Override
|
||||
public boolean isValid(ItemStack stack) {
|
||||
return itemStorageDisk.isValid(stack) || fluidStorageDisk.isValid(stack);
|
||||
return ITEM_STORAGE_DISK.isValid(stack) || FLUID_STORAGE_DISK.isValid(stack);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ public class TileDiskDrive extends TileNode implements IItemStorageProvider, IFl
|
||||
private static final String NBT_STORED = "Stored";
|
||||
private static final String NBT_TYPE = "Type";
|
||||
|
||||
private ItemHandlerBasic disks = new ItemHandlerBasic(8, this, IItemValidator.storageDisk) {
|
||||
private ItemHandlerBasic disks = new ItemHandlerBasic(8, this, IItemValidator.STORAGE_DISK) {
|
||||
@Override
|
||||
protected void onContentsChanged(int slot) {
|
||||
super.onContentsChanged(slot);
|
||||
|
||||
@@ -68,7 +68,7 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
|
||||
fluidStorages = new FluidStorage[6];
|
||||
}
|
||||
|
||||
private ItemHandlerBasic disks = new ItemHandlerBasic(12, this, IItemValidator.storageDisk) {
|
||||
private ItemHandlerBasic disks = new ItemHandlerBasic(12, this, IItemValidator.STORAGE_DISK) {
|
||||
@Override
|
||||
protected void onContentsChanged(int slot) {
|
||||
super.onContentsChanged(slot);
|
||||
|
||||
Reference in New Issue
Block a user