Skip to content

Commit

Permalink
update formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
rlnt committed Sep 3, 2024
1 parent 9e88fa4 commit a6c487c
Show file tree
Hide file tree
Showing 39 changed files with 230 additions and 166 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
package com.almostreliable.merequester.client;

import appeng.menu.slot.FakeSlot;
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.ItemStack;

import com.almostreliable.merequester.Utils;
import com.almostreliable.merequester.client.abstraction.RequestDisplay;
import com.almostreliable.merequester.client.abstraction.RequesterReference;
import com.almostreliable.merequester.mixin.accessors.SlotMixin;
import com.almostreliable.merequester.network.DragAndDropPacket;
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.ItemStack;

import appeng.menu.slot.FakeSlot;
import net.neoforged.neoforge.network.PacketDistributor;

import javax.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
package com.almostreliable.merequester.client;

import appeng.client.gui.style.ScreenStyle;
import net.minecraft.client.renderer.Rect2i;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.player.Inventory;

import com.almostreliable.merequester.Config;
import com.almostreliable.merequester.MERequester;
import com.almostreliable.merequester.Utils;
import com.almostreliable.merequester.client.abstraction.AbstractRequesterScreen;
import com.almostreliable.merequester.client.abstraction.RequesterReference;
import com.almostreliable.merequester.requester.RequesterMenu;
import net.minecraft.client.renderer.Rect2i;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.player.Inventory;

import appeng.client.gui.style.ScreenStyle;

import javax.annotation.Nullable;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
package com.almostreliable.merequester.client;

import net.minecraft.client.renderer.Rect2i;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.player.Inventory;

import com.almostreliable.merequester.Config;
import com.almostreliable.merequester.MERequester;
import com.almostreliable.merequester.Utils;
import com.almostreliable.merequester.client.abstraction.AbstractRequesterScreen;
import com.almostreliable.merequester.client.abstraction.RequesterReference;
import com.almostreliable.merequester.requester.Requests.Request;
import com.almostreliable.merequester.terminal.RequesterTerminalMenu;

import appeng.api.config.Settings;
import appeng.api.config.TerminalStyle;
import appeng.api.stacks.AEKey;
Expand All @@ -8,21 +21,17 @@
import appeng.client.gui.widgets.SettingToggleButton;
import appeng.core.AEConfig;
import appeng.core.localization.GuiText;
import com.almostreliable.merequester.Config;
import com.almostreliable.merequester.MERequester;
import com.almostreliable.merequester.Utils;
import com.almostreliable.merequester.client.abstraction.AbstractRequesterScreen;
import com.almostreliable.merequester.client.abstraction.RequesterReference;
import com.almostreliable.merequester.requester.Requests.Request;
import com.almostreliable.merequester.terminal.RequesterTerminalMenu;
import com.google.common.collect.HashMultimap;
import net.minecraft.client.renderer.Rect2i;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.player.Inventory;

import javax.annotation.Nullable;
import java.util.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;

public class RequesterTerminalScreen<T extends RequesterTerminalMenu> extends AbstractRequesterScreen<T> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
package com.almostreliable.merequester.client.abstraction;

import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.components.AbstractWidget;
import net.minecraft.client.renderer.Rect2i;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.inventory.ClickType;
import net.minecraft.world.inventory.Slot;
import net.minecraft.world.item.ItemStack;

import com.almostreliable.merequester.MERequester;
import com.almostreliable.merequester.Utils;
import com.almostreliable.merequester.client.RequestSlot;
import com.almostreliable.merequester.client.widgets.RequestWidget;
import com.almostreliable.merequester.mixin.accessors.WidgetContainerMixin;
import com.almostreliable.merequester.requester.Requests.Request;
import com.almostreliable.merequester.requester.abstraction.AbstractRequesterMenu;

