From 2f47fd554594d70e185c6610f977010ebe748f25 Mon Sep 17 00:00:00 2001 From: Alexdoru <57050655+Alexdoru@users.noreply.github.com> Date: Wed, 25 Jan 2023 22:59:05 +0100 Subject: [PATCH] quick fix : Redundant 'throws' clause --- src/main/java/tconstruct/armor/player/ArmorExtended.java | 4 ++-- src/main/java/tconstruct/armor/player/KnapsackInventory.java | 4 ++-- src/main/java/tconstruct/util/network/PacketPipeline.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/tconstruct/armor/player/ArmorExtended.java b/src/main/java/tconstruct/armor/player/ArmorExtended.java index fe8e76dc..10a0cb78 100644 --- a/src/main/java/tconstruct/armor/player/ArmorExtended.java +++ b/src/main/java/tconstruct/armor/player/ArmorExtended.java @@ -248,11 +248,11 @@ public class ArmorExtended implements IInventory { @Override public void closeInventory() {} - public void writeInventoryToStream(ByteBuf os) throws IOException { + public void writeInventoryToStream(ByteBuf os) { for (int i = 0; i < inventory.length; i++) ByteBufUtils.writeItemStack(os, inventory[i]); } - public void readInventoryFromStream(ByteBuf is) throws IOException { + public void readInventoryFromStream(ByteBuf is) { for (int i = 0; i < inventory.length; i++) inventory[i] = ByteBufUtils.readItemStack(is); } } diff --git a/src/main/java/tconstruct/armor/player/KnapsackInventory.java b/src/main/java/tconstruct/armor/player/KnapsackInventory.java index 7bd278e4..51cdc2f7 100644 --- a/src/main/java/tconstruct/armor/player/KnapsackInventory.java +++ b/src/main/java/tconstruct/armor/player/KnapsackInventory.java @@ -171,11 +171,11 @@ public class KnapsackInventory implements IInventory { @Override public void closeInventory() {} - public void writeInventoryToStream(ByteBuf os) throws IOException { + public void writeInventoryToStream(ByteBuf os) { for (int i = 0; i < 27; i++) ByteBufUtils.writeItemStack(os, inventory[i]); } - public void readInventoryFromStream(ByteBuf is) throws IOException { + public void readInventoryFromStream(ByteBuf is) { for (int i = 0; i < 27; i++) inventory[i] = ByteBufUtils.readItemStack(is); } } diff --git a/src/main/java/tconstruct/util/network/PacketPipeline.java b/src/main/java/tconstruct/util/network/PacketPipeline.java index 57d2279c..c1ab25cf 100644 --- a/src/main/java/tconstruct/util/network/PacketPipeline.java +++ b/src/main/java/tconstruct/util/network/PacketPipeline.java @@ -59,7 +59,7 @@ public class PacketPipeline extends MessageToMessageCodec out) throws Exception { + protected void encode(ChannelHandlerContext ctx, AbstractPacket msg, List out) { ByteBuf buffer = Unpooled.buffer(); Class clazz = msg.getClass(); if (!this.packets.contains(msg.getClass())) {