aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/og/net/minecraft/stats/ServerStatisticManager.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/og/net/minecraft/stats/ServerStatisticManager.patch')
-rw-r--r--patch-remap/og/net/minecraft/stats/ServerStatisticManager.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/stats/ServerStatisticManager.patch b/patch-remap/og/net/minecraft/stats/ServerStatisticManager.patch
new file mode 100644
index 0000000000..ac3c4fffdf
--- /dev/null
+++ b/patch-remap/og/net/minecraft/stats/ServerStatisticManager.patch
@@ -0,0 +1,26 @@
+--- 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;
+@@ -158,13 +159,12 @@
+ }
+
+ private <T> Optional<Statistic<T>> getStat(StatisticWrapper<T> statisticwrapper, String s) {
+- Optional optional = Optional.ofNullable(MinecraftKey.tryParse(s));
+- IRegistry iregistry = statisticwrapper.getRegistry();
++ // CraftBukkit - decompile error start
++ Optional<MinecraftKey> optional = Optional.ofNullable(MinecraftKey.tryParse(s));
++ IRegistry<T> iregistry = statisticwrapper.getRegistry();
+
+- Objects.requireNonNull(iregistry);
+- optional = optional.flatMap(iregistry::getOptional);
+- Objects.requireNonNull(statisticwrapper);
+- return optional.map(statisticwrapper::get);
++ return optional.flatMap(iregistry::getOptional).map(statisticwrapper::get);
++ // CraftBukkit - decompile error end
+ }
+
+ private static NBTTagCompound fromJson(JsonObject jsonobject) {