Skip to content
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

Update to 1.21.5 #135

Draft
wants to merge 68 commits into
base: master
Choose a base branch
from
Draft

Update to 1.21.5 #135

wants to merge 68 commits into from

Conversation

LukynkaCZE
Copy link
Contributor

@LukynkaCZE LukynkaCZE commented Mar 26, 2025

  • Update registries
    • Add new entity variant data generators
    • Add dockyard registries for new entity variants
    • Add NBT writer for new entity variants
  • Make abstract data generator for entity variants
  • Update protocol
  • Look at NBT changes
  • Add Saddle equipment slot
  • Update Entity Metadata thingies
  • Add minecraft:custom_data to entities
  • Update item components
  • Update particles and particle data
  • Update scroll text component format

@LukynkaCZE
Copy link
Contributor Author

State is joinable

Comment on lines +20 to +31
fun <T> KClass<*>.read(buffer: ByteBuf): T {
val companion = this.companionObject ?: throw IllegalStateException("Class $simpleName does not have companion object")
val readFunction = companionObject!!.declaredMemberFunctions.find { member -> member.name == "read" } ?: throw IllegalStateException("Class $simpleName does not have a read function")
try {
@Suppress("UNCHECKED_CAST")
return readFunction.call(companion.objectInstance as (NetworkReadable<T>), buffer) as T
} catch (exception: Exception) {
log("Failed to call read on class ${this.simpleName}")
log(exception)
throw IllegalStateException("Calling the read method failed: $exception")
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does this exist

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure, but it is there for stuff that is not NetworkReadable yet ig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants