#Need help with function

1 messages · Page 1 of 1 (latest)

empty flare
#
  private static <M extends AbstractPacket> void decode(Function<FriendlyByteBuf, M> function) {
        function.andThen((a) -> {

            return a.decode(function
        });
    };

How do i get the FriendlyByteBuf?

trim hollowBOT
#

This post has been reserved for your question.

Hey @empty flare! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

marble pilot
#

Pass it as a second parameter to your static method

empty flare
#

ah

#

Didnt work

#

oh im dumb

#

How do i make it stop doing this?

marble pilot
#

Remove the unused generic variable M

empty flare
#

That still didnt fix it as it forces me to use AbstractPacket

#

CUseTiab impl AbstractPacket

marble pilot
#

Then make that class generic

empty flare
#

CUseTiab<A> like this?

marble pilot
#

Ja