import appeng.api.behaviors.ContainerItemStrategies;
import appeng.api.behaviors.EmptyingAction;
import appeng.api.stacks.GenericStack;
Expand All @@ -12,24 +31,7 @@
import appeng.core.localization.Tooltips;
import appeng.core.network.serverbound.InventoryActionPacket;
import appeng.helpers.InventoryAction;
import com.almostreliable.merequester.MERequester;
import com.almostreliable.merequester.Utils;
import com.almostreliable.merequester.client.RequestSlot;
import com.almostreliable.merequester.client.widgets.RequestWidget;
import com.almostreliable.merequester.mixin.accessors.WidgetContainerMixin;
import com.almostreliable.merequester.requester.Requests.Request;
import com.almostreliable.merequester.requester.abstraction.AbstractRequesterMenu;
import com.mojang.blaze3d.platform.InputConstants;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.components.AbstractWidget;
import net.minecraft.client.renderer.Rect2i;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.inventory.ClickType;
import net.minecraft.world.inventory.Slot;
import net.minecraft.world.item.ItemStack;
import net.neoforged.neoforge.network.PacketDistributor;

import javax.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.almostreliable.merequester.client.abstraction;

import com.almostreliable.merequester.client.RequestSlot;
import com.almostreliable.merequester.requester.Requests.Request;
import net.minecraft.client.gui.components.AbstractWidget;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.ItemStack;

import com.almostreliable.merequester.client.RequestSlot;
import com.almostreliable.merequester.requester.Requests.Request;

import javax.annotation.Nullable;
import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.almostreliable.merequester.client.abstraction;

import net.minecraft.network.chat.Component;

import com.almostreliable.merequester.requester.Requests;
import com.almostreliable.merequester.requester.abstraction.RequestHost;
import net.minecraft.network.chat.Component;

import net.neoforged.api.distmarker.Dist;
import net.neoforged.api.distmarker.OnlyIn;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
package com.almostreliable.merequester.client.widgets;

import net.minecraft.ChatFormatting;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.network.chat.Component;

import com.almostreliable.merequester.Utils;
import com.almostreliable.merequester.mixin.accessors.EditBoxMixin;

import appeng.api.stacks.AEFluidKey;
import appeng.api.stacks.AEKey;
import appeng.client.gui.MathExpressionParser;
Expand All @@ -8,13 +16,7 @@
import appeng.client.gui.widgets.ConfirmableTextField;
import appeng.client.gui.widgets.NumberEntryWidget;
import appeng.core.localization.GuiText;
import com.almostreliable.merequester.Utils;
import com.almostreliable.merequester.mixin.accessors.EditBoxMixin;
import com.mojang.blaze3d.platform.InputConstants;
import net.minecraft.ChatFormatting;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.network.chat.Component;

import javax.annotation.Nullable;
import java.math.BigDecimal;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package com.almostreliable.merequester.client.widgets;

import appeng.client.gui.style.ScreenStyle;
import net.minecraft.client.gui.components.AbstractWidget;

import com.almostreliable.merequester.client.abstraction.RequestDisplay;
import com.almostreliable.merequester.client.abstraction.RequesterReference;
import com.almostreliable.merequester.network.RequestUpdatePacket;
import com.almostreliable.merequester.requester.Requests.Request;
import net.minecraft.client.gui.components.AbstractWidget;

import appeng.client.gui.style.ScreenStyle;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.api.distmarker.OnlyIn;
import net.neoforged.neoforge.network.PacketDistributor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package com.almostreliable.merequester.client.widgets;

import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.renderer.Rect2i;
import net.minecraft.network.chat.Component;

import com.almostreliable.merequester.Utils;

import appeng.client.gui.style.Blitter;
import appeng.client.gui.style.ScreenStyle;
import appeng.client.gui.widgets.AECheckbox;
import appeng.client.gui.widgets.ITooltip;
import com.almostreliable.merequester.Utils;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.renderer.Rect2i;
import net.minecraft.network.chat.Component;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.almostreliable.merequester.client.widgets;

import appeng.client.gui.widgets.ITooltip;
import com.almostreliable.merequester.Utils;
import com.almostreliable.merequester.requester.status.RequestStatus;
import net.minecraft.ChatFormatting;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.components.AbstractWidget;
Expand All @@ -11,6 +8,11 @@
import net.minecraft.client.renderer.Rect2i;
import net.minecraft.network.chat.Component;

