Fixed Reader and Writers GUIs still displaying channels even if not connected, fixes #1452

This commit is contained in:
raoulvdberge
2017-09-08 12:36:53 +02:00
parent 99eb135646
commit 400d98043e
3 changed files with 3 additions and 2 deletions

View File

@@ -10,6 +10,7 @@
- Fixed some translations having too big "Craft" text (raoulvdberge)
- Fixed crash with GUI when toggling the Grid size quickly (raoulvdberge)
- Fixed scrollbar not scrolling correctly when clicked with mouse when grid tabs are visible (raoulvdberge)
- Fixed Reader and Writers GUIs still displaying channels even if not connected (raoulvdberge)
- Reader and Writer blocks now face the block you're placing it on, not the player (raoulvdberge)
- The Fortune Upgrade doesn't use NBT anymore to store the fortune level (raoulvdberge)
- Pressing SHIFT over an item in the Grid will no longer display the full unformatted count, instead, use CTRL + SHIFT and it will be displayed in the tooltip (raoulvdberge)

View File

@@ -16,7 +16,7 @@ public interface IGuiReaderWriter {
INetwork getNetwork();
boolean canUpdate();
boolean isActive();
default void onAdd(String name) {
INetwork network = getNetwork();

View File

@@ -195,6 +195,6 @@ public class GuiReaderWriter extends GuiBase {
}
private List<String> getChannels() {
return readerWriter.canUpdate() ? CHANNELS : Collections.emptyList();
return readerWriter.isActive() ? CHANNELS : Collections.emptyList();
}
}