This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite to use paper's mapped userdev + reflection
- Loading branch information
Showing
11 changed files
with
182 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Submodule minecraft-data
deleted from
111735
13 changes: 13 additions & 0 deletions
13
protocolburrito-api/src/main/kotlin/com/mineinabyss/protocolburrito/FieldHelpers.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.mineinabyss.protocolburrito | ||
|
||
object FieldHelpers { | ||
fun <T : Any> getField(forObject: Any, type: Class<T>, index: Int): T { | ||
var id = 0 | ||
return forObject::class.java.fields.first { it.type.kotlin == type && index == id++ }.get(forObject) as T | ||
} | ||
|
||
fun <T : Any> setField(forObject: Any, type: Class<T>, index: Int, value: T) { | ||
var id = 0 | ||
forObject::class.java.fields.first { it.type == type && index == id++ }.set(forObject, value) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
protocolburrito-generator/src/main/kotlin/com/mineinabyss/protocolburrito/generation/Main.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package com.mineinabyss.protocolburrito.generation | ||
|
||
fun main() { | ||
generateEntityIdMapper() | ||
generateProtocolWrappers() | ||
// generateEntityIdMapper() | ||
// generateProtocolWrappers() | ||
generateProtocolExtensions() | ||
} |
60 changes: 0 additions & 60 deletions
60
...o-generator/src/main/kotlin/com/mineinabyss/protocolburrito/generation/PacketIdMapping.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.