com.parzivail.util.item.TrinketUtil Maven / Gradle / Ivy
package com.parzivail.util.item;
import dev.emi.trinkets.api.TrinketComponent;
import dev.emi.trinkets.api.TrinketsApi;
import java.util.List;
import java.util.Optional;
import net.minecraft.class_1309;
import net.minecraft.class_1792;
import net.minecraft.class_1799;
public class TrinketUtil
{
public static class_1799 getEquipped(class_1309 entity, class_1792 item)
{
var t = TrinketsApi.getTrinketComponent(entity);
if (t.isEmpty())
return class_1799.field_8037;
var c = t.get();
var stack = c.getEquipped(item);
if (stack.isEmpty())
return class_1799.field_8037;
return stack.get(0).method_15441();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy