mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-28 10:53:51 -07:00
Move CraftBukkit per-file patches
By: Initial <noreply+automated@papermc.io>
This commit is contained in:
@@ -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) {
|
Reference in New Issue
Block a user