Add render option for hiding player name tags
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package eu.crushedpixel.replaymod.video.entity;
|
||||
|
||||
import eu.crushedpixel.replaymod.coremod.asm_Hooks;
|
||||
import eu.crushedpixel.replaymod.renderer.SpectatorRenderer;
|
||||
import eu.crushedpixel.replaymod.replay.ReplayHandler;
|
||||
import eu.crushedpixel.replaymod.settings.RenderOptions;
|
||||
@@ -59,6 +60,10 @@ public class CustomEntityRenderer<D extends CaptureData> implements eu.crushedpi
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new Error(e);
|
||||
}
|
||||
|
||||
if (options.isHideNameTags()) {
|
||||
asm_Hooks.DO_NOT_RENDER_NAME_TAGS = true;
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused") // Method called by ASM hook
|
||||
@@ -408,6 +413,8 @@ public class CustomEntityRenderer<D extends CaptureData> implements eu.crushedpi
|
||||
throw new Error(e);
|
||||
}
|
||||
|
||||
asm_Hooks.DO_NOT_RENDER_NAME_TAGS = false;
|
||||
|
||||
spectatorRenderer.cleanup();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user