fix certain void trade setups
This commit is contained in:
@@ -45,6 +45,7 @@ public class KeybindCallbacks implements IHotkeyCallback, IClientTickHandler {
|
|||||||
private static final KeybindCallbacks INSTANCE = new KeybindCallbacks();
|
private static final KeybindCallbacks INSTANCE = new KeybindCallbacks();
|
||||||
|
|
||||||
private Vector<Entity> villagersInRange = new Vector<Entity>();
|
private Vector<Entity> villagersInRange = new Vector<Entity>();
|
||||||
|
private int villagerActive = 0;
|
||||||
|
|
||||||
private boolean state = false;
|
private boolean state = false;
|
||||||
private boolean inputInRange = false;
|
private boolean inputInRange = false;
|
||||||
@@ -206,12 +207,10 @@ public class KeybindCallbacks implements IHotkeyCallback, IClientTickHandler {
|
|||||||
if (Configs.Generic.VOID_TRADING_DELAY_AFTER_TELEPORT.getBooleanValue()) {
|
if (Configs.Generic.VOID_TRADING_DELAY_AFTER_TELEPORT.getBooleanValue()) {
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
for (Entity entity : mc.player.clientWorld.getEntities()) {
|
for (Entity entity : mc.player.clientWorld.getEntities()) {
|
||||||
if (entity instanceof VillagerEntity || entity instanceof WanderingTraderEntity) {
|
if (entity.getId() == villagerActive) {
|
||||||
if (villagersInRange.contains(entity)) {
|
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!found) {
|
if (!found) {
|
||||||
voidDelay--;
|
voidDelay--;
|
||||||
@@ -316,6 +315,7 @@ public class KeybindCallbacks implements IHotkeyCallback, IClientTickHandler {
|
|||||||
newVillagersInRange.add(entity);
|
newVillagersInRange.add(entity);
|
||||||
mc.interactionManager.interactEntity(mc.player, entity, Hand.MAIN_HAND);
|
mc.interactionManager.interactEntity(mc.player, entity, Hand.MAIN_HAND);
|
||||||
voidDelay = Configs.Generic.VOID_TRADING_DELAY.getIntegerValue();
|
voidDelay = Configs.Generic.VOID_TRADING_DELAY.getIntegerValue();
|
||||||
|
villagerActive = entity.getId();
|
||||||
state = false;
|
state = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user