本文整理汇总了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;
}