#Items at a specific slot in ItemGroups
1 messages · Page 1 of 1 (latest)
You can provide a reference item from vanilla and add your item after that item
How do I do that?
For FabricItemGroupEntries you can entries.addAfter((ItemConvertible) item, List.of((ItemStack) stack), visibility) with the list of the stack being the item added after the specified item.
I don't understand what you mean with that.
When registering items for your mod you can use the addAfter method in your listener to position the item after a reference item from vanilla.
So for example you add a custom sword item after the diamond sword in the combat item group.
on initialize run
private static void addItemsToCombatItemGroup(FabricItemGroupEntries entries) {
entries.addAfter(Items.DIAMOND_SWORD, CUSTOM_SWORD);
}```
but that only adds the item after another item, in the ad astra mod there is a empty slots inbetween the items
something like this
i don't know exactly how they did it, but you can read through it and look.
alr i'll see, ty
please do remember the licence should you chose to reuse code
ye, but i still don't understand how they did it
idk either
They seem to use a library to create a custom creative mode tab, namely com.teamresourceful.resourcefullib.common.item.tabs.ResourcefulCreativeTab. So I guess you could investigate that.
alright i'll try
still don't understand it, i don't even find any tutorials on how to use the library :/
I don't see anything that would cause the effect you mentioned
wdym
Idk how they did it. What version is this screenshot from?
the screenshot is 1.18.2 and im trying to do 1.21
There is your answer then.
Ad Astra is a Minecraft space tech and exploration mod! - terrarium-earth/Ad-Astra
I guess i didn't look long enough, thanks