@@ -40,6 +40,7 @@ import com.lambda.threading.runSafe
4040import com.lambda.threading.runSafeGameScheduled
4141import com.lambda.util.BlockUtils.blockState
4242import com.lambda.util.Communication.info
43+ import com.lambda.util.PacketUtils.sendPacket
4344import com.lambda.util.Timer
4445import com.lambda.util.collections.LimitedDecayQueue
4546import com.lambda.util.combat.CombatUtils.crystalDamage
@@ -188,13 +189,13 @@ object CrystalAura : Module(
188189 }
189190
190191 // Update last received entity spawn
191- listen<EntityEvent .EntitySpawn >(alwaysListen = true ) { event ->
192+ listen<EntityEvent .Spawn >(alwaysListen = true ) { event ->
192193 lastEntityId = event.entity.id
193194 predictionTimer.reset()
194195 }
195196
196197 // Prediction
197- listen<EntityEvent .EntitySpawn > { event ->
198+ listen<EntityEvent .Spawn > { event ->
198199 val crystal = event.entity as ? EndCrystalEntity ? : return @listen
199200 val pos = crystal.baseBlockPos
200201
@@ -217,7 +218,7 @@ object CrystalAura : Module(
217218 if (placePostPause) placeTimer.reset()
218219 }
219220
220- listen<EntityEvent .EntityRemoval > { event ->
221+ listen<EntityEvent .Removal > { event ->
221222 val crystal = event.entity as ? EndCrystalEntity ? : return @listen
222223 val pos = crystal.baseBlockPos
223224
@@ -272,21 +273,21 @@ object CrystalAura : Module(
272273 }
273274
274275 private fun SafeContext.placeInternal (opportunity : Opportunity , hand : Hand ) {
275- connection.sendPacket(
276+ connection.sendPacket {
276277 PlayerInteractBlockC2SPacket (
277278 hand, BlockHitResult (opportunity.crystalPosition, opportunity.side, opportunity.blockPos, false ), 0
278279 )
279- )
280+ }
280281
281282 player.swingHand(hand)
282283 }
283284
284285 private fun SafeContext.explodeInternal (id : Int ) {
285- connection.sendPacket(
286+ connection.sendPacket {
286287 PlayerInteractEntityC2SPacket (
287288 id, player.isSneaking, PlayerInteractEntityC2SPacket .ATTACK
288289 )
289- )
290+ }
290291
291292 player.swingHand(Hand .MAIN_HAND )
292293 }
0 commit comments