How to sort items from your mod in vanilla creative tabs?

Started by villagernumber9 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to sort items from your mod in vanilla creative tabs?
Tue, 04/22/2025 - 10:47 (edited)

I've seen a lot of posts about this saying it's impossible or just misunderstanding the question and saying Workspace>Edit element order. But I know for a fact you can put any modded item next to any vanilla item, since nearly every mod I've played with does this. I'm using Caverns and Chasms as an example here:

https://imgur.com/a/k0UprHD

So clearly it's possible, the question is how?  

 

Edited by villagernumber9 on Tue, 04/22/2025 - 10:47
Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
public void insertAfter…
Tue, 04/22/2025 - 10:59
    public void insertAfter(ItemStack existingEntry, ItemStack newEntry, CreativeModeTab.TabVisibility visibility) {
        assertStackCount(newEntry);
        if (isParentTab(visibility)) {
            this.assertTargetExists(this.parentEntries, existingEntry);
            this.assertNewEntryDoesNotAlreadyExists(this.parentEntries, newEntry);
            this.parentEntries.addAfter(existingEntry, newEntry);
        }

        if (isSearchTab(visibility)) {
            this.assertTargetExists(this.searchEntries, existingEntry);
            this.assertNewEntryDoesNotAlreadyExists(this.searchEntries, newEntry);
            this.searchEntries.addAfter(existingEntry, newEntry);
        }

    }
Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mind explaining how this…
Tue, 04/22/2025 - 11:15

Mind explaining how this works? I'm not very good with code

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
H4sIAAAAAAAA/91XbWvjRhD…
Tue, 04/22/2025 - 11:29

H4sIAAAAAAAA/91XbWvjRhD+K1sVDhuClNDCEccx55eUhsZxiN1rS3WIlTR2trd6QbtSLIL/e2dXsiTL8jX5cHBXgYNmd96eZ0Y7m79f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E2dxf/fXCaDdn5DC2a2/O1rdHR8MrYPgTSIerSPbUP/Z7OxwZ+w+/QvTFxLfYg0AAA==

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can try this procedure
Tue, 04/22/2025 - 11:29

You can try this procedure

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have inserted my item to…
Tue, 04/22/2025 - 11:32

I have inserted my item to the diamond sword.

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Have a good time   You can…
Tue, 04/22/2025 - 11:38

Have a good time

 

You can decode the code using convenientCopy plugin.

Please use the paste to recreate.

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I installed your plugin and…
Tue, 04/22/2025 - 11:57

I installed your plugin and recreated the code but it doesn't compile properly. Am I missing something?

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you should edit the…
Tue, 04/22/2025 - 12:00

you should edit the procedure。。。

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
my item is not your item
Tue, 04/22/2025 - 12:00

my item is not your item

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
your mod do not have it
Tue, 04/22/2025 - 12:00

your mod do not have it

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I did put my item in, but…
Tue, 04/22/2025 - 12:02

I did put my item in, but was I supposed to do something else as well?

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
the diamond sword is the…
Tue, 04/22/2025 - 12:04

the diamond sword is the item that you want to follow in the creativeTab.

the tabName is the tab's registerName

the my is your item that you want to insert.

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can edit these parameter…
Tue, 04/22/2025 - 12:08

You can edit these parameter to make it follow your mind