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

Started by villagernumber9 on

Topic category: Help with Minecraft modding (Java Edition)

Active 19 hours ago
Joined Apr 2025
Points:
49

User statistics:

  • Modifications: 0
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 23
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
Active 1 day ago
Joined Dec 2024
Points:
167

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 4
  • Comments: 54
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);
        }

    }
Active 19 hours ago
Joined Apr 2025
Points:
49

User statistics:

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

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

Active 1 day ago
Joined Dec 2024
Points:
167

User statistics:

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

H4sIAAAAAAAA/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hyTrSB/lNn8EAThQ8nLQOB0RVgykLRdtI/hUrnpL2hFSRyrJq4bX3W7Ioz0uLQxN9HJpjLOJ4o5sP48eZ+5azGE2dxf/fXCaDdn5DC2a2/O1rdHR8MrYPgTSIerSPbUP/Z7OxwZ+w+/QvTFxLfYg0AAA==

Active 1 day ago
Joined Dec 2024
Points:
167

User statistics:

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

You can try this procedure

Active 1 day ago
Joined Dec 2024
Points:
167

User statistics:

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

I have inserted my item to the diamond sword.

Active 1 day ago
Joined Dec 2024
Points:
167

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 4
  • Comments: 54
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.

Active 19 hours ago
Joined Apr 2025
Points:
49

User statistics:

  • Modifications: 0
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 23
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?

Active 1 day ago
Joined Dec 2024
Points:
167

User statistics:

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

you should edit the procedure。。。

Active 1 day ago
Joined Dec 2024
Points:
167

User statistics:

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

my item is not your item

Active 1 day ago
Joined Dec 2024
Points:
167

User statistics:

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

your mod do not have it

Active 19 hours ago
Joined Apr 2025
Points:
49

User statistics:

  • Modifications: 0
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 23
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?

Active 1 day ago
Joined Dec 2024
Points:
167

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 4
  • Comments: 54
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.

Active 1 day ago
Joined Dec 2024
Points:
167

User statistics:

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

You can edit these parameter to make it follow your mind