From 2a11aa84b61c1e5c97768edec81e9e9169315fa9 Mon Sep 17 00:00:00 2001 From: miozune Date: Tue, 5 Dec 2023 00:02:31 +0900 Subject: Add API to limit number of recipe outputs (#2390) --- .../gregtech/api/interfaces/tileentity/IVoidable.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/main/java/gregtech/api/interfaces') diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IVoidable.java b/src/main/java/gregtech/api/interfaces/tileentity/IVoidable.java index 72dda0ddec..841fd07bba 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IVoidable.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IVoidable.java @@ -57,6 +57,22 @@ public interface IVoidable { */ List getFluidOutputSlots(FluidStack[] toOutput); + /** + * @return How many slots of items this machine can output per recipe. Item outputs whose slot number + * exceeding this limit will be voided. + */ + default int getItemOutputLimit() { + return Integer.MAX_VALUE; + } + + /** + * @return How many slots of fluids this machine can output per recipe. Fluid outputs whose slot number + * exceeding this limit will be voided. + */ + default int getFluidOutputLimit() { + return Integer.MAX_VALUE; + } + /** * @return If this machine has ability to dump item outputs to ME network. * This doesn't need to check if it can actually dump to ME, -- cgit