[1.20.1] Apotheosis | Apotheosis performance issue
Crankonator opened this issue ยท 2 comments
Hello, we are experiencing some performance issues with Apotheosis.
We believe the issue to be on your end and believe it would be worth looking into.
I have attached a spark log to show what's going on.
https://spark.lucko.me/9fFxCNWMGy
a lot of it is from the shield breaker test
the checks seem to be for the equipment sound
might be best to call handItems.set(EquipmentSlot.OFFHAND.getIndex(), shield)
instead
public void setItemSlot(EquipmentSlot pSlot, ItemStack pStack) {
this.verifyEquippedItem(pStack);
switch (pSlot.getType()) {
case HAND:
this.onEquipItem(pSlot, this.handItems.set(pSlot.getIndex(), pStack), pStack);
break;
case ARMOR:
this.onEquipItem(pSlot, this.armorItems.set(pSlot.getIndex(), pStack), pStack);
}
}
public void onEquipItem(EquipmentSlot p_238393_, ItemStack p_238394_, ItemStack p_238395_) {
boolean flag = p_238395_.isEmpty() && p_238394_.isEmpty();
if (!flag && !ItemStack.isSameIgnoreDurability(p_238394_, p_238395_) && !this.firstTick) {
if (p_238393_.getType() == EquipmentSlot.Type.ARMOR) {
this.playEquipSound(p_238395_);
}
if (this.doesEmitEquipEvent(p_238393_)) {
this.gameEvent(GameEvent.EQUIP);
}
}
}