geforkt von Mirrors/Paper
27 Zeilen
1018 B
Diff
27 Zeilen
1018 B
Diff
|
--- a/net/minecraft/stats/ServerStatsCounter.java
|
||
|
+++ b/net/minecraft/stats/ServerStatsCounter.java
|
||
|
@@ -1,3 +1,4 @@
|
||
|
+// mc-dev import
|
||
|
package net.minecraft.stats;
|
||
|
|
||
|
import com.google.common.collect.Maps;
|
||
|
@@ -158,13 +159,12 @@
|
||
|
}
|
||
|
|
||
|
private <T> Optional<Stat<T>> getStat(StatType<T> type, String id) {
|
||
|
- Optional optional = Optional.ofNullable(ResourceLocation.tryParse(id));
|
||
|
- Registry iregistry = type.getRegistry();
|
||
|
+ // CraftBukkit - decompile error start
|
||
|
+ Optional<ResourceLocation> optional = Optional.ofNullable(ResourceLocation.tryParse(id));
|
||
|
+ Registry<T> iregistry = type.getRegistry();
|
||
|
|
||
|
- Objects.requireNonNull(iregistry);
|
||
|
- optional = optional.flatMap(iregistry::getOptional);
|
||
|
- Objects.requireNonNull(type);
|
||
|
- return optional.map(type::get);
|
||
|
+ return optional.flatMap(iregistry::getOptional).map(type::get);
|
||
|
+ // CraftBukkit - decompile error end
|
||
|
}
|
||
|
|
||
|
private static CompoundTag fromJson(JsonObject json) {
|