#how do i debug in compiled classes instead of source
1 messages · Page 1 of 1 (latest)
<@&987246399047479336> please have a look, thanks.
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
What is your problem ?
Are you talking about what get() returns?
how do i know what the hell im loking at
idk
i have no idea what this is
but before they were regular classes i could make sense of
and they all got turned into completable futures
and now i cant make any sense of it
What did you do ?
What
?
ill
hold on
for(final PreparableReloadListener preparablereloadlistener : pListeners) {
final CompletableFuture<?> completablefuture1 = completablefuture;
CompletableFuture<S> completablefuture2 = p_10812_.create(new PreparableReloadListener.PreparationBarrier() {
public <T> CompletableFuture<T> wait(T p_10858_) {
pGameExecutor.execute(() -> {
SimpleReloadInstance.this.preparingListeners.remove(preparablereloadlistener);
if (SimpleReloadInstance.this.preparingListeners.isEmpty()) {
SimpleReloadInstance.this.allPreparations.complete(Unit.INSTANCE);
}
});
return SimpleReloadInstance.this.allPreparations.thenCombine(completablefuture1, (p_10861_, p_10862_) -> {
return p_10858_;
});
}
}, pResourceManager, preparablereloadlistener, (p_10842_) -> {
this.startedTaskCounter.incrementAndGet();
pBackgroundExecutor.execute(() -> {
p_10842_.run();
this.doneTaskCounter.incrementAndGet();
});
}, (p_10836_) -> {
++this.startedReloads;
pGameExecutor.execute(() -> {
p_10836_.run();
++this.finishedReloads;
});
});
list.add(completablefuture2);
completablefuture = completablefuture2;
}```
Detected code, here are some useful tools:
for (final PreparableReloadListener preparablereloadlistener : pListeners) {
final CompletableFuture<? > completablefuture1 = completablefuture;
CompletableFuture<S> completablefuture2 = p_10812_.create(new PreparableReloadListener.PreparationBarrier() {
public <T> CompletableFuture<T> wait(T p_10858_) {
pGameExecutor.execute(() -> {
SimpleReloadInstance.this .preparingListeners.remove(preparablereloadlistener);
if (SimpleReloadInstance.this .preparingListeners.isEmpty()) {
SimpleReloadInstance.this .allPreparations.complete(Unit.INSTANCE);
}
}
);
return SimpleReloadInstance.this .allPreparations.thenCombine(completablefuture1, (p_10861_, p_10862_) -> {
return p_10858_;
}
);
}
}
, pResourceManager, preparablereloadlistener, (p_10842_) -> {
this .startedTaskCounter.incrementAndGet();
pBackgroundExecutor.execute(() -> {
p_10842_.run();
this .doneTaskCounter.incrementAndGet();
}
);
}
, (p_10836_) -> {
++this .startedReloads;
pGameExecutor.execute(() -> {
p_10836_.run();
++this .finishedReloads;
}
);
}
);
list.add(completablefuture2);
completablefuture = completablefuture2;
}
What are you trying to do
like first the list looks like this
im trying to see what is going on
because i have to change the order of that list
i need to move the DucLib ones (those are the only ones that i created) to be executed before the EntityModelSet one
What is this list
so i want to run thru the code to see what happens, but its like not possible to understand
How does it change
look
here i can see all the names and what it is
here it all got turned into the same type
What is this list ?
so i dont know what is what
reload listeners in minecraft
i need to change the order
so im just seeing how they work
You probably can't
like
there is also this
this.allDone = Util.sequenceFailFast(list);
i think that changes th eorde
well i have to otherwise i wasted 20 hours of my life
What is the code of this method?
public static <V> CompletableFuture<List<V>> sequenceFailFast(List<? extends CompletableFuture<? extends V>> pCompletableFutures) {
CompletableFuture<List<V>> completablefuture = new CompletableFuture<>();
return fallibleSequence(pCompletableFutures, completablefuture::completeExceptionally).applyToEither(completablefuture, Function.identity());
}
private static <V> CompletableFuture<List<V>> fallibleSequence(List<? extends CompletableFuture<? extends V>> p_214632_, Consumer<Throwable> p_214633_) {
List<V> list = Lists.newArrayListWithCapacity(p_214632_.size());
CompletableFuture<?>[] completablefuture = new CompletableFuture[p_214632_.size()];
p_214632_.forEach((p_214641_) -> {
int i = list.size();
list.add((V)null);
completablefuture[i] = p_214641_.whenComplete((p_214650_, p_214651_) -> {
if (p_214651_ != null) {
p_214633_.accept(p_214651_);
} else {
list.set(i, p_214650_);
}
});
});
return CompletableFuture.allOf(completablefuture).thenApply((p_214626_) -> {
return list;
});
}```
Detected code, here are some useful tools:
private static <V> CompletableFuture<List<V>> fallibleSequence(List<? extends CompletableFuture<? extends V>> p_214632_, Consumer<Throwable> p_214633_) {
List<V> list = Lists.newArrayListWithCapacity(p_214632_.size());
CompletableFuture<? > [] completablefuture = new CompletableFuture[p_214632_.size() ] ;
p_214632_.forEach((p_214641_) -> {
int i = list.size();
list.add((V) null );
completablefuture[i] = p_214641_.whenComplete((p_214650_, p_214651_) -> {
if (p_214651_ != null ) {
p_214633_.accept(p_214651_);
}
else {
list.set(i, p_214650_);
}
}
);
}
);
return CompletableFuture.allOf(completablefuture).thenApply((p_214626_) -> {
return list;
}
);
}
public static <V> CompletableFuture<List<V>> sequenceFailFast(List<? extends CompletableFuture<? extends V>> pCompletableFutures) {
CompletableFuture<List<V>> completablefuture = new CompletableFuture<>();
return fallibleSequence(pCompletableFutures, completablefuture::completeExceptionally).applyToEither(completablefuture, Function.identity());
}```
Detected code, here are some useful tools:
public static <V> CompletableFuture<List<V>> sequenceFailFast(List<? extends CompletableFuture<? extends V>> pCompletableFutures) {
CompletableFuture<List<V>> completablefuture = new CompletableFuture<>();
return fallibleSequence(pCompletableFutures, completablefuture::completeExceptionally).applyToEither(completablefuture, Function.identity());
}
but i dont understand this at all
like
how can i see what class it is
what is even the point of the completablefuture it just makes it impossible to understand
like is the order changed?
or not?
A future is something that will be executed in the future
The order is not changed as far as I see
oh
okay good
becuase sequenceFailFast
sounds like it changes the order
just going off of the name
It keeps the same order
so how do i find where they get executed?
what method in CompletableFuture do you run for that?
It's not where it's when
idk how a future works
It just tell you when something is exeuted
so you dont execute it thru the future?
Do you know executors ?
no
Ah
Basically a future will tell you the state of the code you will execute