2021-04-07 07:03:29 +02:00
|
|
|
--- a/net/minecraft/stats/ServerStatisticManager.java
|
|
|
|
+++ b/net/minecraft/stats/ServerStatisticManager.java
|
|
|
|
@@ -1,3 +1,4 @@
|
|
|
|
+// mc-dev import
|
|
|
|
package net.minecraft.stats;
|
|
|
|
|
|
|
|
import com.google.common.collect.Maps;
|
2023-03-14 17:30:00 +01:00
|
|
|
@@ -158,13 +159,12 @@
|
2021-04-07 07:03:29 +02:00
|
|
|
}
|
|
|
|
|
2021-11-21 23:00:00 +01:00
|
|
|
private <T> Optional<Statistic<T>> getStat(StatisticWrapper<T> statisticwrapper, String s) {
|
|
|
|
- Optional optional = Optional.ofNullable(MinecraftKey.tryParse(s));
|
2021-04-07 07:03:29 +02:00
|
|
|
- IRegistry iregistry = statisticwrapper.getRegistry();
|
|
|
|
+ // CraftBukkit - decompile error start
|
2021-11-21 23:00:00 +01:00
|
|
|
+ Optional<MinecraftKey> optional = Optional.ofNullable(MinecraftKey.tryParse(s));
|
2021-04-07 07:03:29 +02:00
|
|
|
+ IRegistry<T> iregistry = statisticwrapper.getRegistry();
|
|
|
|
|
2021-06-11 07:00:00 +02:00
|
|
|
- Objects.requireNonNull(iregistry);
|
2021-04-07 07:03:29 +02:00
|
|
|
- optional = optional.flatMap(iregistry::getOptional);
|
2021-06-11 07:00:00 +02:00
|
|
|
- Objects.requireNonNull(statisticwrapper);
|
2021-11-21 23:00:00 +01:00
|
|
|
- return optional.map(statisticwrapper::get);
|
|
|
|
+ return optional.flatMap(iregistry::getOptional).map(statisticwrapper::get);
|
2021-04-07 07:03:29 +02:00
|
|
|
+ // CraftBukkit - decompile error end
|
|
|
|
}
|
|
|
|
|
2021-11-21 23:00:00 +01:00
|
|
|
private static NBTTagCompound fromJson(JsonObject jsonobject) {
|