EvilCraft

EvilCraft

19M Downloads

Vengeance ring lag due to constantly recreating objects

jeremiahwinsley opened this issue ยท 1 comments

commented

Issue type:

  • ๐ŸŒ Performance issue

Short description:

When the vengeance ring is active, these two constructors are called repeatedly, causing a large amount of lag. This TagKey could just be created once for the entire mod and reused.

&& !level1.getBlockState(blockPos1).is(TagKey.create(Registry.BLOCK_REGISTRY, new ResourceLocation("evilcraft:vengeance_spirit_blocker"))), true);

2022-09-29 20_55_25-Window

Steps to reproduce the problem:

  1. turn on vengeance ring (not sure if it needs to be in a curios slot, but was when this profile was taken)
  2. run spark profile

Versions:

  • This mod: 1.2.8
  • Minecraft: 1.19.2
  • Forge: 43.1.27

Profiler output:

https://spark.lucko.me/m7J50qlNz9

commented

Thanks for reporting!