mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-14 18:53:43 +01:00
Tangled handlers
- Fixed server-side ticking code called from the render thread with forge 40.2.1 and up
This commit is contained in:
parent
52593a2ae9
commit
8cf282372c
2 changed files with 5 additions and 2 deletions
|
@ -8,7 +8,7 @@ mod_version = 0.5.0.i
|
||||||
artifact_minecraft_version = 1.18.2
|
artifact_minecraft_version = 1.18.2
|
||||||
|
|
||||||
minecraft_version = 1.18.2
|
minecraft_version = 1.18.2
|
||||||
forge_version = 40.1.60
|
forge_version = 40.2.1
|
||||||
|
|
||||||
# build dependency versions
|
# build dependency versions
|
||||||
forgegradle_version = 5.1.53
|
forgegradle_version = 5.1.53
|
||||||
|
|
|
@ -60,6 +60,7 @@ import net.minecraftforge.event.world.ChunkEvent;
|
||||||
import net.minecraftforge.event.world.WorldEvent;
|
import net.minecraftforge.event.world.WorldEvent;
|
||||||
import net.minecraftforge.eventbus.api.EventPriority;
|
import net.minecraftforge.eventbus.api.EventPriority;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
|
import net.minecraftforge.fml.LogicalSide;
|
||||||
import net.minecraftforge.fml.ModList;
|
import net.minecraftforge.fml.ModList;
|
||||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||||
import net.minecraftforge.forgespi.language.IModFileInfo;
|
import net.minecraftforge.forgespi.language.IModFileInfo;
|
||||||
|
@ -120,9 +121,11 @@ public class CommonEvents {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onWorldTick(WorldTickEvent event) {
|
public static void onServerWorldTick(WorldTickEvent event) {
|
||||||
if (event.phase == Phase.START)
|
if (event.phase == Phase.START)
|
||||||
return;
|
return;
|
||||||
|
if (event.side == LogicalSide.CLIENT)
|
||||||
|
return;
|
||||||
Level world = event.world;
|
Level world = event.world;
|
||||||
ContraptionHandler.tick(world);
|
ContraptionHandler.tick(world);
|
||||||
CapabilityMinecartController.tick(world);
|
CapabilityMinecartController.tick(world);
|
||||||
|
|
Loading…
Reference in a new issue