Dump unneeded IPriorityHandler.
This commit is contained in:
@@ -43,9 +43,9 @@ public class GuiStorage extends GuiBase
|
||||
addSideButton(new SideButtonRedstoneMode(gui.getRedstoneModeSetting()));
|
||||
}
|
||||
|
||||
if (gui.getWhitelistBlacklistSetting() != null)
|
||||
if (gui.getModeSetting() != null)
|
||||
{
|
||||
addSideButton(new SideButtonMode(gui.getWhitelistBlacklistSetting()));
|
||||
addSideButton(new SideButtonMode(gui.getModeSetting()));
|
||||
}
|
||||
|
||||
if (gui.getCompareSetting() != null)
|
||||
@@ -119,7 +119,7 @@ public class GuiStorage extends GuiBase
|
||||
|
||||
if (result != null)
|
||||
{
|
||||
gui.getPriorityHandler().onPriorityChanged(result);
|
||||
gui.onPriorityChanged(result);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -19,7 +19,7 @@ public class CellStorage extends NBTStorage
|
||||
@Override
|
||||
public boolean canPush(ItemStack stack)
|
||||
{
|
||||
if (ModeSettingUtils.doesNotViolateMode(drive.getInventory(), drive.getWhitelistBlacklistSetting(), drive.getCompare(), stack))
|
||||
if (ModeSettingUtils.doesNotViolateMode(drive.getInventory(), drive.getModeSetting(), drive.getCompare(), stack))
|
||||
{
|
||||
return super.canPush(stack);
|
||||
}
|
||||
|
||||
@@ -7,26 +7,21 @@ import refinedstorage.tile.settings.IRedstoneModeSetting;
|
||||
|
||||
public interface IStorageGui
|
||||
{
|
||||
public interface IPriorityHandler
|
||||
{
|
||||
public void onPriorityChanged(int priority);
|
||||
}
|
||||
|
||||
public String getName();
|
||||
|
||||
public int getPriority();
|
||||
|
||||
public void onPriorityChanged(int priority);
|
||||
|
||||
public IInventory getInventory();
|
||||
|
||||
public IRedstoneModeSetting getRedstoneModeSetting();
|
||||
|
||||
public ICompareSetting getCompareSetting();
|
||||
|
||||
public IModeSetting getWhitelistBlacklistSetting();
|
||||
public IModeSetting getModeSetting();
|
||||
|
||||
public int getStored();
|
||||
|
||||
public int getCapacity();
|
||||
|
||||
public IPriorityHandler getPriorityHandler();
|
||||
}
|
||||
|
||||
@@ -190,22 +190,15 @@ public class TileDrive extends TileMachine implements IStorageProvider, IStorage
|
||||
}
|
||||
|
||||
@Override
|
||||
public IModeSetting getWhitelistBlacklistSetting()
|
||||
public IModeSetting getModeSetting()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPriorityHandler getPriorityHandler()
|
||||
public void onPriorityChanged(int priority)
|
||||
{
|
||||
return new IPriorityHandler()
|
||||
{
|
||||
@Override
|
||||
public void onPriorityChanged(int priority)
|
||||
{
|
||||
RefinedStorage.NETWORK.sendToServer(new MessagePriorityUpdate(pos, priority));
|
||||
}
|
||||
};
|
||||
RefinedStorage.NETWORK.sendToServer(new MessagePriorityUpdate(pos, priority));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -280,7 +280,7 @@ public class TileExternalStorage extends TileMachine implements IStorageProvider
|
||||
}
|
||||
|
||||
@Override
|
||||
public IModeSetting getWhitelistBlacklistSetting()
|
||||
public IModeSetting getModeSetting()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
@@ -303,16 +303,9 @@ public class TileExternalStorage extends TileMachine implements IStorageProvider
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPriorityHandler getPriorityHandler()
|
||||
public void onPriorityChanged(int priority)
|
||||
{
|
||||
return new IPriorityHandler()
|
||||
{
|
||||
@Override
|
||||
public void onPriorityChanged(int priority)
|
||||
{
|
||||
RefinedStorage.NETWORK.sendToServer(new MessagePriorityUpdate(pos, priority));
|
||||
}
|
||||
};
|
||||
RefinedStorage.NETWORK.sendToServer(new MessagePriorityUpdate(pos, priority));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -231,22 +231,15 @@ public class TileStorage extends TileMachine implements IStorageProvider, IStora
|
||||
}
|
||||
|
||||
@Override
|
||||
public IModeSetting getWhitelistBlacklistSetting()
|
||||
public IModeSetting getModeSetting()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPriorityHandler getPriorityHandler()
|
||||
public void onPriorityChanged(int priority)
|
||||
{
|
||||
return new IPriorityHandler()
|
||||
{
|
||||
@Override
|
||||
public void onPriorityChanged(int priority)
|
||||
{
|
||||
RefinedStorage.NETWORK.sendToServer(new MessagePriorityUpdate(pos, priority));
|
||||
}
|
||||
};
|
||||
RefinedStorage.NETWORK.sendToServer(new MessagePriorityUpdate(pos, priority));
|
||||
}
|
||||
|
||||
public NBTStorage getStorage()
|
||||
|
||||
Reference in New Issue
Block a user