Skip to content

added WorldEvent listener to ForgeEventProcessor.kt #284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import com.lambda.client.util.text.MessageDetection
import net.minecraftforge.client.event.*
import net.minecraftforge.event.entity.living.LivingEntityUseItemEvent
import net.minecraftforge.event.entity.player.PlayerInteractEvent
import net.minecraftforge.event.world.ChunkEvent
import net.minecraftforge.event.world.WorldEvent
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.gameevent.InputEvent
Expand Down Expand Up @@ -98,8 +98,11 @@ internal object ForgeEventProcessor {
LambdaEventBus.post(event)
}

/**
* Includes events of subclasses like ChunkEvent, ChunkDataEvent, BlockEvent, NoteBlockEvent, GetCollisionBoxesEvent
*/
@SubscribeEvent
fun onChunkLoaded(event: ChunkEvent.Unload) {
fun onWorldEvent(event: WorldEvent) {
LambdaEventBus.post(event)
}

Expand Down