调整network结构
This commit is contained in:
parent
5609777360
commit
fa9d9910d6
|
|
@ -8,8 +8,8 @@ import com.extendedae_plus.init.ModNetwork;
|
|||
import com.extendedae_plus.integration.jei.JeiRuntimeProxy;
|
||||
import com.extendedae_plus.mixin.ae2.accessor.MEStorageScreenAccessor;
|
||||
import com.extendedae_plus.mixin.extendedae.accessor.GuiExPatternTerminalAccessor;
|
||||
import com.extendedae_plus.network.OpenCraftFromJeiC2SPacket;
|
||||
import com.extendedae_plus.network.PullFromJeiOrCraftC2SPacket;
|
||||
import com.extendedae_plus.network.crafting.OpenCraftFromJeiC2SPacket;
|
||||
import com.glodblock.github.extendedae.client.gui.GuiExPatternTerminal;
|
||||
import mezz.jei.api.ingredients.ITypedIngredient;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
|
@ -17,8 +17,8 @@ import net.minecraft.client.gui.screens.Screen;
|
|||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.client.event.ScreenEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.ModList;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
import java.util.Optional;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.extendedae_plus.client.screen;
|
|||
|
||||
import com.extendedae_plus.init.ModNetwork;
|
||||
import com.extendedae_plus.menu.NetworkPatternControllerMenu;
|
||||
import com.extendedae_plus.network.GlobalToggleProviderModesC2SPacket;
|
||||
import com.extendedae_plus.network.provider.GlobalToggleProviderModesC2SPacket;
|
||||
import net.minecraft.client.gui.components.Button;
|
||||
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
|
||||
import net.minecraft.network.chat.Component;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,11 @@ package com.extendedae_plus.init;
|
|||
|
||||
import com.extendedae_plus.ExtendedAEPlus;
|
||||
import com.extendedae_plus.network.*;
|
||||
import com.extendedae_plus.network.crafting.CraftingMonitorJumpC2SPacket;
|
||||
import com.extendedae_plus.network.crafting.CraftingMonitorOpenProviderC2SPacket;
|
||||
import com.extendedae_plus.network.crafting.OpenCraftFromJeiC2SPacket;
|
||||
import com.extendedae_plus.network.meInterface.InterfaceAdjustConfigAmountC2SPacket;
|
||||
import com.extendedae_plus.network.provider.*;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraftforge.network.NetworkDirection;
|
||||
import net.minecraftforge.network.NetworkRegistry;
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import com.extendedae_plus.api.IExPatternButtonsAccessor;
|
|||
import com.extendedae_plus.api.IPatternProviderMenuAdvancedSync;
|
||||
import com.extendedae_plus.api.smartDoubling.IPatternProviderMenuDoublingSync;
|
||||
import com.extendedae_plus.init.ModNetwork;
|
||||
import com.extendedae_plus.network.ToggleAdvancedBlockingC2SPacket;
|
||||
import com.extendedae_plus.network.ToggleSmartDoublingC2SPacket;
|
||||
import com.extendedae_plus.network.provider.ToggleAdvancedBlockingC2SPacket;
|
||||
import com.extendedae_plus.network.provider.ToggleSmartDoublingC2SPacket;
|
||||
import com.glodblock.github.extendedae.client.gui.GuiExPatternProvider;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import com.extendedae_plus.api.IExPatternButtonsAccessor;
|
|||
import com.extendedae_plus.api.IPatternProviderMenuAdvancedSync;
|
||||
import com.extendedae_plus.api.smartDoubling.IPatternProviderMenuDoublingSync;
|
||||
import com.extendedae_plus.init.ModNetwork;
|
||||
import com.extendedae_plus.network.ToggleAdvancedBlockingC2SPacket;
|
||||
import com.extendedae_plus.network.ToggleSmartDoublingC2SPacket;
|
||||
import com.extendedae_plus.network.provider.ToggleAdvancedBlockingC2SPacket;
|
||||
import com.extendedae_plus.network.provider.ToggleSmartDoublingC2SPacket;
|
||||
import com.glodblock.github.extendedae.client.gui.GuiExPatternProvider;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ import appeng.menu.slot.AppEngSlot;
|
|||
import com.extendedae_plus.api.IExPatternPageAccessor;
|
||||
import com.extendedae_plus.content.ClientPatternHighlightStore;
|
||||
import com.extendedae_plus.init.ModNetwork;
|
||||
import com.extendedae_plus.network.CraftingMonitorJumpC2SPacket;
|
||||
import com.extendedae_plus.network.CraftingMonitorOpenProviderC2SPacket;
|
||||
import com.extendedae_plus.network.crafting.CraftingMonitorJumpC2SPacket;
|
||||
import com.extendedae_plus.network.crafting.CraftingMonitorOpenProviderC2SPacket;
|
||||
import com.extendedae_plus.util.GuiUtil;
|
||||
import com.glodblock.github.extendedae.client.gui.GuiExPatternProvider;
|
||||
import com.mojang.logging.LogUtils;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import com.extendedae_plus.ae.client.gui.NewIcon;
|
|||
import com.extendedae_plus.init.ModNetwork;
|
||||
import com.extendedae_plus.mixin.accessor.AbstractContainerScreenAccessor;
|
||||
import com.extendedae_plus.mixin.accessor.ScreenAccessor;
|
||||
import com.extendedae_plus.network.InterfaceAdjustConfigAmountC2SPacket;
|
||||
import com.extendedae_plus.network.meInterface.InterfaceAdjustConfigAmountC2SPacket;
|
||||
import com.glodblock.github.extendedae.client.button.ActionEPPButton;
|
||||
import com.mojang.logging.LogUtils;
|
||||
import net.minecraft.world.inventory.Slot;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import com.extendedae_plus.init.ModNetwork;
|
|||
import com.extendedae_plus.mixin.accessor.AbstractContainerScreenAccessor;
|
||||
import com.extendedae_plus.mixin.accessor.ScreenAccessor;
|
||||
import com.extendedae_plus.mixin.ae2.accessor.AEBaseScreenAccessor;
|
||||
import com.extendedae_plus.network.provider.RequestProvidersListC2SPacket;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.client.gui.components.Tooltip;
|
||||
import net.minecraft.client.renderer.Rect2i;
|
||||
|
|
@ -41,7 +42,7 @@ public abstract class PatternEncodingTermScreenMixin<T extends AEBaseMenu> {
|
|||
// 复用已存在的按钮实例,避免重复创建
|
||||
if (eap$uploadBtn == null) {
|
||||
eap$uploadBtn = new IconButton(btn -> ModNetwork.CHANNEL
|
||||
.sendToServer(new com.extendedae_plus.network.RequestProvidersListC2SPacket())) {
|
||||
.sendToServer(new RequestProvidersListC2SPacket())) {
|
||||
private final float eap$scale = 0.75f; // 约 12x12
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import com.extendedae_plus.api.IExPatternButtonsAccessor;
|
|||
import com.extendedae_plus.api.IPatternProviderMenuAdvancedSync;
|
||||
import com.extendedae_plus.api.smartDoubling.IPatternProviderMenuDoublingSync;
|
||||
import com.extendedae_plus.init.ModNetwork;
|
||||
import com.extendedae_plus.network.ToggleAdvancedBlockingC2SPacket;
|
||||
import com.extendedae_plus.network.ToggleSmartDoublingC2SPacket;
|
||||
import com.extendedae_plus.network.provider.ToggleAdvancedBlockingC2SPacket;
|
||||
import com.extendedae_plus.network.provider.ToggleSmartDoublingC2SPacket;
|
||||
import com.glodblock.github.extendedae.client.gui.GuiExPatternProvider;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import appeng.menu.AEBaseMenu;
|
|||
import com.extendedae_plus.config.ModConfig;
|
||||
import com.extendedae_plus.init.ModNetwork;
|
||||
import com.extendedae_plus.mixin.extendedae.accessor.GuiExPatternTerminalAccessor;
|
||||
import com.extendedae_plus.network.OpenProviderUiC2SPacket;
|
||||
import com.extendedae_plus.network.provider.OpenProviderUiC2SPacket;
|
||||
import com.extendedae_plus.util.GuiUtil;
|
||||
import com.glodblock.github.extendedae.client.gui.GuiExPatternTerminal;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
package com.extendedae_plus.network;
|
||||
package com.extendedae_plus.network.crafting;
|
||||
|
||||
import appeng.api.crafting.IPatternDetails;
|
||||
import appeng.api.networking.IGrid;
|
||||
import appeng.api.networking.crafting.ICraftingProvider;
|
||||
import appeng.api.networking.security.IActionHost;
|
||||
import appeng.api.stacks.AEKey;
|
||||
import appeng.helpers.patternprovider.PatternProviderLogic;
|
||||
|
|
@ -18,7 +17,6 @@ import net.minecraft.server.level.ServerPlayer;
|
|||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.MenuProvider;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraftforge.network.NetworkEvent;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.extendedae_plus.network;
|
||||
package com.extendedae_plus.network.crafting;
|
||||
|
||||
import appeng.api.crafting.IPatternDetails;
|
||||
import appeng.api.networking.IGrid;
|
||||
|
|
@ -13,6 +13,8 @@ import appeng.menu.me.crafting.CraftingCPUMenu;
|
|||
import appeng.parts.AEBasePart;
|
||||
import com.extendedae_plus.init.ModNetwork;
|
||||
import com.extendedae_plus.mixin.ae2.accessor.PatternProviderLogicAccessor;
|
||||
import com.extendedae_plus.network.SetPatternHighlightS2CPacket;
|
||||
import com.extendedae_plus.network.provider.SetProviderPageS2CPacket;
|
||||
import com.extendedae_plus.util.PatternProviderDataUtil;
|
||||
import com.glodblock.github.extendedae.util.FCClientUtil;
|
||||
import com.glodblock.github.glodium.util.GlodUtil;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.extendedae_plus.network;
|
||||
package com.extendedae_plus.network.crafting;
|
||||
|
||||
import appeng.api.networking.IGrid;
|
||||
import appeng.api.stacks.AEKey;
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
package com.extendedae_plus.network;
|
||||
package com.extendedae_plus.network.meInterface;
|
||||
|
||||
import appeng.menu.implementations.InterfaceMenu;
|
||||
import appeng.menu.SlotSemantics;
|
||||
import appeng.api.stacks.GenericStack;
|
||||
import appeng.menu.implementations.InterfaceMenu;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraftforge.network.NetworkEvent;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.extendedae_plus.network;
|
||||
package com.extendedae_plus.network.provider;
|
||||
|
||||
import com.extendedae_plus.client.ClientAdvancedBlockingState;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.extendedae_plus.network;
|
||||
package com.extendedae_plus.network.provider;
|
||||
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.YesNo;
|
||||
|
|
@ -1,20 +1,20 @@
|
|||
package com.extendedae_plus.network;
|
||||
package com.extendedae_plus.network.provider;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.MenuProvider;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraftforge.network.NetworkEvent;
|
||||
import net.minecraftforge.network.NetworkHooks;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.extendedae_plus.network;
|
||||
package com.extendedae_plus.network.provider;
|
||||
|
||||
import com.extendedae_plus.client.ui.ProviderSelectScreen;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.extendedae_plus.network;
|
||||
package com.extendedae_plus.network.provider;
|
||||
|
||||
import appeng.helpers.patternprovider.PatternContainer;
|
||||
import appeng.menu.implementations.PatternAccessTermMenu;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.extendedae_plus.network;
|
||||
package com.extendedae_plus.network.provider;
|
||||
|
||||
import appeng.menu.SlotSemantics;
|
||||
import com.glodblock.github.extendedae.client.gui.GuiExPatternProvider;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.extendedae_plus.network;
|
||||
package com.extendedae_plus.network.provider;
|
||||
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.YesNo;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.extendedae_plus.network;
|
||||
package com.extendedae_plus.network.provider;
|
||||
|
||||
import appeng.menu.implementations.PatternProviderMenu;
|
||||
import com.extendedae_plus.api.smartDoubling.ISmartDoublingHolder;
|
||||
Loading…
Reference in New Issue
Block a user