mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-23 08:59:23 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@9f004614 Update a whole lot of deprecated annotations PaperMC/Paper@72f13f8b [ci/skip] Mention API Checks for CONTRIBUTING.md (#12315) PaperMC/Paper@7cc6cb50 Check for trailing input in ItemFactory#createItemStack (#12312) PaperMC/Paper@f49d18df Add get/set customName to Skull block (#12302) PaperMC/Paper@894631f0 Make advancement ordering predictable (#12292) PaperMC/Paper@2aad131e Add config option for command spam whitelist PaperMC/Paper@bb3b7e69 Fix annotation mistakes PaperMC/Paper@058455e4 InventoryView QOL open method (#12282) PaperMC/Paper@f2258582 Fix firework entity not being removed when FireworkExplodeEvent is cancelled (#12268) PaperMC/Paper@7819df10 Add getHeight method to ChunkData (#12311) PaperMC/Paper@37b9ca1f Add flush parameter to World#save (#12330) PaperMC/Paper@515e12ca Check if BUNDLE_CONTENTS is present in InventoryClickEvent (#12321) PaperMC/Paper@5a6ab97b Add config to remove player as vehicle restriction in /ride (#12327) PaperMC/Paper@c467df95 Add ItemStack#copyDataFrom (#12224) Gale Changes: Dreeam-qwq/Gale@d5143ee0 Updated Upstream (Paper) Dreeam-qwq/Gale@63c396e7 Updated Upstream (Paper) Dreeam-qwq/Gale@5c2147b4 Updated Upstream (Paper) Dreeam-qwq/Gale@804ecea0 Rebuild patches
25 lines
1.3 KiB
Diff
25 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
|
|
Date: Wed, 19 Mar 2025 13:32:39 -0400
|
|
Subject: [PATCH] Validate recipe display index before retrieving it
|
|
|
|
Removed since Paper 1.21.4, fixed on Paper side
|
|
|
|
diff --git a/net/minecraft/world/item/crafting/RecipeManager.java b/net/minecraft/world/item/crafting/RecipeManager.java
|
|
index 4bd1b514f91c0a2c9261b41211a4a341f784a995..5b69c4927174611d62f0f4698215ab97c827c7f5 100644
|
|
--- a/net/minecraft/world/item/crafting/RecipeManager.java
|
|
+++ b/net/minecraft/world/item/crafting/RecipeManager.java
|
|
@@ -206,7 +206,11 @@ public class RecipeManager extends SimplePreparableReloadListener<RecipeMap> imp
|
|
|
|
@Nullable
|
|
public RecipeManager.ServerDisplayInfo getRecipeFromDisplay(RecipeDisplayId display) {
|
|
- return this.allDisplays.get(display.index());
|
|
+ // Leaf start - Validate recipe display index before retrieving it
|
|
+ final int index = display.index();
|
|
+
|
|
+ return this.allDisplays.size() > index ? this.allDisplays.get(index) : null;
|
|
+ // Leaf end - Validate recipe display index before retrieving it
|
|
}
|
|
|
|
public void listDisplaysForRecipe(ResourceKey<Recipe<?>> recipe, Consumer<RecipeDisplayEntry> output) {
|