This commit is contained in:
gnembon committed 2020-01-27 23:30:31 -04:00
1 parent 26a038041e
commit bd637d5d6b
3 files changed
+8 -8

No files matched your search

@@ -19,19 +19,19 @@ import java.util.List;
@Mixin(Container.class)
public abstract class ContainerMixin
{
@Shadow @Final public List<Slot> slotList;
@Shadow @Final public List<Slot> slots;
@Shadow public abstract ItemStack onSlotClick(int int_1, int int_2, SlotActionType slotActionType_1, PlayerEntity playerEntity_1);
@Shadow public abstract void sendContentUpdates();
@Inject( method = "onSlotClick", at = @At(value = "HEAD"), cancellable = true)
private void onThrowClick( int slotId, int clickData, SlotActionType actionType, PlayerEntity playerEntity, CallbackInfoReturnable<ItemStack> cir)
{
if (actionType == SlotActionType.THROW && CarpetSettings.ctrlQCraftingFix && playerEntity.inventory.getCursorStack().isEmpty() && slotId >= 0)
{
ItemStack itemStack_1 = ItemStack.EMPTY;
Slot slot_4 = slotList.get(slotId);
Slot slot_4 = slots.get(slotId);
if (slot_4 != null && slot_4.hasStack() && slot_4.canTakeItems(playerEntity))
{
if(slotId == 0 && clickData == 1)