Posted July 6, 201312 yr Hi! I noticed that getCreativeTab in Item class is Client Sided: @SideOnly(Side.CLIENT) /** * gets the CreativeTab this item is displayed on */ public CreativeTabs getCreativeTab() { return this.tabToDisplayOn; } And the getTabIconItemIndex too: @SideOnly(Side.CLIENT) /** * the itemID for the item to be displayed on the tab */ public int getTabIconItemIndex() { return 1; } I made a mod that need to segregate Items based on which creativeTab it belongs to, this way: itemCategoryIconIndex = itemstack.getItem().getCreativeTab().getTabIconItemIndex(); This is the only way i found to segregate items and maintain Minecraft behavior. Could you help with this making these functions not sided? Thanks Slash †GnR† Slash can one man truly make a difference?
July 6, 201312 yr Why would I need creative tabs on a server? Either use a sided proxy or @SideOnly it. Read the EAQ before posting! OR ELSE! This isn't building better software, its trying to grab a place in the commit list of a highly visible github project. www.forgeessentials.com Don't PM me, I don't check this account unless I have to.
July 6, 201312 yr Author It is because i am using this: @ForgeSubscribe public void onItemPickup(EntityItemPickupEvent event) { And this forge subscribe is server side. I am organizing item when player picks them up, but there is no creativetabs server side †GnR† Slash can one man truly make a difference?
July 7, 201312 yr Author I have just one chance inside onItemPickup, can't delay the action. But if you can set creativeTab, i think would be logic if you can read too. Well. I'll think how to segregate itens another way...will not be not easy because there is no other propertie like creativetab that's already a native way to segregate them. †GnR† Slash can one man truly make a difference?
July 9, 201312 yr Author This could be simple, but it will be complex. I think that i should not use sockets or even delay the action inside onItemPickup. I already create a method to segregate things, but it is far away from CreativeTabs groups. Example: how to determine if an item is a weapon? This can't be done without creativeTab information. Look this: isTool = item instanceof ItemTool; isArmor = item instanceof ItemArmor; isPotion = item instanceof ItemPotion; isBlock = item instanceof ItemBlock; isFood = item instanceof ItemFood; There is no "instance of ItemWeapon", and I can't segregate by its material (there is no sense). I still believe that using creativeTabs is the best way to segregate items using built-in Minecraft methods. Please, consider my request. Thanks ps: the mod I am working on is the Simplifier. I created a new item named Auto Bag. Every item that user picks is automatically saved inside these bags, and now, i want to create a way to organize them. This is the link of working version with of Auto Bag (not categorized yet): http://www.minecraftforum.net/topic/1803170-151sspsmpforge-simplifier-made-to-be-easier/ †GnR† Slash can one man truly make a difference?
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.