mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-30 21:05:56 -05:00
Add stack-aware CraftingRemainingItem (#277)
* Add stack-aware CraftingRemainingItem * Add JavaDocs [norelease]
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
package dev.architectury.hooks.item;
|
||||
|
||||
import dev.architectury.injectables.annotations.ExpectPlatform;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
@@ -53,4 +54,28 @@ public final class ItemStackHooks {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the given item stack has a remaining item after crafting.
|
||||
* This method is stack-aware only on Forge.
|
||||
*
|
||||
* @param stack the item stack
|
||||
* @return whether the given item stack has a remaining item after crafting
|
||||
*/
|
||||
@ExpectPlatform
|
||||
public static boolean hasCraftingRemainingItem(ItemStack stack) {
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the remaining item for a given item stack after crafting.
|
||||
* This method is stack-aware only on Forge.
|
||||
*
|
||||
* @param stack the item stack
|
||||
* @return the remaining item for a given item stack after crafting
|
||||
*/
|
||||
@ExpectPlatform
|
||||
public static ItemStack getCraftingRemainingItem(ItemStack stack) {
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user