/// api_version=2
var script = registerScript({
name: "CPUE",
version: "1.0",
authors: ["KepuMxyecoc"]
});
var CPacketUseEntity = Java.type('net.minecraft.network.play.client.CPacketUseEntity');
script.registerModule({
name: "CPUE",
category: "Combat",
description: "send CPUE"
}, function (module) {
module.on("attack", function (event) {
var target = event.getTargetEntity();
if (target !== null) {
var packet = new CPacketUseEntity(target);
mc.player.connection.sendPacket(packet);
}
});
});