Skip to content

Useful information Problem solving

Vaan1310 edited this page Oct 28, 2024 · 1 revision

Vanilla Item

Let's say you got a minecraft name wrong and it won't load, what you can do to be 100% sure that the name is correct is got to here: https://jd.papermc.io/paper/1.21.1/org/bukkit/Material.html

This contains ALL valid minecraft items, you just need to choose, the only section you are interested in is Enum Constant


Slimefun Item

What if you got a slimefun item wrong? Well some slimefun items have an ID slightly different than your name, you have 2 options, either:

  • A: search it using /sf give command
  • B: go to the part where slimefun defines their own IDs, don't worry you don't need to understand what any of this does, you only need to grab the ID which is the first argument of the constructor, under here an example:

public static final SlimefunItemStack CLOTH = new SlimefunItemStack("CLOTH", Material.PAPER, "&bCloth");

Here the ID is "CLOTH", in this case the name is the same as the ID so you shouldn't have any issues to begin with. An example of a different ID might be:

public static final SlimefunItemStack REACTOR_COOLANT_CELL = new SlimefunItemStack("REACTOR_COLLANT_CELL", HeadTexture.COOLANT_CELL, "&bReactor Coolant Cell");

For some reason, probably an error, there is a typo in the ID of REACTOR_COOLANT_CELL, so when you need to insert the entry you need to insert the ID which contains the typo so in this case REACTOR_COLLANT_CELL, funny huh?

If your item isn't from core slimefun, then you might need to dig around to see where the items are defined, or just do the command tabbing trick I told you.


RecipeType

You can't find a RecipeType? same procedure as slimefun item, this time you can't use the command trick sadly, might add a command to print to a file all RecipeType key in the future if needed, but no such feature is here yet nor seems needed for now. So what you can do is:

Go where the RecipeTypes are defined, and you guessed it! Copy the first string and that is the ID. So for example

public static final RecipeType ORE_CRUSHER = new RecipeType(new NamespacedKey(Slimefun.instance(), "ore_crusher"), SlimefunItems.ORE_CRUSHER, "", "&a&oCrush it using the Ore Crusher");

the part you care about is "ore_crusher" you can type it lowercase or uppercase, no difference don't worry. You can do same tricks with other addons, but BEWARE: not all recipe types are intended for crafting, and putting not crafting releated stuff will lead to unexpected behaviour, like MULTIBLOCK RecipeType is handled in its particular way so there is an high chance it won't do anything and you won't be able to craft the item.


Heads

You don't know how to get heads? There are many sites that offer already made heads like: https://minecraft-heads.com/

If you want to make it yourself you might need to change your own skin, and do some more steps which aren't covered here but can be found easily online.

Little advanced tricks:

If an head db site has only stuff in this format or similar (don't worry minecraft-heads has the direct link to textures.minecraft.net where you can copy the hexadecimal from): eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvY2NmMTM5YTM5OTc2Yjk5Y2ExZTFlYjliNWIyYmRhNzRlYWY0MjU3YWZhZjZiNGQxY2Q4ZTA2ZGRmOTkzYWUwMSJ9fX0=

Then that is a Base64 string, it is a way to encode data, we don't care much how it works, the important part is that you can decode it will have the link that leat to textures.minecraft.net that you need.

Clone this wiki locally