mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-15 17:44:46 +00:00
Add LevelMaintainerTerminal rework logic inside TileLevelMaintainer (#162)
* Use new interface terminal API * Update dependencies.gradle * feat: Update core hooks and integrations * api: Add `LevelTerminalRegistry` functionality * feat: Use `customName` to display in `GuiFluidLevelEmitter` * feat: Rework scheduling and data storage in `TileLevelMaintainer` functionality * feat: Add new item `LevelTerminal` * feat: Support back navigation functionality * feat: add back navigation in `LevelMaintainer` from terminal * use `IGuiTooltipHandler` directly from ae2 include #160 * fix correct `InterfaceTerminalSupportedClassProvider` deprecation * Implement new version of `InterfaceWireless` based on `InterfaceTerminal` * Fix `LevelTerminal` data recursion and few in fixes gui * Use `aeRenderItem` directly and fix `zIndex` in custom slots * Fix rendering numbers bigger than 2.1G through `aeRenderItem` * Fix fails on `getCraftingItem` no root cause was found * Fix add packet logging and try to not fail after receive corrupted packet * Fix add logging around empty configuration * Fix packet corruption and log invalid data * Fix packet corruption with level emitters * Correct handle overwrite packet * Fix intercept dnd click from GT5 hook for `AppEngGuiHandler` keyword `net.bdew.neiaddons.appeng.AppEngGuiHandler` * update be+deps * Update dependencies.gradle * Update dependencies.gradle * Fix `zIndexes` for compatability with `DuraDisplay` * Update AE2 and fix compatability * Change `ForgeDirection` side serialization to `byte` * Fix tooltip zIndexes * Rename all rest parts related to `Level terminal` * Code cleanup after review * Remove duplicated dependency declaration --------- Co-authored-by: Firenoo <[email protected]> Co-authored-by: Martin Robertz <[email protected]>
This commit is contained in:
80 files changed
+6169
-1785
No files matched your search
@@ -12,16 +12,19 @@ import com.glodblock.github.network.CPacketFluidPatternTermBtns;
|
||||
import com.glodblock.github.network.CPacketFluidUpdate;
|
||||
import com.glodblock.github.network.CPacketInventoryAction;
|
||||
import com.glodblock.github.network.CPacketLevelMaintainer;
|
||||
import com.glodblock.github.network.CPacketLevelTerminalCommands;
|
||||
import com.glodblock.github.network.CPacketPatternValueSet;
|
||||
import com.glodblock.github.network.CPacketRenamer;
|
||||
import com.glodblock.github.network.CPacketSwitchGuis;
|
||||
import com.glodblock.github.network.CPacketTransferRecipe;
|
||||
import com.glodblock.github.network.CPacketValueConfig;
|
||||
import com.glodblock.github.network.SPacketFluidUpdate;
|
||||
import com.glodblock.github.network.SPacketLevelTerminalUpdate;
|
||||
import com.glodblock.github.network.SPacketMEFluidInvUpdate;
|
||||
import com.glodblock.github.network.SPacketMEItemInvUpdate;
|
||||
import com.glodblock.github.network.SPacketSetItemAmount;
|
||||
import com.glodblock.github.network.SPacketStringUpdate;
|
||||
import com.glodblock.github.network.wrapper.FCNetworkWrapper;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
@@ -30,51 +33,49 @@ public class ChannelLoader implements Runnable {
|
||||
public static final ChannelLoader INSTANCE = new ChannelLoader();
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("all")
|
||||
public void run() {
|
||||
int id = 0;
|
||||
FluidCraft.proxy.netHandler
|
||||
.registerMessage(new CPacketSwitchGuis.Handler(), CPacketSwitchGuis.class, id++, Side.SERVER);
|
||||
FluidCraft.proxy.netHandler.registerMessage(
|
||||
FCNetworkWrapper netHandler = FluidCraft.proxy.netHandler;
|
||||
netHandler.registerMessage(new CPacketSwitchGuis.Handler(), CPacketSwitchGuis.class, id++, Side.SERVER);
|
||||
netHandler.registerMessage(
|
||||
new CPacketFluidPatternTermBtns.Handler(),
|
||||
CPacketFluidPatternTermBtns.class,
|
||||
id++,
|
||||
Side.SERVER);
|
||||
FluidCraft.proxy.netHandler
|
||||
.registerMessage(new CPacketEncodePattern.Handler(), CPacketEncodePattern.class, id++, Side.SERVER);
|
||||
FluidCraft.proxy.netHandler
|
||||
netHandler.registerMessage(new CPacketEncodePattern.Handler(), CPacketEncodePattern.class, id++, Side.SERVER);
|
||||
netHandler
|
||||
.registerMessage(new SPacketMEItemInvUpdate.Handler(), SPacketMEItemInvUpdate.class, id++, Side.CLIENT);
|
||||
FluidCraft.proxy.netHandler.registerMessage(
|
||||
netHandler.registerMessage(
|
||||
new SPacketMEFluidInvUpdate.Handler(),
|
||||
SPacketMEFluidInvUpdate.class,
|
||||
id++,
|
||||
Side.CLIENT);
|
||||
FluidCraft.proxy.netHandler
|
||||
.registerMessage(new CPacketCraftRequest.Handler(), CPacketCraftRequest.class, id++, Side.SERVER);
|
||||
FluidCraft.proxy.netHandler
|
||||
netHandler.registerMessage(new CPacketCraftRequest.Handler(), CPacketCraftRequest.class, id++, Side.SERVER);
|
||||
netHandler
|
||||
.registerMessage(new CPacketInventoryAction.Handler(), CPacketInventoryAction.class, id++, Side.SERVER);
|
||||
FluidCraft.proxy.netHandler
|
||||
.registerMessage(new CPacketSwitchGuis.Handler(), CPacketSwitchGuis.class, id++, Side.CLIENT);
|
||||
FluidCraft.proxy.netHandler
|
||||
.registerMessage(new CPacketTransferRecipe.Handler(), CPacketTransferRecipe.class, id++, Side.SERVER);
|
||||
FluidCraft.proxy.netHandler
|
||||
.registerMessage(new CPacketDumpTank.Handler(), CPacketDumpTank.class, id++, Side.SERVER);
|
||||
FluidCraft.proxy.netHandler
|
||||
.registerMessage(new SPacketFluidUpdate.Handler(), SPacketFluidUpdate.class, id++, Side.CLIENT);
|
||||
FluidCraft.proxy.netHandler
|
||||
netHandler.registerMessage(new CPacketSwitchGuis.Handler(), CPacketSwitchGuis.class, id++, Side.CLIENT);
|
||||
netHandler.registerMessage(new CPacketTransferRecipe.Handler(), CPacketTransferRecipe.class, id++, Side.SERVER);
|
||||
netHandler.registerMessage(new CPacketDumpTank.Handler(), CPacketDumpTank.class, id++, Side.SERVER);
|
||||
netHandler.registerMessage(new SPacketFluidUpdate.Handler(), SPacketFluidUpdate.class, id++, Side.CLIENT);
|
||||
netHandler
|
||||
.registerMessage(new CPacketPatternValueSet.Handler(), CPacketPatternValueSet.class, id++, Side.SERVER);
|
||||
FluidCraft.proxy.netHandler
|
||||
.registerMessage(new CPacketValueConfig.Handler(), CPacketValueConfig.class, id++, Side.SERVER);
|
||||
FluidCraft.proxy.netHandler
|
||||
.registerMessage(new CPacketFluidUpdate.Handler(), CPacketFluidUpdate.class, id++, Side.SERVER);
|
||||
FluidCraft.proxy.netHandler
|
||||
netHandler.registerMessage(new CPacketValueConfig.Handler(), CPacketValueConfig.class, id++, Side.SERVER);
|
||||
netHandler.registerMessage(new CPacketFluidUpdate.Handler(), CPacketFluidUpdate.class, id++, Side.SERVER);
|
||||
netHandler
|
||||
.registerMessage(new CPacketLevelMaintainer.Handler(), CPacketLevelMaintainer.class, id++, Side.SERVER);
|
||||
FluidCraft.proxy.netHandler
|
||||
.registerMessage(new SPacketSetItemAmount.Handler(), SPacketSetItemAmount.class, id++, Side.CLIENT);
|
||||
FluidCraft.proxy.netHandler
|
||||
.registerMessage(new CPacketRenamer.Handler(), CPacketRenamer.class, id++, Side.SERVER);
|
||||
FluidCraft.proxy.netHandler
|
||||
.registerMessage(new SPacketStringUpdate.Handler(), SPacketStringUpdate.class, id++, Side.CLIENT);
|
||||
netHandler.registerMessage(new SPacketSetItemAmount.Handler(), SPacketSetItemAmount.class, id++, Side.CLIENT);
|
||||
netHandler.registerMessage(new CPacketRenamer.Handler(), CPacketRenamer.class, id++, Side.SERVER);
|
||||
netHandler.registerMessage(new SPacketStringUpdate.Handler(), SPacketStringUpdate.class, id++, Side.CLIENT);
|
||||
netHandler.registerMessage(
|
||||
new SPacketLevelTerminalUpdate.Handler(),
|
||||
SPacketLevelTerminalUpdate.class,
|
||||
id++,
|
||||
Side.CLIENT);
|
||||
netHandler.registerMessage(
|
||||
new CPacketLevelTerminalCommands.Handler(),
|
||||
CPacketLevelTerminalCommands.class,
|
||||
id++,
|
||||
Side.SERVER);
|
||||
}
|
||||
|
||||
public static void sendPacketToAllPlayers(Packet packet, World world) {
|
||||
|
||||
@@ -35,9 +35,11 @@ import com.glodblock.github.common.item.ItemPartFluidPatternTerminal;
|
||||
import com.glodblock.github.common.item.ItemPartFluidPatternTerminalEx;
|
||||
import com.glodblock.github.common.item.ItemPartFluidStorageBus;
|
||||
import com.glodblock.github.common.item.ItemPartFluidTerminal;
|
||||
import com.glodblock.github.common.item.ItemPartLevelTerminal;
|
||||
import com.glodblock.github.common.item.ItemPortableFluidCell;
|
||||
import com.glodblock.github.common.item.ItemWirelessFluidTerminal;
|
||||
import com.glodblock.github.common.item.ItemWirelessInterfaceTerminal;
|
||||
import com.glodblock.github.common.item.ItemWirelessLevelTerminal;
|
||||
import com.glodblock.github.common.item.ItemWirelessPatternTerminal;
|
||||
import com.glodblock.github.common.item.ItemWirelessUltraTerminal;
|
||||
import com.glodblock.github.common.storage.CellType;
|
||||
@@ -64,6 +66,7 @@ public class ItemAndBlockHolder {
|
||||
public static ItemPartFluidPatternTerminalEx FLUID_TERMINAL_EX = new ItemPartFluidPatternTerminalEx().register();
|
||||
public static ItemPartFluidInterface FLUID_INTERFACE = new ItemPartFluidInterface().register();
|
||||
public static ItemPartFluidP2PInterface FLUID_INTERFACE_P2P = new ItemPartFluidP2PInterface().register();
|
||||
public static ItemPartLevelTerminal LEVEL_TERMINAL = new ItemPartLevelTerminal().register();
|
||||
public static ItemFluidImportBus FLUID_IMPORT_BUS = new ItemFluidImportBus().register();
|
||||
public static ItemFluidExportBus FLUID_EXPORT_BUS = new ItemFluidExportBus().register();
|
||||
public static ItemPartFluidStorageBus FLUID_STORAGE_BUS = new ItemPartFluidStorageBus().register();
|
||||
@@ -72,8 +75,9 @@ public class ItemAndBlockHolder {
|
||||
public static ItemFluidConversionMonitor FLUID_CONVERSION_MONITOR = new ItemFluidConversionMonitor().register();
|
||||
public static ItemPortableFluidCell PORTABLE_FLUID_CELL = new ItemPortableFluidCell().register();
|
||||
public static ItemWirelessFluidTerminal WIRELESS_FLUID_TERM = new ItemWirelessFluidTerminal().register();
|
||||
public static ItemWirelessUltraTerminal WIRELESS_ULTRA_TERM = new ItemWirelessUltraTerminal().register();
|
||||
public static ItemWirelessLevelTerminal WIRELESS_LEVEL_TERM = new ItemWirelessLevelTerminal().register();
|
||||
public static ItemWirelessPatternTerminal WIRELESS_PATTERN_TERM = new ItemWirelessPatternTerminal().register();
|
||||
public static ItemWirelessUltraTerminal WIRELESS_ULTRA_TERM = new ItemWirelessUltraTerminal().register();
|
||||
public static ItemWirelessInterfaceTerminal WIRELESS_INTERFACE_TERM = new ItemWirelessInterfaceTerminal()
|
||||
.register();
|
||||
public static ItemFluidPacket PACKET = new ItemFluidPacket().register();
|
||||
|
||||
@@ -1,7 +1,56 @@
|
||||
package com.glodblock.github.loader;
|
||||
|
||||
import static com.glodblock.github.common.storage.CellType.Cell16384kPart;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.*;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.BUFFER;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.CELL1024K;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.CELL1024KM;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.CELL16384K;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.CELL16384KM;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.CELL16K;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.CELL16KM;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.CELL1K;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.CELL1KM;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.CELL256K;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.CELL256KM;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.CELL4096K;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.CELL4096KM;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.CELL4K;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.CELL4KM;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.CELL64K;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.CELL64KM;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.CELL_HOUSING;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.CERTUS_QUARTZ_TANK;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.DECODER;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.DISCRETIZER;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.ENCODER;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.FLUID_AUTO_FILLER;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.FLUID_BUFFER;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.FLUID_CONVERSION_MONITOR;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.FLUID_EXPORT_BUS;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.FLUID_IMPORT_BUS;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.FLUID_INTERFACE;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.FLUID_INTERFACE_P2P;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.FLUID_LEVEL_EMITTER;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.FLUID_STORAGE_BUS;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.FLUID_STORAGE_MONITOR;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.FLUID_TERM;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.FLUID_TERMINAL;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.FLUID_TERMINAL_EX;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.INTERFACE;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.LARGE_BUFFER;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.LEVEL_MAINTAINER;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.LEVEL_TERMINAL;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.OC_EDITOR;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.PATTERN;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.PORTABLE_FLUID_CELL;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.QUANTUM_CELL;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.SINGULARITY_CELL;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.WALRUS;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.WIRELESS_FLUID_TERM;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.WIRELESS_INTERFACE_TERM;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.WIRELESS_LEVEL_TERM;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.WIRELESS_PATTERN_TERM;
|
||||
import static com.glodblock.github.loader.ItemAndBlockHolder.WIRELESS_ULTRA_TERM;
|
||||
import static net.minecraft.init.Blocks.redstone_torch;
|
||||
import static net.minecraft.init.Items.fish;
|
||||
|
||||
@@ -156,6 +205,7 @@ public class RecipeLoader implements Runnable {
|
||||
GameRegistry.addShapelessRecipe(WIRELESS_FLUID_TERM.stack(), AE2_WIRELESS_TERMINAL, BUCKET);
|
||||
GameRegistry.addShapelessRecipe(WIRELESS_PATTERN_TERM.stack(), WIRELESS_FLUID_TERM, FLUID_TERMINAL);
|
||||
GameRegistry.addShapelessRecipe(WIRELESS_INTERFACE_TERM.stack(), AE2_WIRELESS_TERMINAL, AE2_INTERFACE_TERMINAL);
|
||||
GameRegistry.addShapelessRecipe(WIRELESS_LEVEL_TERM.stack(), AE2_WIRELESS_TERMINAL, LEVEL_MAINTAINER);
|
||||
GameRegistry
|
||||
.addRecipe(new ShapedOreRecipe(CERTUS_QUARTZ_TANK.stack(), "GGG", "G G", "GGG", 'G', AE2_QUARTZ_GLASS));
|
||||
GameRegistry.addShapelessRecipe(FLUID_AUTO_FILLER.stack(), FLUID_TERMINAL, ENCODER);
|
||||
@@ -276,6 +326,7 @@ public class RecipeLoader implements Runnable {
|
||||
AE2_PROCESS_ENG));
|
||||
GameRegistry.addShapelessRecipe(AE2_BLANK_PATTERN, PATTERN.stack());
|
||||
GameRegistry.addShapelessRecipe(FLUID_TERM.stack(), AE2_TERMINAL, BUFFER);
|
||||
GameRegistry.addShapelessRecipe(LEVEL_TERMINAL.stack(), AE2_TERMINAL, LEVEL_MAINTAINER);
|
||||
GameRegistry.addShapelessRecipe(
|
||||
FLUID_BUFFER.stack(),
|
||||
LARGE_BUFFER.stack(),
|
||||
@@ -594,10 +645,11 @@ public class RecipeLoader implements Runnable {
|
||||
GameRegistry.addRecipe(new WirelessTerminalRecipe(WIRELESS_FLUID_TERM.stack()));
|
||||
GameRegistry.addRecipe(new WirelessTerminalRecipe(WIRELESS_ULTRA_TERM.stack()));
|
||||
GameRegistry.addRecipe(new WirelessTerminalRecipe(WIRELESS_INTERFACE_TERM.stack()));
|
||||
GameRegistry.addRecipe(new WirelessTerminalRecipe(WIRELESS_LEVEL_TERM.stack()));
|
||||
}
|
||||
|
||||
ItemStack[] term = { AE2_WIRELESS_TERMINAL, WIRELESS_FLUID_TERM.stack(), WIRELESS_PATTERN_TERM.stack(),
|
||||
WIRELESS_INTERFACE_TERM.stack(), THE_WIRELESS_TERM, WCT_WIRELESS_TERM };
|
||||
WIRELESS_INTERFACE_TERM.stack(), WIRELESS_LEVEL_TERM.stack(), THE_WIRELESS_TERM, WCT_WIRELESS_TERM };
|
||||
GameRegistry.addShapelessRecipe(
|
||||
WIRELESS_ULTRA_TERM.stack(),
|
||||
Arrays.stream(term).filter(Objects::nonNull).toArray());
|
||||
|
||||
Reference in new issue
Block a user