Gui cleanup (#74)

* Update dependencies for dev environment to have latest versions
* Fix depreated method usage for JEI
* Add Deprecated annotation to methods overriding a deprecated method
* Fix various Deprecated method calls
* Slightly clean up gui code based on IntelliJ inspections
* Remove some unused variables/calculations from the gui code
* Remove some unused variables/calculations from the generator gui code
* Create a bit of hierarchy for Gui's that keep track of TileEntities
* Cleanup Gui Element having majority of variables as public
* Cleanup some duplicate math
* Store tile entity type in a less duplicated manner
* Cleanup Gui ResourceLocation handling. Makes it easier to read the code
* Switch adding to a method
* Switch remaining GUI variables to private/protected
* Partially cleanup Gui Filter code
* Cleanup some of the Chemical Gui Code
* Fix missing a few files in last commit
* Improve handling of Tile Entities in GUIs
This commit is contained in:
Richard Freimer authored and Dave Smith committed 2019-03-19 16:10:57 -06:00
1 parent 56831edb3e
commit cd5fe2040b
151 files changed
+3057 -4549

No files matched your search

+11 -11
View File
@@ -14,12 +14,12 @@ import mekanism.client.SparkleAnimation.INodeChecker;
import mekanism.client.entity.ParticleLaser;
import mekanism.client.gui.GuiAmbientAccumulator;
import mekanism.client.gui.GuiBoilerStats;
import mekanism.client.gui.GuiChemicalCrystallizer;
import mekanism.client.gui.GuiChemicalDissolutionChamber;
import mekanism.client.gui.GuiChemicalInfuser;
import mekanism.client.gui.GuiChemicalInjectionChamber;
import mekanism.client.gui.GuiChemicalOxidizer;
import mekanism.client.gui.GuiChemicalWasher;
import mekanism.client.gui.chemical.GuiChemicalCrystallizer;
import mekanism.client.gui.chemical.GuiChemicalDissolutionChamber;
import mekanism.client.gui.chemical.GuiChemicalInfuser;
import mekanism.client.gui.chemical.GuiChemicalInjectionChamber;
import mekanism.client.gui.chemical.GuiChemicalOxidizer;
import mekanism.client.gui.chemical.GuiChemicalWasher;
import mekanism.client.gui.GuiCombiner;
import mekanism.client.gui.GuiCrusher;
import mekanism.client.gui.GuiDictionary;
@@ -956,13 +956,13 @@ public class ClientProxy extends CommonProxy {
public void handleTeleporterUpdate(PortableTeleporterMessage message) {
GuiScreen screen = Minecraft.getMinecraft().currentScreen;
if (screen instanceof GuiTeleporter && !((GuiTeleporter) screen).itemStack.isEmpty()) {
if (screen instanceof GuiTeleporter && !((GuiTeleporter) screen).isStackEmpty()) {
GuiTeleporter teleporter = (GuiTeleporter) screen;
teleporter.clientStatus = message.status;
teleporter.clientFreq = message.frequency;
teleporter.clientPublicCache = message.publicCache;
teleporter.clientPrivateCache = message.privateCache;
teleporter.setStatus(message.status);
teleporter.setFrequency(message.frequency);
teleporter.setPublicCache(message.publicCache);
teleporter.setPrivateCache(message.privateCache);
teleporter.updateButtons();
}