Jump to content

Recommended Posts

Posted

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?

Posted

Why would I need creative tabs on a server? Either use a sided proxy or @SideOnly it.

Read the EAQ before posting! OR ELSE!

 

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

Posted

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?

Posted

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?

Posted

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.

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • UPDATE: this seems to be an Arch-specific issue. Switching to Ubuntu server fixed EVERYTHING.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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