Skip to content

Commit d805313

Browse files
committed
refactor: streamline variable initialization in EMCExporterScreenHandler and EMCImporterScreenHandler constructors
1 parent fe196a4 commit d805313

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

src/main/java/net/pitan76/itemalchemy/gui/screen/EMCExporterScreenHandler.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ public class EMCExporterScreenHandler extends ExtendedScreenHandler {
2525
public EMCExporterScreenHandler(int syncId, PlayerInventory playerInventory, PacketByteBuf buf) {
2626
this(syncId, playerInventory, null, new CompatInventory(9));
2727

28-
int x, y, z;
29-
x = PacketByteUtil.readInt(buf);
30-
y = PacketByteUtil.readInt(buf);
31-
z = PacketByteUtil.readInt(buf);
28+
int x = PacketByteUtil.readInt(buf);
29+
int y = PacketByteUtil.readInt(buf);
30+
int z = PacketByteUtil.readInt(buf);
3231

3332
Player player = new Player(playerInventory.player);
3433
tile = player.getMidohraWorld().getBlockEntity(BlockPos.of(x, y, z)).getCompatBlockEntity(EMCExporterTile.class);

src/main/java/net/pitan76/itemalchemy/gui/screen/EMCImporterScreenHandler.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ public class EMCImporterScreenHandler extends ExtendedScreenHandler {
2626
public EMCImporterScreenHandler(int syncId, PlayerInventory playerInventory, PacketByteBuf buf) {
2727
this(syncId, playerInventory, null, new CompatInventory(1), new CompatInventory(9));
2828

29-
int x, y, z;
30-
x = PacketByteUtil.readInt(buf);
31-
y = PacketByteUtil.readInt(buf);
32-
z = PacketByteUtil.readInt(buf);
29+
int x = PacketByteUtil.readInt(buf);
30+
int y = PacketByteUtil.readInt(buf);
31+
int z = PacketByteUtil.readInt(buf);
3332

3433
Player player = new Player(playerInventory.player);
3534
tile = player.getMidohraWorld().getBlockEntity(BlockPos.of(x, y, z)).getCompatBlockEntity(EMCImporterTile.class);

0 commit comments

Comments
 (0)