From 04a2889311a0b9584a033a249f98dd2baba42b1d Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Fri, 14 Jan 2022 18:54:26 +0700 Subject: [PATCH] Rename classes to match namings in other places --- .../java/ru/dbotthepony/mc/otm/Registry.java | 44 +++++++++---------- .../otm/client/screen/MatterPanelScreen.java | 6 +-- .../mc/otm/menu/MatterDecomposerMenu.java | 2 +- .../mc/otm/menu/MatterReplicatorMenu.java | 2 +- .../otm/network/CancelMatterTaskPacket.java | 4 +- .../network/MatterBottlerSwitchPacket.java | 4 +- .../mc/otm/network/MatterTaskPacket.java | 4 +- .../mc/otm/network/MatteryNetworking.java | 18 ++++---- .../mc/otm/network/PatternGridPacket.java | 4 +- .../PatternReplicationRequestPacket.java | 4 +- .../entity/BlockEntityChemicalGenerator.kt | 4 +- .../otm/block/entity/BlockEntityDriveRack.kt | 4 +- .../block/entity/BlockEntityDriveViewer.kt | 4 +- .../block/entity/BlockEntityEnergyCounter.kt | 4 +- .../block/entity/BlockEntityItemMonitor.kt | 4 +- .../block/entity/BlockEntityMatterBottler.kt | 5 +-- .../entity/BlockEntityMatterCapacitorBank.kt | 4 +- .../block/entity/BlockEntityMatterPanel.kt | 22 +++++----- .../block/entity/BlockEntityMatterScanner.kt | 4 +- .../block/entity/BlockEntityPatternStorage.kt | 4 +- .../otm/block/entity/BlockEntityPlatePress.kt | 4 +- .../otm/client/screen/MatterScannerScreen.kt | 6 +-- .../otm/client/screen/PatternStorageScreen.kt | 8 ++-- .../mc/otm/client/screen/PlatePressScreen.kt | 6 +-- ...ationScreen.kt => ScreenAndroidStation.kt} | 8 ++-- ...teryBankScreen.kt => ScreenBatteryBank.kt} | 3 +- ...orScreen.kt => ScreenChemicalGenerator.kt} | 4 +- ...{DriveRackScreen.kt => ScreenDriveRack.kt} | 6 +-- ...veViewerScreen.kt => ScreenDriveViewer.kt} | 26 +++++------ ...ounterScreen.kt => ScreenEnergyCounter.kt} | 12 ++--- ...mMonitorScreen.kt => ScreenItemMonitor.kt} | 8 ++-- ...ottlerScreen.kt => ScreenMatterBottler.kt} | 6 +-- ...Screen.kt => ScreenMatterCapacitorBank.kt} | 6 +-- ...serScreen.kt => ScreenMatterDecomposer.kt} | 2 +- ...torScreen.kt => ScreenMatterReplicator.kt} | 2 +- ...idStationMenu.kt => MenuAndroidStation.kt} | 2 +- ...eratorMenu.kt => MenuCHemicalGenerator.kt} | 2 +- .../{DriveRackMenu.kt => MenuDriveRack.kt} | 4 +- ...{DriveViewerMenu.kt => MenuDriveViewer.kt} | 8 ++-- ...rgyCounterMenu.kt => MenuEnergyCounter.kt} | 2 +- ...{ItemMonitorMenu.kt => MenuItemMonitor.kt} | 5 +-- ...terBottlerMenu.kt => MenuMatterBottler.kt} | 4 +- ...itorBankMenu.kt => MenuMatterCapacitor.kt} | 2 +- ...{MatterPanelMenu.kt => MenuMatterPanel.kt} | 2 +- ...terScannerMenu.kt => MenuMatterScanner.kt} | 4 +- .../menu/{MatteryMenu.kt => MenuMattery.kt} | 0 ...edMatteryMenu.kt => MenuMatteryPowered.kt} | 2 +- ...rnStorageMenu.kt => MenuPatternStorage.kt} | 2 +- .../{PlatePressMenu.kt => MenuPlatePress.kt} | 4 +- 49 files changed, 148 insertions(+), 153 deletions(-) rename src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/{AndroidStationScreen.kt => ScreenAndroidStation.kt} (96%) rename src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/{BatteryBankScreen.kt => ScreenBatteryBank.kt} (87%) rename src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/{ChemicalGeneratorScreen.kt => ScreenChemicalGenerator.kt} (83%) rename src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/{DriveRackScreen.kt => ScreenDriveRack.kt} (83%) rename src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/{DriveViewerScreen.kt => ScreenDriveViewer.kt} (88%) rename src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/{EnergyCounterScreen.kt => ScreenEnergyCounter.kt} (78%) rename src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/{ItemMonitorScreen.kt => ScreenItemMonitor.kt} (87%) rename src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/{MatterBottlerScreen.kt => ScreenMatterBottler.kt} (90%) rename src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/{MatterCapacitorBankScreen.kt => ScreenMatterCapacitorBank.kt} (77%) rename src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/{MatterDecomposerScreen.kt => ScreenMatterDecomposer.kt} (94%) rename src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/{MatterReplicatorScreen.kt => ScreenMatterReplicator.kt} (94%) rename src/main/kotlin/ru/dbotthepony/mc/otm/menu/{AndroidStationMenu.kt => MenuAndroidStation.kt} (95%) rename src/main/kotlin/ru/dbotthepony/mc/otm/menu/{ChemicalGeneratorMenu.kt => MenuCHemicalGenerator.kt} (96%) rename src/main/kotlin/ru/dbotthepony/mc/otm/menu/{DriveRackMenu.kt => MenuDriveRack.kt} (86%) rename src/main/kotlin/ru/dbotthepony/mc/otm/menu/{DriveViewerMenu.kt => MenuDriveViewer.kt} (96%) rename src/main/kotlin/ru/dbotthepony/mc/otm/menu/{EnergyCounterMenu.kt => MenuEnergyCounter.kt} (96%) rename src/main/kotlin/ru/dbotthepony/mc/otm/menu/{ItemMonitorMenu.kt => MenuItemMonitor.kt} (91%) rename src/main/kotlin/ru/dbotthepony/mc/otm/menu/{MatterBottlerMenu.kt => MenuMatterBottler.kt} (96%) rename src/main/kotlin/ru/dbotthepony/mc/otm/menu/{MatterCapacitorBankMenu.kt => MenuMatterCapacitor.kt} (96%) rename src/main/kotlin/ru/dbotthepony/mc/otm/menu/{MatterPanelMenu.kt => MenuMatterPanel.kt} (98%) rename src/main/kotlin/ru/dbotthepony/mc/otm/menu/{MatterScannerMenu.kt => MenuMatterScanner.kt} (95%) rename src/main/kotlin/ru/dbotthepony/mc/otm/menu/{MatteryMenu.kt => MenuMattery.kt} (100%) rename src/main/kotlin/ru/dbotthepony/mc/otm/menu/{PoweredMatteryMenu.kt => MenuMatteryPowered.kt} (94%) rename src/main/kotlin/ru/dbotthepony/mc/otm/menu/{PatternStorageMenu.kt => MenuPatternStorage.kt} (96%) rename src/main/kotlin/ru/dbotthepony/mc/otm/menu/{PlatePressMenu.kt => MenuPlatePress.kt} (88%) diff --git a/src/main/java/ru/dbotthepony/mc/otm/Registry.java b/src/main/java/ru/dbotthepony/mc/otm/Registry.java index 19bd3fe4e..05904ddd0 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/Registry.java +++ b/src/main/java/ru/dbotthepony/mc/otm/Registry.java @@ -1044,19 +1044,19 @@ public class Registry { public static final MenuType ANDROID_STATION = new MenuType<>(AndroidStationMenu::new); public static final MenuType BATTERY_BANK = new MenuType<>(BatteryBankMenu::new); public static final MenuType MATTER_DECOMPOSER = new MenuType<>(MatterDecomposerMenu::new); - public static final MenuType MATTER_CAPACITOR_BANK = new MenuType<>(MatterCapacitorBankMenu::new); - public static final MenuType PATTERN_STORAGE = new MenuType<>(PatternStorageMenu::new); - public static final MenuType MATTER_SCANNER = new MenuType<>(MatterScannerMenu::new); - public static final MenuType MATTER_PANEL = new MenuType<>(MatterPanelMenu::new); + public static final MenuType MATTER_CAPACITOR_BANK = new MenuType<>(MenuMatterCapacitor::new); + public static final MenuType PATTERN_STORAGE = new MenuType<>(MenuPatternStorage::new); + public static final MenuType MATTER_SCANNER = new MenuType<>(MenuMatterScanner::new); + public static final MenuType MATTER_PANEL = new MenuType<>(MenuMatterPanel::new); public static final MenuType MATTER_REPLICATOR = new MenuType<>(MatterReplicatorMenu::new); - public static final MenuType MATTER_BOTTLER = new MenuType<>(MatterBottlerMenu::new); - public static final MenuType DRIVE_VIEWER = new MenuType<>(DriveViewerMenu::new); + public static final MenuType MATTER_BOTTLER = new MenuType<>(MenuMatterBottler::new); + public static final MenuType DRIVE_VIEWER = new MenuType<>(MenuDriveViewer::new); public static final MenuType CARGO_CRATE = new MenuType<>(CargoCrateMenu::new); - public static final MenuType DRIVE_RACK = new MenuType<>(DriveRackMenu::new); - public static final MenuType ITEM_MONITOR = new MenuType<>(ItemMonitorMenu::new); - public static final MenuType ENERGY_COUNTER = new MenuType<>(EnergyCounterMenu::new); - public static final MenuType CHEMICAL_GENERATOR = new MenuType<>(ChemicalGeneratorMenu::new); - public static final MenuType PLATE_PRESS = new MenuType<>(PlatePressMenu::new); + public static final MenuType DRIVE_RACK = new MenuType<>(MenuDriveRack::new); + public static final MenuType ITEM_MONITOR = new MenuType<>(MenuItemMonitor::new); + public static final MenuType ENERGY_COUNTER = new MenuType<>(MenuEnergyCounter::new); + public static final MenuType CHEMICAL_GENERATOR = new MenuType<>(MenuCHemicalGenerator::new); + public static final MenuType PLATE_PRESS = new MenuType<>(MenuPlatePress::new); static { ANDROID_STATION.setRegistryName(Names.ANDROID_STATION); @@ -1103,21 +1103,21 @@ public class Registry { @SubscribeEvent @SuppressWarnings("unused") public static void registerScreens(final FMLClientSetupEvent event) { - MenuScreens.register(ANDROID_STATION, AndroidStationScreen::new); - MenuScreens.register(BATTERY_BANK, BatteryBankScreen::new); - MenuScreens.register(MATTER_DECOMPOSER, MatterDecomposerScreen::new); - MenuScreens.register(MATTER_CAPACITOR_BANK, MatterCapacitorBankScreen::new); + MenuScreens.register(ANDROID_STATION, ScreenAndroidStation::new); + MenuScreens.register(BATTERY_BANK, ScreenBatteryBank::new); + MenuScreens.register(MATTER_DECOMPOSER, ScreenMatterDecomposer::new); + MenuScreens.register(MATTER_CAPACITOR_BANK, ScreenMatterCapacitorBank::new); MenuScreens.register(PATTERN_STORAGE, PatternStorageScreen::new); MenuScreens.register(MATTER_SCANNER, MatterScannerScreen::new); MenuScreens.register(MATTER_PANEL, MatterPanelScreen::new); - MenuScreens.register(MATTER_REPLICATOR, MatterReplicatorScreen::new); - MenuScreens.register(MATTER_BOTTLER, MatterBottlerScreen::new); - MenuScreens.register(DRIVE_VIEWER, DriveViewerScreen::new); + MenuScreens.register(MATTER_REPLICATOR, ScreenMatterReplicator::new); + MenuScreens.register(MATTER_BOTTLER, ScreenMatterBottler::new); + MenuScreens.register(DRIVE_VIEWER, ScreenDriveViewer::new); MenuScreens.register(CARGO_CRATE, CargoCrateScreen::new); - MenuScreens.register(DRIVE_RACK, DriveRackScreen::new); - MenuScreens.register(ITEM_MONITOR, ItemMonitorScreen::new); - MenuScreens.register(ENERGY_COUNTER, EnergyCounterScreen::new); - MenuScreens.register(CHEMICAL_GENERATOR, ChemicalGeneratorScreen::new); + MenuScreens.register(DRIVE_RACK, ScreenDriveRack::new); + MenuScreens.register(ITEM_MONITOR, ScreenItemMonitor::new); + MenuScreens.register(ENERGY_COUNTER, ScreenEnergyCounter::new); + MenuScreens.register(CHEMICAL_GENERATOR, ScreenChemicalGenerator::new); MenuScreens.register(PLATE_PRESS, PlatePressScreen::new); // OverdriveThatMatters.LOGGER.info("Registered screens"); diff --git a/src/main/java/ru/dbotthepony/mc/otm/client/screen/MatterPanelScreen.java b/src/main/java/ru/dbotthepony/mc/otm/client/screen/MatterPanelScreen.java index f90c45170..a9e710c87 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/client/screen/MatterPanelScreen.java +++ b/src/main/java/ru/dbotthepony/mc/otm/client/screen/MatterPanelScreen.java @@ -11,7 +11,7 @@ import net.minecraft.world.item.ItemStack; import ru.dbotthepony.mc.otm.OverdriveThatMatters; import ru.dbotthepony.mc.otm.capability.matter.MatterTask; import ru.dbotthepony.mc.otm.capability.matter.PatternState; -import ru.dbotthepony.mc.otm.menu.MatterPanelMenu; +import ru.dbotthepony.mc.otm.menu.MenuMatterPanel; import ru.dbotthepony.mc.otm.network.MatteryNetworking; import ru.dbotthepony.mc.otm.network.PatternReplicationRequestPacket; import ru.dbotthepony.mc.otm.client.screen.panels.*; @@ -21,7 +21,7 @@ import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; -public class MatterPanelScreen extends MatteryScreen { +public class MatterPanelScreen extends MatteryScreen { private static final int MODAL_WIDTH = 213; private static final int MODAL_HEIGHT = 110; @@ -31,7 +31,7 @@ public class MatterPanelScreen extends MatteryScreen { return CONTAINER; } - public MatterPanelScreen(MatterPanelMenu p_97741_, Inventory p_97742_, Component p_97743_) { + public MatterPanelScreen(MenuMatterPanel p_97741_, Inventory p_97742_, Component p_97743_) { super(p_97741_, p_97742_, p_97743_); imageWidth = 176; diff --git a/src/main/java/ru/dbotthepony/mc/otm/menu/MatterDecomposerMenu.java b/src/main/java/ru/dbotthepony/mc/otm/menu/MatterDecomposerMenu.java index 25322071d..668ef5857 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/menu/MatterDecomposerMenu.java +++ b/src/main/java/ru/dbotthepony/mc/otm/menu/MatterDecomposerMenu.java @@ -13,7 +13,7 @@ import ru.dbotthepony.mc.otm.menu.widget.ProgressGaugeWidget; import javax.annotation.Nullable; -public class MatterDecomposerMenu extends PoweredMatteryMenu { +public class MatterDecomposerMenu extends MenuMatteryPowered { public MatterDecomposerMenu(int containerID, Inventory inventory) { this(containerID, inventory, null); } diff --git a/src/main/java/ru/dbotthepony/mc/otm/menu/MatterReplicatorMenu.java b/src/main/java/ru/dbotthepony/mc/otm/menu/MatterReplicatorMenu.java index 6d487fb91..d590417b9 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/menu/MatterReplicatorMenu.java +++ b/src/main/java/ru/dbotthepony/mc/otm/menu/MatterReplicatorMenu.java @@ -8,7 +8,7 @@ import ru.dbotthepony.mc.otm.block.entity.BlockEntityMatterReplicator; import ru.dbotthepony.mc.otm.menu.widget.LevelGaugeWidget; import ru.dbotthepony.mc.otm.menu.widget.ProgressGaugeWidget; -public class MatterReplicatorMenu extends PoweredMatteryMenu { +public class MatterReplicatorMenu extends MenuMatteryPowered { public MatterReplicatorMenu(int p_38852_, Inventory inventory) { this(p_38852_, inventory, null); } diff --git a/src/main/java/ru/dbotthepony/mc/otm/network/CancelMatterTaskPacket.java b/src/main/java/ru/dbotthepony/mc/otm/network/CancelMatterTaskPacket.java index 633cdee20..2f08853c9 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/network/CancelMatterTaskPacket.java +++ b/src/main/java/ru/dbotthepony/mc/otm/network/CancelMatterTaskPacket.java @@ -3,7 +3,7 @@ package ru.dbotthepony.mc.otm.network; import net.minecraft.network.FriendlyByteBuf; import net.minecraftforge.network.NetworkEvent; import ru.dbotthepony.mc.otm.capability.matter.MatterTask; -import ru.dbotthepony.mc.otm.menu.MatterPanelMenu; +import ru.dbotthepony.mc.otm.menu.MenuMatterPanel; import java.util.UUID; import java.util.function.Supplier; @@ -28,7 +28,7 @@ public record CancelMatterTaskPacket(UUID id) { context.get().enqueueWork(() -> { var player = context.get().getSender(); - if (player.containerMenu instanceof MatterPanelMenu menu) { + if (player.containerMenu instanceof MenuMatterPanel menu) { menu.receiveTaskCancel(player, id); } }); diff --git a/src/main/java/ru/dbotthepony/mc/otm/network/MatterBottlerSwitchPacket.java b/src/main/java/ru/dbotthepony/mc/otm/network/MatterBottlerSwitchPacket.java index b923d3edc..b4944232d 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/network/MatterBottlerSwitchPacket.java +++ b/src/main/java/ru/dbotthepony/mc/otm/network/MatterBottlerSwitchPacket.java @@ -3,7 +3,7 @@ package ru.dbotthepony.mc.otm.network; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.server.level.ServerPlayer; import net.minecraftforge.network.NetworkEvent; -import ru.dbotthepony.mc.otm.menu.MatterBottlerMenu; +import ru.dbotthepony.mc.otm.menu.MenuMatterBottler; import java.util.function.Supplier; @@ -17,7 +17,7 @@ public record MatterBottlerSwitchPacket() { } public void playServer(ServerPlayer ply) { - if (ply.containerMenu instanceof MatterBottlerMenu menu) { + if (ply.containerMenu instanceof MenuMatterBottler menu) { menu.switchBottlerMode(); } } diff --git a/src/main/java/ru/dbotthepony/mc/otm/network/MatterTaskPacket.java b/src/main/java/ru/dbotthepony/mc/otm/network/MatterTaskPacket.java index c3843879f..e0b15cea9 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/network/MatterTaskPacket.java +++ b/src/main/java/ru/dbotthepony/mc/otm/network/MatterTaskPacket.java @@ -7,7 +7,7 @@ import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.network.NetworkEvent; import ru.dbotthepony.mc.otm.OverdriveThatMatters; import ru.dbotthepony.mc.otm.capability.matter.MatterTask; -import ru.dbotthepony.mc.otm.menu.MatterPanelMenu; +import ru.dbotthepony.mc.otm.menu.MenuMatterPanel; import javax.annotation.ParametersAreNonnullByDefault; import java.util.ArrayList; @@ -31,7 +31,7 @@ public record MatterTaskPacket(boolean action, Collection state) { } private void playClient() { - if (Minecraft.getInstance().player.containerMenu instanceof MatterPanelMenu menu) { + if (Minecraft.getInstance().player.containerMenu instanceof MenuMatterPanel menu) { if (action) menu.networkTasksUpdated(state); else diff --git a/src/main/java/ru/dbotthepony/mc/otm/network/MatteryNetworking.java b/src/main/java/ru/dbotthepony/mc/otm/network/MatteryNetworking.java index 0649f2be2..d81dac74d 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/network/MatteryNetworking.java +++ b/src/main/java/ru/dbotthepony/mc/otm/network/MatteryNetworking.java @@ -7,7 +7,7 @@ import net.minecraftforge.network.NetworkRegistry; import net.minecraftforge.network.PacketDistributor; import net.minecraftforge.network.simple.SimpleChannel; import ru.dbotthepony.mc.otm.OverdriveThatMatters; -import ru.dbotthepony.mc.otm.menu.DriveViewerMenu; +import ru.dbotthepony.mc.otm.menu.MenuDriveViewer; import ru.dbotthepony.mc.otm.menu.data.*; import ru.dbotthepony.mc.otm.network.android.*; @@ -206,19 +206,19 @@ public class MatteryNetworking { CHANNEL.registerMessage( next_network_id++, - DriveViewerMenu.FilterSwitchPacket.class, - DriveViewerMenu.FilterSwitchPacket::write, - DriveViewerMenu.FilterSwitchPacket::read, - DriveViewerMenu.FilterSwitchPacket::play, + MenuDriveViewer.FilterSwitchPacket.class, + MenuDriveViewer.FilterSwitchPacket::write, + MenuDriveViewer.FilterSwitchPacket::read, + MenuDriveViewer.FilterSwitchPacket::play, Optional.of(NetworkDirection.PLAY_TO_SERVER) ); CHANNEL.registerMessage( next_network_id++, - DriveViewerMenu.FilterSetPacket.class, - DriveViewerMenu.FilterSetPacket::write, - DriveViewerMenu.FilterSetPacket::read, - DriveViewerMenu.FilterSetPacket::play, + MenuDriveViewer.FilterSetPacket.class, + MenuDriveViewer.FilterSetPacket::write, + MenuDriveViewer.FilterSetPacket::read, + MenuDriveViewer.FilterSetPacket::play, Optional.of(NetworkDirection.PLAY_TO_SERVER) ); } diff --git a/src/main/java/ru/dbotthepony/mc/otm/network/PatternGridPacket.java b/src/main/java/ru/dbotthepony/mc/otm/network/PatternGridPacket.java index e9c668a9e..b30e29c65 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/network/PatternGridPacket.java +++ b/src/main/java/ru/dbotthepony/mc/otm/network/PatternGridPacket.java @@ -7,7 +7,7 @@ import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.network.NetworkEvent; import ru.dbotthepony.mc.otm.OverdriveThatMatters; import ru.dbotthepony.mc.otm.capability.matter.PatternState; -import ru.dbotthepony.mc.otm.menu.MatterPanelMenu; +import ru.dbotthepony.mc.otm.menu.MenuMatterPanel; import javax.annotation.ParametersAreNonnullByDefault; import java.util.ArrayList; @@ -31,7 +31,7 @@ public record PatternGridPacket(boolean action, Collection state) } private void playClient() { - if (Minecraft.getInstance().player.containerMenu instanceof MatterPanelMenu menu) { + if (Minecraft.getInstance().player.containerMenu instanceof MenuMatterPanel menu) { if (action) menu.networkPatternsUpdated(state); else diff --git a/src/main/java/ru/dbotthepony/mc/otm/network/PatternReplicationRequestPacket.java b/src/main/java/ru/dbotthepony/mc/otm/network/PatternReplicationRequestPacket.java index c69179d1b..f6d037790 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/network/PatternReplicationRequestPacket.java +++ b/src/main/java/ru/dbotthepony/mc/otm/network/PatternReplicationRequestPacket.java @@ -3,7 +3,7 @@ package ru.dbotthepony.mc.otm.network; import net.minecraft.network.FriendlyByteBuf; import net.minecraftforge.network.NetworkEvent; import ru.dbotthepony.mc.otm.capability.matter.PatternState; -import ru.dbotthepony.mc.otm.menu.MatterPanelMenu; +import ru.dbotthepony.mc.otm.menu.MenuMatterPanel; import java.util.function.Supplier; @@ -27,7 +27,7 @@ public record PatternReplicationRequestPacket(PatternState state, int how_much) var ply = context.get().getSender(); - if (ply.containerMenu instanceof MatterPanelMenu menu) + if (ply.containerMenu instanceof MenuMatterPanel menu) menu.requestReplication(ply, state, how_much); }); } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityChemicalGenerator.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityChemicalGenerator.kt index 9c6b5cdb5..63a97cd21 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityChemicalGenerator.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityChemicalGenerator.kt @@ -26,7 +26,7 @@ import ru.dbotthepony.mc.otm.capability.IMatteryEnergyStorage import ru.dbotthepony.mc.otm.capability.MatteryCapability import ru.dbotthepony.mc.otm.container.MatteryContainer import ru.dbotthepony.mc.otm.core.Fraction -import ru.dbotthepony.mc.otm.menu.ChemicalGeneratorMenu +import ru.dbotthepony.mc.otm.menu.MenuCHemicalGenerator import ru.dbotthepony.mc.otm.* import ru.dbotthepony.mc.otm.block.BlockMatteryRotatable import ru.dbotthepony.mc.otm.block.entity.worker.WorkerState @@ -41,7 +41,7 @@ class BlockEntityChemicalGenerator(pos: BlockPos, state: BlockState) : BlockEnti } override fun createMenu(containerID: Int, inventory: Inventory, ply: Player): AbstractContainerMenu { - return ChemicalGeneratorMenu(containerID, inventory, this) + return MenuCHemicalGenerator(containerID, inventory, this) } private var valid = true diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityDriveRack.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityDriveRack.kt index 684a7dea7..3c134f411 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityDriveRack.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityDriveRack.kt @@ -21,7 +21,7 @@ import ru.dbotthepony.mc.otm.capability.MatteryMachineEnergyStorage import ru.dbotthepony.mc.otm.container.MatteryContainer import ru.dbotthepony.mc.otm.core.Fraction import ru.dbotthepony.mc.otm.ifHas -import ru.dbotthepony.mc.otm.menu.DriveRackMenu +import ru.dbotthepony.mc.otm.menu.MenuDriveRack import ru.dbotthepony.mc.otm.set import ru.dbotthepony.mc.otm.graph.storage.StorageNetworkGraph import ru.dbotthepony.mc.otm.storage.PoweredVirtualComponent @@ -79,7 +79,7 @@ class BlockEntityDriveRack(p_155229_: BlockPos, p_155230_: BlockState) : } override fun createMenu(containerID: Int, inventory: Inventory, ply: Player): AbstractContainerMenu? { - return DriveRackMenu(containerID, inventory, this) + return MenuDriveRack(containerID, inventory, this) } override fun getCapability(cap: Capability, side: Direction?): LazyOptional { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityDriveViewer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityDriveViewer.kt index 7a76a5cda..f5dff60fc 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityDriveViewer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityDriveViewer.kt @@ -20,7 +20,7 @@ import ru.dbotthepony.mc.otm.capability.MatteryMachineEnergyStorage import ru.dbotthepony.mc.otm.container.MatteryContainer import ru.dbotthepony.mc.otm.core.Fraction import ru.dbotthepony.mc.otm.ifHas -import ru.dbotthepony.mc.otm.menu.DriveViewerMenu +import ru.dbotthepony.mc.otm.menu.MenuDriveViewer import ru.dbotthepony.mc.otm.set import javax.annotation.ParametersAreNonnullByDefault @@ -86,7 +86,7 @@ class BlockEntityDriveViewer(p_155229_: BlockPos, p_155230_: BlockState) : Block } override fun createMenu(containerID: Int, inventory: Inventory, ply: Player): AbstractContainerMenu? { - return DriveViewerMenu(containerID, inventory, this) + return MenuDriveViewer(containerID, inventory, this) } override fun saveAdditional(nbt: CompoundTag) { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityEnergyCounter.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityEnergyCounter.kt index 1f4c8fc0d..09503a360 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityEnergyCounter.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityEnergyCounter.kt @@ -25,7 +25,7 @@ import ru.dbotthepony.mc.otm.capability.MatteryCapability import ru.dbotthepony.mc.otm.capability.extractEnergy import ru.dbotthepony.mc.otm.capability.receiveEnergy import ru.dbotthepony.mc.otm.core.Fraction -import ru.dbotthepony.mc.otm.menu.EnergyCounterMenu +import ru.dbotthepony.mc.otm.menu.MenuEnergyCounter import java.lang.ref.WeakReference class BlockEntityEnergyCounter(p_155229_: BlockPos, p_155230_: BlockState) : BlockEntityMattery(Registry.BlockEntities.ENERGY_COUNTER, p_155229_, p_155230_) { @@ -108,7 +108,7 @@ class BlockEntityEnergyCounter(p_155229_: BlockPos, p_155230_: BlockState) : Blo } override fun createMenu(containerID: Int, inventory: Inventory, ply: Player): AbstractContainerMenu { - return EnergyCounterMenu(containerID, inventory, this) + return MenuEnergyCounter(containerID, inventory, this) } private val energyInput = EnergyCounterCap(true) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityItemMonitor.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityItemMonitor.kt index 6deadd749..8b24b1bb9 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityItemMonitor.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityItemMonitor.kt @@ -17,7 +17,7 @@ import ru.dbotthepony.mc.otm.graph.storage.BasicStorageGraphNode import ru.dbotthepony.mc.otm.capability.MatteryCapability import ru.dbotthepony.mc.otm.capability.MatteryMachineEnergyStorage import ru.dbotthepony.mc.otm.core.Fraction -import ru.dbotthepony.mc.otm.menu.ItemMonitorMenu +import ru.dbotthepony.mc.otm.menu.MenuItemMonitor import ru.dbotthepony.mc.otm.graph.storage.StorageNetworkGraph class BlockEntityItemMonitor(p_155229_: BlockPos, p_155230_: BlockState) : @@ -39,7 +39,7 @@ class BlockEntityItemMonitor(p_155229_: BlockPos, p_155230_: BlockState) : } override fun createMenu(containerID: Int, inventory: Inventory, ply: Player): AbstractContainerMenu { - return ItemMonitorMenu(containerID, inventory, this) + return MenuItemMonitor(containerID, inventory, this) } override fun setLevel(p_155231_: Level) { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityMatterBottler.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityMatterBottler.kt index 6288ad01e..b77906251 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityMatterBottler.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityMatterBottler.kt @@ -25,13 +25,12 @@ import ru.dbotthepony.mc.otm.capability.matter.IMatterHandler import ru.dbotthepony.mc.otm.capability.matter.IMatterHandler.MatterDirection import ru.dbotthepony.mc.otm.capability.matter.MatterHandlerCapability import ru.dbotthepony.mc.otm.container.MatteryContainer -import ru.dbotthepony.mc.otm.container.MatteryContainerHandler import ru.dbotthepony.mc.otm.core.Fraction import ru.dbotthepony.mc.otm.graph.Graph6Node import ru.dbotthepony.mc.otm.graph.matter.IMatterGraphNode import ru.dbotthepony.mc.otm.graph.matter.MatterNetworkGraph import ru.dbotthepony.mc.otm.ifHas -import ru.dbotthepony.mc.otm.menu.MatterBottlerMenu +import ru.dbotthepony.mc.otm.menu.MenuMatterBottler import ru.dbotthepony.mc.otm.set class BlockEntityMatterBottler(p_155229_: BlockPos, p_155230_: BlockState) : @@ -166,7 +165,7 @@ class BlockEntityMatterBottler(p_155229_: BlockPos, p_155230_: BlockState) : } override fun createMenu(containerID: Int, inventory: Inventory, ply: Player): AbstractContainerMenu { - return MatterBottlerMenu(containerID, inventory, this) + return MenuMatterBottler(containerID, inventory, this) } override fun saveAdditional(nbt: CompoundTag) { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityMatterCapacitorBank.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityMatterCapacitorBank.kt index e405552e4..26110ca54 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityMatterCapacitorBank.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityMatterCapacitorBank.kt @@ -26,7 +26,7 @@ import ru.dbotthepony.mc.otm.core.Fraction import ru.dbotthepony.mc.otm.graph.Graph6Node import ru.dbotthepony.mc.otm.graph.matter.IMatterGraphNode import ru.dbotthepony.mc.otm.graph.matter.MatterNetworkGraph -import ru.dbotthepony.mc.otm.menu.MatterCapacitorBankMenu +import ru.dbotthepony.mc.otm.menu.MenuMatterCapacitor import ru.dbotthepony.mc.otm.set import javax.annotation.ParametersAreNonnullByDefault @@ -163,7 +163,7 @@ class BlockEntityMatterCapacitorBank(p_155229_: BlockPos, p_155230_: BlockState) } override fun createMenu(containerID: Int, inventory: Inventory, ply: Player): AbstractContainerMenu { - return MatterCapacitorBankMenu(containerID, inventory, this) + return MenuMatterCapacitor(containerID, inventory, this) } private var valid = true diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityMatterPanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityMatterPanel.kt index 76cfc3334..ccf74bee4 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityMatterPanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityMatterPanel.kt @@ -6,7 +6,7 @@ import net.minecraft.core.BlockPos import net.minecraft.core.Direction import net.minecraft.world.level.block.state.BlockState import ru.dbotthepony.mc.otm.capability.matter.IMatterTaskProvider -import ru.dbotthepony.mc.otm.menu.MatterPanelMenu +import ru.dbotthepony.mc.otm.menu.MenuMatterPanel import net.minecraft.world.entity.player.Inventory import net.minecraft.world.entity.player.Player import net.minecraft.world.inventory.AbstractContainerMenu @@ -38,18 +38,18 @@ import java.util.List class BlockEntityMatterPanel(p_155229_: BlockPos, p_155230_: BlockState) : BlockEntityMattery(Registry.BlockEntities.MATTER_PANEL, p_155229_, p_155230_), IMatterGraphNode, IMatterTaskProvider { - private val listeners = ArrayList() + private val listeners = ArrayList() private val node = Graph6Node(this) override fun getAsMatterNode(): Graph6Node { return node } - fun attachMenu(menu: MatterPanelMenu) { + fun attachMenu(menu: MenuMatterPanel) { listeners.add(menu) } - fun deatachMenu(menu: MatterPanelMenu) { + fun deatachMenu(menu: MenuMatterPanel) { listeners.remove(menu) } @@ -58,7 +58,7 @@ class BlockEntityMatterPanel(p_155229_: BlockPos, p_155230_: BlockState) : } override fun createMenu(containerID: Int, inventory: Inventory, ply: Player): AbstractContainerMenu { - return MatterPanelMenu(containerID, inventory, this) + return MenuMatterPanel(containerID, inventory, this) } private var valid = true @@ -121,7 +121,7 @@ class BlockEntityMatterPanel(p_155229_: BlockPos, p_155230_: BlockState) : if (!simulate) { val new = task.shrinkRequired(1) tasks[key] = new - listeners.forEach { menu: MatterPanelMenu -> menu.taskUpdated(new) } + listeners.forEach { menu: MenuMatterPanel -> menu.taskUpdated(new) } graph.onMatterTaskUpdated(new, task) setChanged() } @@ -145,12 +145,12 @@ class BlockEntityMatterPanel(p_155229_: BlockPos, p_155230_: BlockState) : if (localTask.required <= 0 && localTask.in_progress <= 0) { tasks.remove(task.id) graph?.onMatterTaskCreated(task) - listeners.forEach { menu: MatterPanelMenu -> menu.taskRemoved(localTask) } + listeners.forEach { menu: MenuMatterPanel -> menu.taskRemoved(localTask) } } else { // Задача обновлена tasks[task.id()] = localTask graph?.onMatterTaskUpdated(localTask, oldTask) - listeners.forEach { menu: MatterPanelMenu -> menu.taskUpdated(localTask) } + listeners.forEach { menu: MenuMatterPanel -> menu.taskUpdated(localTask) } } setChanged() @@ -193,7 +193,7 @@ class BlockEntityMatterPanel(p_155229_: BlockPos, p_155230_: BlockState) : (node.graph as MatterNetworkGraph?)?.onMatterTaskRemoved(task) - listeners.forEach { menu: MatterPanelMenu -> menu.taskRemoved(task) } + listeners.forEach { menu: MenuMatterPanel -> menu.taskRemoved(task) } setChanged() } @@ -205,7 +205,7 @@ class BlockEntityMatterPanel(p_155229_: BlockPos, p_155230_: BlockState) : (node.graph as MatterNetworkGraph?)?.onMatterTaskCreated(task) - listeners.forEach { menu: MatterPanelMenu -> menu.taskUpdated(task) } + listeners.forEach { menu: MenuMatterPanel -> menu.taskUpdated(task) } setChanged() return task @@ -216,7 +216,7 @@ class BlockEntityMatterPanel(p_155229_: BlockPos, p_155230_: BlockState) : for (task in tasks.values) { graph?.onMatterTaskRemoved(task!!) - listeners.forEach { menu: MatterPanelMenu -> menu.taskUpdated(task!!) } + listeners.forEach { menu: MenuMatterPanel -> menu.taskUpdated(task!!) } } tasks.clear() diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityMatterScanner.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityMatterScanner.kt index bea09ce87..63d18208a 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityMatterScanner.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityMatterScanner.kt @@ -28,7 +28,7 @@ import ru.dbotthepony.mc.otm.graph.Graph6Node import ru.dbotthepony.mc.otm.graph.matter.IMatterGraphNode import ru.dbotthepony.mc.otm.graph.matter.MatterNetworkGraph import ru.dbotthepony.mc.otm.matter.MatterRegistry -import ru.dbotthepony.mc.otm.menu.MatterScannerMenu +import ru.dbotthepony.mc.otm.menu.MenuMatterScanner import java.util.* class BlockEntityMatterScanner(p_155229_: BlockPos, p_155230_: BlockState) : @@ -98,7 +98,7 @@ class BlockEntityMatterScanner(p_155229_: BlockPos, p_155230_: BlockState) : } override fun createMenu(containerID: Int, inventory: Inventory, ply: Player): AbstractContainerMenu? { - return MatterScannerMenu(containerID, inventory, this) + return MenuMatterScanner(containerID, inventory, this) } override fun saveAdditional(nbt: CompoundTag) { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityPatternStorage.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityPatternStorage.kt index ecca095f7..2ebd69f68 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityPatternStorage.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityPatternStorage.kt @@ -15,7 +15,7 @@ import net.minecraftforge.items.CapabilityItemHandler import net.minecraft.world.entity.player.Inventory import net.minecraft.world.entity.player.Player import net.minecraft.world.inventory.AbstractContainerMenu -import ru.dbotthepony.mc.otm.menu.PatternStorageMenu +import ru.dbotthepony.mc.otm.menu.MenuPatternStorage import net.minecraft.MethodsReturnNonnullByDefault import net.minecraft.core.Direction import net.minecraft.network.chat.Component @@ -149,7 +149,7 @@ class BlockEntityPatternStorage(p_155229_: BlockPos, p_155230_: BlockState) : } override fun createMenu(containerID: Int, inventory: Inventory, ply: Player): AbstractContainerMenu { - return PatternStorageMenu(containerID, inventory, this) + return MenuPatternStorage(containerID, inventory, this) } override fun getStoredPatterns(): Collection { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityPlatePress.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityPlatePress.kt index 4de5507d5..dfea60ecd 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityPlatePress.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BlockEntityPlatePress.kt @@ -16,7 +16,7 @@ import ru.dbotthepony.mc.otm.capability.MatteryMachineEnergyStorage import ru.dbotthepony.mc.otm.container.MatteryContainer import ru.dbotthepony.mc.otm.container.MatteryContainerFilter import ru.dbotthepony.mc.otm.core.Fraction -import ru.dbotthepony.mc.otm.menu.PlatePressMenu +import ru.dbotthepony.mc.otm.menu.MenuPlatePress import ru.dbotthepony.mc.otm.set class BlockEntityPlatePress(p_155229_: BlockPos, p_155230_: BlockState) : BlockEntityMatteryWorker(Registry.BlockEntities.PLATE_PRESS, p_155229_, p_155230_) { @@ -49,7 +49,7 @@ class BlockEntityPlatePress(p_155229_: BlockPos, p_155230_: BlockState) : BlockE override fun getDefaultDisplayName() = NAME override fun createMenu(containerID: Int, inventory: Inventory, ply: Player): AbstractContainerMenu { - return PlatePressMenu(containerID, inventory, this) + return MenuPlatePress(containerID, inventory, this) } override fun onJobFinish(job: MachineJob): MachineJobStatus { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatterScannerScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatterScannerScreen.kt index 282c4e006..c27f7133e 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatterScannerScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatterScannerScreen.kt @@ -1,7 +1,7 @@ package ru.dbotthepony.mc.otm.client.screen import net.minecraft.network.chat.Component -import ru.dbotthepony.mc.otm.menu.MatterScannerMenu +import ru.dbotthepony.mc.otm.menu.MenuMatterScanner import net.minecraft.world.entity.player.Inventory import ru.dbotthepony.mc.otm.client.screen.panels.FramePanel import ru.dbotthepony.mc.otm.client.screen.panels.SlotPanel @@ -9,8 +9,8 @@ import ru.dbotthepony.mc.otm.client.screen.widget.PatternGaugePanel import ru.dbotthepony.mc.otm.client.screen.widget.PowerGaugePanel import ru.dbotthepony.mc.otm.client.screen.widget.ProgressGaugePanel -class MatterScannerScreen(p_97741_: MatterScannerMenu, p_97742_: Inventory, p_97743_: Component) : - MatteryScreen(p_97741_, p_97742_, p_97743_) { +class MatterScannerScreen(p_97741_: MenuMatterScanner, p_97742_: Inventory, p_97743_: Component) : + MatteryScreen(p_97741_, p_97742_, p_97743_) { override fun makeMainFrame(): FramePanel { val frame = super.makeMainFrame()!! diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/PatternStorageScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/PatternStorageScreen.kt index 993efd14d..e16e6aed5 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/PatternStorageScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/PatternStorageScreen.kt @@ -1,16 +1,14 @@ package ru.dbotthepony.mc.otm.client.screen import net.minecraft.network.chat.Component -import ru.dbotthepony.mc.otm.menu.PatternStorageMenu +import ru.dbotthepony.mc.otm.menu.MenuPatternStorage import net.minecraft.world.entity.player.Inventory -import ru.dbotthepony.mc.otm.client.screen.MatteryScreen import ru.dbotthepony.mc.otm.client.screen.panels.FramePanel import ru.dbotthepony.mc.otm.client.screen.panels.SlotPanel -import ru.dbotthepony.mc.otm.client.screen.widget.MatterGaugePanel import ru.dbotthepony.mc.otm.client.screen.widget.PatternGaugePanel -class PatternStorageScreen(p_97741_: PatternStorageMenu, p_97742_: Inventory, p_97743_: Component) : - MatteryScreen(p_97741_, p_97742_, p_97743_) { +class PatternStorageScreen(p_97741_: MenuPatternStorage, p_97742_: Inventory, p_97743_: Component) : + MatteryScreen(p_97741_, p_97742_, p_97743_) { override fun makeMainFrame(): FramePanel { val frame = super.makeMainFrame()!! diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/PlatePressScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/PlatePressScreen.kt index cf3fb4d4c..eaf3caada 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/PlatePressScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/PlatePressScreen.kt @@ -6,10 +6,10 @@ import ru.dbotthepony.mc.otm.client.screen.panels.FramePanel import ru.dbotthepony.mc.otm.client.screen.panels.SlotPanel import ru.dbotthepony.mc.otm.client.screen.widget.PowerGaugePanel import ru.dbotthepony.mc.otm.client.screen.widget.ProgressGaugePanel -import ru.dbotthepony.mc.otm.menu.PlatePressMenu +import ru.dbotthepony.mc.otm.menu.MenuPlatePress -class PlatePressScreen(menu: PlatePressMenu, inventory: Inventory, title: Component) : - MatteryScreen(menu, inventory, title) { +class PlatePressScreen(menu: MenuPlatePress, inventory: Inventory, title: Component) : + MatteryScreen(menu, inventory, title) { override fun makeMainFrame(): FramePanel { val frame = super.makeMainFrame()!! diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/AndroidStationScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenAndroidStation.kt similarity index 96% rename from src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/AndroidStationScreen.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenAndroidStation.kt index caacbbd83..f559d0299 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/AndroidStationScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenAndroidStation.kt @@ -19,12 +19,12 @@ import ru.dbotthepony.mc.otm.client.screen.widget.PowerGaugePanel import ru.dbotthepony.mc.otm.menu.AndroidStationMenu import java.util.* -class AndroidStationScreen constructor(p_97741_: AndroidStationMenu, p_97742_: Inventory, p_97743_: Component) : +class ScreenAndroidStation constructor(p_97741_: AndroidStationMenu, p_97742_: Inventory, p_97743_: Component) : MatteryScreen(p_97741_, p_97742_, p_97743_) { internal inner class AndroidResearchButton(parent: EditablePanel?, private val node: AndroidResearch) : EditablePanel( - this@AndroidStationScreen, + this@ScreenAndroidStation, parent, 0f, 0f, @@ -103,7 +103,7 @@ class AndroidStationScreen constructor(p_97741_: AndroidStationMenu, p_97742_: I seen.add(research) if (rows[level] == null) { - rows[level] = object : EditablePanel(this@AndroidStationScreen, canvas, 0f, (level * 22).toFloat(), 10000f, 22f) { + rows[level] = object : EditablePanel(this@ScreenAndroidStation, canvas, 0f, (level * 22).toFloat(), 10000f, 22f) { override fun mouseClickedInner(mouse_x: Double, mouse_y: Double, flag: Int) = false override fun mouseReleasedInner(mouse_x: Double, mouse_y: Double, flag: Int) = false override fun mouseDraggedInner(mouse_x: Double, mouse_y: Double, flag: Int, drag_x: Double, drag_y: Double) = false @@ -138,7 +138,7 @@ class AndroidStationScreen constructor(p_97741_: AndroidStationMenu, p_97742_: I research = FramePanel(this, null, 0f, 0f, window.guiScaledWidth * 0.8f, window.guiScaledHeight * 0.8f, TranslatableComponent("otm.gui.android_research")) - canvas = object : DraggableCanvasPanel(this@AndroidStationScreen, research, width = (GRID_WIDTH * 22).toFloat(), height = 0f) { + canvas = object : DraggableCanvasPanel(this@ScreenAndroidStation, research, width = (GRID_WIDTH * 22).toFloat(), height = 0f) { override fun innerRender(stack: PoseStack, mouse_x: Float, mouse_y: Float, flag: Float) { RenderHelper.setDrawColor(RGBAColor.BLACK) RenderHelper.drawRect(stack, 0f, 0f, width, height) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/BatteryBankScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenBatteryBank.kt similarity index 87% rename from src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/BatteryBankScreen.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenBatteryBank.kt index c2e0c1926..f97136c47 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/BatteryBankScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenBatteryBank.kt @@ -3,12 +3,11 @@ package ru.dbotthepony.mc.otm.client.screen import net.minecraft.network.chat.Component import ru.dbotthepony.mc.otm.menu.BatteryBankMenu import net.minecraft.world.entity.player.Inventory -import ru.dbotthepony.mc.otm.client.screen.MatteryScreen import ru.dbotthepony.mc.otm.client.screen.panels.FramePanel import ru.dbotthepony.mc.otm.client.screen.panels.SlotPanel import ru.dbotthepony.mc.otm.client.screen.widget.PowerGaugePanel -class BatteryBankScreen(menu: BatteryBankMenu, p_97742_: Inventory, p_97743_: Component) : +class ScreenBatteryBank(menu: BatteryBankMenu, p_97742_: Inventory, p_97743_: Component) : MatteryScreen(menu, p_97742_, p_97743_) { override fun makeMainFrame(): FramePanel{ diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ChemicalGeneratorScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenChemicalGenerator.kt similarity index 83% rename from src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ChemicalGeneratorScreen.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenChemicalGenerator.kt index 676fcd11f..86fef4784 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ChemicalGeneratorScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenChemicalGenerator.kt @@ -6,9 +6,9 @@ import net.minecraft.world.entity.player.Inventory import ru.dbotthepony.mc.otm.client.screen.panels.* import ru.dbotthepony.mc.otm.client.screen.widget.PowerGaugePanel import ru.dbotthepony.mc.otm.client.screen.widget.ProgressGaugePanel -import ru.dbotthepony.mc.otm.menu.ChemicalGeneratorMenu +import ru.dbotthepony.mc.otm.menu.MenuCHemicalGenerator -class ChemicalGeneratorScreen(menu: ChemicalGeneratorMenu, inventory: Inventory, title: Component) : MatteryScreen(menu, inventory, title) { +class ScreenChemicalGenerator(menu: MenuCHemicalGenerator, inventory: Inventory, title: Component) : MatteryScreen(menu, inventory, title) { override fun makeMainFrame(): FramePanel { val frame = super.makeMainFrame()!! diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/DriveRackScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenDriveRack.kt similarity index 83% rename from src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/DriveRackScreen.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenDriveRack.kt index 007069519..9362bd30c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/DriveRackScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenDriveRack.kt @@ -1,14 +1,14 @@ package ru.dbotthepony.mc.otm.client.screen import net.minecraft.network.chat.Component -import ru.dbotthepony.mc.otm.menu.DriveRackMenu +import ru.dbotthepony.mc.otm.menu.MenuDriveRack import net.minecraft.world.entity.player.Inventory import ru.dbotthepony.mc.otm.client.screen.panels.FramePanel import ru.dbotthepony.mc.otm.client.screen.panels.SlotPanel import ru.dbotthepony.mc.otm.client.screen.widget.PowerGaugePanel -class DriveRackScreen(menu: DriveRackMenu, inventory: Inventory, title: Component) : - MatteryScreen(menu, inventory, title) { +class ScreenDriveRack(menu: MenuDriveRack, inventory: Inventory, title: Component) : + MatteryScreen(menu, inventory, title) { override fun makeMainFrame(): FramePanel { val frame = super.makeMainFrame()!! diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/DriveViewerScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenDriveViewer.kt similarity index 88% rename from src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/DriveViewerScreen.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenDriveViewer.kt index 127d850f2..206f763a7 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/DriveViewerScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenDriveViewer.kt @@ -7,13 +7,13 @@ import net.minecraft.world.item.ItemStack import ru.dbotthepony.mc.otm.client.screen.panels.* import ru.dbotthepony.mc.otm.client.screen.widget.PowerGaugePanel import ru.dbotthepony.mc.otm.item.ItemPortableCondensationDrive.FilterSettings -import ru.dbotthepony.mc.otm.menu.DriveViewerMenu -import ru.dbotthepony.mc.otm.menu.DriveViewerMenu.FilterSetPacket -import ru.dbotthepony.mc.otm.menu.DriveViewerMenu.FilterSwitchPacket +import ru.dbotthepony.mc.otm.menu.MenuDriveViewer +import ru.dbotthepony.mc.otm.menu.MenuDriveViewer.FilterSetPacket +import ru.dbotthepony.mc.otm.menu.MenuDriveViewer.FilterSwitchPacket import ru.dbotthepony.mc.otm.network.MatteryNetworking -class DriveViewerScreen(menu: DriveViewerMenu, inventory: Inventory, title: Component) : - MatteryScreen(menu, inventory, title) { +class ScreenDriveViewer(menu: MenuDriveViewer, inventory: Inventory, title: Component) : + MatteryScreen(menu, inventory, title) { override fun makeMainFrame(): FramePanel { val frame = FramePanel(this, null, 0f, 0f, FRAME_WIDTH, FRAME_HEIGHT, getTitle()) @@ -59,7 +59,7 @@ class DriveViewerScreen(menu: DriveViewerMenu, inventory: Inventory, title: Comp views.add(scroll_bar) for (i in 0 until GRID_WIDTH * GRID_HEIGHT) { - object : AbstractSlotPanel(this@DriveViewerScreen, grid, 0f, 0f) { + object : AbstractSlotPanel(this@ScreenDriveViewer, grid, 0f, 0f) { override fun getItemStack(): ItemStack { val index = i + scroll_bar.getScroll(menu.view.getItems().size / GRID_WIDTH) val list = menu.view.getItems() @@ -91,7 +91,7 @@ class DriveViewerScreen(menu: DriveViewerMenu, inventory: Inventory, title: Comp settings.add(grid_filter) for (i in 0 until FilterSettings.MAX_FILTERS) { - object : AbstractSlotPanel(this@DriveViewerScreen, grid_filter, 0f, 0f) { + object : AbstractSlotPanel(this@ScreenDriveViewer, grid_filter, 0f, 0f) { override fun getItemStack(): ItemStack { val filter = menu.getFilter() ?: return ItemStack.EMPTY return filter.items[i] @@ -118,7 +118,7 @@ class DriveViewerScreen(menu: DriveViewerMenu, inventory: Inventory, title: Comp val yes = TranslatableComponent("otm.filter.yes") val matchNbt = - object : ButtonPanel(this@DriveViewerScreen, dock_left, 0f, 0f, 90f, 20f, TranslatableComponent("otm.filter.match_nbt", no)) { + object : ButtonPanel(this@ScreenDriveViewer, dock_left, 0f, 0f, 90f, 20f, TranslatableComponent("otm.filter.match_nbt", no)) { override fun tick() { super.tick() @@ -140,7 +140,7 @@ class DriveViewerScreen(menu: DriveViewerMenu, inventory: Inventory, title: Comp null, FilterSwitchPacket( menu.containerId, - DriveViewerMenu.FilterSwitch.MATCH_NBT, + MenuDriveViewer.FilterSwitch.MATCH_NBT, !filter.matchNbt ) ) @@ -150,7 +150,7 @@ class DriveViewerScreen(menu: DriveViewerMenu, inventory: Inventory, title: Comp } val matchTag = - object : ButtonPanel(this@DriveViewerScreen, dock_left, 0f, 0f, 90f, 20f, TranslatableComponent("otm.filter.match_tag", no)) { + object : ButtonPanel(this@ScreenDriveViewer, dock_left, 0f, 0f, 90f, 20f, TranslatableComponent("otm.filter.match_tag", no)) { override fun tick() { super.tick() @@ -173,7 +173,7 @@ class DriveViewerScreen(menu: DriveViewerMenu, inventory: Inventory, title: Comp null, FilterSwitchPacket( menu.containerId, - DriveViewerMenu.FilterSwitch.MATCH_TAG, + MenuDriveViewer.FilterSwitch.MATCH_TAG, !filter.matchTag ) ) @@ -183,7 +183,7 @@ class DriveViewerScreen(menu: DriveViewerMenu, inventory: Inventory, title: Comp } val blacklist = - object : ButtonPanel(this@DriveViewerScreen, dock_left, 0f, 0f, 90f, 20f, TranslatableComponent("otm.filter.blacklist", no)) { + object : ButtonPanel(this@ScreenDriveViewer, dock_left, 0f, 0f, 90f, 20f, TranslatableComponent("otm.filter.blacklist", no)) { override fun tick() { super.tick() @@ -204,7 +204,7 @@ class DriveViewerScreen(menu: DriveViewerMenu, inventory: Inventory, title: Comp null, FilterSwitchPacket( menu.containerId, - DriveViewerMenu.FilterSwitch.BLACKLIST, + MenuDriveViewer.FilterSwitch.BLACKLIST, !filter.isBlacklist ) ) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/EnergyCounterScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenEnergyCounter.kt similarity index 78% rename from src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/EnergyCounterScreen.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenEnergyCounter.kt index e6d643f8b..6012ac7bf 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/EnergyCounterScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenEnergyCounter.kt @@ -6,14 +6,14 @@ import net.minecraft.world.entity.player.Inventory import ru.dbotthepony.mc.otm.client.screen.panels.Dock import ru.dbotthepony.mc.otm.client.screen.panels.FramePanel import ru.dbotthepony.mc.otm.client.screen.panels.Label -import ru.dbotthepony.mc.otm.menu.EnergyCounterMenu +import ru.dbotthepony.mc.otm.menu.MenuEnergyCounter import ru.dbotthepony.mc.otm.menu.FormattingHelper -class EnergyCounterScreen(menu: EnergyCounterMenu, inventory: Inventory, title: Component) : MatteryScreen(menu, inventory, title) { +class ScreenEnergyCounter(menu: MenuEnergyCounter, inventory: Inventory, title: Component) : MatteryScreen(menu, inventory, title) { override fun makeMainFrame(): FramePanel { val frame = super.makeMainFrame()!! - var label: Label = object : Label(this@EnergyCounterScreen, frame) { + var label: Label = object : Label(this@ScreenEnergyCounter, frame) { override fun tick() { super.tick() setText( @@ -28,7 +28,7 @@ class EnergyCounterScreen(menu: EnergyCounterMenu, inventory: Inventory, title: label.dock = Dock.TOP label.setDockMargin(4f, 0f, 0f, 0f) - label = object : Label(this@EnergyCounterScreen, frame) { + label = object : Label(this@ScreenEnergyCounter, frame) { override fun tick() { super.tick() setText( @@ -43,7 +43,7 @@ class EnergyCounterScreen(menu: EnergyCounterMenu, inventory: Inventory, title: label.dock = Dock.TOP label.setDockMargin(4f, 0f, 0f, 0f) - label = object : Label(this@EnergyCounterScreen, frame) { + label = object : Label(this@ScreenEnergyCounter, frame) { override fun tick() { super.tick() setText( @@ -58,7 +58,7 @@ class EnergyCounterScreen(menu: EnergyCounterMenu, inventory: Inventory, title: label.dock = Dock.TOP label.setDockMargin(4f, 0f, 0f, 0f) - label = object : Label(this@EnergyCounterScreen, frame) { + label = object : Label(this@ScreenEnergyCounter, frame) { override fun tick() { super.tick() setText( diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ItemMonitorScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenItemMonitor.kt similarity index 87% rename from src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ItemMonitorScreen.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenItemMonitor.kt index 2a489877c..ac63afa99 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ItemMonitorScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenItemMonitor.kt @@ -5,10 +5,10 @@ import net.minecraft.world.entity.player.Inventory import net.minecraft.world.item.ItemStack import ru.dbotthepony.mc.otm.client.screen.panels.* import ru.dbotthepony.mc.otm.client.screen.widget.PowerGaugePanel -import ru.dbotthepony.mc.otm.menu.ItemMonitorMenu +import ru.dbotthepony.mc.otm.menu.MenuItemMonitor -class ItemMonitorScreen(menu: ItemMonitorMenu, inventory: Inventory, title: Component) : - MatteryScreen(menu, inventory, title) { +class ScreenItemMonitor(menu: MenuItemMonitor, inventory: Inventory, title: Component) : + MatteryScreen(menu, inventory, title) { override fun makeMainFrame(): FramePanel { val frame = FramePanel(this, null, 0f, 0f, FRAME_WIDTH, FRAME_HEIGHT, getTitle()) @@ -22,7 +22,7 @@ class ItemMonitorScreen(menu: ItemMonitorMenu, inventory: Inventory, title: Comp val gridPanel = GridPanel(this, frame, 28f, 16f, GRID_WIDTH * 18f, GRID_HEIGHT * 18f, GRID_WIDTH, GRID_HEIGHT) for (i in 0 until GRID_WIDTH * GRID_HEIGHT) { - object : AbstractSlotPanel(this@ItemMonitorScreen, gridPanel) { + object : AbstractSlotPanel(this@ScreenItemMonitor, gridPanel) { override fun getItemStack(): ItemStack { val index = i + scrollBar.getScroll(menu.view.getItemCount() / GRID_WIDTH) val list = menu.view.getItems() diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatterBottlerScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenMatterBottler.kt similarity index 90% rename from src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatterBottlerScreen.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenMatterBottler.kt index e3341e4f2..942b35b35 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatterBottlerScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenMatterBottler.kt @@ -9,10 +9,10 @@ import ru.dbotthepony.mc.otm.client.screen.panels.SlotPanel import ru.dbotthepony.mc.otm.client.screen.widget.MatterGaugePanel import ru.dbotthepony.mc.otm.client.screen.widget.PowerGaugePanel import ru.dbotthepony.mc.otm.client.screen.widget.ProgressGaugePanel -import ru.dbotthepony.mc.otm.menu.MatterBottlerMenu +import ru.dbotthepony.mc.otm.menu.MenuMatterBottler -class MatterBottlerScreen(menu: MatterBottlerMenu, inventory: Inventory, title: Component) : - MatteryScreen(menu, inventory, title) { +class ScreenMatterBottler(menu: MenuMatterBottler, inventory: Inventory, title: Component) : + MatteryScreen(menu, inventory, title) { private var progress: ProgressGaugePanel? = null diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatterCapacitorBankScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenMatterCapacitorBank.kt similarity index 77% rename from src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatterCapacitorBankScreen.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenMatterCapacitorBank.kt index df93334cf..2353fef21 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatterCapacitorBankScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenMatterCapacitorBank.kt @@ -1,14 +1,14 @@ package ru.dbotthepony.mc.otm.client.screen import net.minecraft.network.chat.Component -import ru.dbotthepony.mc.otm.menu.MatterCapacitorBankMenu +import ru.dbotthepony.mc.otm.menu.MenuMatterCapacitor import net.minecraft.world.entity.player.Inventory import ru.dbotthepony.mc.otm.client.screen.panels.FramePanel import ru.dbotthepony.mc.otm.client.screen.panels.SlotPanel import ru.dbotthepony.mc.otm.client.screen.widget.MatterGaugePanel -class MatterCapacitorBankScreen(p_97741_: MatterCapacitorBankMenu, p_97742_: Inventory, p_97743_: Component) : - MatteryScreen(p_97741_, p_97742_, p_97743_) { +class ScreenMatterCapacitorBank(p_97741_: MenuMatterCapacitor, p_97742_: Inventory, p_97743_: Component) : + MatteryScreen(p_97741_, p_97742_, p_97743_) { override fun makeMainFrame(): FramePanel { val frame = super.makeMainFrame()!! diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatterDecomposerScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenMatterDecomposer.kt similarity index 94% rename from src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatterDecomposerScreen.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenMatterDecomposer.kt index 802880ae7..39634278b 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatterDecomposerScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenMatterDecomposer.kt @@ -9,7 +9,7 @@ import ru.dbotthepony.mc.otm.client.screen.widget.MatterGaugePanel import ru.dbotthepony.mc.otm.client.screen.widget.PowerGaugePanel import ru.dbotthepony.mc.otm.client.screen.widget.ProgressGaugePanel -class MatterDecomposerScreen(p_97741_: MatterDecomposerMenu, p_97742_: Inventory, p_97743_: Component) : +class ScreenMatterDecomposer(p_97741_: MatterDecomposerMenu, p_97742_: Inventory, p_97743_: Component) : MatteryScreen(p_97741_, p_97742_, p_97743_) { override fun makeMainFrame(): FramePanel { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatterReplicatorScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenMatterReplicator.kt similarity index 94% rename from src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatterReplicatorScreen.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenMatterReplicator.kt index 9aa7fec29..329e0c469 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatterReplicatorScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ScreenMatterReplicator.kt @@ -9,7 +9,7 @@ import ru.dbotthepony.mc.otm.client.screen.widget.MatterGaugePanel import ru.dbotthepony.mc.otm.client.screen.widget.PowerGaugePanel import ru.dbotthepony.mc.otm.client.screen.widget.ProgressGaugePanel -class MatterReplicatorScreen(p_97741_: MatterReplicatorMenu, p_97742_: Inventory, p_97743_: Component) : +class ScreenMatterReplicator(p_97741_: MatterReplicatorMenu, p_97742_: Inventory, p_97743_: Component) : MatteryScreen(p_97741_, p_97742_, p_97743_) { override fun makeMainFrame(): FramePanel { val frame = super.makeMainFrame()!! diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/AndroidStationMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuAndroidStation.kt similarity index 95% rename from src/main/kotlin/ru/dbotthepony/mc/otm/menu/AndroidStationMenu.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuAndroidStation.kt index 66ee0c58f..43317488b 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/AndroidStationMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuAndroidStation.kt @@ -33,7 +33,7 @@ class AndroidStationMenu @JvmOverloads constructor( containerID: Int, inventory: Inventory, tile: BlockEntityAndroidStation? = null -) : PoweredMatteryMenu(Registry.Menus.ANDROID_STATION, containerID, inventory, tile) { +) : MenuMatteryPowered(Registry.Menus.ANDROID_STATION, containerID, inventory, tile) { val androidBattery: MatterySlot = AndroidBatterySlot(AndroidStationContainer(inventory.player), 0) init { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/ChemicalGeneratorMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuCHemicalGenerator.kt similarity index 96% rename from src/main/kotlin/ru/dbotthepony/mc/otm/menu/ChemicalGeneratorMenu.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuCHemicalGenerator.kt index bc7c819ca..dc9584ac1 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/ChemicalGeneratorMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuCHemicalGenerator.kt @@ -11,7 +11,7 @@ import ru.dbotthepony.mc.otm.menu.data.IntDataContainer import ru.dbotthepony.mc.otm.menu.widget.LevelGaugeWidget import ru.dbotthepony.mc.otm.menu.widget.ProgressGaugeWidget -class ChemicalGeneratorMenu @JvmOverloads constructor(id: Int, inv: Inventory, tile: BlockEntityChemicalGenerator? = null) +class MenuCHemicalGenerator @JvmOverloads constructor(id: Int, inv: Inventory, tile: BlockEntityChemicalGenerator? = null) : MatteryMenu(Registry.Menus.CHEMICAL_GENERATOR, id, inv, tile) { val container = tile?.container ?: SimpleContainer(3) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/DriveRackMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuDriveRack.kt similarity index 86% rename from src/main/kotlin/ru/dbotthepony/mc/otm/menu/DriveRackMenu.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuDriveRack.kt index 942c7c7ae..94e0184c4 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/DriveRackMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuDriveRack.kt @@ -5,11 +5,11 @@ import net.minecraft.world.entity.player.Inventory import ru.dbotthepony.mc.otm.Registry import ru.dbotthepony.mc.otm.block.entity.BlockEntityDriveRack -class DriveRackMenu @JvmOverloads constructor( +class MenuDriveRack @JvmOverloads constructor( p_38852_: Int, inventory: Inventory, tile: BlockEntityDriveRack? = null -) : PoweredMatteryMenu(Registry.Menus.DRIVE_RACK, p_38852_, inventory, tile) { +) : MenuMatteryPowered(Registry.Menus.DRIVE_RACK, p_38852_, inventory, tile) { val drives = arrayOfNulls(4) init { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/DriveViewerMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuDriveViewer.kt similarity index 96% rename from src/main/kotlin/ru/dbotthepony/mc/otm/menu/DriveViewerMenu.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuDriveViewer.kt index bdd795bb0..c8c465127 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/DriveViewerMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuDriveViewer.kt @@ -19,11 +19,11 @@ import ru.dbotthepony.mc.otm.storage.ItemStackWrapper import ru.dbotthepony.mc.otm.storage.PoweredVirtualComponent import java.util.function.Supplier -class DriveViewerMenu @JvmOverloads constructor( +class MenuDriveViewer @JvmOverloads constructor( containerID: Int, inventory: Inventory, tile: BlockEntityDriveViewer? = null -) : PoweredMatteryMenu( +) : MenuMatteryPowered( Registry.Menus.DRIVE_VIEWER, containerID, inventory, tile ), INetworkedItemViewSupplier { @JvmField val view: NetworkedItemView @@ -167,7 +167,7 @@ class DriveViewerMenu @JvmOverloads constructor( val ply = context.get().sender!! val menu = ply.containerMenu - if (menu is DriveViewerMenu && menu.containerId == id) { + if (menu is MenuDriveViewer && menu.containerId == id) { if (menu.driveSlot.item.isEmpty) return@enqueueWork @@ -204,7 +204,7 @@ class DriveViewerMenu @JvmOverloads constructor( val ply = context.get().sender!! val menu = ply.containerMenu - if (menu is DriveViewerMenu && menu.containerId == id) { + if (menu is MenuDriveViewer && menu.containerId == id) { val settings = menu.getFilter() ?: return@enqueueWork when (type) { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/EnergyCounterMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuEnergyCounter.kt similarity index 96% rename from src/main/kotlin/ru/dbotthepony/mc/otm/menu/EnergyCounterMenu.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuEnergyCounter.kt index 2d6ad0bfd..880a377a0 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/EnergyCounterMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuEnergyCounter.kt @@ -6,7 +6,7 @@ import ru.dbotthepony.mc.otm.Registry import ru.dbotthepony.mc.otm.block.entity.BlockEntityEnergyCounter import ru.dbotthepony.mc.otm.menu.data.FractionDataContainer -class EnergyCounterMenu @JvmOverloads constructor( +class MenuEnergyCounter @JvmOverloads constructor( p_38852_: Int, inventory: Inventory, tile: BlockEntityEnergyCounter? = null diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/ItemMonitorMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuItemMonitor.kt similarity index 91% rename from src/main/kotlin/ru/dbotthepony/mc/otm/menu/ItemMonitorMenu.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuItemMonitor.kt index 2da42ded7..afd6cdc23 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/ItemMonitorMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuItemMonitor.kt @@ -5,7 +5,6 @@ import net.minecraft.world.entity.player.Player import net.minecraft.world.item.ItemStack import ru.dbotthepony.mc.otm.Registry import ru.dbotthepony.mc.otm.block.entity.BlockEntityItemMonitor -import ru.dbotthepony.mc.otm.capability.IMatteryEnergyStorage import ru.dbotthepony.mc.otm.capability.MatteryCapability import ru.dbotthepony.mc.otm.menu.data.INetworkedItemViewSupplier import ru.dbotthepony.mc.otm.menu.data.NetworkedItemView @@ -13,11 +12,11 @@ import ru.dbotthepony.mc.otm.storage.ItemStackWrapper import ru.dbotthepony.mc.otm.storage.PoweredVirtualComponent import ru.dbotthepony.mc.otm.storage.VirtualComponent -class ItemMonitorMenu @JvmOverloads constructor( +class MenuItemMonitor @JvmOverloads constructor( p_38852_: Int, inventory: Inventory, tile: BlockEntityItemMonitor? = null -) : PoweredMatteryMenu(Registry.Menus.ITEM_MONITOR, p_38852_, inventory, tile), INetworkedItemViewSupplier { +) : MenuMatteryPowered(Registry.Menus.ITEM_MONITOR, p_38852_, inventory, tile), INetworkedItemViewSupplier { @JvmField val view = NetworkedItemView(inventory.player, this, tile == null) private val subscribed: VirtualComponent? diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatterBottlerMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuMatterBottler.kt similarity index 96% rename from src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatterBottlerMenu.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuMatterBottler.kt index c6e1785ec..c01d2dca8 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatterBottlerMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuMatterBottler.kt @@ -13,11 +13,11 @@ import ru.dbotthepony.mc.otm.menu.widget.ProgressGaugeWidget import ru.dbotthepony.mc.otm.network.MatterBottlerSwitchPacket import ru.dbotthepony.mc.otm.network.MatteryNetworking -class MatterBottlerMenu @JvmOverloads constructor( +class MenuMatterBottler @JvmOverloads constructor( p_38852_: Int, inventory: Inventory, tile: BlockEntityMatterBottler? = null -) : PoweredMatteryMenu( +) : MenuMatteryPowered( Registry.Menus.MATTER_BOTTLER, p_38852_, inventory, tile ) { var workFlow = BooleanDataContainer() diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatterCapacitorBankMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuMatterCapacitor.kt similarity index 96% rename from src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatterCapacitorBankMenu.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuMatterCapacitor.kt index 1ee4a81cb..74504d1a5 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatterCapacitorBankMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuMatterCapacitor.kt @@ -8,7 +8,7 @@ import ru.dbotthepony.mc.otm.core.Fraction import ru.dbotthepony.mc.otm.graph.matter.MatterNetworkGraph import ru.dbotthepony.mc.otm.menu.widget.LevelGaugeWidget -class MatterCapacitorBankMenu @JvmOverloads constructor( +class MenuMatterCapacitor @JvmOverloads constructor( p_38852_: Int, inventory: Inventory, tile: BlockEntityMatterCapacitorBank? = null diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatterPanelMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuMatterPanel.kt similarity index 98% rename from src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatterPanelMenu.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuMatterPanel.kt index 1ad8167cb..99904d883 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatterPanelMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuMatterPanel.kt @@ -18,7 +18,7 @@ import ru.dbotthepony.mc.otm.network.PatternGridPacket import java.util.* import java.util.function.Consumer -class MatterPanelMenu @JvmOverloads constructor( +class MenuMatterPanel @JvmOverloads constructor( p_38852_: Int, inventory: Inventory, tile: BlockEntityMatterPanel? = null diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatterScannerMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuMatterScanner.kt similarity index 95% rename from src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatterScannerMenu.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuMatterScanner.kt index d37272cb7..de9783765 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatterScannerMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuMatterScanner.kt @@ -12,11 +12,11 @@ import ru.dbotthepony.mc.otm.core.Fraction import ru.dbotthepony.mc.otm.matter.MatterRegistry import java.math.BigInteger -class MatterScannerMenu @JvmOverloads constructor( +class MenuMatterScanner @JvmOverloads constructor( p_38852_: Int, inventory: Inventory, tile: BlockEntityMatterScanner? = null -) : PoweredMatteryMenu( +) : MenuMatteryPowered( Registry.Menus.MATTER_SCANNER, p_38852_, inventory, tile ) { val input: MatterySlot diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatteryMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuMattery.kt similarity index 100% rename from src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatteryMenu.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuMattery.kt diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/PoweredMatteryMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuMatteryPowered.kt similarity index 94% rename from src/main/kotlin/ru/dbotthepony/mc/otm/menu/PoweredMatteryMenu.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuMatteryPowered.kt index 2165ac962..e676de95c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/PoweredMatteryMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuMatteryPowered.kt @@ -7,7 +7,7 @@ import ru.dbotthepony.mc.otm.menu.widget.LevelGaugeWidget import ru.dbotthepony.mc.otm.capability.MatteryCapability import net.minecraft.world.SimpleContainer -abstract class PoweredMatteryMenu protected constructor( +abstract class MenuMatteryPowered protected constructor( menuType: MenuType<*>, containerID: Int, inventory: Inventory, diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/PatternStorageMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuPatternStorage.kt similarity index 96% rename from src/main/kotlin/ru/dbotthepony/mc/otm/menu/PatternStorageMenu.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuPatternStorage.kt index 664ee897a..3d8d00573 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/PatternStorageMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuPatternStorage.kt @@ -8,7 +8,7 @@ import ru.dbotthepony.mc.otm.core.Fraction import ru.dbotthepony.mc.otm.graph.matter.MatterNetworkGraph import ru.dbotthepony.mc.otm.menu.widget.LevelGaugeWidget -class PatternStorageMenu @JvmOverloads constructor( +class MenuPatternStorage @JvmOverloads constructor( p_38852_: Int, inventory: Inventory?, tile: BlockEntityPatternStorage? = null diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/PlatePressMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuPlatePress.kt similarity index 88% rename from src/main/kotlin/ru/dbotthepony/mc/otm/menu/PlatePressMenu.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuPlatePress.kt index 23e03f6de..c144f553d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/PlatePressMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MenuPlatePress.kt @@ -6,11 +6,11 @@ import ru.dbotthepony.mc.otm.Registry import ru.dbotthepony.mc.otm.block.entity.BlockEntityPlatePress import ru.dbotthepony.mc.otm.menu.widget.ProgressGaugeWidget -class PlatePressMenu @JvmOverloads constructor( +class MenuPlatePress @JvmOverloads constructor( containerID: Int, inventory: Inventory, tile: BlockEntityPlatePress? = null -) : PoweredMatteryMenu(Registry.Menus.PLATE_PRESS, containerID, inventory, tile) { +) : MenuMatteryPowered(Registry.Menus.PLATE_PRESS, containerID, inventory, tile) { val container = tile?.container ?: SimpleContainer(2) val inputSlot = MatterySlot(container, BlockEntityPlatePress.SLOT_INPUT)