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