# TickBasedEvents

`com.jsmacrosce.jsmacros.client.tick.TickBasedEvents`

Provides client tick bookkeeping and native `ItemStack` comparison helpers.  
 ```js
const Ticks = Java.type('com.jsmacrosce.jsmacros.client.tick.TickBasedEvents');  
const player = Player.getPlayer();  
if (player !== null) {
  Chat.log(Ticks.areNotEqual(player.getMainHand().getRaw(), player.getOffHand().getRaw()));  
}
 ```

## Constructors

### new TickBasedEvents {#com.jsmacrosce.jsmacros.client.tick.TickBasedEvents_constructor-}

```js
new TickBasedEvents()
```

## Fields

### serverListPinger {#com.jsmacrosce.jsmacros.client.tick.TickBasedEvents_serverListPinger}

```js
static serverListPinger: ServerStatusPinger
```

Client server-status pinger used by [FClient.ping](../../../../../../libraries/com/jsmacrosce/jsmacros/client/api/library/impl/FClient.md#com.jsmacrosce.jsmacros.client.api.library.impl.FClient_ping-String-), [FClient.pingAsync](../../../../../../libraries/com/jsmacrosce/jsmacros/client/api/library/impl/FClient.md#com.jsmacrosce.jsmacros.client.api.library.impl.FClient_pingAsync-String-MethodWrapper-), and [FClient.cancelAllPings](../../../../../../libraries/com/jsmacrosce/jsmacros/client/api/library/impl/FClient.md#com.jsmacrosce.jsmacros.client.api.library.impl.FClient_cancelAllPings-).

## Methods

### areEqualIgnoreDamage {#com.jsmacrosce.jsmacros.client.tick.TickBasedEvents_areEqualIgnoreDamage-ItemStack-ItemStack-}

```js
static areEqualIgnoreDamage(ItemStack a, ItemStack b): boolean
```

Tests whether stacks are both empty or are nonempty stacks with the same item and count whose components pass
 `areTagsEqualIgnoreDamage`. That helper compares first-stack entries with raw second-stack values,  
 so this is not a general equality test excluding damage.

**Parameters:**
- `a`: the first non-null stack
- `b`: the second non-null stack

**Returns:** `true` for two empty stacks, or when both nonempty stacks have the same item and count and pass the component test; `false` otherwise

### areNotEqual {#com.jsmacrosce.jsmacros.client.tick.TickBasedEvents_areNotEqual-ItemStack-ItemStack-}

```js
static areNotEqual(ItemStack a, ItemStack b): boolean
```

Tests whether these stacks differ by emptiness, item identity, count, components, or damage value.  
 Both empty stacks compare as not different.

**Parameters:**
- `a`: the first non-null stack
- `b`: the second non-null stack

**Returns:** `true` if exactly one stack is empty or the nonempty stacks differ by a listed check; `false` otherwise

### areTagsEqualIgnoreDamage {#com.jsmacrosce.jsmacros.client.tick.TickBasedEvents_areTagsEqualIgnoreDamage-ItemStack-ItemStack-}

```js
static areTagsEqualIgnoreDamage(ItemStack a, ItemStack b): boolean
```

Tests component entries from `a` against the raw value for each component type in `b`, ignoring damage.  
 This iterates only `a`'s components; it does not compare item identity or count. Because each entry is compared
 directly with the raw value from `b`, this is not a symmetric or full component-value equality test.  
 Both empty stacks pass; exactly one empty stack does not.

**Parameters:**
- `a`: the non-null first stack whose component entries are iterated
- `b`: the non-null second stack supplying component values

**Returns:** `true` for two empty stacks or when both stacks are nonempty and every non-damage entry from `a` passes the described comparison; `false` otherwise
