From 2965fb666fcd131755dda4a9b3a96dd0b0c02ca9 Mon Sep 17 00:00:00 2001 From: SquidDev Date: Tue, 2 Apr 2019 11:50:13 +0100 Subject: [PATCH] Some further cleanup and 1.13 cherry-picks Are most of these changes small and petty? Yes. However, IMO they do make the code more readable. Anyway, a summary of some of the more interesting changes: - Expose Abstract*Upgrade classes in the API - Fix the spelling of Jonathan in the API docs (*shakes fist*) - Fix bug with printout not working in the offhand. - Rename any argments/variables accidentally named "m_*", and add an inspection to prevent it happening again. - Remove most of the Block*.Properties classes - just inline them in the parent class. - Return super.writeToNBT instead of reassigning at the top. --- codeInspectionSettings.xml | 10 +- gradle.properties | 2 +- .../dan200/computercraft/ComputerCraft.java | 6 +- .../AbstractTurtleUpgrade.java | 19 ++- .../computercraft/api/media/IMedia.java | 2 +- .../pocket}/AbstractPocketUpgrade.java | 8 +- .../turtle/event/TurtleInventoryEvent.java | 2 - .../computercraft/client/ClientRegistry.java | 6 +- .../render/TileEntityCableRenderer.java | 4 +- .../core/apis/ComputerAccess.java | 8 +- .../dan200/computercraft/core/apis/FSAPI.java | 4 +- .../core/apis/PeripheralAPI.java | 4 +- .../computercraft/core/apis/TermAPI.java | 6 +- .../core/computer/ComputerSystem.java | 6 +- .../core/computer/MainThreadExecutor.java | 4 +- .../filesystem/FileSystemWrapperMount.java | 4 +- .../computercraft/shared/BundledRedstone.java | 2 + .../shared/common/BlockGeneric.java | 16 +- .../shared/common/ColourableRecipe.java | 6 +- .../shared/common/TileGeneric.java | 1 - .../shared/computer/apis/CommandAPI.java | 43 +++--- .../computer/blocks/BlockCommandComputer.java | 3 +- .../shared/computer/blocks/BlockComputer.java | 3 +- .../computer/blocks/BlockComputerBase.java | 8 +- .../shared/computer/blocks/TileComputer.java | 4 +- .../computer/blocks/TileComputerBase.java | 55 +++---- .../computer/items/ItemComputerBase.java | 14 +- .../recipe/ComputerConvertRecipe.java | 38 ++--- .../computer/recipe/ComputerFamilyRecipe.java | 2 +- .../integration/mcmp/PartAdvancedModem.java | 4 +- .../integration/mcmp/PartNormalModem.java | 4 +- .../media/inventory/ContainerHeldItem.java | 2 +- .../shared/media/recipes/PrintoutRecipe.java | 4 +- .../shared/network/Containers.java | 2 +- .../peripheral/common/BlockPeripheral.java | 106 +++++++------ .../peripheral/common/TilePeripheralBase.java | 21 +-- .../peripheral/diskdrive/TileDiskDrive.java | 141 ++++++------------ .../peripheral/modem/wired/BlockCable.java | 136 ++++++++--------- .../modem/wired/BlockCableModemVariant.java | 34 ++--- .../modem/wired/BlockWiredModemFull.java | 23 +-- .../peripheral/modem/wired/CableBounds.java | 18 +-- .../peripheral/modem/wired/ItemCable.java | 6 +- .../peripheral/modem/wired/TileCable.java | 97 +++++------- .../modem/wired/TileWiredModemFull.java | 36 +++-- .../wired/WiredModemLocalPeripheral.java | 15 +- .../modem/wireless/BlockAdvancedModem.java | 23 ++- .../modem/wireless/TileAdvancedModem.java | 2 +- .../modem/wireless/TileWirelessModem.java | 16 +- .../peripheral/monitor/ClientMonitor.java | 5 + .../peripheral/monitor/TileMonitor.java | 45 +++--- .../peripheral/printer/ContainerPrinter.java | 43 +++--- .../peripheral/printer/TilePrinter.java | 62 +++----- .../pocket/core/PocketServerComputer.java | 5 +- .../pocket/items/ItemPocketComputer.java | 2 +- .../items/PocketComputerItemFactory.java | 3 +- .../pocket/peripherals/PocketModem.java | 1 + .../pocket/peripherals/PocketSpeaker.java | 11 +- .../peripherals/PocketSpeakerPeripheral.java | 4 +- .../recipes/PocketComputerUpgradeRecipe.java | 23 +-- .../proxy/ComputerCraftProxyCommon.java | 7 +- .../shared/proxy/IComputerCraftProxy.java | 18 --- .../shared/turtle/blocks/BlockTurtle.java | 16 +- .../shared/turtle/blocks/TileTurtle.java | 8 +- .../shared/turtle/core/TurtleBrain.java | 15 +- .../turtle/core/TurtleCompareCommand.java | 36 ++--- .../turtle/core/TurtlePlaceCommand.java | 36 ++--- .../turtle/inventory/ContainerTurtle.java | 11 +- .../shared/turtle/items/ItemTurtleNormal.java | 6 +- .../shared/turtle/recipes/TurtleRecipe.java | 2 +- .../turtle/upgrades/TurtleCraftingTable.java | 1 + .../shared/turtle/upgrades/TurtleModem.java | 1 + .../shared/turtle/upgrades/TurtleSpeaker.java | 1 + .../shared/turtle/upgrades/TurtleTool.java | 1 + .../shared/util/CreativeTabMain.java | 10 +- .../shared/util/CreativeTabTreasure.java | 35 ----- .../shared/util/ImpostorRecipe.java | 2 +- .../computercraft/shared/util/NBTUtil.java | 92 +++++------- .../shared/util/RedstoneUtil.java | 3 +- .../shared/wired/WiredNetwork.java | 8 +- .../assets/computercraft/lang/en_us.lang | 2 + tools/language.lua | 2 +- 81 files changed, 601 insertions(+), 896 deletions(-) rename src/main/java/dan200/computercraft/{shared/turtle/upgrades => api}/AbstractTurtleUpgrade.java (67%) rename src/main/java/dan200/computercraft/{shared/pocket/peripherals => api/pocket}/AbstractPocketUpgrade.java (87%) delete mode 100644 src/main/java/dan200/computercraft/shared/proxy/IComputerCraftProxy.java delete mode 100644 src/main/java/dan200/computercraft/shared/util/CreativeTabTreasure.java diff --git a/codeInspectionSettings.xml b/codeInspectionSettings.xml index 0e6f45b64..2862d72b4 100644 --- a/codeInspectionSettings.xml +++ b/codeInspectionSettings.xml @@ -1290,12 +1290,12 @@