@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 void init() { // 登録モードの名称追加 /* langファイルに移動 ModLoader.addLocalization("littleMaidMob.mode.Archer", "Archer"); ModLoader.addLocalization("littleMaidMob.mode.F-Archer", "F-Archer"); ModLoader.addLocalization("littleMaidMob.mode.T-Archer", "T-Archer"); ModLoader.addLocalization("littleMaidMob.mode.D-Archer", "D-Archer"); // ModLoader.addLocalization("littleMaidMob.mode.Archer", "ja_JP", "射手"); ModLoader.addLocalization("littleMaidMob.mode.Blazingstar", "Blazingstar"); ModLoader.addLocalization("littleMaidMob.mode.F-Blazingstar", "F-Blazingstar"); ModLoader.addLocalization("littleMaidMob.mode.T-Blazingstar", "T-Blazingstar"); ModLoader.addLocalization("littleMaidMob.mode.D-Blazingstar", "D-Blazingstar"); // ModLoader.addLocalization("littleMaidMob.mode.Blazingstar", "ja_JP", "刃鳴散らす者"); */ LMM_TriggerSelect.appendTriggerItem(null, "Bow", ""); LMM_TriggerSelect.appendTriggerItem(null, "Arrow", ""); }
@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; }