Есть класс.
И есть класс
Как сделать чтобы
выполнялось каждый тик, когда
Java:
public class ClientTickEvent {
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event){
if (event.phase == Phase.START) {
}
}
}
Java:
public class ReconnectEvent{
public static float reconnectDelay = 6;
@SubscribeEvent
public void DisconnectGuiOpenEvent(GuiScreenEvent.InitGuiEvent.Post event){
if(event.gui instanceof GuiDisconnected){
event.buttonList.add(new GuiButton(1, event.gui.width / 2 - 100, event.gui.height / 3 + 120 + 12, "Reconnect in "+ reconnectDelay + "..."));
reconnectDelay -= 0.05;
event.buttonList.remove(1);
}
}
}
Java:
event.buttonList.add(new GuiButton(1, event.gui.width / 2 - 100, event.gui.height / 3 + 120 + 12, "Reconnect in "+ reconnectDelay + "..."));
reconnectDelay -= 0.05;
event.buttonList.remove(1);
Java:
if(event.gui instanceof GuiDisconnected)