Jump to content

Textures not working


Limersz

Recommended Posts

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 1.16 | 2.0 - 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))); }

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

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