Yatopia/patches/Airplane/patches/server/0006-Use-unmodifiableMap-in...

37 lines
1.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paul Sauve <paul@technove.co>
Date: Sat, 31 Oct 2020 19:22:37 -0500
Subject: [PATCH] Use unmodifiableMap instead of making copy
Airplane
Copyright (C) 2020 Technove LLC
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/src/main/java/net/minecraft/world/level/storage/loot/LootTableInfo.java b/src/main/java/net/minecraft/world/level/storage/loot/LootTableInfo.java
index 5c712af849abf1e5f58a7760b19c543474559f77..20cc04be75ab202d4c4ee9a07e9876ceff8422ca 100644
--- a/src/main/java/net/minecraft/world/level/storage/loot/LootTableInfo.java
+++ b/src/main/java/net/minecraft/world/level/storage/loot/LootTableInfo.java
@@ -43,8 +43,8 @@ public class LootTableInfo {
this.world = worldserver;
this.d = function;
this.f = function1;
- this.h = ImmutableMap.copyOf(map);
- this.i = ImmutableMap.copyOf(map1);
+ this.h = java.util.Collections.unmodifiableMap(map); // Airplane
+ this.i = java.util.Collections.unmodifiableMap(map1); // Airplane
}
public boolean hasContextParameter(LootContextParameter<?> lootcontextparameter) {