mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 02:35:49 +01:00
SPIGOT-6540: Firework rockets not crafting into flight duration 1
By: md_5 <git@md-5.net>
This commit is contained in:
parent
d5a68b79c1
commit
1b34737612
1 changed files with 5 additions and 6 deletions
|
@ -29,21 +29,20 @@
|
|||
Iterator iterator = map.entrySet().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -57,28 +64,46 @@
|
||||
@@ -57,8 +64,10 @@
|
||||
try {
|
||||
IRecipe<?> irecipe = a(minecraftkey, ChatDeserializer.m((JsonElement) entry.getValue(), "top element"));
|
||||
|
||||
- ((Builder) map1.computeIfAbsent(irecipe.g(), (recipes) -> {
|
||||
- return ImmutableMap.builder();
|
||||
- })).put(minecraftkey, irecipe);
|
||||
+ // CraftBukkit start - SPIGOT-4638: last recipe gets priority
|
||||
+ // CraftBukkit start
|
||||
+ (map1.computeIfAbsent(irecipe.g(), (recipes) -> {
|
||||
+ return new Object2ObjectLinkedOpenHashMap<>();
|
||||
+ })).putAndMoveToFirst(minecraftkey, irecipe);
|
||||
+ // CraftBukkit end
|
||||
+ // CraftBukkit end
|
||||
})).put(minecraftkey, irecipe);
|
||||
} catch (IllegalArgumentException | JsonParseException jsonparseexception) {
|
||||
CraftingManager.LOGGER.error("Parsing error loading recipe {}", minecraftkey, jsonparseexception);
|
||||
}
|
||||
@@ -66,19 +75,35 @@
|
||||
}
|
||||
|
||||
this.recipes = (Map) map1.entrySet().stream().collect(ImmutableMap.toImmutableMap(Entry::getKey, (entry1) -> {
|
||||
|
|
Loading…
Reference in a new issue