mirror of
https://github.com/Wurst-Imperium/Wurst7.git
synced 2024-09-20 01:12:13 +02:00
Make slow mode a bit less slow
This commit is contained in:
parent
0d92166b31
commit
cfdce078b1
@ -45,6 +45,12 @@ public final class DropCmd extends Command implements UpdateListener
|
||||
WURST.getEventManager().add(UpdateListener.class, this);
|
||||
}
|
||||
|
||||
private void dropAllItems()
|
||||
{
|
||||
for(int i = 9; i < 45; i++)
|
||||
IMC.getInteractionManager().windowClick_THROW(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
@ -52,7 +58,9 @@ public final class DropCmd extends Command implements UpdateListener
|
||||
if(slowModeTimer > 0)
|
||||
return;
|
||||
|
||||
skipEmptySlots();
|
||||
IMC.getInteractionManager().windowClick_THROW(slowModeSlotCounter);
|
||||
|
||||
slowModeSlotCounter++;
|
||||
slowModeTimer = 5;
|
||||
|
||||
@ -60,9 +68,18 @@ public final class DropCmd extends Command implements UpdateListener
|
||||
WURST.getEventManager().remove(UpdateListener.class, this);
|
||||
}
|
||||
|
||||
private void dropAllItems()
|
||||
private void skipEmptySlots()
|
||||
{
|
||||
for(int i = 9; i < 45; i++)
|
||||
IMC.getInteractionManager().windowClick_THROW(i);
|
||||
while(slowModeSlotCounter < 45)
|
||||
{
|
||||
int adjustedSlot = slowModeSlotCounter;
|
||||
if(adjustedSlot >= 36)
|
||||
adjustedSlot -= 36;
|
||||
|
||||
if(!MC.player.inventory.getInvStack(adjustedSlot).isEmpty())
|
||||
break;
|
||||
|
||||
slowModeSlotCounter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user