Closed aria1th closed 2 years ago
This is bad, pickup should not be used. The behaviour is completely different, and will damage some scripts. I intended for this to be SWAP because of item shadowing, changing this will break it. Also I would replace use with interact item I don't see point of having them both
hmm yeah it will definitely break that behavior... but current code only works when first clicked slot is not air. It can be simply fixed by alternating 1/2 so I'll just make it swap again.
InteractItem is for some condition when you need to open chat / do something else, use is blocked while in those conditions but its pretty limited... it requires mixins to work properly with general items so its not really preferable.
cool looks good will merge tomorrow
SwapSlot now works correctly (at least in 1.18.1 and 1.17) *NOTE : Vanilla does not swap items if stacks are mergable , so it should respect vanilla? ClickSlot works perfectly (player.clickSlot( int slotID(-999 or proper slot ID) , clickData (0 or 1, default to 0) , String slotActionType(pickup, swap, etc) ) InteractItem works good with items : bottle o'enchant , composable, etc but not foods GetSwappableHotbarSlot works