mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-21 15:59:28 +00:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@681c013 Bundle spark (#11093) PaperMC/Paper@5fee9c6 Move configuration option to a system property PaperMC/Paper@aa3b356 Improve server startup logging (#11110) PaperMC/Paper@9aea240 Properly lookup plugin classes when looked up by spark PaperMC/Paper@7e91a2c Update the bundled spark version
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Martijn Muijsers <martijnmuijsers@live.nl>
|
||||
Date: Wed, 30 Nov 2022 21:02:43 +0100
|
||||
Subject: [PATCH] Replace class map with optimized collection
|
||||
|
||||
License: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
This patch is based on the following mixin:
|
||||
"me/jellysquid/mods/lithium/mixin/collections/entity_by_type/TypeFilterableListMixin.java"
|
||||
By: 2No2Name <2No2Name@web.de>
|
||||
As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/util/ClassInstanceMultiMap.java b/src/main/java/net/minecraft/util/ClassInstanceMultiMap.java
|
||||
index 038710ba934a9a57815dfe9f414b98223b848385..cd28174187133550e418c0e748ce8a06739d0146 100644
|
||||
--- a/src/main/java/net/minecraft/util/ClassInstanceMultiMap.java
|
||||
+++ b/src/main/java/net/minecraft/util/ClassInstanceMultiMap.java
|
||||
@@ -4,6 +4,8 @@ import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Iterators;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
+import it.unimi.dsi.fastutil.objects.Reference2ReferenceOpenHashMap;
|
||||
+
|
||||
import java.util.AbstractCollection;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
@@ -14,7 +16,7 @@ import java.util.Map.Entry;
|
||||
import net.minecraft.Util;
|
||||
|
||||
public class ClassInstanceMultiMap<T> extends AbstractCollection<T> {
|
||||
- private final Map<Class<?>, List<T>> byClass = Maps.newHashMap();
|
||||
+ private final Map<Class<?>, List<T>> byClass = new Reference2ReferenceOpenHashMap<>(2); // Gale - Lithium - replace class map with optimized collection
|
||||
private final Class<T> baseClass;
|
||||
private final List<T> allInstances = Lists.newArrayList();
|
||||
|
||||
Reference in New Issue
Block a user