Skip to content

Commit

Permalink
Merge pull request #4631 from LeoBeliik/noChestBtnOnCraftingTableOrCr…
Browse files Browse the repository at this point in the history
…eativeInv
  • Loading branch information
IThundxr authored Feb 4, 2024
2 parents 509a5cf + 87c3eeb commit c46aa83
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import java.util.List;
import java.util.function.BiPredicate;

import net.minecraft.client.gui.screens.inventory.CreativeModeInventoryScreen;
import net.minecraft.world.inventory.CraftingMenu;
import org.apache.commons.lang3.tuple.Pair;
import org.jetbrains.annotations.NotNull;
import org.violetmoon.quark.api.IQuarkButtonAllowed;
Expand Down Expand Up @@ -78,6 +80,10 @@ private static ITransferManager getProvider(Object te) {
}

public static boolean accepts(AbstractContainerMenu container, Player player) {
//extracting from the crafting table with the button dups items
if (container instanceof CraftingMenu || container instanceof CreativeModeInventoryScreen.ItemPickerMenu)
return false;

if(hasProvider(container))
return getProvider(container).acceptsTransfer(player);

Expand Down

0 comments on commit c46aa83

Please sign in to comment.