mirror of
https://github.com/architectury/architectury-api.git
synced 2026-04-03 05:57:40 -05:00
Add LifecycleEvent.SETUP for manipulating things after normal init (#148)
* Add LifecycleEvent.SETUP for manipulating things after normal initialization * Improve javadocs * Fix broken english * Update common/src/main/java/dev/architectury/event/events/common/LifecycleEvent.java Co-authored-by: BasiqueEvangelist <basiqueevangelist@yandex.ru> Signed-off-by: Max <maxh2709@gmail.com>
This commit is contained in:
@@ -20,11 +20,13 @@
|
||||
package dev.architectury.init.fabric;
|
||||
|
||||
import dev.architectury.event.events.client.ClientLifecycleEvent;
|
||||
import dev.architectury.event.events.common.LifecycleEvent;
|
||||
import dev.architectury.networking.fabric.SpawnEntityPacket;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
public class ArchitecturyClient {
|
||||
public static void init() {
|
||||
LifecycleEvent.SETUP.invoker().run();
|
||||
ClientLifecycleEvent.CLIENT_SETUP.invoker().stateChanged(Minecraft.getInstance());
|
||||
|
||||
SpawnEntityPacket.Client.register();
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* This file is part of architectury.
|
||||
* Copyright (C) 2020, 2021 architectury
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
package dev.architectury.init.fabric;
|
||||
|
||||
import dev.architectury.event.events.common.LifecycleEvent;
|
||||
|
||||
public class ArchitecturyServer {
|
||||
public static void init() {
|
||||
LifecycleEvent.SETUP.invoker().run();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user