diff --git a/src/main/java/mendedminecarts/mixin/settings/CustomPayloadS2CPacketMixin.java b/src/main/java/mendedminecarts/mixin/settings/CustomPayloadS2CPacketMixin.java index 639bbc1..e9123b3 100644 --- a/src/main/java/mendedminecarts/mixin/settings/CustomPayloadS2CPacketMixin.java +++ b/src/main/java/mendedminecarts/mixin/settings/CustomPayloadS2CPacketMixin.java @@ -5,7 +5,6 @@ import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; import mendedminecarts.settings.SettingSync; import net.minecraft.network.PacketByteBuf; -import net.minecraft.network.packet.CustomPayload; import net.minecraft.network.packet.s2c.common.CustomPayloadS2CPacket; import net.minecraft.util.Identifier; import org.spongepowered.asm.mixin.Mixin; @@ -19,11 +18,13 @@ public class CustomPayloadS2CPacketMixin { at = @At( value = "INVOKE", remap = false, - target = "Lcom/google/common/collect/ImmutableMap$Builder;build()Lcom/google/common/collect/ImmutableMap;" + target = "Lcom/google/common/collect/ImmutableMap;builder()Lcom/google/common/collect/ImmutableMap$Builder;", + ordinal = 0 ) ) - private static ImmutableMap> put_MendedMinecartsSettings(ImmutableMap.Builder> instance, Operation>> original) { + private static ImmutableMap.Builder> put_MendedMinecartsSettings(Operation>> original) { + ImmutableMap.Builder> instance = original.call(); instance.put(SettingSync.CHANNEL, SettingSync.MendedMinecartsSettingPayload::new); - return original.call(instance); + return instance; } }