/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  meteordevelopment.orbit.EventHandler
 *  net.minecraft.class_1492
 *  net.minecraft.class_2596
 *  net.minecraft.class_2824$class_5907
 */
package meteordevelopment.meteorclient.systems.modules.world;

import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.mixininterface.IPlayerInteractEntityC2SPacket;
import meteordevelopment.meteorclient.systems.modules.Categories;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.class_1492;
import net.minecraft.class_2596;
import net.minecraft.class_2824;

public class MountBypass
extends Module {
    private boolean dontCancel;

    public MountBypass() {
        super(Categories.World, "mount-bypass", "Allows you to bypass the IllegalStacks plugin and put chests on entities.");
    }

    @EventHandler
    public void onSendPacket(PacketEvent.Send event) {
        IPlayerInteractEntityC2SPacket packet;
        if (this.dontCancel) {
            this.dontCancel = false;
            return;
        }
        class_2596<?> class_25962 = event.packet;
        if (class_25962 instanceof IPlayerInteractEntityC2SPacket && (packet = (IPlayerInteractEntityC2SPacket)class_25962).meteor$getType() == class_2824.class_5907.field_29173 && packet.meteor$getEntity() instanceof class_1492) {
            event.cancel();
        }
    }
}

