1
0
forked from Clones/Controlify

✏️ Allow repeat events for drop key + drop stack

This commit is contained in:
isXander
2023-05-16 20:31:48 +01:00
parent 0adbccc498
commit c77f78b00e
5 changed files with 37 additions and 4 deletions

View File

@ -187,6 +187,12 @@ public class InGameButtonGuide implements IngameGuideRegistry {
return Optional.of(Component.translatable("controlify.guide.ingame.drop"));
return Optional.empty();
});
registerGuideAction(controller.bindings().DROP_STACK, ActionLocation.RIGHT, ctx -> {
var holdingItem = ctx.player().getInventory().getSelected();
if (!holdingItem.isEmpty() && holdingItem.getCount() > 1)
return Optional.of(Component.translatable("controlify.binding.controlify.drop_stack"));
return Optional.empty();
});
registerGuideAction(controller.bindings().SWAP_HANDS, ActionLocation.RIGHT, (ctx) -> {
var player = ctx.player();
if (player.hasItemInSlot(EquipmentSlot.MAINHAND) || player.hasItemInSlot(EquipmentSlot.OFFHAND))