本文整理匯總了Java中baubles.api.BaubleType.BELT屬性的典型用法代碼示例。如果您正苦於以下問題:Java BaubleType.BELT屬性的具體用法?Java BaubleType.BELT怎麽用?Java BaubleType.BELT使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類baubles.api.BaubleType
的用法示例。
在下文中一共展示了BaubleType.BELT屬性的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: isItemValid
@Override
public boolean isItemValid(ItemStack stack) {
Item item = stack.getItem();
if (type >= ARMOR_HELMET && type <= ARMOR_BOOTS) {
return item != null && item.isValidArmor(stack, type, null);
} else if (GearSwap.baubles && type >= BAUBLE_RING && type <= BAUBLE_BELT) {
if (item == null) {
return false;
}
if (!(item instanceof IBauble)) {
return false;
}
IBauble bauble = (IBauble) item;
BaubleType baubleType = bauble.getBaubleType(stack);
return (baubleType == BaubleType.AMULET && type == BAUBLE_AMULET) ||
(baubleType == BaubleType.RING && type == BAUBLE_RING) ||
(baubleType == BaubleType.BELT && type == BAUBLE_BELT);
} else {
return true;
}
}
示例2: isItemValidForSlot
/**
* Returns true if automation is allowed to insert the given stack (ignoring
* stack size) into the given slot.
*/
@Override
public boolean isItemValidForSlot(int i, ItemStack stack) {
if (stack == null || !(stack.getItem() instanceof IBauble)
|| !((IBauble) stack.getItem()).canEquip(stack, player.get()))
return false;
if (i == 0
&& ((IBauble) stack.getItem()).getBaubleType(stack) == BaubleType.AMULET)
return true;
if ((i == 1 || i == 2)
&& ((IBauble) stack.getItem()).getBaubleType(stack) == BaubleType.RING)
return true;
if (i == 3
&& ((IBauble) stack.getItem()).getBaubleType(stack) == BaubleType.BELT)
return true;
return false;
}
示例3: getBaubleType
public BaubleType getBaubleType(final ItemStack itemstack) {
return BaubleType.BELT;
}
示例4: getBaubleType
@Optional.Method(modid = "baubles")
@Override
public BaubleType getBaubleType(ItemStack itemStack)
{
return BaubleType.BELT;
}
示例5: getBaubleType
@Override
public BaubleType getBaubleType(ItemStack stack) {
return BaubleType.BELT;
}
示例6: getBaubleType
@Override
public BaubleType getBaubleType(ItemStack itemstack) { return BaubleType.BELT; }
示例7: getBaubleType
@Override
public BaubleType getBaubleType(ItemStack stack)
{
return BaubleType.BELT;
}
示例8: getBaubleType
@Override
public BaubleType getBaubleType(ItemStack itemstack) {
return BaubleType.BELT;
}
示例9: getBaubleType
@Override
// Tells Baubles What slot Belts Can Be Equiped To
public BaubleType getBaubleType(ItemStack itemstack) {
return BaubleType.BELT;
}
示例10: getBaubleType
@Override
public BaubleType getBaubleType(ItemStack itemstack) {
return BaubleType.BELT;
}
示例11: getBaubleType
@Override
public BaubleType getBaubleType(ItemStack itemStack) {
return BaubleType.BELT;
}
示例12: getBaubleType
@Override
public BaubleType getBaubleType(ItemStack itemstack) {
return BaubleType.BELT;
}