Attempt to avoid errors with wrolds being unloaded. Attempts to fix
*/
package org.spongepowered.mod.event;
+import net.minecraft.world.World;
import net.minecraftforge.fml.common.eventhandler.Event;
import net.minecraftforge.fml.common.eventhandler.IEventListener;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import org.spongepowered.common.event.tracking.PhaseContext;
import org.spongepowered.common.event.tracking.phase.plugin.PluginPhase;
import org.spongepowered.common.interfaces.world.IMixinWorld;
+import org.spongepowered.common.interfaces.world.IMixinWorldServer;
import javax.annotation.Nullable;
public static PhaseContext<?> preEventPhaseCheck(IEventListener listener, Event event) {
if (event instanceof TickEvent.WorldTickEvent) {
final TickEvent.WorldTickEvent worldTickEvent = (TickEvent.WorldTickEvent) event;
- if (((IMixinWorld) worldTickEvent.world).isFake()) {
+ final World world = worldTickEvent.world;
+ if (((IMixinWorld) world).isFake()) {
return null;
}
if (worldTickEvent.phase == TickEvent.Phase.START) {
