Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/02/19 in all areas

  1. https://gist.github.com/Cadiboo/fbea89dc95ebbdc58d118f5350b7ba93#recommended-forge-conventions
    2 points
  2. As I've said Your file isn't horse_armor_wood. It's horse_armor_wood.png(I presume anyway since you have file extensions hidden it may be any other image extension - and it has an image extension because it has an image thumbnail).
    1 point
  3. What is "ctx associated with this type of textures"? Show what you've tried.
    1 point
  4. Like Draco said, the ItemGroup constructor is called before your ItemInit.moditem has even been created. Generally, you can assume that ItemGroups are created before Items are. This is what I do to get around it: public class ModItemGroup extends net.minecraft.item.ItemGroup { private IItemProvider icon; public ModItemGroup(String label, IItemProvider icon) { super(label); this.icon = icon; } @OnlyIn(Dist.CLIENT) @Override public ItemStack createIcon() { return new ItemStack(icon); } } public static final ModItemGroup modItemGroup = new ModItemGroup("ModItemGroup", ()->(ItemInit.moditem)); Normally I would use Supplier<Item> here, but IItemProvider already does the same thing with better integration such as being able to be passed directly to an ItemStack's constructor. This doesn't care whether moditem has already been initialized when modItemGroup is created. It only needs to exist by the time modItemGroup.createIcon() is called. Either way though, static initializers are unpredictable and that's why I personally avoid them wherever possible.
    1 point
  5. You have a static initializer. This will cause your code to run at an unpredictable time. In this case, it runs before Items are registered.
    1 point
×
×
  • Create New...

Important Information

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