mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 19:39:24 +01:00
Added attachment copying to RecipeKeepDataShaped
This commit is contained in:
parent
911356adbc
commit
99ea93ebad
1 changed files with 4 additions and 0 deletions
|
@ -10,6 +10,7 @@ import net.minecraft.world.item.ItemStack;
|
|||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
import net.minecraft.world.item.crafting.RecipeSerializer;
|
||||
import net.minecraft.world.item.crafting.ShapedRecipe;
|
||||
import net.neoforged.neoforge.attachment.AttachmentInternals;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
|
@ -44,6 +45,9 @@ public class RecipeKeepDataShaped extends ShapedRecipe {
|
|||
if (!datasource.isEmpty() && datasource.hasTag())
|
||||
craftingResult.setTag(datasource.getTag().copy());
|
||||
|
||||
if (!datasource.isEmpty())
|
||||
AttachmentInternals.copyStackAttachments(datasource, craftingResult);
|
||||
|
||||
return craftingResult;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue