com.parzivail.util.world.InventoryUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pswg Show documentation
Show all versions of pswg Show documentation
Explore the galaxy with Galaxies: Parzi's Star Wars Mod!
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