Skip to content

Commit

Permalink
Fix polymer compatability again (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
senseiwells committed Dec 22, 2024
1 parent 011eb0d commit 8345d6f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repositories {
}


val modVersion = "1.2.9"
val modVersion = "1.2.10"
val releaseVersion = "${modVersion}+mc${libs.versions.minecraft.get()}"
version = releaseVersion
group = "me.senseiwells"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class ChunkRecorder internal constructor(
*
* @param packet The packet to be recorded.
*/
override fun sendPacket(packet: Packet<*>) {
override fun sendChunkPacket(packet: Packet<*>) {
this.record(packet)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class PlayerRecorder internal constructor(
*
* @param packet The packet to be recorded.
*/
override fun sendPacket(packet: Packet<*>) {
override fun sendChunkPacket(packet: Packet<*>) {
this.record(PolymerPacketPatcher.replace(this.getPlayerOrThrow().connection, packet))
}

Expand Down Expand Up @@ -185,7 +185,7 @@ class PlayerRecorder internal constructor(
override fun addTrackedEntity(tracked: ChunkSender.WrappedTrackedEntity) {
val list = ArrayList<Packet<ClientGamePacketListener>>()
tracked.getServerEntity().sendPairingData(this.getPlayerOrThrow(), list::add)
this.record(ClientboundBundlePacket(list))
this.sendChunkPacket(ClientboundBundlePacket(list))
}

/**
Expand Down
14 changes: 7 additions & 7 deletions src/main/kotlin/me/senseiwells/replay/recorder/ChunkSender.kt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ interface ChunkSender {
*
* @param packet The packet to send.
*/
fun sendPacket(packet: Packet<*>)
fun sendChunkPacket(packet: Packet<*>)

/**
* This is called when [shouldTrackEntity] returns `true`,
Expand Down Expand Up @@ -111,9 +111,9 @@ interface ChunkSender {
@Internal
fun sendChunkViewDistance() {
val center = this.getCenterChunk()
this.sendPacket(ClientboundSetChunkCacheCenterPacket(center.x, center.z))
this.sendPacket(ClientboundSetChunkCacheRadiusPacket(this.getViewDistance()))
this.sendPacket(ClientboundSetSimulationDistancePacket(this.getViewDistance()))
this.sendChunkPacket(ClientboundSetChunkCacheCenterPacket(center.x, center.z))
this.sendChunkPacket(ClientboundSetChunkCacheRadiusPacket(this.getViewDistance()))
this.sendChunkPacket(ClientboundSetSimulationDistancePacket(this.getViewDistance()))
}

/**
Expand Down Expand Up @@ -152,7 +152,7 @@ interface ChunkSender {

// We don't need to use the chunkSender
// We are only writing the packets to disk...
this.sendPacket(ClientboundLevelChunkWithLightPacket(
this.sendChunkPacket(ClientboundLevelChunkWithLightPacket(
chunk,
chunk.level.lightEngine,
null,
Expand Down Expand Up @@ -184,10 +184,10 @@ interface ChunkSender {
}

for (entity in leashed) {
this.sendPacket(ClientboundSetEntityLinkPacket(entity, entity.leashHolder))
this.sendChunkPacket(ClientboundSetEntityLinkPacket(entity, entity.leashHolder))
}
for (entity in ridden) {
this.sendPacket(ClientboundSetPassengersPacket(entity))
this.sendChunkPacket(ClientboundSetPassengersPacket(entity))
}

this.onChunkSent(chunk)
Expand Down

0 comments on commit 8345d6f

Please sign in to comment.