Carpet

Carpet

2M Downloads

Tick Health shows ms from BlockEvents section as Village.

Andrews54757 opened this issue ยท 1 comments

commented

private void stopBlockStartVillageSection(BooleanSupplier booleanSupplier_1, CallbackInfo ci)
{
if (currentSection != null)
{
CarpetProfiler.end_current_section(currentSection);
currentSection = CarpetProfiler.start_section((World) (Object) this, "Village", CarpetProfiler.TYPE.GENERAL);
}
}
@Inject(method = "tick", at = @At(
value = "CONSTANT",
args = "stringValue=tickPending"
))
private void stopVillageStartBlockAgainSection(BooleanSupplier booleanSupplier_1, CallbackInfo ci)
{
if (currentSection != null)
{
CarpetProfiler.end_current_section(currentSection);
currentSection = CarpetProfiler.start_section((World) (Object) this, "Blocks", CarpetProfiler.TYPE.GENERAL);
}
}

Village section ends after constant stringValue=tickPending. However, the order of execution is reversed in the game's code.

(1.15.2 yarn)
Screen Shot 2020-08-02 at 7 59 57 PM

Results in block event ms being shown under village section.

(1.15.2)
2020-08-01_08 02 43

commented

good to know ๐Ÿ‘