diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/capability/CapabilityMinecartController.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/capability/CapabilityMinecartController.java index 19bd2ef7f..cf3b5abe2 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/capability/CapabilityMinecartController.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/capability/CapabilityMinecartController.java @@ -36,6 +36,7 @@ import net.minecraftforge.common.capabilities.ICapabilitySerializable; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.common.util.NonNullConsumer; import net.minecraftforge.event.AttachCapabilitiesEvent; +import net.minecraftforge.event.entity.player.PlayerEvent; import net.minecraftforge.event.world.ChunkEvent; public class CapabilityMinecartController implements ICapabilitySerializable { @@ -200,6 +201,7 @@ public class CapabilityMinecartController implements ICapabilitySerializable() { diff --git a/src/main/java/com/simibubi/create/events/CommonEvents.java b/src/main/java/com/simibubi/create/events/CommonEvents.java index eef7bbb7f..3120fb8d1 100644 --- a/src/main/java/com/simibubi/create/events/CommonEvents.java +++ b/src/main/java/com/simibubi/create/events/CommonEvents.java @@ -9,6 +9,7 @@ import com.simibubi.create.content.contraptions.fluids.recipe.PotionMixingRecipe import com.simibubi.create.content.contraptions.wrench.WrenchItem; import com.simibubi.create.content.schematics.ServerSchematicLoader; import com.simibubi.create.foundation.command.AllCommands; +import com.simibubi.create.foundation.utility.Debug; import com.simibubi.create.foundation.utility.ServerSpeedProvider; import com.simibubi.create.foundation.utility.WorldAttached; import com.simibubi.create.foundation.utility.recipe.RecipeFinder; @@ -25,6 +26,7 @@ import net.minecraftforge.event.TickEvent.WorldTickEvent; import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.player.AttackEntityEvent; +import net.minecraftforge.event.entity.player.PlayerEvent; import net.minecraftforge.event.world.ChunkEvent; import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -121,5 +123,10 @@ public class CommonEvents { public static void attachCapabilities(AttachCapabilitiesEvent event) { CapabilityMinecartController.attach(event); } + + @SubscribeEvent + public static void startTracking(PlayerEvent.StartTracking event) { + CapabilityMinecartController.startTracking(event); + } }