import com.almostreliable.merequester.Utils;
import com.almostreliable.merequester.requester.status.RequestStatus;

import appeng.client.gui.widgets.ITooltip;

import java.util.ArrayList;
import java.util.List;
import java.util.function.BooleanSupplier;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package com.almostreliable.merequester.client.widgets;

import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.renderer.Rect2i;
import net.minecraft.network.chat.Component;

import com.almostreliable.merequester.Utils;

import appeng.client.gui.style.Blitter;
import appeng.client.gui.style.ScreenStyle;
import appeng.client.gui.widgets.AECheckbox;
import appeng.client.gui.widgets.ITooltip;
import com.almostreliable.merequester.Utils;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.renderer.Rect2i;
import net.minecraft.network.chat.Component;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package com.almostreliable.merequester.data;

import appeng.api.stacks.AEKey;
import com.almostreliable.merequester.requester.status.RequestStatus;
import com.mojang.serialization.Codec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import net.minecraft.network.RegistryFriendlyByteBuf;
import net.minecraft.network.codec.ByteBufCodecs;
import net.minecraft.network.codec.StreamCodec;

import com.almostreliable.merequester.requester.status.RequestStatus;

import appeng.api.stacks.AEKey;
import com.mojang.serialization.Codec;
import com.mojang.serialization.codecs.RecordCodecBuilder;

import java.util.Optional;

public record MERequesterRequest(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.almostreliable.merequester.mixin.accessors;

import net.minecraft.client.gui.components.EditBox;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.almostreliable.merequester.mixin.accessors;

import net.minecraft.world.inventory.Slot;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package com.almostreliable.merequester.mixin.accessors;

import appeng.client.gui.WidgetContainer;
import net.minecraft.client.gui.components.AbstractWidget;

import appeng.client.gui.WidgetContainer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.almostreliable.merequester.mixin.registration;

import appeng.init.InitMenuTypes;
import com.almostreliable.merequester.requester.RequesterMenu;
import com.almostreliable.merequester.terminal.RequesterTerminalMenu;
import net.minecraft.core.Registry;
import net.minecraft.world.inventory.MenuType;

import com.almostreliable.merequester.requester.RequesterMenu;
import com.almostreliable.merequester.terminal.RequesterTerminalMenu;

import appeng.init.InitMenuTypes;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Invoker;
import org.spongepowered.asm.mixin.injection.At;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package com.almostreliable.merequester.network;

import com.almostreliable.merequester.Utils;
import com.almostreliable.merequester.requester.abstraction.AbstractRequesterMenu;
import net.minecraft.network.RegistryFriendlyByteBuf;
import net.minecraft.network.codec.ByteBufCodecs;
import net.minecraft.network.codec.StreamCodec;
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.item.ItemStack;

import com.almostreliable.merequester.Utils;
import com.almostreliable.merequester.requester.abstraction.AbstractRequesterMenu;

import net.neoforged.neoforge.network.handling.IPayloadContext;

public record DragAndDropPacket(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.almostreliable.merequester.network;

import net.minecraft.network.protocol.common.custom.CustomPacketPayload;

import net.neoforged.neoforge.network.event.RegisterPayloadHandlersEvent;
import net.neoforged.neoforge.network.handling.IPayloadHandler;

public final class PacketHandler {

private static final String PROTOCOL = "1";

private PacketHandler() {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package com.almostreliable.merequester.network;

import com.almostreliable.merequester.Utils;
import com.almostreliable.merequester.requester.abstraction.AbstractRequesterMenu;
import io.netty.buffer.ByteBuf;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.codec.StreamCodec;
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.player.Player;

import com.almostreliable.merequester.Utils;
import com.almostreliable.merequester.requester.abstraction.AbstractRequesterMenu;

import net.neoforged.neoforge.network.handling.IPayloadContext;

public record RequestUpdatePacket(
Expand Down
Loading

0 comments on commit a6c487c

Please sign in to comment.