fix CT recipe actions not running on crafting terminal crafts
This commit is contained in:
@@ -133,15 +133,18 @@ public class AppEngCraftingSlot extends AppEngSlot {
|
||||
|
||||
@Override
|
||||
public ItemStack onTake(final EntityPlayer playerIn, final ItemStack stack) {
|
||||
net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerCraftingEvent(playerIn, stack, new WrapperInvItemHandler(this.craftMatrix));
|
||||
this.onCrafting(stack);
|
||||
net.minecraftforge.common.ForgeHooks.setCraftingPlayer(playerIn);
|
||||
stack.getItem().onCreated(stack, playerIn.world, playerIn);
|
||||
|
||||
final InventoryCrafting ic = new InventoryCrafting(this.getContainer(), 3, 3);
|
||||
|
||||
for (int x = 0; x < this.craftMatrix.getSlots(); x++) {
|
||||
ic.setInventorySlotContents(x, this.craftMatrix.getStackInSlot(x));
|
||||
}
|
||||
|
||||
net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerCraftingEvent(playerIn, stack, ic);
|
||||
net.minecraftforge.common.ForgeHooks.setCraftingPlayer(playerIn);
|
||||
|
||||
final NonNullList<ItemStack> aitemstack = this.getRemainingItems(ic, playerIn.world);
|
||||
|
||||
ItemHandlerUtil.copy(ic, this.craftMatrix, false);
|
||||
|
||||
Reference in New Issue
Block a user