Posted September 14, 201510 yr Good Nigths im triying something messy to fix this trouble, and the trouble is mi guns dont work went hold by entityes http://www.curse.com/mc-mods/minecraft/228033-mercenarymod what i got done, actually experimenting whith the basic wooden bow, when you swing or rigth click, this bow spawn an ghost entity that first check if the holder of the bow is a valid player or any other entity if is a player it does nothing just let the bow works like always, but if this is a mob, a villager or any other entity the ghost triger the bow animation, thigthen and shoot and arrow based of what kind of arrows the entity has in its inventory. and thats the point i get stuck entityes has a basic inventory but im realize not how to get the inventory size, im prety sure squeletons zombyes and mi custom entity has a base of only 5 slots the method : playerIn.inventory.getSizeInventory() only works on EntityPlayer but not in entityLivingBase so ican't not use it to get the size i need size to make a loop to check all the invetory slots once i get the size either way i think i could use entity.getCurrentArmor(slotIn) or entity.getEquipmentInSlot(slotIn) to check the slots in search for bullets or arrows thanks for your help
September 14, 201510 yr Author thats bad so the only generic logical way to do this is forget about search in the mob slots, and create some quiver + bow to store the arrows as an NBT in the bow or make the entityes shoot infinity i dont like that idea
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.