Fixed enqueued world tasks not happening

This commit is contained in:
Sollace 2020-05-28 18:09:53 +02:00
parent 8b3de321f0
commit ad4a449723
2 changed files with 3 additions and 1 deletions

View file

@ -29,7 +29,7 @@ public class AwaitTickQueue {
}
}
public void tick(World world) {
static void tick(World world) {
synchronized (LOCKER) {
DELAYED_TASKS = DELAYED_TASKS.stream().filter(DelayedTask::tick).collect(Collectors.toList());

View file

@ -1,6 +1,7 @@
package com.minelittlepony.unicopia;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.event.world.WorldTickCallback;
import net.fabricmc.fabric.api.loot.v1.FabricLootSupplier;
import net.fabricmc.fabric.api.loot.v1.event.LootTableLoadingCallback;
import net.fabricmc.fabric.api.resource.ResourceManagerHelper;
@ -52,6 +53,7 @@ public class Unicopia implements ModInitializer {
CriterionsRegistry.register(BOHDeathCriterion.INSTANCE);
ResourceManagerHelper.get(ResourceType.SERVER_DATA).registerReloadListener(Pages.instance());
WorldTickCallback.EVENT.register(AwaitTickQueue::tick);
LootTableLoadingCallback.EVENT.register((res, manager, id, supplier, setter) -> {
if (!"minecraft".contentEquals(id.getNamespace())) {