1
0
mirror of https://github.com/kami-blue/client synced 2025-02-20 23:27:14 +00:00

Revert "deleted mount bypass"

This reverts commit 372b5b4b01.
This commit is contained in:
Dominika 2020-05-24 13:38:28 -04:00 committed by Dominika
parent 372b5b4b01
commit f2d867d447
No known key found for this signature in database
GPG Key ID: B4A5A6DCA70F861F

View File

@ -0,0 +1,32 @@
package me.zeroeightsix.kami.module.modules.misc
import me.zero.alpine.listener.EventHandler
import me.zero.alpine.listener.EventHook
import me.zero.alpine.listener.Listener
import me.zeroeightsix.kami.event.events.PacketEvent
import me.zeroeightsix.kami.module.Module
import net.minecraft.entity.passive.AbstractChestHorse
import net.minecraft.network.play.client.CPacketUseEntity
/*
* by ionar2
*/
@Module.Info(
name = "MountBypass",
category = Module.Category.MISC,
description = "Might allow you to mount chested animals on servers that block it"
)
class MountBypass : Module() {
@EventHandler
private val onPacketEventSend = Listener(EventHook { event: PacketEvent.Send ->
if (event.packet is CPacketUseEntity) {
val packet = event.packet as CPacketUseEntity
if (packet.getEntityFromWorld(mc.world) is AbstractChestHorse) {
if (packet.action == CPacketUseEntity.Action.INTERACT_AT) {
event.cancel()
}
}
}
})
}