Astral Sorcery

Astral Sorcery

63M Downloads

Night Vision enchantment causes excess lag

AKA-Syenite opened this issue ยท 3 comments

commented

public void onWornTick(boolean isClient, EntityPlayer base, int level) {

When an item with the night vision enchant is worn, it applies the potion effect every tick, which causes comparatively large amounts of lag relative to other types of enchantments.

commented

Do you have profiling to show this being an issue? "More expensive than other enchantment applications" isn't really a good measuring metric.

commented

When on a terrasteel helm
https://i.imgur.com/hwgPU6y.png
https://i.imgur.com/iQNshdE.png

A fluxed helmet with the same enchant clocked at 562-660 us/t

Without the enchant, the player clocked at about 38 us/t, depending on what else was equipped. The largest spike was definitely the night vision enchantment.

commented

So...1/2 of a millisecond. Not a concern.