From 5b7fa8b79798a56e956c7b5011c3298bc0de2a3c Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 1 Sep 2018 12:19:19 -0400 Subject: [PATCH 1/2] scheduler decompile fox --- .../java/net/minecraft/server/Scheduler.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/net/minecraft/server/Scheduler.java b/src/main/java/net/minecraft/server/Scheduler.java index ed155c8b30..1c327c58e7 100644 --- a/src/main/java/net/minecraft/server/Scheduler.java +++ b/src/main/java/net/minecraft/server/Scheduler.java @@ -27,8 +27,8 @@ public abstract class Scheduler, R> { private final ExecutorService c; private final AtomicInteger d = new AtomicInteger(1); private final List> e = Lists.newArrayList(); - private CompletableFuture f = CompletableFuture.completedFuture((Object)null); - private CompletableFuture g = CompletableFuture.completedFuture((Object)null); + private CompletableFuture f = CompletableFuture.completedFuture(null); // Paper - decompile fix + private CompletableFuture g = CompletableFuture.completedFuture(null); // Paper - decompile fix private final Supplier>> h; private final Supplier>> i; private final T j; @@ -121,12 +121,12 @@ public abstract class Scheduler, R> { private final K c; private final R d; - public a(Object object, Object object1, SchedulerTask schedulertask) { + public a(Object object, Object object1, T schedulertask) { // Paper - decompile fix this.b = (Map)Scheduler.this.h.get(); this.c = (K)object; for(this.d = (R)object1; schedulertask != null; schedulertask = schedulertask.a()) { - this.b.put(schedulertask, CompletableFuture.completedFuture(object1)); + this.b.put(schedulertask, CompletableFuture.completedFuture((R)object1));// Paper - decompile fix } } @@ -136,18 +136,18 @@ public abstract class Scheduler, R> { } private CompletableFuture a(CompletableFuture completablefuture, T schedulertask) { - ConcurrentHashMap concurrenthashmap = new ConcurrentHashMap(); - return (CompletableFuture)this.b.computeIfAbsent(schedulertask, (var4) -> { + ConcurrentHashMap> concurrenthashmap = new ConcurrentHashMap(); // Paper - decompile fix + return (CompletableFuture)this.b.computeIfAbsent(schedulertask, (var4) -> { // Paper - decompile fix if (schedulertask.a() == null) { return CompletableFuture.completedFuture(this.d); } else { schedulertask.a(this.c, (object, schedulertask2) -> { - CompletableFuture completablefuture4 = (CompletableFuture)concurrenthashmap.put(object, Scheduler.this.a(object, Scheduler.this.b(object)).a(completablefuture, schedulertask2)); + CompletableFuture completablefuture4 = (CompletableFuture)concurrenthashmap.put(object, Scheduler.this.a(object, Scheduler.this.b(object)).a(completablefuture, schedulertask2)); // Paper - decompile fix }); - CompletableFuture[] acompletablefuture = (CompletableFuture[])Streams.concat(new Stream[]{Stream.of(completablefuture), concurrenthashmap.values().stream()}).toArray((i) -> { + CompletableFuture[] acompletablefuture = (CompletableFuture[])Streams.concat(new Stream[]{Stream.of(completablefuture), concurrenthashmap.values().stream()}).toArray((i) -> { // Paper - decompile fix return new CompletableFuture[i]; }); - CompletableFuture completablefuture2 = CompletableFuture.allOf(acompletablefuture).thenApplyAsync((var3) -> { + CompletableFuture completablefuture2 = CompletableFuture.allOf(acompletablefuture).thenApplyAsync((var3) -> { // Paper - decompile fix return Scheduler.this.a(this.c, schedulertask, Maps.transformValues(concurrenthashmap, (completablefuture3) -> { try { return completablefuture3.get(); @@ -156,7 +156,7 @@ public abstract class Scheduler, R> { } })); }, Scheduler.this.c).thenApplyAsync((object) -> { - for(Object object1 : concurrenthashmap.keySet()) { + for(K object1 : concurrenthashmap.keySet()) { // Paper - decompile fix Scheduler.this.b(object1, Scheduler.this.b(object1)); } -- 2.18.0