From a7397ad665755ed9dee0124ba3b6cacdaa966d1c Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Mon, 12 Jun 2023 10:04:53 -0700 Subject: [PATCH] Fix SmithingInventory helper slot methods for 1.20 (#9325) --- .../Add-item-slot-convenience-methods.patch | 41 +++++++++++++------ 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/patches/api/Add-item-slot-convenience-methods.patch b/patches/api/Add-item-slot-convenience-methods.patch index a4c0dbd1e1..059aab58f7 100644 --- a/patches/api/Add-item-slot-convenience-methods.patch +++ b/patches/api/Add-item-slot-convenience-methods.patch @@ -188,41 +188,56 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + // Paper start + /** -+ * Gets the input equipment (first slot). ++ * Gets the input template (first slot). + * -+ * @return input equipment item ++ * @return input template item + */ -+ @Nullable -+ default ItemStack getInputEquipment() { -+ return getItem(0); ++ default @Nullable ItemStack getInputTemplate() { ++ return this.getItem(0); + } + + /** -+ * Sets the input equipment (first slot). ++ * Sets the input template (first slot). ++ * ++ * @param itemStack item to set ++ */ ++ default void setInputTemplate(@Nullable ItemStack itemStack) { ++ this.setItem(0, itemStack); ++ } ++ /** ++ * Gets the input equipment (second slot). ++ * ++ * @return input equipment item ++ */ ++ default @Nullable ItemStack getInputEquipment() { ++ return this.getItem(1); ++ } ++ ++ /** ++ * Sets the input equipment (second slot). + * + * @param itemStack item to set + */ + default void setInputEquipment(@Nullable ItemStack itemStack) { -+ setItem(0, itemStack); ++ this.setItem(1, itemStack); + } + + /** -+ * Gets the input mineral (second slot). ++ * Gets the input mineral (third slot). + * + * @return input mineral item + */ -+ @Nullable -+ default ItemStack getInputMineral() { -+ return getItem(1); ++ default @Nullable ItemStack getInputMineral() { ++ return this.getItem(2); + } + + /** -+ * Sets the input mineral (second slot). ++ * Sets the input mineral (third slot). + * + * @param itemStack item to set + */ + default void setInputMineral(@Nullable ItemStack itemStack) { -+ setItem(1, itemStack); ++ this.setItem(2, itemStack); + } + // Paper end }