SilentChaos512 / Silent-Gear

Modular tool/armor mod (formerly part of Silent's Gems)
https://www.curseforge.com/minecraft/mc-mods/silent-gear
MIT License
74 stars 34 forks source link

Salvagers Contribute Significantly to Tick Lag #641

Closed TheFirel closed 6 months ago

TheFirel commented 7 months ago

Versions

All versions above the latest 1.19.2 release tested

Expected Behavior

Salvagers check their recipes when a call is necessitated by an item's presence in slot 0, the ItemStack input.

Actual Behavior

Salvagers check their inventories every tick, despite no items being in the machine, resulting in a large amount of tick overhead.

Links/Images

Bug does not result in a crash- no crashlog available

Offending code: https://github.com/SilentChaos512/Silent-Gear/blob/c4b219d184c763a816f5222d0d52c1e5de67c255/src/main/java/net/silentchaos512/gear/block/salvager/SalvagerTileEntity.java#L79

Lines 89-95 Lines 79-82

Steps to Reproduce the Problem

  1. Place a salvager
  2. Check the salvager's tick lag contribution with Observable