project: Revert these changes until mixins / injector parts are done
This commit is contained in:
@@ -1,10 +1,12 @@
|
|||||||
package net.runelite.api;
|
package net.runelite.api;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A data structure that uses a hash function to compute an index into an
|
* A data structure that uses a hash function to compute an index into an
|
||||||
* array of buckets from which node objects can be quickly obtained.
|
* array of buckets from which node objects can be quickly obtained.
|
||||||
*/
|
*/
|
||||||
public interface HashTable<T extends Node> extends Iterable<T>
|
public interface HashTable<T extends Node>
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Gets a node by its hash value.
|
* Gets a node by its hash value.
|
||||||
@@ -13,4 +15,11 @@ public interface HashTable<T extends Node> extends Iterable<T>
|
|||||||
* @return the associated node
|
* @return the associated node
|
||||||
*/
|
*/
|
||||||
T get(long value);
|
T get(long value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a collection of all nodes stored in this table.
|
||||||
|
*
|
||||||
|
* @return the nodes stored
|
||||||
|
*/
|
||||||
|
Collection<T> getNodes();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.GameState;
|
import net.runelite.api.GameState;
|
||||||
import net.runelite.api.Varbits;
|
import net.runelite.api.Varbits;
|
||||||
import net.runelite.api.WidgetNode;
|
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
import net.runelite.api.vars.Autoweed;
|
import net.runelite.api.vars.Autoweed;
|
||||||
import net.runelite.api.widgets.WidgetModalMode;
|
import net.runelite.api.widgets.WidgetModalMode;
|
||||||
@@ -102,12 +101,11 @@ public class FarmingTracker
|
|||||||
boolean changed = false;
|
boolean changed = false;
|
||||||
|
|
||||||
//Varbits don't get sent when a modal widget is open so just return
|
//Varbits don't get sent when a modal widget is open so just return
|
||||||
for (WidgetNode widgetNode : client.getComponentTable())
|
if (client.getComponentTable().getNodes()
|
||||||
|
.stream()
|
||||||
|
.anyMatch(widgetNode -> widgetNode.getModalMode() != WidgetModalMode.NON_MODAL))
|
||||||
{
|
{
|
||||||
if (widgetNode.getModalMode() != WidgetModalMode.NON_MODAL)
|
return false;
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import javax.inject.Singleton;
|
|||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.Constants;
|
import net.runelite.api.Constants;
|
||||||
import net.runelite.api.GameState;
|
import net.runelite.api.GameState;
|
||||||
|
import net.runelite.api.InventoryID;
|
||||||
import net.runelite.api.ItemContainer;
|
import net.runelite.api.ItemContainer;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
import net.runelite.api.Node;
|
import net.runelite.api.Node;
|
||||||
@@ -111,9 +112,14 @@ public class GameEventManager
|
|||||||
|
|
||||||
eventBus.register(subscriber);
|
eventBus.register(subscriber);
|
||||||
|
|
||||||
for (final ItemContainer itemContainer : client.getItemContainers())
|
for (final InventoryID inventory : InventoryID.values())
|
||||||
{
|
{
|
||||||
eventBus.post(new ItemContainerChanged(itemContainer.getId(), itemContainer));
|
final ItemContainer itemContainer = client.getItemContainer(inventory);
|
||||||
|
|
||||||
|
if (itemContainer != null)
|
||||||
|
{
|
||||||
|
eventBus.post(new ItemContainerChanged(inventory.getId(), itemContainer));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (NPC npc : client.getCachedNPCs())
|
for (NPC npc : client.getCachedNPCs())
|
||||||
|
|||||||
Reference in New Issue
Block a user