Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 961c32d

Browse files
committed
Fix missing data component in registry
1 parent 15aab64 commit 961c32d

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
kotlin.daemon.jvmargs=-Xmx3000m
2-
dockyard.version=0.9.9.4-SNAPSHOT
2+
dockyard.version=0.9.9.5-SNAPSHOT
33
kotlin.code.style=official

src/main/kotlin/io/github/dockyardmc/data/DataComponentRegistry.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ object DataComponentRegistry {
7070
val BLOCK_ENTITY_DATA = register("minecraft:block_entity_data", BlockEntityDataComponent::class)
7171
val INSTRUMENT = register("minecraft:instrument", InstrumentComponent::class)
7272
val PROVIDES_TRIM_MATERIAL = register("minecraft:provides_trim_material", ProvidesTrimMaterialComponent::class)
73+
val OMINOUS_BOTTLE_AMPLIFIER = register("minecraft:ominous_battle_amplifier", OminousBattleAmplifier::class)
7374
val JUKEBOX_PLAYABLE = register("minecraft:jukebox_playable", JukeboxPlayableComponent::class)
7475
val PROVIDES_BANNER_PATTERNS = register("minecraft:provides_banner_patterns", ProvidesBannerPatterns::class)
7576
val RECIPES = register("minecraft:recipes", RecipesComponent::class)

src/main/kotlin/io/github/dockyardmc/protocol/decoders/PacketLengthDecoder.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class PacketLengthDecoder : ByteToMessageDecoder() {
1818
val length = buffer.readVarInt()
1919

2020
// reset the reader index if we don't have enough bytes and wait for next part of the message to arrive and check again
21-
if(length > buffer.readableBytes()) {
21+
if (length > buffer.readableBytes()) {
2222
buffer.resetReaderIndex()
2323
return
2424
}
@@ -32,7 +32,8 @@ class PacketLengthDecoder : ByteToMessageDecoder() {
3232

3333
override fun exceptionCaught(connection: ChannelHandlerContext, cause: Throwable) {
3434
log("Error occurred while decoding frame: ", LogType.ERROR)
35-
log(cause.cause as Exception)
35+
val exception = (if (cause.cause == null) cause else cause.cause) as Exception
36+
log(exception)
3637
connection.channel().close().sync()
3738
}
3839
}

0 commit comments

Comments
 (0)