From 948c615622e979d49e7f02ded55ac7902ea50fd5 Mon Sep 17 00:00:00 2001 From: EnZaXD <60033407+FlorianMichael@users.noreply.github.com> Date: Mon, 22 Apr 2024 23:30:15 +0200 Subject: [PATCH] Replace LegacyEntityRewriter#getObjectTypeFromId with existing method (#723) --- .../viabackwards/api/rewriters/LegacyEntityRewriter.java | 6 +----- .../protocol1_10to1_11/packets/EntityPackets1_11.java | 2 +- .../protocol1_11_1to1_12/packets/EntityPackets1_12.java | 2 +- .../protocol1_11to1_11_1/packets/EntityPackets1_11_1.java | 2 +- .../protocol1_12_2to1_13/packets/EntityPackets1_13.java | 2 +- .../protocol1_13to1_13_1/packets/EntityPackets1_13_1.java | 2 +- .../protocol1_9_4to1_10/packets/EntityPackets1_10.java | 2 +- 7 files changed, 7 insertions(+), 11 deletions(-) diff --git a/common/src/main/java/com/viaversion/viabackwards/api/rewriters/LegacyEntityRewriter.java b/common/src/main/java/com/viaversion/viabackwards/api/rewriters/LegacyEntityRewriter.java index e995b821..ea9c401b 100644 --- a/common/src/main/java/com/viaversion/viabackwards/api/rewriters/LegacyEntityRewriter.java +++ b/common/src/main/java/com/viaversion/viabackwards/api/rewriters/LegacyEntityRewriter.java @@ -132,7 +132,7 @@ public abstract class LegacyEntityRewriter addTrackedEntity(wrapper, wrapper.get(Type.VAR_INT, 0), getObjectTypeFromId(wrapper.get(Type.BYTE, 0))); + return wrapper -> addTrackedEntity(wrapper, wrapper.get(Type.VAR_INT, 0), objectTypeFromId(wrapper.get(Type.BYTE, 0))); } protected PacketHandler getTrackerAndMetaHandler(Type> metaType, EntityType entityType) { @@ -161,10 +161,6 @@ public abstract class LegacyEntityRewriter