Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Forge only fires WorldTickEvent with LogicalSide server #120

Open
kitlith opened this issue Jul 11, 2020 · 0 comments
Open

Forge only fires WorldTickEvent with LogicalSide server #120

kitlith opened this issue Jul 11, 2020 · 0 comments

Comments

@kitlith
Copy link
Contributor

kitlith commented Jul 11, 2020

patchwork (LifecycleEvents):

        public static void fireWorldTickEvent(TickEvent.Phase phase, World world) {
		LogicalSide side = world.isClient() ? LogicalSide.CLIENT : LogicalSide.SERVER;
		TickEvent.WorldTickEvent event = new TickEvent.WorldTickEvent(side, phase, world);

		MinecraftForge.EVENT_BUS.post(event);
	}

YarnForge (BasicEventHooks):

	public static void onPreWorldTick(World world) {
		MinecraftForge.EVENT_BUS.post(new TickEvent.WorldTickEvent(LogicalSide.SERVER, TickEvent.Phase.START, world));
	}

	public static void onPostWorldTick(World world) {
		MinecraftForge.EVENT_BUS.post(new TickEvent.WorldTickEvent(LogicalSide.SERVER, TickEvent.Phase.END, world));
	}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant