code style updates

This commit is contained in:
way2muchnoise
2016-09-17 15:09:38 +02:00
parent cba0e4af26
commit 680c45da7e
4 changed files with 7 additions and 7 deletions

View File

@@ -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;

View File

@@ -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);
}
};

View File

@@ -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);

View File

@@ -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);