Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

 

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

 

 

 

 

 

 

 

 

 

  • 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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.