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

Hello Modders!

 

Im new to forge, just recently made my huge plans for next mods, but I got stuck on such simple thing..., adding textures, I get error in Forge console, it says texture file couldn't be found and therefore it uses just a weird checkers texture..., please don't think that there is mistake in my code, I double and triple checked it, but I here it is anyways:

 

I have a java package called assets.testmod.src and I have two files there, TestMod.java, which is basically the main class, and ModInfo.java - where all the @Mod data is. I also have another package inside this package called assets.testmod.src.block, where I was adding my blocks. I have one file called TestBlock.java there.

 

 

So, TestMod.java:

 

 

package assets.testmod.src;

 

 

import assets.testmod.src.blocks.TestBlock;

import net.minecraft.block.Block;

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.EventHandler;

import cpw.mods.fml.common.event.FMLInitializationEvent;

import cpw.mods.fml.common.event.FMLPostInitializationEvent;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;

import cpw.mods.fml.common.event.FMLServerStartingEvent;

import cpw.mods.fml.common.registry.GameRegistry;

import cpw.mods.fml.common.registry.LanguageRegistry;

 

 

@Mod (modid = ModInfo.MODID, name = ModInfo.NAME, version = ModInfo.VERSION)

 

 

public class TestMod {

 

public static final Block testBlock = new TestBlock(3000).setUnlocalizedName("testBlock");

 

@Mod.Instance(ModInfo.MODID)

public static TestMod mod;

 

@EventHandler

public void Init (FMLInitializationEvent event)

{

GameRegistry.registerBlock(testBlock);

LanguageRegistry.addName(testBlock, "Test Block");

}

}

 

 

 

TestBlock.java:

 

 

package assets.testmod.src.blocks;

 

 

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.client.renderer.texture.IconRegister;

import net.minecraft.creativetab.CreativeTabs;

import assets.testmod.src.ModInfo;

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.relauncher.SideOnly;

 

 

public class TestBlock extends Block {

 

 

public TestBlock(int par1) {

super (par1, Material.iron);

this.setHardness(3.0F);

this.setResistance(-1);

this.setCreativeTab(CreativeTabs.tabBlock);

}

 

@SideOnly(Side.CLIENT)

public void registerIcons(IconRegister tex) {

this.blockIcon = tex.registerIcon(ModInfo.MODID + ":testBlock");

}

 

 

}

 

 

 

To be more precise I put my block texture file in /forge/mcp/src/minecraft/assets/testmod/src/textures/blocks, the file called testBlock.png.

 

 

Hopefully I will solve this problem, I literally have tried everything, googled everywhere, but nothing worked for me... By the way I am using Eclipse, got JDK installed, Java 7 installed (obviously), system is MacOS X 10.8.4

 

 

Thanks for your help!

Yours faithfully,

AlenEviLL.

wrong:

/forge/mcp/src/minecraft/assets/testmod/src/textures/blocks

 

nope

 

right:

/forge/mcp/src/minecraft/assets/testmod/textures/blocks

 

 

please refer to "hydroflame guide to textures" on the wiki for further information :)

 

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

  • Author

hydriflame, but testmod is the name of developer and src is the name of the mod, I know I made it quite confusing :)

guide says block texture goes:

 

mcp/src/minecraft/*modid*/textures/blocks/

 

 

if the mod is called "src" then remove "testmod"

:)

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

  • Author

hydroflame, omg thank you so much it worked!!! So I basically have to put all files in modid folder, not the mod folder itself. Thank you very much, I should have asked this question before, I stuck on this issue for two days  :)

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.