Posted March 8, 201411 yr Hey. Im working on a backpack. Its works, has 3d model when worn and all that stuff. The only thing i don't know how to deal with is inserting items on pickup. I already have an event handler set up with this event (which gives an achievement for now) but i dont know to inject items into it. As i said, i can detect when the player picks up items. This is my current code: @ForgeSubscribe public void onItemPickup(EntityItemPickupEvent event){ if(event.item.getEntityItem().getItem() == Item.coal){ AchievementLoader.completeAchievement(event.entityPlayer, "firstStep"); if(event.entityPlayer.inventory.armorInventory[1].getItem() == ToolLoader.itemBackpack){ } } } (You really whould tell me why i can't use the code button and all of those buttons at the top of the post ) I try my best, so apologies if I said something obviously stupid!
March 9, 201411 yr You need to @Override the oldpickup @Buttons and the buttons are only decoration blocks [.code][./code] for cookies without the . *i hope u get it* ********************************* ** Always remember you are unique, ** ** just like everyone else ** ********************************** Was my post helpful? Say thanks and press the thank you button, on my post!! God, damn it!
March 10, 201411 yr Author Buttons: So, it's just BBCode (Which im aware of, since I also used to program websites)... well thanks for making me look stupid About the code.. yeah but i need to know how to actually assign those items into my backpack's inventory (which is currently equipped on my back as a piece of armor).. because usually armors don't have an inventory I try my best, so apologies if I said something obviously stupid!
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.