mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-27 18:59:08 +00:00
30 lines
1.4 KiB
Diff
30 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
|
Date: Sat, 8 Apr 2023 01:28:01 +0300
|
|
Subject: [PATCH] lithium: collections.gamerules
|
|
|
|
Original code by CaffeineMC, licensed under LGPL v3
|
|
You can find the original code on https://github.com/CaffeineMC/lithium-fabric (Yarn mappings)
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java
|
|
index 467696a78791d65a66eb380e97d33123a5a12e61..ea7b3b2ad418e046e7f3fae3b09a0b76c4a6152f 100644
|
|
--- a/src/main/java/net/minecraft/world/level/GameRules.java
|
|
+++ b/src/main/java/net/minecraft/world/level/GameRules.java
|
|
@@ -33,6 +33,7 @@ import net.minecraft.server.level.ServerPlayer;
|
|
import net.minecraft.world.flag.FeatureFlagSet;
|
|
import net.minecraft.world.flag.FeatureFlags;
|
|
import org.slf4j.Logger;
|
|
+import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
|
|
|
|
public class GameRules {
|
|
|
|
@@ -168,7 +169,7 @@ public class GameRules {
|
|
}
|
|
|
|
private GameRules(Map<GameRules.Key<?>, GameRules.Value<?>> rules, FeatureFlagSet enabledFeatures) {
|
|
- this.rules = rules;
|
|
+ this.rules = new Object2ObjectOpenHashMap<>(rules); // DivineMC - lithium: collections.gamerules
|
|
this.enabledFeatures = enabledFeatures;
|
|
|
|
// Paper start - Perf: Use array for gamerule storage
|