blob: cfa25e9fe2d1bb3a280c76bb754df4c1a6904fc4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
package gregtech.api.recipe.maps;
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import gregtech.api.enums.ItemList;
import gregtech.api.recipe.RecipeMapBackend;
import gregtech.api.recipe.RecipeMapBackendPropertiesBuilder;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.MethodsReturnNonnullByDefault;
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
public class AssemblerBackend extends RecipeMapBackend {
public AssemblerBackend(RecipeMapBackendPropertiesBuilder propertiesBuilder) {
super(propertiesBuilder);
}
@Override
protected GT_Recipe modifyFoundRecipe(GT_Recipe recipe, ItemStack[] items, FluidStack[] fluids,
@Nullable ItemStack specialSlot) {
for (ItemStack item : items) {
if (ItemList.Paper_Printed_Pages.isStackEqual(item, false, true)) {
recipe = recipe.copy();
recipe.mCanBeBuffered = false;
recipe.mOutputs[0].setTagCompound(item.getTagCompound());
}
}
return recipe;
}
}
|