PaperMC/nms-patches/PersistentStructureLegacy.patch
2020-06-25 17:58:10 +10:00

41 lines
2.4 KiB
Diff

--- a/net/minecraft/server/PersistentStructureLegacy.java
+++ b/net/minecraft/server/PersistentStructureLegacy.java
@@ -14,7 +14,7 @@
public class PersistentStructureLegacy {
- private static final Map<String, String> a = (Map) SystemUtils.a((Object) Maps.newHashMap(), (hashmap) -> {
+ private static final Map<String, String> a = (Map) SystemUtils.a(Maps.newHashMap(), (hashmap) -> { // CraftBukkit - decompile error
hashmap.put("Village", "Village");
hashmap.put("Mineshaft", "Mineshaft");
hashmap.put("Mansion", "Mansion");
@@ -27,7 +27,7 @@
hashmap.put("Fortress", "Fortress");
hashmap.put("EndCity", "EndCity");
});
- private static final Map<String, String> b = (Map) SystemUtils.a((Object) Maps.newHashMap(), (hashmap) -> {
+ private static final Map<String, String> b = (Map) SystemUtils.a(Maps.newHashMap(), (hashmap) -> { // CraftBukkit - decompile error
hashmap.put("Iglu", "Igloo");
hashmap.put("TeDP", "Desert_Pyramid");
hashmap.put("TeJP", "Jungle_Pyramid");
@@ -228,16 +228,16 @@
}
}
- public static PersistentStructureLegacy a(ResourceKey<World> resourcekey, @Nullable WorldPersistentData worldpersistentdata) {
- if (resourcekey == World.OVERWORLD) {
+ public static PersistentStructureLegacy a(ResourceKey<DimensionManager> resourcekey, @Nullable WorldPersistentData worldpersistentdata) { // CraftBukkit
+ if (resourcekey == DimensionManager.OVERWORLD) { // CraftBukkit
return new PersistentStructureLegacy(worldpersistentdata, ImmutableList.of("Monument", "Stronghold", "Village", "Mineshaft", "Temple", "Mansion"), ImmutableList.of("Village", "Mineshaft", "Mansion", "Igloo", "Desert_Pyramid", "Jungle_Pyramid", "Swamp_Hut", "Stronghold", "Monument"));
} else {
ImmutableList immutablelist;
- if (resourcekey == World.THE_NETHER) {
+ if (resourcekey == DimensionManager.THE_NETHER) { // CraftBukkit
immutablelist = ImmutableList.of("Fortress");
return new PersistentStructureLegacy(worldpersistentdata, immutablelist, immutablelist);
- } else if (resourcekey == World.THE_END) {
+ } else if (resourcekey == DimensionManager.THE_END) { // CraftBukkit
immutablelist = ImmutableList.of("EndCity");
return new PersistentStructureLegacy(worldpersistentdata, immutablelist, immutablelist);
} else {