mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Negative map IDs are still valid
This commit is contained in:
19
patches/server/0239-Negative-map-IDs-are-still-valid.patch
Normal file
19
patches/server/0239-Negative-map-IDs-are-still-valid.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 31 Jul 2021 22:52:52 -0500
|
||||
Subject: [PATCH] Negative map IDs are still valid
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
index 20743fb00aa346d777fe4ddd02647e69736732f9..355e9ccd481cc7682e1f5423407b80627b5d3bc9 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
@@ -58,7 +58,7 @@ public class MapItem extends ComplexItem {
|
||||
|
||||
@Nullable
|
||||
public static MapItemSavedData getSavedData(@Nullable Integer id, Level world) {
|
||||
- return id == null || id < 0 ? null : world.getMapData(MapItem.makeKey(id)); // Paper - map ids under 0 are invalid
|
||||
+ return id == null ? null : world.getMapData(MapItem.makeKey(id)); // Paper - map ids under 0 are invalid // Purpur - negative ids are still valid
|
||||
}
|
||||
|
||||
@Nullable
|
||||
Reference in New Issue
Block a user