Skip to content

Added BlockEvent to ForgeEventProcessor.kt #291

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
11 changes: 10 additions & 1 deletion src/main/kotlin/com/lambda/client/event/ForgeEventProcessor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +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.BlockEvent
import net.minecraftforge.event.world.WorldEvent
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
Expand Down Expand Up @@ -99,13 +100,21 @@ internal object ForgeEventProcessor {
}

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

/**
* Also includes NoteBlockEvent
*/
@SubscribeEvent
fun onBlockEvent(event: BlockEvent) {
LambdaEventBus.post(event)
}

@SubscribeEvent
fun onInputUpdate(event: InputUpdateEvent) {
LambdaEventBus.post(event)
Expand Down