@Override public boolean checkItemStack(ItemStack pItemStack) { String ls = owner.getMaidMaster(); return (pItemStack.getItem() instanceof ItemBow) || (pItemStack.getItem() == Items.arrow) || LMM_TriggerSelect.checkWeapon(ls, "Bow", pItemStack) || LMM_TriggerSelect.checkWeapon(ls, "Arrow", pItemStack); }
@Override public boolean changeMode(EntityPlayer pentityplayer) { ItemStack litemstack = owner.maidInventory.getStackInSlot(0); if (litemstack != null) { if (litemstack.getItem() instanceof ItemBow || LMM_TriggerSelect.checkWeapon(owner.getMaidMaster(), "Bow", litemstack)) { if (owner.maidInventory.getInventorySlotContainItem(ItemFlintAndSteel.class) > -1) { owner.setMaidMode("Blazingstar"); if (LMM_LittleMaidMobNX.ac_BlazingStar != null) { pentityplayer.triggerAchievement(LMM_LittleMaidMobNX.ac_BlazingStar); } } else { owner.setMaidMode("Archer"); if (LMM_LittleMaidMobNX.ac_Archer != null) { pentityplayer.triggerAchievement(LMM_LittleMaidMobNX.ac_Archer); } } return true; } } return false; }
@Override public int getNextEquipItem(int pMode) { int li; ItemStack litemstack; // モードに応じた識別判定、速度優先 switch (pMode) { case mmode_Archer: case mmode_Blazingstar: for (li = 0; li < LMM_InventoryLittleMaid.maxInventorySize; li++) { litemstack = owner.maidInventory.getStackInSlot(li); if (litemstack == null) continue; // 射手 if (litemstack.getItem() instanceof ItemBow || LMM_TriggerSelect.checkWeapon(owner.getMaidMaster(), "Bow", litemstack)) { return li; } } break; } return -1; }