package com.zivilon.cindercore.mixins;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Dynamic;
import org.spongepowered.asm.mixin.Shadow;
import net.minecraft.network.play.server.S21PacketChunkData;

@Mixin(S21PacketChunkData.class)
public abstract class MixinS21PacketChunkData {

    @Shadow private int field_149284_a; // X Coordinates
    @Shadow private int field_149282_b; // Z Coordinates

    // I have no idea but these are needed to decode the packet
    @Shadow private int field_149283_c;
    @Shadow private int field_149280_d;
    @Shadow private byte[] field_149278_f;
    @Shadow private boolean field_149279_g;

    @Dynamic // Get Chunk X coordinates in packet
    public int func_149273_e()
    {
        return this.field_149284_a;
    }

    @Dynamic // Get Chunk Z coordinates in packet
    public int func_149271_f()
    {
        return this.field_149282_b;
    }

    // I have no idea but these are needed to decode the packet
    @Dynamic
    public byte[] func_149272_d()
    {
        return this.field_149278_f;
    }
    @Dynamic
    public int func_149276_g()
    {
        return this.field_149283_c;
    }
    @Dynamic
    public int func_149270_h()
    {
        return this.field_149280_d;
    }
    @Dynamic
    public boolean func_149274_i()
    {
        return this.field_149279_g;
    }
}
