package ru.dbotthepony.mc.otm.mixin;

import net.minecraft.advancements.critereon.InventoryChangeTrigger;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.item.ItemStack;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
import ru.dbotthepony.mc.otm.triggers.MatteryInventoryChangeTrigger;

@Mixin(InventoryChangeTrigger.class)
public abstract class InventoryChangeTriggerMixin {
	@Overwrite(remap = false)
	public void trigger(ServerPlayer p_43150_, Inventory p_43151_, ItemStack p_43152_) {
		MatteryInventoryChangeTrigger.INSTANCE.trigger(p_43150_, p_43151_, p_43152_);
	}

	@Overwrite(remap = false)
	private void trigger(ServerPlayer p_43154_, Inventory p_43155_, ItemStack p_43156_, int p_43157_, int p_43158_, int p_43159_) {
		MatteryInventoryChangeTrigger.INSTANCE.trigger(p_43154_, p_43155_, p_43156_, p_43157_, p_43158_, p_43159_);
	}
}
