Skip to content

Commit

Permalink
Support 1.21.1
Browse files Browse the repository at this point in the history
  • Loading branch information
barribob committed Oct 13, 2024
1 parent a41fbaf commit 12c6895
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions src/main/kotlin/net/barribob/boss/utils/VanillaCopies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import net.barribob.boss.utils.ModUtils.normal
import net.barribob.maelstrom.static_utilities.MathUtils
import net.minecraft.block.*
import net.minecraft.block.enums.DoubleBlockHalf
import net.minecraft.client.MinecraftClient
import net.minecraft.client.network.ClientPlayNetworkHandler
import net.minecraft.client.particle.BillboardParticle
import net.minecraft.client.render.*
import net.minecraft.client.render.entity.DragonFireballEntityRenderer
Expand All @@ -24,7 +22,6 @@ import net.minecraft.entity.damage.DamageType
import net.minecraft.entity.mob.FlyingEntity
import net.minecraft.entity.mob.MobEntity
import net.minecraft.entity.player.PlayerEntity
import net.minecraft.network.packet.s2c.play.EntitySpawnS2CPacket
import net.minecraft.registry.RegistryKey
import net.minecraft.registry.RegistryKeys
import net.minecraft.registry.tag.BlockTags
Expand Down Expand Up @@ -106,30 +103,6 @@ object VanillaCopies {
return oldAngle + f
}

/**
* [ClientPlayNetworkHandler.onEntitySpawn]
*/
fun handleClientSpawnEntity(client: MinecraftClient, packet: EntitySpawnS2CPacket) {
val d: Double = packet.x
val e: Double = packet.y
val f: Double = packet.z
val entityType = packet.entityType
val world = client.world ?: return

val entity15 = entityType.create(world)

if (entity15 != null) {
val i: Int = packet.id
entity15.updateTrackedPosition(d, e, f)
entity15.refreshPositionAfterTeleport(d, e, f)
entity15.pitch = (packet.pitch * 360) / 256.0f
entity15.yaw = (packet.yaw * 360) / 256.0f
entity15.id = i
entity15.uuid = packet.uuid
world.addEntity(entity15 as Entity?)
}
}

/**
* [DragonFireballEntityRenderer.render]
*/
Expand Down

0 comments on commit 12c6895

Please sign in to comment.