Skip to content

Commit 0b01ca9

Browse files
author
tonimatasdev
committed
chore: Remove unnecessary code
1 parent 02a8548 commit 0b01ca9

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed
Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,15 @@
11
package dev.tonimatas.mekanismcurios.networking;
22

33
import dev.tonimatas.mekanismcurios.MekanismCurios;
4-
import mekanism.api.security.IItemSecurityUtils;
5-
import mekanism.common.item.ItemPortableQIODashboard;
6-
import mekanism.common.lib.security.ItemSecurityUtils;
7-
import net.minecraft.nbt.CompoundTag;
84
import net.minecraft.network.FriendlyByteBuf;
95
import net.minecraft.network.codec.StreamCodec;
106
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
117
import net.minecraft.resources.ResourceLocation;
12-
import net.minecraft.server.level.ServerPlayer;
13-
import net.minecraft.world.InteractionHand;
14-
import net.minecraft.world.InteractionResultHolder;
158
import net.minecraft.world.entity.player.Player;
169
import net.minecraft.world.item.ItemStack;
1710
import net.minecraft.world.level.Level;
1811
import net.neoforged.neoforge.network.handling.IPayloadContext;
1912
import org.jetbrains.annotations.NotNull;
20-
import top.theillusivec4.curios.api.CuriosApi;
21-
import top.theillusivec4.curios.api.type.capability.ICuriosItemHandler;
22-
import top.theillusivec4.curios.api.type.inventory.ICurioStacksHandler;
23-
24-
import java.util.Map;
25-
import java.util.Optional;
2613

2714
public record OpenPortableQIOPacket() implements CustomPacketPayload {
2815
public static final CustomPacketPayload.Type<OpenPortableQIOPacket> TYPE =
@@ -35,27 +22,14 @@ public record OpenPortableQIOPacket() implements CustomPacketPayload {
3522
return TYPE;
3623
}
3724

38-
@SuppressWarnings("DataFlowIssue")
25+
@SuppressWarnings({"DataFlowIssue", "unused"})
3926
public static void handle(final OpenPortableQIOPacket packet, final IPayloadContext context) {
4027
context.enqueueWork(() -> {
4128
Player player = context.player();
4229
Level level = player.level();
4330
ItemStack stack = MekanismCurios.getQIO(player);
4431

45-
if (stack.getItem() instanceof ItemPortableQIODashboard itemPortableQIODashboard) {
46-
47-
}
48-
4932
stack.use(level, player, null);
50-
// Mekanism start - Modified code of ItemSecurityUtils#claimOrOpenGui
51-
//if (!stack.isEmpty() && stack.getItem() instanceof ItemPortableQIODashboard portableQIO) {
52-
// if (!ItemSecurityUtils.get().tryClaimItem(level, player, stack)) {
53-
// if (IItemSecurityUtils.INSTANCE.canAccessOrDisplayError(player, stack) && stack.getCount() == 1 && !level.isClientSide) {
54-
// portableQIO.getContainerType().tryOpenGui((ServerPlayer) player, null, stack);
55-
// }
56-
// }
57-
//}
58-
// Mekanism stop
5933
});
6034
}
6135
}

0 commit comments

Comments
 (0)