-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
15 changed files
with
94 additions
and
114 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,7 +75,7 @@ tasks { | |
} | ||
|
||
compileKotlin { | ||
kotlinOptions.jvmTarget = "17" | ||
kotlinOptions.jvmTarget = "21" | ||
} | ||
} | ||
|
||
|
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,14 +1,14 @@ | ||
kotlin.code.style=official | ||
archives_base_name=build-bugs | ||
maven_group=de.derniklaas | ||
loom_version=1.5-SNAPSHOT | ||
minecraft_version=1.20.4 | ||
yarn_mappings=1.20.4+build.3 | ||
loader_version=0.15.1 | ||
fabric_kotlin_version=1.10.17+kotlin.1.9.22 | ||
fabric_api_version=0.95.4+1.20.4 | ||
mod_version=1.10.0 | ||
noxesium_version=1.2.0 | ||
adventure_version=5.12.0 | ||
loom_version=1.6-SNAPSHOT | ||
minecraft_version=1.20.6 | ||
yarn_mappings=1.20.6+build.1 | ||
loader_version=0.15.11 | ||
fabric_kotlin_version=1.10.20+kotlin.1.9.24 | ||
fabric_api_version=0.97.8+1.20.6 | ||
mod_version=1.11.0 | ||
noxesium_version=2.0.4 | ||
adventure_version=5.13.0 | ||
|
||
org.gradle.jvmargs=-Xmx4000m |
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-8.3-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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
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
60 changes: 60 additions & 0 deletions
60
src/main/kotlin/de/derniklaas/buildbugs/NoxesiumPacketHandler.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,60 @@ | ||
package de.derniklaas.buildbugs | ||
|
||
import com.noxcrew.noxesium.network.NoxesiumPackets | ||
import com.noxcrew.noxesium.network.clientbound.ClientboundMccGameStatePacket | ||
import com.noxcrew.noxesium.network.clientbound.ClientboundMccServerPacket | ||
import de.derniklaas.buildbugs.utils.Utils | ||
|
||
class NoxesiumPacketHandler { | ||
|
||
init { | ||
NoxesiumPackets.MCC_SERVER.addListener(this) { _, packet, _ -> | ||
onServerPacket(packet) | ||
} | ||
NoxesiumPackets.MCC_GAME_STATE.addListener(this) { _, packet, _ -> | ||
onStatePacket(packet) | ||
} | ||
} | ||
|
||
private fun onServerPacket(packet: ClientboundMccServerPacket) { | ||
BugCreator.handleServerStatePacket(packet, packet.serverType != Constants.PARKOUR_WARRIOR) | ||
|
||
// Set default map names in PKW | ||
if (packet.serverType == Constants.PARKOUR_WARRIOR) { | ||
if (Utils.isOnEventServer()) { | ||
BugCreator.updateMap("Start Area") | ||
} else { | ||
when (packet.subType) { | ||
Constants.PARKOUR_WARRIOR_DAILY, Constants.PARKOUR_WARRIOR_DOJO -> { | ||
BugCreator.updateMap("Dojo Entrance") | ||
} | ||
|
||
Constants.PARKOUR_WARRIOR_SURVIVOR -> { | ||
BugCreator.updateMap("Survivor Start") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
private fun onStatePacket(packet: ClientboundMccGameStatePacket) { | ||
// Set the map to Post Game during the Podium Phase | ||
if (packet.stage == Constants.PODIUM_PHASE) { | ||
BugCreator.updateMap("Post Game") | ||
return | ||
} | ||
|
||
// ignore parkour warrior updates, as they only contain "Parkour Warrior Survivor" or nothing | ||
// also ignore the podium phase as it overwrites the map part | ||
if (BugCreator.gameState.serverType == Constants.PARKOUR_WARRIOR && Utils.isOnIsland()) { | ||
// Provide debug info | ||
Utils.sendDebugMessage("Blocked GameStatePacket: (name: <green>${packet.mapName}</green>, id: ${packet.mapId}, phase: ${packet.phaseType}, stage: ${packet.stage})") | ||
|
||
return | ||
} | ||
|
||
Utils.sendDebugMessage("Received GameStatePacket: (name: <green>${packet.mapName}</green>, id: ${packet.mapId}, phase: ${packet.phaseType}, stage: ${packet.stage})") | ||
BugCreator.updateMap(packet.mapName) | ||
} | ||
|
||
} |
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
39 changes: 0 additions & 39 deletions
39
src/main/kotlin/de/derniklaas/buildbugs/mixin/NoxesiumMccGameStatePacketMixin.kt
This file was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
src/main/kotlin/de/derniklaas/buildbugs/mixin/NoxesiumMccServerPacketMixin.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
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