All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.parzivail.util.world.InventoryUtil Maven / Gradle / Ivy

There is a newer version: 0.0.114+1.20.2
Show newest version
package com.parzivail.util.world;

import net.minecraft.class_1263;
import net.minecraft.class_1799;

public class InventoryUtil
{
	public static int getSlotWithStack(class_1263 inventory, class_1799 stack)
	{
		for (int i = 0; i < inventory.method_5439(); i++)
			// purposefully checking for reference equality here
			if (inventory.method_5438(i) == stack)
				return i;

		return -1;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy