blob: 8273c895b2b209973b070cfc539f7740fd2350e3 (
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.GTRecipe;
import gregtech.api.util.MethodsReturnNonnullByDefault;
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
public class AssemblerBackend extends RecipeMapBackend {
public AssemblerBackend(RecipeMapBackendPropertiesBuilder propertiesBuilder) {
super(propertiesBuilder);
}
@Override
protected GTRecipe modifyFoundRecipe(GTRecipe 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;
}
}
|