Skip to content

Commit

Permalink
fix: isRelevant never getting called, oops fuck
Browse files Browse the repository at this point in the history
  • Loading branch information
radstevee committed Oct 17, 2024
1 parent 97f3512 commit 9dec1c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ yarn_mappings=1.21.1+build.3
loader_version=0.16.7
kotlin_loader_version=1.12.3+kotlin.2.0.21
# Mod Properties
mod_version=1.0
mod_version=1.1
maven_group=net.mcbrawls
archives_base_name=inject
# Dependencies
Expand Down
6 changes: 6 additions & 0 deletions src/main/kotlin/net/mcbrawls/inject/Injector.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ abstract class Injector : ChannelDuplexHandler() {

override fun channelRead(ctx: ChannelHandlerContext, msg: Any) {
val buf = msg as ByteBuf
val context = InjectorContext(ctx.pipeline(), buf)
if (!isRelevant(context)) {
super.channelRead(ctx, msg)
return
}

val shouldDelegate = !onRead(ctx, buf)

if (shouldDelegate) super.channelRead(ctx, msg)
Expand Down

0 comments on commit 9dec1c4

Please sign in to comment.