Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Ive been having an issue using the textures for the modded things for minecraft. I just started coding in intellij minecraft forge. i watched this tutorial by cy4s Minecraft Modding Tutorial | 

Blocks + Items. I followed everything he did exactly but for some reason the textures are not working. I went to resources made a new assets folder, then made the lang, models, and textures folders and made the json files too. assets.example.lang assets.example.models.item assets.example.textures.items. lang work fine but textures dont. ive tried everything. Please help me out.

 

Code -

{ "item.examplemod.example_item": "example_item" }

{ "parent": "item/generated", "textures": { "layer0": "examplemod:items/examplemod" } }

 

examplemod.java -

package com.example.examplemod; import net.minecraft.block.Block; import net.minecraft.block.Blocks; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.InterModComms; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent; import net.minecraftforge.fml.event.lifecycle.InterModProcessEvent; import net.minecraftforge.fml.event.server.FMLServerStartingEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import java.util.stream.Collectors; import com.example.examplemod.core.init.itemInit; @Mod("examplemod") public class ExampleMod { public static final Logger LOGGER = LogManager.getLogger(); public static final String MOD_ID = "examplemod"; public ExampleMod() { IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus(); itemInit.ITEMS.register(bus); MinecraftForge.EVENT_BUS.register(this); } }

itemInit.java

package com.example.examplemod.core.init; import com.example.examplemod.ExampleMod; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; public class itemInit { public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS,ExampleMod.MOD_ID); public static final RegistryObject<Item> EXAMPLE_ITEM = ITEMS.register("example_item", () -> new Item(new Item.Properties().tab(ItemGroup.TAB_MISC))); }

First of all please use the code feature to post code and do not remove the formatting of the code, since it's very hard to read.

The folder for item textures should be named "item" and not "items".
Please post the full path of the item model in your Project (should include the model .json name).

  • Author
1 hour ago, Luis_ST said:

First of all please use the code feature to post code and do not remove the formatting of the code, since it's very hard to read.

The folder for item textures should be named "item" and not "items".
Please post the full path of the item model in your Project (should include the model .json name).

Src/main/resources/assets.example

Assets.example.lang.en_us.json

Assets.example.models.item.example_item.json

Assets.example.textures.item.examplemod.png

Changed textures.items to textures.item.

Changed parent": "item/generated", "textures": { "layer0": "example:item/examplemod" } }

 

Still not working.

Guest
This topic is now closed to further replies.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.