Posted August 22, 20223 yr ModItems package com.Denis.den.item; import com.Denis.den.den; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.Item; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; public class ModItems { public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, den.MOD_ID); public static final RegistryObject<Item> RUBY = ITEMS.register("ruby", () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_FOOD))); public static void register(IEventBus eventBus) { ITEMS.register(eventBus); } } My .mod file package com.Denis.den; import com.Denis.den.item.ModItems; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; // The value here should match an entry in the META-INF/mods.toml file @Mod(den.MOD_ID) public class den { public static final String MOD_ID = "den"; // Very Important Comment public den() { IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); ModItems.register(modEventBus); modEventBus.addListener(this::commonSetup); MinecraftForge.EVENT_BUS.register(this); } private void commonSetup(final FMLCommonSetupEvent event) { } // You can use EventBusSubscriber to automatically register all static methods in the class annotated with @SubscribeEvent @Mod.EventBusSubscriber(modid = MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) public static class ClientModEvents { @SubscribeEvent public static void onClientSetup(FMLClientSetupEvent event) { } } } en_us.json { "item.den.Ruby": "Ruby" } Ruby.json { "parent": "item/generated", "textures": { "layer0": "den:item/Ruby" } } The png name is Ruby.png
August 22, 20223 yr Uppercase characters are not allowed in resource locations or the file names they point to. You will find an error in your run/logs/debug.log that tells you the same. Edited August 22, 20223 yr by warjort Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
August 22, 20223 yr Author 16 minutes ago, warjort said: Uppercase characters are not allowed in resource locations or the file names they point to. You will find an error in your run/logs/debug.log that tells you the same. still dose not work
August 22, 20223 yr Author I still dose not render the texture look { "parent": "item/generated", "textures": { "layer0": "den:item/ruby" } } the second { "item.den.ruby": "Ruby" } MAyeby i am doing something wrong agin
August 22, 20223 yr First of all "den" is a too short and not unique enough mod id. Where is your file located, please post the path? and please post the debug.log.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.