use of baubles.api.cap.IBaublesItemHandler in project SilentGems by SilentChaos512.
the class BaublesCompat method getBaubles.
public static ItemStackList getBaubles(EntityPlayer player, Predicate<ItemStack> predicate) {
ItemStackList list = ItemStackList.create();
if (!MOD_LOADED)
return list;
IBaublesItemHandler inv = BaublesApi.getBaublesHandler(player);
for (int i = 0; i < inv.getSlots(); ++i) {
ItemStack stack = inv.getStackInSlot(i);
if (StackHelper.isValid(stack) && predicate.apply(stack)) {
list.add(stack);
}
}
return list;
}
use of baubles.api.cap.IBaublesItemHandler in project ConvenientAdditions by Necr0.
the class BaublesApi method getBaubles.
/**
* Retrieves the baubles capability handler wrapped as a IInventory for the supplied player
*/
@Deprecated
public static IInventory getBaubles(EntityPlayer player) {
IBaublesItemHandler handler = player.getCapability(BaublesCapabilities.CAPABILITY_BAUBLES, null);
handler.setPlayer(player);
return new BaublesInventoryWrapper(handler, player);
}
use of baubles.api.cap.IBaublesItemHandler in project ConvenientAdditions by Necr0.
the class BaublesApi method getBaublesHandler.
/**
* Retrieves the baubles inventory capability handler for the supplied player
*/
public static IBaublesItemHandler getBaublesHandler(EntityPlayer player) {
IBaublesItemHandler handler = player.getCapability(BaublesCapabilities.CAPABILITY_BAUBLES, null);
handler.setPlayer(player);
return handler;
}
use of baubles.api.cap.IBaublesItemHandler in project Random-Things by lumien231.
the class BaublesApi method getBaubles.
/**
* Retrieves the baubles capability handler wrapped as a IInventory for the supplied player
*/
@Deprecated
public static IInventory getBaubles(EntityPlayer player) {
IBaublesItemHandler handler = player.getCapability(BaublesCapabilities.CAPABILITY_BAUBLES, null);
handler.setPlayer(player);
return new BaublesInventoryWrapper(handler, player);
}
use of baubles.api.cap.IBaublesItemHandler in project Random-Things by lumien231.
the class BaublesApi method getBaublesHandler.
/**
* Retrieves the baubles inventory capability handler for the supplied player
*/
public static IBaublesItemHandler getBaublesHandler(EntityPlayer player) {
IBaublesItemHandler handler = player.getCapability(BaublesCapabilities.CAPABILITY_BAUBLES, null);
handler.setPlayer(player);
return handler;
}
Aggregations