use of dev.hypnotic.event.events.EventTick in project Hypnotic-Client by Hypnotic-Development.
the class MinecraftClientMixin method onPreTick.
@Inject(at = @At("HEAD"), method = "tick")
private void onPreTick(CallbackInfo info) {
BlockIterator.INSTANCE.onTick();
EventTick event = new EventTick();
event.call();
if (ModuleManager.INSTANCE.getModule(DiscordRPCModule.class).isEnabled()) {
if (mc.player == null) {
if (mc.currentScreen instanceof HypnoticMainMenu)
DiscordRPCModule.status = "In main menu";
if (mc.currentScreen instanceof SelectWorldScreen)
DiscordRPCModule.status = "Browsing worlds";
if (mc.currentScreen instanceof MultiplayerScreen)
DiscordRPCModule.status = "Browsing servers";
} else {
if (mc.isInSingleplayer())
DiscordRPCModule.status = "Playing singlelplayer";
if (mc.getCurrentServerEntry() != null && !mc.isInSingleplayer())
DiscordRPCModule.status = ModuleManager.INSTANCE.getModule(DiscordRPCModule.class).serverpriv.isEnabled() ? "Playing multiplayer." : "Playing multiplayer on " + mc.getCurrentServerEntry().address;
}
}
}
Aggregations